@kodaris/krubble-components 1.0.4 → 1.0.6

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 (58) hide show
  1. package/custom-elements.json +1596 -382
  2. package/dist/alert/alert.d.ts.map +1 -0
  3. package/dist/alert/alert.js.map +1 -0
  4. package/dist/button/button.d.ts +34 -3
  5. package/dist/button/button.d.ts.map +1 -1
  6. package/dist/button/button.js +193 -38
  7. package/dist/button/button.js.map +1 -1
  8. package/dist/code-demo/code-demo.d.ts.map +1 -1
  9. package/dist/code-demo/code-demo.js +2 -1
  10. package/dist/code-demo/code-demo.js.map +1 -1
  11. package/dist/form/index.d.ts +2 -0
  12. package/dist/form/index.d.ts.map +1 -1
  13. package/dist/form/index.js +2 -0
  14. package/dist/form/index.js.map +1 -1
  15. package/dist/form/select/select-option.d.ts +27 -0
  16. package/dist/form/select/select-option.d.ts.map +1 -0
  17. package/dist/form/select/select-option.js +50 -0
  18. package/dist/form/select/select-option.js.map +1 -0
  19. package/dist/form/select/select.d.ts +81 -0
  20. package/dist/form/select/select.d.ts.map +1 -0
  21. package/dist/form/select/select.js +519 -0
  22. package/dist/form/select/select.js.map +1 -0
  23. package/dist/form/text-field/text-field.d.ts +6 -0
  24. package/dist/form/text-field/text-field.d.ts.map +1 -1
  25. package/dist/form/text-field/text-field.js +38 -8
  26. package/dist/form/text-field/text-field.js.map +1 -1
  27. package/dist/index.d.ts +5 -2
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +6 -2
  30. package/dist/index.js.map +1 -1
  31. package/dist/krubble.bundled.js +1329 -156
  32. package/dist/krubble.bundled.js.map +1 -1
  33. package/dist/krubble.bundled.min.js +592 -91
  34. package/dist/krubble.bundled.min.js.map +1 -1
  35. package/dist/krubble.umd.js +1325 -151
  36. package/dist/krubble.umd.js.map +1 -1
  37. package/dist/krubble.umd.min.js +585 -84
  38. package/dist/krubble.umd.min.js.map +1 -1
  39. package/dist/snackbar/snackbar.d.ts.map +1 -1
  40. package/dist/snackbar/snackbar.js +8 -1
  41. package/dist/snackbar/snackbar.js.map +1 -1
  42. package/dist/style/base.d.ts +6 -0
  43. package/dist/style/base.d.ts.map +1 -0
  44. package/dist/style/base.js +34 -0
  45. package/dist/style/base.js.map +1 -0
  46. package/dist/tabs/tab.d.ts +54 -0
  47. package/dist/tabs/tab.d.ts.map +1 -0
  48. package/dist/tabs/tab.js +103 -0
  49. package/dist/tabs/tab.js.map +1 -0
  50. package/dist/tabs/tabs.d.ts +47 -0
  51. package/dist/tabs/tabs.d.ts.map +1 -0
  52. package/dist/tabs/tabs.js +282 -0
  53. package/dist/tabs/tabs.js.map +1 -0
  54. package/package.json +1 -1
  55. package/dist/alert.d.ts.map +0 -1
  56. package/dist/alert.js.map +0 -1
  57. /package/dist/{alert.d.ts → alert/alert.d.ts} +0 -0
  58. /package/dist/{alert.js → alert/alert.js} +0 -0
@@ -4,31 +4,17 @@
4
4
  "modules": [
5
5
  {
6
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
- ],
7
+ "path": "dist/index.js",
8
+ "declarations": [],
16
9
  "exports": [
17
10
  {
18
11
  "kind": "js",
19
- "name": "KRAlert",
12
+ "name": "krBaseCSS",
20
13
  "declaration": {
21
- "name": "KRAlert",
22
- "module": "dist/alert.js"
14
+ "name": "krBaseCSS",
15
+ "module": "./style/base.js"
23
16
  }
24
- }
25
- ]
26
- },
27
- {
28
- "kind": "javascript-module",
29
- "path": "dist/index.js",
30
- "declarations": [],
31
- "exports": [
17
+ },
32
18
  {
33
19
  "kind": "js",
34
20
  "name": "KRAccordion",
@@ -42,7 +28,7 @@
42
28
  "name": "KRAlert",
43
29
  "declaration": {
44
30
  "name": "KRAlert",
45
- "module": "./alert.js"
31
+ "module": "./alert/alert.js"
46
32
  }
47
33
  },
48
34
  {
@@ -93,6 +79,22 @@
93
79
  "module": "./snackbar/snackbar.js"
94
80
  }
95
81
  },
82
+ {
83
+ "kind": "js",
84
+ "name": "KRTabGroup",
85
+ "declaration": {
86
+ "name": "KRTabGroup",
87
+ "module": "./tabs/tabs.js"
88
+ }
89
+ },
90
+ {
91
+ "kind": "js",
92
+ "name": "KRTab",
93
+ "declaration": {
94
+ "name": "KRTab",
95
+ "module": "./tabs/tab.js"
96
+ }
97
+ },
96
98
  {
97
99
  "kind": "js",
98
100
  "name": "KRTextField",
@@ -100,6 +102,22 @@
100
102
  "name": "KRTextField",
101
103
  "module": "./form/index.js"
102
104
  }
105
+ },
106
+ {
107
+ "kind": "js",
108
+ "name": "KRSelect",
109
+ "declaration": {
110
+ "name": "KRSelect",
111
+ "module": "./form/index.js"
112
+ }
113
+ },
114
+ {
115
+ "kind": "js",
116
+ "name": "KRSelectOption",
117
+ "declaration": {
118
+ "name": "KRSelectOption",
119
+ "module": "./form/index.js"
120
+ }
103
121
  }
104
122
  ]
105
123
  },
@@ -115,76 +133,37 @@
115
133
  "kind": "variable",
116
134
  "name": "e"
117
135
  },
136
+ {
137
+ "kind": "variable",
138
+ "name": "krBaseCSS",
139
+ "default": "i$5 ` :host, *, *::before, *::after { box-sizing: border-box; } :host { /* Primary */ --kr-primary: rgb(22, 48, 82); --kr-primary-hover: rgb(16, 36, 62); --kr-primary-text: #ffffff; /* Accent */ --kr-accent: #BEEA4E; --kr-accent-hover: #a8d43a; --kr-accent-text: #000000; /* Text */ --kr-text: #000000; --kr-text-muted: #4b5563; --kr-text-disabled: #9ca3af; /* Borders */ --kr-border: #e5e7eb; } `",
140
+ "description": "Base theme styles with CSS custom properties.\nImport into components: static styles = [krBaseCSS, css`...`]"
141
+ },
118
142
  {
119
143
  "kind": "variable",
120
144
  "name": "KRAccordion",
121
- "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 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> `; } }",
145
+ "default": "class KRAccordion extends i$2 { constructor() { super(...arguments); /** * Section header text */ this.header = ''; /** * Whether the accordion is expanded */ this.expanded = false; } 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> `; } }",
122
146
  "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```"
123
147
  },
124
148
  {
125
149
  "kind": "variable",
126
150
  "name": "KRAlert",
127
- "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: 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=${e$1({ 'alert': true, ['alert--' + this.type]: true, 'alert--hidden': !this.visible })} role=\"alert\" > ${icons[this.type]} <div class=\"content\"> ${this.header ? b `<h4 class=\"header\">${this.header}</h4>` : A} <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> ` : A} </div> `; } }",
151
+ "default": "class KRAlert extends i$2 { 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: 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=${e$1({ 'alert': true, ['alert--' + this.type]: true, 'alert--hidden': !this.visible })} role=\"alert\" > ${icons[this.type]} <div class=\"content\"> ${this.header ? b `<h4 class=\"header\">${this.header}</h4>` : A} <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> ` : A} </div> `; } }",
128
152
  "description": "A customizable alert component for displaying important information to users."
129
153
  },
130
154
  {
131
155
  "kind": "variable",
132
156
  "name": "KRButton",
133
- "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 b ` <button part=\"button\" class=\"${this.variant} ${sizeClass}\" ?disabled=${this.disabled} > <slot></slot> </button> `; } }",
157
+ "default": "class KRButton extends i$2 { constructor() { super(...arguments); /** * The button variant (shape) */ this.variant = 'flat'; /** * The button color */ this.color = 'primary'; /** * The button size */ this.size = 'medium'; /** * Whether the button is disabled */ this.disabled = false; this._state = 'idle'; this._stateText = ''; this._handleKeydown = (e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); this.click(); } }; } connectedCallback() { super.connectedCallback(); this.setAttribute('role', 'button'); this.setAttribute('tabindex', '0'); this.addEventListener('keydown', this._handleKeydown); } disconnectedCallback() { super.disconnectedCallback(); this.removeEventListener('keydown', this._handleKeydown); } /** * Shows a loading spinner and disables the button. */ showLoading() { this._clearStateTimeout(); this._state = 'loading'; this._stateText = ''; } /** * Shows a success state with optional custom text. * @param text - Text to display (default: \"Saved\") * @param duration - Duration in ms before auto-reset (default: 2000) */ showSuccess(text = 'Success', duration = 2000) { this._clearStateTimeout(); this._state = 'success'; this._stateText = text; this._stateTimeout = window.setTimeout(() => this.reset(), duration); } /** * Shows an error state with optional custom text. * @param text - Text to display (default: \"Error\") * @param duration - Duration in ms before auto-reset (default: 2000) */ showError(text = 'Error', duration = 2000) { this._clearStateTimeout(); this._state = 'error'; this._stateText = text; this._stateTimeout = window.setTimeout(() => this.reset(), duration); } /** * Resets the button to its idle state. */ reset() { this._clearStateTimeout(); this._state = 'idle'; this._stateText = ''; } _clearStateTimeout() { if (this._stateTimeout) { clearTimeout(this._stateTimeout); this._stateTimeout = undefined; } } updated(changedProperties) { // Reflect state classes to host this.classList.toggle('kr-button--loading', this._state === 'loading'); this.classList.toggle('kr-button--success', this._state === 'success'); this.classList.toggle('kr-button--error', this._state === 'error'); this.classList.toggle(`kr-button--${this.variant}`, true); this.classList.toggle(`kr-button--${this.color}`, true); this.classList.toggle('kr-button--small', this.size === 'small'); this.classList.toggle('kr-button--large', this.size === 'large'); } render() { return b ` <slot></slot> ${this._state !== 'idle' ? b `<span class=\"state-overlay\"> ${this._state === 'loading' ? b `<span class=\"spinner\"></span>` : this._stateText} </span>` : ''} `; } }",
134
158
  "description": "A customizable button component."
135
159
  },
