@kodaris/krubble-components 1.0.0

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.
Files changed (46) hide show
  1. package/custom-elements.json +2156 -0
  2. package/dist/accordion/accordion.d.ts +35 -0
  3. package/dist/accordion/accordion.d.ts.map +1 -0
  4. package/dist/accordion/accordion.js +120 -0
  5. package/dist/accordion/accordion.js.map +1 -0
  6. package/dist/alert.d.ts +35 -0
  7. package/dist/alert.d.ts.map +1 -0
  8. package/dist/alert.js +204 -0
  9. package/dist/alert.js.map +1 -0
  10. package/dist/button/button.d.ts +30 -0
  11. package/dist/button/button.d.ts.map +1 -0
  12. package/dist/button/button.js +133 -0
  13. package/dist/button/button.js.map +1 -0
  14. package/dist/code-demo/code-demo.d.ts +44 -0
  15. package/dist/code-demo/code-demo.d.ts.map +1 -0
  16. package/dist/code-demo/code-demo.js +277 -0
  17. package/dist/code-demo/code-demo.js.map +1 -0
  18. package/dist/context-menu/context-menu.d.ts +54 -0
  19. package/dist/context-menu/context-menu.d.ts.map +1 -0
  20. package/dist/context-menu/context-menu.js +179 -0
  21. package/dist/context-menu/context-menu.js.map +1 -0
  22. package/dist/dialog/dialog.d.ts +58 -0
  23. package/dist/dialog/dialog.d.ts.map +1 -0
  24. package/dist/dialog/dialog.js +142 -0
  25. package/dist/dialog/dialog.js.map +1 -0
  26. package/dist/form/index.d.ts +2 -0
  27. package/dist/form/index.d.ts.map +1 -0
  28. package/dist/form/index.js +3 -0
  29. package/dist/form/index.js.map +1 -0
  30. package/dist/form/text-field/text-field.d.ts +91 -0
  31. package/dist/form/text-field/text-field.d.ts.map +1 -0
  32. package/dist/form/text-field/text-field.js +281 -0
  33. package/dist/form/text-field/text-field.js.map +1 -0
  34. package/dist/index.d.ts +10 -0
  35. package/dist/index.d.ts.map +1 -0
  36. package/dist/index.js +10 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/krubble.bundled.js +1402 -0
  39. package/dist/krubble.bundled.js.map +1 -0
  40. package/dist/krubble.bundled.min.js +739 -0
  41. package/dist/krubble.bundled.min.js.map +1 -0
  42. package/dist/krubble.umd.js +1411 -0
  43. package/dist/krubble.umd.js.map +1 -0
  44. package/dist/krubble.umd.min.js +739 -0
  45. package/dist/krubble.umd.min.js.map +1 -0
  46. package/package.json +51 -0
