@nuralyui/modal 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/bundle.js +1363 -0
- package/index.d.ts +8 -0
- package/index.js +8 -0
- package/index.js.map +1 -1
- package/modal-manager.d.ts +72 -0
- package/modal-manager.js +171 -0
- package/modal-manager.js.map +1 -0
- package/modal.component.d.ts +117 -18
- package/modal.component.js +403 -157
- package/modal.component.js.map +1 -1
- package/modal.style.d.ts +9 -0
- package/modal.style.js +369 -0
- package/modal.style.js.map +1 -0
- package/modal.types.d.ts +105 -0
- package/modal.types.js +93 -0
- package/modal.types.js.map +1 -0
- package/package.json +16 -2
- package/react.d.ts +8 -2
- package/react.js +9 -5
- package/react.js.map +1 -1
- package/demo/modal-demo.d.ts +0 -20
- package/demo/modal-demo.d.ts.map +0 -1
- package/demo/modal-demo.js +0 -104
- package/demo/modal-demo.js.map +0 -1
- package/index.d.ts.map +0 -1
- package/modal.component.d.ts.map +0 -1
- package/react.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.types.js","sourceRoot":"","sources":["../../../src/components/modal/modal.types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,8BAAiB,CAAA;IACjB,4BAAe,CAAA;IACf,8BAAiB,CAAA;AACnB,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,kCAAiB,CAAA;IACjB,4BAAW,CAAA;IACX,kCAAiB,CAAA;AACnB,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,+BAAa,CAAA;IACb,sCAAoB,CAAA;IACpB,0CAAwB,CAAA;IACxB,+BAAa,CAAA;AACf,CAAC,EANW,cAAc,KAAd,cAAc,QAMzB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,kCAAiB,CAAA;IACjB,sCAAqB,CAAA;IACrB,8BAAa,CAAA,CAAC,cAAc;AAC9B,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAkDD;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAC/B,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC;AAEpC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAa,EAAsB,EAAE;IAC/D,OAAO,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,KAAkB,CAAC,CAAC;AAC/D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAa,EAA0B,EAAE;IACvE,OAAO,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,KAAsB,CAAC,CAAC;AACvE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAa,EAA2B,EAAE;IACzE,OAAO,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,KAAuB,CAAC,CAAC;AACzE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAa,EAA0B,EAAE;IACvE,OAAO,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,KAAsB,CAAC,CAAC;AACvE,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAA0B;IACzD,IAAI,EAAE,SAAS,CAAC,MAAM;IACtB,QAAQ,EAAE,aAAa,CAAC,MAAM;IAC9B,SAAS,EAAE,cAAc,CAAC,IAAI;IAC9B,QAAQ,EAAE,aAAa,CAAC,QAAQ;IAChC,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,KAAK;IAChB,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,KAAK;IACjB,cAAc,EAAE,KAAK;IACrB,MAAM,EAAE,eAAe;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAA0B;IACzD,KAAK,EAAE,YAAY;IACnB,eAAe,EAAE,IAAI;IACrB,IAAI,EAAE,YAAY;IAClB,SAAS,EAAE,KAAK;CACjB,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAA0B;IACzD,gBAAgB,EAAE,KAAK;IACvB,YAAY,EAAE,KAAK;IACnB,UAAU,EAAE,QAAQ;IACpB,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,SAAS;CAClB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2023 Nuraly, Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\n/**\n * Modal size options\n */\nexport enum ModalSize {\n Small = 'small',\n Medium = 'medium', \n Large = 'large',\n ExtraLarge = 'xl'\n}\n\n/**\n * Modal position options\n */\nexport enum ModalPosition {\n Center = 'center',\n Top = 'top',\n Bottom = 'bottom'\n}\n\n/**\n * Modal animation types\n */\nexport enum ModalAnimation {\n Fade = 'fade',\n Zoom = 'zoom',\n SlideUp = 'slide-up',\n SlideDown = 'slide-down',\n None = 'none'\n}\n\n/**\n * Modal backdrop behavior\n */\nexport enum ModalBackdrop {\n Static = 'static', // clicking backdrop doesn't close modal\n Closable = 'closable', // clicking backdrop closes modal\n None = 'none' // no backdrop\n}\n\n/**\n * Modal events\n */\nexport interface ModalEvents {\n 'modal-open': CustomEvent<void>;\n 'modal-close': CustomEvent<void>;\n 'modal-before-close': CustomEvent<{ cancel: () => void }>;\n 'modal-after-open': CustomEvent<void>;\n 'modal-escape': CustomEvent<void>;\n}\n\n/**\n * Modal configuration interface\n */\nexport interface ModalConfig {\n size?: ModalSize;\n position?: ModalPosition;\n animation?: ModalAnimation;\n backdrop?: ModalBackdrop;\n closable?: boolean;\n draggable?: boolean;\n resizable?: boolean;\n fullscreen?: boolean;\n destroyOnClose?: boolean;\n zIndex?: number;\n}\n\n/**\n * Modal header configuration\n */\nexport interface ModalHeader {\n title?: string;\n showCloseButton?: boolean;\n icon?: string;\n draggable?: boolean;\n}\n\n/**\n * Modal footer configuration\n */\nexport interface ModalFooter {\n showCancelButton?: boolean;\n showOkButton?: boolean;\n cancelText?: string;\n okText?: string;\n okType?: 'primary' | 'secondary' | 'danger';\n}\n\n/**\n * Constants\n */\nexport const EMPTY_STRING = '';\nexport const DEFAULT_Z_INDEX = 1000;\n\n/**\n * Type guards\n */\nexport const isModalSize = (value: string): value is ModalSize => {\n return Object.values(ModalSize).includes(value as ModalSize);\n};\n\nexport const isModalPosition = (value: string): value is ModalPosition => {\n return Object.values(ModalPosition).includes(value as ModalPosition);\n};\n\nexport const isModalAnimation = (value: string): value is ModalAnimation => {\n return Object.values(ModalAnimation).includes(value as ModalAnimation);\n};\n\nexport const isModalBackdrop = (value: string): value is ModalBackdrop => {\n return Object.values(ModalBackdrop).includes(value as ModalBackdrop);\n};\n\n/**\n * Default configurations\n */\nexport const DEFAULT_MODAL_CONFIG: Required<ModalConfig> = {\n size: ModalSize.Medium,\n position: ModalPosition.Center,\n animation: ModalAnimation.Fade,\n backdrop: ModalBackdrop.Closable,\n closable: true,\n draggable: false,\n resizable: false,\n fullscreen: false,\n destroyOnClose: false,\n zIndex: DEFAULT_Z_INDEX\n};\n\nexport const DEFAULT_MODAL_HEADER: Required<ModalHeader> = {\n title: EMPTY_STRING,\n showCloseButton: true,\n icon: EMPTY_STRING,\n draggable: false\n};\n\nexport const DEFAULT_MODAL_FOOTER: Required<ModalFooter> = {\n showCancelButton: false,\n showOkButton: false,\n cancelText: 'Cancel',\n okText: 'OK',\n okType: 'primary'\n};"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuralyui/modal",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -11,5 +11,19 @@
|
|
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
12
12
|
},
|
|
13
13
|
"author": "Labidi Aymen",
|
|
14
|
-
"license": "ISC"
|
|
14
|
+
"license": "ISC",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"import": "./index.js"
|
|
18
|
+
},
|
|
19
|
+
"./bundle": {
|
|
20
|
+
"import": "./bundle.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"bundle.js",
|
|
25
|
+
"*.js",
|
|
26
|
+
"*.d.ts",
|
|
27
|
+
"*.js.map"
|
|
28
|
+
]
|
|
15
29
|
}
|
package/react.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
1
|
+
import { NrModalElement } from './modal.component.js';
|
|
2
|
+
export declare const NrModal: import("@lit-labs/react").ReactWebComponent<NrModalElement, {
|
|
3
|
+
'modal-open': string;
|
|
4
|
+
'modal-close': string;
|
|
5
|
+
'modal-before-close': string;
|
|
6
|
+
'modal-after-open': string;
|
|
7
|
+
'modal-escape': string;
|
|
8
|
+
}>;
|
|
3
9
|
//# sourceMappingURL=react.d.ts.map
|
package/react.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { createComponent } from '@lit-labs/react';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
export const
|
|
5
|
-
tagName: '
|
|
6
|
-
elementClass:
|
|
3
|
+
import { NrModalElement } from './modal.component.js';
|
|
4
|
+
export const NrModal = createComponent({
|
|
5
|
+
tagName: 'nr-modal',
|
|
6
|
+
elementClass: NrModalElement,
|
|
7
7
|
react: React,
|
|
8
8
|
events: {
|
|
9
|
-
|
|
9
|
+
'modal-open': 'onModalOpen',
|
|
10
|
+
'modal-close': 'onModalClose',
|
|
11
|
+
'modal-before-close': 'onModalBeforeClose',
|
|
12
|
+
'modal-after-open': 'onModalAfterOpen',
|
|
13
|
+
'modal-escape': 'onModalEscape',
|
|
10
14
|
},
|
|
11
15
|
});
|
|
12
16
|
//# sourceMappingURL=react.js.map
|
package/react.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../src/components/modal/react.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../src/components/modal/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC;IACrC,OAAO,EAAE,UAAU;IACnB,YAAY,EAAE,cAAc;IAC5B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACN,YAAY,EAAE,aAAa;QAC3B,aAAa,EAAE,cAAc;QAC7B,oBAAoB,EAAE,oBAAoB;QAC1C,kBAAkB,EAAE,kBAAkB;QACtC,cAAc,EAAE,eAAe;KAChC;CACF,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit-labs/react';\nimport * as React from 'react';\nimport { NrModalElement } from './modal.component.js';\n\nexport const NrModal = createComponent({\n tagName: 'nr-modal',\n elementClass: NrModalElement,\n react: React,\n events: {\n 'modal-open': 'onModalOpen',\n 'modal-close': 'onModalClose',\n 'modal-before-close': 'onModalBeforeClose',\n 'modal-after-open': 'onModalAfterOpen',\n 'modal-escape': 'onModalEscape',\n },\n});\n"]}
|
package/demo/modal-demo.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Google Laabidi Aymen
|
|
4
|
-
* SPDX-License-Identifier: MIT
|
|
5
|
-
*/
|
|
6
|
-
import { LitElement } from 'lit';
|
|
7
|
-
import '../modal.component';
|
|
8
|
-
export declare class ElMeenuElement extends LitElement {
|
|
9
|
-
isOpen: boolean;
|
|
10
|
-
modal1: boolean;
|
|
11
|
-
modal2: boolean;
|
|
12
|
-
modal1_1: boolean;
|
|
13
|
-
protected render(): import("lit").TemplateResult<1>;
|
|
14
|
-
}
|
|
15
|
-
declare global {
|
|
16
|
-
interface HTMLElementTagNameMap {
|
|
17
|
-
'hy-modals-demo': ElMeenuElement;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=modal-demo.d.ts.map
|
package/demo/modal-demo.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modal-demo.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/demo/modal-demo.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,OAAO,EAAC,UAAU,EAAO,MAAM,KAAK,CAAC;AAGrC,OAAO,oBAAoB,CAAC;AAE5B,qBACa,cAAe,SAAQ,UAAU;IAE5C,MAAM,UAAQ;IAEd,MAAM,UAAS;IAEf,MAAM,UAAS;IAGf,QAAQ,UAAS;cAEE,MAAM;CA8D1B;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,cAAc,CAAC;KAClC;CACF"}
|
package/demo/modal-demo.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
|
-
/**
|
|
4
|
-
* @license
|
|
5
|
-
* Copyright 2023 Google Laabidi Aymen
|
|
6
|
-
* SPDX-License-Identifier: MIT
|
|
7
|
-
*/
|
|
8
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
9
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
10
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
11
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
12
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
13
|
-
};
|
|
14
|
-
import { LitElement, html } from 'lit';
|
|
15
|
-
import { customElement, state } from 'lit/decorators.js';
|
|
16
|
-
import '../modal.component';
|
|
17
|
-
let ElMeenuElement = class ElMeenuElement extends LitElement {
|
|
18
|
-
constructor() {
|
|
19
|
-
super(...arguments);
|
|
20
|
-
this.isOpen = true;
|
|
21
|
-
this.modal1 = false;
|
|
22
|
-
this.modal2 = false;
|
|
23
|
-
this.modal1_1 = false;
|
|
24
|
-
}
|
|
25
|
-
render() {
|
|
26
|
-
return html `
|
|
27
|
-
<div id="overlay-container"></div>
|
|
28
|
-
<button
|
|
29
|
-
@click=${() => {
|
|
30
|
-
this.modal1 = !this.modal1;
|
|
31
|
-
}}
|
|
32
|
-
>
|
|
33
|
-
Toggle Modale</button
|
|
34
|
-
>qsd
|
|
35
|
-
<modal-component label="Modal Title" ?isOpen=${this.modal1}>
|
|
36
|
-
<p>This is the content of the modal.</p>
|
|
37
|
-
<div slot="footer">
|
|
38
|
-
<button
|
|
39
|
-
@click=${() => {
|
|
40
|
-
this.modal2 = !this.modal2;
|
|
41
|
-
}}
|
|
42
|
-
>
|
|
43
|
-
Custom Action
|
|
44
|
-
</button>
|
|
45
|
-
</div>
|
|
46
|
-
|
|
47
|
-
<modal-component ?isOpen=${this.modal2} label="Modal Title 2">
|
|
48
|
-
<div slot="footer">
|
|
49
|
-
<h2>Modal Title</h2>
|
|
50
|
-
<p>This is the content of the modal.</p>
|
|
51
|
-
<button
|
|
52
|
-
@click=${() => {
|
|
53
|
-
this.modal2 = !this.modal2;
|
|
54
|
-
}}
|
|
55
|
-
>
|
|
56
|
-
Close this modal
|
|
57
|
-
</button>
|
|
58
|
-
</div>
|
|
59
|
-
</modal-component>
|
|
60
|
-
</modal-component>
|
|
61
|
-
|
|
62
|
-
<button
|
|
63
|
-
@click=${() => {
|
|
64
|
-
this.modal1_1 = !this.modal1_1;
|
|
65
|
-
}}
|
|
66
|
-
>
|
|
67
|
-
Toggle Modale</button
|
|
68
|
-
>qsd
|
|
69
|
-
<modal-component ?isOpen=${this.modal1_1}>
|
|
70
|
-
<h2>Modal Title</h2>
|
|
71
|
-
<p>This is the content of the modal.lmjqsdmlqjsdlmjqsdmljqsdlmqjsdqs</p>
|
|
72
|
-
<button
|
|
73
|
-
@click=${() => {
|
|
74
|
-
this.modal2 = !this.modal2;
|
|
75
|
-
}}
|
|
76
|
-
>
|
|
77
|
-
Custom Action
|
|
78
|
-
</button>
|
|
79
|
-
<modal-component ?isOpen=${this.modal2}>
|
|
80
|
-
<h2>Modal Title</h2>
|
|
81
|
-
<p>This is the content of the modal.</p>
|
|
82
|
-
<button>Custom Action</button>
|
|
83
|
-
</modal-component>
|
|
84
|
-
</modal-component>
|
|
85
|
-
`;
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
__decorate([
|
|
89
|
-
state()
|
|
90
|
-
], ElMeenuElement.prototype, "isOpen", void 0);
|
|
91
|
-
__decorate([
|
|
92
|
-
state()
|
|
93
|
-
], ElMeenuElement.prototype, "modal1", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
state()
|
|
96
|
-
], ElMeenuElement.prototype, "modal2", void 0);
|
|
97
|
-
__decorate([
|
|
98
|
-
state()
|
|
99
|
-
], ElMeenuElement.prototype, "modal1_1", void 0);
|
|
100
|
-
ElMeenuElement = __decorate([
|
|
101
|
-
customElement('hy-modals-demo')
|
|
102
|
-
], ElMeenuElement);
|
|
103
|
-
export { ElMeenuElement };
|
|
104
|
-
//# sourceMappingURL=modal-demo.js.map
|
package/demo/modal-demo.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modal-demo.js","sourceRoot":"","sources":["../../../../src/components/modal/demo/modal-demo.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,uDAAuD;AACvD;;;;GAIG;;;;;;;AAEH,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,KAAK,CAAC;AACrC,OAAO,EAAC,aAAa,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAEvD,OAAO,oBAAoB,CAAC;AAG5B,IAAa,cAAc,GAA3B,MAAa,cAAe,SAAQ,UAAU;IAA9C;;QAEE,WAAM,GAAG,IAAI,CAAC;QAEd,WAAM,GAAG,KAAK,CAAC;QAEf,WAAM,GAAG,KAAK,CAAC;QAGf,aAAQ,GAAG,KAAK,CAAC;IAgEnB,CAAC;IA9DoB,MAAM;QACvB,OAAO,IAAI,CAAA;;;iBAGE,GAAG,EAAE;YACZ,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;QAC7B,CAAC;;;;qDAI4C,IAAI,CAAC,MAAM;;;;qBAI3C,GAAG,EAAE;YACZ,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;QAC7B,CAAC;;;;;;mCAMsB,IAAI,CAAC,MAAM;;;;;uBAKvB,GAAG,EAAE;YACZ,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;QAC7B,CAAC;;;;;;;;;iBASE,GAAG,EAAE;YACZ,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACjC,CAAC;;;;iCAIwB,IAAI,CAAC,QAAQ;;;;mBAI3B,GAAG,EAAE;YACZ,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;QAC7B,CAAC;;;;mCAIwB,IAAI,CAAC,MAAM;;;;;;KAMzC,CAAC;IACJ,CAAC;CACF,CAAA;AAvEC;IADC,KAAK,EAAE;8CACM;AAEd;IADC,KAAK,EAAE;8CACO;AAEf;IADC,KAAK,EAAE;8CACO;AAGf;IADC,KAAK,EAAE;gDACS;AATN,cAAc;IAD1B,aAAa,CAAC,gBAAgB,CAAC;GACnB,cAAc,CAyE1B;SAzEY,cAAc","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * @license\n * Copyright 2023 Google Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\nimport {LitElement, html} from 'lit';\nimport {customElement, state} from 'lit/decorators.js';\n\nimport '../modal.component';\n\n@customElement('hy-modals-demo')\nexport class ElMeenuElement extends LitElement {\n @state()\n isOpen = true;\n @state()\n modal1 = false;\n @state()\n modal2 = false;\n\n @state()\n modal1_1 = false;\n\n protected override render() {\n return html`\n <div id=\"overlay-container\"></div>\n <button\n @click=${() => {\n this.modal1 = !this.modal1;\n }}\n >\n Toggle Modale</button\n >qsd\n <modal-component label=\"Modal Title\" ?isOpen=${this.modal1}>\n <p>This is the content of the modal.</p>\n <div slot=\"footer\">\n <button\n @click=${() => {\n this.modal2 = !this.modal2;\n }}\n >\n Custom Action\n </button>\n </div>\n\n <modal-component ?isOpen=${this.modal2} label=\"Modal Title 2\">\n <div slot=\"footer\">\n <h2>Modal Title</h2>\n <p>This is the content of the modal.</p>\n <button\n @click=${() => {\n this.modal2 = !this.modal2;\n }}\n >\n Close this modal\n </button>\n </div>\n </modal-component>\n </modal-component>\n\n <button\n @click=${() => {\n this.modal1_1 = !this.modal1_1;\n }}\n >\n Toggle Modale</button\n >qsd\n <modal-component ?isOpen=${this.modal1_1}>\n <h2>Modal Title</h2>\n <p>This is the content of the modal.lmjqsdmlqjsdlmjqsdmljqsdlmqjsdqs</p>\n <button\n @click=${() => {\n this.modal2 = !this.modal2;\n }}\n >\n Custom Action\n </button>\n <modal-component ?isOpen=${this.modal2}>\n <h2>Modal Title</h2>\n <p>This is the content of the modal.</p>\n <button>Custom Action</button>\n </modal-component>\n </modal-component>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hy-modals-demo': ElMeenuElement;\n }\n}\n"]}
|
package/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/modal/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
package/modal.component.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modal.component.d.ts","sourceRoot":"","sources":["../../../src/components/modal/modal.component.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,UAAU,EAAC,MAAM,KAAK,CAAC;AAI1C,qBAAa,cAAe,SAAQ,UAAU;IAC5C,OAAgB,MAAM,0BA0DpB;IAGF,MAAM,EAAG,OAAO,CAAC;IAGjB,KAAK,SAAM;IAGX,OAAO,CAAC,OAAO,CAAK;IAGpB,OAAO,CAAC,OAAO,CAAK;IAEpB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAAK;IACrB,OAAO,CAAC,QAAQ,CAAK;IAEZ,iBAAiB;IASjB,oBAAoB;IAS7B,OAAO,CAAC,SAAS;IASjB,OAAO,CAAC,IAAI;IASZ,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,aAAa;IAWrB,UAAU;IASV,OAAO,CAAC,oBAAoB;IAcnB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC;IAY1E,OAAO,CAAC,QAAQ;IAIP,MAAM;CAwBhB"}
|
package/react.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/components/modal/react.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AACpD,eAAO,MAAM,OAAO,iEAOlB,CAAC"}
|