136
160
  {
137
161
  "kind": "class",
138
162
  "description": "",
139
163
  "name": "e",
140
- "members": [
141
- {
142
- "kind": "field",
143
- "name": "_$AU",
144
- "readonly": true,
145
- "inheritedFrom": {
146
- "name": "i",
147
- "module": "dist/krubble.umd.js"
148
- }
149
- },
150
- {
151
- "kind": "method",
152
- "name": "_$AT",
153
- "parameters": [
154
- {
155
- "name": "t"
156
- },
157
- {
158
- "name": "e"
159
- },
160
- {
161
- "name": "i"
162
- }
163
- ],
164
- "inheritedFrom": {
165
- "name": "i",
166
- "module": "dist/krubble.umd.js"
167
- }
168
- },
169
- {
170
- "kind": "method",
171
- "name": "_$AS",
172
- "parameters": [
173
- {
174
- "name": "t"
175
- },
176
- {
177
- "name": "e"
178
- }
179
- ],
180
- "inheritedFrom": {
181
- "name": "i",
182
- "module": "dist/krubble.umd.js"
183
- }
184
- }
185
- ],
164
+ "members": [],
186
165
  "superclass": {
187
- "name": "i",
166
+ "name": "i$1",
188
167
  "module": "dist/krubble.bundled.js"
189
168
  },
190
169
  "tagName": "t",
@@ -193,13 +172,13 @@
193
172
  {
194
173
  "kind": "variable",
195
174
  "name": "KRCodeDemo",
196
- "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 b ` <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> `; } }",
175
+ "default": "class KRCodeDemo extends i$2 { 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 b ` <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$2(this.getHighlightedCode())}</code></pre> </div> `; } }",
197
176
  "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."
198
177
  },
199
178
  {
200
179
  "kind": "variable",
201
180
  "name": "KRContextMenu",
202
- "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 b ` <div class=\"menu\"> ${this.items.map(item => item.divider ? b `<div class=\"menu__divider\"></div>` : b ` <button class=\"menu__item\" ?disabled=${item.disabled} @click=${() => this.handleItemClick(item)} > ${item.icon ? b `<span class=\"menu__item-icon\">${item.icon}</span>` : null} ${item.label} </button> `)} </div> `; } }",
181
+ "default": "class KRContextMenu extends i$2 { 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 b ` <div class=\"menu\"> ${this.items.map(item => item.divider ? b `<div class=\"menu__divider\"></div>` : b ` <button class=\"menu__item\" ?disabled=${item.disabled} @click=${() => this.handleItemClick(item)} > ${item.icon ? b `<span class=\"menu__item-icon\">${item.icon}</span>` : null} ${item.label} </button> `)} </div> `; } }",
203
182
  "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```"
204
183
  },
205
184
  {
@@ -246,7 +225,7 @@
246
225
  {
247
226
  "kind": "variable",
248
227
  "name": "KRDialog",
249
- "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 b ` <div class=\"backdrop\" @click=${this.handleBackdropClick}></div> <div class=\"dialog\"> ${this.contentElement} </div> `; } }",
228
+ "default": "class KRDialog extends i$2 { 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 b ` <div class=\"backdrop\" @click=${this.handleBackdropClick}></div> <div class=\"dialog\"> ${this.contentElement} </div> `; } }",
250
229
  "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```"
251
230
  },
252
231
  {
@@ -254,11 +233,35 @@
254
233
  "name": "KRSnackbar",
255
234
  "description": "A snackbar component for displaying brief notification messages.\n\nSnackbars appear at the bottom-left of the screen and automatically\ndismiss after a configurable duration. Multiple snackbars stack vertically."
256
235
  },
236
+ {
237
+ "kind": "variable",
238
+ "name": "KRTabGroup",
239
+ "default": "class KRTabGroup extends i$2 { updated(changes) { if (changes.has('activeTabId')) { this._updateActiveTab(); } } firstUpdated() { this._updateActiveTab(); } _getTabs() { return Array.from(this.querySelectorAll('kr-tab')); } _updateActiveTab() { const tabs = this._getTabs(); if (tabs.length === 0) return; if (!this.activeTabId) { this.activeTabId = tabs[0]?.id; } tabs.forEach((tab) => { tab.active = tab.id === this.activeTabId; }); this.requestUpdate(); } _handleTabClick(tab) { if (tab.disabled) return; this.activeTabId = tab.id; this.dispatchEvent(new CustomEvent('tab-change', { detail: { activeTabId: tab.id }, bubbles: true, composed: true, })); } _handleTabDismiss(tab, e) { e.stopPropagation(); this.dispatchEvent(new CustomEvent('tab-dismiss', { detail: { tabId: tab.id }, bubbles: true, composed: true, })); } _handleKeyDown(e) { const enabledTabs = this._getTabs().filter((t) => !t.disabled); const currentIndex = enabledTabs.findIndex((t) => t.id === this.activeTabId); let newIndex = -1; switch (e.key) { case 'ArrowLeft': newIndex = currentIndex > 0 ? currentIndex - 1 : enabledTabs.length - 1; break; case 'ArrowRight': newIndex = currentIndex < enabledTabs.length - 1 ? currentIndex + 1 : 0; break; case 'Home': newIndex = 0; break; case 'End': newIndex = enabledTabs.length - 1; break; } if (newIndex >= 0) { e.preventDefault(); const newTab = enabledTabs[newIndex]; this.activeTabId = newTab.id; this.dispatchEvent(new CustomEvent('tab-change', { detail: { activeTabId: newTab.id }, bubbles: true, composed: true, })); const tabButtons = this.shadowRoot?.querySelectorAll('.label'); const targetButton = Array.from(tabButtons || []).find((btn) => btn.getAttribute('data-tab-id') === newTab.id); targetButton?.focus(); } } _renderTabIcon(tab) { const iconElement = tab.getIconElement(); if (!iconElement) return A; // Clone the icon element to render in the header const clonedIcon = iconElement.cloneNode(true); clonedIcon.removeAttribute('slot'); return b `<span class=\"label-icon\">${clonedIcon}</span>`; } render() { return b ` <div class=\"header\" role=\"tablist\" @keydown=${this._handleKeyDown}> ${this._getTabs().map((tab) => b ` <button class=${e$1({ label: true, 'label--active': tab.id === this.activeTabId, })} role=\"tab\" data-tab-id=${tab.id} aria-selected=${tab.id === this.activeTabId} aria-controls=${`panel-${tab.id}`} tabindex=${tab.id === this.activeTabId ? 0 : -1} ?disabled=${tab.disabled} @click=${() => this._handleTabClick(tab)} > ${this._renderTabIcon(tab)} <span>${tab.title}</span> ${tab.badge ? b `<span class=\"label-badge\" style=${o$1({ backgroundColor: tab.badgeBackground, color: tab.badgeColor })}>${tab.badge}</span>` : A} ${tab.dismissible ? b ` <button class=\"label-dismiss\" type=\"button\" aria-label=\"Close tab\" @click=${(e) => this._handleTabDismiss(tab, e)} > <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" width=\"12\" height=\"12\"><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> ` : A} </button> `)} </div> <div class=\"content\" role=\"tabpanel\" aria-labelledby=${this.activeTabId || ''}> <slot @slotchange=${this._updateActiveTab}></slot> </div> `; } }",
240
+ "description": "A tabbed navigation component for switching between content sections."
241
+ },
242
+ {
243
+ "kind": "variable",
244
+ "name": "KRTab",
245
+ "default": "class KRTab extends i$2 { constructor() { super(...arguments); /** * Unique identifier for the tab */ this.id = ''; /** * Display title for the tab */ this.title = ''; /** * Badge text displayed next to title (e.g. notification count) */ this.badge = ''; /** * Badge background color */ this.badgeBackground = ''; /** * Badge text color */ this.badgeColor = ''; /** * Whether the tab is disabled */ this.disabled = false; /** * Whether the tab can be dismissed/closed */ this.dismissible = false; /** * Whether this tab is currently active (set by parent) */ this.active = false; } /** * Gets the icon element from the icon slot (if any) */ getIconElement() { return this.querySelector('[slot=\"icon\"]'); } render() { return b `<slot></slot>`; } }",
246
+ "description": "A tab for the kr-tab-group component."
247
+ },
257
248
  {
258
249
  "kind": "variable",
259
250
  "name": "KRTextField",
260
- "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 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=${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 ? b `<div class=\"validation-message\">${validationMessage}</div>` : this.hint ? b `<div class=\"hint\">${this.hint}</div>` : ''} </div> `; } // Public methods for programmatic control focus() { this._input?.focus(); } blur() { this._input?.blur(); } select() { this._input?.select(); } }",
251
+ "default": "class KRTextField extends i$2 { 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._handleInvalid = (e) => { e.preventDefault(); this._touched = true; }; 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; } connectedCallback() { super.connectedCallback(); this.addEventListener('invalid', this._handleInvalid); } disconnectedCallback() { super.disconnectedCallback(); this.removeEventListener('invalid', this._handleInvalid); } firstUpdated() { this._updateValidity(); } updated(changedProperties) { if (changedProperties.has('required') || changedProperties.has('value')) { this._updateValidity(); } } _updateValidity() { if (this._input) { this._internals.setValidity(this._input.validity, this._input.validationMessage); } } _handleInput(e) { this.value = e.target.value; this._dirty = true; this._internals.setFormValue(this.value); this._internals.setValidity(this._input.validity, this._input.validationMessage); } _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); } render() { let validationMessage = ''; if (this._touched && this._input && !this._input.validity.valid) { validationMessage = this._input.validationMessage; } return 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\" class=${e$1({ 'input--invalid': this._touched && this._input && !this._input.validity.valid })} type=${this.type} name=${this.name} .value=${l(this.value)} placeholder=${this.placeholder} ?required=${this.required} ?disabled=${this.disabled} ?readonly=${this.readonly} minlength=${o(this.minlength)} maxlength=${o(this.maxlength)} pattern=${o(this.pattern)} autocomplete=${o(this.autocomplete || undefined)} @input=${this._handleInput} @change=${this._handleChange} @blur=${this._handleBlur} /> ${validationMessage ? b `<div class=\"validation-message\">${validationMessage}</div>` : this.hint ? b `<div class=\"hint\">${this.hint}</div>` : ''} </div> `; } // Public methods for programmatic control focus() { this._input?.focus(); } blur() { this._input?.blur(); } select() { this._input?.select(); } }",
261
252
  "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."
253
+ },
254
+ {
255
+ "kind": "variable",
256
+ "name": "KRSelect",
257
+ "default": "class KRSelect extends i$2 { constructor() { super(); /** * The select label text */ this.label = ''; /** * The input name for form submission */ this.name = ''; /** * The currently selected value */ this.value = ''; /** * Placeholder text when no option is selected */ this.placeholder = 'Select an option'; /** * Whether the select is disabled */ this.disabled = false; /** * Whether the field is required */ this.required = false; /** * Whether the field is readonly */ this.readonly = false; /** * Helper text shown below the select */ this.hint = ''; this._isOpen = false; this._highlightedIndex = -1; this._touched = false; this._handleInvalid = (e) => { e.preventDefault(); this._touched = true; }; this._handleOutsideClick = (e) => { if (!this.contains(e.target)) { this._close(); } }; this._handleKeyDown = (e) => { if (!this._isOpen) return; const options = Array.from(this.querySelectorAll('kr-select-option')); switch (e.key) { case 'Escape': this._close(); this._triggerElement?.focus(); break; case 'ArrowDown': e.preventDefault(); if (options.some(o => !o.disabled)) { let newIndex = this._highlightedIndex + 1; while (newIndex < options.length && options[newIndex]?.disabled) newIndex++; if (newIndex < options.length) this._highlightedIndex = newIndex; } break; case 'ArrowUp': e.preventDefault(); { let newIndex = this._highlightedIndex - 1; while (newIndex >= 0 && options[newIndex]?.disabled) newIndex--; if (newIndex >= 0) this._highlightedIndex = newIndex; } break; case 'Enter': e.preventDefault(); if (this._highlightedIndex >= 0 && this._highlightedIndex < options.length) { this._selectOption(options[this._highlightedIndex]); } break; } }; 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._internals.setFormValue(''); this._internals.setValidity({}); } formStateRestoreCallback(state) { this.value = state; } connectedCallback() { super.connectedCallback(); document.addEventListener('click', this._handleOutsideClick); document.addEventListener('keydown', this._handleKeyDown); this.addEventListener('invalid', this._handleInvalid); } firstUpdated() { this._updateValidity(); } updated(changedProperties) { if (changedProperties.has('required') || changedProperties.has('value')) { this._updateValidity(); } } disconnectedCallback() { super.disconnectedCallback(); document.removeEventListener('click', this._handleOutsideClick); document.removeEventListener('keydown', this._handleKeyDown); this.removeEventListener('invalid', this._handleInvalid); } _toggle() { if (this.disabled || this.readonly) return; if (this._isOpen) { this._close(); } else { this._isOpen = true; const options = Array.from(this.querySelectorAll('kr-select-option')); this._highlightedIndex = options.findIndex(o => o.value === this.value); } } _close() { this._isOpen = false; this._highlightedIndex = -1; } _selectOption(option) { if (option.disabled) return; this.value = option.value; this._internals.setFormValue(this.value); this._updateValidity(); this.dispatchEvent(new Event('change', { bubbles: true, composed: true })); this._close(); this._triggerElement?.focus(); } _handleBlur() { this._touched = true; this._updateValidity(); } _updateValidity() { if (this.required && !this.value) { this._internals.setValidity({ valueMissing: true }, 'Please select an option', this._triggerElement); } else { this._internals.setValidity({}); } } render() { const options = Array.from(this.querySelectorAll('kr-select-option')); const selectedLabel = options.find(o => o.value === this.value)?.label; return b ` <div class=\"wrapper\"> ${this.label ? b ` <label> ${this.label} ${this.required ? b `<span class=\"required\" aria-hidden=\"true\">*</span>` : ''} </label> ` : A} <div class=\"select-wrapper\"> <button class=${e$1({ 'select-trigger': true, 'select-trigger--open': this._isOpen, 'select-trigger--invalid': this._touched && this.required && !this.value, })} type=\"button\" ?disabled=${this.disabled} aria-haspopup=\"listbox\" aria-expanded=${this._isOpen} @click=${this._toggle} @blur=${this._handleBlur} > <span class=${e$1({ 'select-value': true, 'select-placeholder': !selectedLabel })}> ${selectedLabel || this.placeholder} </span> <svg class=${e$1({ 'chevron-icon': true, 'select-icon': true, 'select-icon--open': this._isOpen })} viewBox=\"0 0 20 20\" fill=\"currentColor\" > <path fill-rule=\"evenodd\" d=\"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z\" clip-rule=\"evenodd\" /> </svg> </button> <div class=${e$1({ 'select-dropdown': true, 'hidden': !this._isOpen })} role=\"listbox\"> <div class=\"select-options\"> ${options.length === 0 ? b `<div class=\"select-empty\">No options available</div>` : options.map((option, idx) => { const isSelected = option.value === this.value; return b ` <div class=${e$1({ 'select-option': true, 'select-option--selected': isSelected, 'select-option--disabled': option.disabled, 'select-option--highlighted': idx === this._highlightedIndex, })} role=\"option\" aria-selected=${isSelected} @click=${() => this._selectOption(option)} @mouseenter=${() => (this._highlightedIndex = idx)} > ${option.label} ${isSelected ? b `<svg class=\"chevron-icon select-check\" viewBox=\"0 0 20 20\" fill=\"currentColor\"> <path fill-rule=\"evenodd\" d=\"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z\" clip-rule=\"evenodd\" /> </svg>` : A} </div> `; })} </div> </div> </div> ${this._touched && this.required && !this.value ? b `<div class=\"validation-message\">Please select an option</div>` : this.hint ? b `<div class=\"hint\">${this.hint}</div>` : ''} </div> <div class=\"options-slot\"> <slot @slotchange=${() => this.requestUpdate()}></slot> </div> `; } // Public methods for programmatic control focus() { this._triggerElement?.focus(); } blur() { this._triggerElement?.blur(); } }",
258
+ "description": "A select dropdown component that works with native browser forms.\n\nUses ElementInternals for form association, allowing the component\nto participate in form submission, validation, and reset."
259
+ },
260
+ {
261
+ "kind": "variable",
262
+ "name": "KRSelectOption",
263
+ "default": "class KRSelectOption extends i$2 { constructor() { super(...arguments); /** * The option value */ this.value = ''; /** * Whether the option is disabled */ this.disabled = false; } /** Gets the label text from the slot */ get label() { return this.textContent?.trim() || ''; } render() { return b `<slot></slot>`; } }",
264
+ "description": "An option for the kr-select component."
262
265
  }
263
266
  ],
264
267
  "exports": [
@@ -334,6 +337,22 @@
334
337
  "module": "dist/krubble.bundled.js"
335
338
  }
336
339
  },
340
+ {
341
+ "kind": "js",
342
+ "name": "KRSelect",
343
+ "declaration": {
344
+ "name": "KRSelect",
345
+ "module": "dist/krubble.bundled.js"
346
+ }
347
+ },
348
+ {
349
+ "kind": "js",
350
+ "name": "KRSelectOption",
351
+ "declaration": {
352
+ "name": "KRSelectOption",
353
+ "module": "dist/krubble.bundled.js"
354
+ }
355
+ },
337
356
  {
338
357
  "kind": "js",
339
358
  "name": "KRSnackbar",
@@ -342,6 +361,22 @@
342
361
  "module": "dist/krubble.bundled.js"
343
362
  }
344
363
  },
364
+ {
365
+ "kind": "js",
366
+ "name": "KRTab",
367
+ "declaration": {
368
+ "name": "KRTab",
369
+ "module": "dist/krubble.bundled.js"
370
+ }
371
+ },
372
+ {
373
+ "kind": "js",
374
+ "name": "KRTabGroup",
375
+ "declaration": {
376
+ "name": "KRTabGroup",
377
+ "module": "dist/krubble.bundled.js"
378
+ }
379
+ },
345
380
  {
346
381
  "kind": "js",
347
382
  "name": "KRTextField",
@@ -349,6 +384,14 @@
349
384
  "name": "KRTextField",
350
385
  "module": "dist/krubble.bundled.js"
351
386
  }
387
+ },
388
+ {
389
+ "kind": "js",
390
+ "name": "krBaseCSS",
391
+ "declaration": {
392
+ "name": "krBaseCSS",
393
+ "module": "dist/krubble.bundled.js"
394
+ }
352
395
  }
353
396
  ]
354
397
  },
