jebamo 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/package.json +2 -2
- package/dist/components/index.d.ts +0 -33
- package/dist/components/index.js +0 -3
- package/dist/components/index.js.map +0 -1
- package/dist/components/je-alert.d.ts +0 -11
- package/dist/components/je-alert.js +0 -146
- package/dist/components/je-alert.js.map +0 -1
- package/dist/components/je-branch.d.ts +0 -11
- package/dist/components/je-branch.js +0 -37
- package/dist/components/je-branch.js.map +0 -1
- package/dist/components/je-button.d.ts +0 -11
- package/dist/components/je-button.js +0 -8
- package/dist/components/je-button.js.map +0 -1
- package/dist/components/je-card.d.ts +0 -11
- package/dist/components/je-card.js +0 -8
- package/dist/components/je-card.js.map +0 -1
- package/dist/components/je-checkbox-group.d.ts +0 -11
- package/dist/components/je-checkbox-group.js +0 -90
- package/dist/components/je-checkbox-group.js.map +0 -1
- package/dist/components/je-checkbox-option.d.ts +0 -11
- package/dist/components/je-checkbox-option.js +0 -65
- package/dist/components/je-checkbox-option.js.map +0 -1
- package/dist/components/je-checkbox.d.ts +0 -11
- package/dist/components/je-checkbox.js +0 -83
- package/dist/components/je-checkbox.js.map +0 -1
- package/dist/components/je-color.d.ts +0 -11
- package/dist/components/je-color.js +0 -8
- package/dist/components/je-color.js.map +0 -1
- package/dist/components/je-column-group.d.ts +0 -11
- package/dist/components/je-column-group.js +0 -46
- package/dist/components/je-column-group.js.map +0 -1
- package/dist/components/je-column.d.ts +0 -11
- package/dist/components/je-column.js +0 -95
- package/dist/components/je-column.js.map +0 -1
- package/dist/components/je-datepicker.d.ts +0 -11
- package/dist/components/je-datepicker.js +0 -3249
- package/dist/components/je-datepicker.js.map +0 -1
- package/dist/components/je-details.d.ts +0 -11
- package/dist/components/je-details.js +0 -49
- package/dist/components/je-details.js.map +0 -1
- package/dist/components/je-divider.d.ts +0 -11
- package/dist/components/je-divider.js +0 -42
- package/dist/components/je-divider.js.map +0 -1
- package/dist/components/je-drawer.d.ts +0 -11
- package/dist/components/je-drawer.js +0 -60
- package/dist/components/je-drawer.js.map +0 -1
- package/dist/components/je-dropzone.d.ts +0 -11
- package/dist/components/je-dropzone.js +0 -55
- package/dist/components/je-dropzone.js.map +0 -1
- package/dist/components/je-form.d.ts +0 -11
- package/dist/components/je-form.js +0 -8
- package/dist/components/je-form.js.map +0 -1
- package/dist/components/je-icon.d.ts +0 -11
- package/dist/components/je-icon.js +0 -8
- package/dist/components/je-icon.js.map +0 -1
- package/dist/components/je-infinite.d.ts +0 -11
- package/dist/components/je-infinite.js +0 -64
- package/dist/components/je-infinite.js.map +0 -1
- package/dist/components/je-input.d.ts +0 -11
- package/dist/components/je-input.js +0 -8
- package/dist/components/je-input.js.map +0 -1
- package/dist/components/je-link.d.ts +0 -11
- package/dist/components/je-link.js +0 -62
- package/dist/components/je-link.js.map +0 -1
- package/dist/components/je-loading.d.ts +0 -11
- package/dist/components/je-loading.js +0 -66
- package/dist/components/je-loading.js.map +0 -1
- package/dist/components/je-menu-option.d.ts +0 -11
- package/dist/components/je-menu-option.js +0 -37
- package/dist/components/je-menu-option.js.map +0 -1
- package/dist/components/je-menu.d.ts +0 -11
- package/dist/components/je-menu.js +0 -37
- package/dist/components/je-menu.js.map +0 -1
- package/dist/components/je-modal.d.ts +0 -11
- package/dist/components/je-modal.js +0 -104
- package/dist/components/je-modal.js.map +0 -1
- package/dist/components/je-multiselect-option.d.ts +0 -11
- package/dist/components/je-multiselect-option.js +0 -62
- package/dist/components/je-multiselect-option.js.map +0 -1
- package/dist/components/je-multiselect.d.ts +0 -11
- package/dist/components/je-multiselect.js +0 -146
- package/dist/components/je-multiselect.js.map +0 -1
- package/dist/components/je-page.d.ts +0 -11
- package/dist/components/je-page.js +0 -61
- package/dist/components/je-page.js.map +0 -1
- package/dist/components/je-pill.d.ts +0 -11
- package/dist/components/je-pill.js +0 -8
- package/dist/components/je-pill.js.map +0 -1
- package/dist/components/je-placeholder.d.ts +0 -11
- package/dist/components/je-placeholder.js +0 -40
- package/dist/components/je-placeholder.js.map +0 -1
- package/dist/components/je-popover.d.ts +0 -11
- package/dist/components/je-popover.js +0 -8
- package/dist/components/je-popover.js.map +0 -1
- package/dist/components/je-radio-group.d.ts +0 -11
- package/dist/components/je-radio-group.js +0 -92
- package/dist/components/je-radio-group.js.map +0 -1
- package/dist/components/je-radio.d.ts +0 -11
- package/dist/components/je-radio.js +0 -68
- package/dist/components/je-radio.js.map +0 -1
- package/dist/components/je-select-option.d.ts +0 -11
- package/dist/components/je-select-option.js +0 -56
- package/dist/components/je-select-option.js.map +0 -1
- package/dist/components/je-select.d.ts +0 -11
- package/dist/components/je-select.js +0 -208
- package/dist/components/je-select.js.map +0 -1
- package/dist/components/je-tab.d.ts +0 -11
- package/dist/components/je-tab.js +0 -37
- package/dist/components/je-tab.js.map +0 -1
- package/dist/components/je-tabs.d.ts +0 -11
- package/dist/components/je-tabs.js +0 -37
- package/dist/components/je-tabs.js.map +0 -1
- package/dist/components/je-textarea.d.ts +0 -11
- package/dist/components/je-textarea.js +0 -55
- package/dist/components/je-textarea.js.map +0 -1
- package/dist/components/je-toast.d.ts +0 -11
- package/dist/components/je-toast.js +0 -37
- package/dist/components/je-toast.js.map +0 -1
- package/dist/components/je-toggle.d.ts +0 -11
- package/dist/components/je-toggle.js +0 -57
- package/dist/components/je-toggle.js.map +0 -1
- package/dist/components/je-toolbar.d.ts +0 -11
- package/dist/components/je-toolbar.js +0 -37
- package/dist/components/je-toolbar.js.map +0 -1
- package/dist/components/je-tree.d.ts +0 -11
- package/dist/components/je-tree.js +0 -37
- package/dist/components/je-tree.js.map +0 -1
- package/dist/components/p-1f3759e7.js +0 -41
- package/dist/components/p-1f3759e7.js.map +0 -1
- package/dist/components/p-243cc91b.js +0 -50
- package/dist/components/p-243cc91b.js.map +0 -1
- package/dist/components/p-2df369c4.js +0 -265
- package/dist/components/p-2df369c4.js.map +0 -1
- package/dist/components/p-41492a72.js +0 -1514
- package/dist/components/p-41492a72.js.map +0 -1
- package/dist/components/p-4b8ae8ef.js +0 -51
- package/dist/components/p-4b8ae8ef.js.map +0 -1
- package/dist/components/p-5dee004d.js +0 -246
- package/dist/components/p-5dee004d.js.map +0 -1
- package/dist/components/p-8401b4e4.js +0 -48
- package/dist/components/p-8401b4e4.js.map +0 -1
- package/dist/components/p-94327b0d.js +0 -39
- package/dist/components/p-94327b0d.js.map +0 -1
- package/dist/components/p-aa4caa39.js +0 -76
- package/dist/components/p-aa4caa39.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jebamo",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Jebamo core web component library",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"date-fns": "^4.1.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@stencil/angular-output-target": "0.
|
|
26
|
+
"@stencil/angular-output-target": "0.10.0",
|
|
27
27
|
"@stencil/core": "^4.7.0",
|
|
28
28
|
"@stencil/sass": "^3.0.12",
|
|
29
29
|
"@types/jest": "^29.5.6",
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get the base path to where the assets can be found. Use "setAssetPath(path)"
|
|
3
|
-
* if the path needs to be customized.
|
|
4
|
-
*/
|
|
5
|
-
export declare const getAssetPath: (path: string) => string;
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Used to manually set the base path where assets can be found.
|
|
9
|
-
* If the script is used as "module", it's recommended to use "import.meta.url",
|
|
10
|
-
* such as "setAssetPath(import.meta.url)". Other options include
|
|
11
|
-
* "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
|
|
12
|
-
* dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
|
|
13
|
-
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
14
|
-
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
15
|
-
* will have to ensure the static assets are copied to its build directory.
|
|
16
|
-
*/
|
|
17
|
-
export declare const setAssetPath: (path: string) => void;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Used to specify a nonce value that corresponds with an application's CSP.
|
|
21
|
-
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
22
|
-
* Alternatively, the nonce value can be set on a meta tag in the DOM head
|
|
23
|
-
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
|
|
24
|
-
* will result in the same behavior.
|
|
25
|
-
*/
|
|
26
|
-
export declare const setNonce: (nonce: string) => void
|
|
27
|
-
|
|
28
|
-
export interface SetPlatformOptions {
|
|
29
|
-
raf?: (c: FrameRequestCallback) => number;
|
|
30
|
-
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
31
|
-
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
32
|
-
}
|
|
33
|
-
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
|
package/dist/components/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"index.js","mappings":"","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface JeAlert extends Components.JeAlert, HTMLElement {}
|
|
4
|
-
export const JeAlert: {
|
|
5
|
-
prototype: JeAlert;
|
|
6
|
-
new (): JeAlert;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-41492a72.js';
|
|
2
|
-
import { d as defineCustomElement$6 } from './p-aa4caa39.js';
|
|
3
|
-
import { d as defineCustomElement$5 } from './p-243cc91b.js';
|
|
4
|
-
import { d as defineCustomElement$4 } from './p-4b8ae8ef.js';
|
|
5
|
-
import { d as defineCustomElement$3 } from './p-2df369c4.js';
|
|
6
|
-
import { d as defineCustomElement$2 } from './p-5dee004d.js';
|
|
7
|
-
|
|
8
|
-
const jeAlertCss = ":host{display:block;--je-width:35%}@media (width < 1200px){:host{--je-width:75%}}.modal{display:flex;flex-direction:column;position:fixed;border-radius:var(--je-border-radius, 2px);overflow:hidden;top:20%;left:50%;transform:translate(-50%, -20%);z-index:910;width:var(--je-width);background-color:var(--je-background-color);color:var(--je-text-color);box-shadow:0px 0px 15px 5px rgba(77, 77, 77, 0.4509803922)}.content-container{display:flex;flex-direction:column;padding:24px}.content-container .header{display:flex;width:100%;align-items:center}.content-container .header .close{margin-left:auto;--je-background:var(--je-medium-850)}.content-container .controls{margin-top:16px}.content-container .buttons{margin-top:24px;display:flex;gap:var(--je-spacing);justify-content:flex-end}.modal-transition{opacity:0;transition:opacity 250ms ease-in-out}.modal.open{opacity:1}.backdrop{position:fixed;top:0;width:100%;height:100%;background:var(--je-backdrop-color);z-index:909}.backdrop-transition{opacity:0;transition:opacity 250ms ease-in-out}.backdrop.fade{opacity:1}.clear{background:rgba(0, 0, 0, 0)}";
|
|
9
|
-
const JeAlertStyle0 = jeAlertCss;
|
|
10
|
-
|
|
11
|
-
const JeAlert$1 = /*@__PURE__*/ proxyCustomElement(class JeAlert extends H {
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
14
|
-
this.__registerHost();
|
|
15
|
-
this.__attachShadow();
|
|
16
|
-
this.didPresent = createEvent(this, "didPresent", 3);
|
|
17
|
-
this.didDismiss = createEvent(this, "didDismiss", 3);
|
|
18
|
-
this.didSubmit = createEvent(this, "didSubmit", 3);
|
|
19
|
-
this.handleBackdropClick = () => {
|
|
20
|
-
if (this.isOpen && this.backdropClose) {
|
|
21
|
-
this.dismiss('backdropClose');
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
this.isOpen = false;
|
|
25
|
-
this.header = undefined;
|
|
26
|
-
this.message = undefined;
|
|
27
|
-
this.icon = undefined;
|
|
28
|
-
this.buttons = undefined;
|
|
29
|
-
this.controls = undefined;
|
|
30
|
-
this.trigger = undefined;
|
|
31
|
-
this.showBackdrop = true;
|
|
32
|
-
this.backdropClose = true;
|
|
33
|
-
}
|
|
34
|
-
componentDidLoad() {
|
|
35
|
-
this.pageEl = this.el.closest('je-page');
|
|
36
|
-
this.parentEl = this.el.parentElement;
|
|
37
|
-
if (this.trigger) {
|
|
38
|
-
this.triggerElement = document.getElementById(this.trigger);
|
|
39
|
-
if (this.triggerElement) {
|
|
40
|
-
this.triggerElement.addEventListener('click', () => this.present());
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
console.error('USS Core: Failed to find modal trigger element!');
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
async present() {
|
|
48
|
-
if (!this.isOpen) {
|
|
49
|
-
this.el.remove();
|
|
50
|
-
if (this.pageEl) {
|
|
51
|
-
this.pageEl.append(this.el);
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
document.body.append(this.el);
|
|
55
|
-
}
|
|
56
|
-
this.isOpen = true;
|
|
57
|
-
return new Promise(resolve => {
|
|
58
|
-
this.contentEl.addEventListener('transitionend', () => {
|
|
59
|
-
this.didPresent.emit();
|
|
60
|
-
resolve();
|
|
61
|
-
}, { once: true });
|
|
62
|
-
this.backdropEl.classList.add('fade');
|
|
63
|
-
this.contentEl.classList.add('open');
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
async dismiss(role = 'manualClose', data) {
|
|
68
|
-
if (this.isOpen) {
|
|
69
|
-
return new Promise(resolve => {
|
|
70
|
-
this.contentEl.addEventListener('transitionend', () => {
|
|
71
|
-
this.el.remove();
|
|
72
|
-
this.parentEl.append(this.el);
|
|
73
|
-
this.isOpen = false;
|
|
74
|
-
this.didDismiss.emit({ role: role, data: data });
|
|
75
|
-
resolve();
|
|
76
|
-
}, { once: true });
|
|
77
|
-
this.backdropEl.classList.remove('fade');
|
|
78
|
-
this.contentEl.classList.remove('open');
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
render() {
|
|
83
|
-
const content = h("je-form", { key: 'b7046e7fa228538a683ec0d0611ad030b4fba1cb', onSubmit: (ev) => this.didSubmit.emit(ev) }, h("div", { key: '3880885a9dd3c61fc3eb1d0329ee8def64a2935e', class: "content-container" }, this.header && h("div", { key: 'a399b5ac5e3ccd7bea29826e8ffe92ff7969e701', class: "header" }, this.icon && h("je-icon", { key: '8e6226b9d40d1136c5ba164fb91dc56ec854d6dd', icon: this.icon }), h("h1", { key: '9b0865e01e3e0d527affb53e11754312f40c4dc7' }, this.header), h("je-button", { key: 'be0c3cdd9761f3a54c4f3f82339b16d9f22c4678', fill: 'clear', "icon-only": true, class: "close", onClick: () => this.dismiss() }, h("je-icon", { key: 'ff5ece6eb0678c017fe0474e8da58a19219baf71', icon: "close" }))), this.message && h("div", { key: '40b3a196ccbbc0e533f5054ded0989a27d5023a7', class: "message" }, this.message), this.controls && h("div", { key: 'fe9f0530966919f995fc7d90b22f408c2a16f09a', class: "controls" }, this.controls.map(control => (h("je-input", { type: control.type, required: control.required, label: control.label, placeholder: control.placeholder, validators: control.validators })))), this.buttons && h("div", { key: 'fa19ebc95e36955d4a2323d99d2856429203114b', class: "buttons" }, this.buttons.map(button => (h("je-button", { fill: button.fill, type: button.type, color: button.color, onClick: () => button.handler(this.el) }, button.text))))));
|
|
84
|
-
return (h(Host, { key: 'bf6df0e328fbe2785353b02e72dc85f18534be45', slot: 'overlay' }, h("div", { key: 'accdd9fc3059b7348fa342a166606fc2dfbe51f7', ref: el => this.contentEl = el, class: { 'modal-transition': true, 'modal': this.isOpen } }, this.isOpen && content), h("div", { key: 'bf2c4115d133199138d47520e6e12bec3bc76657', ref: el => this.backdropEl = el, onClick: this.handleBackdropClick, class: { 'backdrop-transition': true, 'backdrop': this.isOpen, 'clear': !this.showBackdrop && this.isOpen } })));
|
|
85
|
-
}
|
|
86
|
-
get el() { return this; }
|
|
87
|
-
static get style() { return JeAlertStyle0; }
|
|
88
|
-
}, [1, "je-alert", {
|
|
89
|
-
"header": [1],
|
|
90
|
-
"message": [1],
|
|
91
|
-
"icon": [1],
|
|
92
|
-
"buttons": [16],
|
|
93
|
-
"controls": [16],
|
|
94
|
-
"trigger": [1],
|
|
95
|
-
"showBackdrop": [4, "show-backdrop"],
|
|
96
|
-
"backdropClose": [4, "backdrop-close"],
|
|
97
|
-
"isOpen": [32],
|
|
98
|
-
"present": [64],
|
|
99
|
-
"dismiss": [64]
|
|
100
|
-
}]);
|
|
101
|
-
function defineCustomElement$1() {
|
|
102
|
-
if (typeof customElements === "undefined") {
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
const components = ["je-alert", "je-button", "je-form", "je-icon", "je-input", "je-popover"];
|
|
106
|
-
components.forEach(tagName => { switch (tagName) {
|
|
107
|
-
case "je-alert":
|
|
108
|
-
if (!customElements.get(tagName)) {
|
|
109
|
-
customElements.define(tagName, JeAlert$1);
|
|
110
|
-
}
|
|
111
|
-
break;
|
|
112
|
-
case "je-button":
|
|
113
|
-
if (!customElements.get(tagName)) {
|
|
114
|
-
defineCustomElement$6();
|
|
115
|
-
}
|
|
116
|
-
break;
|
|
117
|
-
case "je-form":
|
|
118
|
-
if (!customElements.get(tagName)) {
|
|
119
|
-
defineCustomElement$5();
|
|
120
|
-
}
|
|
121
|
-
break;
|
|
122
|
-
case "je-icon":
|
|
123
|
-
if (!customElements.get(tagName)) {
|
|
124
|
-
defineCustomElement$4();
|
|
125
|
-
}
|
|
126
|
-
break;
|
|
127
|
-
case "je-input":
|
|
128
|
-
if (!customElements.get(tagName)) {
|
|
129
|
-
defineCustomElement$3();
|
|
130
|
-
}
|
|
131
|
-
break;
|
|
132
|
-
case "je-popover":
|
|
133
|
-
if (!customElements.get(tagName)) {
|
|
134
|
-
defineCustomElement$2();
|
|
135
|
-
}
|
|
136
|
-
break;
|
|
137
|
-
} });
|
|
138
|
-
}
|
|
139
|
-
defineCustomElement$1();
|
|
140
|
-
|
|
141
|
-
const JeAlert = JeAlert$1;
|
|
142
|
-
const defineCustomElement = defineCustomElement$1;
|
|
143
|
-
|
|
144
|
-
export { JeAlert, defineCustomElement };
|
|
145
|
-
|
|
146
|
-
//# sourceMappingURL=je-alert.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"je-alert.js","mappings":";;;;;;;AAAA,MAAM,UAAU,GAAG,+kCAA+kC,CAAC;AACnmC,sBAAe,UAAU;;MCuBZA,SAAO;;;;;;;;QAoHV,wBAAmB,GAAG;YAC5B,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,aAAa,EAAE;gBACrC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;aAC/B;SACF,CAAA;sBAtHiB,KAAK;;;;;;;4BAuDA,IAAI;6BAKH,IAAI;;IAE5B,gBAAgB;QACd,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC;QACtC,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC5D,IAAI,IAAI,CAAC,cAAc,EAAE;gBACvB,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;aACrE;iBAAM;gBACL,OAAO,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;aAClE;SACF;KACF;IAG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BAAW,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAG,MAAM,CAAC,IAAI,CAAa,CACxI,CAAC,CAAO,CACL,CAAU,CAAA;QAEhB,QACE,EAAC,IAAI,qDAAC,IAAI,EAAC,SAAS,IAClB,4DAAK,GAAG,EAAE,EAAE,IAAI,IAAI,CAAC,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,IAC3F,IAAI,CAAC,MAAM,IAAI,OAAO,CACnB,EAEN,4DACE,GAAG,EAAE,EAAE,IAAI,IAAI,CAAC,UAAU,GAAG,EAAE,EAC/B,OAAO,EAAE,IAAI,CAAC,mBAAmB,EACjC,KAAK,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,MAAM,EAAE,GACvG,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["JeAlert"],"sources":["src/components/je-alert/je-alert.scss?tag=je-alert&encapsulation=shadow","src/components/je-alert/je-alert.tsx"],"sourcesContent":[":host {\n display: block;\n --je-width: 35%;\n}\n\n@media (width < 1200px) {\n :host {\n --je-width: 75%;\n }\n}\n\n.modal {\n display: flex;\n flex-direction: column;\n position: fixed;\n border-radius: var(--je-border-radius, 2px);\n overflow: hidden;\n top: 20%;\n left: 50%;\n transform: translate(-50%, -20%);\n z-index: 910;\n width: var(--je-width);\n background-color: var(--je-background-color);\n color: var(--je-text-color);\n box-shadow: 0px 0px 15px 5px #4d4d4d73;\n}\n\n.content-container {\n display: flex;\n flex-direction: column;\n padding: 24px;\n}\n\n.content-container .header {\n display: flex;\n width: 100%;\n align-items: center;\n}\n\n.content-container .header .close {\n margin-left: auto;\n --je-background: var(--je-medium-850);\n}\n\n.content-container .controls {\n margin-top: 16px;\n}\n\n.content-container .buttons {\n margin-top: 24px;\n display: flex;\n gap: var(--je-spacing);\n justify-content: flex-end;\n}\n\n.modal-transition {\n opacity: 0;\n transition: opacity 250ms ease-in-out;\n}\n\n.modal.open {\n opacity: 1;\n}\n\n.backdrop {\n position: fixed;\n top: 0;\n width: 100%;\n height: 100%;\n background: var(--je-backdrop-color);\n z-index: 909;\n}\n\n.backdrop-transition {\n opacity: 0;\n transition: opacity 250ms ease-in-out;\n}\n\n.backdrop.fade {\n opacity: 1;\n}\n\n.clear {\n background: rgba(0, 0, 0, 0);\n}\n","import { Component, Host, h, Element, EventEmitter, Event, Method, Prop, State } from '@stencil/core';\nimport { AsyncValidationFn, ValidationFn } from '../je-input/je-input';\n\nexport type DialogButton = {\n text: string,\n color?: 'primary' | 'secondary' | 'tertiary' | 'success' | 'error' | 'warning' | 'light' | 'dark',\n fill: 'solid' | 'outline' | 'clear',\n handler: (dialog: HTMLJeAlertElement) => void | Promise<void>,\n type?: string\n}\n\nexport type DialogControl = {\n label?: string,\n placeholder?: string,\n validators?: (ValidationFn | AsyncValidationFn)[],\n required?: boolean,\n type?: string\n}\n\n@Component({\n tag: 'je-alert',\n styleUrl: 'je-alert.scss',\n shadow: true,\n})\nexport class JeAlert {\n @Element() el!: HTMLJeAlertElement;\n @State() isOpen = false;\n protected parentEl!: HTMLElement;\n protected triggerElement!: HTMLElement;\n protected contentEl!: HTMLElement;\n protected backdropEl!: HTMLElement;\n protected pageEl!: HTMLElement;\n\n /**\n * Emitted when the dialog is presented\n */\n @Event({ bubbles: false }) didPresent: EventEmitter;\n\n /**\n * Emitted when the dialog is dismissed\n */\n @Event({ bubbles: false }) didDismiss: EventEmitter<{ role: string, data: any }>;\n\n /**\n * Emitted when the inner form submission is triggered\n */\n @Event({ bubbles: false }) didSubmit: EventEmitter<SubmitEvent>;\n\n /**\n * Title of the dialog\n */\n @Prop() header?: string;\n\n /**\n * Message text below the title\n */\n @Prop() message?: string;\n\n /**\n * Icon that goes to the left of the header\n */\n @Prop() icon?: string;\n\n /**\n * Buttons for user interaction\n */\n @Prop() buttons?: DialogButton[];\n\n /**\n * Controls that are wrapped in a form\n */\n @Prop() controls?: DialogControl[];\n\n /**\n * Trigger element id\n */\n @Prop() trigger?: string;\n\n /**\n * Whether or not to render the backdrop\n */\n @Prop() showBackdrop = true;\n\n /**\n * Whether or not the user can close the dialog by clicking the backdrop\n */\n @Prop() backdropClose = true;\n\n componentDidLoad() {\n this.pageEl = this.el.closest('je-page');\n this.parentEl = this.el.parentElement;\n if (this.trigger) {\n this.triggerElement = document.getElementById(this.trigger);\n if (this.triggerElement) {\n this.triggerElement.addEventListener('click', () => this.present());\n } else {\n console.error('USS Core: Failed to find modal trigger element!');\n }\n }\n }\n\n @Method()\n async present() {\n if (!this.isOpen) {\n this.el.remove();\n if (this.pageEl) {\n this.pageEl.append(this.el);\n } else {\n document.body.append(this.el);\n }\n this.isOpen = true;\n\n return new Promise<void>(resolve => {\n this.contentEl.addEventListener('transitionend', () => {\n this.didPresent.emit();\n resolve();\n }, { once: true });\n this.backdropEl.classList.add('fade');\n this.contentEl.classList.add('open');\n });\n }\n }\n\n @Method()\n async dismiss(role = 'manualClose', data?: any) {\n if (this.isOpen) {\n return new Promise<void>(resolve => {\n this.contentEl.addEventListener('transitionend', () => {\n this.el.remove();\n this.parentEl.append(this.el);\n this.isOpen = false;\n this.didDismiss.emit({ role: role, data: data });\n resolve();\n }, { once: true });\n this.backdropEl.classList.remove('fade');\n this.contentEl.classList.remove('open');\n });\n }\n }\n\n private handleBackdropClick = () => {\n if (this.isOpen && this.backdropClose) {\n this.dismiss('backdropClose');\n }\n }\n\n render() {\n const content = <je-form onSubmit={(ev: SubmitEvent) => this.didSubmit.emit(ev)}><div class=\"content-container\">\n {this.header && <div class=\"header\">\n {this.icon && <je-icon icon={this.icon}></je-icon>}\n <h1>{this.header}</h1>\n <je-button fill='clear' icon-only class=\"close\" onClick={() => this.dismiss()}>\n <je-icon icon=\"close\"></je-icon>\n </je-button>\n </div>}\n {this.message && <div class=\"message\">{this.message}</div>}\n {this.controls && <div class=\"controls\">{this.controls.map(control => (\n <je-input type={control.type} required={control.required} label={control.label} placeholder={control.placeholder} validators={control.validators}></je-input>\n ))}</div>}\n {this.buttons && <div class=\"buttons\">{this.buttons.map(button => (\n <je-button fill={button.fill} type={button.type} color={button.color} onClick={() => button.handler(this.el)}>{button.text}</je-button>\n ))}</div>}\n </div></je-form>\n\n return (\n <Host slot='overlay'>\n <div ref={el => this.contentEl = el} class={{ 'modal-transition': true, 'modal': this.isOpen }}>\n {this.isOpen && content}\n </div>\n\n <div\n ref={el => this.backdropEl = el}\n onClick={this.handleBackdropClick}\n class={{ 'backdrop-transition': true, 'backdrop': this.isOpen, 'clear': !this.showBackdrop && this.isOpen }}>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface JeBranch extends Components.JeBranch, HTMLElement {}
|
|
4
|
-
export const JeBranch: {
|
|
5
|
-
prototype: JeBranch;
|
|
6
|
-
new (): JeBranch;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, h, d as Host } from './p-41492a72.js';
|
|
2
|
-
|
|
3
|
-
const jeBranchCss = ":host{display:block}";
|
|
4
|
-
const JeBranchStyle0 = jeBranchCss;
|
|
5
|
-
|
|
6
|
-
const JeBranch$1 = /*@__PURE__*/ proxyCustomElement(class JeBranch extends H {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
this.__attachShadow();
|
|
11
|
-
}
|
|
12
|
-
render() {
|
|
13
|
-
return (h(Host, { key: '293ab19a650ed7d60b644e2f386ae8d47edfc110' }, h("slot", { key: '7b654eff10bbffb2f2e12d675b9e2e7f76cd6420' })));
|
|
14
|
-
}
|
|
15
|
-
static get style() { return JeBranchStyle0; }
|
|
16
|
-
}, [1, "je-branch"]);
|
|
17
|
-
function defineCustomElement$1() {
|
|
18
|
-
if (typeof customElements === "undefined") {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
const components = ["je-branch"];
|
|
22
|
-
components.forEach(tagName => { switch (tagName) {
|
|
23
|
-
case "je-branch":
|
|
24
|
-
if (!customElements.get(tagName)) {
|
|
25
|
-
customElements.define(tagName, JeBranch$1);
|
|
26
|
-
}
|
|
27
|
-
break;
|
|
28
|
-
} });
|
|
29
|
-
}
|
|
30
|
-
defineCustomElement$1();
|
|
31
|
-
|
|
32
|
-
const JeBranch = JeBranch$1;
|
|
33
|
-
const defineCustomElement = defineCustomElement$1;
|
|
34
|
-
|
|
35
|
-
export { JeBranch, defineCustomElement };
|
|
36
|
-
|
|
37
|
-
//# sourceMappingURL=je-branch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"je-branch.js","mappings":";;AAAA,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAC3C,uBAAe,WAAW;;MCMbA,UAAQ;;;;;;IACnB,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,8DAAa,CACR,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;","names":["JeBranch"],"sources":["src/components/tree/je-branch/je-branch.scss?tag=je-branch&encapsulation=shadow","src/components/tree/je-branch/je-branch.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'je-branch',\n styleUrl: 'je-branch.scss',\n shadow: true,\n})\nexport class JeBranch {\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface JeButton extends Components.JeButton, HTMLElement {}
|
|
4
|
-
export const JeButton: {
|
|
5
|
-
prototype: JeButton;
|
|
6
|
-
new (): JeButton;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"je-button.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface JeCard extends Components.JeCard, HTMLElement {}
|
|
4
|
-
export const JeCard: {
|
|
5
|
-
prototype: JeCard;
|
|
6
|
-
new (): JeCard;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"je-card.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface JeCheckboxGroup extends Components.JeCheckboxGroup, HTMLElement {}
|
|
4
|
-
export const JeCheckboxGroup: {
|
|
5
|
-
prototype: JeCheckboxGroup;
|
|
6
|
-
new (): JeCheckboxGroup;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-41492a72.js';
|
|
2
|
-
|
|
3
|
-
const jeCheckboxGroupCss = ":host{display:block;width:fit-content}label{display:block;font-weight:var(--je-font-semi-bold);margin-bottom:var(--je-spacing-2xs)}";
|
|
4
|
-
const JeCheckboxGroupStyle0 = jeCheckboxGroupCss;
|
|
5
|
-
|
|
6
|
-
const JeCheckboxGroup$1 = /*@__PURE__*/ proxyCustomElement(class JeCheckboxGroup extends H {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
this.__attachShadow();
|
|
11
|
-
this.valueChange = createEvent(this, "valueChange", 3);
|
|
12
|
-
this.label = undefined;
|
|
13
|
-
this.value = [];
|
|
14
|
-
}
|
|
15
|
-
componentWillLoad() {
|
|
16
|
-
if (!Array.isArray(this.value)) {
|
|
17
|
-
this.value = [];
|
|
18
|
-
}
|
|
19
|
-
this.originalValue = this.value;
|
|
20
|
-
if (this.label) {
|
|
21
|
-
this.el.setAttribute('name', this.label);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
componentDidLoad() {
|
|
25
|
-
if (this.value) {
|
|
26
|
-
const checkboxes = this.getChecks();
|
|
27
|
-
for (let item of checkboxes) {
|
|
28
|
-
item.checked = this.value.includes(item.value);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
formResetCallback() {
|
|
33
|
-
this.value = this.originalValue;
|
|
34
|
-
}
|
|
35
|
-
getChecks() {
|
|
36
|
-
const elements = this.el.querySelectorAll('je-checkbox-option');
|
|
37
|
-
return Array.from(elements);
|
|
38
|
-
}
|
|
39
|
-
handleValueChange() {
|
|
40
|
-
this.valueChange.emit(this.value);
|
|
41
|
-
const checkboxes = this.getChecks();
|
|
42
|
-
for (let checkbox of checkboxes) {
|
|
43
|
-
const includes = this.value.includes(checkbox.value);
|
|
44
|
-
if (checkbox.checked != includes) {
|
|
45
|
-
checkbox.checked = includes;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
handleCheck(ev) {
|
|
50
|
-
this.value = [ev.detail, ...this.value];
|
|
51
|
-
}
|
|
52
|
-
handleUncheck(ev) {
|
|
53
|
-
this.value = this.value.filter(t => t !== ev.detail);
|
|
54
|
-
}
|
|
55
|
-
render() {
|
|
56
|
-
return (h(Host, { key: '7d3112f65038d79a8ca5ebbba5bceb7b07ff401d' }, this.label && h("label", { key: '7f71075409ca98d45e18974ee1bda4a6afec859a' }, this.label), h("slot", { key: '2473328de9c142d0c972a32228edac8f51b66b38' })));
|
|
57
|
-
}
|
|
58
|
-
static get formAssociated() { return true; }
|
|
59
|
-
get el() { return this; }
|
|
60
|
-
static get watchers() { return {
|
|
61
|
-
"value": ["handleValueChange"]
|
|
62
|
-
}; }
|
|
63
|
-
static get style() { return JeCheckboxGroupStyle0; }
|
|
64
|
-
}, [65, "je-checkbox-group", {
|
|
65
|
-
"label": [1],
|
|
66
|
-
"value": [1040]
|
|
67
|
-
}, [[0, "check", "handleCheck"], [0, "uncheck", "handleUncheck"]], {
|
|
68
|
-
"value": ["handleValueChange"]
|
|
69
|
-
}]);
|
|
70
|
-
function defineCustomElement$1() {
|
|
71
|
-
if (typeof customElements === "undefined") {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
const components = ["je-checkbox-group"];
|
|
75
|
-
components.forEach(tagName => { switch (tagName) {
|
|
76
|
-
case "je-checkbox-group":
|
|
77
|
-
if (!customElements.get(tagName)) {
|
|
78
|
-
customElements.define(tagName, JeCheckboxGroup$1);
|
|
79
|
-
}
|
|
80
|
-
break;
|
|
81
|
-
} });
|
|
82
|
-
}
|
|
83
|
-
defineCustomElement$1();
|
|
84
|
-
|
|
85
|
-
const JeCheckboxGroup = JeCheckboxGroup$1;
|
|
86
|
-
const defineCustomElement = defineCustomElement$1;
|
|
87
|
-
|
|
88
|
-
export { JeCheckboxGroup, defineCustomElement };
|
|
89
|
-
|
|
90
|
-
//# sourceMappingURL=je-checkbox-group.js.map
|
|
@@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,CAAC,CAAC;YACrD,IAAI,QAAQ,CAAC,OAAO,IAAI,QAAQ,EAAE;gBAChC,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC;aAC7B;SACF;KACF;IAGD,WAAW,CAAC,EAAoB;QAC9B,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;KACzC;IAGD,aAAa,CAAC,EAAoB;QAChC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC;KACtD;IAED,MAAM;QACJ,QACE,EAAC,IAAI,uDACF,IAAI,CAAC,KAAK,IAAI,gEAAQ,IAAI,CAAC,KAAK,CAAS,EAC1C,8DAAa,CACR,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["JeCheckboxGroup"],"sources":["src/components/checkbox-group/je-checkbox-group/je-checkbox-group.scss?tag=je-checkbox-group&encapsulation=shadow","src/components/checkbox-group/je-checkbox-group/je-checkbox-group.tsx"],"sourcesContent":[":host {\n display: block;\n width: fit-content;\n}\n\nlabel {\n display: block;\n font-weight: var(--je-font-semi-bold);\n margin-bottom: var(--je-spacing-2xs);\n}\n","import { Component, Host, h, Element, Event, EventEmitter, Listen, Prop, Watch } from '@stencil/core';\n\n@Component({\n tag: 'je-checkbox-group',\n styleUrl: 'je-checkbox-group.scss',\n shadow: true,\n formAssociated: true\n})\nexport class JeCheckboxGroup {\n @Element() el!: HTMLJeCheckboxGroupElement;\n private originalValue?: string[];\n\n /**\n * Label that shows above the controls\n */\n @Prop() label?: string;\n\n /**\n * Current selected values\n */\n @Prop({ mutable: true }) value: string[] = [];\n\n /**\n * Emits the current selected values whenever they change\n */\n @Event({ bubbles: false }) valueChange: EventEmitter<string[]>;\n\n componentWillLoad() {\n if (!Array.isArray(this.value)) {\n this.value = [];\n }\n\n this.originalValue = this.value;\n\n if (this.label) {\n this.el.setAttribute('name', this.label);\n }\n }\n\n componentDidLoad() {\n if (this.value) {\n const checkboxes = this.getChecks();\n for (let item of checkboxes) {\n item.checked = this.value.includes(item.value);\n }\n }\n }\n\n formResetCallback() {\n this.value = this.originalValue;\n }\n\n private getChecks() {\n const elements = this.el.querySelectorAll('je-checkbox-option');\n return Array.from(elements);\n }\n\n @Watch('value')\n handleValueChange() {\n this.valueChange.emit(this.value);\n const checkboxes = this.getChecks();\n for (let checkbox of checkboxes) {\n const includes = this.value.includes(checkbox.value);\n if (checkbox.checked != includes) {\n checkbox.checked = includes;\n }\n }\n }\n\n @Listen('check')\n handleCheck(ev: CustomEvent<any>) {\n this.value = [ev.detail, ...this.value];\n }\n\n @Listen('uncheck')\n handleUncheck(ev: CustomEvent<any>) {\n this.value = this.value.filter(t => t !== ev.detail);\n }\n\n render() {\n return (\n <Host>\n {this.label && <label>{this.label}</label>}\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface JeCheckboxOption extends Components.JeCheckboxOption, HTMLElement {}
|
|
4
|
-
export const JeCheckboxOption: {
|
|
5
|
-
prototype: JeCheckboxOption;
|
|
6
|
-
new (): JeCheckboxOption;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-41492a72.js';
|
|
2
|
-
import { d as defineCustomElement$2 } from './p-4b8ae8ef.js';
|
|
3
|
-
|
|
4
|
-
const jeCheckboxOptionCss = ":host{display:flex;align-items:center;gap:var(--je-spacing-2xs);cursor:pointer;-webkit-user-select:none;user-select:none}je-icon{cursor:pointer;color:var(--je-primary-500)}";
|
|
5
|
-
const JeCheckboxOptionStyle0 = jeCheckboxOptionCss;
|
|
6
|
-
|
|
7
|
-
const JeCheckboxOption$1 = /*@__PURE__*/ proxyCustomElement(class JeCheckboxOption extends H {
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
this.__registerHost();
|
|
11
|
-
this.__attachShadow();
|
|
12
|
-
this.check = createEvent(this, "check", 7);
|
|
13
|
-
this.uncheck = createEvent(this, "uncheck", 7);
|
|
14
|
-
this.value = undefined;
|
|
15
|
-
this.checked = false;
|
|
16
|
-
this.readonly = false;
|
|
17
|
-
this.disabled = false;
|
|
18
|
-
}
|
|
19
|
-
onClick() {
|
|
20
|
-
if (!this.readonly && !this.disabled) {
|
|
21
|
-
if (this.checked) {
|
|
22
|
-
this.uncheck.emit(this.value);
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
this.check.emit(this.value);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
render() {
|
|
30
|
-
return (h(Host, { key: '39b01f92be46d74b1efda5259bf766495694331b' }, h("je-icon", { key: '42ad722098b6094f4edbae636282a7b2fb0a4497', icon: this.checked ? 'check_box' : 'check_box_outline_blank' }), h("slot", { key: 'a7591297da5fa8b50576a21341c2480bfed86e07' })));
|
|
31
|
-
}
|
|
32
|
-
get el() { return this; }
|
|
33
|
-
static get style() { return JeCheckboxOptionStyle0; }
|
|
34
|
-
}, [1, "je-checkbox-option", {
|
|
35
|
-
"value": [8],
|
|
36
|
-
"checked": [4],
|
|
37
|
-
"readonly": [4],
|
|
38
|
-
"disabled": [4]
|
|
39
|
-
}, [[0, "click", "onClick"]]]);
|
|
40
|
-
function defineCustomElement$1() {
|
|
41
|
-
if (typeof customElements === "undefined") {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
const components = ["je-checkbox-option", "je-icon"];
|
|
45
|
-
components.forEach(tagName => { switch (tagName) {
|
|
46
|
-
case "je-checkbox-option":
|
|
47
|
-
if (!customElements.get(tagName)) {
|
|
48
|
-
customElements.define(tagName, JeCheckboxOption$1);
|
|
49
|
-
}
|
|
50
|
-
break;
|
|
51
|
-
case "je-icon":
|
|
52
|
-
if (!customElements.get(tagName)) {
|
|
53
|
-
defineCustomElement$2();
|
|
54
|
-
}
|
|
55
|
-
break;
|
|
56
|
-
} });
|
|
57
|
-
}
|
|
58
|
-
defineCustomElement$1();
|
|
59
|
-
|
|
60
|
-
const JeCheckboxOption = JeCheckboxOption$1;
|
|
61
|
-
const defineCustomElement = defineCustomElement$1;
|
|
62
|
-
|
|
63
|
-
export { JeCheckboxOption, defineCustomElement };
|
|
64
|
-
|
|
65
|
-
//# sourceMappingURL=je-checkbox-option.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"je-checkbox-option.js","mappings":";;;AAAA,MAAM,mBAAmB,GAAG,8KAA8K,CAAC;AAC3M,+BAAe,mBAAmB;;MCMrBA,kBAAgB;;;;;;;;uBAWT,KAAK;wBAKJ,KAAK;wBAKL,KAAK;;IAaxB,OAAO;QACL,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YACpC,IAAI,IAAI,CAAC,OAAO,EAAE;gBAChB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aAC/B;iBAAM;gBACL,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aAC7B;SACF;KACF;IAED,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,gEAAS,IAAI,EAAE,IAAI,CAAC,OAAO,GAAG,WAAW,GAAG,yBAAyB,GAAI,EACzE,8DAAa,CACR,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["JeCheckboxOption"],"sources":["src/components/checkbox-group/je-checkbox-option/je-checkbox-option.scss?tag=je-checkbox-option&encapsulation=shadow","src/components/checkbox-group/je-checkbox-option/je-checkbox-option.tsx"],"sourcesContent":[":host {\n display: flex;\n align-items: center;\n gap: var(--je-spacing-2xs);\n cursor: pointer;\n -webkit-user-select: none;\n user-select: none;\n}\n\nje-icon {\n cursor: pointer;\n color: var(--je-primary-500);\n}\n","import { Component, Host, h, Element, Event, EventEmitter, Prop, Listen } from '@stencil/core';\n\n@Component({\n tag: 'je-checkbox-option',\n styleUrl: 'je-checkbox-option.scss',\n shadow: true,\n})\nexport class JeCheckboxOption {\n @Element() el!: HTMLElement;\n\n /**\n * Value of this option that the checkbox group will compare against\n */\n @Prop() value: any;\n\n /**\n * Whether or not this option is currently checked\n */\n @Prop() checked = false;\n\n /**\n * Shows readonly state and prevents changes to this option\n */\n @Prop() readonly = false;\n\n /**\n * Shows disabled state and prevents changes to this option\n */\n @Prop() disabled = false;\n\n /**\n * Emits the value whenever it is checked\n */\n @Event() check: EventEmitter<any>;\n\n /**\n * Emits the value whenever it is unchecked\n */\n @Event() uncheck: EventEmitter<any>;\n\n @Listen('click')\n onClick() {\n if (!this.readonly && !this.disabled) {\n if (this.checked) {\n this.uncheck.emit(this.value);\n } else {\n this.check.emit(this.value);\n }\n }\n }\n\n render() {\n return (\n <Host>\n <je-icon icon={this.checked ? 'check_box' : 'check_box_outline_blank'} />\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface JeCheckbox extends Components.JeCheckbox, HTMLElement {}
|
|
4
|
-
export const JeCheckbox: {
|
|
5
|
-
prototype: JeCheckbox;
|
|
6
|
-
new (): JeCheckbox;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-41492a72.js';
|
|
2
|
-
import { d as defineCustomElement$2 } from './p-4b8ae8ef.js';
|
|
3
|
-
|
|
4
|
-
const jeCheckboxCss = ":host{display:flex;align-items:center;gap:var(--je-spacing-2xs);width:fit-content;cursor:pointer;-webkit-user-select:none;user-select:none}je-icon{cursor:pointer;color:var(--je-primary-500)}";
|
|
5
|
-
const JeCheckboxStyle0 = jeCheckboxCss;
|
|
6
|
-
|
|
7
|
-
const JeCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class JeCheckbox extends H {
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
this.__registerHost();
|
|
11
|
-
this.__attachShadow();
|
|
12
|
-
this.valueChange = createEvent(this, "valueChange", 3);
|
|
13
|
-
this.internals = this.attachInternals();
|
|
14
|
-
this.value = undefined;
|
|
15
|
-
this.labelPlacement = 'end';
|
|
16
|
-
this.indeterminate = false;
|
|
17
|
-
this.labelOnly = false;
|
|
18
|
-
this.readonly = false;
|
|
19
|
-
this.disabled = false;
|
|
20
|
-
}
|
|
21
|
-
componentWillLoad() {
|
|
22
|
-
if (this.value === undefined && !this.indeterminate) {
|
|
23
|
-
this.value = false;
|
|
24
|
-
}
|
|
25
|
-
this.originalValue = this.value;
|
|
26
|
-
}
|
|
27
|
-
formResetCallback() {
|
|
28
|
-
if (this.value !== this.originalValue) {
|
|
29
|
-
this.value = this.originalValue;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
onClick() {
|
|
33
|
-
if (!this.readonly && !this.disabled) {
|
|
34
|
-
if (!this.indeterminate) {
|
|
35
|
-
this.value = !this.value;
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
// when indeterminate, the flow is false -> true -> null
|
|
39
|
-
this.value = this.value == false ? true : this.value == true ? null : false;
|
|
40
|
-
}
|
|
41
|
-
this.valueChange.emit(this.value);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
render() {
|
|
45
|
-
return (h(Host, { key: '492df32418a1fad791e502a04dd1f4704af73c19' }, this.labelPlacement == 'start' && h("slot", { key: 'b1fe9f38f42da604059158012be57f08ea6c0223' }), h("je-icon", { key: 'de6acfe6dc089be11e12c7948a7be20b3d6af7f4', icon: this.value === true ? 'check_box' : this.value === false ? 'check_box_outline_blank' : 'indeterminate_check_box' }), this.labelPlacement == 'end' && h("slot", { key: '2f6b3feb823cc374566845bbc0a73c4280644376' })));
|
|
46
|
-
}
|
|
47
|
-
static get formAssociated() { return true; }
|
|
48
|
-
get el() { return this; }
|
|
49
|
-
static get style() { return JeCheckboxStyle0; }
|
|
50
|
-
}, [65, "je-checkbox", {
|
|
51
|
-
"value": [1028],
|
|
52
|
-
"labelPlacement": [1, "label-placement"],
|
|
53
|
-
"indeterminate": [516],
|
|
54
|
-
"labelOnly": [4, "label-only"],
|
|
55
|
-
"readonly": [4],
|
|
56
|
-
"disabled": [4]
|
|
57
|
-
}, [[0, "click", "onClick"]]]);
|
|
58
|
-
function defineCustomElement$1() {
|
|
59
|
-
if (typeof customElements === "undefined") {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
const components = ["je-checkbox", "je-icon"];
|
|
63
|
-
components.forEach(tagName => { switch (tagName) {
|
|
64
|
-
case "je-checkbox":
|
|
65
|
-
if (!customElements.get(tagName)) {
|
|
66
|
-
customElements.define(tagName, JeCheckbox$1);
|
|
67
|
-
}
|
|
68
|
-
break;
|
|
69
|
-
case "je-icon":
|
|
70
|
-
if (!customElements.get(tagName)) {
|
|
71
|
-
defineCustomElement$2();
|
|
72
|
-
}
|
|
73
|
-
break;
|
|
74
|
-
} });
|
|
75
|
-
}
|
|
76
|
-
defineCustomElement$1();
|
|
77
|
-
|
|
78
|
-
const JeCheckbox = JeCheckbox$1;
|
|
79
|
-
const defineCustomElement = defineCustomElement$1;
|
|
80
|
-
|
|
81
|
-
export { JeCheckbox, defineCustomElement };
|
|
82
|
-
|
|
83
|
-
//# sourceMappingURL=je-checkbox.js.map
|