@lazhus/kg-ui 0.8.6 → 0.8.8
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 +23 -13
- package/dist/components/kg-modal.js +1 -1
- package/dist/components/kg-select.js +35 -6
- package/dist/react/KgDrawer.js +1 -1
- package/dist/react/KgModal.js +1 -1
- package/package.json +1 -1
- package/types/components/kg-accordion-item.d.ts +1 -0
- package/types/components/kg-checkbox.d.ts +1 -0
- package/types/components/kg-colorpicker.d.ts +1 -0
- package/types/components/kg-datagrid.d.ts +3 -0
- package/types/components/kg-datepicker.d.ts +1 -0
- package/types/components/kg-drawer.d.ts +1 -0
- package/types/components/kg-file-upload.d.ts +1 -0
- package/types/components/kg-input.d.ts +1 -0
- package/types/components/kg-modal.d.ts +3 -0
- package/types/components/kg-radio-group.d.ts +1 -0
- package/types/components/kg-radio.d.ts +2 -0
- package/types/components/kg-select.d.ts +4 -0
- package/types/components/kg-slider.d.ts +1 -0
- package/types/components/kg-stepper.d.ts +1 -0
- package/types/components/kg-switch.d.ts +1 -0
- package/types/components/kg-tabs.d.ts +1 -0
- package/types/components/kg-tag.d.ts +1 -0
- package/types/components/kg-textarea.d.ts +1 -0
- package/types/components/kg-toast.d.ts +1 -0
- package/types/components/kg-tree.d.ts +1 -0
- package/types/index.d.ts +24 -0
package/custom-elements.json
CHANGED
|
@@ -3601,17 +3601,12 @@
|
|
|
3601
3601
|
"default": "css` :host { display: block; --kg-modal-z-index: 2000; } .kg-modal-dimmer { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; z-index: var(--kg-modal-z-index); opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); padding: var(--kg-space-md); box-sizing: border-box; } .kg-modal-dimmer.open { opacity: 1; visibility: visible; } .kg-modal-content { background: var(--kg-bg); color: var(--kg-text); border-radius: var(--kg-radius-lg); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); width: 100%; max-width: 600px; transform: scale(0.95) translateY(10px); transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); display: flex; flex-direction: column; max-height: 90vh; overflow: hidden; } .kg-modal-dimmer.open .kg-modal-content { transform: scale(1) translateY(0); } /* Sizes */ .size-mini { max-width: 350px; } .size-tiny { max-width: 450px; } .size-small { max-width: 550px; } .size-large { max-width: 900px; } .size-fullscreen { max-width: 95vw; height: 95vh; } /* Basic style */ :host([basic]) .kg-modal-content { background: transparent; box-shadow: none; color: white; } .modal-header { padding: var(--kg-space-lg); font-size: 1.25rem; font-weight: 700; border-bottom: 1px solid var(--kg-border); display: flex; justify-content: space-between; align-items: center; } .modal-body { padding: var(--kg-space-lg); overflow-y: auto; flex: 1; } .modal-footer { padding: var(--kg-space-md) var(--kg-space-lg); border-top: 1px solid var(--kg-border); background: var(--kg-surface); display: flex; justify-content: flex-end; gap: 0.75rem; } .close-button { background: none; border: none; color: var(--kg-text-muted); cursor: pointer; font-size: 1.5rem; padding: 0.5rem; line-height: 1; border-radius: var(--kg-radius-sm); transition: all 0.2s; } .close-button:hover { background: var(--kg-surface); color: var(--kg-text); } `"
|
|
3602
3602
|
},
|
|
3603
3603
|
{
|
|
3604
|
-
"kind": "
|
|
3604
|
+
"kind": "field",
|
|
3605
3605
|
"name": "close"
|
|
3606
3606
|
},
|
|
3607
3607
|
{
|
|
3608
|
-
"kind": "
|
|
3609
|
-
"name": "_handleDimmerClick"
|
|
3610
|
-
"parameters": [
|
|
3611
|
-
{
|
|
3612
|
-
"name": "e"
|
|
3613
|
-
}
|
|
3614
|
-
]
|
|
3608
|
+
"kind": "field",
|
|
3609
|
+
"name": "_handleDimmerClick"
|
|
3615
3610
|
},
|
|
3616
3611
|
{
|
|
3617
3612
|
"kind": "method",
|
|
@@ -3661,10 +3656,8 @@
|
|
|
3661
3656
|
],
|
|
3662
3657
|
"events": [
|
|
3663
3658
|
{
|
|
3664
|
-
"
|
|
3665
|
-
"
|
|
3666
|
-
"text": "CustomEvent"
|
|
3667
|
-
}
|
|
3659
|
+
"description": "Dispatched when the modal is closed",
|
|
3660
|
+
"name": "close"
|
|
3668
3661
|
}
|
|
3669
3662
|
],
|
|
3670
3663
|
"superclass": {
|
|
@@ -4406,7 +4399,7 @@
|
|
|
4406
4399
|
"kind": "field",
|
|
4407
4400
|
"name": "styles",
|
|
4408
4401
|
"static": true,
|
|
4409
|
-
"default": "css` :host { display: inline-block; width: 100%; position: relative; font-family: inherit; user-select: none; } .kg-select-container { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; position: relative; } .select-label { font-size: 0.875rem; font-weight: 600; color: var(--kg-text); opacity: 0.8; margin-left: 2px; } * { box-sizing: border-box; } .select-trigger { display: flex; align-items: center; justify-content: space-between; height: var(--kg-form-height); padding: 0 1rem; background: var(--kg-surface); border: 1px solid var(--kg-border); border-radius: var(--kg-radius-md, 8px); cursor: pointer; transition: all 0.2s ease; gap: 8px; flex-wrap: nowrap; overflow: hidden; } .select-trigger:hover { border-color: var(--kg-primary); } .select-trigger.open { border-color: var(--kg-primary); box-shadow: 0 0 0 2px rgba(65, 171, 52, 0.2); } .select-trigger.disabled { opacity: 0.5; cursor: not-allowed; background: var(--kg-bg-secondary); } .placeholder { color: var(--kg-text-muted); opacity: 0.6; } .selected-text { color: var(--kg-text); flex: 1; } .tags-container { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; } .tag { background: var(--kg-primary); color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; display: flex; align-items: center; gap: 4px; } .tag-remove { cursor: pointer; opacity: 0.8; } .tag-remove:hover { opacity: 1; } .chevron { transition: transform 0.2s ease; color: var(--kg-text-muted); flex-shrink: 0; } .open .chevron { transform: rotate(180deg); } /* Dropdown */ .select-dropdown { position: absolute; top: calc(100% + 5px); left: 0; width: 100%; background: var(--kg-surface); border: 1px solid var(--kg-border); border-radius: var(--kg-radius-md, 8px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); z-index: 1000; max-height: 300px; overflow-y: auto; display: none; animation: slideDown 0.2s ease-out; } .select-dropdown.visible { display: block; } @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .search-container { padding: 8px; border-bottom: 1px solid var(--kg-border); position: sticky; top: 0; background: var(--kg-surface); z-index: 10; } .search-input { width: 100%; padding: 6px 10px; border: 1px solid var(--kg-border); border-radius: 4px; outline: none; font-family: inherit; font-size: 0.9rem; } .search-input:focus { border-color: var(--kg-primary); } .option-item { padding: 10px 16px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; transition: background 0.15s; color: var(--kg-text); } .option-item:hover { background: var(--kg-bg-secondary, rgba(0, 0, 0, 0.04)); } .option-item.selected { background: rgba(var(--kg-primary-rgb, 19, 103, 255), 0.08); color: var(--kg-primary); font-weight: 600; } .no-results { padding: 16px; text-align: center; color: var(--kg-text-muted); font-size: 0.9rem; } .check-icon { width: 16px; height: 16px; } .select-trigger.error { border-color: #DB2828 !important; background-color: rgba(219, 40, 40, 0.02) !important; } .error-text { position: absolute; top: 100%; left: 2px; color: #DB2828; font-size: 0.75rem; margin-top: 2px; font-weight: 500; animation: fadeIn 0.2s ease-in; } @keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } } `"
|
|
4402
|
+
"default": "css` :host { display: inline-block; width: 100%; position: relative; font-family: inherit; user-select: none; } .kg-select-container { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; position: relative; } .select-label { font-size: 0.875rem; font-weight: 600; color: var(--kg-text); opacity: 0.8; margin-left: 2px; } * { box-sizing: border-box; } .select-trigger { display: flex; align-items: center; justify-content: space-between; height: var(--kg-form-height); padding: 0 1rem; background: var(--kg-surface); border: 1px solid var(--kg-border); border-radius: var(--kg-radius-md, 8px); cursor: pointer; transition: all 0.2s ease; gap: 8px; flex-wrap: nowrap; overflow: hidden; } .select-trigger:hover { border-color: var(--kg-primary); } .select-trigger.open { border-color: var(--kg-primary); box-shadow: 0 0 0 2px rgba(65, 171, 52, 0.2); } .select-trigger.disabled { opacity: 0.5; cursor: not-allowed; background: var(--kg-bg-secondary); } .placeholder { color: var(--kg-text-muted); opacity: 0.6; } .selected-text { color: var(--kg-text); flex: 1; } .tags-container { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; } .tag { background: var(--kg-primary); color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; display: flex; align-items: center; gap: 4px; } .tag-remove { cursor: pointer; opacity: 0.8; } .tag-remove:hover { opacity: 1; } .chevron { transition: transform 0.2s ease; color: var(--kg-text-muted); flex-shrink: 0; } .open .chevron { transform: rotate(180deg); } .clear-button { display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--kg-text-muted); opacity: 0.6; transition: all 0.2s; flex-shrink: 0; padding: 4px; border-radius: 50%; } .clear-button:hover { opacity: 1; background: var(--kg-bg-secondary, rgba(0, 0, 0, 0.04)); color: var(--kg-primary); } /* Dropdown */ .select-dropdown { position: absolute; top: calc(100% + 5px); left: 0; width: 100%; background: var(--kg-surface); border: 1px solid var(--kg-border); border-radius: var(--kg-radius-md, 8px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); z-index: 1000; max-height: 300px; overflow-y: auto; display: none; animation: slideDown 0.2s ease-out; } .select-dropdown.visible { display: block; } @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .search-container { padding: 8px; border-bottom: 1px solid var(--kg-border); position: sticky; top: 0; background: var(--kg-surface); z-index: 10; } .search-input { width: 100%; padding: 6px 10px; border: 1px solid var(--kg-border); border-radius: 4px; outline: none; font-family: inherit; font-size: 0.9rem; } .search-input:focus { border-color: var(--kg-primary); } .option-item { padding: 10px 16px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; transition: background 0.15s; color: var(--kg-text); } .option-item:hover { background: var(--kg-bg-secondary, rgba(0, 0, 0, 0.04)); } .option-item.selected { background: rgba(var(--kg-primary-rgb, 19, 103, 255), 0.08); color: var(--kg-primary); font-weight: 600; } .no-results { padding: 16px; text-align: center; color: var(--kg-text-muted); font-size: 0.9rem; } .check-icon { width: 16px; height: 16px; } .select-trigger.error { border-color: #DB2828 !important; background-color: rgba(219, 40, 40, 0.02) !important; } .error-text { position: absolute; top: 100%; left: 2px; color: #DB2828; font-size: 0.75rem; margin-top: 2px; font-weight: 500; animation: fadeIn 0.2s ease-in; } @keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } } `"
|
|
4410
4403
|
},
|
|
4411
4404
|
{
|
|
4412
4405
|
"kind": "method",
|
|
@@ -4454,6 +4447,15 @@
|
|
|
4454
4447
|
"kind": "method",
|
|
4455
4448
|
"name": "_dispatchChange"
|
|
4456
4449
|
},
|
|
4450
|
+
{
|
|
4451
|
+
"kind": "method",
|
|
4452
|
+
"name": "_clearValue",
|
|
4453
|
+
"parameters": [
|
|
4454
|
+
{
|
|
4455
|
+
"name": "e"
|
|
4456
|
+
}
|
|
4457
|
+
]
|
|
4458
|
+
},
|
|
4457
4459
|
{
|
|
4458
4460
|
"kind": "method",
|
|
4459
4461
|
"name": "_handleSearch",
|
|
@@ -4523,6 +4525,14 @@
|
|
|
4523
4525
|
},
|
|
4524
4526
|
"default": "false"
|
|
4525
4527
|
},
|
|
4528
|
+
{
|
|
4529
|
+
"kind": "field",
|
|
4530
|
+
"name": "clearable",
|
|
4531
|
+
"type": {
|
|
4532
|
+
"text": "boolean"
|
|
4533
|
+
},
|
|
4534
|
+
"default": "false"
|
|
4535
|
+
},
|
|
4526
4536
|
{
|
|
4527
4537
|
"kind": "field",
|
|
4528
4538
|
"name": "_open",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var e=Object.defineProperty,o=(o,t,i)=>((o,t,i)=>t in o?e(o,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):o[t]=i)(o,"symbol"!=typeof t?t+"":t,i);import{LitElement as t,css as i,html as s}from"lit";import{classMap as a}from"lit/directives/class-map.js";class l extends t{constructor(){super(),this
|
|
1
|
+
var e=Object.defineProperty,o=(o,t,i)=>((o,t,i)=>t in o?e(o,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):o[t]=i)(o,"symbol"!=typeof t?t+"":t,i);import{LitElement as t,css as i,html as s}from"lit";import{classMap as a}from"lit/directives/class-map.js";class l extends t{constructor(){super(),o(this,"close",()=>{this.open=!1,this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}),o(this,"_handleDimmerClick",e=>{this.closable&&e.target.classList.contains("kg-modal-dimmer")&&this.close()}),this.open=!1,this.size="small",this.closable=!0,this.basic=!1}willUpdate(e){e.has("open")&&(this.open?document.body.style.overflow="hidden":document.body.style.overflow="")}render(){const e={"kg-modal-dimmer":!0,open:this.open},o={"kg-modal-content":!0,[`size-${this.size}`]:!0};return s`
|
|
2
2
|
<div class="${a(e)}" @click="${this._handleDimmerClick}">
|
|
3
3
|
<div class="${a(o)}">
|
|
4
4
|
<div class="modal-header">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var e,t=Object.defineProperty;import{LitElement as r,css as i,html as s}from"lit";import"lit/directives/class-map.js";import{F as
|
|
1
|
+
var e,t=Object.defineProperty;import{LitElement as r,css as i,html as s}from"lit";import"lit/directives/class-map.js";import{F as a}from"../chunks/FormAssociated-Cx5D8YQA.js";class o extends(a(r)){static get properties(){return{...super.properties,options:{type:Array},value:{type:Object},placeholder:{type:String},label:{type:String},multiple:{type:Boolean},searchable:{type:Boolean},clearable:{type:Boolean},_open:{type:Boolean,state:!0},_searchQuery:{type:String,state:!0}}}constructor(){super(),this.options=[],this.value=null,this.placeholder="Seçiniz...",this.multiple=!1,this.searchable=!1,this.clearable=!1,this._open=!1,this._searchQuery="",this._handleOutsideClick=this._handleOutsideClick.bind(this)}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleOutsideClick)}_updateFormValue(){if(this.multiple&&Array.isArray(this.value)){const e=new FormData;this.value.forEach(t=>e.append(this.name,t)),this.internals.setFormValue(e)}else this.internals.setFormValue(this.value)}_handleOutsideClick(e){this._open&&(e.composedPath().includes(this)||this._closeDropdown())}_toggleDropdown(e){this.disabled||(this._open=!this._open,this._open&&(this._searchQuery="",setTimeout(()=>{const e=this.shadowRoot.querySelector(".search-input");e&&e.focus()},100)))}_closeDropdown(){this._open=!1}_selectOption(e,t){if(t.stopPropagation(),this.multiple){let t=Array.isArray(this.value)?[...this.value]:[];const r=t.indexOf(e.value);r>-1?t.splice(r,1):t.push(e.value),this.value=t}else this.value=e.value,this._closeDropdown();this._dispatchChange()}_dispatchChange(){this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}_clearValue(e){e.stopPropagation(),this.value=this.multiple?[]:null,this._dispatchChange(),this._open&&this._closeDropdown()}_handleSearch(e){this._searchQuery=e.target.value.toLowerCase()}_removeTag(e,t){t.stopPropagation();let r=[...this.value];const i=r.indexOf(e);i>-1&&(r.splice(i,1),this.value=r,this._dispatchChange())}render(){const e=e=>this.multiple&&Array.isArray(this.value)?this.value.includes(e):this.value===e,t=(()=>{if(!this.value)return null;if(this.multiple&&Array.isArray(this.value))return this.options.filter(e=>this.value.includes(e.value));const e=this.options.find(e=>e.value===this.value);return e?e.label:null})(),r=(this.options||[]).filter(e=>e.label.toLowerCase().includes(this._searchQuery||""));return s`
|
|
2
2
|
<div class="kg-select-container">
|
|
3
3
|
${this.label?s`<label class="select-label">${this.label}</label>`:""}
|
|
4
4
|
|
|
@@ -26,9 +26,19 @@ var e,t=Object.defineProperty;import{LitElement as r,css as i,html as s}from"lit
|
|
|
26
26
|
<span class="selected-text">${t}</span>
|
|
27
27
|
`}
|
|
28
28
|
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
<span style="display: flex; align-items: center; gap: 8px;">
|
|
30
|
+
${this.clearable&&!this.disabled&&(Array.isArray(this.value)?this.value.length>0:null!==this.value)?s`
|
|
31
|
+
<div class="clear-button" @click="${this._clearValue}" title="Temizle">
|
|
32
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
|
33
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
34
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
35
|
+
</svg>
|
|
36
|
+
</div>
|
|
37
|
+
`:""}
|
|
38
|
+
<svg class="chevron" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
39
|
+
<polyline points="6 9 12 15 18 9"></polyline>
|
|
40
|
+
</svg>
|
|
41
|
+
</span>
|
|
32
42
|
</div>
|
|
33
43
|
|
|
34
44
|
<div class="select-dropdown ${this._open?"visible":""}">
|
|
@@ -63,7 +73,7 @@ var e,t=Object.defineProperty;import{LitElement as r,css as i,html as s}from"lit
|
|
|
63
73
|
</div>
|
|
64
74
|
${this.errorText?s`<div class="error-text">${this.errorText}</div>`:""}
|
|
65
75
|
</div>
|
|
66
|
-
`}}((e,r,i)=>{r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i})(
|
|
76
|
+
`}}((e,r,i)=>{r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i})(o,"symbol"!=typeof(e="styles")?e+"":e,i`
|
|
67
77
|
:host {
|
|
68
78
|
display: inline-block;
|
|
69
79
|
width: 100%;
|
|
@@ -170,6 +180,25 @@ var e,t=Object.defineProperty;import{LitElement as r,css as i,html as s}from"lit
|
|
|
170
180
|
transform: rotate(180deg);
|
|
171
181
|
}
|
|
172
182
|
|
|
183
|
+
.clear-button {
|
|
184
|
+
display: flex;
|
|
185
|
+
align-items: center;
|
|
186
|
+
justify-content: center;
|
|
187
|
+
cursor: pointer;
|
|
188
|
+
color: var(--kg-text-muted);
|
|
189
|
+
opacity: 0.6;
|
|
190
|
+
transition: all 0.2s;
|
|
191
|
+
flex-shrink: 0;
|
|
192
|
+
padding: 4px;
|
|
193
|
+
border-radius: 50%;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.clear-button:hover {
|
|
197
|
+
opacity: 1;
|
|
198
|
+
background: var(--kg-bg-secondary, rgba(0, 0, 0, 0.04));
|
|
199
|
+
color: var(--kg-primary);
|
|
200
|
+
}
|
|
201
|
+
|
|
173
202
|
/* Dropdown */
|
|
174
203
|
.select-dropdown {
|
|
175
204
|
position: absolute;
|
|
@@ -271,4 +300,4 @@ var e,t=Object.defineProperty;import{LitElement as r,css as i,html as s}from"lit
|
|
|
271
300
|
from { opacity: 0; transform: translateY(-4px); }
|
|
272
301
|
to { opacity: 1; transform: translateY(0); }
|
|
273
302
|
}
|
|
274
|
-
`),"undefined"==typeof customElements||customElements.get("kg-select")||customElements.define("kg-select",
|
|
303
|
+
`),"undefined"==typeof customElements||customElements.get("kg-select")||customElements.define("kg-select",o);export{o as kgselect};
|
package/dist/react/KgDrawer.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{o as t}from"../chunks/create-component-jQ1kjF1Z.js";import{kgdrawer as
|
|
1
|
+
import e from"react";import{o as t}from"../chunks/create-component-jQ1kjF1Z.js";import{kgdrawer as o}from"../components/kg-drawer.js";"undefined"==typeof customElements||customElements.get("kg-drawer")||customElements.define("kg-drawer",o);const r=t({tagName:"kg-drawer",elementClass:o,react:e,events:{onClose:"close"}});export{r as KgDrawer};
|
package/dist/react/KgModal.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{o
|
|
1
|
+
import e from"react";import{o}from"../chunks/create-component-jQ1kjF1Z.js";import{kgmodal as t}from"../components/kg-modal.js";"undefined"==typeof customElements||customElements.get("kg-modal")||customElements.define("kg-modal",t);const m=o({tagName:"kg-modal",elementClass:t,react:e,events:{onClose:"close"}});export{m as KgModal};
|
package/package.json
CHANGED
|
@@ -2,6 +2,8 @@ import { LitElement } from 'lit';
|
|
|
2
2
|
|
|
3
3
|
/** @customElement kg-modal */
|
|
4
4
|
export class kgmodal extends LitElement {
|
|
5
|
+
/** */
|
|
6
|
+
close: any;
|
|
5
7
|
/** */
|
|
6
8
|
open: boolean;
|
|
7
9
|
/** */
|
|
@@ -24,6 +26,7 @@ declare global {
|
|
|
24
26
|
size?: string;
|
|
25
27
|
closable?: boolean;
|
|
26
28
|
basic?: boolean;
|
|
29
|
+
onClose?: (e: any) => void;
|
|
27
30
|
[key: string]: any;
|
|
28
31
|
};
|
|
29
32
|
}
|
|
@@ -21,6 +21,8 @@ export class kgselect extends LitElement {
|
|
|
21
21
|
/** */
|
|
22
22
|
searchable: boolean;
|
|
23
23
|
/** */
|
|
24
|
+
clearable: boolean;
|
|
25
|
+
/** */
|
|
24
26
|
form: any;
|
|
25
27
|
/** */
|
|
26
28
|
type: string;
|
|
@@ -43,8 +45,10 @@ declare global {
|
|
|
43
45
|
placeholder?: string;
|
|
44
46
|
multiple?: boolean;
|
|
45
47
|
searchable?: boolean;
|
|
48
|
+
clearable?: boolean;
|
|
46
49
|
form?: any;
|
|
47
50
|
type?: string;
|
|
51
|
+
onChange?: (e: any) => void;
|
|
48
52
|
[key: string]: any;
|
|
49
53
|
};
|
|
50
54
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -97,6 +97,7 @@ declare global {
|
|
|
97
97
|
open?: boolean;
|
|
98
98
|
disabled?: boolean;
|
|
99
99
|
title?: string;
|
|
100
|
+
onKgAccordionToggle?: (e: any) => void;
|
|
100
101
|
[key: string]: any;
|
|
101
102
|
};
|
|
102
103
|
'kg-avatar': {
|
|
@@ -162,6 +163,7 @@ declare global {
|
|
|
162
163
|
indeterminate?: boolean;
|
|
163
164
|
form?: any;
|
|
164
165
|
type?: string;
|
|
166
|
+
onChange?: (e: any) => void;
|
|
165
167
|
[key: string]: any;
|
|
166
168
|
};
|
|
167
169
|
'kg-colorpicker': {
|
|
@@ -173,6 +175,7 @@ declare global {
|
|
|
173
175
|
open?: boolean;
|
|
174
176
|
form?: any;
|
|
175
177
|
type?: string;
|
|
178
|
+
onChange?: (e: any) => void;
|
|
176
179
|
[key: string]: any;
|
|
177
180
|
};
|
|
178
181
|
'kg-column': {
|
|
@@ -195,6 +198,9 @@ declare global {
|
|
|
195
198
|
sortable?: boolean;
|
|
196
199
|
pagination?: boolean;
|
|
197
200
|
pageSize?: number;
|
|
201
|
+
onSelectionChange?: (e: any) => void;
|
|
202
|
+
onSort?: (e: any) => void;
|
|
203
|
+
onPageChange?: (e: any) => void;
|
|
198
204
|
[key: string]: any;
|
|
199
205
|
};
|
|
200
206
|
'kg-datepicker': {
|
|
@@ -214,6 +220,7 @@ declare global {
|
|
|
214
220
|
fullwidth?: boolean;
|
|
215
221
|
form?: any;
|
|
216
222
|
type?: string;
|
|
223
|
+
onChange?: (e: any) => void;
|
|
217
224
|
[key: string]: any;
|
|
218
225
|
};
|
|
219
226
|
'kg-divider': {
|
|
@@ -230,6 +237,7 @@ declare global {
|
|
|
230
237
|
size?: string;
|
|
231
238
|
closable?: boolean;
|
|
232
239
|
noOverlay?: boolean;
|
|
240
|
+
onClose?: (e: any) => void;
|
|
233
241
|
[key: string]: any;
|
|
234
242
|
};
|
|
235
243
|
'kg-file-upload': {
|
|
@@ -245,6 +253,7 @@ declare global {
|
|
|
245
253
|
files?: any[];
|
|
246
254
|
form?: any;
|
|
247
255
|
type?: string;
|
|
256
|
+
onChange?: (e: any) => void;
|
|
248
257
|
[key: string]: any;
|
|
249
258
|
};
|
|
250
259
|
'kg-grid': {
|
|
@@ -274,6 +283,7 @@ declare global {
|
|
|
274
283
|
hasRight?: boolean;
|
|
275
284
|
form?: any;
|
|
276
285
|
type?: string;
|
|
286
|
+
onKgInput?: (e: any) => void;
|
|
277
287
|
[key: string]: any;
|
|
278
288
|
};
|
|
279
289
|
'kg-link': {
|
|
@@ -306,6 +316,7 @@ declare global {
|
|
|
306
316
|
size?: string;
|
|
307
317
|
closable?: boolean;
|
|
308
318
|
basic?: boolean;
|
|
319
|
+
onClose?: (e: any) => void;
|
|
309
320
|
[key: string]: any;
|
|
310
321
|
};
|
|
311
322
|
'kg-progress': {
|
|
@@ -328,6 +339,8 @@ declare global {
|
|
|
328
339
|
type?: string;
|
|
329
340
|
label?: string;
|
|
330
341
|
color?: string;
|
|
342
|
+
onKgRadioSelect?: (e: any) => void;
|
|
343
|
+
onChange?: (e: any) => void;
|
|
331
344
|
[key: string]: any;
|
|
332
345
|
};
|
|
333
346
|
'kg-radio-group': {
|
|
@@ -339,6 +352,7 @@ declare global {
|
|
|
339
352
|
direction?: string;
|
|
340
353
|
form?: any;
|
|
341
354
|
type?: string;
|
|
355
|
+
onChange?: (e: any) => void;
|
|
342
356
|
[key: string]: any;
|
|
343
357
|
};
|
|
344
358
|
'kg-row': {
|
|
@@ -358,8 +372,10 @@ declare global {
|
|
|
358
372
|
placeholder?: string;
|
|
359
373
|
multiple?: boolean;
|
|
360
374
|
searchable?: boolean;
|
|
375
|
+
clearable?: boolean;
|
|
361
376
|
form?: any;
|
|
362
377
|
type?: string;
|
|
378
|
+
onChange?: (e: any) => void;
|
|
363
379
|
[key: string]: any;
|
|
364
380
|
};
|
|
365
381
|
'kg-skeleton': {
|
|
@@ -383,6 +399,7 @@ declare global {
|
|
|
383
399
|
showPins?: boolean;
|
|
384
400
|
form?: any;
|
|
385
401
|
type?: string;
|
|
402
|
+
onKgInput?: (e: any) => void;
|
|
386
403
|
[key: string]: any;
|
|
387
404
|
};
|
|
388
405
|
'kg-spinner': {
|
|
@@ -396,6 +413,7 @@ declare global {
|
|
|
396
413
|
activeStep?: number;
|
|
397
414
|
vertical?: boolean;
|
|
398
415
|
clickable?: boolean;
|
|
416
|
+
onKgStepChange?: (e: any) => void;
|
|
399
417
|
[key: string]: any;
|
|
400
418
|
};
|
|
401
419
|
'kg-switch': {
|
|
@@ -408,6 +426,7 @@ declare global {
|
|
|
408
426
|
color?: string;
|
|
409
427
|
form?: any;
|
|
410
428
|
type?: string;
|
|
429
|
+
onChange?: (e: any) => void;
|
|
411
430
|
[key: string]: any;
|
|
412
431
|
};
|
|
413
432
|
'kg-tab-panel': {
|
|
@@ -419,6 +438,7 @@ declare global {
|
|
|
419
438
|
'kg-tabs': {
|
|
420
439
|
activeTab?: string;
|
|
421
440
|
vertical?: boolean;
|
|
441
|
+
onKgTabChange?: (e: any) => void;
|
|
422
442
|
[key: string]: any;
|
|
423
443
|
};
|
|
424
444
|
'kg-tag': {
|
|
@@ -427,6 +447,7 @@ declare global {
|
|
|
427
447
|
pill?: boolean;
|
|
428
448
|
basic?: boolean;
|
|
429
449
|
closable?: boolean;
|
|
450
|
+
onKgClose?: (e: any) => void;
|
|
430
451
|
[key: string]: any;
|
|
431
452
|
};
|
|
432
453
|
'kg-text': {
|
|
@@ -453,6 +474,7 @@ declare global {
|
|
|
453
474
|
resize?: string;
|
|
454
475
|
form?: any;
|
|
455
476
|
type?: string;
|
|
477
|
+
onKgInput?: (e: any) => void;
|
|
456
478
|
[key: string]: any;
|
|
457
479
|
};
|
|
458
480
|
'kg-toast': {
|
|
@@ -461,6 +483,7 @@ declare global {
|
|
|
461
483
|
color?: string;
|
|
462
484
|
title?: string;
|
|
463
485
|
message?: string;
|
|
486
|
+
onKgClose?: (e: any) => void;
|
|
464
487
|
[key: string]: any;
|
|
465
488
|
};
|
|
466
489
|
'kg-tree': {
|
|
@@ -473,6 +496,7 @@ declare global {
|
|
|
473
496
|
level?: number;
|
|
474
497
|
label?: string;
|
|
475
498
|
page?: string;
|
|
499
|
+
onKgSelect?: (e: any) => void;
|
|
476
500
|
[key: string]: any;
|
|
477
501
|
};
|
|
478
502
|
}
|