@@ -358,49 +401,54 @@
358
401
  "declarations": [
359
402
  {
360
403
  "kind": "variable",
361
- "name": "t",
404
+ "name": "e",
362
405
  "default": "globalThis"
363
406
  },
364
407
  {
365
408
  "kind": "variable",
366
- "name": "e"
409
+ "name": "t"
410
+ },
411
+ {
412
+ "kind": "variable",
413
+ "name": "le",
414
+ "default": "r` :host, *, *::before, *::after { box-sizing: border-box; } :host { /* Primary */ --kr-primary: rgb(22, 48, 82); --kr-primary-hover: rgb(16, 36, 62); --kr-primary-text: #ffffff; /* Accent */ --kr-accent: #BEEA4E; --kr-accent-hover: #a8d43a; --kr-accent-text: #000000; /* Text */ --kr-text: #000000; --kr-text-muted: #4b5563; --kr-text-disabled: #9ca3af; /* Borders */ --kr-border: #e5e7eb; } `"
367
415
  },
368
416
  {
369
417
  "kind": "variable",
370
- "name": "ft",
371
- "default": "class extends nt{constructor(){super(...arguments),this.header=\"\",this.expanded=!1}toggle(){this.expanded=!this.expanded}render(){return V` <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> `}}"
418
+ "name": "ge",
419
+ "default": "class extends ne{constructor(){super(...arguments),this.header=\"\",this.expanded=!1}toggle(){this.expanded=!this.expanded}render(){return V` <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> `}}"
372
420
  },
373
421
  {
374
422
  "kind": "variable",
375
- "name": "kt",
376
- "default": "class extends nt{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:V`<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:V`<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:V`<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:V`<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 V` <div class=${$t({alert:!0,[\"alert--\"+this.type]:!0,\"alert--hidden\":!this.visible})} role=\"alert\" > ${t[this.type]} <div class=\"content\"> ${this.header?V`<h4 class=\"header\">${this.header}</h4>`:q} <div class=\"message\"> <slot></slot> </div> </div> ${this.dismissible?V` <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> `}}"
423
+ "name": "Ae",
424
+ "default": "class extends ne{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 e={info:V`<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:V`<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:V`<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:V`<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 V` <div class=${$e({alert:!0,[\"alert--\"+this.type]:!0,\"alert--hidden\":!this.visible})} role=\"alert\" > ${e[this.type]} <div class=\"content\"> ${this.header?V`<h4 class=\"header\">${this.header}</h4>`:q} <div class=\"message\"> <slot></slot> </div> </div> ${this.dismissible?V` <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> `}}"
377
425
  },
378
426
  {
379
427
  "kind": "variable",
380
- "name": "At",
381
- "default": "class extends nt{constructor(){super(...arguments),this.variant=\"primary\",this.size=\"medium\",this.disabled=!1}render(){const t=\"medium\"!==this.size?this.size:\"\";return V` <button part=\"button\" class=\"${this.variant} ${t}\" ?disabled=${this.disabled} > <slot></slot> </button> `}}"
428
+ "name": "Se",
429
+ "default": "class extends ne{constructor(){super(...arguments),this.variant=\"flat\",this.color=\"primary\",this.size=\"medium\",this.disabled=!1,this._state=\"idle\",this._stateText=\"\",this._handleKeydown=e=>{\"Enter\"!==e.key&&\" \"!==e.key||(e.preventDefault(),this.click())}}connectedCallback(){super.connectedCallback(),this.setAttribute(\"role\",\"button\"),this.setAttribute(\"tabindex\",\"0\"),this.addEventListener(\"keydown\",this._handleKeydown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(\"keydown\",this._handleKeydown)}showLoading(){this._clearStateTimeout(),this._state=\"loading\",this._stateText=\"\"}showSuccess(e=\"Success\",t=2e3){this._clearStateTimeout(),this._state=\"success\",this._stateText=e,this._stateTimeout=window.setTimeout(()=>this.reset(),t)}showError(e=\"Error\",t=2e3){this._clearStateTimeout(),this._state=\"error\",this._stateText=e,this._stateTimeout=window.setTimeout(()=>this.reset(),t)}reset(){this._clearStateTimeout(),this._state=\"idle\",this._stateText=\"\"}_clearStateTimeout(){this._stateTimeout&&(clearTimeout(this._stateTimeout),this._stateTimeout=void 0)}updated(e){this.classList.toggle(\"kr-button--loading\",\"loading\"===this._state),this.classList.toggle(\"kr-button--success\",\"success\"===this._state),this.classList.toggle(\"kr-button--error\",\"error\"===this._state),this.classList.toggle(`kr-button--${this.variant}`,!0),this.classList.toggle(`kr-button--${this.color}`,!0),this.classList.toggle(\"kr-button--small\",\"small\"===this.size),this.classList.toggle(\"kr-button--large\",\"large\"===this.size)}render(){return V` <slot></slot> ${\"idle\"!==this._state?V`<span class=\"state-overlay\"> ${\"loading\"===this._state?V`<span class=\"spinner\"></span>`:this._stateText} </span>`:\"\"} `}}"
382
430
  },
383
431
  {
384
432
  "kind": "variable",
385
- "name": "Pt",
386
- "default": "class extends nt{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 V` <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>${St(this.getHighlightedCode())}</code></pre> </div> `}}"
433
+ "name": "Pe",
434
+ "default": "class extends ne{constructor(){super(...arguments),this.language=\"html\",this.code=\"\",this.activeTab=\"preview\",this.copied=!1}setTab(e){this.activeTab=e}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(e){const t=document.createElement(\"div\");return t.textContent=e,t.innerHTML}async copyCode(){if(this.code)try{await navigator.clipboard.writeText(this.code),this.copied=!0,setTimeout(()=>{this.copied=!1},2e3)}catch(e){console.error(\"Failed to copy code:\",e)}}render(){return V` <div class=\"tabs\"> <button class=${$e({tab:!0,\"tab--active\":\"preview\"===this.activeTab})} @click=${()=>this.setTab(\"preview\")} > Preview </button> <button class=${$e({tab:!0,\"tab--active\":\"code\"===this.activeTab})} @click=${()=>this.setTab(\"code\")} > Code </button> </div> <div class=${$e({panel:!0,\"panel--active\":\"preview\"===this.activeTab,preview:!0})}> <slot name=\"preview\"></slot> </div> <div class=${$e({panel:!0,\"panel--active\":\"code\"===this.activeTab,\"code-container\":!0})}> <button class=${$e({\"copy-btn\":!0,\"copy-btn--copied\":this.copied})} @click=${this.copyCode} > ${this.copied?\"Copied!\":\"Copy\"} </button> <pre class=\"code\"><code>${Te(this.getHighlightedCode())}</code></pre> </div> `}}"
387
435
  },
388
436
  {
389
437
  "kind": "variable",
390
- "name": "Mt",
391
- "default": "class extends nt{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 V` <div class=\"menu\"> ${this.items.map(t=>t.divider?V`<div class=\"menu__divider\"></div>`:V` <button class=\"menu__item\" ?disabled=${t.disabled} @click=${()=>this.handleItemClick(t)} > ${t.icon?V`<span class=\"menu__item-icon\">${t.icon}</span>`:null} ${t.label} </button> `)} </div> `}}"
438
+ "name": "ze",
439
+ "default": "class extends ne{constructor(){super(...arguments),this.items=[],this.resolvePromise=null,this.boundHandleOutsideClick=this.handleOutsideClick.bind(this),this.boundHandleKeyDown=this.handleKeyDown.bind(this)}static async open(e){const t=document.querySelector(\"kr-context-menu\");t&&t.remove();const i=document.createElement(\"kr-context-menu\");return document.body.appendChild(i),i.show(e)}async show(e){this.items=e.items,this.style.left=`${e.x}px`,this.style.top=`${e.y}px`,await this.updateComplete;const t=this.getBoundingClientRect();return t.right>window.innerWidth&&(this.style.left=e.x-t.width+\"px\"),t.bottom>window.innerHeight&&(this.style.top=e.y-t.height+\"px\"),requestAnimationFrame(()=>{document.addEventListener(\"click\",this.boundHandleOutsideClick),document.addEventListener(\"contextmenu\",this.boundHandleOutsideClick),document.addEventListener(\"keydown\",this.boundHandleKeyDown)}),new Promise(e=>{this.resolvePromise=e})}handleOutsideClick(e){this.contains(e.target)||this.close(null)}handleKeyDown(e){\"Escape\"===e.key&&this.close(null)}handleItemClick(e){e.disabled||e.divider||this.close(e)}close(e){document.removeEventListener(\"click\",this.boundHandleOutsideClick),document.removeEventListener(\"contextmenu\",this.boundHandleOutsideClick),document.removeEventListener(\"keydown\",this.boundHandleKeyDown),this.resolvePromise&&(this.resolvePromise(e),this.resolvePromise=null),this.remove()}render(){return V` <div class=\"menu\"> ${this.items.map(e=>e.divider?V`<div class=\"menu__divider\"></div>`:V` <button class=\"menu__item\" ?disabled=${e.disabled} @click=${()=>this.handleItemClick(e)} > ${e.icon?V`<span class=\"menu__item-icon\">${e.icon}</span>`:null} ${e.label} </button> `)} </div> `}}"
392
440
  },
393
441
  {
394
442
  "kind": "class",
395
443
  "description": "",
396
- "name": "Tt",
444
+ "name": "Me",
397
445
  "members": [
398
446
  {
399
447
  "kind": "method",
400
448
  "name": "setDialogElement",
401
449
  "parameters": [
402
450
  {
403
- "name": "t"
451
+ "name": "e"
404
452
  }
405
453
  ]
406
454
  },
@@ -409,7 +457,7 @@
409
457
  "name": "close",
410
458
  "parameters": [
411
459
  {
412
- "name": "t"
460
+ "name": "e"
413
461
  }
414
462
  ]
415
463
  },
@@ -436,39 +484,59 @@
436
484
  {
437
485
  "kind": "field",
438
486
  "name": "promise",
439
- "default": "new Promise(t=>{this.resolvePromise=t})"
487
+ "default": "new Promise(e=>{this.resolvePromise=e})"
440
488
  }
441
489
  ]
442
490
  },
443
491
  {
444
492
  "kind": "variable",
445
- "name": "zt",
446
- "default": "class extends nt{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 Tt,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 V` <div class=\"backdrop\" @click=${this.handleBackdropClick}></div> <div class=\"dialog\"> ${this.contentElement} </div> `}}"
493
+ "name": "je",
494
+ "default": "class extends ne{constructor(){super(...arguments),this.contentElement=null,this.dialogRef=null,this.boundHandleKeyDown=this.handleKeyDown.bind(this)}static open(e,t){const i=document.querySelector(\"kr-dialog\");i&&i.remove();const o=new Me,s=document.createElement(\"kr-dialog\");o.setDialogElement(s),s.dialogRef=o;const r=new e;return r.dialogRef=o,t?.data&&(r.data=t.data),s.contentElement=r,document.body.appendChild(s),document.addEventListener(\"keydown\",s.boundHandleKeyDown),o}handleKeyDown(e){\"Escape\"===e.key&&this.dialogRef?.close(void 0)}handleBackdropClick(e){e.target.classList.contains(\"backdrop\")&&this.dialogRef?.close(void 0)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(\"keydown\",this.boundHandleKeyDown)}render(){return V` <div class=\"backdrop\" @click=${this.handleBackdropClick}></div> <div class=\"dialog\"> ${this.contentElement} </div> `}}"
495
+ },
496
+ {
497
+ "kind": "variable",
498
+ "name": "He"
499
+ },
500
+ {
501
+ "kind": "variable",
502
+ "name": "qe",
503
+ "default": "class extends ne{updated(e){e.has(\"activeTabId\")&&this._updateActiveTab()}firstUpdated(){this._updateActiveTab()}_getTabs(){return Array.from(this.querySelectorAll(\"kr-tab\"))}_updateActiveTab(){const e=this._getTabs();0!==e.length&&(this.activeTabId||(this.activeTabId=e[0]?.id),e.forEach(e=>{e.active=e.id===this.activeTabId}),this.requestUpdate())}_handleTabClick(e){e.disabled||(this.activeTabId=e.id,this.dispatchEvent(new CustomEvent(\"tab-change\",{detail:{activeTabId:e.id},bubbles:!0,composed:!0})))}_handleTabDismiss(e,t){t.stopPropagation(),this.dispatchEvent(new CustomEvent(\"tab-dismiss\",{detail:{tabId:e.id},bubbles:!0,composed:!0}))}_handleKeyDown(e){const t=this._getTabs().filter(e=>!e.disabled),i=t.findIndex(e=>e.id===this.activeTabId);let o=-1;switch(e.key){case\"ArrowLeft\":o=i>0?i-1:t.length-1;break;case\"ArrowRight\":o=i<t.length-1?i+1:0;break;case\"Home\":o=0;break;case\"End\":o=t.length-1}if(o>=0){e.preventDefault();const i=t[o];this.activeTabId=i.id,this.dispatchEvent(new CustomEvent(\"tab-change\",{detail:{activeTabId:i.id},bubbles:!0,composed:!0}));const s=this.shadowRoot?.querySelectorAll(\".label\"),r=Array.from(s||[]).find(e=>e.getAttribute(\"data-tab-id\")===i.id);r?.focus()}}_renderTabIcon(e){const t=e.getIconElement();if(!t)return q;const i=t.cloneNode(!0);return i.removeAttribute(\"slot\"),V`<span class=\"label-icon\">${i}</span>`}render(){return V` <div class=\"header\" role=\"tablist\" @keydown=${this._handleKeyDown}> ${this._getTabs().map(e=>V` <button class=${$e({label:!0,\"label--active\":e.id===this.activeTabId})} role=\"tab\" data-tab-id=${e.id} aria-selected=${e.id===this.activeTabId} aria-controls=${`panel-${e.id}`} tabindex=${e.id===this.activeTabId?0:-1} ?disabled=${e.disabled} @click=${()=>this._handleTabClick(e)} > ${this._renderTabIcon(e)} <span>${e.title}</span> ${e.badge?V`<span class=\"label-badge\" style=${Ve({backgroundColor:e.badgeBackground,color:e.badgeColor})}>${e.badge}</span>`:q} ${e.dismissible?V` <button class=\"label-dismiss\" type=\"button\" aria-label=\"Close tab\" @click=${t=>this._handleTabDismiss(e,t)} > <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" width=\"12\" height=\"12\"><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} </button> `)} </div> <div class=\"content\" role=\"tabpanel\" aria-labelledby=${this.activeTabId||\"\"}> <slot @slotchange=${this._updateActiveTab}></slot> </div> `}}"
504
+ },
505
+ {
506
+ "kind": "variable",
507
+ "name": "Fe",
508
+ "default": "class extends ne{constructor(){super(...arguments),this.id=\"\",this.title=\"\",this.badge=\"\",this.badgeBackground=\"\",this.badgeColor=\"\",this.disabled=!1,this.dismissible=!1,this.active=!1}getIconElement(){return this.querySelector('[slot=\"icon\"]')}render(){return V`<slot></slot>`}}"
447
509
  },
448
510
  {
449
511
  "kind": "variable",
450
- "name": "Lt"
512
+ "name": "Ge",
513
+ "default": "class extends ne{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._handleInvalid=e=>{e.preventDefault(),this._touched=!0},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(e){this.value=e}connectedCallback(){super.connectedCallback(),this.addEventListener(\"invalid\",this._handleInvalid)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(\"invalid\",this._handleInvalid)}firstUpdated(){this._updateValidity()}updated(e){(e.has(\"required\")||e.has(\"value\"))&&this._updateValidity()}_updateValidity(){this._input&&this._internals.setValidity(this._input.validity,this._input.validationMessage)}_handleInput(e){this.value=e.target.value,this._dirty=!0,this._internals.setFormValue(this.value),this._internals.setValidity(this._input.validity,this._input.validationMessage)}_handleChange(e){this.value=e.target.value,this._internals.setFormValue(this.value)}_handleBlur(){this._touched=!0,this._internals.setValidity(this._input.validity,this._input.validationMessage)}render(){let e=\"\";return this._touched&&this._input&&!this._input.validity.valid&&(e=this._input.validationMessage),V` <div class=\"wrapper\"> ${this.label?V` <label for=\"input\"> ${this.label} ${this.required?V`<span class=\"required\" aria-hidden=\"true\">*</span>`:\"\"} </label> `:\"\"} <input id=\"input\" class=${$e({\"input--invalid\":this._touched&&this._input&&!this._input.validity.valid})} type=${this.type} name=${this.name} .value=${Ze(this.value)} placeholder=${this.placeholder} ?required=${this.required} ?disabled=${this.disabled} ?readonly=${this.readonly} minlength=${We(this.minlength)} maxlength=${We(this.maxlength)} pattern=${We(this.pattern)} autocomplete=${We(this.autocomplete||void 0)} @input=${this._handleInput} @change=${this._handleChange} @blur=${this._handleBlur} /> ${e?V`<div class=\"validation-message\">${e}</div>`:this.hint?V`<div class=\"hint\">${this.hint}</div>`:\"\"} </div> `}focus(){this._input?.focus()}blur(){this._input?.blur()}select(){this._input?.select()}}"
451
514
  },