@@ -0,0 +1,2156 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "dist/alert.js",
8
+ "declarations": [
9
+ {
10
+ "kind": "variable",
11
+ "name": "KRAlert",
12
+ "default": "class KRAlert extends LitElement { constructor() { super(...arguments); /** * The alert type/severity */ this.type = 'info'; /** * Whether the alert can be dismissed */ this.dismissible = false; /** * Whether the alert is visible */ this.visible = true; } /** Handles dismiss button click */ _handleDismiss() { this.visible = false; this.dispatchEvent(new CustomEvent('dismiss', { bubbles: true, composed: true })); } render() { const icons = { info: html `<svg class=\"icon\" viewBox=\"0 0 20 20\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z\" clip-rule=\"evenodd\"/></svg>`, success: html `<svg class=\"icon\" viewBox=\"0 0 20 20\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z\" clip-rule=\"evenodd\"/></svg>`, warning: html `<svg class=\"icon\" viewBox=\"0 0 20 20\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z\" clip-rule=\"evenodd\"/></svg>`, error: html `<svg class=\"icon\" viewBox=\"0 0 20 20\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z\" clip-rule=\"evenodd\"/></svg>`, }; return html ` <div class=${classMap({ 'alert': true, ['alert--' + this.type]: true, 'alert--hidden': !this.visible })} role=\"alert\" > ${icons[this.type]} <div class=\"content\"> ${this.header ? html `<h4 class=\"header\">${this.header}</h4>` : nothing} <div class=\"message\"> <slot></slot> </div> </div> ${this.dismissible ? html ` <button class=\"dismiss\" type=\"button\" aria-label=\"Dismiss alert\" @click=${this._handleDismiss} > <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" width=\"16\" height=\"16\"> <path fill-rule=\"evenodd\" d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\" clip-rule=\"evenodd\"/> </svg> </button> ` : nothing} </div> `; } }",
13
+ "description": "A customizable alert component for displaying important information to users."
14
+ }
15
+ ],
16
+ "exports": [
17
+ {
18
+ "kind": "js",
19
+ "name": "KRAlert",
20
+ "declaration": {
21
+ "name": "KRAlert",
22
+ "module": "dist/alert.js"
23
+ }
24
+ }
25
+ ]
26
+ },
27
+ {
28
+ "kind": "javascript-module",
29
+ "path": "dist/index.js",
30
+ "declarations": [],
31
+ "exports": [
32
+ {
33
+ "kind": "js",
34
+ "name": "KRAccordion",
35
+ "declaration": {
36
+ "name": "KRAccordion",
37
+ "module": "./accordion/accordion.js"
38
+ }
39
+ },
40
+ {
41
+ "kind": "js",
42
+ "name": "KRAlert",
43
+ "declaration": {
44
+ "name": "KRAlert",
45
+ "module": "./alert.js"
46
+ }
47
+ },
48
+ {
49
+ "kind": "js",
50
+ "name": "KRButton",
51
+ "declaration": {
52
+ "name": "KRButton",
53
+ "module": "./button/button.js"
54
+ }
55
+ },
56
+ {
57
+ "kind": "js",
58
+ "name": "KRCodeDemo",
59
+ "declaration": {
60
+ "name": "KRCodeDemo",
61
+ "module": "./code-demo/code-demo.js"
62
+ }
63
+ },
64
+ {
65
+ "kind": "js",
66
+ "name": "KRContextMenu",
67
+ "declaration": {
68
+ "name": "KRContextMenu",
69
+ "module": "./context-menu/context-menu.js"
70
+ }
71
+ },
72
+ {
73
+ "kind": "js",
74
+ "name": "KRDialog",
75
+ "declaration": {
76
+ "name": "KRDialog",
77
+ "module": "./dialog/dialog.js"
78
+ }
79
+ },
80
+ {
81
+ "kind": "js",
82
+ "name": "DialogRef",
83
+ "declaration": {
84
+ "name": "DialogRef",
85
+ "module": "./dialog/dialog.js"
86
+ }
87
+ },
88
+ {
89
+ "kind": "js",
90
+ "name": "KRTextField",
91
+ "declaration": {
92
+ "name": "KRTextField",
93
+ "module": "./form/index.js"
94
+ }
95
+ }
96
+ ]
97
+ },
98
+ {
99
+ "kind": "javascript-module",
100
+ "path": "dist/krubble.bundled.js",
101
+ "declarations": [
102
+ {
103
+ "kind": "variable",
104
+ "name": "t"
105
+ },
106
+ {
107
+ "kind": "variable",
108
+ "name": "e"
109
+ },
110
+ {
111
+ "kind": "variable",
112
+ "name": "KRAccordion",
113
+ "default": "class KRAccordion extends i$1 { constructor() { super(...arguments); /** * Section header text */ this.header = ''; /** * Whether the accordion is expanded */ this.expanded = false; } toggle() { this.expanded = !this.expanded; } render() { return x ` <div class=\"header\" @click=${this.toggle}> <span class=\"header__title\">${this.header}</span> <svg class=\"header__icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <path d=\"M6 9l6 6 6-6\"/> </svg> </div> <div class=\"content\"> <div class=\"content__inner\"> <div class=\"content__body\"> <slot></slot> </div> </div> </div> `; } }",
114
+ "description": "Accordion component for collapsible content sections.\n\n## Usage\n```html\n<kr-accordion header=\"Basic Information\" expanded>\n <div>Content here</div>\n</kr-accordion>\n```"
115
+ },
116
+ {
117
+ "kind": "variable",
118
+ "name": "KRAlert",
119
+ "default": "class KRAlert extends i$1 { constructor() { super(...arguments); /** * The alert type/severity */ this.type = 'info'; /** * Whether the alert can be dismissed */ this.dismissible = false; /** * Whether the alert is visible */ this.visible = true; } /** Handles dismiss button click */ _handleDismiss() { this.visible = false; this.dispatchEvent(new CustomEvent('dismiss', { bubbles: true, composed: true })); } render() { const icons = { info: x `<svg class=\"icon\" viewBox=\"0 0 20 20\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z\" clip-rule=\"evenodd\"/></svg>`, success: x `<svg class=\"icon\" viewBox=\"0 0 20 20\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z\" clip-rule=\"evenodd\"/></svg>`, warning: x `<svg class=\"icon\" viewBox=\"0 0 20 20\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z\" clip-rule=\"evenodd\"/></svg>`, error: x `<svg class=\"icon\" viewBox=\"0 0 20 20\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z\" clip-rule=\"evenodd\"/></svg>`, }; return x ` <div class=${e$1({ 'alert': true, ['alert--' + this.type]: true, 'alert--hidden': !this.visible })} role=\"alert\" > ${icons[this.type]} <div class=\"content\"> ${this.header ? x `<h4 class=\"header\">${this.header}</h4>` : E} <div class=\"message\"> <slot></slot> </div> </div> ${this.dismissible ? x ` <button class=\"dismiss\" type=\"button\" aria-label=\"Dismiss alert\" @click=${this._handleDismiss} > <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" width=\"16\" height=\"16\"> <path fill-rule=\"evenodd\" d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\" clip-rule=\"evenodd\"/> </svg> </button> ` : E} </div> `; } }",
120
+ "description": "A customizable alert component for displaying important information to users."
121
+ },
122
+ {
123
+ "kind": "variable",
124
+ "name": "KRButton",
125
+ "default": "class KRButton extends i$1 { constructor() { super(...arguments); /** * The button variant style */ this.variant = 'primary'; /** * The button size */ this.size = 'medium'; /** * Whether the button is disabled */ this.disabled = false; } render() { const sizeClass = this.size !== 'medium' ? this.size : ''; return x ` <button part=\"button\" class=\"${this.variant} ${sizeClass}\" ?disabled=${this.disabled} > <slot></slot> </button> `; } }",
126
+ "description": "A customizable button component."
127
+ },
128
+ {
129
+ "kind": "class",
130
+ "description": "",
131
+ "name": "e",
132
+ "members": [
133
+ {
134
+ "kind": "field",
135
+ "name": "_$AU",
136
+ "readonly": true,
137
+ "inheritedFrom": {
138
+ "name": "i",
139
+ "module": "dist/krubble.umd.js"
140
+ }
141
+ },
142
+ {
143
+ "kind": "method",
144
+ "name": "_$AT",
145
+ "parameters": [
146
+ {
147
+ "name": "t"
148
+ },
149
+ {
150
+ "name": "e"
151
+ },
152
+ {
153
+ "name": "i"
154
+ }
155
+ ],
156
+ "inheritedFrom": {
157
+ "name": "i",
158
+ "module": "dist/krubble.umd.js"
159
+ }
160
+ },
161
+ {
162
+ "kind": "method",
163
+ "name": "_$AS",
164
+ "parameters": [
165
+ {
166
+ "name": "t"
167
+ },
168
+ {
169
+ "name": "e"
170
+ }
171
+ ],
172
+ "inheritedFrom": {
173
+ "name": "i",
174
+ "module": "dist/krubble.umd.js"
175
+ }
176
+ }
177
+ ],
178
+ "superclass": {
179
+ "name": "i",
180
+ "module": "dist/krubble.bundled.js"
181
+ },
182
+ "tagName": "t",
183
+ "customElement": true
184
+ },
185
+ {
186
+ "kind": "variable",
187
+ "name": "KRCodeDemo",
188
+ "default": "class KRCodeDemo extends i$1 { constructor() { super(...arguments); this.language = 'html'; this.code = ''; this.activeTab = 'preview'; this.copied = false; } setTab(tab) { this.activeTab = tab; } getHighlightedCode() { if (!this.code) return ''; if (window.Prism && window.Prism.languages[this.language]) { return window.Prism.highlight(this.code, window.Prism.languages[this.language], this.language); } // Fallback: escape HTML and return plain text return this.escapeHtml(this.code); } escapeHtml(text) { const div = document.createElement('div'); div.textContent = text; return div.innerHTML; } async copyCode() { if (!this.code) return; try { await navigator.clipboard.writeText(this.code); this.copied = true; setTimeout(() => { this.copied = false; }, 2000); } catch (err) { console.error('Failed to copy code:', err); } } render() { return x ` <div class=\"tabs\"> <button class=${e$1({ tab: true, 'tab--active': this.activeTab === 'preview' })} @click=${() => this.setTab('preview')} > Preview </button> <button class=${e$1({ tab: true, 'tab--active': this.activeTab === 'code' })} @click=${() => this.setTab('code')} > Code </button> </div> <div class=${e$1({ panel: true, 'panel--active': this.activeTab === 'preview', preview: true })}> <slot name=\"preview\"></slot> </div> <div class=${e$1({ panel: true, 'panel--active': this.activeTab === 'code', 'code-container': true })}> <button class=${e$1({ 'copy-btn': true, 'copy-btn--copied': this.copied })} @click=${this.copyCode} > ${this.copied ? 'Copied!' : 'Copy'} </button> <pre class=\"code\"><code>${o(this.getHighlightedCode())}</code></pre> </div> `; } }",
189
+ "description": "Code demo component with Preview/Code tabs and syntax highlighting.\n\nUsage:\n```html\n<kr-code-demo language=\"html\">\n <div slot=\"preview\">\n <kr-button>Click me</kr-button>\n </div>\n <script slot=\"code\" type=\"text/plain\">\n <kr-button>Click me</kr-button>\n </script>\n</kr-code-demo>\n```\n\nRequires Prism.js to be loaded globally for syntax highlighting."
190
+ },
191
+ {
192
+ "kind": "variable",
193
+ "name": "KRContextMenu",
194
+ "default": "class KRContextMenu extends i$1 { constructor() { super(...arguments); this.items = []; this.resolvePromise = null; this.boundHandleOutsideClick = this.handleOutsideClick.bind(this); this.boundHandleKeyDown = this.handleKeyDown.bind(this); } static async open(options) { // Remove any existing context menu const existing = document.querySelector('kr-context-menu'); if (existing) { existing.remove(); } // Create and position the menu const menu = document.createElement('kr-context-menu'); document.body.appendChild(menu); return menu.show(options); } async show(options) { this.items = options.items; this.style.left = `${options.x}px`; this.style.top = `${options.y}px`; // Adjust position if menu would go off screen await this.updateComplete; const rect = this.getBoundingClientRect(); if (rect.right > window.innerWidth) { this.style.left = `${options.x - rect.width}px`; } if (rect.bottom > window.innerHeight) { this.style.top = `${options.y - rect.height}px`; } // Add event listeners after a microtask to avoid the current event triggering close requestAnimationFrame(() => { document.addEventListener('click', this.boundHandleOutsideClick); document.addEventListener('contextmenu', this.boundHandleOutsideClick); document.addEventListener('keydown', this.boundHandleKeyDown); }); return new Promise((resolve) => { this.resolvePromise = resolve; }); } handleOutsideClick(e) { if (!this.contains(e.target)) { this.close(null); } } handleKeyDown(e) { if (e.key === 'Escape') { this.close(null); } } handleItemClick(item) { if (!item.disabled && !item.divider) { this.close(item); } } close(result) { document.removeEventListener('click', this.boundHandleOutsideClick); document.removeEventListener('contextmenu', this.boundHandleOutsideClick); document.removeEventListener('keydown', this.boundHandleKeyDown); if (this.resolvePromise) { this.resolvePromise(result); this.resolvePromise = null; } this.remove(); } render() { return x ` <div class=\"menu\"> ${this.items.map(item => item.divider ? x `<div class=\"menu__divider\"></div>` : x ` <button class=\"menu__item\" ?disabled=${item.disabled} @click=${() => this.handleItemClick(item)} > ${item.icon ? x `<span class=\"menu__item-icon\">${item.icon}</span>` : null} ${item.label} </button> `)} </div> `; } }",
195
+ "description": "Context menu component that can be opened programmatically.\n\nUsage:\n```ts\nconst result = await ContextMenu.open({\n x: event.clientX,\n y: event.clientY,\n items: [\n { id: 'edit', label: 'Edit Item' },\n { id: 'divider', label: '', divider: true },\n { id: 'add-above', label: 'Add Item Above' },\n { id: 'add-below', label: 'Add Item Below' },\n ]\n});\n\nif (result) {\n console.log('Selected:', result.id);\n}\n```"
196
+ },
197
+ {
198
+ "kind": "class",
199
+ "description": "",
200
+ "name": "DialogRef",
201
+ "members": [
202
+ {
203
+ "kind": "method",
204
+ "name": "close",
205
+ "parameters": [
206
+ {
207
+ "name": "result"
208
+ }
209
+ ]
210
+ },
211
+ {
212
+ "kind": "method",
213
+ "name": "afterClosed"
214
+ },
215
+ {
216
+ "kind": "field",
217
+ "name": "resolvePromise",
218
+ "type": {
219
+ "text": "null"
220
+ },
221
+ "default": "null"
222
+ },
223
+ {
224
+ "kind": "field",
225
+ "name": "dialogElement",
226
+ "type": {
227
+ "text": "null"
228
+ },
229
+ "default": "null"
230
+ },
231
+ {
232
+ "kind": "field",
233
+ "name": "promise",
234
+ "default": "new Promise((resolve) => { this.resolvePromise = resolve; })"
235
+ }
236
+ ]
237
+ },
238
+ {
239
+ "kind": "variable",
240
+ "name": "KRDialog",
241
+ "default": "class KRDialog extends i$1 { constructor() { super(...arguments); this.contentElement = null; this.dialogRef = null; this.boundHandleKeyDown = this.handleKeyDown.bind(this); } static open(component, config) { const existing = document.querySelector('kr-dialog'); if (existing) { existing.remove(); } const dialogRef = new DialogRef(); 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; } dialog.contentElement = content; document.body.appendChild(dialog); document.addEventListener('keydown', dialog.boundHandleKeyDown); return dialogRef; } handleKeyDown(e) { if (e.key === 'Escape') { this.dialogRef?.close(undefined); } } handleBackdropClick(e) { if (e.target.classList.contains('backdrop')) { this.dialogRef?.close(undefined); } } disconnectedCallback() { super.disconnectedCallback(); document.removeEventListener('keydown', this.boundHandleKeyDown); } render() { return x ` <div class=\"backdrop\" @click=${this.handleBackdropClick}></div> <div class=\"dialog\"> ${this.contentElement} </div> `; } }",
242
+ "description": "Generic dialog component that renders a Lit component inside a dialog shell.\n\nUsage:\n```ts\n// Define your dialog content component\nclass EditItemDialog extends LitElement {\n // Injected by KRDialog\n dialogRef: DialogRef<{ label: string }>;\n data: { label: string };\n\n save() {\n this.dialogRef.close({ label: this.label });\n }\n}\n\n// Open the dialog\nconst dialogRef = KRDialog.open(EditItemDialog, {\n data: { label: 'Dashboard' }\n});\n\nconst result = await dialogRef.afterClosed();\nif (result) {\n console.log('Saved:', result.label);\n}\n```"
243
+ },
244
+ {
245
+ "kind": "variable",
246
+ "name": "KRTextField",
247
+ "default": "class KRTextField extends i$1 { constructor() { super(); /** * The input label text */ this.label = ''; /** * The input name for form submission */ this.name = ''; /** * The current value */ this.value = ''; /** * Placeholder text */ this.placeholder = ''; /** * Input type (text, email, password, tel, url, search) */ this.type = 'text'; /** * Whether the field is required */ this.required = false; /** * Whether the field is disabled */ this.disabled = false; /** * Whether the field is readonly */ this.readonly = false; /** * Autocomplete attribute value */ this.autocomplete = ''; /** * Helper text shown below the input */ this.hint = ''; this._touched = false; this._dirty = false; this._internals = this.attachInternals(); } // Form-associated custom element callbacks get form() { return this._internals.form; } get validity() { return this._internals.validity; } get validationMessage() { return this._internals.validationMessage; } get willValidate() { return this._internals.willValidate; } checkValidity() { return this._internals.checkValidity(); } reportValidity() { return this._internals.reportValidity(); } formResetCallback() { this.value = ''; this._touched = false; this._dirty = false; this._internals.setFormValue(''); this._internals.setValidity({}); } formStateRestoreCallback(state) { this.value = state; } _handleInput(e) { this.value = e.target.value; this._dirty = true; this._internals.setFormValue(this.value); this._internals.setValidity(this._input.validity, this._input.validationMessage, this._input); } _handleChange(e) { this.value = e.target.value; this._internals.setFormValue(this.value); } _handleBlur() { this._touched = true; this._internals.setValidity(this._input.validity, this._input.validationMessage, this._input); } render() { let validationMessage = ''; if (this._touched && this._input && !this._input.validity.valid) { validationMessage = this._input.validationMessage; } return x ` <div class=\"wrapper\"> ${this.label ? x ` <label for=\"input\"> ${this.label} ${this.required ? x `<span class=\"required\" aria-hidden=\"true\">*</span>` : ''} </label> ` : ''} <input id=\"input\" type=${this.type} name=${this.name} .value=${l(this.value)} placeholder=${this.placeholder} ?required=${this.required} ?disabled=${this.disabled} ?readonly=${this.readonly} minlength=${this.minlength ?? ''} maxlength=${this.maxlength ?? ''} pattern=${this.pattern ?? ''} autocomplete=${this.autocomplete} @input=${this._handleInput} @change=${this._handleChange} @blur=${this._handleBlur} /> ${validationMessage ? x `<div class=\"validation-message\">${validationMessage}</div>` : this.hint ? x `<div class=\"hint\">${this.hint}</div>` : ''} </div> `; } // Public methods for programmatic control focus() { this._input?.focus(); } blur() { this._input?.blur(); } select() { this._input?.select(); } }",
248
+ "description": "A text field component that works with native browser forms.\n\nUses ElementInternals for form association, allowing the component\nto participate in form submission, validation, and reset.\n\nNative input and change events bubble up from the inner input element."
249
+ }
250
+ ],
251
+ "exports": [
252
+ {
253
+ "kind": "custom-element-definition",
254
+ "name": "t",
255
+ "declaration": {
256
+ "name": "e",
257
+ "module": "dist/krubble.bundled.js"
258
+ }
259
+ },
260
+ {
261
+ "kind": "custom-element-definition",
262
+ "name": "t",
263
+ "declaration": {
264
+ "name": "e",
265
+ "module": "dist/krubble.bundled.js"
266
+ }
267
+ },
268
+ {
269
+ "kind": "js",
270
+ "name": "DialogRef",
271
+ "declaration": {
272
+ "name": "DialogRef",
273
+ "module": "dist/krubble.bundled.js"
274
+ }
275
+ },
276
+ {
277
+ "kind": "js",
278
+ "name": "KRAccordion",
279
+ "declaration": {
280
+ "name": "KRAccordion",
281
+ "module": "dist/krubble.bundled.js"
282
+ }
283
+ },
284
+ {
285
+ "kind": "js",
286
+ "name": "KRAlert",
287
+ "declaration": {
288
+ "name": "KRAlert",
289
+ "module": "dist/krubble.bundled.js"
290
+ }
291
+ },
292
+ {
293
+ "kind": "js",
294
+ "name": "KRButton",
295
+ "declaration": {
296
+ "name": "KRButton",
297
+ "module": "dist/krubble.bundled.js"
298
+ }
299
+ },
300
+ {
301
+ "kind": "js",
302
+ "name": "KRCodeDemo",
303
+ "declaration": {
304
+ "name": "KRCodeDemo",
305
+ "module": "dist/krubble.bundled.js"
306
+ }
307
+ },
308
+ {
309
+ "kind": "js",
310
+ "name": "KRContextMenu",
311
+ "declaration": {
312
+ "name": "KRContextMenu",
313
+ "module": "dist/krubble.bundled.js"
314
+ }
315
+ },
316
+ {
317
+ "kind": "js",
318
+ "name": "KRDialog",
319
+ "declaration": {
320
+ "name": "KRDialog",
321
+ "module": "dist/krubble.bundled.js"
322
+ }
323
+ },
324
+ {
325
+ "kind": "js",
326
+ "name": "KRTextField",
327
+ "declaration": {
328
+ "name": "KRTextField",
329
+ "module": "dist/krubble.bundled.js"
330
+ }
331
+ }
332
+ ]
333
+ },
334
+ {
335
+ "kind": "javascript-module",
336
+ "path": "dist/krubble.bundled.min.js",
337
+ "declarations": [
338
+ {
339
+ "kind": "variable",
340
+ "name": "t",
341
+ "default": "globalThis"
342
+ },
343
+ {
344
+ "kind": "variable",
345
+ "name": "e"
346
+ },
347
+ {
348
+ "kind": "variable",
349
+ "name": "ut",
350
+ "default": "class extends rt{constructor(){super(...arguments),this.header=\"\",this.expanded=!1}toggle(){this.expanded=!this.expanded}render(){return B` <div class=\"header\" @click=${this.toggle}> <span class=\"header__title\">${this.header}</span> <svg class=\"header__icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <path d=\"M6 9l6 6 6-6\"/> </svg> </div> <div class=\"content\"> <div class=\"content__inner\"> <div class=\"content__body\"> <slot></slot> </div> </div> </div> `}}"
351
+ },
352
+ {
353
+ "kind": "variable",
354
+ "name": "xt",
355
+ "default": "class extends rt{constructor(){super(...arguments),this.type=\"info\",this.dismissible=!1,this.visible=!0}_handleDismiss(){this.visible=!1,this.dispatchEvent(new CustomEvent(\"dismiss\",{bubbles:!0,composed:!0}))}render(){const t={info:B`<svg class=\"icon\" viewBox=\"0 0 20 20\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z\" clip-rule=\"evenodd\"/></svg>`,success:B`<svg class=\"icon\" viewBox=\"0 0 20 20\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z\" clip-rule=\"evenodd\"/></svg>`,warning:B`<svg class=\"icon\" viewBox=\"0 0 20 20\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z\" clip-rule=\"evenodd\"/></svg>`,error:B`<svg class=\"icon\" viewBox=\"0 0 20 20\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z\" clip-rule=\"evenodd\"/></svg>`};return B` <div class=${_t({alert:!0,[\"alert--\"+this.type]:!0,\"alert--hidden\":!this.visible})} role=\"alert\" > ${t[this.type]} <div class=\"content\"> ${this.header?B`<h4 class=\"header\">${this.header}</h4>`:q} <div class=\"message\"> <slot></slot> </div> </div> ${this.dismissible?B` <button class=\"dismiss\" type=\"button\" aria-label=\"Dismiss alert\" @click=${this._handleDismiss} > <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" width=\"16\" height=\"16\"> <path fill-rule=\"evenodd\" d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\" clip-rule=\"evenodd\"/> </svg> </button> `:q} </div> `}}"
356
+ },
357
+ {
358
+ "kind": "variable",
359
+ "name": "kt",
360
+ "default": "class extends rt{constructor(){super(...arguments),this.variant=\"primary\",this.size=\"medium\",this.disabled=!1}render(){const t=\"medium\"!==this.size?this.size:\"\";return B` <button part=\"button\" class=\"${this.variant} ${t}\" ?disabled=${this.disabled} > <slot></slot> </button> `}}"
361
+ },
362
+ {
363
+ "kind": "variable",
364
+ "name": "Ct",
365
+ "default": "class extends rt{constructor(){super(...arguments),this.language=\"html\",this.code=\"\",this.activeTab=\"preview\",this.copied=!1}setTab(t){this.activeTab=t}getHighlightedCode(){return this.code?window.Prism&&window.Prism.languages[this.language]?window.Prism.highlight(this.code,window.Prism.languages[this.language],this.language):this.escapeHtml(this.code):\"\"}escapeHtml(t){const e=document.createElement(\"div\");return e.textContent=t,e.innerHTML}async copyCode(){if(this.code)try{await navigator.clipboard.writeText(this.code),this.copied=!0,setTimeout((()=>{this.copied=!1}),2e3)}catch(t){console.error(\"Failed to copy code:\",t)}}render(){return B` <div class=\"tabs\"> <button class=${_t({tab:!0,\"tab--active\":\"preview\"===this.activeTab})} @click=${()=>this.setTab(\"preview\")} > Preview </button> <button class=${_t({tab:!0,\"tab--active\":\"code\"===this.activeTab})} @click=${()=>this.setTab(\"code\")} > Code </button> </div> <div class=${_t({panel:!0,\"panel--active\":\"preview\"===this.activeTab,preview:!0})}> <slot name=\"preview\"></slot> </div> <div class=${_t({panel:!0,\"panel--active\":\"code\"===this.activeTab,\"code-container\":!0})}> <button class=${_t({\"copy-btn\":!0,\"copy-btn--copied\":this.copied})} @click=${this.copyCode} > ${this.copied?\"Copied!\":\"Copy\"} </button> <pre class=\"code\"><code>${Et(this.getHighlightedCode())}</code></pre> </div> `}}"
366
+ },
367
+ {
368
+ "kind": "variable",
369
+ "name": "Ot",
370
+ "default": "class extends rt{constructor(){super(...arguments),this.items=[],this.resolvePromise=null,this.boundHandleOutsideClick=this.handleOutsideClick.bind(this),this.boundHandleKeyDown=this.handleKeyDown.bind(this)}static async open(t){const e=document.querySelector(\"kr-context-menu\");e&&e.remove();const i=document.createElement(\"kr-context-menu\");return document.body.appendChild(i),i.show(t)}async show(t){this.items=t.items,this.style.left=`${t.x}px`,this.style.top=`${t.y}px`,await this.updateComplete;const e=this.getBoundingClientRect();return e.right>window.innerWidth&&(this.style.left=t.x-e.width+\"px\"),e.bottom>window.innerHeight&&(this.style.top=t.y-e.height+\"px\"),requestAnimationFrame((()=>{document.addEventListener(\"click\",this.boundHandleOutsideClick),document.addEventListener(\"contextmenu\",this.boundHandleOutsideClick),document.addEventListener(\"keydown\",this.boundHandleKeyDown)})),new Promise((t=>{this.resolvePromise=t}))}handleOutsideClick(t){this.contains(t.target)||this.close(null)}handleKeyDown(t){\"Escape\"===t.key&&this.close(null)}handleItemClick(t){t.disabled||t.divider||this.close(t)}close(t){document.removeEventListener(\"click\",this.boundHandleOutsideClick),document.removeEventListener(\"contextmenu\",this.boundHandleOutsideClick),document.removeEventListener(\"keydown\",this.boundHandleKeyDown),this.resolvePromise&&(this.resolvePromise(t),this.resolvePromise=null),this.remove()}render(){return B` <div class=\"menu\"> ${this.items.map((t=>t.divider?B`<div class=\"menu__divider\"></div>`:B` <button class=\"menu__item\" ?disabled=${t.disabled} @click=${()=>this.handleItemClick(t)} > ${t.icon?B`<span class=\"menu__item-icon\">${t.icon}</span>`:null} ${t.label} </button> `))} </div> `}}"
371
+ },
372
+ {
373
+ "kind": "class",
374
+ "description": "",
375
+ "name": "Mt",
376
+ "members": [
377
+ {
378
+ "kind": "method",
379
+ "name": "setDialogElement",
380
+ "parameters": [
381
+ {
382
+ "name": "t"
383
+ }
384
+ ]
385
+ },
386
+ {
387
+ "kind": "method",
388
+ "name": "close",
389
+ "parameters": [
390
+ {
391
+ "name": "t"
392
+ }
393
+ ]
394
+ },
395
+ {
396
+ "kind": "method",
397
+ "name": "afterClosed"
398
+ },
399
+ {
400
+ "kind": "field",
401
+ "name": "resolvePromise",
402
+ "type": {
403
+ "text": "null"
404
+ },
405
+ "default": "null"
406
+ },
407
+ {
408
+ "kind": "field",
409
+ "name": "dialogElement",
410
+ "type": {
411
+ "text": "null"
412
+ },
413
+ "default": "null"
414
+ },
415
+ {
416
+ "kind": "field",
417
+ "name": "promise",
418
+ "default": "new Promise((t=>{this.resolvePromise=t}))"
419
+ }
420
+ ]
421
+ },
422
+ {
423
+ "kind": "variable",
424
+ "name": "Ht",
425
+ "default": "class extends rt{constructor(){super(...arguments),this.contentElement=null,this.dialogRef=null,this.boundHandleKeyDown=this.handleKeyDown.bind(this)}static open(t,e){const i=document.querySelector(\"kr-dialog\");i&&i.remove();const o=new Mt,s=document.createElement(\"kr-dialog\");o.setDialogElement(s),s.dialogRef=o;const r=new t;return r.dialogRef=o,e?.data&&(r.data=e.data),s.contentElement=r,document.body.appendChild(s),document.addEventListener(\"keydown\",s.boundHandleKeyDown),o}handleKeyDown(t){\"Escape\"===t.key&&this.dialogRef?.close(void 0)}handleBackdropClick(t){t.target.classList.contains(\"backdrop\")&&this.dialogRef?.close(void 0)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(\"keydown\",this.boundHandleKeyDown)}render(){return B` <div class=\"backdrop\" @click=${this.handleBackdropClick}></div> <div class=\"dialog\"> ${this.contentElement} </div> `}}"
426
+ },
427
+ {
428
+ "kind": "variable",
429
+ "name": "zt",
430
+ "default": "class extends rt{constructor(){super(),this.label=\"\",this.name=\"\",this.value=\"\",this.placeholder=\"\",this.type=\"text\",this.required=!1,this.disabled=!1,this.readonly=!1,this.autocomplete=\"\",this.hint=\"\",this._touched=!1,this._dirty=!1,this._internals=this.attachInternals()}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}formResetCallback(){this.value=\"\",this._touched=!1,this._dirty=!1,this._internals.setFormValue(\"\"),this._internals.setValidity({})}formStateRestoreCallback(t){this.value=t}_handleInput(t){this.value=t.target.value,this._dirty=!0,this._internals.setFormValue(this.value),this._internals.setValidity(this._input.validity,this._input.validationMessage,this._input)}_handleChange(t){this.value=t.target.value,this._internals.setFormValue(this.value)}_handleBlur(){this._touched=!0,this._internals.setValidity(this._input.validity,this._input.validationMessage,this._input)}render(){let t=\"\";return this._touched&&this._input&&!this._input.validity.valid&&(t=this._input.validationMessage),B` <div class=\"wrapper\"> ${this.label?B` <label for=\"input\"> ${this.label} ${this.required?B`<span class=\"required\" aria-hidden=\"true\">*</span>`:\"\"} </label> `:\"\"} <input id=\"input\" type=${this.type} name=${this.name} .value=${jt(this.value)} placeholder=${this.placeholder} ?required=${this.required} ?disabled=${this.disabled} ?readonly=${this.readonly} minlength=${this.minlength??\"\"} maxlength=${this.maxlength??\"\"} pattern=${this.pattern??\"\"} autocomplete=${this.autocomplete} @input=${this._handleInput} @change=${this._handleChange} @blur=${this._handleBlur} /> ${t?B`<div class=\"validation-message\">${t}</div>`:this.hint?B`<div class=\"hint\">${this.hint}</div>`:\"\"} </div> `}focus(){this._input?.focus()}blur(){this._input?.blur()}select(){this._input?.select()}}"
431
+ }
432
+ ],
433
+ "exports": [
434
+ {
435
+ "kind": "custom-element-definition",
436
+ "name": "t",
437
+ "declaration": {
438
+ "name": "e",
439
+ "module": "dist/krubble.bundled.min.js"
440
+ }
441
+ },
442
+ {
443
+ "kind": "custom-element-definition",
444
+ "name": "t",
445
+ "declaration": {
446
+ "name": "e",
447
+ "module": "dist/krubble.bundled.min.js"
448
+ }
449
+ },
450
+ {
451
+ "kind": "js",
452
+ "name": "DialogRef",
453
+ "declaration": {
454
+ "name": "Mt",
455
+ "module": "dist/krubble.bundled.min.js"
456
+ }
457
+ },
458
+ {
459
+ "kind": "js",
460
+ "name": "KRAccordion",
461
+ "declaration": {
462
+ "name": "ut",
463
+ "module": "dist/krubble.bundled.min.js"
464
+ }
465
+ },
466
+ {
467
+ "kind": "js",
468
+ "name": "KRAlert",
469
+ "declaration": {
470
+ "name": "xt",
471
+ "module": "dist/krubble.bundled.min.js"
472
+ }
473
+ },
474
+ {
475
+ "kind": "js",
476
+ "name": "KRButton",
477
+ "declaration": {
478
+ "name": "kt",
479
+ "module": "dist/krubble.bundled.min.js"
480
+ }
481
+ },
482
+ {
483
+ "kind": "js",
484
+ "name": "KRCodeDemo",
485
+ "declaration": {
486
+ "name": "Ct",
487
+ "module": "dist/krubble.bundled.min.js"
488
+ }
489
+ },
490
+ {
491
+ "kind": "js",
492
+ "name": "KRContextMenu",
493
+ "declaration": {
494
+ "name": "Ot",
495
+ "module": "dist/krubble.bundled.min.js"
496
+ }
497
+ },
498
+ {
499
+ "kind": "js",
500
+ "name": "KRDialog",
501
+ "declaration": {
502
+ "name": "Ht",
503
+ "module": "dist/krubble.bundled.min.js"
504
+ }
505
+ },
506
+ {
507
+ "kind": "js",
508
+ "name": "KRTextField",
509
+ "declaration": {
510
+ "name": "zt",
511
+ "module": "dist/krubble.bundled.min.js"
512
+ }
513
+ }
514
+ ]
515
+ },
516
+ {
517
+ "kind": "javascript-module",
518
+ "path": "dist/krubble.umd.js",
519
+ "declarations": [
520
+ {
521
+ "kind": "variable",
522
+ "name": "t"
523
+ },
524
+ {
525
+ "kind": "variable",
526
+ "name": "e"
527
+ },
528
+ {
529
+ "kind": "class",
530
+ "description": "",
531
+ "name": "e",
532
+ "members": [
533
+ {
534
+ "kind": "field",
535
+ "name": "_$AU",
536
+ "readonly": true,
537
+ "inheritedFrom": {
538
+ "name": "i",
539
+ "module": "dist/krubble.umd.js"
540
+ }
541
+ },
542
+ {
543
+ "kind": "method",
544
+ "name": "_$AT",
545
+ "parameters": [
546
+ {
547
+ "name": "t"
548
+ },
549
+ {
550
+ "name": "e"
551
+ },
552
+ {
553
+ "name": "i"
554
+ }
555
+ ],
556
+ "inheritedFrom": {
557
+ "name": "i",
558
+ "module": "dist/krubble.umd.js"
559
+ }
560
+ },
561
+ {
562
+ "kind": "method",
563
+ "name": "_$AS",
564
+ "parameters": [
565
+ {
566
+ "name": "t"
567
+ },
568
+ {
569
+ "name": "e"
570
+ }
571
+ ],
572
+ "inheritedFrom": {
573
+ "name": "i",
574
+ "module": "dist/krubble.umd.js"
575
+ }
576
+ }
577
+ ],
578
+ "superclass": {
579
+ "name": "i",
580
+ "module": "dist/krubble.umd.js"
581
+ },
582
+ "tagName": "t",
583
+ "customElement": true
584
+ }
585
+ ],
586
+ "exports": [
587
+ {
588
+ "kind": "custom-element-definition",
589
+ "name": "t",
590
+ "declaration": {
591
+ "name": "e",
592
+ "module": "dist/krubble.umd.js"
593
+ }
594
+ },
595
+ {
596
+ "kind": "custom-element-definition",
597
+ "name": "t",
598
+ "declaration": {
599
+ "name": "e",
600
+ "module": "dist/krubble.umd.js"
601
+ }
602
+ }
603
+ ]
604
+ },
605
+ {
606
+ "kind": "javascript-module",
607
+ "path": "dist/krubble.umd.min.js",
608
+ "declarations": [
609
+ {
610
+ "kind": "variable",
611
+ "name": "t",
612
+ "default": "globalThis"
613
+ },
614
+ {
615
+ "kind": "variable",
616
+ "name": "e"
617
+ }
618
+ ],
619
+ "exports": [
620
+ {
621
+ "kind": "custom-element-definition",
622
+ "name": "e",
623
+ "declaration": {
624
+ "name": "t",
625
+ "module": "dist/krubble.umd.min.js"
626
+ }
627
+ },
628
+ {
629
+ "kind": "custom-element-definition",
630
+ "name": "e",
631
+ "declaration": {
632
+ "name": "t",
633
+ "module": "dist/krubble.umd.min.js"
634
+ }
635
+ }
636
+ ]
637
+ },
638
+ {
639
+ "kind": "javascript-module",
640
+ "path": "src/alert.ts",
641
+ "declarations": [
642
+ {
643
+ "kind": "class",
644
+ "description": "A customizable alert component for displaying important information to users.",
645
+ "name": "KRAlert",
646
+ "slots": [
647
+ {
648
+ "description": "The alert message content",
649
+ "name": ""
650
+ }
651
+ ],
652
+ "members": [
653
+ {
654
+ "kind": "field",
655
+ "name": "type",
656
+ "type": {
657
+ "text": "'info' | 'success' | 'warning' | 'error'"
658
+ },
659
+ "default": "'info'",
660
+ "description": "The alert type/severity",
661
+ "attribute": "type"
662
+ },
663
+ {
664
+ "kind": "field",
665
+ "name": "header",
666
+ "type": {
667
+ "text": "string | undefined"
668
+ },
669
+ "description": "Optional header text",
670
+ "attribute": "header"
671
+ },
672
+ {
673
+ "kind": "field",
674
+ "name": "dismissible",
675
+ "type": {
676
+ "text": "boolean"
677
+ },
678
+ "default": "false",
679
+ "description": "Whether the alert can be dismissed",
680
+ "attribute": "dismissible"
681
+ },
682
+ {
683
+ "kind": "field",
684
+ "name": "visible",
685
+ "type": {
686
+ "text": "boolean"
687
+ },
688
+ "default": "true",
689
+ "description": "Whether the alert is visible",
690
+ "attribute": "visible"
691
+ },
692
+ {
693
+ "kind": "method",
694
+ "name": "_handleDismiss",
695
+ "privacy": "private",
696
+ "description": "Handles dismiss button click"
697
+ }
698
+ ],
699
+ "events": [
700
+ {
701
+ "name": "dismiss",
702
+ "type": {
703
+ "text": "CustomEvent"
704
+ },
705
+ "description": "Fired when the dismiss button is clicked"
706
+ }
707
+ ],
708
+ "attributes": [
709
+ {
710
+ "name": "type",
711
+ "type": {
712
+ "text": "'info' | 'success' | 'warning' | 'error'"
713
+ },
714
+ "default": "'info'",
715
+ "description": "The alert type/severity",
716
+ "fieldName": "type"
717
+ },
718
+ {
719
+ "name": "header",
720
+ "type": {
721
+ "text": "string | undefined"
722
+ },
723
+ "description": "Optional header text",
724
+ "fieldName": "header"
725
+ },
726
+ {
727
+ "name": "dismissible",
728
+ "type": {
729
+ "text": "boolean"
730
+ },
731
+ "default": "false",
732
+ "description": "Whether the alert can be dismissed",
733
+ "fieldName": "dismissible"
734
+ },
735
+ {
736
+ "name": "visible",
737
+ "type": {
738
+ "text": "boolean"
739
+ },
740
+ "default": "true",
741
+ "description": "Whether the alert is visible",
742
+ "fieldName": "visible"
743
+ }
744
+ ],
745
+ "superclass": {
746
+ "name": "LitElement",
747
+ "package": "lit"
748
+ },
749
+ "tagName": "kr-alert",
750
+ "customElement": true
751
+ }
752
+ ],
753
+ "exports": [
754
+ {
755
+ "kind": "js",
756
+ "name": "KRAlert",
757
+ "declaration": {
758
+ "name": "KRAlert",
759
+ "module": "src/alert.ts"
760
+ }
761
+ },
762
+ {
763
+ "kind": "custom-element-definition",
764
+ "name": "kr-alert",
765
+ "declaration": {
766
+ "name": "KRAlert",
767
+ "module": "src/alert.ts"
768
+ }
769
+ }
770
+ ]
771
+ },
772
+ {
773
+ "kind": "javascript-module",
774
+ "path": "src/index.ts",
775
+ "declarations": [],
776
+ "exports": [
777
+ {
778
+ "kind": "js",
779
+ "name": "KRAccordion",
780
+ "declaration": {
781
+ "name": "KRAccordion",
782
+ "module": "./accordion/accordion.js"
783
+ }
784
+ },
785
+ {
786
+ "kind": "js",
787
+ "name": "KRAlert",
788
+ "declaration": {
789
+ "name": "KRAlert",
790
+ "module": "./alert.js"
791
+ }
792
+ },
793
+ {
794
+ "kind": "js",
795
+ "name": "KRButton",
796
+ "declaration": {
797
+ "name": "KRButton",
798
+ "module": "./button/button.js"
799
+ }
800
+ },
801
+ {
802
+ "kind": "js",
803
+ "name": "KRCodeDemo",
804
+ "declaration": {
805
+ "name": "KRCodeDemo",
806
+ "module": "./code-demo/code-demo.js"
807
+ }
808
+ },
809
+ {
810
+ "kind": "js",
811
+ "name": "KRContextMenu",
812
+ "declaration": {
813
+ "name": "KRContextMenu",
814
+ "module": "./context-menu/context-menu.js"
815
+ }
816
+ },
817
+ {
818
+ "kind": "js",
819
+ "name": "KRDialog",
820
+ "declaration": {
821
+ "name": "KRDialog",
822
+ "module": "./dialog/dialog.js"
823
+ }
824
+ },
825
+ {
826
+ "kind": "js",
827
+ "name": "DialogRef",
828
+ "declaration": {
829
+ "name": "DialogRef",
830
+ "module": "./dialog/dialog.js"
831
+ }
832
+ },
833
+ {
834
+ "kind": "js",
835
+ "name": "KRTextField",
836
+ "declaration": {
837
+ "name": "KRTextField",
838
+ "module": "./form/index.js"
839
+ }
840
+ },
841
+ {
842
+ "kind": "js",
843
+ "name": "ContextMenuItem",
844
+ "declaration": {
845
+ "name": "ContextMenuItem",
846
+ "module": "./context-menu/context-menu.js"
847
+ }
848
+ },
849
+ {
850
+ "kind": "js",
851
+ "name": "ContextMenuOptions",
852
+ "declaration": {
853
+ "name": "ContextMenuOptions",
854
+ "module": "./context-menu/context-menu.js"
855
+ }
856
+ },
857
+ {
858
+ "kind": "js",
859
+ "name": "DialogConfig",
860
+ "declaration": {
861
+ "name": "DialogConfig",
862
+ "module": "./dialog/dialog.js"
863
+ }
864
+ }
865
+ ]
866
+ },
867
+ {
868
+ "kind": "javascript-module",
869
+ "path": "dist/accordion/accordion.js",
870
+ "declarations": [
871
+ {
872
+ "kind": "variable",
873
+ "name": "KRAccordion",
874
+ "default": "class KRAccordion extends LitElement { constructor() { super(...arguments); /** * Section header text */ this.header = ''; /** * Whether the accordion is expanded */ this.expanded = false; } toggle() { this.expanded = !this.expanded; } render() { return html ` <div class=\"header\" @click=${this.toggle}> <span class=\"header__title\">${this.header}</span> <svg class=\"header__icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <path d=\"M6 9l6 6 6-6\"/> </svg> </div> <div class=\"content\"> <div class=\"content__inner\"> <div class=\"content__body\"> <slot></slot> </div> </div> </div> `; } }",
875
+ "description": "Accordion component for collapsible content sections.\n\n## Usage\n```html\n<kr-accordion header=\"Basic Information\" expanded>\n <div>Content here</div>\n</kr-accordion>\n```"
876
+ }
877
+ ],
878
+ "exports": [
879
+ {
880
+ "kind": "js",
881
+ "name": "KRAccordion",
882
+ "declaration": {
883
+ "name": "KRAccordion",
884
+ "module": "dist/accordion/accordion.js"
885
+ }
886
+ }
887
+ ]
888
+ },
889
+ {
890
+ "kind": "javascript-module",
891
+ "path": "dist/button/button.js",
892
+ "declarations": [
893
+ {
894
+ "kind": "variable",
895
+ "name": "KRButton",
896
+ "default": "class KRButton extends LitElement { constructor() { super(...arguments); /** * The button variant style */ this.variant = 'primary'; /** * The button size */ this.size = 'medium'; /** * Whether the button is disabled */ this.disabled = false; } render() { const sizeClass = this.size !== 'medium' ? this.size : ''; return html ` <button part=\"button\" class=\"${this.variant} ${sizeClass}\" ?disabled=${this.disabled} > <slot></slot> </button> `; } }",
897
+ "description": "A customizable button component."
898
+ }
899
+ ],
900
+ "exports": [
901
+ {
902
+ "kind": "js",
903
+ "name": "KRButton",
904
+ "declaration": {
905
+ "name": "KRButton",
906
+ "module": "dist/button/button.js"
907
+ }
908
+ }
909
+ ]
910
+ },
911
+ {
912
+ "kind": "javascript-module",
913
+ "path": "dist/code-demo/code-demo.js",
914
+ "declarations": [
915
+ {
916
+ "kind": "variable",
917
+ "name": "KRCodeDemo",
918
+ "default": "class KRCodeDemo extends LitElement { constructor() { super(...arguments); this.language = 'html'; this.code = ''; this.activeTab = 'preview'; this.copied = false; } setTab(tab) { this.activeTab = tab; } getHighlightedCode() { if (!this.code) return ''; if (window.Prism && window.Prism.languages[this.language]) { return window.Prism.highlight(this.code, window.Prism.languages[this.language], this.language); } // Fallback: escape HTML and return plain text return this.escapeHtml(this.code); } escapeHtml(text) { const div = document.createElement('div'); div.textContent = text; return div.innerHTML; } async copyCode() { if (!this.code) return; try { await navigator.clipboard.writeText(this.code); this.copied = true; setTimeout(() => { this.copied = false; }, 2000); } catch (err) { console.error('Failed to copy code:', err); } } render() { return html ` <div class=\"tabs\"> <button class=${classMap({ tab: true, 'tab--active': this.activeTab === 'preview' })} @click=${() => this.setTab('preview')} > Preview </button> <button class=${classMap({ tab: true, 'tab--active': this.activeTab === 'code' })} @click=${() => this.setTab('code')} > Code </button> </div> <div class=${classMap({ panel: true, 'panel--active': this.activeTab === 'preview', preview: true })}> <slot name=\"preview\"></slot> </div> <div class=${classMap({ panel: true, 'panel--active': this.activeTab === 'code', 'code-container': true })}> <button class=${classMap({ 'copy-btn': true, 'copy-btn--copied': this.copied })} @click=${this.copyCode} > ${this.copied ? 'Copied!' : 'Copy'} </button> <pre class=\"code\"><code>${unsafeHTML(this.getHighlightedCode())}</code></pre> </div> `; } }",
919
+ "description": "Code demo component with Preview/Code tabs and syntax highlighting.\n\nUsage:\n```html\n<kr-code-demo language=\"html\">\n <div slot=\"preview\">\n <kr-button>Click me</kr-button>\n </div>\n <script slot=\"code\" type=\"text/plain\">\n <kr-button>Click me</kr-button>\n </script>\n</kr-code-demo>\n```\n\nRequires Prism.js to be loaded globally for syntax highlighting."
920
+ }
921
+ ],
922
+ "exports": [
923
+ {
924
+ "kind": "js",
925
+ "name": "KRCodeDemo",
926
+ "declaration": {
927
+ "name": "KRCodeDemo",
928
+ "module": "dist/code-demo/code-demo.js"
929
+ }
930
+ }
931
+ ]
932
+ },
933
+ {
934
+ "kind": "javascript-module",
935
+ "path": "dist/context-menu/context-menu.js",
936
+ "declarations": [
937
+ {
938
+ "kind": "variable",
939
+ "name": "KRContextMenu",
940
+ "default": "class KRContextMenu extends LitElement { constructor() { super(...arguments); this.items = []; this.resolvePromise = null; this.boundHandleOutsideClick = this.handleOutsideClick.bind(this); this.boundHandleKeyDown = this.handleKeyDown.bind(this); } static async open(options) { // Remove any existing context menu const existing = document.querySelector('kr-context-menu'); if (existing) { existing.remove(); } // Create and position the menu const menu = document.createElement('kr-context-menu'); document.body.appendChild(menu); return menu.show(options); } async show(options) { this.items = options.items; this.style.left = `${options.x}px`; this.style.top = `${options.y}px`; // Adjust position if menu would go off screen await this.updateComplete; const rect = this.getBoundingClientRect(); if (rect.right > window.innerWidth) { this.style.left = `${options.x - rect.width}px`; } if (rect.bottom > window.innerHeight) { this.style.top = `${options.y - rect.height}px`; } // Add event listeners after a microtask to avoid the current event triggering close requestAnimationFrame(() => { document.addEventListener('click', this.boundHandleOutsideClick); document.addEventListener('contextmenu', this.boundHandleOutsideClick); document.addEventListener('keydown', this.boundHandleKeyDown); }); return new Promise((resolve) => { this.resolvePromise = resolve; }); } handleOutsideClick(e) { if (!this.contains(e.target)) { this.close(null); } } handleKeyDown(e) { if (e.key === 'Escape') { this.close(null); } } handleItemClick(item) { if (!item.disabled && !item.divider) { this.close(item); } } close(result) { document.removeEventListener('click', this.boundHandleOutsideClick); document.removeEventListener('contextmenu', this.boundHandleOutsideClick); document.removeEventListener('keydown', this.boundHandleKeyDown); if (this.resolvePromise) { this.resolvePromise(result); this.resolvePromise = null; } this.remove(); } render() { return html ` <div class=\"menu\"> ${this.items.map(item => item.divider ? html `<div class=\"menu__divider\"></div>` : html ` <button class=\"menu__item\" ?disabled=${item.disabled} @click=${() => this.handleItemClick(item)} > ${item.icon ? html `<span class=\"menu__item-icon\">${item.icon}</span>` : null} ${item.label} </button> `)} </div> `; } }",
941
+ "description": "Context menu component that can be opened programmatically.\n\nUsage:\n```ts\nconst result = await ContextMenu.open({\n x: event.clientX,\n y: event.clientY,\n items: [\n { id: 'edit', label: 'Edit Item' },\n { id: 'divider', label: '', divider: true },\n { id: 'add-above', label: 'Add Item Above' },\n { id: 'add-below', label: 'Add Item Below' },\n ]\n});\n\nif (result) {\n console.log('Selected:', result.id);\n}\n```"
942
+ }
943
+ ],
944
+ "exports": [
945
+ {
946
+ "kind": "js",
947
+ "name": "KRContextMenu",
948
+ "declaration": {
949
+ "name": "KRContextMenu",
950
+ "module": "dist/context-menu/context-menu.js"
951
+ }
952
+ }
953
+ ]
954
+ },
955
+ {
956
+ "kind": "javascript-module",
957
+ "path": "dist/dialog/dialog.js",
958
+ "declarations": [
959
+ {
960
+ "kind": "class",
961
+ "description": "",
962
+ "name": "DialogRef",
963
+ "members": [
964
+ {
965
+ "kind": "method",
966
+ "name": "close",
967
+ "parameters": [
968
+ {
969
+ "name": "result"
970
+ }
971
+ ]
972
+ },
973
+ {
974
+ "kind": "method",
975
+ "name": "afterClosed"
976
+ },
977
+ {
978
+ "kind": "field",
979
+ "name": "resolvePromise",
980
+ "type": {
981
+ "text": "null"
982
+ },
983
+ "default": "null"
984
+ },
985
+ {
986
+ "kind": "field",
987
+ "name": "dialogElement",
988
+ "type": {
989
+ "text": "null"
990
+ },
991
+ "default": "null"
992
+ },
993
+ {
994
+ "kind": "field",
995
+ "name": "promise",
996
+ "default": "new Promise((resolve) => { this.resolvePromise = resolve; })"
997
+ }
998
+ ]
999
+ },
1000
+ {
1001
+ "kind": "variable",
1002
+ "name": "KRDialog",
1003
+ "default": "class KRDialog extends LitElement { constructor() { super(...arguments); this.contentElement = null; this.dialogRef = null; this.boundHandleKeyDown = this.handleKeyDown.bind(this); } static open(component, config) { const existing = document.querySelector('kr-dialog'); if (existing) { existing.remove(); } const dialogRef = new DialogRef(); 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; } dialog.contentElement = content; document.body.appendChild(dialog); document.addEventListener('keydown', dialog.boundHandleKeyDown); return dialogRef; } handleKeyDown(e) { if (e.key === 'Escape') { this.dialogRef?.close(undefined); } } handleBackdropClick(e) { if (e.target.classList.contains('backdrop')) { this.dialogRef?.close(undefined); } } disconnectedCallback() { super.disconnectedCallback(); document.removeEventListener('keydown', this.boundHandleKeyDown); } render() { return html ` <div class=\"backdrop\" @click=${this.handleBackdropClick}></div> <div class=\"dialog\"> ${this.contentElement} </div> `; } }",
1004
+ "description": "Generic dialog component that renders a Lit component inside a dialog shell.\n\nUsage:\n```ts\n// Define your dialog content component\nclass EditItemDialog extends LitElement {\n // Injected by KRDialog\n dialogRef: DialogRef<{ label: string }>;\n data: { label: string };\n\n save() {\n this.dialogRef.close({ label: this.label });\n }\n}\n\n// Open the dialog\nconst dialogRef = KRDialog.open(EditItemDialog, {\n data: { label: 'Dashboard' }\n});\n\nconst result = await dialogRef.afterClosed();\nif (result) {\n console.log('Saved:', result.label);\n}\n```"
1005
+ }
1006
+ ],
1007
+ "exports": [
1008
+ {
1009
+ "kind": "js",
1010
+ "name": "DialogRef",
1011
+ "declaration": {
1012
+ "name": "DialogRef",
1013
+ "module": "dist/dialog/dialog.js"
1014
+ }
1015
+ },
1016
+ {
1017
+ "kind": "js",
1018
+ "name": "KRDialog",
1019
+ "declaration": {
1020
+ "name": "KRDialog",
1021
+ "module": "dist/dialog/dialog.js"
1022
+ }
1023
+ }
1024
+ ]
1025
+ },
1026
+ {
1027
+ "kind": "javascript-module",
1028
+ "path": "dist/form/index.js",
1029
+ "declarations": [],
1030
+ "exports": [
1031
+ {
1032
+ "kind": "js",
1033
+ "name": "KRTextField",
1034
+ "declaration": {
1035
+ "name": "KRTextField",
1036
+ "module": "./text-field/text-field.js"
1037
+ }
1038
+ }
1039
+ ]
1040
+ },
1041
+ {
1042
+ "kind": "javascript-module",
1043
+ "path": "src/accordion/accordion.ts",
1044
+ "declarations": [
1045
+ {
1046
+ "kind": "class",
1047
+ "description": "Accordion component for collapsible content sections.\n\n## Usage\n```html\n<kr-accordion header=\"Basic Information\" expanded>\n <div>Content here</div>\n</kr-accordion>\n```",
1048
+ "name": "KRAccordion",
1049
+ "slots": [
1050
+ {
1051
+ "description": "The collapsible content",
1052
+ "name": ""
1053
+ }
1054
+ ],
1055
+ "members": [
1056
+ {
1057
+ "kind": "field",
1058
+ "name": "header",
1059
+ "type": {
1060
+ "text": "string"
1061
+ },
1062
+ "default": "''",
1063
+ "description": "Section header text",
1064
+ "attribute": "header"
1065
+ },
1066
+ {
1067
+ "kind": "field",
1068
+ "name": "expanded",
1069
+ "type": {
1070
+ "text": "boolean"
1071
+ },
1072
+ "default": "false",
1073
+ "description": "Whether the accordion is expanded",
1074
+ "attribute": "expanded",
1075
+ "reflects": true
1076
+ },
1077
+ {
1078
+ "kind": "method",
1079
+ "name": "toggle",
1080
+ "privacy": "private"
1081
+ }
1082
+ ],
1083
+ "attributes": [
1084
+ {
1085
+ "name": "header",
1086
+ "type": {
1087
+ "text": "string"
1088
+ },
1089
+ "default": "''",
1090
+ "description": "Section header text",
1091
+ "fieldName": "header"
1092
+ },
1093
+ {
1094
+ "name": "expanded",
1095
+ "type": {
1096
+ "text": "boolean"
1097
+ },
1098
+ "default": "false",
1099
+ "description": "Whether the accordion is expanded",
1100
+ "fieldName": "expanded"
1101
+ }
1102
+ ],
1103
+ "superclass": {
1104
+ "name": "LitElement",
1105
+ "package": "lit"
1106
+ },
1107
+ "tagName": "kr-accordion",
1108
+ "customElement": true
1109
+ }
1110
+ ],
1111
+ "exports": [
1112
+ {
1113
+ "kind": "js",
1114
+ "name": "KRAccordion",
1115
+ "declaration": {
1116
+ "name": "KRAccordion",
1117
+ "module": "src/accordion/accordion.ts"
1118
+ }
1119
+ },
1120
+ {
1121
+ "kind": "custom-element-definition",
1122
+ "name": "kr-accordion",
1123
+ "declaration": {
1124
+ "name": "KRAccordion",
1125
+ "module": "src/accordion/accordion.ts"
1126
+ }
1127
+ }
1128
+ ]
1129
+ },
1130
+ {
1131
+ "kind": "javascript-module",
1132
+ "path": "src/button/button.ts",
1133
+ "declarations": [
1134
+ {
1135
+ "kind": "class",
1136
+ "description": "A customizable button component.",
1137
+ "name": "KRButton",
1138
+ "cssParts": [
1139
+ {
1140
+ "description": "The button element",
1141
+ "name": "button"
1142
+ }
1143
+ ],
1144
+ "slots": [
1145
+ {
1146
+ "description": "The button content",
1147
+ "name": ""
1148
+ }
1149
+ ],
1150
+ "members": [
1151
+ {
1152
+ "kind": "field",
1153
+ "name": "variant",
1154
+ "type": {
1155
+ "text": "'primary' | 'secondary' | 'outline'"
1156
+ },
1157
+ "default": "'primary'",
1158
+ "description": "The button variant style",
1159
+ "attribute": "variant"
1160
+ },
1161
+ {
1162
+ "kind": "field",
1163
+ "name": "size",
1164
+ "type": {
1165
+ "text": "'small' | 'medium' | 'large'"
1166
+ },
1167
+ "default": "'medium'",
1168
+ "description": "The button size",
1169
+ "attribute": "size"
1170
+ },
1171
+ {
1172
+ "kind": "field",
1173
+ "name": "disabled",
1174
+ "type": {
1175
+ "text": "boolean"
1176
+ },
1177
+ "default": "false",
1178
+ "description": "Whether the button is disabled",
1179
+ "attribute": "disabled"
1180
+ }
1181
+ ],
1182
+ "events": [
1183
+ {
1184
+ "description": "Fired when the button is clicked",
1185
+ "name": "click"
1186
+ }
1187
+ ],
1188
+ "attributes": [
1189
+ {
1190
+ "name": "variant",
1191
+ "type": {
1192
+ "text": "'primary' | 'secondary' | 'outline'"
1193
+ },
1194
+ "default": "'primary'",
1195
+ "description": "The button variant style",
1196
+ "fieldName": "variant"
1197
+ },
1198
+ {
1199
+ "name": "size",
1200
+ "type": {
1201
+ "text": "'small' | 'medium' | 'large'"
1202
+ },
1203
+ "default": "'medium'",
1204
+ "description": "The button size",
1205
+ "fieldName": "size"
1206
+ },
1207
+ {
1208
+ "name": "disabled",
1209
+ "type": {
1210
+ "text": "boolean"
1211
+ },
1212
+ "default": "false",
1213
+ "description": "Whether the button is disabled",
1214
+ "fieldName": "disabled"
1215
+ }
1216
+ ],
1217
+ "superclass": {
1218
+ "name": "LitElement",
1219
+ "package": "lit"
1220
+ },
1221
+ "tagName": "kr-button",
1222
+ "customElement": true
1223
+ }
1224
+ ],
1225
+ "exports": [
1226
+ {
1227
+ "kind": "js",
1228
+ "name": "KRButton",
1229
+ "declaration": {
1230
+ "name": "KRButton",
1231
+ "module": "src/button/button.ts"
1232
+ }
1233
+ },
1234
+ {
1235
+ "kind": "custom-element-definition",
1236
+ "name": "kr-button",
1237
+ "declaration": {
1238
+ "name": "KRButton",
1239
+ "module": "src/button/button.ts"
1240
+ }
1241
+ }
1242
+ ]
1243
+ },
1244
+ {
1245
+ "kind": "javascript-module",
1246
+ "path": "src/code-demo/code-demo.ts",
1247
+ "declarations": [
1248
+ {
1249
+ "kind": "class",
1250
+ "description": "Code demo component with Preview/Code tabs and syntax highlighting.\n\nUsage:\n```html\n<kr-code-demo language=\"html\">\n <div slot=\"preview\">\n <kr-button>Click me</kr-button>\n </div>\n <script slot=\"code\" type=\"text/plain\">\n <kr-button>Click me</kr-button>\n </script>\n</kr-code-demo>\n```\n\nRequires Prism.js to be loaded globally for syntax highlighting.",
1251
+ "name": "KRCodeDemo",
1252
+ "members": [
1253
+ {
1254
+ "kind": "field",
1255
+ "name": "language",
1256
+ "type": {
1257
+ "text": "string"
1258
+ },
1259
+ "default": "'html'",
1260
+ "attribute": "language"
1261
+ },
1262
+ {
1263
+ "kind": "field",
1264
+ "name": "code",
1265
+ "type": {
1266
+ "text": "string"
1267
+ },
1268
+ "default": "''",
1269
+ "attribute": "code"
1270
+ },
1271
+ {
1272
+ "kind": "field",
1273
+ "name": "activeTab",
1274
+ "type": {
1275
+ "text": "'preview' | 'code'"
1276
+ },
1277
+ "privacy": "private",
1278
+ "default": "'preview'"
1279
+ },
1280
+ {
1281
+ "kind": "field",
1282
+ "name": "copied",
1283
+ "type": {
1284
+ "text": "boolean"
1285
+ },
1286
+ "privacy": "private",
1287
+ "default": "false"
1288
+ },
1289
+ {
1290
+ "kind": "method",
1291
+ "name": "setTab",
1292
+ "privacy": "private",
1293
+ "parameters": [
1294
+ {
1295
+ "name": "tab",
1296
+ "type": {
1297
+ "text": "'preview' | 'code'"
1298
+ }
1299
+ }
1300
+ ]
1301
+ },
1302
+ {
1303
+ "kind": "method",
1304
+ "name": "getHighlightedCode",
1305
+ "privacy": "private",
1306
+ "return": {
1307
+ "type": {
1308
+ "text": "string"
1309
+ }
1310
+ }
1311
+ },
1312
+ {
1313
+ "kind": "method",
1314
+ "name": "escapeHtml",
1315
+ "privacy": "private",
1316
+ "return": {
1317
+ "type": {
1318
+ "text": "string"
1319
+ }
1320
+ },
1321
+ "parameters": [
1322
+ {
1323
+ "name": "text",
1324
+ "type": {
1325
+ "text": "string"
1326
+ }
1327
+ }
1328
+ ]
1329
+ },
1330
+ {
1331
+ "kind": "method",
1332
+ "name": "copyCode",
1333
+ "privacy": "private"
1334
+ }
1335
+ ],
1336
+ "attributes": [
1337
+ {
1338
+ "name": "language",
1339
+ "type": {
1340
+ "text": "string"
1341
+ },
1342
+ "default": "'html'",
1343
+ "fieldName": "language"
1344
+ },
1345
+ {
1346
+ "name": "code",
1347
+ "type": {
1348
+ "text": "string"
1349
+ },
1350
+ "default": "''",
1351
+ "fieldName": "code"
1352
+ }
1353
+ ],
1354
+ "superclass": {
1355
+ "name": "LitElement",
1356
+ "package": "lit"
1357
+ },
1358
+ "tagName": "kr-code-demo",
1359
+ "customElement": true
1360
+ }
1361
+ ],
1362
+ "exports": [
1363
+ {
1364
+ "kind": "js",
1365
+ "name": "KRCodeDemo",
1366
+ "declaration": {
1367
+ "name": "KRCodeDemo",
1368
+ "module": "src/code-demo/code-demo.ts"
1369
+ }
1370
+ },
1371
+ {
1372
+ "kind": "custom-element-definition",
1373
+ "name": "kr-code-demo",
1374
+ "declaration": {
1375
+ "name": "KRCodeDemo",
1376
+ "module": "src/code-demo/code-demo.ts"
1377
+ }
1378
+ }
1379
+ ]
1380
+ },
1381
+ {
1382
+ "kind": "javascript-module",
1383
+ "path": "src/context-menu/context-menu.ts",
1384
+ "declarations": [
1385
+ {
1386
+ "kind": "class",
1387
+ "description": "Context menu component that can be opened programmatically.\n\nUsage:\n```ts\nconst result = await ContextMenu.open({\n x: event.clientX,\n y: event.clientY,\n items: [\n { id: 'edit', label: 'Edit Item' },\n { id: 'divider', label: '', divider: true },\n { id: 'add-above', label: 'Add Item Above' },\n { id: 'add-below', label: 'Add Item Below' },\n ]\n});\n\nif (result) {\n console.log('Selected:', result.id);\n}\n```",
1388
+ "name": "KRContextMenu",
1389
+ "members": [
1390
+ {
1391
+ "kind": "field",
1392
+ "name": "items",
1393
+ "type": {
1394
+ "text": "ContextMenuItem[]"
1395
+ },
1396
+ "privacy": "private",
1397
+ "default": "[]"
1398
+ },
1399
+ {
1400
+ "kind": "field",
1401
+ "name": "resolvePromise",
1402
+ "type": {
1403
+ "text": "((value: ContextMenuItem | null) => void) | null"
1404
+ },
1405
+ "privacy": "private",
1406
+ "default": "null"
1407
+ },
1408
+ {
1409
+ "kind": "field",
1410
+ "name": "boundHandleOutsideClick",
1411
+ "privacy": "private"
1412
+ },
1413
+ {
1414
+ "kind": "field",
1415
+ "name": "boundHandleKeyDown",
1416
+ "privacy": "private"
1417
+ },
1418
+ {
1419
+ "kind": "method",
1420
+ "name": "open",
1421
+ "static": true,
1422
+ "return": {
1423
+ "type": {
1424
+ "text": "Promise<ContextMenuItem | null>"
1425
+ }
1426
+ },
1427
+ "parameters": [
1428
+ {
1429
+ "name": "options",
1430
+ "type": {
1431
+ "text": "ContextMenuOptions"
1432
+ }
1433
+ }
1434
+ ]
1435
+ },
1436
+ {
1437
+ "kind": "method",
1438
+ "name": "show",
1439
+ "return": {
1440
+ "type": {
1441
+ "text": "Promise<ContextMenuItem | null>"
1442
+ }
1443
+ },
1444
+ "parameters": [
1445
+ {
1446
+ "name": "options",
1447
+ "type": {
1448
+ "text": "ContextMenuOptions"
1449
+ }
1450
+ }
1451
+ ]
1452
+ },
1453
+ {
1454
+ "kind": "method",
1455
+ "name": "handleOutsideClick",
1456
+ "privacy": "private",
1457
+ "parameters": [
1458
+ {
1459
+ "name": "e",
1460
+ "type": {
1461
+ "text": "Event"
1462
+ }
1463
+ }
1464
+ ]
1465
+ },
1466
+ {
1467
+ "kind": "method",
1468
+ "name": "handleKeyDown",
1469
+ "privacy": "private",
1470
+ "parameters": [
1471
+ {
1472
+ "name": "e",
1473
+ "type": {
1474
+ "text": "KeyboardEvent"
1475
+ }
1476
+ }
1477
+ ]
1478
+ },
1479
+ {
1480
+ "kind": "method",
1481
+ "name": "handleItemClick",
1482
+ "privacy": "private",
1483
+ "parameters": [
1484
+ {
1485
+ "name": "item",
1486
+ "type": {
1487
+ "text": "ContextMenuItem"
1488
+ }
1489
+ }
1490
+ ]
1491
+ },
1492
+ {
1493
+ "kind": "method",
1494
+ "name": "close",
1495
+ "privacy": "private",
1496
+ "parameters": [
1497
+ {
1498
+ "name": "result",
1499
+ "type": {
1500
+ "text": "ContextMenuItem | null"
1501
+ }
1502
+ }
1503
+ ]
1504
+ }
1505
+ ],
1506
+ "superclass": {
1507
+ "name": "LitElement",
1508
+ "package": "lit"
1509
+ },
1510
+ "tagName": "kr-context-menu",
1511
+ "customElement": true
1512
+ }
1513
+ ],
1514
+ "exports": [
1515
+ {
1516
+ "kind": "js",
1517
+ "name": "KRContextMenu",
1518
+ "declaration": {
1519
+ "name": "KRContextMenu",
1520
+ "module": "src/context-menu/context-menu.ts"
1521
+ }
1522
+ },
1523
+ {
1524
+ "kind": "custom-element-definition",
1525
+ "name": "kr-context-menu",
1526
+ "declaration": {
1527
+ "name": "KRContextMenu",
1528
+ "module": "src/context-menu/context-menu.ts"
1529
+ }
1530
+ }
1531
+ ]
1532
+ },
1533
+ {
1534
+ "kind": "javascript-module",
1535
+ "path": "src/dialog/dialog.ts",
1536
+ "declarations": [
1537
+ {
1538
+ "kind": "class",
1539
+ "description": "",
1540
+ "name": "DialogRef",
1541
+ "members": [
1542
+ {
1543
+ "kind": "field",
1544
+ "name": "resolvePromise",
1545
+ "type": {
1546
+ "text": "((value: R | undefined) => void) | null"
1547
+ },
1548
+ "privacy": "private",
1549
+ "default": "null"
1550
+ },
1551
+ {
1552
+ "kind": "field",
1553
+ "name": "promise",
1554
+ "type": {
1555
+ "text": "Promise<R | undefined>"
1556
+ },
1557
+ "privacy": "private",
1558
+ "default": "new Promise((resolve) => { this.resolvePromise = resolve; })"
1559
+ },
1560
+ {
1561
+ "kind": "field",
1562
+ "name": "dialogElement",
1563
+ "type": {
1564
+ "text": "KRDialog | null"
1565
+ },
1566
+ "privacy": "private",
1567
+ "default": "null"
1568
+ },
1569
+ {
1570
+ "kind": "method",
1571
+ "name": "close",
1572
+ "parameters": [
1573
+ {
1574
+ "name": "result",
1575
+ "optional": true,
1576
+ "type": {
1577
+ "text": "R"
1578
+ }
1579
+ }
1580
+ ]
1581
+ },
1582
+ {
1583
+ "kind": "method",
1584
+ "name": "afterClosed",
1585
+ "return": {
1586
+ "type": {
1587
+ "text": "Promise<R | undefined>"
1588
+ }
1589
+ }
1590
+ }
1591
+ ]
1592
+ },
1593
+ {
1594
+ "kind": "class",
1595
+ "description": "Generic dialog component that renders a Lit component inside a dialog shell.\n\nUsage:\n```ts\n// Define your dialog content component\nclass EditItemDialog extends LitElement {\n // Injected by KRDialog\n dialogRef: DialogRef<{ label: string }>;\n data: { label: string };\n\n save() {\n this.dialogRef.close({ label: this.label });\n }\n}\n\n// Open the dialog\nconst dialogRef = KRDialog.open(EditItemDialog, {\n data: { label: 'Dashboard' }\n});\n\nconst result = await dialogRef.afterClosed();\nif (result) {\n console.log('Saved:', result.label);\n}\n```",
1596
+ "name": "KRDialog",
1597
+ "members": [
1598
+ {
1599
+ "kind": "field",
1600
+ "name": "contentElement",
1601
+ "type": {
1602
+ "text": "LitElement | null"
1603
+ },
1604
+ "privacy": "private",
1605
+ "default": "null"
1606
+ },
1607
+ {
1608
+ "kind": "field",
1609
+ "name": "dialogRef",
1610
+ "type": {
1611
+ "text": "DialogRef | null"
1612
+ },
1613
+ "privacy": "private",
1614
+ "default": "null"
1615
+ },
1616
+ {
1617
+ "kind": "field",
1618
+ "name": "boundHandleKeyDown",
1619
+ "privacy": "private"
1620
+ },
1621
+ {
1622
+ "kind": "method",
1623
+ "name": "open",
1624
+ "static": true,
1625
+ "return": {
1626
+ "type": {
1627
+ "text": "DialogRef"
1628
+ }
1629
+ },
1630
+ "parameters": [
1631
+ {
1632
+ "name": "component",
1633
+ "type": {
1634
+ "text": "new () => LitElement"
1635
+ }
1636
+ },
1637
+ {
1638
+ "name": "config",
1639
+ "optional": true,
1640
+ "type": {
1641
+ "text": "DialogConfig"
1642
+ }
1643
+ }
1644
+ ]
1645
+ },
1646
+ {
1647
+ "kind": "method",
1648
+ "name": "handleKeyDown",
1649
+ "privacy": "private",
1650
+ "parameters": [
1651
+ {
1652
+ "name": "e",
1653
+ "type": {
1654
+ "text": "KeyboardEvent"
1655
+ }
1656
+ }
1657
+ ]
1658
+ },
1659
+ {
1660
+ "kind": "method",
1661
+ "name": "handleBackdropClick",
1662
+ "privacy": "private",
1663
+ "parameters": [
1664
+ {
1665
+ "name": "e",
1666
+ "type": {
1667
+ "text": "Event"
1668
+ }
1669
+ }
1670
+ ]
1671
+ }
1672
+ ],
1673
+ "superclass": {
1674
+ "name": "LitElement",
1675
+ "package": "lit"
1676
+ },
1677
+ "tagName": "kr-dialog",
1678
+ "customElement": true
1679
+ }
1680
+ ],
1681
+ "exports": [
1682
+ {
1683
+ "kind": "js",
1684
+ "name": "DialogRef",
1685
+ "declaration": {
1686
+ "name": "DialogRef",
1687
+ "module": "src/dialog/dialog.ts"
1688
+ }
1689
+ },
1690
+ {
1691
+ "kind": "js",
1692
+ "name": "KRDialog",
1693
+ "declaration": {
1694
+ "name": "KRDialog",
1695
+ "module": "src/dialog/dialog.ts"
1696
+ }
1697
+ },
1698
+ {
1699
+ "kind": "custom-element-definition",
1700
+ "name": "kr-dialog",
1701
+ "declaration": {
1702
+ "name": "KRDialog",
1703
+ "module": "src/dialog/dialog.ts"
1704
+ }
1705
+ }
1706
+ ]
1707
+ },
1708
+ {
1709
+ "kind": "javascript-module",
1710
+ "path": "src/form/index.ts",
1711
+ "declarations": [],
1712
+ "exports": [
1713
+ {
1714
+ "kind": "js",
1715
+ "name": "KRTextField",
1716
+ "declaration": {
1717
+ "name": "KRTextField",
1718
+ "module": "./text-field/text-field.js"
1719
+ }
1720
+ }
1721
+ ]
1722
+ },
1723
+ {
1724
+ "kind": "javascript-module",
1725
+ "path": "dist/form/text-field/text-field.js",
1726
+ "declarations": [
1727
+ {
1728
+ "kind": "variable",
1729
+ "name": "KRTextField",
1730
+ "default": "class KRTextField extends LitElement { constructor() { super(); /** * The input label text */ this.label = ''; /** * The input name for form submission */ this.name = ''; /** * The current value */ this.value = ''; /** * Placeholder text */ this.placeholder = ''; /** * Input type (text, email, password, tel, url, search) */ this.type = 'text'; /** * Whether the field is required */ this.required = false; /** * Whether the field is disabled */ this.disabled = false; /** * Whether the field is readonly */ this.readonly = false; /** * Autocomplete attribute value */ this.autocomplete = ''; /** * Helper text shown below the input */ this.hint = ''; this._touched = false; this._dirty = false; this._internals = this.attachInternals(); } // Form-associated custom element callbacks get form() { return this._internals.form; } get validity() { return this._internals.validity; } get validationMessage() { return this._internals.validationMessage; } get willValidate() { return this._internals.willValidate; } checkValidity() { return this._internals.checkValidity(); } reportValidity() { return this._internals.reportValidity(); } formResetCallback() { this.value = ''; this._touched = false; this._dirty = false; this._internals.setFormValue(''); this._internals.setValidity({}); } formStateRestoreCallback(state) { this.value = state; } _handleInput(e) { this.value = e.target.value; this._dirty = true; this._internals.setFormValue(this.value); this._internals.setValidity(this._input.validity, this._input.validationMessage, this._input); } _handleChange(e) { this.value = e.target.value; this._internals.setFormValue(this.value); } _handleBlur() { this._touched = true; this._internals.setValidity(this._input.validity, this._input.validationMessage, this._input); } render() { let validationMessage = ''; if (this._touched && this._input && !this._input.validity.valid) { validationMessage = this._input.validationMessage; } return html ` <div class=\"wrapper\"> ${this.label ? html ` <label for=\"input\"> ${this.label} ${this.required ? html `<span class=\"required\" aria-hidden=\"true\">*</span>` : ''} </label> ` : ''} <input id=\"input\" type=${this.type} name=${this.name} .value=${live(this.value)} placeholder=${this.placeholder} ?required=${this.required} ?disabled=${this.disabled} ?readonly=${this.readonly} minlength=${this.minlength ?? ''} maxlength=${this.maxlength ?? ''} pattern=${this.pattern ?? ''} autocomplete=${this.autocomplete} @input=${this._handleInput} @change=${this._handleChange} @blur=${this._handleBlur} /> ${validationMessage ? html `<div class=\"validation-message\">${validationMessage}</div>` : this.hint ? html `<div class=\"hint\">${this.hint}</div>` : ''} </div> `; } // Public methods for programmatic control focus() { this._input?.focus(); } blur() { this._input?.blur(); } select() { this._input?.select(); } }",
1731
+ "description": "A text field component that works with native browser forms.\n\nUses ElementInternals for form association, allowing the component\nto participate in form submission, validation, and reset.\n\nNative input and change events bubble up from the inner input element."
1732
+ }
1733
+ ],
1734
+ "exports": [
1735
+ {
1736
+ "kind": "js",
1737
+ "name": "KRTextField",
1738
+ "declaration": {
1739
+ "name": "KRTextField",
1740
+ "module": "dist/form/text-field/text-field.js"
1741
+ }
1742
+ }
1743
+ ]
1744
+ },
1745
+ {
1746
+ "kind": "javascript-module",
1747
+ "path": "src/form/text-field/text-field.ts",
1748
+ "declarations": [
1749
+ {
1750
+ "kind": "class",
1751
+ "description": "A text field component that works with native browser forms.\n\nUses ElementInternals for form association, allowing the component\nto participate in form submission, validation, and reset.\n\nNative input and change events bubble up from the inner input element.",
1752
+ "name": "KRTextField",
1753
+ "members": [
1754
+ {
1755
+ "kind": "field",
1756
+ "name": "formAssociated",
1757
+ "type": {
1758
+ "text": "boolean"
1759
+ },
1760
+ "static": true,
1761
+ "default": "true"
1762
+ },
1763
+ {
1764
+ "kind": "field",
1765
+ "name": "_internals",
1766
+ "type": {
1767
+ "text": "ElementInternals"
1768
+ },
1769
+ "privacy": "private"
1770
+ },
1771
+ {
1772
+ "kind": "field",
1773
+ "name": "label",
1774
+ "type": {
1775
+ "text": "string"
1776
+ },
1777
+ "default": "''",
1778
+ "description": "The input label text",
1779
+ "attribute": "label"
1780
+ },
1781
+ {
1782
+ "kind": "field",
1783
+ "name": "name",
1784
+ "type": {
1785
+ "text": "string"
1786
+ },
1787
+ "default": "''",
1788
+ "description": "The input name for form submission",
1789
+ "attribute": "name"
1790
+ },
1791
+ {
1792
+ "kind": "field",
1793
+ "name": "value",
1794
+ "type": {
1795
+ "text": "string"
1796
+ },
1797
+ "default": "''",
1798
+ "description": "The current value",
1799
+ "attribute": "value"
1800
+ },
1801
+ {
1802
+ "kind": "field",
1803
+ "name": "placeholder",
1804
+ "type": {
1805
+ "text": "string"
1806
+ },
1807
+ "default": "''",
1808
+ "description": "Placeholder text",
1809
+ "attribute": "placeholder"
1810
+ },
1811
+ {
1812
+ "kind": "field",
1813
+ "name": "type",
1814
+ "type": {
1815
+ "text": "'text' | 'email' | 'password' | 'tel' | 'url' | 'search'"
1816
+ },
1817
+ "default": "'text'",
1818
+ "description": "Input type (text, email, password, tel, url, search)",
1819
+ "attribute": "type"
1820
+ },
1821
+ {
1822
+ "kind": "field",
1823
+ "name": "required",
1824
+ "type": {
1825
+ "text": "boolean"
1826
+ },
1827
+ "default": "false",
1828
+ "description": "Whether the field is required",
1829
+ "attribute": "required"
1830
+ },
1831
+ {
1832
+ "kind": "field",
1833
+ "name": "disabled",
1834
+ "type": {
1835
+ "text": "boolean"
1836
+ },
1837
+ "default": "false",
1838
+ "description": "Whether the field is disabled",
1839
+ "attribute": "disabled"
1840
+ },
1841
+ {
1842
+ "kind": "field",
1843
+ "name": "readonly",
1844
+ "type": {
1845
+ "text": "boolean"
1846
+ },
1847
+ "default": "false",
1848
+ "description": "Whether the field is readonly",
1849
+ "attribute": "readonly"
1850
+ },
1851
+ {
1852
+ "kind": "field",
1853
+ "name": "minlength",
1854
+ "type": {
1855
+ "text": "number | undefined"
1856
+ },
1857
+ "description": "Minimum length for the value",
1858
+ "attribute": "minlength"
1859
+ },
1860
+ {
1861
+ "kind": "field",
1862
+ "name": "maxlength",
1863
+ "type": {
1864
+ "text": "number | undefined"
1865
+ },
1866
+ "description": "Maximum length for the value",
1867
+ "attribute": "maxlength"
1868
+ },
1869
+ {
1870
+ "kind": "field",
1871
+ "name": "pattern",
1872
+ "type": {
1873
+ "text": "string | undefined"
1874
+ },
1875
+ "description": "Pattern for validation (regex)",
1876
+ "attribute": "pattern"
1877
+ },
1878
+ {
1879
+ "kind": "field",
1880
+ "name": "autocomplete",
1881
+ "type": {
1882
+ "text": "string"
1883
+ },
1884
+ "default": "''",
1885
+ "description": "Autocomplete attribute value",
1886
+ "attribute": "autocomplete"
1887
+ },
1888
+ {
1889
+ "kind": "field",
1890
+ "name": "hint",
1891
+ "type": {
1892
+ "text": "string"
1893
+ },
1894
+ "default": "''",
1895
+ "description": "Helper text shown below the input",
1896
+ "attribute": "hint"
1897
+ },
1898
+ {
1899
+ "kind": "field",
1900
+ "name": "_input",
1901
+ "type": {
1902
+ "text": "HTMLInputElement"
1903
+ },
1904
+ "privacy": "private"
1905
+ },
1906
+ {
1907
+ "kind": "field",
1908
+ "name": "_touched",
1909
+ "type": {
1910
+ "text": "boolean"
1911
+ },
1912
+ "privacy": "private",
1913
+ "default": "false"
1914
+ },
1915
+ {
1916
+ "kind": "field",
1917
+ "name": "_dirty",
1918
+ "type": {
1919
+ "text": "boolean"
1920
+ },
1921
+ "privacy": "private",
1922
+ "default": "false"
1923
+ },
1924
+ {
1925
+ "kind": "field",
1926
+ "name": "form",
1927
+ "readonly": true
1928
+ },
1929
+ {
1930
+ "kind": "field",
1931
+ "name": "validity",
1932
+ "readonly": true
1933
+ },
1934
+ {
1935
+ "kind": "field",
1936
+ "name": "validationMessage",
1937
+ "readonly": true
1938
+ },
1939
+ {
1940
+ "kind": "field",
1941
+ "name": "willValidate",
1942
+ "readonly": true
1943
+ },
1944
+ {
1945
+ "kind": "method",
1946
+ "name": "checkValidity"
1947
+ },
1948
+ {
1949
+ "kind": "method",
1950
+ "name": "reportValidity"
1951
+ },
1952
+ {
1953
+ "kind": "method",
1954
+ "name": "formResetCallback"
1955
+ },
1956
+ {
1957
+ "kind": "method",
1958
+ "name": "formStateRestoreCallback",
1959
+ "parameters": [
1960
+ {
1961
+ "name": "state",
1962
+ "type": {
1963
+ "text": "string"
1964
+ }
1965
+ }
1966
+ ]
1967
+ },
1968
+ {
1969
+ "kind": "method",
1970
+ "name": "_handleInput",
1971
+ "privacy": "private",
1972
+ "parameters": [
1973
+ {
1974
+ "name": "e",
1975
+ "type": {
1976
+ "text": "Event"
1977
+ }
1978
+ }
1979
+ ]
1980
+ },
1981
+ {
1982
+ "kind": "method",
1983
+ "name": "_handleChange",
1984
+ "privacy": "private",
1985
+ "parameters": [
1986
+ {
1987
+ "name": "e",
1988
+ "type": {
1989
+ "text": "Event"
1990
+ }
1991
+ }
1992
+ ]
1993
+ },
1994
+ {
1995
+ "kind": "method",
1996
+ "name": "_handleBlur",
1997
+ "privacy": "private"
1998
+ },
1999
+ {
2000
+ "kind": "method",
2001
+ "name": "focus"
2002
+ },
2003
+ {
2004
+ "kind": "method",
2005
+ "name": "blur"
2006
+ },
2007
+ {
2008
+ "kind": "method",
2009
+ "name": "select"
2010
+ }
2011
+ ],
2012
+ "attributes": [
2013
+ {
2014
+ "name": "label",
2015
+ "type": {
2016
+ "text": "string"
2017
+ },
2018
+ "default": "''",
2019
+ "description": "The input label text",
2020
+ "fieldName": "label"
2021
+ },
2022
+ {
2023
+ "name": "name",
2024
+ "type": {
2025
+ "text": "string"
2026
+ },
2027
+ "default": "''",
2028
+ "description": "The input name for form submission",
2029
+ "fieldName": "name"
2030
+ },
2031
+ {
2032
+ "name": "value",
2033
+ "type": {
2034
+ "text": "string"
2035
+ },
2036
+ "default": "''",
2037
+ "description": "The current value",
2038
+ "fieldName": "value"
2039
+ },
2040
+ {
2041
+ "name": "placeholder",
2042
+ "type": {
2043
+ "text": "string"
2044
+ },
2045
+ "default": "''",
2046
+ "description": "Placeholder text",
2047
+ "fieldName": "placeholder"
2048
+ },
2049
+ {
2050
+ "name": "type",
2051
+ "type": {
2052
+ "text": "'text' | 'email' | 'password' | 'tel' | 'url' | 'search'"
2053
+ },
2054
+ "default": "'text'",
2055
+ "description": "Input type (text, email, password, tel, url, search)",
2056
+ "fieldName": "type"
2057
+ },
2058
+ {
2059
+ "name": "required",
2060
+ "type": {
2061
+ "text": "boolean"
2062
+ },
2063
+ "default": "false",
2064
+ "description": "Whether the field is required",
2065
+ "fieldName": "required"
2066
+ },
2067
+ {
2068
+ "name": "disabled",
2069
+ "type": {
2070
+ "text": "boolean"
2071
+ },
2072
+ "default": "false",
2073
+ "description": "Whether the field is disabled",
2074
+ "fieldName": "disabled"
2075
+ },
2076
+ {
2077
+ "name": "readonly",
2078
+ "type": {
2079
+ "text": "boolean"
2080
+ },
2081
+ "default": "false",
2082
+ "description": "Whether the field is readonly",
2083
+ "fieldName": "readonly"
2084
+ },
2085
+ {
2086
+ "name": "minlength",
2087
+ "type": {
2088
+ "text": "number | undefined"
2089
+ },
2090
+ "description": "Minimum length for the value",
2091
+ "fieldName": "minlength"
2092
+ },
2093
+ {
2094
+ "name": "maxlength",
2095
+ "type": {
2096
+ "text": "number | undefined"
2097
+ },
2098
+ "description": "Maximum length for the value",
2099
+ "fieldName": "maxlength"
2100
+ },
2101
+ {
2102
+ "name": "pattern",
2103
+ "type": {
2104
+ "text": "string | undefined"
2105
+ },
2106
+ "description": "Pattern for validation (regex)",
2107
+ "fieldName": "pattern"
2108
+ },
2109
+ {
2110
+ "name": "autocomplete",
2111
+ "type": {
2112
+ "text": "string"
2113
+ },
2114
+ "default": "''",
2115
+ "description": "Autocomplete attribute value",
2116
+ "fieldName": "autocomplete"
2117
+ },
2118
+ {
2119
+ "name": "hint",
2120
+ "type": {
2121
+ "text": "string"
2122
+ },
2123
+ "default": "''",
2124
+ "description": "Helper text shown below the input",
2125
+ "fieldName": "hint"
2126
+ }
2127
+ ],
2128
+ "superclass": {
2129
+ "name": "LitElement",
2130
+ "package": "lit"
2131
+ },
2132
+ "tagName": "kr-text-field",
2133
+ "customElement": true
2134
+ }
2135
+ ],
2136
+ "exports": [
2137
+ {
2138
+ "kind": "js",
2139
+ "name": "KRTextField",
2140
+ "declaration": {
2141
+ "name": "KRTextField",
2142
+ "module": "src/form/text-field/text-field.ts"
2143
+ }
2144
+ },
2145
+ {
2146
+ "kind": "custom-element-definition",
2147
+ "name": "kr-text-field",
2148
+ "declaration": {
2149
+ "name": "KRTextField",
2150
+ "module": "src/form/text-field/text-field.ts"
2151
+ }
2152
+ }
2153
+ ]
2154
+ }
2155
+ ]
2156
+ }