@kodaris/krubble-components 1.0.9 → 1.0.10
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 +727 -57
- package/dist/button/button.d.ts +14 -0
- package/dist/button/button.d.ts.map +1 -1
- package/dist/button/button.js +120 -3
- package/dist/button/button.js.map +1 -1
- package/dist/form/text-field/text-field.js +2 -2
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/krubble.bundled.js +1311 -56
- package/dist/krubble.bundled.js.map +1 -1
- package/dist/krubble.bundled.min.js +762 -76
- package/dist/krubble.bundled.min.js.map +1 -1
- package/dist/krubble.umd.js +1310 -55
- package/dist/krubble.umd.js.map +1 -1
- package/dist/krubble.umd.min.js +754 -68
- package/dist/krubble.umd.min.js.map +1 -1
- package/dist/table/table.d.ts +253 -0
- package/dist/table/table.d.ts.map +1 -0
- package/dist/table/table.js +1146 -0
- package/dist/table/table.js.map +1 -0
- package/dist/tabs/tabs.d.ts.map +1 -1
- package/dist/tabs/tabs.js +2 -0
- package/dist/tabs/tabs.js.map +1 -1
- package/package.json +5 -1
package/dist/button/button.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
+
export interface KRButtonOption {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
2
6
|
/**
|
|
3
7
|
* A customizable button component.
|
|
4
8
|
*
|
|
5
9
|
* @slot - The button content
|
|
6
10
|
* @fires click - Fired when the button is clicked
|
|
11
|
+
* @fires option-select - Fired when a dropdown option is selected
|
|
7
12
|
*/
|
|
8
13
|
export declare class KRButton extends LitElement {
|
|
9
14
|
static styles: import("lit").CSSResult;
|
|
@@ -23,12 +28,21 @@ export declare class KRButton extends LitElement {
|
|
|
23
28
|
* Whether the button is disabled
|
|
24
29
|
*/
|
|
25
30
|
disabled: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Dropdown options - when provided, button becomes a dropdown
|
|
33
|
+
*/
|
|
34
|
+
options: KRButtonOption[];
|
|
26
35
|
private _state;
|
|
27
36
|
private _stateText;
|
|
37
|
+
private _dropdownOpen;
|
|
28
38
|
private _stateTimeout?;
|
|
29
39
|
connectedCallback(): void;
|
|
30
40
|
disconnectedCallback(): void;
|
|
41
|
+
private _handleHostClick;
|
|
31
42
|
private _handleKeydown;
|
|
43
|
+
private _handleClickOutside;
|
|
44
|
+
private _toggleDropdown;
|
|
45
|
+
private _handleOptionClick;
|
|
32
46
|
/**
|
|
33
47
|
* Shows a loading spinner and disables the button.
|
|
34
48
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/button/button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/button/button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAGrD,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,qBACa,QAAS,SAAQ,UAAU;IACtC,OAAgB,MAAM,0BA2MpB;IAEF;;OAEG;IAEH,OAAO,EAAE,MAAM,GAAG,SAAS,CAAU;IAErC;;OAEG;IAEH,KAAK,EAAE,SAAS,GAAG,WAAW,CAAa;IAE3C;;OAEG;IAEH,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAY;IAE9C;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,OAAO,EAAE,cAAc,EAAE,CAAM;IAG/B,OAAO,CAAC,MAAM,CAAoD;IAGlE,OAAO,CAAC,UAAU,CAAM;IAGxB,OAAO,CAAC,aAAa,CAAS;IAE9B,OAAO,CAAC,aAAa,CAAC,CAAS;IAE/B,iBAAiB;IASjB,oBAAoB;IAOpB,OAAO,CAAC,gBAAgB,CAKtB;IAEF,OAAO,CAAC,cAAc,CAYpB;IAEF,OAAO,CAAC,mBAAmB,CAIzB;IAEF,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,kBAAkB;IAU1B;;OAEG;IACH,WAAW;IAMX;;;;OAIG;IACH,WAAW,CAAC,IAAI,SAAY,EAAE,QAAQ,SAAO;IAO7C;;;;OAIG;IACH,SAAS,CAAC,IAAI,SAAU,EAAE,QAAQ,SAAO;IAOzC;;OAEG;IACH,KAAK;IAML,OAAO,CAAC,kBAAkB;cAOP,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAWzD,MAAM;CAyBhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
package/dist/button/button.js
CHANGED
|
@@ -4,13 +4,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
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;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { LitElement, html, css } from 'lit';
|
|
7
|
+
import { LitElement, html, css, nothing } from 'lit';
|
|
8
8
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
9
9
|
/**
|
|
10
10
|
* A customizable button component.
|
|
11
11
|
*
|
|
12
12
|
* @slot - The button content
|
|
13
13
|
* @fires click - Fired when the button is clicked
|
|
14
|
+
* @fires option-select - Fired when a dropdown option is selected
|
|
14
15
|
*/
|
|
15
16
|
let KRButton = class KRButton extends LitElement {
|
|
16
17
|
constructor() {
|
|
@@ -31,12 +32,36 @@ let KRButton = class KRButton extends LitElement {
|
|
|
31
32
|
* Whether the button is disabled
|
|
32
33
|
*/
|
|
33
34
|
this.disabled = false;
|
|
35
|
+
/**
|
|
36
|
+
* Dropdown options - when provided, button becomes a dropdown
|
|
37
|
+
*/
|
|
38
|
+
this.options = [];
|
|
34
39
|
this._state = 'idle';
|
|
35
40
|
this._stateText = '';
|
|
41
|
+
this._dropdownOpen = false;
|
|
42
|
+
this._handleHostClick = (e) => {
|
|
43
|
+
if (this.options.length) {
|
|
44
|
+
e.stopPropagation();
|
|
45
|
+
this._toggleDropdown();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
36
48
|
this._handleKeydown = (e) => {
|
|
37
49
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
38
50
|
e.preventDefault();
|
|
39
|
-
this.
|
|
51
|
+
if (this.options.length) {
|
|
52
|
+
this._toggleDropdown();
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
this.click();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (e.key === 'Escape' && this._dropdownOpen) {
|
|
59
|
+
this._dropdownOpen = false;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
this._handleClickOutside = (e) => {
|
|
63
|
+
if (this._dropdownOpen && !this.contains(e.target)) {
|
|
64
|
+
this._dropdownOpen = false;
|
|
40
65
|
}
|
|
41
66
|
};
|
|
42
67
|
}
|
|
@@ -45,10 +70,26 @@ let KRButton = class KRButton extends LitElement {
|
|
|
45
70
|
this.setAttribute('role', 'button');
|
|
46
71
|
this.setAttribute('tabindex', '0');
|
|
47
72
|
this.addEventListener('keydown', this._handleKeydown);
|
|
73
|
+
this.addEventListener('click', this._handleHostClick);
|
|
74
|
+
document.addEventListener('click', this._handleClickOutside);
|
|
48
75
|
}
|
|
49
76
|
disconnectedCallback() {
|
|
50
77
|
super.disconnectedCallback();
|
|
51
78
|
this.removeEventListener('keydown', this._handleKeydown);
|
|
79
|
+
this.removeEventListener('click', this._handleHostClick);
|
|
80
|
+
document.removeEventListener('click', this._handleClickOutside);
|
|
81
|
+
}
|
|
82
|
+
_toggleDropdown() {
|
|
83
|
+
this._dropdownOpen = !this._dropdownOpen;
|
|
84
|
+
}
|
|
85
|
+
_handleOptionClick(option, e) {
|
|
86
|
+
e.stopPropagation();
|
|
87
|
+
this._dropdownOpen = false;
|
|
88
|
+
this.dispatchEvent(new CustomEvent('option-select', {
|
|
89
|
+
detail: { id: option.id, label: option.label },
|
|
90
|
+
bubbles: true,
|
|
91
|
+
composed: true
|
|
92
|
+
}));
|
|
52
93
|
}
|
|
53
94
|
/**
|
|
54
95
|
* Shows a loading spinner and disables the button.
|
|
@@ -105,15 +146,27 @@ let KRButton = class KRButton extends LitElement {
|
|
|
105
146
|
this.classList.toggle('kr-button--large', this.size === 'large');
|
|
106
147
|
}
|
|
107
148
|
render() {
|
|
149
|
+
const hasOptions = this.options.length > 0;
|
|
108
150
|
return html `
|
|
109
151
|
<slot></slot>
|
|
152
|
+
${hasOptions ? html `<svg class="caret" xmlns="http://www.w3.org/2000/svg" height="20" width="20" viewBox="0 0 24 24" fill="currentColor"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"/></svg>` : nothing}
|
|
110
153
|
${this._state !== 'idle'
|
|
111
154
|
? html `<span class="state-overlay">
|
|
112
155
|
${this._state === 'loading'
|
|
113
156
|
? html `<span class="spinner"></span>`
|
|
114
157
|
: this._stateText}
|
|
115
158
|
</span>`
|
|
116
|
-
:
|
|
159
|
+
: nothing}
|
|
160
|
+
${hasOptions ? html `
|
|
161
|
+
<div class="dropdown ${this._dropdownOpen ? 'open' : ''}">
|
|
162
|
+
${this.options.map(option => html `
|
|
163
|
+
<button
|
|
164
|
+
class="dropdown-item"
|
|
165
|
+
@click=${(e) => this._handleOptionClick(option, e)}
|
|
166
|
+
>${option.label}</button>
|
|
167
|
+
`)}
|
|
168
|
+
</div>
|
|
169
|
+
` : nothing}
|
|
117
170
|
`;
|
|
118
171
|
}
|
|
119
172
|
};
|
|
@@ -262,6 +315,64 @@ KRButton.styles = css `
|
|
|
262
315
|
height: 16px;
|
|
263
316
|
border-width: 3px;
|
|
264
317
|
}
|
|
318
|
+
|
|
319
|
+
/* Dropdown */
|
|
320
|
+
.dropdown {
|
|
321
|
+
position: absolute;
|
|
322
|
+
top: 100%;
|
|
323
|
+
left: 0;
|
|
324
|
+
margin-top: 4px;
|
|
325
|
+
min-width: 100%;
|
|
326
|
+
background: white;
|
|
327
|
+
border: 1px solid #9ba7b6;
|
|
328
|
+
border-radius: 8px;
|
|
329
|
+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
|
|
330
|
+
padding: 8px 0;
|
|
331
|
+
z-index: 100;
|
|
332
|
+
display: none;
|
|
333
|
+
transform-origin: top;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.dropdown.open {
|
|
337
|
+
display: block;
|
|
338
|
+
animation: dropdown-fade-in 150ms ease-out;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
@keyframes dropdown-fade-in {
|
|
342
|
+
from {
|
|
343
|
+
opacity: 0;
|
|
344
|
+
transform: translateY(-4px);
|
|
345
|
+
}
|
|
346
|
+
to {
|
|
347
|
+
opacity: 1;
|
|
348
|
+
transform: translateY(0);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.dropdown-item {
|
|
353
|
+
display: block;
|
|
354
|
+
width: 100%;
|
|
355
|
+
padding: 8px 16px;
|
|
356
|
+
text-align: left;
|
|
357
|
+
background: none;
|
|
358
|
+
border: none;
|
|
359
|
+
font-size: 14px;
|
|
360
|
+
color: #374151;
|
|
361
|
+
cursor: pointer;
|
|
362
|
+
font-family: inherit;
|
|
363
|
+
white-space: nowrap;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.dropdown-item:hover {
|
|
367
|
+
background: #f3f4f6;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/* Caret for dropdown button */
|
|
371
|
+
.caret {
|
|
372
|
+
margin-left: 4px;
|
|
373
|
+
margin-right: -6px;
|
|
374
|
+
display: flex;
|
|
375
|
+
}
|
|
265
376
|
`;
|
|
266
377
|
__decorate([
|
|
267
378
|
property({ type: String, reflect: true })
|
|
@@ -275,12 +386,18 @@ __decorate([
|
|
|
275
386
|
__decorate([
|
|
276
387
|
property({ type: Boolean, reflect: true })
|
|
277
388
|
], KRButton.prototype, "disabled", void 0);
|
|
389
|
+
__decorate([
|
|
390
|
+
property({ type: Array })
|
|
391
|
+
], KRButton.prototype, "options", void 0);
|
|
278
392
|
__decorate([
|
|
279
393
|
state()
|
|
280
394
|
], KRButton.prototype, "_state", void 0);
|
|
281
395
|
__decorate([
|
|
282
396
|
state()
|
|
283
397
|
], KRButton.prototype, "_stateText", void 0);
|
|
398
|
+
__decorate([
|
|
399
|
+
state()
|
|
400
|
+
], KRButton.prototype, "_dropdownOpen", void 0);
|
|
284
401
|
KRButton = __decorate([
|
|
285
402
|
customElement('kr-button')
|
|
286
403
|
], KRButton);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/button/button.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/button/button.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAOnE;;;;;;GAMG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,UAAU;IAAjC;;QA8ML;;WAEG;QAEH,YAAO,GAAuB,MAAM,CAAC;QAErC;;WAEG;QAEH,UAAK,GAA4B,SAAS,CAAC;QAE3C;;WAEG;QAEH,SAAI,GAAiC,QAAQ,CAAC;QAE9C;;WAEG;Q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IACJ,CAAC;;AAnYe,eAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2M3B,AA3MqB,CA2MpB;AAMF;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCACL;AAMrC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCACC;AAM3C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sCACI;AAM9C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAC1B;AAMjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;yCACK;AAGvB;IADP,KAAK,EAAE;wCAC0D;AAG1D;IADP,KAAK,EAAE;4CACgB;AAGhB;IADP,KAAK,EAAE;+CACsB;AAnPnB,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAqYpB"}
|
|
@@ -222,8 +222,8 @@ KRTextField.styles = css `
|
|
|
222
222
|
|
|
223
223
|
input:focus {
|
|
224
224
|
outline: none;
|
|
225
|
-
border-color: var(--kr-text-field-focus-border-color, #
|
|
226
|
-
box-shadow: 0 0 0 3px var(--kr-text-field-focus-ring-color, rgba(
|
|
225
|
+
border-color: var(--kr-text-field-focus-border-color, #163052);
|
|
226
|
+
box-shadow: 0 0 0 3px var(--kr-text-field-focus-ring-color, rgba(22, 48, 82, 0.1));
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
input:disabled {
|
package/dist/index.d.ts
CHANGED
|
@@ -2,12 +2,15 @@ export { krBaseCSS } from './style/base.js';
|
|
|
2
2
|
export { KRAccordion } from './accordion/accordion.js';
|
|
3
3
|
export { KRAlert } from './alert/alert.js';
|
|
4
4
|
export { KRButton } from './button/button.js';
|
|
5
|
+
export type { KRButtonOption } from './button/button.js';
|
|
5
6
|
export { KRCodeDemo } from './code-demo/code-demo.js';
|
|
6
7
|
export { KRContextMenu } from './context-menu/context-menu.js';
|
|
7
8
|
export { KRDialog, DialogRef } from './dialog/dialog.js';
|
|
8
9
|
export { KRSnackbar } from './snackbar/snackbar.js';
|
|
9
10
|
export { KRTabGroup } from './tabs/tabs.js';
|
|
10
11
|
export { KRTab } from './tabs/tab.js';
|
|
12
|
+
export { KRTable } from './table/table.js';
|
|
13
|
+
export type { KRTableDef, KRTableColumn, KRTableAction, KRTableDataSource } from './table/table.js';
|
|
11
14
|
export { KRTextField, KRSelect, KRSelectOption } from './form/index.js';
|
|
12
15
|
export type { ContextMenuItem, ContextMenuOptions } from './context-menu/context-menu.js';
|
|
13
16
|
export type { DialogConfig } from './dialog/dialog.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,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ef } from './dialog/dialog.js';
|
|
|
10
10
|
export { KRSnackbar } from './snackbar/snackbar.js';
|
|
11
11
|
export { KRTabGroup } from './tabs/tabs.js';
|
|
12
12
|
export { KRTab } from './tabs/tab.js';
|
|
13
|
+
export { KRTable } from './table/table.js';
|
|
13
14
|
// Form components
|
|
14
15
|
export { KRTextField, KRSelect, KRSelectOption } from './form/index.js';
|
|
15
16
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,aAAa;AACb,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,aAAa;AACb,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAG3C,kBAAkB;AAClB,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC"}
|