452
515
  {
453
516
  "kind": "variable",
454
- "name": "Bt",
455
- "default": "class extends nt{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),V` <div class=\"wrapper\"> ${this.label?V` <label for=\"input\"> ${this.label} ${this.required?V`<span class=\"required\" aria-hidden=\"true\">*</span>`:\"\"} </label> `:\"\"} <input id=\"input\" type=${this.type} name=${this.name} .value=${Dt(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?V`<div class=\"validation-message\">${t}</div>`:this.hint?V`<div class=\"hint\">${this.hint}</div>`:\"\"} </div> `}focus(){this._input?.focus()}blur(){this._input?.blur()}select(){this._input?.select()}}"
517
+ "name": "Ye",
518
+ "default": "class extends ne{constructor(){super(),this.label=\"\",this.name=\"\",this.value=\"\",this.placeholder=\"Select an option\",this.disabled=!1,this.required=!1,this.readonly=!1,this.hint=\"\",this._isOpen=!1,this._highlightedIndex=-1,this._touched=!1,this._handleInvalid=e=>{e.preventDefault(),this._touched=!0},this._handleOutsideClick=e=>{this.contains(e.target)||this._close()},this._handleKeyDown=e=>{if(!this._isOpen)return;const t=Array.from(this.querySelectorAll(\"kr-select-option\"));switch(e.key){case\"Escape\":this._close(),this._triggerElement?.focus();break;case\"ArrowDown\":if(e.preventDefault(),t.some(e=>!e.disabled)){let e=this._highlightedIndex+1;for(;e<t.length&&t[e]?.disabled;)e++;e<t.length&&(this._highlightedIndex=e)}break;case\"ArrowUp\":e.preventDefault();{let e=this._highlightedIndex-1;for(;e>=0&&t[e]?.disabled;)e--;e>=0&&(this._highlightedIndex=e)}break;case\"Enter\":e.preventDefault(),this._highlightedIndex>=0&&this._highlightedIndex<t.length&&this._selectOption(t[this._highlightedIndex])}},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._internals.setFormValue(\"\"),this._internals.setValidity({})}formStateRestoreCallback(e){this.value=e}connectedCallback(){super.connectedCallback(),document.addEventListener(\"click\",this._handleOutsideClick),document.addEventListener(\"keydown\",this._handleKeyDown),this.addEventListener(\"invalid\",this._handleInvalid)}firstUpdated(){this._updateValidity()}updated(e){(e.has(\"required\")||e.has(\"value\"))&&this._updateValidity()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(\"click\",this._handleOutsideClick),document.removeEventListener(\"keydown\",this._handleKeyDown),this.removeEventListener(\"invalid\",this._handleInvalid)}_toggle(){if(!this.disabled&&!this.readonly)if(this._isOpen)this._close();else{this._isOpen=!0;const e=Array.from(this.querySelectorAll(\"kr-select-option\"));this._highlightedIndex=e.findIndex(e=>e.value===this.value)}}_close(){this._isOpen=!1,this._highlightedIndex=-1}_selectOption(e){e.disabled||(this.value=e.value,this._internals.setFormValue(this.value),this._updateValidity(),this.dispatchEvent(new Event(\"change\",{bubbles:!0,composed:!0})),this._close(),this._triggerElement?.focus())}_handleBlur(){this._touched=!0,this._updateValidity()}_updateValidity(){this.required&&!this.value?this._internals.setValidity({valueMissing:!0},\"Please select an option\",this._triggerElement):this._internals.setValidity({})}render(){const e=Array.from(this.querySelectorAll(\"kr-select-option\")),t=e.find(e=>e.value===this.value)?.label;return V` <div class=\"wrapper\"> ${this.label?V` <label> ${this.label} ${this.required?V`<span class=\"required\" aria-hidden=\"true\">*</span>`:\"\"} </label> `:q} <div class=\"select-wrapper\"> <button class=${$e({\"select-trigger\":!0,\"select-trigger--open\":this._isOpen,\"select-trigger--invalid\":this._touched&&this.required&&!this.value})} type=\"button\" ?disabled=${this.disabled} aria-haspopup=\"listbox\" aria-expanded=${this._isOpen} @click=${this._toggle} @blur=${this._handleBlur} > <span class=${$e({\"select-value\":!0,\"select-placeholder\":!t})}> ${t||this.placeholder} </span> <svg class=${$e({\"chevron-icon\":!0,\"select-icon\":!0,\"select-icon--open\":this._isOpen})} viewBox=\"0 0 20 20\" fill=\"currentColor\" > <path fill-rule=\"evenodd\" d=\"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z\" clip-rule=\"evenodd\" /> </svg> </button> <div class=${$e({\"select-dropdown\":!0,hidden:!this._isOpen})} role=\"listbox\"> <div class=\"select-options\"> ${0===e.length?V`<div class=\"select-empty\">No options available</div>`:e.map((e,t)=>{const i=e.value===this.value;return V` <div class=${$e({\"select-option\":!0,\"select-option--selected\":i,\"select-option--disabled\":e.disabled,\"select-option--highlighted\":t===this._highlightedIndex})} role=\"option\" aria-selected=${i} @click=${()=>this._selectOption(e)} @mouseenter=${()=>this._highlightedIndex=t} > ${e.label} ${i?V`<svg class=\"chevron-icon select-check\" viewBox=\"0 0 20 20\" fill=\"currentColor\"> <path fill-rule=\"evenodd\" d=\"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z\" clip-rule=\"evenodd\" /> </svg>`:q} </div> `})} </div> </div> </div> ${this._touched&&this.required&&!this.value?V`<div class=\"validation-message\">Please select an option</div>`:this.hint?V`<div class=\"hint\">${this.hint}</div>`:\"\"} </div> <div class=\"options-slot\"> <slot @slotchange=${()=>this.requestUpdate()}></slot> </div> `}focus(){this._triggerElement?.focus()}blur(){this._triggerElement?.blur()}}"
519
+ },
520
+ {
521
+ "kind": "variable",
522
+ "name": "tt",
523
+ "default": "class extends ne{constructor(){super(...arguments),this.value=\"\",this.disabled=!1}get label(){return this.textContent?.trim()||\"\"}render(){return V`<slot></slot>`}}"
456
524
  }
457
525
  ],
458
526
  "exports": [
459
527
  {
460
528
  "kind": "custom-element-definition",
461
- "name": "t",
529
+ "name": "e",
462
530
  "declaration": {
463
- "name": "e",
531
+ "name": "t",
464
532
  "module": "dist/krubble.bundled.min.js"
465
533
  }
466
534
  },
467
535
  {
468
536
  "kind": "custom-element-definition",
469
- "name": "t",
537
+ "name": "e",
470
538
  "declaration": {
471
- "name": "e",
539
+ "name": "t",
472
540
  "module": "dist/krubble.bundled.min.js"
473
541
  }
474
542
  },
@@ -476,7 +544,7 @@
476
544
  "kind": "js",
477
545
  "name": "DialogRef",
478
546
  "declaration": {
479
- "name": "Tt",
547
+ "name": "Me",
480
548
  "module": "dist/krubble.bundled.min.js"
481
549
  }
482
550
  },
@@ -484,7 +552,7 @@
484
552
  "kind": "js",
485
553
  "name": "KRAccordion",
486
554
  "declaration": {
487
- "name": "ft",
555
+ "name": "ge",
488
556
  "module": "dist/krubble.bundled.min.js"
489
557
  }
490
558
  },
@@ -492,7 +560,7 @@
492
560
  "kind": "js",
493
561
  "name": "KRAlert",
494
562
  "declaration": {
495
- "name": "kt",
563
+ "name": "Ae",
496
564
  "module": "dist/krubble.bundled.min.js"
497
565
  }
498
566
  },
@@ -500,7 +568,7 @@
500
568
  "kind": "js",
501
569
  "name": "KRButton",
502
570
  "declaration": {
503
- "name": "At",
571
+ "name": "Se",
504
572
  "module": "dist/krubble.bundled.min.js"
505
573
  }
506
574
  },
@@ -508,7 +576,7 @@
508
576
  "kind": "js",
509
577
  "name": "KRCodeDemo",
510
578
  "declaration": {
511
- "name": "Pt",
579
+ "name": "Pe",
512
580
  "module": "dist/krubble.bundled.min.js"
513
581
  }
514
582
  },
@@ -516,7 +584,7 @@
516
584
  "kind": "js",
517
585
  "name": "KRContextMenu",
518
586
  "declaration": {
519
- "name": "Mt",
587
+ "name": "ze",
520
588
  "module": "dist/krubble.bundled.min.js"
521
589
  }
522
590
  },
@@ -524,7 +592,23 @@
524
592
  "kind": "js",
525
593
  "name": "KRDialog",
526
594
  "declaration": {
527
- "name": "zt",
595
+ "name": "je",
596
+ "module": "dist/krubble.bundled.min.js"
597
+ }
598
+ },
599
+ {
600
+ "kind": "js",
601
+ "name": "KRSelect",
602
+ "declaration": {
603
+ "name": "Ye",
604
+ "module": "dist/krubble.bundled.min.js"
605
+ }
606
+ },
607
+ {
608
+ "kind": "js",
609
+ "name": "KRSelectOption",
610
+ "declaration": {
611
+ "name": "tt",
528
612
  "module": "dist/krubble.bundled.min.js"
529
613
  }
530
614
  },
@@ -532,7 +616,23 @@
532
616
  "kind": "js",
533
617
  "name": "KRSnackbar",
534
618
  "declaration": {
535
- "name": "Lt",
619
+ "name": "He",
620
+ "module": "dist/krubble.bundled.min.js"
621
+ }
622
+ },
623
+ {
624
+ "kind": "js",
625
+ "name": "KRTab",
626
+ "declaration": {
627
+ "name": "Fe",
628
+ "module": "dist/krubble.bundled.min.js"
629
+ }
630
+ },
631
+ {
632
+ "kind": "js",
633
+ "name": "KRTabGroup",
634
+ "declaration": {
635
+ "name": "qe",
536
636
  "module": "dist/krubble.bundled.min.js"
537
637
  }
538
638
  },
@@ -540,7 +640,15 @@
540
640
  "kind": "js",
541
641
  "name": "KRTextField",
542
642
  "declaration": {
543
- "name": "Bt",
643
+ "name": "Ge",
644
+ "module": "dist/krubble.bundled.min.js"
645
+ }
646
+ },
647
+ {
648
+ "kind": "js",
649
+ "name": "krBaseCSS",
650
+ "declaration": {
651
+ "name": "le",
544
652
  "module": "dist/krubble.bundled.min.js"
545
653
  }
546
654
  }
@@ -562,54 +670,9 @@
562
670
  "kind": "class",
563
671
  "description": "",
564
672
  "name": "e",
565
- "members": [
566
- {
567
- "kind": "field",
568
- "name": "_$AU",
569
- "readonly": true,
570
- "inheritedFrom": {
571
- "name": "i",
572
- "module": "dist/krubble.umd.js"
573
- }
574
- },
575
- {
576
- "kind": "method",
577
- "name": "_$AT",
578
- "parameters": [
579
- {
580
- "name": "t"
581
- },
582
- {
583
- "name": "e"
584
- },
585
- {
586
- "name": "i"
587
- }
588
- ],
589
- "inheritedFrom": {
590
- "name": "i",
591
- "module": "dist/krubble.umd.js"
592
- }
593
- },
594
- {
595
- "kind": "method",
596
- "name": "_$AS",
597
- "parameters": [
598
- {
599
- "name": "t"
600
- },
601
- {
602
- "name": "e"
603
- }
604
- ],
605
- "inheritedFrom": {
606
- "name": "i",
607
- "module": "dist/krubble.umd.js"
608
- }
609
- }
610
- ],
673
+ "members": [],
611
674
  "superclass": {
612
- "name": "i",
675
+ "name": "i$1",
613
676
  "module": "dist/krubble.umd.js"
614
677
  },
615
678
  "tagName": "t",
@@ -670,157 +733,31 @@
670
733
  },
671
734
  {
672
735
  "kind": "javascript-module",
673
- "path": "src/alert.ts",
674
- "declarations": [
736
+ "path": "src/index.ts",
737
+ "declarations": [],
738
+ "exports": [
675
739
  {
676
- "kind": "class",
677
- "description": "A customizable alert component for displaying important information to users.",
678
- "name": "KRAlert",
679
- "slots": [
680
- {
681
- "description": "The alert message content",
682
- "name": ""
683
- }
684
- ],
685
- "members": [
686
- {
687
- "kind": "field",
688
- "name": "type",
689
- "type": {
690
- "text": "'info' | 'success' | 'warning' | 'error'"
691
- },
692
- "default": "'info'",
693
- "description": "The alert type/severity",
694
- "attribute": "type"
695
- },
696
- {
697
- "kind": "field",
698
- "name": "header",
699
- "type": {
700
- "text": "string | undefined"
701
- },
702
- "description": "Optional header text",
703
- "attribute": "header"
704
- },
705
- {
706
- "kind": "field",
707
- "name": "dismissible",
708
- "type": {
709
- "text": "boolean"
710
- },
711
- "default": "false",
712
- "description": "Whether the alert can be dismissed",
713
- "attribute": "dismissible"
714
- },
715
- {
716
- "kind": "field",
717
- "name": "visible",
718
- "type": {
719
- "text": "boolean"
720
- },
721
- "default": "true",
722
- "description": "Whether the alert is visible",
723
- "attribute": "visible"
724
- },
725
- {
726
- "kind": "method",
727
- "name": "_handleDismiss",
728
- "privacy": "private",
729
- "description": "Handles dismiss button click"
730
- }
731
- ],
732
- "events": [
733
- {
734
- "name": "dismiss",
735
- "type": {
736
- "text": "CustomEvent"
737
- },
738
- "description": "Fired when the dismiss button is clicked"
739
- }
740
- ],
741
- "attributes": [
742
- {
743
- "name": "type",
744
- "type": {
745
- "text": "'info' | 'success' | 'warning' | 'error'"
746
- },
747
- "default": "'info'",
748
- "description": "The alert type/severity",
749
- "fieldName": "type"
750
- },
751
- {
752
- "name": "header",
753
- "type": {
754
- "text": "string | undefined"
755
- },
756
- "description": "Optional header text",
757
- "fieldName": "header"
758
- },
759
- {
760
- "name": "dismissible",
761
- "type": {
762
- "text": "boolean"
763
- },
764
- "default": "false",
765
- "description": "Whether the alert can be dismissed",
766
- "fieldName": "dismissible"
767
- },
768
- {
769
- "name": "visible",
770
- "type": {
771
- "text": "boolean"
772
- },
773
- "default": "true",
774
- "description": "Whether the alert is visible",
775
- "fieldName": "visible"
776
- }
777
- ],
778
- "superclass": {
779
- "name": "LitElement",
780
- "package": "lit"
781
- },
782
- "tagName": "kr-alert",
783
- "customElement": true
784
- }
785
- ],
786
- "exports": [
787
- {
788
- "kind": "js",
789
- "name": "KRAlert",
790
- "declaration": {
791
- "name": "KRAlert",
792
- "module": "src/alert.ts"
793
- }
794
- },
795
- {
796
- "kind": "custom-element-definition",
797
- "name": "kr-alert",
798
- "declaration": {
799
- "name": "KRAlert",
800
- "module": "src/alert.ts"
801
- }
802
- }
803
- ]
804
- },
805
- {
806
- "kind": "javascript-module",
807
- "path": "src/index.ts",
808
- "declarations": [],
809
- "exports": [
810
- {
811
- "kind": "js",
812
- "name": "KRAccordion",
813
- "declaration": {
814
- "name": "KRAccordion",
815
- "module": "./accordion/accordion.js"
816
- }
817
- },
818
- {
819
- "kind": "js",
740
+ "kind": "js",
741
+ "name": "krBaseCSS",
742
+ "declaration": {
743
+ "name": "krBaseCSS",
744
+ "module": "./style/base.js"
745
+ }
746
+ },
747
+ {
748
+ "kind": "js",
749
+ "name": "KRAccordion",
750
+ "declaration": {
751
+ "name": "KRAccordion",
752
+ "module": "./accordion/accordion.js"
753
+ }
754
+ },
755
+ {
756
+ "kind": "js",
820
757
  "name": "KRAlert",
821
758
  "declaration": {
822
759
  "name": "KRAlert",
823
- "module": "./alert.js"
760
+ "module": "./alert/alert.js"
824
761
  }
825
762
  },
826
763
  {
@@ -871,6 +808,22 @@
871
808
  "module": "./snackbar/snackbar.js"
872
809
  }
873
810
  },
811
+ {
812
+ "kind": "js",
813
+ "name": "KRTabGroup",
814
+ "declaration": {
815
+ "name": "KRTabGroup",
816
+ "module": "./tabs/tabs.js"
817
+ }
818
+ },
819
+ {
820
+ "kind": "js",
821
+ "name": "KRTab",
822
+ "declaration": {
823
+ "name": "KRTab",
824
+ "module": "./tabs/tab.js"
825
+ }
826
+ },
874
827
  {
875
828
  "kind": "js",
876
829
  "name": "KRTextField",
@@ -879,6 +832,22 @@
879
832
  "module": "./form/index.js"
880
833
  }
881
834
  },
835
+ {
836
+ "kind": "js",
837
+ "name": "KRSelect",
838
+ "declaration": {
839
+ "name": "KRSelect",
840
+ "module": "./form/index.js"
841
+ }
842
+ },
843
+ {
844
+ "kind": "js",
845
+ "name": "KRSelectOption",
846
+ "declaration": {
847
+ "name": "KRSelectOption",
848
+ "module": "./form/index.js"
849
+ }
850
+ },
882
851
  {
883
852
  "kind": "js",
884
853
  "name": "ContextMenuItem",
@@ -913,6 +882,28 @@
913
882
  }
914
883
  ]
