@kodaris/krubble-components 1.0.67 → 1.0.68
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/custom-elements.json +3 -3
- package/dist/dialog/dialog.d.ts.map +1 -1
- package/dist/dialog/dialog.js +9 -1
- package/dist/dialog/dialog.js.map +1 -1
- package/dist/krubble-components.bundled.js +9 -1
- package/dist/krubble-components.bundled.js.map +1 -1
- package/dist/krubble-components.bundled.min.js +9 -1
- package/dist/krubble-components.bundled.min.js.map +1 -1
- package/dist/krubble-components.umd.js +9 -1
- package/dist/krubble-components.umd.js.map +1 -1
- package/dist/krubble-components.umd.min.js +9 -1
- package/dist/krubble-components.umd.min.js.map +1 -1
- package/package.json +1 -1
package/custom-elements.json
CHANGED
|
@@ -345,7 +345,7 @@
|
|
|
345
345
|
{
|
|
346
346
|
"kind": "variable",
|
|
347
347
|
"name": "KRDialog",
|
|
348
|
-
"default": "class KRDialog extends i$2 { constructor() { super(...arguments); this._dialogRef = null; this._contentElement = null; this.opened = false; this.label = ''; this.width = '560px'; this._handleDocumentKeyDown = (e) => { if (e.key === 'Escape') { this.close(); } }; } disconnectedCallback() { super.disconnectedCallback(); document.removeEventListener('keydown', this._handleDocumentKeyDown); } updated(changedProperties) { super.updated(changedProperties); if (changedProperties.has('opened')) { if (this.opened) { document.addEventListener('keydown', this._handleDocumentKeyDown); } else { document.removeEventListener('keydown', this._handleDocumentKeyDown); } } } /** * Opens the dialog (declarative mode). */ open() { this.opened = true; } /** * Closes the dialog. * In programmatic mode (has _dialogRef), delegates to the dialog ref. * In declarative mode, sets opened=false and dispatches close event. */ close() { if (this._dialogRef) { this._dialogRef.close(undefined); return; } this.opened = false; this.dispatchEvent(new CustomEvent('close', { bubbles: true, composed: true })); } /** * Opens a dialog programmatically by creating a component and injecting it. */ static open(component, config) { // Only remove other programmatic dialogs (those with a _dialogRef) document.querySelectorAll('kr-dialog').forEach((el) => { if (el._dialogRef) { el.remove(); } }); const dialogRef = new KRDialogRef(); const dialog = document.createElement('kr-dialog'); dialogRef.setDialogElement(dialog); dialog._dialogRef = dialogRef; // Create the content component const content = new component(); content.dialogRef = dialogRef; if (config?.data) { content.data = config.data; } if (config?.label) { dialog.label = config.label; } if (config?.width) { dialog.width = config.width; } dialog._contentElement = content; dialog.opened = true; document.body.appendChild(dialog); return dialogRef; } _handleBackdropClick(e) { if (e.target.classList.contains('backdrop')) { this.close(); } } render() { return b ` <div class=\"backdrop\" @click=${this._handleBackdropClick}></div> <div class=\"dialog\" style=${o$1({ width: this.width })}> ${this.label ? b `<div class=\"dialog__header\"><div class=\"dialog__header-label\">${this.label}</div></div>` : ''}
|
|
348
|
+
"default": "class KRDialog extends i$2 { constructor() { super(...arguments); this._dialogRef = null; this._contentElement = null; this.opened = false; this.label = ''; this.width = '560px'; this._handleDocumentKeyDown = (e) => { if (e.key === 'Escape') { this.close(); } }; } disconnectedCallback() { super.disconnectedCallback(); document.removeEventListener('keydown', this._handleDocumentKeyDown); } updated(changedProperties) { super.updated(changedProperties); if (changedProperties.has('opened')) { if (this.opened) { document.addEventListener('keydown', this._handleDocumentKeyDown); } else { document.removeEventListener('keydown', this._handleDocumentKeyDown); } } } /** * Opens the dialog (declarative mode). */ open() { this.opened = true; } /** * Closes the dialog. * In programmatic mode (has _dialogRef), delegates to the dialog ref. * In declarative mode, sets opened=false and dispatches close event. */ close() { if (this._dialogRef) { this._dialogRef.close(undefined); return; } this.opened = false; this.dispatchEvent(new CustomEvent('close', { bubbles: true, composed: true })); } /** * Opens a dialog programmatically by creating a component and injecting it. */ static open(component, config) { // Only remove other programmatic dialogs (those with a _dialogRef) document.querySelectorAll('kr-dialog').forEach((el) => { if (el._dialogRef) { el.remove(); } }); const dialogRef = new KRDialogRef(); const dialog = document.createElement('kr-dialog'); dialogRef.setDialogElement(dialog); dialog._dialogRef = dialogRef; // Create the content component const content = new component(); content.dialogRef = dialogRef; if (config?.data) { content.data = config.data; } if (config?.label) { dialog.label = config.label; } if (config?.width) { dialog.width = config.width; } dialog._contentElement = content; dialog.opened = true; document.body.appendChild(dialog); return dialogRef; } _handleBackdropClick(e) { if (e.target.classList.contains('backdrop')) { this.close(); } } render() { return b ` <div class=\"backdrop\" @click=${this._handleBackdropClick}></div> <div class=\"dialog\" style=${o$1({ width: this.width })}> ${this.label ? b `<div class=\"dialog__header\"><div class=\"dialog__header-label\">${this.label}</div></div>` : ''} <div class=\"dialog__body\">${this._contentElement ? this._contentElement : b `<slot></slot>`}</div> </div> `; } }",
|
|
349
349
|
"description": "Generic dialog component that supports both declarative and programmatic usage.\n\nDeclarative: place `<kr-dialog>` in HTML with slotted content and call `.open()` / `.close()`.\nProgrammatic: use `KRDialog.open(Component, config)` to create and show a dialog."
|
|
350
350
|
},
|
|
351
351
|
{
|
|
@@ -1002,7 +1002,7 @@
|
|
|
1002
1002
|
{
|
|
1003
1003
|
"kind": "variable",
|
|
1004
1004
|
"name": "Be",
|
|
1005
|
-
"default": "class extends ae{constructor(){super(...arguments),this._dialogRef=null,this._contentElement=null,this.opened=!1,this.label=\"\",this.width=\"560px\",this._handleDocumentKeyDown=e=>{\"Escape\"===e.key&&this.close()}}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(\"keydown\",this._handleDocumentKeyDown)}updated(e){super.updated(e),e.has(\"opened\")&&(this.opened?document.addEventListener(\"keydown\",this._handleDocumentKeyDown):document.removeEventListener(\"keydown\",this._handleDocumentKeyDown))}open(){this.opened=!0}close(){this._dialogRef?this._dialogRef.close(void 0):(this.opened=!1,this.dispatchEvent(new CustomEvent(\"close\",{bubbles:!0,composed:!0})))}static open(e,t){document.querySelectorAll(\"kr-dialog\").forEach((e=>{e._dialogRef&&e.remove()}));const i=new je,s=document.createElement(\"kr-dialog\");i.setDialogElement(s),s._dialogRef=i;const o=new e;return o.dialogRef=i,t?.data&&(o.data=t.data),t?.label&&(s.label=t.label),t?.width&&(s.width=t.width),s._contentElement=o,s.opened=!0,document.body.appendChild(s),i}_handleBackdropClick(e){e.target.classList.contains(\"backdrop\")&&this.close()}render(){return j` <div class=\"backdrop\" @click=${this._handleBackdropClick}></div> <div class=\"dialog\" style=${Re({width:this.width})}> ${this.label?j`<div class=\"dialog__header\"><div class=\"dialog__header-label\">${this.label}</div></div>`:\"\"}
|
|
1005
|
+
"default": "class extends ae{constructor(){super(...arguments),this._dialogRef=null,this._contentElement=null,this.opened=!1,this.label=\"\",this.width=\"560px\",this._handleDocumentKeyDown=e=>{\"Escape\"===e.key&&this.close()}}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(\"keydown\",this._handleDocumentKeyDown)}updated(e){super.updated(e),e.has(\"opened\")&&(this.opened?document.addEventListener(\"keydown\",this._handleDocumentKeyDown):document.removeEventListener(\"keydown\",this._handleDocumentKeyDown))}open(){this.opened=!0}close(){this._dialogRef?this._dialogRef.close(void 0):(this.opened=!1,this.dispatchEvent(new CustomEvent(\"close\",{bubbles:!0,composed:!0})))}static open(e,t){document.querySelectorAll(\"kr-dialog\").forEach((e=>{e._dialogRef&&e.remove()}));const i=new je,s=document.createElement(\"kr-dialog\");i.setDialogElement(s),s._dialogRef=i;const o=new e;return o.dialogRef=i,t?.data&&(o.data=t.data),t?.label&&(s.label=t.label),t?.width&&(s.width=t.width),s._contentElement=o,s.opened=!0,document.body.appendChild(s),i}_handleBackdropClick(e){e.target.classList.contains(\"backdrop\")&&this.close()}render(){return j` <div class=\"backdrop\" @click=${this._handleBackdropClick}></div> <div class=\"dialog\" style=${Re({width:this.width})}> ${this.label?j`<div class=\"dialog__header\"><div class=\"dialog__header-label\">${this.label}</div></div>`:\"\"} <div class=\"dialog__body\">${this._contentElement?this._contentElement:j`<slot></slot>`}</div> </div> `}}"
|
|
1006
1006
|
},
|
|
1007
1007
|
{
|
|
1008
1008
|
"kind": "variable",
|
|
@@ -2217,7 +2217,7 @@
|
|
|
2217
2217
|
{
|
|
2218
2218
|
"kind": "variable",
|
|
2219
2219
|
"name": "KRDialog",
|
|
2220
|
-
"default": "class KRDialog extends LitElement { constructor() { super(...arguments); this._dialogRef = null; this._contentElement = null; this.opened = false; this.label = ''; this.width = '560px'; this._handleDocumentKeyDown = (e) => { if (e.key === 'Escape') { this.close(); } }; } disconnectedCallback() { super.disconnectedCallback(); document.removeEventListener('keydown', this._handleDocumentKeyDown); } updated(changedProperties) { super.updated(changedProperties); if (changedProperties.has('opened')) { if (this.opened) { document.addEventListener('keydown', this._handleDocumentKeyDown); } else { document.removeEventListener('keydown', this._handleDocumentKeyDown); } } } /** * Opens the dialog (declarative mode). */ open() { this.opened = true; } /** * Closes the dialog. * In programmatic mode (has _dialogRef), delegates to the dialog ref. * In declarative mode, sets opened=false and dispatches close event. */ close() { if (this._dialogRef) { this._dialogRef.close(undefined); return; } this.opened = false; this.dispatchEvent(new CustomEvent('close', { bubbles: true, composed: true })); } /** * Opens a dialog programmatically by creating a component and injecting it. */ static open(component, config) { // Only remove other programmatic dialogs (those with a _dialogRef) document.querySelectorAll('kr-dialog').forEach((el) => { if (el._dialogRef) { el.remove(); } }); const dialogRef = new KRDialogRef(); const dialog = document.createElement('kr-dialog'); dialogRef.setDialogElement(dialog); dialog._dialogRef = dialogRef; // Create the content component const content = new component(); content.dialogRef = dialogRef; if (config?.data) { content.data = config.data; } if (config?.label) { dialog.label = config.label; } if (config?.width) { dialog.width = config.width; } dialog._contentElement = content; dialog.opened = true; document.body.appendChild(dialog); return dialogRef; } _handleBackdropClick(e) { if (e.target.classList.contains('backdrop')) { this.close(); } } render() { return html ` <div class=\"backdrop\" @click=${this._handleBackdropClick}></div> <div class=\"dialog\" style=${styleMap({ width: this.width })}> ${this.label ? html `<div class=\"dialog__header\"><div class=\"dialog__header-label\">${this.label}</div></div>` : ''}
|
|
2220
|
+
"default": "class KRDialog extends LitElement { constructor() { super(...arguments); this._dialogRef = null; this._contentElement = null; this.opened = false; this.label = ''; this.width = '560px'; this._handleDocumentKeyDown = (e) => { if (e.key === 'Escape') { this.close(); } }; } disconnectedCallback() { super.disconnectedCallback(); document.removeEventListener('keydown', this._handleDocumentKeyDown); } updated(changedProperties) { super.updated(changedProperties); if (changedProperties.has('opened')) { if (this.opened) { document.addEventListener('keydown', this._handleDocumentKeyDown); } else { document.removeEventListener('keydown', this._handleDocumentKeyDown); } } } /** * Opens the dialog (declarative mode). */ open() { this.opened = true; } /** * Closes the dialog. * In programmatic mode (has _dialogRef), delegates to the dialog ref. * In declarative mode, sets opened=false and dispatches close event. */ close() { if (this._dialogRef) { this._dialogRef.close(undefined); return; } this.opened = false; this.dispatchEvent(new CustomEvent('close', { bubbles: true, composed: true })); } /** * Opens a dialog programmatically by creating a component and injecting it. */ static open(component, config) { // Only remove other programmatic dialogs (those with a _dialogRef) document.querySelectorAll('kr-dialog').forEach((el) => { if (el._dialogRef) { el.remove(); } }); const dialogRef = new KRDialogRef(); const dialog = document.createElement('kr-dialog'); dialogRef.setDialogElement(dialog); dialog._dialogRef = dialogRef; // Create the content component const content = new component(); content.dialogRef = dialogRef; if (config?.data) { content.data = config.data; } if (config?.label) { dialog.label = config.label; } if (config?.width) { dialog.width = config.width; } dialog._contentElement = content; dialog.opened = true; document.body.appendChild(dialog); return dialogRef; } _handleBackdropClick(e) { if (e.target.classList.contains('backdrop')) { this.close(); } } render() { return html ` <div class=\"backdrop\" @click=${this._handleBackdropClick}></div> <div class=\"dialog\" style=${styleMap({ width: this.width })}> ${this.label ? html `<div class=\"dialog__header\"><div class=\"dialog__header-label\">${this.label}</div></div>` : ''} <div class=\"dialog__body\">${this._contentElement ? this._contentElement : html `<slot></slot>`}</div> </div> `; } }",
|
|
2221
2221
|
"description": "Generic dialog component that supports both declarative and programmatic usage.\n\nDeclarative: place `<kr-dialog>` in HTML with slotted content and call `.open()` / `.close()`.\nProgrammatic: use `KRDialog.open(Component, config)` to create and show a dialog."
|
|
2222
2222
|
}
|
|
2223
2223
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/dialog/dialog.ts"],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"}
|
package/dist/dialog/dialog.js
CHANGED
|
@@ -211,7 +211,7 @@ let KRDialog = class KRDialog extends LitElement {
|
|
|
211
211
|
<div class="backdrop" @click=${this._handleBackdropClick}></div>
|
|
212
212
|
<div class="dialog" style=${styleMap({ width: this.width })}>
|
|
213
213
|
${this.label ? html `<div class="dialog__header"><div class="dialog__header-label">${this.label}</div></div>` : ''}
|
|
214
|
-
|
|
214
|
+
<div class="dialog__body">${this._contentElement ? this._contentElement : html `<slot></slot>`}</div>
|
|
215
215
|
</div>
|
|
216
216
|
`;
|
|
217
217
|
}
|
|
@@ -242,6 +242,7 @@ KRDialog.styles = css `
|
|
|
242
242
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
243
243
|
border-radius: 12px;
|
|
244
244
|
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
|
|
245
|
+
height: 100%;
|
|
245
246
|
max-height: 90vh;
|
|
246
247
|
overflow: hidden;
|
|
247
248
|
display: flex;
|
|
@@ -274,6 +275,13 @@ KRDialog.styles = css `
|
|
|
274
275
|
font-size: 18px;
|
|
275
276
|
font-weight: 600;
|
|
276
277
|
}
|
|
278
|
+
|
|
279
|
+
.dialog__body {
|
|
280
|
+
flex: 1;
|
|
281
|
+
min-height: 0;
|
|
282
|
+
display: flex;
|
|
283
|
+
flex-direction: column;
|
|
284
|
+
}
|
|
277
285
|
`;
|
|
278
286
|
__decorate([
|
|
279
287
|
state()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/dialog/dialog.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAShD,IAAM,cAAc,GAApB,MAAM,cAAe,SA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EhG,CAAC;IACJ,CAAC;;AApLe,eAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkE3B,AAlEqB,CAkEpB;AAKM;IADP,KAAK,EAAE;iDAC0C;AAGlD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCAC5B;AAGf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCAChB;AAGX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCACX;AAjFL,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAsLpB"}
|
|
@@ -1617,7 +1617,7 @@ let KRDialog = class KRDialog extends i$2 {
|
|
|
1617
1617
|
<div class="backdrop" @click=${this._handleBackdropClick}></div>
|
|
1618
1618
|
<div class="dialog" style=${o$1({ width: this.width })}>
|
|
1619
1619
|
${this.label ? b `<div class="dialog__header"><div class="dialog__header-label">${this.label}</div></div>` : ''}
|
|
1620
|
-
|
|
1620
|
+
<div class="dialog__body">${this._contentElement ? this._contentElement : b `<slot></slot>`}</div>
|
|
1621
1621
|
</div>
|
|
1622
1622
|
`;
|
|
1623
1623
|
}
|
|
@@ -1648,6 +1648,7 @@ KRDialog.styles = i$5 `
|
|
|
1648
1648
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
1649
1649
|
border-radius: 12px;
|
|
1650
1650
|
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
|
|
1651
|
+
height: 100%;
|
|
1651
1652
|
max-height: 90vh;
|
|
1652
1653
|
overflow: hidden;
|
|
1653
1654
|
display: flex;
|
|
@@ -1680,6 +1681,13 @@ KRDialog.styles = i$5 `
|
|
|
1680
1681
|
font-size: 18px;
|
|
1681
1682
|
font-weight: 600;
|
|
1682
1683
|
}
|
|
1684
|
+
|
|
1685
|
+
.dialog__body {
|
|
1686
|
+
flex: 1;
|
|
1687
|
+
min-height: 0;
|
|
1688
|
+
display: flex;
|
|
1689
|
+
flex-direction: column;
|
|
1690
|
+
}
|
|
1683
1691
|
`;
|
|
1684
1692
|
__decorate$i([
|
|
1685
1693
|
r$1()
|