@kodaris/krubble-components 1.0.5 → 1.0.7

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 (51) hide show
  1. package/custom-elements.json +1568 -412
  2. package/dist/alert/alert.d.ts.map +1 -0
  3. package/dist/alert/alert.js.map +1 -0
  4. package/dist/code-demo/code-demo.d.ts.map +1 -1
  5. package/dist/code-demo/code-demo.js +2 -1
  6. package/dist/code-demo/code-demo.js.map +1 -1
  7. package/dist/form/index.d.ts +2 -0
  8. package/dist/form/index.d.ts.map +1 -1
  9. package/dist/form/index.js +2 -0
  10. package/dist/form/index.js.map +1 -1
  11. package/dist/form/select/select-option.d.ts +27 -0
  12. package/dist/form/select/select-option.d.ts.map +1 -0
  13. package/dist/form/select/select-option.js +50 -0
  14. package/dist/form/select/select-option.js.map +1 -0
  15. package/dist/form/select/select.d.ts +81 -0
  16. package/dist/form/select/select.d.ts.map +1 -0
  17. package/dist/form/select/select.js +519 -0
  18. package/dist/form/select/select.js.map +1 -0
  19. package/dist/form/text-field/text-field.d.ts +6 -0
  20. package/dist/form/text-field/text-field.d.ts.map +1 -1
  21. package/dist/form/text-field/text-field.js +38 -8
  22. package/dist/form/text-field/text-field.js.map +1 -1
  23. package/dist/index.d.ts +5 -2
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +6 -2
  26. package/dist/index.js.map +1 -1
  27. package/dist/krubble.bundled.js +1168 -120
  28. package/dist/krubble.bundled.js.map +1 -1
  29. package/dist/krubble.bundled.min.js +508 -60
  30. package/dist/krubble.bundled.min.js.map +1 -1
  31. package/dist/krubble.umd.js +1168 -119
  32. package/dist/krubble.umd.js.map +1 -1
  33. package/dist/krubble.umd.min.js +517 -69
  34. package/dist/krubble.umd.min.js.map +1 -1
  35. package/dist/style/base.d.ts +6 -0
  36. package/dist/style/base.d.ts.map +1 -0
  37. package/dist/style/base.js +34 -0
  38. package/dist/style/base.js.map +1 -0
  39. package/dist/tabs/tab.d.ts +54 -0
  40. package/dist/tabs/tab.d.ts.map +1 -0
  41. package/dist/tabs/tab.js +103 -0
  42. package/dist/tabs/tab.js.map +1 -0
  43. package/dist/tabs/tabs.d.ts +55 -0
  44. package/dist/tabs/tabs.d.ts.map +1 -0
  45. package/dist/tabs/tabs.js +319 -0
  46. package/dist/tabs/tabs.js.map +1 -0
  47. package/package.json +1 -1
  48. package/dist/alert.d.ts.map +0 -1
  49. package/dist/alert.js.map +0 -1
  50. /package/dist/{alert.d.ts → alert/alert.d.ts} +0 -0
  51. /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 (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>` : ''} `; } }",
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 { constructor() { super(...arguments); /** * Whether tabs should stretch to fill the full width evenly */ this.justified = false; /** * Size of the tabs: 'small' | 'medium' | 'large' */ this.size = 'medium'; } 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, 'label--justified': this.justified, })} 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=${xt({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=\"flat\",this.color=\"primary\",this.size=\"medium\",this.disabled=!1,this._state=\"idle\",this._stateText=\"\",this._handleKeydown=t=>{\"Enter\"!==t.key&&\" \"!==t.key||(t.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(t=\"Success\",e=2e3){this._clearStateTimeout(),this._state=\"success\",this._stateText=t,this._stateTimeout=window.setTimeout(()=>this.reset(),e)}showError(t=\"Error\",e=2e3){this._clearStateTimeout(),this._state=\"error\",this._stateText=t,this._stateTimeout=window.setTimeout(()=>this.reset(),e)}reset(){this._clearStateTimeout(),this._state=\"idle\",this._stateText=\"\"}_clearStateTimeout(){this._stateTimeout&&(clearTimeout(this._stateTimeout),this._stateTimeout=void 0)}updated(t){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>`:\"\"} `}}"
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=${xt({tab:!0,\"tab--active\":\"preview\"===this.activeTab})} @click=${()=>this.setTab(\"preview\")} > Preview </button> <button class=${xt({tab:!0,\"tab--active\":\"code\"===this.activeTab})} @click=${()=>this.setTab(\"code\")} > Code </button> </div> <div class=${xt({panel:!0,\"panel--active\":\"preview\"===this.activeTab,preview:!0})}> <slot name=\"preview\"></slot> </div> <div class=${xt({panel:!0,\"panel--active\":\"code\"===this.activeTab,\"code-container\":!0})}> <button class=${xt({\"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": "Ot",
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": "Re",
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": "Rt",
444
+ "name": "Le",
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 Rt,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": "Me",
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 Le,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{constructor(){super(...arguments),this.justified=!1,this.size=\"medium\"}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,\"label--justified\":this.justified})} 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": "jt"
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": "Rt",
547
+ "name": "Le",
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": "Ot",
587
+ "name": "Re",
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": "Me",
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": "jt",
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",
@@ -641,28 +704,28 @@
641
704
  "declarations": [
642
705
  {
643
706
  "kind": "variable",
644
- "name": "e",
707
+ "name": "t",
645
708
  "default": "globalThis"
646
709
  },
647
710
  {
648
711
  "kind": "variable",
649
- "name": "t"
712
+ "name": "e"
650
713
  }
651
714
  ],
652
715
  "exports": [
653
716
  {
654
717
  "kind": "custom-element-definition",
655
- "name": "t",
718
+ "name": "e",
656
719
  "declaration": {
657
- "name": "e",
720
+ "name": "t",
658
721
  "module": "dist/krubble.umd.min.js"
659
722
  }
660
723
  },
661
724
  {
662
725
  "kind": "custom-element-definition",
663
- "name": "t",
726
+ "name": "e",
664
727
  "declaration": {
665
- "name": "e",
728
+ "name": "t",
666
729
  "module": "dist/krubble.umd.min.js"
667
730
  }
668
731
  }
@@ -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",
@@ -935,6 +904,28 @@
935
904
  }
936
905
  ]
937
906
  },
907
+ {
908
+ "kind": "javascript-module",
909
+ "path": "dist/alert/alert.js",
910
+ "declarations": [
911
+ {
912
+ "kind": "variable",
913
+ "name": "KRAlert",
914
+ "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> `; } }",
915
+ "description": "A customizable alert component for displaying important information to users."
916
+ }
917
+ ],
918
+ "exports": [
919
+ {
920
+ "kind": "js",
921
+ "name": "KRAlert",
922
+ "declaration": {
923
+ "name": "KRAlert",
924
+ "module": "dist/alert/alert.js"
925
+ }
926
+ }
927
+ ]
928
+ },
938
929
  {
939
930
  "kind": "javascript-module",
940
931
  "path": "dist/button/button.js",
@@ -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 { constructor() { super(...arguments); /** * Whether tabs should stretch to fill the full width evenly */ this.justified = false; /** * Size of the tabs: 'small' | 'medium' | 'large' */ this.size = 'medium'; } 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, 'label--justified': this.justified, })} 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,55 +1272,189 @@
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",
1279
+ "description": "A customizable alert component for displaying important information to users.",
1280
+ "name": "KRAlert",
1208
1281
  "slots": [
1209
1282
  {
1210
- "description": "The button content",
1283
+ "description": "The alert message content",
1211
1284
  "name": ""
1212
1285
  }
1213
1286
  ],
1214
1287
  "members": [
1215
1288
  {
1216
1289
  "kind": "field",
1217
- "name": "variant",
1290
+ "name": "type",
1218
1291
  "type": {
1219
- "text": "'flat' | 'outline'"
1292
+ "text": "'info' | 'success' | 'warning' | 'error'"
1220
1293
  },
1221
- "default": "'flat'",
1222
- "description": "The button variant (shape)",
1223
- "attribute": "variant",
1224
- "reflects": true
1294
+ "default": "'info'",
1295
+ "description": "The alert type/severity",
1296
+ "attribute": "type"
1225
1297
  },
1226
1298
  {
1227
1299
  "kind": "field",
1228
- "name": "color",
1300
+ "name": "header",
1229
1301
  "type": {
1230
- "text": "'primary' | 'secondary'"
1302
+ "text": "string | undefined"
1231
1303
  },
1232
- "default": "'primary'",
1233
- "description": "The button color",
1234
- "attribute": "color",
1235
- "reflects": true
1304
+ "description": "Optional header text",
1305
+ "attribute": "header"
1236
1306
  },
1237
1307
  {
1238
1308
  "kind": "field",
1239
- "name": "size",
1309
+ "name": "dismissible",
1240
1310
  "type": {
1241
- "text": "'small' | 'medium' | 'large'"
1311
+ "text": "boolean"
1242
1312
  },
1243
- "default": "'medium'",
1244
- "description": "The button size",
1245
- "attribute": "size",
1246
- "reflects": true
1313
+ "default": "false",
1314
+ "description": "Whether the alert can be dismissed",
1315
+ "attribute": "dismissible"
1247
1316
  },
1248
1317
  {
1249
1318
  "kind": "field",
1250
- "name": "disabled",
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"
1332
+ }
1333
+ ],
1334
+ "events": [
1335
+ {
1336
+ "name": "dismiss",
1337
+ "type": {
1338
+ "text": "CustomEvent"
1339
+ },
1340
+ "description": "Fired when the dismiss button is clicked"
1341
+ }
1342
+ ],
1343
+ "attributes": [
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",
1424
+ "name": "variant",
1425
+ "type": {
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'"
1438
+ },
1439
+ "default": "'primary'",
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",
1251
1458
  "type": {
1252
1459
  "text": "boolean"
1253
1460
  },
@@ -1884,6 +2091,22 @@
1884
2091
  "name": "KRTextField",
1885
2092
  "module": "./text-field/text-field.js"
1886
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
+ }
1887
2110
  }
1888
2111
  ]
1889
2112
  },
@@ -2063,186 +2286,1109 @@
2063
2286
  },
2064
2287
  {
2065
2288
  "kind": "javascript-module",
2066
- "path": "dist/form/text-field/text-field.js",
2289
+ "path": "src/style/base.ts",
2067
2290
  "declarations": [
2068
2291
  {
2069
2292
  "kind": "variable",
2070
- "name": "KRTextField",
2071
- "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(); } }",
2072
- "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`...`]"
2073
2296
  }
2074
2297
  ],
2075
2298
  "exports": [
2076
2299
  {
2077
2300
  "kind": "js",
2078
- "name": "KRTextField",
2301
+ "name": "krBaseCSS",
2079
2302
  "declaration": {
2080
- "name": "KRTextField",
2081
- "module": "dist/form/text-field/text-field.js"
2303
+ "name": "krBaseCSS",
2304
+ "module": "src/style/base.ts"
2082
2305
  }
2083
2306
  }
2084
2307
  ]
2085
2308
  },
2086
2309
  {
2087
2310
  "kind": "javascript-module",
2088
- "path": "src/form/text-field/text-field.ts",
2311
+ "path": "src/tabs/tab.ts",
2089
2312
  "declarations": [
2090
2313
  {
2091
2314
  "kind": "class",
2092
- "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.",
2093
- "name": "KRTextField",
2094
- "members": [
2315
+ "description": "A tab for the kr-tab-group component.",
2316
+ "name": "KRTab",
2317
+ "slots": [
2095
2318
  {
2096
- "kind": "field",
2097
- "name": "formAssociated",
2098
- "type": {
2099
- "text": "boolean"
2100
- },
2101
- "static": true,
2102
- "default": "true"
2319
+ "description": "The tab panel content",
2320
+ "name": ""
2103
2321
  },
2104
2322
  {
2105
- "kind": "field",
2106
- "name": "_internals",
2107
- "type": {
2108
- "text": "ElementInternals"
2109
- },
2110
- "privacy": "private"
2111
- },
2323
+ "description": "Optional icon to display in the tab header",
2324
+ "name": "icon"
2325
+ }
2326
+ ],
2327
+ "members": [
2112
2328
  {
2113
2329
  "kind": "field",
2114
- "name": "label",
2330
+ "name": "id",
2115
2331
  "type": {
2116
2332
  "text": "string"
2117
2333
  },
2118
2334
  "default": "''",
2119
- "description": "The input label text",
2120
- "attribute": "label"
2335
+ "description": "Unique identifier for the tab",
2336
+ "attribute": "id",
2337
+ "reflects": true
2121
2338
  },
2122
2339
  {
2123
2340
  "kind": "field",
2124
- "name": "name",
2341
+ "name": "title",
2125
2342
  "type": {
2126
2343
  "text": "string"
2127
2344
  },
2128
2345
  "default": "''",
2129
- "description": "The input name for form submission",
2130
- "attribute": "name"
2346
+ "description": "Display title for the tab",
2347
+ "attribute": "title"
2131
2348
  },
2132
2349
  {
2133
2350
  "kind": "field",
2134
- "name": "value",
2351
+ "name": "badge",
2135
2352
  "type": {
2136
2353
  "text": "string"
2137
2354
  },
2138
2355
  "default": "''",
2139
- "description": "The current value",
2140
- "attribute": "value"
2356
+ "description": "Badge text displayed next to title (e.g. notification count)",
2357
+ "attribute": "badge"
2141
2358
  },
2142
2359
  {
2143
2360
  "kind": "field",
2144
- "name": "placeholder",
2361
+ "name": "badgeBackground",
2145
2362
  "type": {
2146
2363
  "text": "string"
2147
2364
  },
2148
2365
  "default": "''",
2149
- "description": "Placeholder text",
2150
- "attribute": "placeholder"
2366
+ "description": "Badge background color",
2367
+ "attribute": "badge-background"
2151
2368
  },
2152
2369
  {
2153
2370
  "kind": "field",
2154
- "name": "type",
2371
+ "name": "badgeColor",
2155
2372
  "type": {
2156
- "text": "'text' | 'email' | 'password' | 'tel' | 'url' | 'search'"
2373
+ "text": "string"
2157
2374
  },
2158
- "default": "'text'",
2159
- "description": "Input type (text, email, password, tel, url, search)",
2160
- "attribute": "type"
2375
+ "default": "''",
2376
+ "description": "Badge text color",
2377
+ "attribute": "badge-color"
2161
2378
  },
2162
2379
  {
2163
2380
  "kind": "field",
2164
- "name": "required",
2381
+ "name": "disabled",
2165
2382
  "type": {
2166
2383
  "text": "boolean"
2167
2384
  },
2168
2385
  "default": "false",
2169
- "description": "Whether the field is required",
2170
- "attribute": "required"
2386
+ "description": "Whether the tab is disabled",
2387
+ "attribute": "disabled"
2171
2388
  },
2172
2389
  {
2173
2390
  "kind": "field",
2174
- "name": "disabled",
2391
+ "name": "dismissible",
2175
2392
  "type": {
2176
2393
  "text": "boolean"
2177
2394
  },
2178
2395
  "default": "false",
2179
- "description": "Whether the field is disabled",
2180
- "attribute": "disabled"
2396
+ "description": "Whether the tab can be dismissed/closed",
2397
+ "attribute": "dismissible"
2181
2398
  },
2182
2399
  {
2183
2400
  "kind": "field",
2184
- "name": "readonly",
2401
+ "name": "active",
2185
2402
  "type": {
2186
2403
  "text": "boolean"
2187
2404
  },
2188
2405
  "default": "false",
2189
- "description": "Whether the field is readonly",
2190
- "attribute": "readonly"
2406
+ "description": "Whether this tab is currently active (set by parent)",
2407
+ "attribute": "active",
2408
+ "reflects": true
2191
2409
  },
2192
2410
  {
2193
- "kind": "field",
2194
- "name": "minlength",
2195
- "type": {
2196
- "text": "number | undefined"
2411
+ "kind": "method",
2412
+ "name": "getIconElement",
2413
+ "return": {
2414
+ "type": {
2415
+ "text": "Element | null"
2416
+ }
2197
2417
  },
2198
- "description": "Minimum length for the value",
2199
- "attribute": "minlength"
2200
- },
2418
+ "description": "Gets the icon element from the icon slot (if any)"
2419
+ }
2420
+ ],
2421
+ "attributes": [
2201
2422
  {
2202
- "kind": "field",
2203
- "name": "maxlength",
2423
+ "name": "id",
2204
2424
  "type": {
2205
- "text": "number | undefined"
2425
+ "text": "string"
2206
2426
  },
2207
- "description": "Maximum length for the value",
2208
- "attribute": "maxlength"
2427
+ "default": "''",
2428
+ "description": "Unique identifier for the tab",
2429
+ "fieldName": "id"
2209
2430
  },
2210
2431
  {
2211
- "kind": "field",
2212
- "name": "pattern",
2432
+ "name": "title",
2213
2433
  "type": {
2214
- "text": "string | undefined"
2434
+ "text": "string"
2215
2435
  },
2216
- "description": "Pattern for validation (regex)",
2217
- "attribute": "pattern"
2436
+ "default": "''",
2437
+ "description": "Display title for the tab",
2438
+ "fieldName": "title"
2218
2439
  },
2219
2440
  {
2220
- "kind": "field",
2221
- "name": "autocomplete",
2441
+ "name": "badge",
2222
2442
  "type": {
2223
2443
  "text": "string"
2224
2444
  },
2225
2445
  "default": "''",
2226
- "description": "Autocomplete attribute value",
2227
- "attribute": "autocomplete"
2446
+ "description": "Badge text displayed next to title (e.g. notification count)",
2447
+ "fieldName": "badge"
2228
2448
  },
2229
2449
  {
2230
- "kind": "field",
2231
- "name": "hint",
2450
+ "name": "badge-background",
2232
2451
  "type": {
2233
2452
  "text": "string"
2234
2453
  },
2235
2454
  "default": "''",
2236
- "description": "Helper text shown below the input",
2237
- "attribute": "hint"
2455
+ "description": "Badge background color",
2456
+ "fieldName": "badgeBackground"
2238
2457
  },
2239
2458
  {
2240
- "kind": "field",
2241
- "name": "_input",
2459
+ "name": "badge-color",
2242
2460
  "type": {
2243
- "text": "HTMLInputElement"
2461
+ "text": "string"
2244
2462
  },
2245
- "privacy": "private"
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": "field",
2548
+ "name": "justified",
2549
+ "type": {
2550
+ "text": "boolean"
2551
+ },
2552
+ "default": "false",
2553
+ "description": "Whether tabs should stretch to fill the full width evenly",
2554
+ "attribute": "justified"
2555
+ },
2556
+ {
2557
+ "kind": "field",
2558
+ "name": "size",
2559
+ "type": {
2560
+ "text": "'small' | 'medium' | 'large'"
2561
+ },
2562
+ "default": "'medium'",
2563
+ "description": "Size of the tabs: 'small' | 'medium' | 'large'",
2564
+ "attribute": "size",
2565
+ "reflects": true
2566
+ },
2567
+ {
2568
+ "kind": "method",
2569
+ "name": "_getTabs",
2570
+ "privacy": "private",
2571
+ "return": {
2572
+ "type": {
2573
+ "text": "KRTab[]"
2574
+ }
2575
+ }
2576
+ },
2577
+ {
2578
+ "kind": "method",
2579
+ "name": "_updateActiveTab",
2580
+ "privacy": "private"
2581
+ },
2582
+ {
2583
+ "kind": "method",
2584
+ "name": "_handleTabClick",
2585
+ "privacy": "private",
2586
+ "parameters": [
2587
+ {
2588
+ "name": "tab",
2589
+ "type": {
2590
+ "text": "KRTab"
2591
+ }
2592
+ }
2593
+ ]
2594
+ },
2595
+ {
2596
+ "kind": "method",
2597
+ "name": "_handleTabDismiss",
2598
+ "privacy": "private",
2599
+ "parameters": [
2600
+ {
2601
+ "name": "tab",
2602
+ "type": {
2603
+ "text": "KRTab"
2604
+ }
2605
+ },
2606
+ {
2607
+ "name": "e",
2608
+ "type": {
2609
+ "text": "Event"
2610
+ }
2611
+ }
2612
+ ]
2613
+ },
2614
+ {
2615
+ "kind": "method",
2616
+ "name": "_handleKeyDown",
2617
+ "privacy": "private",
2618
+ "parameters": [
2619
+ {
2620
+ "name": "e",
2621
+ "type": {
2622
+ "text": "KeyboardEvent"
2623
+ }
2624
+ }
2625
+ ]
2626
+ },
2627
+ {
2628
+ "kind": "method",
2629
+ "name": "_renderTabIcon",
2630
+ "privacy": "private",
2631
+ "return": {
2632
+ "type": {
2633
+ "text": "TemplateResult | typeof nothing"
2634
+ }
2635
+ },
2636
+ "parameters": [
2637
+ {
2638
+ "name": "tab",
2639
+ "type": {
2640
+ "text": "KRTab"
2641
+ }
2642
+ }
2643
+ ]
2644
+ }
2645
+ ],
2646
+ "events": [
2647
+ {
2648
+ "name": "tab-change",
2649
+ "type": {
2650
+ "text": "CustomEvent"
2651
+ },
2652
+ "description": "Fired when the active tab changes, detail: { activeTabId: string }"
2653
+ },
2654
+ {
2655
+ "name": "tab-dismiss",
2656
+ "type": {
2657
+ "text": "CustomEvent"
2658
+ },
2659
+ "description": "Fired when a dismissible tab is closed, detail: { tabId: string }"
2660
+ }
2661
+ ],
2662
+ "attributes": [
2663
+ {
2664
+ "name": "active-tab-id",
2665
+ "type": {
2666
+ "text": "string | undefined"
2667
+ },
2668
+ "description": "ID of the currently active tab",
2669
+ "fieldName": "activeTabId"
2670
+ },
2671
+ {
2672
+ "name": "justified",
2673
+ "type": {
2674
+ "text": "boolean"
2675
+ },
2676
+ "default": "false",
2677
+ "description": "Whether tabs should stretch to fill the full width evenly",
2678
+ "fieldName": "justified"
2679
+ },
2680
+ {
2681
+ "name": "size",
2682
+ "type": {
2683
+ "text": "'small' | 'medium' | 'large'"
2684
+ },
2685
+ "default": "'medium'",
2686
+ "description": "Size of the tabs: 'small' | 'medium' | 'large'",
2687
+ "fieldName": "size"
2688
+ }
2689
+ ],
2690
+ "superclass": {
2691
+ "name": "LitElement",
2692
+ "package": "lit"
2693
+ },
2694
+ "tagName": "kr-tab-group",
2695
+ "customElement": true
2696
+ }
2697
+ ],
2698
+ "exports": [
2699
+ {
2700
+ "kind": "js",
2701
+ "name": "KRTabGroup",
2702
+ "declaration": {
2703
+ "name": "KRTabGroup",
2704
+ "module": "src/tabs/tabs.ts"
2705
+ }
2706
+ },
2707
+ {
2708
+ "kind": "custom-element-definition",
2709
+ "name": "kr-tab-group",
2710
+ "declaration": {
2711
+ "name": "KRTabGroup",
2712
+ "module": "src/tabs/tabs.ts"
2713
+ }
2714
+ }
2715
+ ]
2716
+ },
2717
+ {
2718
+ "kind": "javascript-module",
2719
+ "path": "dist/form/select/select-option.js",
2720
+ "declarations": [
2721
+ {
2722
+ "kind": "variable",
2723
+ "name": "KRSelectOption",
2724
+ "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>`; } }",
2725
+ "description": "An option for the kr-select component."
2726
+ }
2727
+ ],
2728
+ "exports": [
2729
+ {
2730
+ "kind": "js",
2731
+ "name": "KRSelectOption",
2732
+ "declaration": {
2733
+ "name": "KRSelectOption",
2734
+ "module": "dist/form/select/select-option.js"
2735
+ }
2736
+ }
2737
+ ]
2738
+ },
2739
+ {
2740
+ "kind": "javascript-module",
2741
+ "path": "dist/form/select/select.js",
2742
+ "declarations": [
2743
+ {
2744
+ "kind": "variable",
2745
+ "name": "KRSelect",
2746
+ "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(); } }",
2747
+ "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."
2748
+ }
2749
+ ],
2750
+ "exports": [
2751
+ {
2752
+ "kind": "js",
2753
+ "name": "KRSelect",
2754
+ "declaration": {
2755
+ "name": "KRSelect",
2756
+ "module": "dist/form/select/select.js"
2757
+ }
2758
+ }
2759
+ ]
2760
+ },
2761
+ {
2762
+ "kind": "javascript-module",
2763
+ "path": "dist/form/text-field/text-field.js",
2764
+ "declarations": [
2765
+ {
2766
+ "kind": "variable",
2767
+ "name": "KRTextField",
2768
+ "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(); } }",
2769
+ "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."
2770
+ }
2771
+ ],
2772
+ "exports": [
2773
+ {
2774
+ "kind": "js",
2775
+ "name": "KRTextField",
2776
+ "declaration": {
2777
+ "name": "KRTextField",
2778
+ "module": "dist/form/text-field/text-field.js"
2779
+ }
2780
+ }
2781
+ ]
2782
+ },
2783
+ {
2784
+ "kind": "javascript-module",
2785
+ "path": "src/form/select/select-option.ts",
2786
+ "declarations": [
2787
+ {
2788
+ "kind": "class",
2789
+ "description": "An option for the kr-select component.",
2790
+ "name": "KRSelectOption",
2791
+ "slots": [
2792
+ {
2793
+ "description": "The option label content",
2794
+ "name": ""
2795
+ }
2796
+ ],
2797
+ "members": [
2798
+ {
2799
+ "kind": "field",
2800
+ "name": "value",
2801
+ "type": {
2802
+ "text": "string"
2803
+ },
2804
+ "default": "''",
2805
+ "description": "The option value",
2806
+ "attribute": "value"
2807
+ },
2808
+ {
2809
+ "kind": "field",
2810
+ "name": "disabled",
2811
+ "type": {
2812
+ "text": "boolean"
2813
+ },
2814
+ "default": "false",
2815
+ "description": "Whether the option is disabled",
2816
+ "attribute": "disabled"
2817
+ },
2818
+ {
2819
+ "kind": "field",
2820
+ "name": "label",
2821
+ "type": {
2822
+ "text": "string"
2823
+ },
2824
+ "description": "Gets the label text from the slot",
2825
+ "readonly": true
2826
+ }
2827
+ ],
2828
+ "attributes": [
2829
+ {
2830
+ "name": "value",
2831
+ "type": {
2832
+ "text": "string"
2833
+ },
2834
+ "default": "''",
2835
+ "description": "The option value",
2836
+ "fieldName": "value"
2837
+ },
2838
+ {
2839
+ "name": "disabled",
2840
+ "type": {
2841
+ "text": "boolean"
2842
+ },
2843
+ "default": "false",
2844
+ "description": "Whether the option is disabled",
2845
+ "fieldName": "disabled"
2846
+ }
2847
+ ],
2848
+ "superclass": {
2849
+ "name": "LitElement",
2850
+ "package": "lit"
2851
+ },
2852
+ "tagName": "kr-select-option",
2853
+ "customElement": true
2854
+ }
2855
+ ],
2856
+ "exports": [
2857
+ {
2858
+ "kind": "js",
2859
+ "name": "KRSelectOption",
2860
+ "declaration": {
2861
+ "name": "KRSelectOption",
2862
+ "module": "src/form/select/select-option.ts"
2863
+ }
2864
+ },
2865
+ {
2866
+ "kind": "custom-element-definition",
2867
+ "name": "kr-select-option",
2868
+ "declaration": {
2869
+ "name": "KRSelectOption",
2870
+ "module": "src/form/select/select-option.ts"
2871
+ }
2872
+ }
2873
+ ]
2874
+ },
2875
+ {
2876
+ "kind": "javascript-module",
2877
+ "path": "src/form/select/select.ts",
2878
+ "declarations": [
2879
+ {
2880
+ "kind": "class",
2881
+ "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.",
2882
+ "name": "KRSelect",
2883
+ "slots": [
2884
+ {
2885
+ "description": "The kr-select-option elements",
2886
+ "name": ""
2887
+ }
2888
+ ],
2889
+ "members": [
2890
+ {
2891
+ "kind": "field",
2892
+ "name": "formAssociated",
2893
+ "type": {
2894
+ "text": "boolean"
2895
+ },
2896
+ "static": true,
2897
+ "default": "true"
2898
+ },
2899
+ {
2900
+ "kind": "field",
2901
+ "name": "_internals",
2902
+ "type": {
2903
+ "text": "ElementInternals"
2904
+ },
2905
+ "privacy": "private"
2906
+ },
2907
+ {
2908
+ "kind": "field",
2909
+ "name": "label",
2910
+ "type": {
2911
+ "text": "string"
2912
+ },
2913
+ "default": "''",
2914
+ "description": "The select label text",
2915
+ "attribute": "label"
2916
+ },
2917
+ {
2918
+ "kind": "field",
2919
+ "name": "name",
2920
+ "type": {
2921
+ "text": "string"
2922
+ },
2923
+ "default": "''",
2924
+ "description": "The input name for form submission",
2925
+ "attribute": "name"
2926
+ },
2927
+ {
2928
+ "kind": "field",
2929
+ "name": "value",
2930
+ "type": {
2931
+ "text": "string"
2932
+ },
2933
+ "default": "''",
2934
+ "description": "The currently selected value",
2935
+ "attribute": "value"
2936
+ },
2937
+ {
2938
+ "kind": "field",
2939
+ "name": "placeholder",
2940
+ "type": {
2941
+ "text": "string"
2942
+ },
2943
+ "default": "'Select an option'",
2944
+ "description": "Placeholder text when no option is selected",
2945
+ "attribute": "placeholder"
2946
+ },
2947
+ {
2948
+ "kind": "field",
2949
+ "name": "disabled",
2950
+ "type": {
2951
+ "text": "boolean"
2952
+ },
2953
+ "default": "false",
2954
+ "description": "Whether the select is disabled",
2955
+ "attribute": "disabled"
2956
+ },
2957
+ {
2958
+ "kind": "field",
2959
+ "name": "required",
2960
+ "type": {
2961
+ "text": "boolean"
2962
+ },
2963
+ "default": "false",
2964
+ "description": "Whether the field is required",
2965
+ "attribute": "required"
2966
+ },
2967
+ {
2968
+ "kind": "field",
2969
+ "name": "readonly",
2970
+ "type": {
2971
+ "text": "boolean"
2972
+ },
2973
+ "default": "false",
2974
+ "description": "Whether the field is readonly",
2975
+ "attribute": "readonly"
2976
+ },
2977
+ {
2978
+ "kind": "field",
2979
+ "name": "hint",
2980
+ "type": {
2981
+ "text": "string"
2982
+ },
2983
+ "default": "''",
2984
+ "description": "Helper text shown below the select",
2985
+ "attribute": "hint"
2986
+ },
2987
+ {
2988
+ "kind": "field",
2989
+ "name": "_isOpen",
2990
+ "type": {
2991
+ "text": "boolean"
2992
+ },
2993
+ "privacy": "private",
2994
+ "default": "false"
2995
+ },
2996
+ {
2997
+ "kind": "field",
2998
+ "name": "_highlightedIndex",
2999
+ "type": {
3000
+ "text": "number"
3001
+ },
3002
+ "privacy": "private",
3003
+ "default": "-1"
3004
+ },
3005
+ {
3006
+ "kind": "field",
3007
+ "name": "_touched",
3008
+ "type": {
3009
+ "text": "boolean"
3010
+ },
3011
+ "privacy": "private",
3012
+ "default": "false"
3013
+ },
3014
+ {
3015
+ "kind": "field",
3016
+ "name": "_triggerElement",
3017
+ "type": {
3018
+ "text": "HTMLButtonElement"
3019
+ },
3020
+ "privacy": "private"
3021
+ },
3022
+ {
3023
+ "kind": "field",
3024
+ "name": "form",
3025
+ "readonly": true
3026
+ },
3027
+ {
3028
+ "kind": "field",
3029
+ "name": "validity",
3030
+ "readonly": true
3031
+ },
3032
+ {
3033
+ "kind": "field",
3034
+ "name": "validationMessage",
3035
+ "readonly": true
3036
+ },
3037
+ {
3038
+ "kind": "field",
3039
+ "name": "willValidate",
3040
+ "readonly": true
3041
+ },
3042
+ {
3043
+ "kind": "method",
3044
+ "name": "checkValidity"
3045
+ },
3046
+ {
3047
+ "kind": "method",
3048
+ "name": "reportValidity"
3049
+ },
3050
+ {
3051
+ "kind": "method",
3052
+ "name": "formResetCallback"
3053
+ },
3054
+ {
3055
+ "kind": "method",
3056
+ "name": "formStateRestoreCallback",
3057
+ "parameters": [
3058
+ {
3059
+ "name": "state",
3060
+ "type": {
3061
+ "text": "string"
3062
+ }
3063
+ }
3064
+ ]
3065
+ },
3066
+ {
3067
+ "kind": "field",
3068
+ "name": "_handleInvalid",
3069
+ "privacy": "private"
3070
+ },
3071
+ {
3072
+ "kind": "field",
3073
+ "name": "_handleOutsideClick",
3074
+ "privacy": "private"
3075
+ },
3076
+ {
3077
+ "kind": "field",
3078
+ "name": "_handleKeyDown",
3079
+ "privacy": "private"
3080
+ },
3081
+ {
3082
+ "kind": "method",
3083
+ "name": "_toggle",
3084
+ "privacy": "private"
3085
+ },
3086
+ {
3087
+ "kind": "method",
3088
+ "name": "_close",
3089
+ "privacy": "private"
3090
+ },
3091
+ {
3092
+ "kind": "method",
3093
+ "name": "_selectOption",
3094
+ "privacy": "private",
3095
+ "parameters": [
3096
+ {
3097
+ "name": "option",
3098
+ "type": {
3099
+ "text": "KRSelectOption"
3100
+ }
3101
+ }
3102
+ ]
3103
+ },
3104
+ {
3105
+ "kind": "method",
3106
+ "name": "_handleBlur",
3107
+ "privacy": "private"
3108
+ },
3109
+ {
3110
+ "kind": "method",
3111
+ "name": "_updateValidity",
3112
+ "privacy": "private"
3113
+ },
3114
+ {
3115
+ "kind": "method",
3116
+ "name": "focus"
3117
+ },
3118
+ {
3119
+ "kind": "method",
3120
+ "name": "blur"
3121
+ }
3122
+ ],
3123
+ "events": [
3124
+ {
3125
+ "name": "change",
3126
+ "type": {
3127
+ "text": "Event"
3128
+ }
3129
+ }
3130
+ ],
3131
+ "attributes": [
3132
+ {
3133
+ "name": "label",
3134
+ "type": {
3135
+ "text": "string"
3136
+ },
3137
+ "default": "''",
3138
+ "description": "The select label text",
3139
+ "fieldName": "label"
3140
+ },
3141
+ {
3142
+ "name": "name",
3143
+ "type": {
3144
+ "text": "string"
3145
+ },
3146
+ "default": "''",
3147
+ "description": "The input name for form submission",
3148
+ "fieldName": "name"
3149
+ },
3150
+ {
3151
+ "name": "value",
3152
+ "type": {
3153
+ "text": "string"
3154
+ },
3155
+ "default": "''",
3156
+ "description": "The currently selected value",
3157
+ "fieldName": "value"
3158
+ },
3159
+ {
3160
+ "name": "placeholder",
3161
+ "type": {
3162
+ "text": "string"
3163
+ },
3164
+ "default": "'Select an option'",
3165
+ "description": "Placeholder text when no option is selected",
3166
+ "fieldName": "placeholder"
3167
+ },
3168
+ {
3169
+ "name": "disabled",
3170
+ "type": {
3171
+ "text": "boolean"
3172
+ },
3173
+ "default": "false",
3174
+ "description": "Whether the select is disabled",
3175
+ "fieldName": "disabled"
3176
+ },
3177
+ {
3178
+ "name": "required",
3179
+ "type": {
3180
+ "text": "boolean"
3181
+ },
3182
+ "default": "false",
3183
+ "description": "Whether the field is required",
3184
+ "fieldName": "required"
3185
+ },
3186
+ {
3187
+ "name": "readonly",
3188
+ "type": {
3189
+ "text": "boolean"
3190
+ },
3191
+ "default": "false",
3192
+ "description": "Whether the field is readonly",
3193
+ "fieldName": "readonly"
3194
+ },
3195
+ {
3196
+ "name": "hint",
3197
+ "type": {
3198
+ "text": "string"
3199
+ },
3200
+ "default": "''",
3201
+ "description": "Helper text shown below the select",
3202
+ "fieldName": "hint"
3203
+ }
3204
+ ],
3205
+ "superclass": {
3206
+ "name": "LitElement",
3207
+ "package": "lit"
3208
+ },
3209
+ "tagName": "kr-select",
3210
+ "customElement": true
3211
+ }
3212
+ ],
3213
+ "exports": [
3214
+ {
3215
+ "kind": "js",
3216
+ "name": "KRSelect",
3217
+ "declaration": {
3218
+ "name": "KRSelect",
3219
+ "module": "src/form/select/select.ts"
3220
+ }
3221
+ },
3222
+ {
3223
+ "kind": "custom-element-definition",
3224
+ "name": "kr-select",
3225
+ "declaration": {
3226
+ "name": "KRSelect",
3227
+ "module": "src/form/select/select.ts"
3228
+ }
3229
+ }
3230
+ ]
3231
+ },
3232
+ {
3233
+ "kind": "javascript-module",
3234
+ "path": "src/form/text-field/text-field.ts",
3235
+ "declarations": [
3236
+ {
3237
+ "kind": "class",
3238
+ "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.",
3239
+ "name": "KRTextField",
3240
+ "members": [
3241
+ {
3242
+ "kind": "field",
3243
+ "name": "formAssociated",
3244
+ "type": {
3245
+ "text": "boolean"
3246
+ },
3247
+ "static": true,
3248
+ "default": "true"
3249
+ },
3250
+ {
3251
+ "kind": "field",
3252
+ "name": "_internals",
3253
+ "type": {
3254
+ "text": "ElementInternals"
3255
+ },
3256
+ "privacy": "private"
3257
+ },
3258
+ {
3259
+ "kind": "field",
3260
+ "name": "label",
3261
+ "type": {
3262
+ "text": "string"
3263
+ },
3264
+ "default": "''",
3265
+ "description": "The input label text",
3266
+ "attribute": "label"
3267
+ },
3268
+ {
3269
+ "kind": "field",
3270
+ "name": "name",
3271
+ "type": {
3272
+ "text": "string"
3273
+ },
3274
+ "default": "''",
3275
+ "description": "The input name for form submission",
3276
+ "attribute": "name"
3277
+ },
3278
+ {
3279
+ "kind": "field",
3280
+ "name": "value",
3281
+ "type": {
3282
+ "text": "string"
3283
+ },
3284
+ "default": "''",
3285
+ "description": "The current value",
3286
+ "attribute": "value"
3287
+ },
3288
+ {
3289
+ "kind": "field",
3290
+ "name": "placeholder",
3291
+ "type": {
3292
+ "text": "string"
3293
+ },
3294
+ "default": "''",
3295
+ "description": "Placeholder text",
3296
+ "attribute": "placeholder"
3297
+ },
3298
+ {
3299
+ "kind": "field",
3300
+ "name": "type",
3301
+ "type": {
3302
+ "text": "'text' | 'email' | 'password' | 'tel' | 'url' | 'search'"
3303
+ },
3304
+ "default": "'text'",
3305
+ "description": "Input type (text, email, password, tel, url, search)",
3306
+ "attribute": "type"
3307
+ },
3308
+ {
3309
+ "kind": "field",
3310
+ "name": "required",
3311
+ "type": {
3312
+ "text": "boolean"
3313
+ },
3314
+ "default": "false",
3315
+ "description": "Whether the field is required",
3316
+ "attribute": "required"
3317
+ },
3318
+ {
3319
+ "kind": "field",
3320
+ "name": "disabled",
3321
+ "type": {
3322
+ "text": "boolean"
3323
+ },
3324
+ "default": "false",
3325
+ "description": "Whether the field is disabled",
3326
+ "attribute": "disabled"
3327
+ },
3328
+ {
3329
+ "kind": "field",
3330
+ "name": "readonly",
3331
+ "type": {
3332
+ "text": "boolean"
3333
+ },
3334
+ "default": "false",
3335
+ "description": "Whether the field is readonly",
3336
+ "attribute": "readonly"
3337
+ },
3338
+ {
3339
+ "kind": "field",
3340
+ "name": "minlength",
3341
+ "type": {
3342
+ "text": "number | undefined"
3343
+ },
3344
+ "description": "Minimum length for the value",
3345
+ "attribute": "minlength"
3346
+ },
3347
+ {
3348
+ "kind": "field",
3349
+ "name": "maxlength",
3350
+ "type": {
3351
+ "text": "number | undefined"
3352
+ },
3353
+ "description": "Maximum length for the value",
3354
+ "attribute": "maxlength"
3355
+ },
3356
+ {
3357
+ "kind": "field",
3358
+ "name": "pattern",
3359
+ "type": {
3360
+ "text": "string | undefined"
3361
+ },
3362
+ "description": "Pattern for validation (regex)",
3363
+ "attribute": "pattern"
3364
+ },
3365
+ {
3366
+ "kind": "field",
3367
+ "name": "autocomplete",
3368
+ "type": {
3369
+ "text": "string"
3370
+ },
3371
+ "default": "''",
3372
+ "description": "Autocomplete attribute value",
3373
+ "attribute": "autocomplete"
3374
+ },
3375
+ {
3376
+ "kind": "field",
3377
+ "name": "hint",
3378
+ "type": {
3379
+ "text": "string"
3380
+ },
3381
+ "default": "''",
3382
+ "description": "Helper text shown below the input",
3383
+ "attribute": "hint"
3384
+ },
3385
+ {
3386
+ "kind": "field",
3387
+ "name": "_input",
3388
+ "type": {
3389
+ "text": "HTMLInputElement"
3390
+ },
3391
+ "privacy": "private"
2246
3392
  },
2247
3393
  {
2248
3394
  "kind": "field",
@@ -2306,6 +3452,16 @@
2306
3452
  }
2307
3453
  ]
2308
3454
  },
3455
+ {
3456
+ "kind": "field",
3457
+ "name": "_handleInvalid",
3458
+ "privacy": "private"
3459
+ },
3460
+ {
3461
+ "kind": "method",
3462
+ "name": "_updateValidity",
3463
+ "privacy": "private"
3464
+ },
2309
3465
  {
2310
3466
  "kind": "method",
2311
3467
  "name": "_handleInput",