915
884
  },
885
+ {
886
+ "kind": "javascript-module",
887
+ "path": "dist/alert/alert.js",
888
+ "declarations": [
889
+ {
890
+ "kind": "variable",
891
+ "name": "KRAlert",
892
+ "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> `; } }",
893
+ "description": "A customizable alert component for displaying important information to users."
894
+ }
895
+ ],
896
+ "exports": [
897
+ {
898
+ "kind": "js",
899
+ "name": "KRAlert",
900
+ "declaration": {
901
+ "name": "KRAlert",
902
+ "module": "dist/alert/alert.js"
903
+ }
904
+ }
905
+ ]
906
+ },
916
907
  {
917
908
  "kind": "javascript-module",
918
909
  "path": "dist/accordion/accordion.js",
@@ -942,7 +933,7 @@
942
933
  {
943
934
  "kind": "variable",
944
935
  "name": "KRButton",
945
- "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> `; } }",
936
+ "default": "class KRButton extends LitElement { constructor() { super(...arguments); /** * The button variant (shape) */ this.variant = 'flat'; /** * The button color */ this.color = 'primary'; /** * The button size */ this.size = 'medium'; /** * Whether the button is disabled */ this.disabled = false; this._state = 'idle'; this._stateText = ''; this._handleKeydown = (e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); this.click(); } }; } connectedCallback() { super.connectedCallback(); this.setAttribute('role', 'button'); this.setAttribute('tabindex', '0'); this.addEventListener('keydown', this._handleKeydown); } disconnectedCallback() { super.disconnectedCallback(); this.removeEventListener('keydown', this._handleKeydown); } /** * Shows a loading spinner and disables the button. */ showLoading() { this._clearStateTimeout(); this._state = 'loading'; this._stateText = ''; } /** * Shows a success state with optional custom text. * @param text - Text to display (default: \"Saved\") * @param duration - Duration in ms before auto-reset (default: 2000) */ showSuccess(text = 'Success', duration = 2000) { this._clearStateTimeout(); this._state = 'success'; this._stateText = text; this._stateTimeout = window.setTimeout(() => this.reset(), duration); } /** * Shows an error state with optional custom text. * @param text - Text to display (default: \"Error\") * @param duration - Duration in ms before auto-reset (default: 2000) */ showError(text = 'Error', duration = 2000) { this._clearStateTimeout(); this._state = 'error'; this._stateText = text; this._stateTimeout = window.setTimeout(() => this.reset(), duration); } /** * Resets the button to its idle state. */ reset() { this._clearStateTimeout(); this._state = 'idle'; this._stateText = ''; } _clearStateTimeout() { if (this._stateTimeout) { clearTimeout(this._stateTimeout); this._stateTimeout = undefined; } } updated(changedProperties) { // Reflect state classes to host this.classList.toggle('kr-button--loading', this._state === 'loading'); this.classList.toggle('kr-button--success', this._state === 'success'); this.classList.toggle('kr-button--error', this._state === 'error'); this.classList.toggle(`kr-button--${this.variant}`, true); this.classList.toggle(`kr-button--${this.color}`, true); this.classList.toggle('kr-button--small', this.size === 'small'); this.classList.toggle('kr-button--large', this.size === 'large'); } render() { return html ` <slot></slot> ${this._state !== 'idle' ? html `<span class=\"state-overlay\"> ${this._state === 'loading' ? html `<span class=\"spinner\"></span>` : this._stateText} </span>` : ''} `; } }",
946
937
  "description": "A customizable button component."
947
938
  }
948
939
  ],
@@ -1084,6 +1075,22 @@
1084
1075
  "name": "KRTextField",
1085
1076
  "module": "./text-field/text-field.js"
1086
1077
  }
1078
+ },
1079
+ {
1080
+ "kind": "js",
1081
+ "name": "KRSelect",
1082
+ "declaration": {
1083
+ "name": "KRSelect",
1084
+ "module": "./select/select.js"
1085
+ }
1086
+ },
1087
+ {
1088
+ "kind": "js",
1089
+ "name": "KRSelectOption",
1090
+ "declaration": {
1091
+ "name": "KRSelectOption",
1092
+ "module": "./select/select-option.js"
1093
+ }
1087
1094
  }
1088
1095
  ]
1089
1096
  },
@@ -1108,6 +1115,72 @@
1108
1115
  }
1109
1116
  ]
1110
1117
  },
1118
+ {
1119
+ "kind": "javascript-module",
1120
+ "path": "dist/style/base.js",
1121
+ "declarations": [
1122
+ {
1123
+ "kind": "variable",
1124
+ "name": "krBaseCSS",
1125
+ "default": "css ` :host, *, *::before, *::after { box-sizing: border-box; } :host { /* Primary */ --kr-primary: rgb(22, 48, 82); --kr-primary-hover: rgb(16, 36, 62); --kr-primary-text: #ffffff; /* Accent */ --kr-accent: #BEEA4E; --kr-accent-hover: #a8d43a; --kr-accent-text: #000000; /* Text */ --kr-text: #000000; --kr-text-muted: #4b5563; --kr-text-disabled: #9ca3af; /* Borders */ --kr-border: #e5e7eb; } `",
1126
+ "description": "Base theme styles with CSS custom properties.\nImport into components: static styles = [krBaseCSS, css`...`]"
1127
+ }
1128
+ ],
1129
+ "exports": [
1130
+ {
1131
+ "kind": "js",
1132
+ "name": "krBaseCSS",
1133
+ "declaration": {
1134
+ "name": "krBaseCSS",
1135
+ "module": "dist/style/base.js"
1136
+ }
1137
+ }
1138
+ ]
1139
+ },
1140
+ {
1141
+ "kind": "javascript-module",
1142
+ "path": "dist/tabs/tab.js",
1143
+ "declarations": [
1144
+ {
1145
+ "kind": "variable",
1146
+ "name": "KRTab",
1147
+ "default": "class KRTab extends LitElement { constructor() { super(...arguments); /** * Unique identifier for the tab */ this.id = ''; /** * Display title for the tab */ this.title = ''; /** * Badge text displayed next to title (e.g. notification count) */ this.badge = ''; /** * Badge background color */ this.badgeBackground = ''; /** * Badge text color */ this.badgeColor = ''; /** * Whether the tab is disabled */ this.disabled = false; /** * Whether the tab can be dismissed/closed */ this.dismissible = false; /** * Whether this tab is currently active (set by parent) */ this.active = false; } /** * Gets the icon element from the icon slot (if any) */ getIconElement() { return this.querySelector('[slot=\"icon\"]'); } render() { return html `<slot></slot>`; } }",
1148
+ "description": "A tab for the kr-tab-group component."
1149
+ }
1150
+ ],
1151
+ "exports": [
1152
+ {
1153
+ "kind": "js",
1154
+ "name": "KRTab",
1155
+ "declaration": {
1156
+ "name": "KRTab",
1157
+ "module": "dist/tabs/tab.js"
1158
+ }
1159
+ }
1160
+ ]
1161
+ },
1162
+ {
1163
+ "kind": "javascript-module",
1164
+ "path": "dist/tabs/tabs.js",
1165
+ "declarations": [
1166
+ {
1167
+ "kind": "variable",
1168
+ "name": "KRTabGroup",
1169
+ "default": "class KRTabGroup extends LitElement { updated(changes) { if (changes.has('activeTabId')) { this._updateActiveTab(); } } firstUpdated() { this._updateActiveTab(); } _getTabs() { return Array.from(this.querySelectorAll('kr-tab')); } _updateActiveTab() { const tabs = this._getTabs(); if (tabs.length === 0) return; if (!this.activeTabId) { this.activeTabId = tabs[0]?.id; } tabs.forEach((tab) => { tab.active = tab.id === this.activeTabId; }); this.requestUpdate(); } _handleTabClick(tab) { if (tab.disabled) return; this.activeTabId = tab.id; this.dispatchEvent(new CustomEvent('tab-change', { detail: { activeTabId: tab.id }, bubbles: true, composed: true, })); } _handleTabDismiss(tab, e) { e.stopPropagation(); this.dispatchEvent(new CustomEvent('tab-dismiss', { detail: { tabId: tab.id }, bubbles: true, composed: true, })); } _handleKeyDown(e) { const enabledTabs = this._getTabs().filter((t) => !t.disabled); const currentIndex = enabledTabs.findIndex((t) => t.id === this.activeTabId); let newIndex = -1; switch (e.key) { case 'ArrowLeft': newIndex = currentIndex > 0 ? currentIndex - 1 : enabledTabs.length - 1; break; case 'ArrowRight': newIndex = currentIndex < enabledTabs.length - 1 ? currentIndex + 1 : 0; break; case 'Home': newIndex = 0; break; case 'End': newIndex = enabledTabs.length - 1; break; } if (newIndex >= 0) { e.preventDefault(); const newTab = enabledTabs[newIndex]; this.activeTabId = newTab.id; this.dispatchEvent(new CustomEvent('tab-change', { detail: { activeTabId: newTab.id }, bubbles: true, composed: true, })); const tabButtons = this.shadowRoot?.querySelectorAll('.label'); const targetButton = Array.from(tabButtons || []).find((btn) => btn.getAttribute('data-tab-id') === newTab.id); targetButton?.focus(); } } _renderTabIcon(tab) { const iconElement = tab.getIconElement(); if (!iconElement) return nothing; // Clone the icon element to render in the header const clonedIcon = iconElement.cloneNode(true); clonedIcon.removeAttribute('slot'); return html `<span class=\"label-icon\">${clonedIcon}</span>`; } render() { return html ` <div class=\"header\" role=\"tablist\" @keydown=${this._handleKeyDown}> ${this._getTabs().map((tab) => html ` <button class=${classMap({ label: true, 'label--active': tab.id === this.activeTabId, })} role=\"tab\" data-tab-id=${tab.id} aria-selected=${tab.id === this.activeTabId} aria-controls=${`panel-${tab.id}`} tabindex=${tab.id === this.activeTabId ? 0 : -1} ?disabled=${tab.disabled} @click=${() => this._handleTabClick(tab)} > ${this._renderTabIcon(tab)} <span>${tab.title}</span> ${tab.badge ? html `<span class=\"label-badge\" style=${styleMap({ backgroundColor: tab.badgeBackground, color: tab.badgeColor })}>${tab.badge}</span>` : nothing} ${tab.dismissible ? html ` <button class=\"label-dismiss\" type=\"button\" aria-label=\"Close tab\" @click=${(e) => this._handleTabDismiss(tab, e)} > <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" width=\"12\" height=\"12\"><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} </button> `)} </div> <div class=\"content\" role=\"tabpanel\" aria-labelledby=${this.activeTabId || ''}> <slot @slotchange=${this._updateActiveTab}></slot> </div> `; } }",
1170
+ "description": "A tabbed navigation component for switching between content sections."
1171
+ }
1172
+ ],
1173
+ "exports": [
1174
+ {
1175
+ "kind": "js",
1176
+ "name": "KRTabGroup",
1177
+ "declaration": {
1178
+ "name": "KRTabGroup",
1179
+ "module": "dist/tabs/tabs.js"
1180
+ }
1181
+ }
1182
+ ]
1183
+ },
1111
1184
  {
1112
1185
  "kind": "javascript-module",
1113
1186
  "path": "src/accordion/accordion.ts",
@@ -1199,72 +1272,303 @@
1199
1272
  },
1200
1273
  {
1201
1274
  "kind": "javascript-module",
1202
- "path": "src/button/button.ts",
1275
+ "path": "src/alert/alert.ts",
1203
1276
  "declarations": [
1204
1277
  {
1205
1278
  "kind": "class",
1206
- "description": "A customizable button component.",
1207
- "name": "KRButton",
1208
- "cssParts": [
1209
- {
1210
- "description": "The button element",
1211
- "name": "button"
1212
- }
1213
- ],
1279
+ "description": "A customizable alert component for displaying important information to users.",
1280
+ "name": "KRAlert",
1214
1281
  "slots": [
1215
1282
  {
1216
- "description": "The button content",
1283
+ "description": "The alert message content",
1217
1284
  "name": ""
1218
1285
  }
1219
1286
  ],
1220
1287
  "members": [
1221
1288
  {
1222
1289
  "kind": "field",
1223
- "name": "variant",
1290
+ "name": "type",
1224
1291
  "type": {
1225
- "text": "'primary' | 'secondary' | 'outline'"
1292
+ "text": "'info' | 'success' | 'warning' | 'error'"
1226
1293
  },
1227
- "default": "'primary'",
1228
- "description": "The button variant style",
1229
- "attribute": "variant"
1294
+ "default": "'info'",
1295
+ "description": "The alert type/severity",
1296
+ "attribute": "type"
1230
1297
  },
1231
1298
  {
1232
1299
  "kind": "field",
1233
- "name": "size",
1300
+ "name": "header",
1234
1301
  "type": {
1235
- "text": "'small' | 'medium' | 'large'"
1302
+ "text": "string | undefined"
1236
1303
  },
1237
- "default": "'medium'",
1238
- "description": "The button size",
1239
- "attribute": "size"
1304
+ "description": "Optional header text",
1305
+ "attribute": "header"
1240
1306
  },
1241
1307
  {
1242
1308
  "kind": "field",
1243
- "name": "disabled",
1309
+ "name": "dismissible",
1244
1310
  "type": {
1245
1311
  "text": "boolean"
1246
1312
  },
1247
1313
  "default": "false",
1248
- "description": "Whether the button is disabled",
1249
- "attribute": "disabled"
1314
+ "description": "Whether the alert can be dismissed",
1315
+ "attribute": "dismissible"
1316
+ },
1317
+ {
1318
+ "kind": "field",
1319
+ "name": "visible",
1320
+ "type": {
1321
+ "text": "boolean"
1322
+ },
1323
+ "default": "true",
1324
+ "description": "Whether the alert is visible",
1325
+ "attribute": "visible"
1326
+ },
1327
+ {
1328
+ "kind": "method",
1329
+ "name": "_handleDismiss",
1330
+ "privacy": "private",
1331
+ "description": "Handles dismiss button click"
1250
1332
  }
1251
1333
  ],
1252
1334
  "events": [
1253
1335
  {
1254
- "description": "Fired when the button is clicked",
1255
- "name": "click"
1336
+ "name": "dismiss",
1337
+ "type": {
1338
+ "text": "CustomEvent"
1339
+ },
1340
+ "description": "Fired when the dismiss button is clicked"
1256
1341
  }
1257
1342
  ],
1258
1343
  "attributes": [
1259
1344
  {
1345
+ "name": "type",
1346
+ "type": {
1347
+ "text": "'info' | 'success' | 'warning' | 'error'"
1348
+ },
1349
+ "default": "'info'",
1350
+ "description": "The alert type/severity",
1351
+ "fieldName": "type"
1352
+ },
1353
+ {
1354
+ "name": "header",
1355
+ "type": {
1356
+ "text": "string | undefined"
1357
+ },
1358
+ "description": "Optional header text",
1359
+ "fieldName": "header"
1360
+ },
1361
+ {
1362
+ "name": "dismissible",
1363
+ "type": {
1364
+ "text": "boolean"
1365
+ },
1366
+ "default": "false",
1367
+ "description": "Whether the alert can be dismissed",
1368
+ "fieldName": "dismissible"
1369
+ },
1370
+ {
1371
+ "name": "visible",
1372
+ "type": {
1373
+ "text": "boolean"
1374
+ },
1375
+ "default": "true",
1376
+ "description": "Whether the alert is visible",
1377
+ "fieldName": "visible"
1378
+ }
1379
+ ],
1380
+ "superclass": {
1381
+ "name": "LitElement",
1382
+ "package": "lit"
1383
+ },
1384
+ "tagName": "kr-alert",
1385
+ "customElement": true
1386
+ }
1387
+ ],
1388
+ "exports": [
1389
+ {
1390
+ "kind": "js",
1391
+ "name": "KRAlert",
1392
+ "declaration": {
1393
+ "name": "KRAlert",
1394
+ "module": "src/alert/alert.ts"
1395
+ }
1396
+ },
1397
+ {
1398
+ "kind": "custom-element-definition",
1399
+ "name": "kr-alert",
1400
+ "declaration": {
1401
+ "name": "KRAlert",
1402
+ "module": "src/alert/alert.ts"
1403
+ }
1404
+ }
1405
+ ]
1406
+ },
1407
+ {
1408
+ "kind": "javascript-module",
1409
+ "path": "src/button/button.ts",
1410
+ "declarations": [
1411
+ {
1412
+ "kind": "class",
1413
+ "description": "A customizable button component.",
1414
+ "name": "KRButton",
1415
+ "slots": [
1416
+ {
1417
+ "description": "The button content",
1418
+ "name": ""
1419
+ }
1420
+ ],
1421
+ "members": [
1422
+ {
1423
+ "kind": "field",
1260
1424
  "name": "variant",
1261
1425
  "type": {
1262
- "text": "'primary' | 'secondary' | 'outline'"
1426
+ "text": "'flat' | 'outline'"
1427
+ },
1428
+ "default": "'flat'",
1429
+ "description": "The button variant (shape)",
1430
+ "attribute": "variant",
1431
+ "reflects": true
1432
+ },
1433
+ {
1434
+ "kind": "field",
1435
+ "name": "color",
1436
+ "type": {
1437
+ "text": "'primary' | 'secondary'"
1263
1438
  },
1264
1439
  "default": "'primary'",
1265
- "description": "The button variant style",
1440
+ "description": "The button color",
1441
+ "attribute": "color",
1442
+ "reflects": true
1443
+ },
1444
+ {
1445
+ "kind": "field",
1446
+ "name": "size",
1447
+ "type": {
1448
+ "text": "'small' | 'medium' | 'large'"
1449
+ },
1450
+ "default": "'medium'",
1451
+ "description": "The button size",
1452
+ "attribute": "size",
1453
+ "reflects": true
1454
+ },
1455
+ {
1456
+ "kind": "field",
1457
+ "name": "disabled",
1458
+ "type": {
1459
+ "text": "boolean"
1460
+ },
1461
+ "default": "false",
1462
+ "description": "Whether the button is disabled",
1463
+ "attribute": "disabled",
1464
+ "reflects": true
1465
+ },
1466
+ {
1467
+ "kind": "field",
1468
+ "name": "_state",
1469
+ "type": {
1470
+ "text": "'idle' | 'loading' | 'success' | 'error'"
1471
+ },
1472
+ "privacy": "private",
1473
+ "default": "'idle'"
1474
+ },
1475
+ {
1476
+ "kind": "field",
1477
+ "name": "_stateText",
1478
+ "type": {
1479
+ "text": "string"
1480
+ },
1481
+ "privacy": "private",
1482
+ "default": "''"
1483
+ },
1484
+ {
1485
+ "kind": "field",
1486
+ "name": "_stateTimeout",
1487
+ "type": {
1488
+ "text": "number | undefined"
1489
+ },
1490
+ "privacy": "private"
1491
+ },
1492
+ {
1493
+ "kind": "field",
1494
+ "name": "_handleKeydown",
1495
+ "privacy": "private"
1496
+ },
1497
+ {
1498
+ "kind": "method",
1499
+ "name": "showLoading",
1500
+ "description": "Shows a loading spinner and disables the button."
1501
+ },
1502
+ {
1503
+ "kind": "method",
1504
+ "name": "showSuccess",
1505
+ "parameters": [
1506
+ {
1507
+ "name": "text",
1508
+ "default": "'Success'",
1509
+ "description": "Text to display (default: \"Saved\")"
1510
+ },
1511
+ {
1512
+ "name": "duration",
1513
+ "default": "2000",
1514
+ "description": "Duration in ms before auto-reset (default: 2000)"
1515
+ }
1516
+ ],
1517
+ "description": "Shows a success state with optional custom text."
1518
+ },
1519
+ {
1520
+ "kind": "method",
1521
+ "name": "showError",
1522
+ "parameters": [
1523
+ {
1524
+ "name": "text",
1525
+ "default": "'Error'",
1526
+ "description": "Text to display (default: \"Error\")"
1527
+ },
1528
+ {
1529
+ "name": "duration",
1530
+ "default": "2000",
1531
+ "description": "Duration in ms before auto-reset (default: 2000)"
1532
+ }
1533
+ ],
1534
+ "description": "Shows an error state with optional custom text."
1535
+ },
1536
+ {
1537
+ "kind": "method",
1538
+ "name": "reset",
1539
+ "description": "Resets the button to its idle state."
1540
+ },
1541
+ {
1542
+ "kind": "method",
1543
+ "name": "_clearStateTimeout",
1544
+ "privacy": "private"
1545
+ }
1546
+ ],
1547
+ "events": [
1548
+ {
1549
+ "description": "Fired when the button is clicked",
1550
+ "name": "click"
1551
+ }
1552
+ ],
1553
+ "attributes": [
1554
+ {
1555
+ "name": "variant",
1556
+ "type": {
1557
+ "text": "'flat' | 'outline'"
1558
+ },
1559
+ "default": "'flat'",
1560
+ "description": "The button variant (shape)",
1266
1561
  "fieldName": "variant"
1267
1562
  },
1563
+ {
1564
+ "name": "color",
1565
+ "type": {
1566
+ "text": "'primary' | 'secondary'"
1567
+ },
1568
+ "default": "'primary'",
1569
+ "description": "The button color",
1570
+ "fieldName": "color"
1571
+ },
1268
1572
  {
1269
1573
  "name": "size",
1270
1574
  "type": {
@@ -1787,6 +2091,22 @@
1787
2091
  "name": "KRTextField",
1788
2092
  "module": "./text-field/text-field.js"
1789
2093
  }
2094
+ },
2095
+ {
2096
+ "kind": "js",
2097
+ "name": "KRSelect",
2098
+ "declaration": {
2099
+ "name": "KRSelect",
2100
+ "module": "./select/select.js"
2101
+ }
2102
+ },
2103
+ {
2104
+ "kind": "js",
2105
+ "name": "KRSelectOption",
2106
+ "declaration": {
2107
+ "name": "KRSelectOption",
2108
+ "module": "./select/select-option.js"
2109
+ }
1790
2110
  }
1791
2111
  ]
1792
2112
  },
@@ -1966,131 +2286,1015 @@
1966
2286
  },
1967
2287
  {
1968
2288
  "kind": "javascript-module",
1969
- "path": "dist/form/text-field/text-field.js",
2289
+ "path": "src/style/base.ts",
1970
2290
  "declarations": [
1971
2291
  {
1972
2292
  "kind": "variable",
1973
- "name": "KRTextField",
1974
- "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(); } }",
1975
- "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."
2293
+ "name": "krBaseCSS",
2294
+ "default": "css` :host, *, *::before, *::after { box-sizing: border-box; } :host { /* Primary */ --kr-primary: rgb(22, 48, 82); --kr-primary-hover: rgb(16, 36, 62); --kr-primary-text: #ffffff; /* Accent */ --kr-accent: #BEEA4E; --kr-accent-hover: #a8d43a; --kr-accent-text: #000000; /* Text */ --kr-text: #000000; --kr-text-muted: #4b5563; --kr-text-disabled: #9ca3af; /* Borders */ --kr-border: #e5e7eb; } `",
2295
+ "description": "Base theme styles with CSS custom properties.\nImport into components: static styles = [krBaseCSS, css`...`]"
1976
2296
  }
1977
2297
  ],
1978
2298
  "exports": [
1979
2299
  {
1980
2300
  "kind": "js",
1981
- "name": "KRTextField",
2301
+ "name": "krBaseCSS",
1982
2302
  "declaration": {
1983
- "name": "KRTextField",
1984
- "module": "dist/form/text-field/text-field.js"
2303
+ "name": "krBaseCSS",
2304
+ "module": "src/style/base.ts"
1985
2305
  }
1986
2306
  }
1987
2307
  ]
1988
2308
  },
1989
2309
  {
1990
2310
  "kind": "javascript-module",
1991
- "path": "src/form/text-field/text-field.ts",
2311
+ "path": "src/tabs/tab.ts",
1992
2312
  "declarations": [
1993
2313
  {
1994
2314
  "kind": "class",
1995
- "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.",
1996
- "name": "KRTextField",
1997
- "members": [
2315
+ "description": "A tab for the kr-tab-group component.",
2316
+ "name": "KRTab",
2317
+ "slots": [
1998
2318
  {
1999
- "kind": "field",
2000
- "name": "formAssociated",
2001
- "type": {
2002
- "text": "boolean"
2003
- },
2004
- "static": true,
2005
- "default": "true"
2319
+ "description": "The tab panel content",
2320
+ "name": ""
2006
2321
  },
2007
2322
  {
2008
- "kind": "field",
2009
- "name": "_internals",
2010
- "type": {
2011
- "text": "ElementInternals"
2012
- },
2013
- "privacy": "private"
2014
- },
2323
+ "description": "Optional icon to display in the tab header",
2324
+ "name": "icon"
2325
+ }
2326
+ ],
2327
+ "members": [
2015
2328
  {
2016
2329
  "kind": "field",
2017
- "name": "label",
2330
+ "name": "id",
2018
2331
  "type": {
2019
2332
  "text": "string"
2020
2333
  },
2021
2334
  "default": "''",
2022
- "description": "The input label text",
2023
- "attribute": "label"
2335
+ "description": "Unique identifier for the tab",
2336
+ "attribute": "id",
2337
+ "reflects": true
2024
2338
  },
2025
2339
  {
2026
2340
  "kind": "field",
2027
- "name": "name",
2341
+ "name": "title",
2028
2342
  "type": {
2029
2343
  "text": "string"
2030
2344
  },
2031
2345
  "default": "''",
2032
- "description": "The input name for form submission",
2033
- "attribute": "name"
2346
+ "description": "Display title for the tab",
2347
+ "attribute": "title"
2034
2348
  },
2035
2349
  {
2036
2350
  "kind": "field",
2037
- "name": "value",
2351
+ "name": "badge",
2038
2352
  "type": {
2039
2353
  "text": "string"
2040
2354
  },
2041
2355
  "default": "''",
2042
- "description": "The current value",
2043
- "attribute": "value"
2356
+ "description": "Badge text displayed next to title (e.g. notification count)",
2357
+ "attribute": "badge"
2044
2358
  },
2045
2359
  {
2046
2360
  "kind": "field",
2047
- "name": "placeholder",
2361
+ "name": "badgeBackground",
2048
2362
  "type": {
2049
2363
  "text": "string"
2050
2364
  },
2051
2365
  "default": "''",
2052
- "description": "Placeholder text",
2053
- "attribute": "placeholder"
2366
+ "description": "Badge background color",
2367
+ "attribute": "badge-background"
2054
2368
  },
2055
2369
  {
2056
2370
  "kind": "field",
2057
- "name": "type",
2371
+ "name": "badgeColor",
2058
2372
  "type": {
2059
- "text": "'text' | 'email' | 'password' | 'tel' | 'url' | 'search'"
2373
+ "text": "string"
2060
2374
  },
2061
- "default": "'text'",
2062
- "description": "Input type (text, email, password, tel, url, search)",
2063
- "attribute": "type"
2375
+ "default": "''",
2376
+ "description": "Badge text color",
2377
+ "attribute": "badge-color"
2064
2378
  },
2065
2379
  {
2066
2380
  "kind": "field",
2067
- "name": "required",
2381
+ "name": "disabled",
2068
2382
  "type": {
2069
2383
  "text": "boolean"
2070
2384
  },
2071
2385
  "default": "false",
2072
- "description": "Whether the field is required",
2073
- "attribute": "required"
2386
+ "description": "Whether the tab is disabled",
2387
+ "attribute": "disabled"
2074
2388
  },
2075
2389
  {
2076
2390
  "kind": "field",
2077
- "name": "disabled",
2391
+ "name": "dismissible",
2078
2392
  "type": {
2079
2393
  "text": "boolean"
2080
2394
  },
2081
2395
  "default": "false",
2082
- "description": "Whether the field is disabled",
2083
- "attribute": "disabled"
2396
+ "description": "Whether the tab can be dismissed/closed",
2397
+ "attribute": "dismissible"
2084
2398
  },
2085
2399
  {
2086
2400
  "kind": "field",
2087
- "name": "readonly",
2401
+ "name": "active",
2088
2402
  "type": {
2089
2403
  "text": "boolean"
2090
2404
  },
2091
2405
  "default": "false",
2092
- "description": "Whether the field is readonly",
2093
- "attribute": "readonly"
2406
+ "description": "Whether this tab is currently active (set by parent)",
2407
+ "attribute": "active",
2408
+ "reflects": true
2409
+ },
2410
+ {
2411
+ "kind": "method",
2412
+ "name": "getIconElement",
2413
+ "return": {
2414
+ "type": {
2415
+ "text": "Element | null"
2416
+ }
2417
+ },
2418
+ "description": "Gets the icon element from the icon slot (if any)"
2419
+ }
2420
+ ],
2421
+ "attributes": [
2422
+ {
2423
+ "name": "id",
2424
+ "type": {
2425
+ "text": "string"
2426
+ },
2427
+ "default": "''",
2428
+ "description": "Unique identifier for the tab",
2429
+ "fieldName": "id"
2430
+ },
2431
+ {
2432
+ "name": "title",
2433
+ "type": {
2434
+ "text": "string"
2435
+ },
2436
+ "default": "''",
2437
+ "description": "Display title for the tab",
2438
+ "fieldName": "title"
2439
+ },
2440
+ {
2441
+ "name": "badge",
2442
+ "type": {
2443
+ "text": "string"
2444
+ },
2445
+ "default": "''",
2446
+ "description": "Badge text displayed next to title (e.g. notification count)",
2447
+ "fieldName": "badge"
2448
+ },
2449
+ {
2450
+ "name": "badge-background",
2451
+ "type": {
2452
+ "text": "string"
2453
+ },
2454
+ "default": "''",
2455
+ "description": "Badge background color",
2456
+ "fieldName": "badgeBackground"
2457
+ },
2458
+ {
2459
+ "name": "badge-color",
2460
+ "type": {
2461
+ "text": "string"
2462
+ },
2463
+ "default": "''",
2464
+ "description": "Badge text color",
2465
+ "fieldName": "badgeColor"
2466
+ },
2467
+ {
2468
+ "name": "disabled",
2469
+ "type": {
2470
+ "text": "boolean"
2471
+ },
2472
+ "default": "false",
2473
+ "description": "Whether the tab is disabled",
2474
+ "fieldName": "disabled"
2475
+ },
2476
+ {
2477
+ "name": "dismissible",
2478
+ "type": {
2479
+ "text": "boolean"
2480
+ },
2481
+ "default": "false",
2482
+ "description": "Whether the tab can be dismissed/closed",
2483
+ "fieldName": "dismissible"
2484
+ },
2485
+ {
2486
+ "name": "active",
2487
+ "type": {
2488
+ "text": "boolean"
2489
+ },
2490
+ "default": "false",
2491
+ "description": "Whether this tab is currently active (set by parent)",
2492
+ "fieldName": "active"
2493
+ }
2494
+ ],
2495
+ "superclass": {
2496
+ "name": "LitElement",
2497
+ "package": "lit"
2498
+ },
2499
+ "tagName": "kr-tab",
2500
+ "customElement": true
2501
+ }
2502
+ ],
2503
+ "exports": [
2504
+ {
2505
+ "kind": "js",
2506
+ "name": "KRTab",
2507
+ "declaration": {
2508
+ "name": "KRTab",
2509
+ "module": "src/tabs/tab.ts"
2510
+ }
2511
+ },
2512
+ {
2513
+ "kind": "custom-element-definition",
2514
+ "name": "kr-tab",
2515
+ "declaration": {
2516
+ "name": "KRTab",
2517
+ "module": "src/tabs/tab.ts"
2518
+ }
2519
+ }
2520
+ ]
2521
+ },
2522
+ {
2523
+ "kind": "javascript-module",
2524
+ "path": "src/tabs/tabs.ts",
2525
+ "declarations": [
2526
+ {
2527
+ "kind": "class",
2528
+ "description": "A tabbed navigation component for switching between content sections.",
2529
+ "name": "KRTabGroup",
2530
+ "slots": [
2531
+ {
2532
+ "description": "Default slot for kr-tab children",
2533
+ "name": ""
2534
+ }
2535
+ ],
2536
+ "members": [
2537
+ {
2538
+ "kind": "field",
2539
+ "name": "activeTabId",
2540
+ "type": {
2541
+ "text": "string | undefined"
2542
+ },
2543
+ "description": "ID of the currently active tab",
2544
+ "attribute": "active-tab-id"
2545
+ },
2546
+ {
2547
+ "kind": "method",
2548
+ "name": "_getTabs",
2549
+ "privacy": "private",
2550
+ "return": {
2551
+ "type": {
2552
+ "text": "KRTab[]"
2553
+ }
2554
+ }
2555
+ },
2556
+ {
2557
+ "kind": "method",
2558
+ "name": "_updateActiveTab",
2559
+ "privacy": "private"
2560
+ },
2561
+ {
2562
+ "kind": "method",
2563
+ "name": "_handleTabClick",
2564
+ "privacy": "private",
2565
+ "parameters": [
2566
+ {
2567
+ "name": "tab",
2568
+ "type": {
2569
+ "text": "KRTab"
2570
+ }
2571
+ }
2572
+ ]
2573
+ },
2574
+ {
2575
+ "kind": "method",
2576
+ "name": "_handleTabDismiss",
2577
+ "privacy": "private",
2578
+ "parameters": [
2579
+ {
2580
+ "name": "tab",
2581
+ "type": {
2582
+ "text": "KRTab"
2583
+ }
2584
+ },
2585
+ {
2586
+ "name": "e",
2587
+ "type": {
2588
+ "text": "Event"
2589
+ }
2590
+ }
2591
+ ]
2592
+ },
2593
+ {
2594
+ "kind": "method",
2595
+ "name": "_handleKeyDown",
2596
+ "privacy": "private",
2597
+ "parameters": [
2598
+ {
2599
+ "name": "e",
2600
+ "type": {
2601
+ "text": "KeyboardEvent"
2602
+ }
2603
+ }
2604
+ ]
2605
+ },
2606
+ {
2607
+ "kind": "method",
2608
+ "name": "_renderTabIcon",
2609
+ "privacy": "private",
2610
+ "return": {
2611
+ "type": {
2612
+ "text": "TemplateResult | typeof nothing"
2613
+ }
2614
+ },
2615
+ "parameters": [
2616
+ {
2617
+ "name": "tab",
2618
+ "type": {
2619
+ "text": "KRTab"
2620
+ }
2621
+ }
2622
+ ]
2623
+ }
2624
+ ],
2625
+ "events": [
2626
+ {
2627
+ "name": "tab-change",
2628
+ "type": {
2629
+ "text": "CustomEvent"
2630
+ },
2631
+ "description": "Fired when the active tab changes, detail: { activeTabId: string }"
2632
+ },
2633
+ {
2634
+ "name": "tab-dismiss",
2635
+ "type": {
2636
+ "text": "CustomEvent"
2637
+ },
2638
+ "description": "Fired when a dismissible tab is closed, detail: { tabId: string }"
2639
+ }
2640
+ ],
2641
+ "attributes": [
2642
+ {
2643
+ "name": "active-tab-id",
2644
+ "type": {
2645
+ "text": "string | undefined"
2646
+ },
2647
+ "description": "ID of the currently active tab",
2648
+ "fieldName": "activeTabId"
2649
+ }
2650
+ ],
2651
+ "superclass": {
2652
+ "name": "LitElement",
2653
+ "package": "lit"
2654
+ },
2655
+ "tagName": "kr-tab-group",
2656
+ "customElement": true
2657
+ }
2658
+ ],
2659
+ "exports": [
2660
+ {
2661
+ "kind": "js",
2662
+ "name": "KRTabGroup",
2663
+ "declaration": {
2664
+ "name": "KRTabGroup",
2665
+ "module": "src/tabs/tabs.ts"
2666
+ }
2667
+ },
2668
+ {
2669
+ "kind": "custom-element-definition",
2670
+ "name": "kr-tab-group",
2671
+ "declaration": {
2672
+ "name": "KRTabGroup",
2673
+ "module": "src/tabs/tabs.ts"
2674
+ }
2675
+ }
2676
+ ]
2677
+ },
2678
+ {
2679
+ "kind": "javascript-module",
2680
+ "path": "dist/form/select/select-option.js",
2681
+ "declarations": [
2682
+ {
2683
+ "kind": "variable",
2684
+ "name": "KRSelectOption",
2685
+ "default": "class KRSelectOption extends LitElement { constructor() { super(...arguments); /** * The option value */ this.value = ''; /** * Whether the option is disabled */ this.disabled = false; } /** Gets the label text from the slot */ get label() { return this.textContent?.trim() || ''; } render() { return html `<slot></slot>`; } }",
2686
+ "description": "An option for the kr-select component."
2687
+ }
2688
+ ],
2689
+ "exports": [
2690
+ {
2691
+ "kind": "js",
2692
+ "name": "KRSelectOption",
2693
+ "declaration": {
2694
+ "name": "KRSelectOption",
2695
+ "module": "dist/form/select/select-option.js"
2696
+ }
2697
+ }
2698
+ ]
2699
+ },
2700
+ {
2701
+ "kind": "javascript-module",
2702
+ "path": "dist/form/select/select.js",
2703
+ "declarations": [
2704
+ {
2705
+ "kind": "variable",
2706
+ "name": "KRSelect",
2707
+ "default": "class KRSelect extends LitElement { constructor() { super(); /** * The select label text */ this.label = ''; /** * The input name for form submission */ this.name = ''; /** * The currently selected value */ this.value = ''; /** * Placeholder text when no option is selected */ this.placeholder = 'Select an option'; /** * Whether the select is disabled */ this.disabled = false; /** * Whether the field is required */ this.required = false; /** * Whether the field is readonly */ this.readonly = false; /** * Helper text shown below the select */ this.hint = ''; this._isOpen = false; this._highlightedIndex = -1; this._touched = false; this._handleInvalid = (e) => { e.preventDefault(); this._touched = true; }; this._handleOutsideClick = (e) => { if (!this.contains(e.target)) { this._close(); } }; this._handleKeyDown = (e) => { if (!this._isOpen) return; const options = Array.from(this.querySelectorAll('kr-select-option')); switch (e.key) { case 'Escape': this._close(); this._triggerElement?.focus(); break; case 'ArrowDown': e.preventDefault(); if (options.some(o => !o.disabled)) { let newIndex = this._highlightedIndex + 1; while (newIndex < options.length && options[newIndex]?.disabled) newIndex++; if (newIndex < options.length) this._highlightedIndex = newIndex; } break; case 'ArrowUp': e.preventDefault(); { let newIndex = this._highlightedIndex - 1; while (newIndex >= 0 && options[newIndex]?.disabled) newIndex--; if (newIndex >= 0) this._highlightedIndex = newIndex; } break; case 'Enter': e.preventDefault(); if (this._highlightedIndex >= 0 && this._highlightedIndex < options.length) { this._selectOption(options[this._highlightedIndex]); } break; } }; 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._internals.setFormValue(''); this._internals.setValidity({}); } formStateRestoreCallback(state) { this.value = state; } connectedCallback() { super.connectedCallback(); document.addEventListener('click', this._handleOutsideClick); document.addEventListener('keydown', this._handleKeyDown); this.addEventListener('invalid', this._handleInvalid); } firstUpdated() { this._updateValidity(); } updated(changedProperties) { if (changedProperties.has('required') || changedProperties.has('value')) { this._updateValidity(); } } disconnectedCallback() { super.disconnectedCallback(); document.removeEventListener('click', this._handleOutsideClick); document.removeEventListener('keydown', this._handleKeyDown); this.removeEventListener('invalid', this._handleInvalid); } _toggle() { if (this.disabled || this.readonly) return; if (this._isOpen) { this._close(); } else { this._isOpen = true; const options = Array.from(this.querySelectorAll('kr-select-option')); this._highlightedIndex = options.findIndex(o => o.value === this.value); } } _close() { this._isOpen = false; this._highlightedIndex = -1; } _selectOption(option) { if (option.disabled) return; this.value = option.value; this._internals.setFormValue(this.value); this._updateValidity(); this.dispatchEvent(new Event('change', { bubbles: true, composed: true })); this._close(); this._triggerElement?.focus(); } _handleBlur() { this._touched = true; this._updateValidity(); } _updateValidity() { if (this.required && !this.value) { this._internals.setValidity({ valueMissing: true }, 'Please select an option', this._triggerElement); } else { this._internals.setValidity({}); } } render() { const options = Array.from(this.querySelectorAll('kr-select-option')); const selectedLabel = options.find(o => o.value === this.value)?.label; return html ` <div class=\"wrapper\"> ${this.label ? html ` <label> ${this.label} ${this.required ? html `<span class=\"required\" aria-hidden=\"true\">*</span>` : ''} </label> ` : nothing} <div class=\"select-wrapper\"> <button class=${classMap({ 'select-trigger': true, 'select-trigger--open': this._isOpen, 'select-trigger--invalid': this._touched && this.required && !this.value, })} type=\"button\" ?disabled=${this.disabled} aria-haspopup=\"listbox\" aria-expanded=${this._isOpen} @click=${this._toggle} @blur=${this._handleBlur} > <span class=${classMap({ 'select-value': true, 'select-placeholder': !selectedLabel })}> ${selectedLabel || this.placeholder} </span> <svg class=${classMap({ 'chevron-icon': true, 'select-icon': true, 'select-icon--open': this._isOpen })} viewBox=\"0 0 20 20\" fill=\"currentColor\" > <path fill-rule=\"evenodd\" d=\"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z\" clip-rule=\"evenodd\" /> </svg> </button> <div class=${classMap({ 'select-dropdown': true, 'hidden': !this._isOpen })} role=\"listbox\"> <div class=\"select-options\"> ${options.length === 0 ? html `<div class=\"select-empty\">No options available</div>` : options.map((option, idx) => { const isSelected = option.value === this.value; return html ` <div class=${classMap({ 'select-option': true, 'select-option--selected': isSelected, 'select-option--disabled': option.disabled, 'select-option--highlighted': idx === this._highlightedIndex, })} role=\"option\" aria-selected=${isSelected} @click=${() => this._selectOption(option)} @mouseenter=${() => (this._highlightedIndex = idx)} > ${option.label} ${isSelected ? html `<svg class=\"chevron-icon select-check\" viewBox=\"0 0 20 20\" fill=\"currentColor\"> <path fill-rule=\"evenodd\" d=\"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z\" clip-rule=\"evenodd\" /> </svg>` : nothing} </div> `; })} </div> </div> </div> ${this._touched && this.required && !this.value ? html `<div class=\"validation-message\">Please select an option</div>` : this.hint ? html `<div class=\"hint\">${this.hint}</div>` : ''} </div> <div class=\"options-slot\"> <slot @slotchange=${() => this.requestUpdate()}></slot> </div> `; } // Public methods for programmatic control focus() { this._triggerElement?.focus(); } blur() { this._triggerElement?.blur(); } }",
2708
+ "description": "A select dropdown component that works with native browser forms.\n\nUses ElementInternals for form association, allowing the component\nto participate in form submission, validation, and reset."
2709
+ }
2710
+ ],
2711
+ "exports": [
2712
+ {
2713
+ "kind": "js",
2714
+ "name": "KRSelect",
2715
+ "declaration": {
2716
+ "name": "KRSelect",
2717
+ "module": "dist/form/select/select.js"
2718
+ }
2719
+ }
2720
+ ]
2721
+ },
2722
+ {
2723
+ "kind": "javascript-module",
2724
+ "path": "dist/form/text-field/text-field.js",
2725
+ "declarations": [
2726
+ {
2727
+ "kind": "variable",
2728
+ "name": "KRTextField",
2729
+ "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._handleInvalid = (e) => { e.preventDefault(); this._touched = true; }; 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; } connectedCallback() { super.connectedCallback(); this.addEventListener('invalid', this._handleInvalid); } disconnectedCallback() { super.disconnectedCallback(); this.removeEventListener('invalid', this._handleInvalid); } firstUpdated() { this._updateValidity(); } updated(changedProperties) { if (changedProperties.has('required') || changedProperties.has('value')) { this._updateValidity(); } } _updateValidity() { if (this._input) { this._internals.setValidity(this._input.validity, this._input.validationMessage); } } _handleInput(e) { this.value = e.target.value; this._dirty = true; this._internals.setFormValue(this.value); this._internals.setValidity(this._input.validity, this._input.validationMessage); } _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); } 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\" class=${classMap({ 'input--invalid': this._touched && this._input && !this._input.validity.valid })} type=${this.type} name=${this.name} .value=${live(this.value)} placeholder=${this.placeholder} ?required=${this.required} ?disabled=${this.disabled} ?readonly=${this.readonly} minlength=${ifDefined(this.minlength)} maxlength=${ifDefined(this.maxlength)} pattern=${ifDefined(this.pattern)} autocomplete=${ifDefined(this.autocomplete || undefined)} @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(); } }",
2730
+ "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."
2731
+ }
2732
+ ],
2733
+ "exports": [
2734
+ {
2735
+ "kind": "js",
2736
+ "name": "KRTextField",
2737
+ "declaration": {
2738
+ "name": "KRTextField",
2739
+ "module": "dist/form/text-field/text-field.js"
2740
+ }
2741
+ }
2742
+ ]
2743
+ },
2744
+ {
2745
+ "kind": "javascript-module",
2746
+ "path": "src/form/select/select-option.ts",
2747
+ "declarations": [
2748
+ {
2749
+ "kind": "class",
2750
+ "description": "An option for the kr-select component.",
2751
+ "name": "KRSelectOption",
2752
+ "slots": [
2753
+ {
2754
+ "description": "The option label content",
2755
+ "name": ""
2756
+ }
2757
+ ],
2758
+ "members": [
2759
+ {
2760
+ "kind": "field",
2761
+ "name": "value",
2762
+ "type": {
2763
+ "text": "string"
2764
+ },
2765
+ "default": "''",
2766
+ "description": "The option value",
2767
+ "attribute": "value"
2768
+ },
2769
+ {
2770
+ "kind": "field",
2771
+ "name": "disabled",
2772
+ "type": {
2773
+ "text": "boolean"
2774
+ },
2775
+ "default": "false",
2776
+ "description": "Whether the option is disabled",
2777
+ "attribute": "disabled"
2778
+ },
2779
+ {
2780
+ "kind": "field",
2781
+ "name": "label",
2782
+ "type": {
2783
+ "text": "string"
2784
+ },
2785
+ "description": "Gets the label text from the slot",
2786
+ "readonly": true
2787
+ }
2788
+ ],
2789
+ "attributes": [
2790
+ {
2791
+ "name": "value",
2792
+ "type": {
2793
+ "text": "string"
2794
+ },
2795
+ "default": "''",
2796
+ "description": "The option value",
2797
+ "fieldName": "value"
2798
+ },
2799
+ {
2800
+ "name": "disabled",
2801
+ "type": {
2802
+ "text": "boolean"
2803
+ },
2804
+ "default": "false",
2805
+ "description": "Whether the option is disabled",
2806
+ "fieldName": "disabled"
2807
+ }
2808
+ ],
2809
+ "superclass": {
2810
+ "name": "LitElement",
2811
+ "package": "lit"
2812
+ },
2813
+ "tagName": "kr-select-option",
2814
+ "customElement": true
2815
+ }
2816
+ ],
2817
+ "exports": [
2818
+ {
2819
+ "kind": "js",
2820
+ "name": "KRSelectOption",
2821
+ "declaration": {
2822
+ "name": "KRSelectOption",
2823
+ "module": "src/form/select/select-option.ts"
2824
+ }
2825
+ },
2826
+ {
2827
+ "kind": "custom-element-definition",
2828
+ "name": "kr-select-option",
2829
+ "declaration": {
2830
+ "name": "KRSelectOption",
2831
+ "module": "src/form/select/select-option.ts"
2832
+ }
2833
+ }
2834
+ ]
2835
+ },
2836
+ {
2837
+ "kind": "javascript-module",
2838
+ "path": "src/form/select/select.ts",
2839
+ "declarations": [
2840
+ {
2841
+ "kind": "class",
2842
+ "description": "A select dropdown component that works with native browser forms.\n\nUses ElementInternals for form association, allowing the component\nto participate in form submission, validation, and reset.",
2843
+ "name": "KRSelect",
2844
+ "slots": [
2845
+ {
2846
+ "description": "The kr-select-option elements",
2847
+ "name": ""
2848
+ }
2849
+ ],
2850
+ "members": [
2851
+ {
2852
+ "kind": "field",
2853
+ "name": "formAssociated",
2854
+ "type": {
2855
+ "text": "boolean"
2856
+ },
2857
+ "static": true,
2858
+ "default": "true"
2859
+ },
2860
+ {
2861
+ "kind": "field",
2862
+ "name": "_internals",
2863
+ "type": {
2864
+ "text": "ElementInternals"
2865
+ },
2866
+ "privacy": "private"
2867
+ },
2868
+ {
2869
+ "kind": "field",
2870
+ "name": "label",
2871
+ "type": {
2872
+ "text": "string"
2873
+ },
2874
+ "default": "''",
2875
+ "description": "The select label text",
2876
+ "attribute": "label"
2877
+ },
2878
+ {
2879
+ "kind": "field",
2880
+ "name": "name",
2881
+ "type": {
2882
+ "text": "string"
2883
+ },
2884
+ "default": "''",
2885
+ "description": "The input name for form submission",
2886
+ "attribute": "name"
2887
+ },
2888
+ {
2889
+ "kind": "field",
2890
+ "name": "value",
2891
+ "type": {
2892
+ "text": "string"
2893
+ },
2894
+ "default": "''",
2895
+ "description": "The currently selected value",
2896
+ "attribute": "value"
2897
+ },
2898
+ {
2899
+ "kind": "field",
2900
+ "name": "placeholder",
2901
+ "type": {
2902
+ "text": "string"
2903
+ },
2904
+ "default": "'Select an option'",
2905
+ "description": "Placeholder text when no option is selected",
2906
+ "attribute": "placeholder"
2907
+ },
2908
+ {
2909
+ "kind": "field",
2910
+ "name": "disabled",
2911
+ "type": {
2912
+ "text": "boolean"
2913
+ },
2914
+ "default": "false",
2915
+ "description": "Whether the select is disabled",
2916
+ "attribute": "disabled"
2917
+ },
2918
+ {
2919
+ "kind": "field",
2920
+ "name": "required",
2921
+ "type": {
2922
+ "text": "boolean"
2923
+ },
2924
+ "default": "false",
2925
+ "description": "Whether the field is required",
2926
+ "attribute": "required"
2927
+ },
2928
+ {
2929
+ "kind": "field",
2930
+ "name": "readonly",
2931
+ "type": {
2932
+ "text": "boolean"
2933
+ },
2934
+ "default": "false",
2935
+ "description": "Whether the field is readonly",
2936
+ "attribute": "readonly"
2937
+ },
2938
+ {
2939
+ "kind": "field",
2940
+ "name": "hint",
2941
+ "type": {
2942
+ "text": "string"
2943
+ },
2944
+ "default": "''",
2945
+ "description": "Helper text shown below the select",
2946
+ "attribute": "hint"
2947
+ },
2948
+ {
2949
+ "kind": "field",
2950
+ "name": "_isOpen",
2951
+ "type": {
2952
+ "text": "boolean"
2953
+ },
2954
+ "privacy": "private",
2955
+ "default": "false"
2956
+ },
2957
+ {
2958
+ "kind": "field",
2959
+ "name": "_highlightedIndex",
2960
+ "type": {
2961
+ "text": "number"
2962
+ },
2963
+ "privacy": "private",
2964
+ "default": "-1"
2965
+ },
2966
+ {
2967
+ "kind": "field",
2968
+ "name": "_touched",
2969
+ "type": {
2970
+ "text": "boolean"
2971
+ },
2972
+ "privacy": "private",
2973
+ "default": "false"
2974
+ },
2975
+ {
2976
+ "kind": "field",
2977
+ "name": "_triggerElement",
2978
+ "type": {
2979
+ "text": "HTMLButtonElement"
2980
+ },
2981
+ "privacy": "private"
2982
+ },
2983
+ {
2984
+ "kind": "field",
2985
+ "name": "form",
2986
+ "readonly": true
2987
+ },
2988
+ {
2989
+ "kind": "field",
2990
+ "name": "validity",
2991
+ "readonly": true
2992
+ },
2993
+ {
2994
+ "kind": "field",
2995
+ "name": "validationMessage",
2996
+ "readonly": true
2997
+ },
2998
+ {
2999
+ "kind": "field",
3000
+ "name": "willValidate",
3001
+ "readonly": true
3002
+ },
3003
+ {
3004
+ "kind": "method",
3005
+ "name": "checkValidity"
3006
+ },
3007
+ {
3008
+ "kind": "method",
3009
+ "name": "reportValidity"
3010
+ },
3011
+ {
3012
+ "kind": "method",
3013
+ "name": "formResetCallback"
3014
+ },
3015
+ {
3016
+ "kind": "method",
3017
+ "name": "formStateRestoreCallback",
3018
+ "parameters": [
3019
+ {
3020
+ "name": "state",
3021
+ "type": {
3022
+ "text": "string"
3023
+ }
3024
+ }
3025
+ ]
3026
+ },
3027
+ {
3028
+ "kind": "field",
3029
+ "name": "_handleInvalid",
3030
+ "privacy": "private"
3031
+ },
3032
+ {
3033
+ "kind": "field",
3034
+ "name": "_handleOutsideClick",
3035
+ "privacy": "private"
3036
+ },
3037
+ {
3038
+ "kind": "field",
3039
+ "name": "_handleKeyDown",
3040
+ "privacy": "private"
3041
+ },
3042
+ {
3043
+ "kind": "method",
3044
+ "name": "_toggle",
3045
+ "privacy": "private"
3046
+ },
3047
+ {
3048
+ "kind": "method",
3049
+ "name": "_close",
3050
+ "privacy": "private"
3051
+ },
3052
+ {
3053
+ "kind": "method",
3054
+ "name": "_selectOption",
3055
+ "privacy": "private",
3056
+ "parameters": [
3057
+ {
3058
+ "name": "option",
3059
+ "type": {
3060
+ "text": "KRSelectOption"
3061
+ }
3062
+ }
3063
+ ]
3064
+ },
3065
+ {
3066
+ "kind": "method",
3067
+ "name": "_handleBlur",
3068
+ "privacy": "private"
3069
+ },
3070
+ {
3071
+ "kind": "method",
3072
+ "name": "_updateValidity",
3073
+ "privacy": "private"
3074
+ },
3075
+ {
3076
+ "kind": "method",
3077
+ "name": "focus"
3078
+ },
3079
+ {
3080
+ "kind": "method",
3081
+ "name": "blur"
3082
+ }
3083
+ ],
3084
+ "events": [
3085
+ {
3086
+ "name": "change",
3087
+ "type": {
3088
+ "text": "Event"
3089
+ }
3090
+ }
3091
+ ],
3092
+ "attributes": [
3093
+ {
3094
+ "name": "label",
3095
+ "type": {
3096
+ "text": "string"
3097
+ },
3098
+ "default": "''",
3099
+ "description": "The select label text",
3100
+ "fieldName": "label"
3101
+ },
3102
+ {
3103
+ "name": "name",
3104
+ "type": {
3105
+ "text": "string"
3106
+ },
3107
+ "default": "''",
3108
+ "description": "The input name for form submission",
3109
+ "fieldName": "name"
3110
+ },
3111
+ {
3112
+ "name": "value",
3113
+ "type": {
3114
+ "text": "string"
3115
+ },
3116
+ "default": "''",
3117
+ "description": "The currently selected value",
3118
+ "fieldName": "value"
3119
+ },
3120
+ {
3121
+ "name": "placeholder",
3122
+ "type": {
3123
+ "text": "string"
3124
+ },
3125
+ "default": "'Select an option'",
3126
+ "description": "Placeholder text when no option is selected",
3127
+ "fieldName": "placeholder"
3128
+ },
3129
+ {
3130
+ "name": "disabled",
3131
+ "type": {
3132
+ "text": "boolean"
3133
+ },
3134
+ "default": "false",
3135
+ "description": "Whether the select is disabled",
3136
+ "fieldName": "disabled"
3137
+ },
3138
+ {
3139
+ "name": "required",
3140
+ "type": {
3141
+ "text": "boolean"
3142
+ },
3143
+ "default": "false",
3144
+ "description": "Whether the field is required",
3145
+ "fieldName": "required"
3146
+ },
3147
+ {
3148
+ "name": "readonly",
3149
+ "type": {
3150
+ "text": "boolean"
3151
+ },
3152
+ "default": "false",
3153
+ "description": "Whether the field is readonly",
3154
+ "fieldName": "readonly"
3155
+ },
3156
+ {
3157
+ "name": "hint",
3158
+ "type": {
3159
+ "text": "string"
3160
+ },
3161
+ "default": "''",
3162
+ "description": "Helper text shown below the select",
3163
+ "fieldName": "hint"
3164
+ }
3165
+ ],
3166
+ "superclass": {
3167
+ "name": "LitElement",
3168
+ "package": "lit"
3169
+ },
3170
+ "tagName": "kr-select",
3171
+ "customElement": true
3172
+ }
3173
+ ],
3174
+ "exports": [
3175
+ {
3176
+ "kind": "js",
3177
+ "name": "KRSelect",
3178
+ "declaration": {
3179
+ "name": "KRSelect",
3180
+ "module": "src/form/select/select.ts"
3181
+ }
3182
+ },
3183
+ {
3184
+ "kind": "custom-element-definition",
3185
+ "name": "kr-select",
3186
+ "declaration": {
3187
+ "name": "KRSelect",
3188
+ "module": "src/form/select/select.ts"
3189
+ }
3190
+ }
3191
+ ]
3192
+ },
3193
+ {
3194
+ "kind": "javascript-module",
3195
+ "path": "src/form/text-field/text-field.ts",
3196
+ "declarations": [
3197
+ {
3198
+ "kind": "class",
3199
+ "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.",
3200
+ "name": "KRTextField",
3201
+ "members": [
3202
+ {
3203
+ "kind": "field",
3204
+ "name": "formAssociated",
3205
+ "type": {
3206
+ "text": "boolean"
3207
+ },
3208
+ "static": true,
3209
+ "default": "true"
3210
+ },
3211
+ {
3212
+ "kind": "field",
3213
+ "name": "_internals",
3214
+ "type": {
3215
+ "text": "ElementInternals"
3216
+ },
3217
+ "privacy": "private"
3218
+ },
3219
+ {
3220
+ "kind": "field",
3221
+ "name": "label",
3222
+ "type": {
3223
+ "text": "string"
3224
+ },
3225
+ "default": "''",
3226
+ "description": "The input label text",
3227
+ "attribute": "label"
3228
+ },
3229
+ {
3230
+ "kind": "field",
3231
+ "name": "name",
3232
+ "type": {
3233
+ "text": "string"
3234
+ },
3235
+ "default": "''",
3236
+ "description": "The input name for form submission",
3237
+ "attribute": "name"
3238
+ },
3239
+ {
3240
+ "kind": "field",
3241
+ "name": "value",
3242
+ "type": {
3243
+ "text": "string"
3244
+ },
3245
+ "default": "''",
3246
+ "description": "The current value",
3247
+ "attribute": "value"
3248
+ },
3249
+ {
3250
+ "kind": "field",
3251
+ "name": "placeholder",
3252
+ "type": {
3253
+ "text": "string"
3254
+ },
3255
+ "default": "''",
3256
+ "description": "Placeholder text",
3257
+ "attribute": "placeholder"
3258
+ },
3259
+ {
3260
+ "kind": "field",
3261
+ "name": "type",
3262
+ "type": {
3263
+ "text": "'text' | 'email' | 'password' | 'tel' | 'url' | 'search'"
3264
+ },
3265
+ "default": "'text'",
3266
+ "description": "Input type (text, email, password, tel, url, search)",
3267
+ "attribute": "type"
3268
+ },
3269
+ {
3270
+ "kind": "field",
3271
+ "name": "required",
3272
+ "type": {
3273
+ "text": "boolean"
3274
+ },
3275
+ "default": "false",
3276
+ "description": "Whether the field is required",
3277
+ "attribute": "required"
3278
+ },
3279
+ {
3280
+ "kind": "field",
3281
+ "name": "disabled",
3282
+ "type": {
3283
+ "text": "boolean"
3284
+ },
3285
+ "default": "false",
3286
+ "description": "Whether the field is disabled",
3287
+ "attribute": "disabled"
3288
+ },
3289
+ {
3290
+ "kind": "field",
3291
+ "name": "readonly",
3292
+ "type": {
3293
+ "text": "boolean"
3294
+ },
3295
+ "default": "false",
3296
+ "description": "Whether the field is readonly",
3297
+ "attribute": "readonly"
2094
3298
  },
2095
3299
  {
2096
3300
  "kind": "field",
@@ -2209,6 +3413,16 @@
2209
3413
  }
2210
3414
  ]
2211
3415
  },
3416
+ {
3417
+ "kind": "field",
3418
+ "name": "_handleInvalid",
3419
+ "privacy": "private"
3420
+ },
3421
+ {
3422
+ "kind": "method",
3423
+ "name": "_updateValidity",
3424
+ "privacy": "private"
3425
+ },
2212
3426
  {
2213
3427
  "kind": "method",
2214
3428
  "name": "_handleInput",