@kodaris/krubble-components 1.0.60 → 1.0.62

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.
@@ -71,6 +71,14 @@
71
71
  "module": "./dialog/dialog.js"
72
72
  }
73
73
  },
74
+ {
75
+ "kind": "js",
76
+ "name": "KRDateRangePicker",
77
+ "declaration": {
78
+ "name": "KRDateRangePicker",
79
+ "module": "./date-range-picker/date-range-picker.js"
80
+ }
81
+ },
74
82
  {
75
83
  "kind": "js",
76
84
  "name": "KRSnackbar",
@@ -206,6 +214,14 @@
206
214
  "name": "KRComboBox",
207
215
  "module": "./form/index.js"
208
216
  }
217
+ },
218
+ {
219
+ "kind": "js",
220
+ "name": "KRRadioCards",
221
+ "declaration": {
222
+ "name": "KRRadioCards",
223
+ "module": "./form/index.js"
224
+ }
209
225
  }
210
226
  ]
211
227
  },
@@ -324,6 +340,12 @@
324
340
  "default": "class KRDialog extends i$2 { constructor() { super(...arguments); this._dialogRef = null; this._contentElement = null; this.opened = false; this.label = ''; this.width = '560px'; this._handleDocumentKeyDown = (e) => { if (e.key === 'Escape') { this.close(); } }; } disconnectedCallback() { super.disconnectedCallback(); document.removeEventListener('keydown', this._handleDocumentKeyDown); } updated(changedProperties) { super.updated(changedProperties); if (changedProperties.has('opened')) { if (this.opened) { document.addEventListener('keydown', this._handleDocumentKeyDown); } else { document.removeEventListener('keydown', this._handleDocumentKeyDown); } } } /** * Opens the dialog (declarative mode). */ open() { this.opened = true; } /** * Closes the dialog. * In programmatic mode (has _dialogRef), delegates to the dialog ref. * In declarative mode, sets opened=false and dispatches close event. */ close() { if (this._dialogRef) { this._dialogRef.close(undefined); return; } this.opened = false; this.dispatchEvent(new CustomEvent('close', { bubbles: true, composed: true })); } /** * Opens a dialog programmatically by creating a component and injecting it. */ static open(component, config) { // Only remove other programmatic dialogs (those with a _dialogRef) document.querySelectorAll('kr-dialog').forEach((el) => { if (el._dialogRef) { el.remove(); } }); const dialogRef = new KRDialogRef(); 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; } if (config?.label) { dialog.label = config.label; } if (config?.width) { dialog.width = config.width; } dialog._contentElement = content; dialog.opened = true; document.body.appendChild(dialog); return dialogRef; } _handleBackdropClick(e) { if (e.target.classList.contains('backdrop')) { this.close(); } } render() { return b ` <div class=\"backdrop\" @click=${this._handleBackdropClick}></div> <div class=\"dialog\" style=${o$1({ width: this.width })}> ${this.label ? b `<div class=\"dialog__header\"><div class=\"dialog__header-label\">${this.label}</div></div>` : ''} ${this._contentElement ? this._contentElement : b `<slot></slot>`} </div> `; } }",
325
341
  "description": "Generic dialog component that supports both declarative and programmatic usage.\n\nDeclarative: place `<kr-dialog>` in HTML with slotted content and call `.open()` / `.close()`.\nProgrammatic: use `KRDialog.open(Component, config)` to create and show a dialog."
326
342
  },
343
+ {
344
+ "kind": "variable",
345
+ "name": "KRDateRangePicker",
346
+ "default": "class KRDateRangePicker extends i$2 { constructor() { super(...arguments); /** * Relative date options to display */ this.relativeOptions = [ { key: 'last-5-minutes', amount: 5, unit: 'minute', type: 'relative' }, { key: 'last-30-minutes', amount: 30, unit: 'minute', type: 'relative' }, { key: 'last-1-hour', amount: 1, unit: 'hour', type: 'relative' }, { key: 'last-6-hours', amount: 6, unit: 'hour', type: 'relative' }, { key: 'last-1-day', amount: 1, unit: 'day', type: 'relative' }, { key: 'last-7-days', amount: 7, unit: 'day', type: 'relative' }, { key: 'last-30-days', amount: 30, unit: 'day', type: 'relative' }, ]; /** * Whether the picker is disabled */ this.disabled = false; /** * Whether the picker is in an invalid state */ this.invalid = false; /** * Placeholder text when no range is selected */ this.placeholder = 'Select a date range'; /** * Initial start date for absolute mode (YYYY-MM-DD) */ this.startDate = ''; /** * Initial end date for absolute mode (YYYY-MM-DD) */ this.endDate = ''; this._isOpen = false; this._activeTab = 'relative'; this._tempStartDate = ''; this._tempEndDate = ''; this._handleClickOutside = (e) => { if (!e.composedPath().includes(this)) { this._isOpen = false; } }; } connectedCallback() { super.connectedCallback(); document.addEventListener('click', this._handleClickOutside); if (this.startDate) this._tempStartDate = this.startDate; if (this.endDate) this._tempEndDate = this.endDate; // Set initial active tab based on mode if (this.mode === 'relative') { this._activeTab = 'relative'; } else if (this.mode === 'absolute') { this._activeTab = 'absolute'; } } disconnectedCallback() { super.disconnectedCallback(); document.removeEventListener('click', this._handleClickOutside); } _handleTriggerClick() { if (this.disabled) return; this._isOpen = !this._isOpen; } _handleTabClick(tab) { this._activeTab = tab; } _handleRelativeSelect(option) { this.value = { type: 'relative', amount: option.amount, unit: option.unit, }; this._isOpen = false; this.dispatchEvent(new CustomEvent('change', { detail: { value: this.value }, bubbles: true, composed: true, })); } _handleApplyAbsolute() { if (!this._tempStartDate) { return; } if (!this._tempEndDate) { return; } if (this._tempStartDate >= this._tempEndDate) { return; } this.value = { type: 'absolute', startDate: this._tempStartDate, endDate: this._tempEndDate, }; this.startDate = this._tempStartDate; this.endDate = this._tempEndDate; this._isOpen = false; this.dispatchEvent(new CustomEvent('change', { detail: { value: this.value }, bubbles: true, composed: true, })); } _handleCancel() { this._isOpen = false; this._tempStartDate = this.startDate; this._tempEndDate = this.endDate; } _formatRelativeOption(option) { if (option.amount === 0) { if (option.unit === 'day') { return 'Today'; } return `This ${option.unit}`; } const unitLabels = { second: option.amount === 1 ? 'second' : 'seconds', minute: option.amount === 1 ? 'minute' : 'minutes', hour: option.amount === 1 ? 'hour' : 'hours', day: option.amount === 1 ? 'day' : 'days', week: option.amount === 1 ? 'week' : 'weeks', month: option.amount === 1 ? 'month' : 'months', year: option.amount === 1 ? 'year' : 'years', }; return `Last ${option.amount} ${unitLabels[option.unit]}`; } _getDisplayValue() { if (!this.value) return ''; if (this.value.type === 'relative' && this.value.amount !== undefined && this.value.unit) { return this._formatRelativeOption({ key: '', amount: this.value.amount, unit: this.value.unit, type: 'relative', }); } if (this.value.type === 'absolute' && this.value.startDate && this.value.endDate) { return `${this.value.startDate} - ${this.value.endDate}`; } return ''; } _renderTriggerText() { const displayValue = this._getDisplayValue(); if (displayValue) { return b `${displayValue}`; } return b `<span class=\"trigger-placeholder\">${this.placeholder}</span>`; } _renderContent() { if (this.mode === 'relative') { return this._renderRelativeContent(); } if (this.mode === 'absolute') { return this._renderAbsoluteContent(); } if (this._activeTab === 'relative') { return this._renderRelativeContent(); } return this._renderAbsoluteContent(); } _renderRelativeContent() { return b ` <div class=\"relative-options\"> ${this.relativeOptions.map((option) => b ` <button class=${e$1({ 'relative-option': true, 'relative-option--selected': this.value?.type === 'relative' && this.value?.amount === option.amount && this.value?.unit === option.unit })} type=\"button\" @click=${() => this._handleRelativeSelect(option)} > ${this._formatRelativeOption(option)} </button> `)} </div> `; } _renderAbsoluteContent() { return b ` <div class=\"absolute\"> <div class=\"date-row\"> <span class=\"date-label\">Start</span> <input class=\"date-input\" type=\"date\" .value=${this._tempStartDate} @change=${this._handleStartDateChange} /> </div> <div class=\"date-row\"> <span class=\"date-label\">End</span> <input class=\"date-input\" type=\"date\" .value=${this._tempEndDate} @change=${this._handleEndDateChange} /> </div> </div> `; } _renderFooter() { if (this.mode === 'absolute') { return b ` <div class=\"footer\"> <kr-button variant=\"outline\" size=\"small\" @click=${this._handleCancel}> Cancel </kr-button> <kr-button variant=\"primary\" size=\"small\" ?disabled=${!this._tempStartDate || !this._tempEndDate} @click=${this._handleApplyAbsolute} > Apply </kr-button> </div> `; } if (this.mode === 'relative') { return A; } if (this._activeTab === 'absolute') { return b ` <div class=\"footer\"> <kr-button variant=\"outline\" size=\"small\" @click=${this._handleCancel}> Cancel </kr-button> <kr-button variant=\"primary\" size=\"small\" ?disabled=${!this._tempStartDate || !this._tempEndDate} @click=${this._handleApplyAbsolute} > Apply </kr-button> </div> `; } return A; } _handleStartDateChange(e) { this._tempStartDate = e.target.value; } _handleEndDateChange(e) { this._tempEndDate = e.target.value; } render() { return b ` <button part=\"trigger\" class=${e$1({ 'trigger': true, 'trigger--invalid': this.invalid })} type=\"button\" ?disabled=${this.disabled} @click=${this._handleTriggerClick} > <svg class=\"icon\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\"> <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z\" /> </svg> <span class=\"trigger-text\"> ${this._renderTriggerText()} </span> <svg class=\"icon\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\"> <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M19 9l-7 7-7-7\" /> </svg> </button> <div part=\"dropdown\" class=${e$1({ 'dropdown': true, 'dropdown--open': this._isOpen })}> ${!this.mode ? b ` <div class=\"tabs\"> <button class=${e$1({ 'tab': true, 'tab--active': this._activeTab === 'relative' })} type=\"button\" @click=${() => this._handleTabClick('relative')} > Relative </button> <button class=${e$1({ 'tab': true, 'tab--active': this._activeTab === 'absolute' })} type=\"button\" @click=${() => this._handleTabClick('absolute')} > Absolute </button> </div> ` : A} <div class=\"content\"> ${this._renderContent()} </div> ${this._renderFooter()} </div> `; } }",
347
+ "description": "A date range picker component for selecting date ranges with relative and absolute options."
348
+ },
327
349
  {
328
350
  "kind": "variable",
329
351
  "name": "KRSnackbar",
@@ -619,6 +641,12 @@
619
641
  "kind": "variable",
620
642
  "name": "KRComboBox",
621
643
  "default": "class KRComboBox extends i$2 { constructor() { super(); this._requestId = 0; this._selectedOption = null; this._handleDocumentClick = (e) => { if (!e.composedPath().includes(this)) { this._close(); } }; this.label = ''; this.name = ''; this.value = ''; this.placeholder = 'Select an option'; this.disabled = false; this.readonly = false; this.required = false; this.hint = ''; this.optionValue = 'value'; this.optionLabel = 'label'; this.options = []; this.fetch = null; this.fetchSelection = null; this._isOpen = false; this._highlightedIndex = -1; this._touched = false; this._searchQuery = ''; this._loading = false; this._handleInvalid = (e) => { e.preventDefault(); this._touched = true; }; this._internals = this.attachInternals(); } connectedCallback() { super.connectedCallback(); document.addEventListener('click', this._handleDocumentClick); this.addEventListener('invalid', this._handleInvalid); } disconnectedCallback() { super.disconnectedCallback(); document.removeEventListener('click', this._handleDocumentClick); this.removeEventListener('invalid', this._handleInvalid); } firstUpdated() { this._updateValidity(); if (this.value && this.fetchSelection) { this._resolveSelection(); } } updated(changedProperties) { if (changedProperties.has('required') || changedProperties.has('value')) { this._updateValidity(); } if (changedProperties.has('value')) { if (this.value) { // Only resolve if the selected option doesn't match the current value if (!this._selectedOption || this._getOptionValue(this._selectedOption) !== this.value) { this._resolveSelection(); } } else { this._selectedOption = null; } } if (changedProperties.has('options') && this._isOpen) { this._positionDropdown(); } } get form() { return this._internals.form; } get validity() { return this._internals.validity; } get validationMessage() { return this._internals.validationMessage; } checkValidity() { return this._internals.checkValidity(); } reportValidity() { return this._internals.reportValidity(); } formResetCallback() { this.value = ''; this._selectedOption = null; this._touched = false; this._isOpen = false; this._highlightedIndex = -1; this._searchQuery = ''; this._internals.setFormValue(''); this._internals.setValidity({}); } formStateRestoreCallback(state) { this.value = state; } focus() { if (!this._isOpen) { this._open(); } } blur() { this._triggerElement?.blur(); } _updateValidity() { if (this.required && !this.value) { this._internals.setValidity({ valueMissing: true }, 'Please select an option', this._triggerElement); } else { this._internals.setValidity({}); } } _handleTriggerClick() { if (this.disabled || this.readonly) { return; } if (this._isOpen) { this._close(); } else { this._open(); } } _open() { this._isOpen = true; this._searchQuery = ''; this._highlightedIndex = -1; this._fetch(); this.updateComplete.then(() => { this._positionDropdown(); if (this._searchInput) { this._searchInput.focus(); } }); } _close() { this._isOpen = false; this._highlightedIndex = -1; this._searchQuery = ''; } _positionDropdown() { requestAnimationFrame(() => { const dropdown = this.shadowRoot?.querySelector('.dropdown'); if (!dropdown) { return; } const triggerRect = this._triggerElement.getBoundingClientRect(); const spaceBelow = window.innerHeight - triggerRect.bottom - 4 - 8; const spaceAbove = triggerRect.top - 4 - 8; dropdown.style.left = triggerRect.left + 'px'; dropdown.style.width = triggerRect.width + 'px'; // Prefer opening below; only flip above when space below is tight if (spaceBelow < 200 && spaceAbove > spaceBelow) { dropdown.style.top = ''; dropdown.style.bottom = (window.innerHeight - triggerRect.top + 4) + 'px'; dropdown.style.maxHeight = spaceAbove + 'px'; } else { dropdown.style.bottom = ''; dropdown.style.top = triggerRect.bottom + 4 + 'px'; dropdown.style.maxHeight = spaceBelow + 'px'; } }); } _fetch() { if (!this.fetch) { return; } this._loading = true; this._requestId++; const requestId = this._requestId; this.fetch(this._searchQuery).then((options) => { if (requestId === this._requestId) { this.options = options; this._loading = false; } }).catch((error) => { console.error('kr-combo-box: fetch failed', error); this._loading = false; }); } _handleSearchInput(e) { this._searchQuery = e.target.value; this._highlightedIndex = -1; this._fetch(); } _handleSearchKeyDown(e) { switch (e.key) { case 'ArrowDown': e.preventDefault(); this._highlightedIndex = Math.min(this._highlightedIndex + 1, this.options.length - 1); this._scrollToHighlighted(); break; case 'ArrowUp': e.preventDefault(); if (this._highlightedIndex === -1) { this._highlightedIndex = this.options.length - 1; } else { this._highlightedIndex = Math.max(this._highlightedIndex - 1, 0); } this._scrollToHighlighted(); break; case 'Enter': e.preventDefault(); if (this._highlightedIndex >= 0 && this.options[this._highlightedIndex]) { this._selectOption(this.options[this._highlightedIndex]); } break; case 'Escape': e.preventDefault(); this._close(); this._triggerElement?.focus(); break; case 'Tab': this._close(); break; } } _handleTriggerKeyDown(e) { if (e.key === 'ArrowDown' || e.key === 'ArrowUp' || e.key === 'Enter' || e.key === ' ') { e.preventDefault(); if (!this._isOpen) { this._open(); } } } _handleTriggerBlur() { this._touched = true; this._updateValidity(); } _scrollToHighlighted() { this.updateComplete.then(() => { const container = this.shadowRoot?.querySelector('.options'); const highlighted = this.shadowRoot?.querySelector('.option--highlighted'); if (container && highlighted) { const containerRect = container.getBoundingClientRect(); const highlightedRect = highlighted.getBoundingClientRect(); if (highlightedRect.bottom > containerRect.bottom) { highlighted.scrollIntoView({ block: 'nearest' }); } else if (highlightedRect.top < containerRect.top) { highlighted.scrollIntoView({ block: 'nearest' }); } } }); } _getOptionValue(option) { if (typeof this.optionValue === 'function') { return this.optionValue(option); } return option[this.optionValue]; } _getOptionLabel(option) { let label; if (typeof this.optionLabel === 'function') { label = this.optionLabel(option); } else { label = option[this.optionLabel]; } if (!label) { return this._getOptionValue(option); } return label; } _resolveSelection() { if (!this.fetchSelection) { return; } const fetchedValue = this.value; this.fetchSelection(this.value).then((option) => { if (this.value !== fetchedValue) { return; } if (!option) { return; } this._selectedOption = option; this.requestUpdate(); }).catch((error) => { console.error('kr-combo-box: fetchSelection failed', error); }); } _selectOption(option) { if (option.disabled) { return; } this.value = this._getOptionValue(option); this._selectedOption = option; this._close(); this._internals.setFormValue(this.value); this._updateValidity(); this.dispatchEvent(new CustomEvent('select', { detail: { option: option }, bubbles: true, composed: true, })); this.dispatchEvent(new Event('change', { bubbles: true, composed: true })); this._triggerElement?.focus(); } _handleOptionMouseEnter(e, index) { this._highlightedIndex = index; } _renderOption(option, index) { const optionValue = this._getOptionValue(option); return b ` <button class=${e$1({ option: true, 'option--highlighted': index === this._highlightedIndex, 'option--selected': optionValue === this.value, })} type=\"button\" role=\"option\" aria-selected=${optionValue === this.value} ?disabled=${option.disabled} @click=${(e) => this._selectOption(option)} @mouseenter=${(e) => this._handleOptionMouseEnter(e, index)} > ${this._getOptionLabel(option)} </button> `; } render() { let footer = A; if (this._touched && this.required && !this.value) { footer = b `<div class=\"validation-message\">Please select an option</div>`; } else if (this.hint) { footer = b `<div class=\"hint\">${this.hint}</div>`; } return b ` <div class=\"wrapper\"> ${this.label ? b ` <label> ${this.label} ${this.required ? b `<span class=\"required\">*</span>` : A} </label> ` : A} <button class=${e$1({ trigger: true, 'trigger--open': this._isOpen, 'trigger--invalid': this._touched && this.required && !this.value, })} type=\"button\" ?disabled=${this.disabled} aria-haspopup=\"listbox\" aria-expanded=${this._isOpen} @click=${this._handleTriggerClick} @keydown=${this._handleTriggerKeyDown} @blur=${this._handleTriggerBlur} > <span class=${e$1({ trigger__value: true, trigger__placeholder: !this._selectedOption, })}> ${this._selectedOption ? this._getOptionLabel(this._selectedOption) : this.placeholder} </span> <svg class=${e$1({ trigger__icon: true, 'trigger__icon--open': this._isOpen, })} viewBox=\"0 0 24 24\" fill=\"currentColor\" > <path d=\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z\"/> </svg> </button> <div role=\"listbox\" class=${e$1({ dropdown: true, 'dropdown--open': this._isOpen, })} > <div class=\"search\"> <div class=\"search__field\"> <input class=\"search__input\" type=\"text\" placeholder=\"Search...\" .value=${this._searchQuery} @input=${this._handleSearchInput} @keydown=${this._handleSearchKeyDown} /> <svg class=\"search__icon\" viewBox=\"0 0 24 24\" fill=\"currentColor\"> <path d=\"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\"/> </svg> </div> </div> <div class=\"options\"> ${this._loading ? b `<div class=\"empty\">Loading...</div>` : this.options.length === 0 ? b `<div class=\"empty\">No options found</div>` : this.options.map((option, index) => this._renderOption(option, index))} </div> </div> ${footer} </div> `; } }"
644
+ },
645
+ {
646
+ "kind": "variable",
647
+ "name": "KRRadioCards",
648
+ "default": "class KRRadioCards extends i$2 { constructor() { super(); this._focusedIndex = -1; /** * The label text above the cards */ this.label = ''; /** * The input name for form submission */ this.name = ''; /** * The currently selected value */ this.value = ''; /** * The card options to display */ this.options = []; /** * Whether the field is disabled */ this.disabled = false; /** * Whether the field is required */ this.required = false; /** * Helper text shown below the cards */ this.hint = ''; /** * Layout direction: 'row' or 'column' */ this.direction = 'row'; this._touched = 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._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.required && !this.value) { this._internals.setValidity({ valueMissing: true }, 'Please select an option'); } else { this._internals.setValidity({}); } } _handleCardClick(e, option) { if (this.disabled || option.disabled) { return; } this.value = option.value; this._touched = true; this._internals.setFormValue(this.value); this._updateValidity(); this.dispatchEvent(new Event('change', { bubbles: true, composed: true })); } _handleKeyDown(e, index) { if (this.disabled) { return; } if (e.key === ' ' || e.key === 'Enter') { e.preventDefault(); if (!this.options[index].disabled) { this._handleCardClick(e, this.options[index]); } return; } let nextIndex = -1; if (this.direction === 'row') { if (e.key === 'ArrowRight') { nextIndex = this._findNextEnabledIndex(index, 1); } else if (e.key === 'ArrowLeft') { nextIndex = this._findNextEnabledIndex(index, -1); } } else { if (e.key === 'ArrowDown') { nextIndex = this._findNextEnabledIndex(index, 1); } else if (e.key === 'ArrowUp') { nextIndex = this._findNextEnabledIndex(index, -1); } } if (nextIndex >= 0) { e.preventDefault(); this._focusedIndex = nextIndex; const cards = this.shadowRoot?.querySelectorAll('.card'); if (cards[nextIndex]) { cards[nextIndex].focus(); } } } _findNextEnabledIndex(current, step) { let next = current + step; while (next >= 0 && next < this.options.length) { if (!this.options[next].disabled) { return next; } next += step; } return -1; } render() { return b ` <div class=\"wrapper\"> ${this.label ? b ` <label> ${this.label} ${this.required ? b `<span class=\"required\" aria-hidden=\"true\">*</span>` : A} </label> ` : A} <div class=${e$1({ 'cards': true, 'cards--row': this.direction === 'row', 'cards--column': this.direction === 'column', })} role=\"radiogroup\" aria-label=${this.label} > ${this.options.map((option, index) => { const isSelected = option.value === this.value; const isDisabled = this.disabled || !!option.disabled; return b ` <div class=${e$1({ 'card': true, 'card--selected': isSelected, 'card--disabled': isDisabled, })} role=\"radio\" aria-checked=${isSelected} aria-disabled=${isDisabled} tabindex=${isDisabled ? -1 : 0} @click=${(e) => this._handleCardClick(e, option)} @keydown=${(e) => this._handleKeyDown(e, index)} > <div class=\"card__radio\"> ${isSelected ? b `<div class=\"card__radio-dot\"></div>` : A} </div> <div class=\"card__content\"> <div class=\"card__label\">${option.label}</div> ${option.description ? b `<div class=\"card__description\">${option.description}</div>` : A} </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>` : A} </div> `; } }",
649
+ "description": "A card-style radio group for selecting between a small number of options.\nEach option renders as a bordered card with a radio indicator, label, and optional description.\n\nUses ElementInternals for form association, allowing the component\nto participate in form submission, validation, and reset."
622
650
  }
623
651
  ],
624
652
  "exports": [
@@ -694,6 +722,14 @@
694
722
  "module": "dist/krubble-components.bundled.js"
695
723
  }
696
724
  },
725
+ {
726
+ "kind": "js",
727
+ "name": "KRDateRangePicker",
728
+ "declaration": {
729
+ "name": "KRDateRangePicker",
730
+ "module": "dist/krubble-components.bundled.js"
731
+ }
732
+ },
697
733
  {
698
734
  "kind": "js",
699
735
  "name": "KRDialog",
@@ -742,6 +778,14 @@
742
778
  "module": "dist/krubble-components.bundled.js"
743
779
  }
744
780
  },
781
+ {
782
+ "kind": "js",
783
+ "name": "KRRadioCards",
784
+ "declaration": {
785
+ "name": "KRRadioCards",
786
+ "module": "dist/krubble-components.bundled.js"
787
+ }
788
+ },
745
789
  {
746
790
  "kind": "js",
747
791
  "name": "KRSelectField",
@@ -861,32 +905,32 @@
861
905
  {
862
906
  "kind": "variable",
863
907
  "name": "ve",
864
- "default": "class extends le{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> `}}"
908
+ "default": "class extends ae{constructor(){super(...arguments),this.header=\"\",this.expanded=!1}toggle(){this.expanded=!this.expanded}render(){return j` <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> `}}"
865
909
  },
866
910
  {
867
911
  "kind": "variable",
868
912
  "name": "Ce",
869
- "default": "class extends le{constructor(){super(...arguments),this.type=\"info\",this.title=\"\",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=${we({alert:!0,[\"alert--\"+this.type]:!0,\"alert--has-header\":!!this.title,\"alert--hidden\":!this.visible})} role=\"alert\" > ${e[this.type]} <div class=\"content\"> ${this.title?V`<h4 class=\"header\">${this.title}</h4>`:U} <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> `:U} </div> `}}"
913
+ "default": "class extends ae{constructor(){super(...arguments),this.type=\"info\",this.title=\"\",this.dismissible=!1,this.visible=!0}_handleDismiss(){this.visible=!1,this.dispatchEvent(new CustomEvent(\"dismiss\",{bubbles:!0,composed:!0}))}render(){const e={info:j`<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:j`<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:j`<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:j`<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 j` <div class=${we({alert:!0,[\"alert--\"+this.type]:!0,\"alert--has-header\":!!this.title,\"alert--hidden\":!this.visible})} role=\"alert\" > ${e[this.type]} <div class=\"content\"> ${this.title?j`<h4 class=\"header\">${this.title}</h4>`:U} <div class=\"message\"> <slot></slot> </div> </div> ${this.dismissible?j` <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> `:U} </div> `}}"
870
914
  },
871
915
  {
872
916
  "kind": "variable",
873
917
  "name": "Ee",
874
- "default": "class extends le{constructor(){super(...arguments),this.variant=\"flat\",this.color=\"primary\",this.size=\"medium\",this.disabled=!1,this.options=[],this.iconPosition=\"left\",this._state=\"idle\",this._stateText=\"\",this._dropdownOpened=!1,this._handleHostClick=e=>{this.options.length&&(e.stopPropagation(),this._toggleDropdown())},this._handleKeydown=e=>{\"Enter\"!==e.key&&\" \"!==e.key||(e.preventDefault(),this.options.length?this._toggleDropdown():this.click()),\"Escape\"===e.key&&this._dropdownOpened&&(this._dropdownOpened=!1)},this._handleClickOutside=e=>{this._dropdownOpened&&!this.contains(e.target)&&(this._dropdownOpened=!1)}}connectedCallback(){super.connectedCallback(),this.setAttribute(\"role\",this.href?\"link\":\"button\"),this.setAttribute(\"tabindex\",\"0\"),this.addEventListener(\"keydown\",this._handleKeydown),this.addEventListener(\"click\",this._handleHostClick),document.addEventListener(\"click\",this._handleClickOutside)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(\"keydown\",this._handleKeydown),this.removeEventListener(\"click\",this._handleHostClick),document.removeEventListener(\"click\",this._handleClickOutside)}_toggleDropdown(){this._dropdownOpened=!this._dropdownOpened,this._dropdownOpened&&requestAnimationFrame((()=>{const e=this.shadowRoot?.querySelector(\".dropdown\");if(e){const t=this.getBoundingClientRect();e.style.top=t.bottom+4+\"px\",e.style.bottom=\"\",e.style.left=t.left+\"px\",e.style.right=\"\",e.style.minWidth=t.width+\"px\",e.style.transformOrigin=\"top left\";const i=e.getBoundingClientRect();i.bottom>window.innerHeight?(e.style.top=\"\",e.style.bottom=window.innerHeight-t.top+4+\"px\",e.style.transformOrigin=\"bottom left\",e.classList.add(\"dropdown--above\")):e.classList.remove(\"dropdown--above\"),i.right>window.innerWidth&&(e.style.left=\"\",e.style.right=window.innerWidth-t.right+\"px\",i.bottom>window.innerHeight?e.style.transformOrigin=\"bottom right\":e.style.transformOrigin=\"top right\")}}))}_handleOptionClick(e,t){t.stopPropagation(),this._dropdownOpened=!1,this.dispatchEvent(new CustomEvent(\"option-select\",{detail:{id:e.id,label:e.label},bubbles:!0,composed:!0}))}showLoading(){this._clearStateTimeout(),this._state=\"loading\",this._stateText=\"\"}showSuccess(e=\"Success\",t=2e3){this._clearStateTimeout(),this._state=\"success\",this._stateText=e,t>0&&(this._stateTimeout=window.setTimeout((()=>this.reset()),t))}showError(e=\"Error\",t=2e3){this._clearStateTimeout(),this._state=\"error\",this._stateText=e,t>0&&(this._stateTimeout=window.setTimeout((()=>this.reset()),t))}isLoading(){return\"loading\"===this._state}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(){const e=V` <span class=\"content\"> <slot name=\"icon\"></slot> <slot></slot> </span> ${this.options.length?V`<svg class=\"caret\" xmlns=\"http://www.w3.org/2000/svg\" height=\"20\" width=\"20\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z\"/></svg>`:U} ${\"idle\"!==this._state?V`<span class=\"state-overlay\"> ${\"loading\"===this._state?V`<span class=\"spinner\"></span>`:this._stateText} </span>`:U} ${this.options.length?V` <div class=\"dropdown ${this._dropdownOpened?\"dropdown--opened\":\"\"}\"> ${this.options.map((e=>V` <button class=\"dropdown-item\" @click=${t=>this._handleOptionClick(e,t)} >${e.label}</button> `))} </div> `:U} `;return this.href?V`<a class=\"link\" href=${this.href} target=${this.target||U}>${e}</a>`:e}}"
918
+ "default": "class extends ae{constructor(){super(...arguments),this.variant=\"flat\",this.color=\"primary\",this.size=\"medium\",this.disabled=!1,this.options=[],this.iconPosition=\"left\",this._state=\"idle\",this._stateText=\"\",this._dropdownOpened=!1,this._handleHostClick=e=>{this.options.length&&(e.stopPropagation(),this._toggleDropdown())},this._handleKeydown=e=>{\"Enter\"!==e.key&&\" \"!==e.key||(e.preventDefault(),this.options.length?this._toggleDropdown():this.click()),\"Escape\"===e.key&&this._dropdownOpened&&(this._dropdownOpened=!1)},this._handleClickOutside=e=>{this._dropdownOpened&&!this.contains(e.target)&&(this._dropdownOpened=!1)}}connectedCallback(){super.connectedCallback(),this.setAttribute(\"role\",this.href?\"link\":\"button\"),this.setAttribute(\"tabindex\",\"0\"),this.addEventListener(\"keydown\",this._handleKeydown),this.addEventListener(\"click\",this._handleHostClick),document.addEventListener(\"click\",this._handleClickOutside)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(\"keydown\",this._handleKeydown),this.removeEventListener(\"click\",this._handleHostClick),document.removeEventListener(\"click\",this._handleClickOutside)}_toggleDropdown(){this._dropdownOpened=!this._dropdownOpened,this._dropdownOpened&&requestAnimationFrame((()=>{const e=this.shadowRoot?.querySelector(\".dropdown\");if(e){const t=this.getBoundingClientRect();e.style.top=t.bottom+4+\"px\",e.style.bottom=\"\",e.style.left=t.left+\"px\",e.style.right=\"\",e.style.minWidth=t.width+\"px\",e.style.transformOrigin=\"top left\";const i=e.getBoundingClientRect();i.bottom>window.innerHeight?(e.style.top=\"\",e.style.bottom=window.innerHeight-t.top+4+\"px\",e.style.transformOrigin=\"bottom left\",e.classList.add(\"dropdown--above\")):e.classList.remove(\"dropdown--above\"),i.right>window.innerWidth&&(e.style.left=\"\",e.style.right=window.innerWidth-t.right+\"px\",i.bottom>window.innerHeight?e.style.transformOrigin=\"bottom right\":e.style.transformOrigin=\"top right\")}}))}_handleOptionClick(e,t){t.stopPropagation(),this._dropdownOpened=!1,this.dispatchEvent(new CustomEvent(\"option-select\",{detail:{id:e.id,label:e.label},bubbles:!0,composed:!0}))}showLoading(){this._clearStateTimeout(),this._state=\"loading\",this._stateText=\"\"}showSuccess(e=\"Success\",t=2e3){this._clearStateTimeout(),this._state=\"success\",this._stateText=e,t>0&&(this._stateTimeout=window.setTimeout((()=>this.reset()),t))}showError(e=\"Error\",t=2e3){this._clearStateTimeout(),this._state=\"error\",this._stateText=e,t>0&&(this._stateTimeout=window.setTimeout((()=>this.reset()),t))}isLoading(){return\"loading\"===this._state}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(){const e=j` <span class=\"content\"> <slot name=\"icon\"></slot> <slot></slot> </span> ${this.options.length?j`<svg class=\"caret\" xmlns=\"http://www.w3.org/2000/svg\" height=\"20\" width=\"20\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z\"/></svg>`:U} ${\"idle\"!==this._state?j`<span class=\"state-overlay\"> ${\"loading\"===this._state?j`<span class=\"spinner\"></span>`:this._stateText} </span>`:U} ${this.options.length?j` <div class=\"dropdown ${this._dropdownOpened?\"dropdown--opened\":\"\"}\"> ${this.options.map((e=>j` <button class=\"dropdown-item\" @click=${t=>this._handleOptionClick(e,t)} >${e.label}</button> `))} </div> `:U} `;return this.href?j`<a class=\"link\" href=${this.href} target=${this.target||U}>${e}</a>`:e}}"
875
919
  },
876
920
  {
877
921
  "kind": "variable",
878
- "name": "Ae",
879
- "default": "class extends le{constructor(){super(...arguments),this.language=\"html\",this.code=\"\",this.activeTab=\"preview\",this.copied=!1,this.highlightedCode=\"\"}connectedCallback(){super.connectedCallback(),requestAnimationFrame((()=>{this.code||(this.code=this.innerHTML.trim().replace(/=\"\"(?=[\\s>])/g,\"\")),this.querySelectorAll(\"script\").forEach((e=>{const t=document.createElement(\"script\");t.textContent=e.textContent,e.replaceWith(t)})),this.code&&window.hljs&&window.hljs.getLanguage(this.language)?this.highlightedCode=window.hljs.highlight(this.code,{language:this.language}).value:this.highlightedCode=this.code.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\")}))}activateTab(e){this.activeTab=e}copyCode(){this.code&&navigator.clipboard.writeText(this.code).then((()=>{this.copied=!0,setTimeout((()=>{this.copied=!1}),2e3)}))}render(){return V` <div class=\"tabs\"> <button class=${we({tab:!0,\"tab--active\":\"preview\"===this.activeTab})} @click=${()=>this.activateTab(\"preview\")} > Preview </button> <button class=${we({tab:!0,\"tab--active\":\"code\"===this.activeTab})} @click=${()=>this.activateTab(\"code\")} > Code </button> <button class=${we({copy:!0,\"copy--success\":this.copied})} @click=${this.copyCode} title=${this.copied?\"Copied!\":\"Copy code\"} > ${this.copied?V`<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20 6 9 17 4 12\"></polyline></svg>`:V`<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"></rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"></path></svg>`} </button> </div> <div class=${we({panel:!0,\"panel--active\":\"preview\"===this.activeTab,\"panel--preview\":!0})}> <slot></slot> </div> <div class=${we({panel:!0,\"panel--active\":\"code\"===this.activeTab,\"panel--code\":!0})}> <pre class=\"code\"><code>${Oe(this.highlightedCode)}</code></pre> </div> `}}"
922
+ "name": "De",
923
+ "default": "class extends ae{constructor(){super(...arguments),this.language=\"html\",this.code=\"\",this.activeTab=\"preview\",this.copied=!1,this.highlightedCode=\"\"}connectedCallback(){super.connectedCallback(),requestAnimationFrame((()=>{this.code||(this.code=this.innerHTML.trim().replace(/=\"\"(?=[\\s>])/g,\"\")),this.querySelectorAll(\"script\").forEach((e=>{const t=document.createElement(\"script\");t.textContent=e.textContent,e.replaceWith(t)})),this.code&&window.hljs&&window.hljs.getLanguage(this.language)?this.highlightedCode=window.hljs.highlight(this.code,{language:this.language}).value:this.highlightedCode=this.code.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\")}))}activateTab(e){this.activeTab=e}copyCode(){this.code&&navigator.clipboard.writeText(this.code).then((()=>{this.copied=!0,setTimeout((()=>{this.copied=!1}),2e3)}))}render(){return j` <div class=\"tabs\"> <button class=${we({tab:!0,\"tab--active\":\"preview\"===this.activeTab})} @click=${()=>this.activateTab(\"preview\")} > Preview </button> <button class=${we({tab:!0,\"tab--active\":\"code\"===this.activeTab})} @click=${()=>this.activateTab(\"code\")} > Code </button> <button class=${we({copy:!0,\"copy--success\":this.copied})} @click=${this.copyCode} title=${this.copied?\"Copied!\":\"Copy code\"} > ${this.copied?j`<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20 6 9 17 4 12\"></polyline></svg>`:j`<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"></rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"></path></svg>`} </button> </div> <div class=${we({panel:!0,\"panel--active\":\"preview\"===this.activeTab,\"panel--preview\":!0})}> <slot></slot> </div> <div class=${we({panel:!0,\"panel--active\":\"code\"===this.activeTab,\"panel--code\":!0})}> <pre class=\"code\"><code>${Oe(this.highlightedCode)}</code></pre> </div> `}}"
880
924
  },
881
925
  {
882
926
  "kind": "variable",
883
- "name": "De",
884
- "default": "class extends le{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> `}}"
927
+ "name": "Pe",
928
+ "default": "class extends ae{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 j` <div class=\"menu\"> ${this.items.map((e=>e.divider?j`<div class=\"menu__divider\"></div>`:j` <button class=\"menu__item\" ?disabled=${e.disabled} @click=${()=>this.handleItemClick(e)} > ${e.icon?j`<span class=\"menu__item-icon\">${e.icon}</span>`:null} ${e.label} </button> `))} </div> `}}"
885
929
  },
886
930
  {
887
931
  "kind": "class",
888
932
  "description": "",
889
- "name": "Ve",
933
+ "name": "je",
890
934
  "members": [
891
935
  {
892
936
  "kind": "method",
@@ -936,35 +980,40 @@
936
980
  {
937
981
  "kind": "variable",
938
982
  "name": "Be",
939
- "default": "class extends le{constructor(){super(...arguments),this._dialogRef=null,this._contentElement=null,this.opened=!1,this.label=\"\",this.width=\"560px\",this._handleDocumentKeyDown=e=>{\"Escape\"===e.key&&this.close()}}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(\"keydown\",this._handleDocumentKeyDown)}updated(e){super.updated(e),e.has(\"opened\")&&(this.opened?document.addEventListener(\"keydown\",this._handleDocumentKeyDown):document.removeEventListener(\"keydown\",this._handleDocumentKeyDown))}open(){this.opened=!0}close(){this._dialogRef?this._dialogRef.close(void 0):(this.opened=!1,this.dispatchEvent(new CustomEvent(\"close\",{bubbles:!0,composed:!0})))}static open(e,t){document.querySelectorAll(\"kr-dialog\").forEach((e=>{e._dialogRef&&e.remove()}));const i=new Ve,s=document.createElement(\"kr-dialog\");i.setDialogElement(s),s._dialogRef=i;const o=new e;return o.dialogRef=i,t?.data&&(o.data=t.data),t?.label&&(s.label=t.label),t?.width&&(s.width=t.width),s._contentElement=o,s.opened=!0,document.body.appendChild(s),i}_handleBackdropClick(e){e.target.classList.contains(\"backdrop\")&&this.close()}render(){return V` <div class=\"backdrop\" @click=${this._handleBackdropClick}></div> <div class=\"dialog\" style=${qe({width:this.width})}> ${this.label?V`<div class=\"dialog__header\"><div class=\"dialog__header-label\">${this.label}</div></div>`:\"\"} ${this._contentElement?this._contentElement:V`<slot></slot>`} </div> `}}"
983
+ "default": "class extends ae{constructor(){super(...arguments),this._dialogRef=null,this._contentElement=null,this.opened=!1,this.label=\"\",this.width=\"560px\",this._handleDocumentKeyDown=e=>{\"Escape\"===e.key&&this.close()}}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(\"keydown\",this._handleDocumentKeyDown)}updated(e){super.updated(e),e.has(\"opened\")&&(this.opened?document.addEventListener(\"keydown\",this._handleDocumentKeyDown):document.removeEventListener(\"keydown\",this._handleDocumentKeyDown))}open(){this.opened=!0}close(){this._dialogRef?this._dialogRef.close(void 0):(this.opened=!1,this.dispatchEvent(new CustomEvent(\"close\",{bubbles:!0,composed:!0})))}static open(e,t){document.querySelectorAll(\"kr-dialog\").forEach((e=>{e._dialogRef&&e.remove()}));const i=new je,s=document.createElement(\"kr-dialog\");i.setDialogElement(s),s._dialogRef=i;const o=new e;return o.dialogRef=i,t?.data&&(o.data=t.data),t?.label&&(s.label=t.label),t?.width&&(s.width=t.width),s._contentElement=o,s.opened=!0,document.body.appendChild(s),i}_handleBackdropClick(e){e.target.classList.contains(\"backdrop\")&&this.close()}render(){return j` <div class=\"backdrop\" @click=${this._handleBackdropClick}></div> <div class=\"dialog\" style=${qe({width:this.width})}> ${this.label?j`<div class=\"dialog__header\"><div class=\"dialog__header-label\">${this.label}</div></div>`:\"\"} ${this._contentElement?this._contentElement:j`<slot></slot>`} </div> `}}"
940
984
  },
941
985
  {
942
986
  "kind": "variable",
943
- "name": "Fe"
987
+ "name": "Ne",
988
+ "default": "class extends ae{constructor(){super(...arguments),this.relativeOptions=[{key:\"last-5-minutes\",amount:5,unit:\"minute\",type:\"relative\"},{key:\"last-30-minutes\",amount:30,unit:\"minute\",type:\"relative\"},{key:\"last-1-hour\",amount:1,unit:\"hour\",type:\"relative\"},{key:\"last-6-hours\",amount:6,unit:\"hour\",type:\"relative\"},{key:\"last-1-day\",amount:1,unit:\"day\",type:\"relative\"},{key:\"last-7-days\",amount:7,unit:\"day\",type:\"relative\"},{key:\"last-30-days\",amount:30,unit:\"day\",type:\"relative\"}],this.disabled=!1,this.invalid=!1,this.placeholder=\"Select a date range\",this.startDate=\"\",this.endDate=\"\",this._isOpen=!1,this._activeTab=\"relative\",this._tempStartDate=\"\",this._tempEndDate=\"\",this._handleClickOutside=e=>{e.composedPath().includes(this)||(this._isOpen=!1)}}connectedCallback(){super.connectedCallback(),document.addEventListener(\"click\",this._handleClickOutside),this.startDate&&(this._tempStartDate=this.startDate),this.endDate&&(this._tempEndDate=this.endDate),\"relative\"===this.mode?this._activeTab=\"relative\":\"absolute\"===this.mode&&(this._activeTab=\"absolute\")}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(\"click\",this._handleClickOutside)}_handleTriggerClick(){this.disabled||(this._isOpen=!this._isOpen)}_handleTabClick(e){this._activeTab=e}_handleRelativeSelect(e){this.value={type:\"relative\",amount:e.amount,unit:e.unit},this._isOpen=!1,this.dispatchEvent(new CustomEvent(\"change\",{detail:{value:this.value},bubbles:!0,composed:!0}))}_handleApplyAbsolute(){this._tempStartDate&&this._tempEndDate&&(this._tempStartDate>=this._tempEndDate||(this.value={type:\"absolute\",startDate:this._tempStartDate,endDate:this._tempEndDate},this.startDate=this._tempStartDate,this.endDate=this._tempEndDate,this._isOpen=!1,this.dispatchEvent(new CustomEvent(\"change\",{detail:{value:this.value},bubbles:!0,composed:!0}))))}_handleCancel(){this._isOpen=!1,this._tempStartDate=this.startDate,this._tempEndDate=this.endDate}_formatRelativeOption(e){if(0===e.amount)return\"day\"===e.unit?\"Today\":`This ${e.unit}`;const t={second:1===e.amount?\"second\":\"seconds\",minute:1===e.amount?\"minute\":\"minutes\",hour:1===e.amount?\"hour\":\"hours\",day:1===e.amount?\"day\":\"days\",week:1===e.amount?\"week\":\"weeks\",month:1===e.amount?\"month\":\"months\",year:1===e.amount?\"year\":\"years\"};return`Last ${e.amount} ${t[e.unit]}`}_getDisplayValue(){return this.value?\"relative\"===this.value.type&&void 0!==this.value.amount&&this.value.unit?this._formatRelativeOption({key:\"\",amount:this.value.amount,unit:this.value.unit,type:\"relative\"}):\"absolute\"===this.value.type&&this.value.startDate&&this.value.endDate?`${this.value.startDate} - ${this.value.endDate}`:\"\":\"\"}_renderTriggerText(){const e=this._getDisplayValue();return e?j`${e}`:j`<span class=\"trigger-placeholder\">${this.placeholder}</span>`}_renderContent(){return\"relative\"===this.mode?this._renderRelativeContent():\"absolute\"===this.mode?this._renderAbsoluteContent():\"relative\"===this._activeTab?this._renderRelativeContent():this._renderAbsoluteContent()}_renderRelativeContent(){return j` <div class=\"relative-options\"> ${this.relativeOptions.map((e=>j` <button class=${we({\"relative-option\":!0,\"relative-option--selected\":\"relative\"===this.value?.type&&this.value?.amount===e.amount&&this.value?.unit===e.unit})} type=\"button\" @click=${()=>this._handleRelativeSelect(e)} > ${this._formatRelativeOption(e)} </button> `))} </div> `}_renderAbsoluteContent(){return j` <div class=\"absolute\"> <div class=\"date-row\"> <span class=\"date-label\">Start</span> <input class=\"date-input\" type=\"date\" .value=${this._tempStartDate} @change=${this._handleStartDateChange} /> </div> <div class=\"date-row\"> <span class=\"date-label\">End</span> <input class=\"date-input\" type=\"date\" .value=${this._tempEndDate} @change=${this._handleEndDateChange} /> </div> </div> `}_renderFooter(){return\"absolute\"===this.mode?j` <div class=\"footer\"> <kr-button variant=\"outline\" size=\"small\" @click=${this._handleCancel}> Cancel </kr-button> <kr-button variant=\"primary\" size=\"small\" ?disabled=${!this._tempStartDate||!this._tempEndDate} @click=${this._handleApplyAbsolute} > Apply </kr-button> </div> `:\"relative\"===this.mode?U:\"absolute\"===this._activeTab?j` <div class=\"footer\"> <kr-button variant=\"outline\" size=\"small\" @click=${this._handleCancel}> Cancel </kr-button> <kr-button variant=\"primary\" size=\"small\" ?disabled=${!this._tempStartDate||!this._tempEndDate} @click=${this._handleApplyAbsolute} > Apply </kr-button> </div> `:U}_handleStartDateChange(e){this._tempStartDate=e.target.value}_handleEndDateChange(e){this._tempEndDate=e.target.value}render(){return j` <button part=\"trigger\" class=${we({trigger:!0,\"trigger--invalid\":this.invalid})} type=\"button\" ?disabled=${this.disabled} @click=${this._handleTriggerClick} > <svg class=\"icon\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\"> <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z\" /> </svg> <span class=\"trigger-text\"> ${this._renderTriggerText()} </span> <svg class=\"icon\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\"> <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M19 9l-7 7-7-7\" /> </svg> </button> <div part=\"dropdown\" class=${we({dropdown:!0,\"dropdown--open\":this._isOpen})}> ${this.mode?U:j` <div class=\"tabs\"> <button class=${we({tab:!0,\"tab--active\":\"relative\"===this._activeTab})} type=\"button\" @click=${()=>this._handleTabClick(\"relative\")} > Relative </button> <button class=${we({tab:!0,\"tab--active\":\"absolute\"===this._activeTab})} type=\"button\" @click=${()=>this._handleTabClick(\"absolute\")} > Absolute </button> </div> `} <div class=\"content\"> ${this._renderContent()} </div> ${this._renderFooter()} </div> `}}"
944
989
  },
945
990
  {
946
991
  "kind": "variable",
947
- "name": "Ke",
948
- "default": "class extends le{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 s=-1;switch(e.key){case\"ArrowLeft\":s=i>0?i-1:t.length-1;break;case\"ArrowRight\":s=i<t.length-1?i+1:0;break;case\"Home\":s=0;break;case\"End\":s=t.length-1}if(s>=0){e.preventDefault();const i=t[s];this.activeTabId=i.id,this.dispatchEvent(new CustomEvent(\"tab-change\",{detail:{activeTabId:i.id},bubbles:!0,composed:!0}));const o=this.shadowRoot?.querySelectorAll(\".label\"),r=Array.from(o||[]).find((e=>e.getAttribute(\"data-tab-id\")===i.id));r?.focus()}}_renderTabIcon(e){const t=e.getIconElement();if(!t)return U;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=${we({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.label}</span> ${e.badge?V`<span class=\"label-badge\" style=${qe({backgroundColor:e.badgeBackground,color:e.badgeColor})}>${e.badge}</span>`:U} ${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> `:U} </button> `))} </div> <div class=\"content\" role=\"tabpanel\" aria-labelledby=${this.activeTabId||\"\"}> <slot @slotchange=${this._updateActiveTab}></slot> </div> `}}"
992
+ "name": "Ke"
949
993
  },
950
994
  {
951
995
  "kind": "variable",
952
996
  "name": "Ye",
953
- "default": "class extends le{constructor(){super(...arguments),this.id=\"\",this.label=\"\",this.badge=\"\",this.badgeBackground=\"\",this.badgeColor=\"\",this.disabled=!1,this.dismissible=!1,this.active=!1}getIconElement(){return this.querySelector('[slot=\"icon\"]')}updated(){const e=this.closest(\"kr-tab-group\");e&&e.requestUpdate()}render(){return V`<slot></slot>`}}"
997
+ "default": "class extends ae{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 s=-1;switch(e.key){case\"ArrowLeft\":s=i>0?i-1:t.length-1;break;case\"ArrowRight\":s=i<t.length-1?i+1:0;break;case\"Home\":s=0;break;case\"End\":s=t.length-1}if(s>=0){e.preventDefault();const i=t[s];this.activeTabId=i.id,this.dispatchEvent(new CustomEvent(\"tab-change\",{detail:{activeTabId:i.id},bubbles:!0,composed:!0}));const o=this.shadowRoot?.querySelectorAll(\".label\"),r=Array.from(o||[]).find((e=>e.getAttribute(\"data-tab-id\")===i.id));r?.focus()}}_renderTabIcon(e){const t=e.getIconElement();if(!t)return U;const i=t.cloneNode(!0);return i.removeAttribute(\"slot\"),j`<span class=\"label-icon\">${i}</span>`}render(){return j` <div class=\"header\" role=\"tablist\" @keydown=${this._handleKeyDown}> ${this._getTabs().map((e=>j` <button class=${we({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.label}</span> ${e.badge?j`<span class=\"label-badge\" style=${qe({backgroundColor:e.badgeBackground,color:e.badgeColor})}>${e.badge}</span>`:U} ${e.dismissible?j` <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> `:U} </button> `))} </div> <div class=\"content\" role=\"tabpanel\" aria-labelledby=${this.activeTabId||\"\"}> <slot @slotchange=${this._updateActiveTab}></slot> </div> `}}"
954
998
  },
955
999
  {
956
1000
  "kind": "variable",
957
1001
  "name": "Qe",
958
- "default": "class extends le{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=>{e.composedPath().includes(this)||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)),requestAnimationFrame((()=>{const e=this.shadowRoot?.querySelector(\".select-dropdown\");if(e){const t=this._triggerElement.getBoundingClientRect(),i=window.innerHeight-t.bottom-4-8;e.style.top=t.bottom+4+\"px\",e.style.left=t.left+\"px\",e.style.width=t.width+\"px\",e.style.maxHeight=i+\"px\"}}))}}_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> `:U} <div class=\"select-wrapper\"> <button class=${we({\"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=${we({\"select-value\":!0,\"select-placeholder\":!t})}> ${t||this.placeholder} </span> <svg class=${we({\"chevron-icon\":!0,\"select-icon\":!0,\"select-icon--open\":this._isOpen})} viewBox=\"0 0 24 24\" fill=\"currentColor\" > <path d=\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z\"/> </svg> </button> <div class=${we({\"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=${we({\"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} </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()}}"
1002
+ "default": "class extends ae{constructor(){super(...arguments),this.id=\"\",this.label=\"\",this.badge=\"\",this.badgeBackground=\"\",this.badgeColor=\"\",this.disabled=!1,this.dismissible=!1,this.active=!1}getIconElement(){return this.querySelector('[slot=\"icon\"]')}updated(){const e=this.closest(\"kr-tab-group\");e&&e.requestUpdate()}render(){return j`<slot></slot>`}}"
959
1003
  },
960
1004
  {
961
1005
  "kind": "variable",
962
1006
  "name": "Je",
963
- "default": "class extends le{constructor(){super(...arguments),this.value=\"\",this.disabled=!1}get label(){return this.textContent?.trim()||\"\"}render(){return V`<slot></slot>`}}"
1007
+ "default": "class extends ae{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=>{e.composedPath().includes(this)||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)),requestAnimationFrame((()=>{const e=this.shadowRoot?.querySelector(\".select-dropdown\");if(e){const t=this._triggerElement.getBoundingClientRect(),i=window.innerHeight-t.bottom-4-8;e.style.top=t.bottom+4+\"px\",e.style.left=t.left+\"px\",e.style.width=t.width+\"px\",e.style.maxHeight=i+\"px\"}}))}}_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 j` <div class=\"wrapper\"> ${this.label?j` <label> ${this.label} ${this.required?j`<span class=\"required\" aria-hidden=\"true\">*</span>`:\"\"} </label> `:U} <div class=\"select-wrapper\"> <button class=${we({\"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=${we({\"select-value\":!0,\"select-placeholder\":!t})}> ${t||this.placeholder} </span> <svg class=${we({\"chevron-icon\":!0,\"select-icon\":!0,\"select-icon--open\":this._isOpen})} viewBox=\"0 0 24 24\" fill=\"currentColor\" > <path d=\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z\"/> </svg> </button> <div class=${we({\"select-dropdown\":!0,hidden:!this._isOpen})} role=\"listbox\"> <div class=\"select-options\"> ${0===e.length?j`<div class=\"select-empty\">No options available</div>`:e.map(((e,t)=>{const i=e.value===this.value;return j` <div class=${we({\"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} </div> `}))} </div> </div> </div> ${this._touched&&this.required&&!this.value?j`<div class=\"validation-message\">Please select an option</div>`:this.hint?j`<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()}}"
1008
+ },
1009
+ {
1010
+ "kind": "variable",
1011
+ "name": "tt",
1012
+ "default": "class extends ae{constructor(){super(...arguments),this.value=\"\",this.disabled=!1}get label(){return this.textContent?.trim()||\"\"}render(){return j`<slot></slot>`}}"
964
1013
  },
965
1014
  {
966
1015
  "kind": "variable",
967
- "name": "et",
1016
+ "name": "it",
968
1017
  "type": {
969
1018
  "text": "object"
970
1019
  },
@@ -972,7 +1021,7 @@
972
1021
  },
973
1022
  {
974
1023
  "kind": "function",
975
- "name": "tt",
1024
+ "name": "st",
976
1025
  "parameters": [
977
1026
  {
978
1027
  "name": "e"
@@ -982,7 +1031,7 @@
982
1031
  {
983
1032
  "kind": "class",
984
1033
  "description": "",
985
- "name": "dt",
1034
+ "name": "ct",
986
1035
  "members": [
987
1036
  {
988
1037
  "kind": "method",
@@ -1169,49 +1218,54 @@
1169
1218
  }
1170
1219
  ]
1171
1220
  },
1172
- {
1173
- "kind": "variable",
1174
- "name": "pt",
1175
- "default": "class extends le{constructor(){super(...arguments),this._scrollStyle=\"edge\",this._data=[],this._dataState=\"idle\",this._page=1,this._pageSize=50,this._totalItems=0,this._totalPages=0,this._searchQuery=\"\",this._canScrollLeft=!1,this._canScrollRight=!1,this._canScrollHorizontal=!1,this._columnPickerOpen=!1,this._filterPanelOpened=null,this._filterPanelTab=\"filter\",this._buckets=new Map,this._filterPanelPos={top:0,left:0},this._sorts=[],this._resizing=null,this._resizeObserver=null,this._searchPositionLocked=!1,this._columnWidthsLocked=!1,this._model=new ct,this.def={columns:[]},this._handleClickOutside=e=>{const t=e.composedPath();if(this._columnPickerOpen){const e=this.shadowRoot?.querySelector(\".column-picker-wrapper\");e&&!t.includes(e)&&(this._columnPickerOpen=!1)}this._filterPanelOpened&&(t.some((e=>e.classList?.contains(\"filter-panel\")))||this._handleFilterApply())},this._handleResizeMove=e=>{if(!this._resizing)return;const t=this._model.columns.find((e=>e.id===this._resizing.columnId));if(t){const i=this._resizing.startWidth+(e.clientX-this._resizing.startX);t.width=`${Math.min(900,Math.max(50,i))}px`,this.requestUpdate()}},this._handleResizeEnd=()=>{this._resizing=null,document.removeEventListener(\"mousemove\",this._handleResizeMove),document.removeEventListener(\"mouseup\",this._handleResizeEnd)}}connectedCallback(){super.connectedCallback(),this.classList.toggle(\"kr-table--scroll-overlay\",\"overlay\"===this._scrollStyle),this.classList.toggle(\"kr-table--scroll-edge\",\"edge\"===this._scrollStyle),this._fetch(),this._initRefresh(),document.addEventListener(\"click\",this._handleClickOutside),this._resizeObserver=new ResizeObserver((()=>{this._searchPositionLocked=!1,this._updateSearchPosition()})),this._resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),clearInterval(this._refreshTimer),document.removeEventListener(\"click\",this._handleClickOutside),this._resizeObserver?.disconnect()}willUpdate(e){e.has(\"def\")&&(this._columnWidthsLocked=!1,this._model=new ct,this.def.title&&(this._model.title=this.def.title),this.def.actions&&(this._model.actions=this.def.actions),this.def.data&&(this._model.data=this.def.data),this.def.dataSource&&(this._model.dataSource=this.def.dataSource),\"number\"==typeof this.def.refreshInterval&&(this._model.refreshInterval=this.def.refreshInterval),\"number\"==typeof this.def.pageSize&&(this._model.pageSize=this.def.pageSize),this.def.rowClickable&&(this._model.rowClickable=this.def.rowClickable),this.def.rowHref&&(this._model.rowHref=this.def.rowHref),this._sorts=[],this._model.columns=this.def.columns.map((e=>{const t={...e,filter:null};return t.type||(t.type=\"string\"),e.sort&&this._sorts.push({sortBy:e.id,sortDirection:e.sort}),\"actions\"===t.type?(t.label=e.label??\"\",t.sticky=\"right\",t.resizable=!1,t):((e.filterable||e.facetable)&&(t.filter=new dt,t.filter.field=e.id,t.filter.type=t.type,e.filter?(t.filter.setOperator(e.filter.operator),t.filter.setValue(e.filter.value)):e.facetable&&!e.filterable?(t.filter.operator=\"in\",t.filter.value=[]):\"string\"===t.filter.type&&(t.filter.operator=\"contains\")),t)})),this.def.displayedColumns?this._model.displayedColumns=this.def.displayedColumns:this._model.displayedColumns=this._model.columns.map((e=>e.id)),this._fetch(),this._initRefresh())}updated(e){this._updateScrollFlags(),this._syncSlottedContent()}_syncSlottedContent(){const e=this.getDisplayedColumns().filter((e=>e.render));e.length&&(this.querySelectorAll('[slot^=\"cell-\"]').forEach((e=>e.remove())),this._data.forEach(((t,i)=>{e.forEach((e=>{const s=e.render(t);if(!s)return;const o=document.createElement(\"span\");o.slot=`cell-${i}-${e.id}`,\"actions\"===e.type&&(o.style.display=\"flex\",o.style.gap=\"8px\"),\"string\"==typeof s?o.innerHTML=s:oe(s,o),this.appendChild(o)}))})))}refresh(){this._fetch()}goToPrevPage(){this._page>1&&(this._page--,this._fetch())}goToNextPage(){this._page<this._totalPages&&(this._page++,this._fetch())}goToPage(e){e>=1&&e<=this._totalPages&&(this._page=e,this._fetch())}_toSolrData(){const e={page:this._page-1,size:this._pageSize,sorts:this._sorts,filterFields:[],queryFields:[],facetFields:[]};for(const t of this._model.columns){if(!t.filter||t.filter.isEmpty()||!t.filter.isValid())continue;const i=t.filter.toSolrData();!t.facetable||\"in\"!==t.filter.operator&&\"n_in\"!==t.filter.operator||(i.tagged=!0),e.filterFields.push(i)}for(const t of this._model.columns)t.facetable&&e.facetFields.push({name:t.id,type:\"FIELD\",limit:100,sort:\"count\",minimumCount:1});return this._searchQuery?.trim().length&&e.queryFields.push({name:\"_text_\",operation:\"IS\",value:ot(this._searchQuery,!1)}),e}_toDbParams(){const e={page:this._page-1,size:this._pageSize,sorts:this._sorts,filterFields:[],queryFields:[],facetFields:[]};for(const t of this._model.columns)t.filter&&!t.filter.isEmpty()&&t.filter.isValid()&&e.filterFields.push(t.filter.toDbParams());return this._searchQuery?.trim().length&&this._model.columns.filter((e=>e.searchable)).forEach((t=>{e.queryFields.push({name:t.id,operation:\"CONTAINS\",value:this._searchQuery,and:!1})})),e}_fetch(){if(this._model.data)return this._data=this._model.data,this._totalItems=this._model.data.length,this._totalPages=Math.ceil(this._model.data.length/this._pageSize),void(this._dataState=\"success\");if(!this._model.dataSource)return;let e;this._dataState=\"loading\",e=\"db\"===this._model.dataSource.mode?this._toDbParams():this._toSolrData(),this._model.dataSource.fetch(e).then((e=>{switch(this._model.dataSource?.mode){case\"opensearch\":throw Error(\"Opensearch not supported yet\");case\"db\":{const t=e;this._data=t.data.content,this._totalItems=t.data.totalElements,this._totalPages=t.data.totalPages,this._pageSize=t.data.size;break}default:{const t=e;this._data=t.data.content,this._totalItems=t.data.totalElements,this._totalPages=t.data.totalPages,this._pageSize=t.data.size,this._parseFacetResults(t)}}this._dataState=\"success\",this._columnWidthsLocked||requestAnimationFrame((()=>{const e=this.shadowRoot?.querySelectorAll(\".header-row > .header-cell\");if(e){const t=this.getDisplayedColumns();e.forEach(((e,i)=>{i<t.length&&!t[i].width&&\"actions\"!==t[i].type&&(t[i].width=`${e.offsetWidth}px`)}))}this._columnWidthsLocked=!0})),this._updateSearchPosition()})).catch((e=>{this._dataState=\"error\",Fe.show({message:e instanceof Error?e.message:\"Failed to load data\",type:\"error\"})}))}_parseFacetResults(e){if(e.data.facetFields){for(const t of this._model.columns){if(!t.facetable)continue;const i=e.data.facetFields[t.id];if(!i){this._buckets.set(t.id,[]);continue}const s=[];for(const e of i){let i=e.name;\"boolean\"===t.type&&\"string\"==typeof e.name&&(\"true\"===e.name?i=!0:\"false\"===e.name&&(i=!1)),null===e.name&&e.count>0&&s.unshift({val:null,count:e.count}),null!==e.name&&s.push({val:i,count:e.count})}if(t.filter&&(\"in\"===t.filter.operator||\"n_in\"===t.filter.operator)&&Array.isArray(t.filter.value))for(const e of t.filter.value)s.some((t=>t.val===e))||s.push({val:e,count:0});this._buckets.set(t.id,s)}this._buckets=new Map(this._buckets)}}_initRefresh(){clearInterval(this._refreshTimer),this._model.refreshInterval&&this._model.refreshInterval>0&&(this._refreshTimer=window.setInterval((()=>{this._fetch()}),this._model.refreshInterval))}_handleSearch(e){const t=e.target;this._searchQuery=t.value,this._page=1,this._fetch()}_getGridTemplateColumns(){return this.getDisplayedColumns().map((e=>e.width?e.width:\"actions\"===e.type?\"max-content\":\"minmax(80px, auto)\")).join(\" \")}_updateSearchPosition(){if(this._searchPositionLocked)return;const e=this.shadowRoot?.querySelector(\".search\"),t=e?.querySelector(\".search-field\");e&&t&&(e.style.justifyContent=\"center\",t.style.marginLeft=\"\",requestAnimationFrame((()=>{const i=e.getBoundingClientRect(),s=t.getBoundingClientRect().left-i.left;e.style.justifyContent=\"flex-start\",t.style.marginLeft=`${s}px`,this._searchPositionLocked=!0})))}_toggleColumnPicker(){this._columnPickerOpen=!this._columnPickerOpen}_toggleColumn(e){this._model.displayedColumns.includes(e)?this._model.displayedColumns=this._model.displayedColumns.filter((t=>t!==e)):this._model.displayedColumns=[...this._model.displayedColumns,e],this.requestUpdate()}_handleRowMouseDown(){(this._model.rowClickable||this._model.rowHref)&&window.getSelection()?.removeAllRanges()}_handleRowClick(e,t,i){if(!this._model.rowClickable&&!this._model.rowHref)return;const s=window.getSelection();s&&s.toString().length>0?e.preventDefault():this.dispatchEvent(new CustomEvent(\"row-click\",{detail:{row:t,rowIndex:i},bubbles:!0,composed:!0}))}getDisplayedColumns(){return this._model.displayedColumns.map((e=>this._model.columns.find((t=>t.id===e)))).sort(((e,t)=>\"actions\"===e.type&&\"actions\"!==t.type?1:\"actions\"!==e.type&&\"actions\"===t.type?-1:0))}_handleScroll(e){const t=e.target;this._canScrollLeft=t.scrollLeft>0,this._canScrollRight=t.scrollLeft<t.scrollWidth-t.clientWidth-1}_updateScrollFlags(){const e=this.shadowRoot?.querySelector(\".content\");e&&(this._canScrollLeft=e.scrollLeft>0,this._canScrollRight=e.scrollWidth>e.clientWidth&&e.scrollLeft<e.scrollWidth-e.clientWidth-1,this._canScrollHorizontal=e.scrollWidth>e.clientWidth),this.classList.toggle(\"kr-table--scroll-left-available\",this._canScrollLeft),this.classList.toggle(\"kr-table--scroll-right-available\",this._canScrollRight),this.classList.toggle(\"kr-table--scroll-horizontal-available\",this._canScrollHorizontal),this.classList.toggle(\"kr-table--sticky-left\",this.getDisplayedColumns().some((e=>\"left\"===e.sticky))),this.classList.toggle(\"kr-table--sticky-right\",this.getDisplayedColumns().some((e=>\"right\"===e.sticky)))}_handleResizeStart(e,t){e.preventDefault();const i=this.shadowRoot?.querySelector(`.header-cell[data-column-id=\"${t}\"]`);this._resizing={columnId:t,startX:e.clientX,startWidth:i?.offsetWidth||200},document.addEventListener(\"mousemove\",this._handleResizeMove),document.addEventListener(\"mouseup\",this._handleResizeEnd)}_handleSortClick(e,t){if(e.shiftKey){const e=this._sorts.findIndex((e=>e.sortBy===t.id));if(-1===e)this._sorts.push({sortBy:t.id,sortDirection:\"asc\"});else{const t=this._sorts[e];\"asc\"===t.sortDirection?t.sortDirection=\"desc\":this._sorts.splice(e,1)}this.requestUpdate()}else{let e=null;1===this._sorts.length&&(e=this._sorts.find((e=>e.sortBy===t.id))),e?\"asc\"===e.sortDirection?this._sorts=[{sortBy:t.id,sortDirection:\"desc\"}]:this._sorts=[]:this._sorts=[{sortBy:t.id,sortDirection:\"asc\"}]}this._page=1,this._fetch()}_renderSortIndicator(e){if(!e.sortable)return U;const t=this._sorts.findIndex((t=>t.sortBy===e.id));if(-1===t)return V` <span class=\"header-cell__sort\" @click=${t=>this._handleSortClick(t,e)}> <svg class=\"header-cell__sort-arrow header-cell__sort-arrow--ghost\" viewBox=\"0 0 24 24\" fill=\"currentColor\"> <path d=\"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z\"/> </svg> </span> `;let i={};return\"desc\"===this._sorts[t].sortDirection&&(i={transform:\"rotate(180deg)\"}),V` <span class=\"header-cell__sort\" @click=${t=>this._handleSortClick(t,e)}> <svg class=\"header-cell__sort-arrow\" viewBox=\"0 0 24 24\" fill=\"currentColor\" style=${qe(i)}> <path d=\"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z\"/> </svg> ${this._sorts.length>1?V` <span class=\"header-cell__sort-priority\">${t+1}</span> `:U} </span> `}_handleAction(e){e.href||this.dispatchEvent(new CustomEvent(\"action\",{detail:{action:e.id},bubbles:!0,composed:!0}))}_handleKqlChange(e,t){const i=e.target.value.trim();if(i){if(t.filter.setKql(i),this.requestUpdate(),!t.filter.isValid())return}else t.filter.clear(),this.requestUpdate();this._page=1,this._fetch()}_handleFilterPanelToggle(e,t){if(e.stopPropagation(),this._filterPanelOpened===t.id)this._filterPanelOpened=null;else{const i=e.currentTarget.getBoundingClientRect();let s=i.left;s+328>window.innerWidth&&(s=window.innerWidth-328),this._filterPanelPos={top:i.bottom+4,left:s},this._filterPanelOpened=t.id,t.facetable?this._filterPanelTab=\"counts\":this._filterPanelTab=\"filter\"}}_handleKqlClear(e){e.filter.clear(),this._page=1,this._fetch()}_handleFilterClear(){const e=this._model.columns.find((e=>e.id===this._filterPanelOpened));e&&(e.filter.clear(),e.facetable&&!e.filterable&&(e.filter.operator=\"in\",e.filter.value=[])),this._filterPanelOpened=null,this._page=1,this._fetch()}_handleFilterTextKeydown(e,t){\"Enter\"===e.key&&(e.preventDefault(),this._handleFilterApply())}_handleOperatorChange(e,t){t.filter.setOperator(e.target.value),this.requestUpdate()}_handleFilterStringChange(e,t){t.filter.setValue(e.target.value),this.requestUpdate()}_handleFilterNumberChange(e,t){t.filter.setValue(Number(e.target.value)),this.requestUpdate()}_handleFilterDateChange(e,t){t.filter.setValue(new Date(e.target.value),\"day\"),this.requestUpdate()}_handleFilterBooleanChange(e,t){t.filter.setValue(\"true\"===e.target.value),this.requestUpdate()}_handleFilterDateStartChange(e,t){t.filter.setStart(new Date(e.target.value),\"day\"),this.requestUpdate()}_handleFilterDateEndChange(e,t){t.filter.setEnd(new Date(e.target.value),\"day\"),this.requestUpdate()}_handleFilterNumberStartChange(e,t){t.filter.setStart(Number(e.target.value)),this.requestUpdate()}_handleFilterNumberEndChange(e,t){t.filter.setEnd(Number(e.target.value)),this.requestUpdate()}_handleFilterListChange(e,t){const i=e.target.value.split(\",\").map((e=>e.trim())).filter((e=>\"\"!==e));\"number\"===t.type?t.filter.setValue(i.map((e=>Number(e)))):t.filter.setValue(i),this.requestUpdate()}_handleFilterApply(){this._filterPanelOpened=null,this._page=1,this._fetch()}_handleFilterPanelTabChange(e){this._filterPanelTab=e.detail.activeTabId}_handleBucketToggle(e,t,i){t.filter.toggle(i.val),this._page=1,this._fetch()}_renderCellContent(e,t,i){const s=t[e.id];if(e.render)return V`<slot name=\"cell-${i}-${e.id}\"></slot>`;if(null==s)return\"\";switch(e.type){case\"number\":return\"currency\"===e.format&&\"number\"==typeof s?s.toLocaleString(\"en-US\",{style:\"currency\",currency:\"USD\"}):String(s);case\"date\":{let e;if(s instanceof Date)e=s;else if(\"string\"==typeof s&&/^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}/.test(s)){const t=s.replace(/(\\d{2}:\\d{2}:\\d{2}):(\\d+)$/,\"$1.$2\").replace(\" \",\"T\")+\"Z\";e=new Date(t)}else e=new Date(s);return e.toLocaleString(void 0,{year:\"numeric\",month:\"short\",day:\"numeric\",hour:\"numeric\",minute:\"2-digit\",timeZone:\"UTC\"})}case\"boolean\":return!0===s?\"Yes\":!1===s?\"No\":\"\";default:return String(s)}}_getHeaderCellClasses(e,t){return{\"header-cell\":!0,\"header-cell--sortable\":!!e.sortable,\"header-cell--align-center\":\"center\"===e.align,\"header-cell--align-right\":\"right\"===e.align,\"header-cell--sticky-left\":\"left\"===e.sticky,\"header-cell--sticky-left-last\":\"left\"===e.sticky&&!this.getDisplayedColumns().slice(t+1).some((e=>\"left\"===e.sticky)),\"header-cell--sticky-right\":\"right\"===e.sticky,\"header-cell--sticky-right-first\":\"right\"===e.sticky&&!this.getDisplayedColumns().slice(0,t).some((e=>\"right\"===e.sticky))}}_getCellClasses(e,t){return{cell:!0,\"cell--actions\":\"actions\"===e.type,\"cell--align-center\":\"center\"===e.align,\"cell--align-right\":\"right\"===e.align,\"cell--sticky-left\":\"left\"===e.sticky,\"cell--sticky-left-last\":\"left\"===e.sticky&&!this.getDisplayedColumns().slice(t+1).some((e=>\"left\"===e.sticky)),\"cell--sticky-right\":\"right\"===e.sticky,\"cell--sticky-right-first\":\"right\"===e.sticky&&!this.getDisplayedColumns().slice(0,t).some((e=>\"right\"===e.sticky))}}_getCellStyle(e,t){const i={};if(\"left\"===e.sticky){let e=0;for(let i=0;i<t;i++){const t=this.getDisplayedColumns()[i];\"left\"===t.sticky&&(e+=parseInt(t.width||\"0\",10))}i.left=`${e}px`}if(\"right\"===e.sticky){let e=0;for(let i=t+1;i<this.getDisplayedColumns().length;i++){const t=this.getDisplayedColumns()[i];\"right\"===t.sticky&&(e+=parseInt(t.width||\"0\",10))}i.right=`${e}px`}return i}_renderPagination(){const e=(this._page-1)*this._pageSize+1,t=Math.min(this._page*this._pageSize,this._totalItems);return V` <div class=\"pagination\"> <span class=\"pagination-icon ${1===this._page?\"pagination-icon--disabled\":\"\"}\" @click=${this.goToPrevPage} > <svg viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"/></svg> </span> <span class=\"pagination-info\">${e}-${t} of ${this._totalItems}</span> <span class=\"pagination-icon ${this._page===this._totalPages?\"pagination-icon--disabled\":\"\"}\" @click=${this.goToNextPage} > <svg viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"/></svg> </span> </div> `}_renderHeader(){return!this._model.title&&!this._model.actions?.length&&this._totalPages<=1?U:V` <div class=\"header\"> <div class=\"title\">${this._model.title??\"\"}</div> ${\"db\"!==this._model.dataSource?.mode||this._model.columns.some((e=>e.searchable))?V` <div class=\"search\"> <!-- TODO: Saved views dropdown <div class=\"views\"> <span>Default View</span> <svg viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z\"/></svg> </div> --> <div class=\"search-field\"> <svg class=\"search-icon\" viewBox=\"0 -960 960 960\" fill=\"currentColor\"><path d=\"M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z\"/></svg> <input type=\"text\" class=\"search-input\" placeholder=\"Search...\" .value=${this._searchQuery} @input=${this._handleSearch} /> </div> </div> `:V`<div class=\"search\"></div>`} <div class=\"tools\"> ${this._renderPagination()} <span class=\"refresh\" title=\"Refresh\" @click=${()=>this.refresh()}> <svg viewBox=\"0 -960 960 960\" fill=\"currentColor\"><path d=\"M480-160q-134 0-227-93t-93-227q0-134 93-227t227-93q69 0 132 28.5T720-690v-110h80v280H520v-80h168q-32-56-87.5-88T480-720q-100 0-170 70t-70 170q0 100 70 170t170 70q77 0 139-44t87-116h84q-28 106-114 173t-196 67Z\"/></svg> </span> <div class=\"column-picker-wrapper\"> <span class=\"header-icon\" title=\"Columns\" @click=${this._toggleColumnPicker}> <svg viewBox=\"0 -960 960 960\" fill=\"currentColor\"><path d=\"M121-280v-400q0-33 23.5-56.5T201-760h559q33 0 56.5 23.5T840-680v400q0 33-23.5 56.5T760-200H201q-33 0-56.5-23.5T121-280Zm79 0h133v-400H200v400Zm213 0h133v-400H413v400Zm213 0h133v-400H626v400Z\"/></svg> </span> <div class=\"column-picker ${this._columnPickerOpen?\"open\":\"\"}\"> ${[...this._model.columns].filter((e=>\"actions\"!==e.type)).sort(((e,t)=>(e.label??e.id).localeCompare(t.label??t.id))).map((e=>V` <div class=\"column-picker-item\" @click=${()=>this._toggleColumn(e.id)}> <div class=\"column-picker-checkbox ${this._model.displayedColumns.includes(e.id)?\"checked\":\"\"}\"> <svg viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"/></svg> </div> <span class=\"column-picker-label\">${e.label??e.id}</span> </div> `))} </div> </div> ${1===this._model.actions?.length?V` <kr-button class=\"actions\" .href=${this._model.actions[0].href} .target=${this._model.actions[0].target} @click=${()=>this._handleAction(this._model.actions[0])} > ${this._model.actions[0].label} </kr-button> `:this._model.actions?.length?V` <kr-button class=\"actions\" .options=${this._model.actions.map((e=>({id:e.id,label:e.label})))} @option-select=${e=>this._handleAction({id:e.detail.id,label:e.detail.label})} > Actions </kr-button> `:U} </div> </div> `}_renderStatus(){return\"loading\"===this._dataState&&0===this._data.length?V`<div class=\"status\">Loading...</div>`:\"error\"===this._dataState&&0===this._data.length?V`<div class=\"status status--error\">Error loading data</div>`:0===this._data.length?V`<div class=\"status\">No data available</div>`:U}_renderFilterPanel(){if(!this._filterPanelOpened)return U;const e=this._model.columns.find((e=>e.id===this._filterPanelOpened));let t=V``;t=\"empty\"===e.filter.operator||\"n_empty\"===e.filter.operator?V` <input type=\"text\" class=\"filter-panel__input\" disabled .value=${e.filter.text} /> `:\"between\"===e.filter.operator&&\"date\"===e.type?V` <input type=\"date\" class=\"filter-panel__input\" .valueAsDate=${e.filter.value?.start??null} @change=${t=>this._handleFilterDateStartChange(t,e)} /> <input type=\"date\" class=\"filter-panel__input\" .valueAsDate=${e.filter.value?.end??null} @change=${t=>this._handleFilterDateEndChange(t,e)} /> `:\"between\"===e.filter.operator&&\"number\"===e.type?V` <input type=\"number\" class=\"filter-panel__input\" placeholder=\"Start\" .value=${e.filter.value?.start??\"\"} @input=${t=>this._handleFilterNumberStartChange(t,e)} @keydown=${t=>this._handleFilterTextKeydown(t,e)} /> <input type=\"number\" class=\"filter-panel__input\" placeholder=\"End\" .value=${e.filter.value?.end??\"\"} @input=${t=>this._handleFilterNumberEndChange(t,e)} @keydown=${t=>this._handleFilterTextKeydown(t,e)} /> `:\"in\"===e.filter.operator||\"n_in\"===e.filter.operator?V` <textarea class=\"filter-panel__textarea\" rows=\"3\" placeholder=\"Values (comma-separated)\" .value=${e.filter.text} @input=${t=>this._handleFilterListChange(t,e)} @keydown=${t=>this._handleFilterTextKeydown(t,e)} ></textarea> `:\"boolean\"===e.type?V` <kr-select-field placeholder=\"Value\" .value=${String(e.filter.value??\"\")} @change=${t=>this._handleFilterBooleanChange(t,e)} > <kr-select-option value=\"true\">Yes</kr-select-option> <kr-select-option value=\"false\">No</kr-select-option> </kr-select-field> `:\"date\"===e.type?V` <input type=\"date\" class=\"filter-panel__input\" .valueAsDate=${e.filter.value} @change=${t=>this._handleFilterDateChange(t,e)} /> `:\"number\"===e.type?V` <input type=\"number\" class=\"filter-panel__input\" placeholder=\"Value\" min=\"0\" .value=${e.filter.text} @input=${t=>this._handleFilterNumberChange(t,e)} @keydown=${t=>this._handleFilterTextKeydown(t,e)} /> `:V` <input type=\"text\" class=\"filter-panel__input\" placeholder=\"Value\" .value=${e.filter.text} @input=${t=>this._handleFilterStringChange(t,e)} @keydown=${t=>this._handleFilterTextKeydown(t,e)} /> `;const i=V` <div class=\"filter-panel__content\"> <kr-select-field .value=${e.filter.operator} @change=${t=>this._handleOperatorChange(t,e)} > ${tt(e.type).map((e=>V` <kr-select-option value=${e.key}>${e.label}</kr-select-option> `))} </kr-select-field> ${t} </div> `,s=this._buckets.get(e.id)||[];let o,r;return o=s.length?V` <div class=\"buckets\"> ${s.map((t=>{let i=\"(Empty)\";null!==t.val&&void 0!==t.val&&(i=\"boolean\"===e.type?!0===t.val||\"true\"===t.val?\"Yes\":\"No\":String(t.val));let s=e.filter.has(t.val);\"n_in\"===e.filter.operator&&(s=!s);let o=U;return s&&(o=V` <svg viewBox=\"0 0 24 24\" fill=\"currentColor\"> <path d=\"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"/> </svg> `),V` <div class=\"bucket\" @click=${i=>this._handleBucketToggle(i,e,t)} > <div class=${we({bucket__checkbox:!0,\"bucket__checkbox--checked\":s})}> ${o} </div> <span class=\"bucket__label\">${i}</span> <span class=\"bucket__count\">${t.count}</span> </div> `}))} </div> `:V`<div class=\"bucket-empty\">No data</div>`,r=e.facetable&&e.filterable?V` <kr-tab-group size=\"small\" active-tab-id=${this._filterPanelTab} @tab-change=${e=>this._handleFilterPanelTabChange(e)} > <kr-tab id=\"filter\" label=\"Filter\"> ${i} </kr-tab> <kr-tab id=\"counts\" label=\"Counts\"> ${o} </kr-tab> </kr-tab-group> `:e.facetable?o:i,V` <div class=\"filter-panel\" style=${qe({top:this._filterPanelPos.top+\"px\",left:this._filterPanelPos.left+\"px\"})} > ${r} <div class=\"filter-panel__actions\"> <kr-button variant=\"outline\" color=\"secondary\" size=\"small\" @click=${this._handleFilterClear}> Clear </kr-button> <kr-button size=\"small\" @click=${this._handleFilterApply}> Apply </kr-button> </div> </div> `}_renderFilterRow(){const e=this.getDisplayedColumns();return e.some((e=>e.filterable||e.facetable))?V` <div class=\"filter-row\"> ${e.map(((t,i)=>t.filterable||t.facetable?V` <div class=${we({\"filter-cell\":!0,\"filter-cell--sticky-left\":\"left\"===t.sticky,\"filter-cell--sticky-right\":\"right\"===t.sticky,\"filter-cell--sticky-right-first\":\"right\"===t.sticky&&!e.slice(0,i).some((e=>\"right\"===e.sticky))})} style=${qe(this._getCellStyle(t,i))} > <div class=\"filter-cell__wrapper\"> <input type=\"text\" class=${we({\"filter-cell__input\":!0,\"filter-cell__input--invalid\":!t.filter.isValid()})} .value=${t.filter.kql} @change=${e=>this._handleKqlChange(e,t)} /> ${t.filter?.kql?.length>0?V` <button class=\"filter-cell__clear\" @click=${()=>this._handleKqlClear(t)} > <svg viewBox=\"0 0 24 24\" fill=\"currentColor\"> <path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/> </svg> </button> `:U} <button class=${we({\"filter-cell__advanced\":!0,\"filter-cell__advanced--opened\":this._filterPanelOpened===t.id})} @click=${e=>this._handleFilterPanelToggle(e,t)} > <svg viewBox=\"0 0 24 24\" fill=\"currentColor\"> <path d=\"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z\"/> </svg> </button> </div> </div> `:V`<div class=${we({\"filter-cell\":!0,\"filter-cell--sticky-left\":\"left\"===t.sticky,\"filter-cell--sticky-right\":\"right\"===t.sticky,\"filter-cell--sticky-right-first\":\"right\"===t.sticky&&!e.slice(0,i).some((e=>\"right\"===e.sticky))})} style=${qe(this._getCellStyle(t,i))} ></div>`))} </div> `:U}_renderTable(){return V` <div class=\"wrapper\"> <div class=\"overlay-left\"></div> <div class=\"overlay-right\"></div> ${this._renderStatus()} <div class=\"content\" @scroll=${this._handleScroll}> <div class=\"table\" style=\"grid-template-columns: ${this._getGridTemplateColumns()}\"> <div class=\"header-row\"> ${this.getDisplayedColumns().map(((e,t)=>V` <div class=${we(this._getHeaderCellClasses(e,t))} style=${qe(this._getCellStyle(e,t))} data-column-id=${e.id} > <span class=\"header-cell__label\">${e.label??e.id}</span> ${this._renderSortIndicator(e)} ${!1!==e.resizable?V`<div class=\"header-cell__resize\" @mousedown=${t=>this._handleResizeStart(t,e.id)} ></div>`:U} </div> `))} </div> ${this._renderFilterRow()} ${this._data.map(((e,t)=>{const i=this.getDisplayedColumns().map(((i,s)=>V` <div class=${we(this._getCellClasses(i,s))} style=${qe(this._getCellStyle(i,s))} data-column-id=${i.id} > ${this._renderCellContent(i,e,t)} </div> `));return this._model.rowHref?V` <a href=${this._model.rowHref(e)} draggable=\"false\" class=${we({row:!0,\"row--clickable\":!0,\"row--link\":!0})} @mousedown=${()=>this._handleRowMouseDown()} @click=${i=>this._handleRowClick(i,e,t)} >${i}</a> `:V` <div class=${we({row:!0,\"row--clickable\":!!this._model.rowClickable})} @mousedown=${()=>this._handleRowMouseDown()} @click=${i=>this._handleRowClick(i,e,t)} >${i}</div> `}))} </div> </div> </div> `}render(){return this._model.columns.length?V` ${this._renderHeader()} ${this._renderTable()} ${this._renderFilterPanel()} `:V`<slot></slot>`}}"
1176
- },
1177
1221
  {
1178
1222
  "kind": "variable",
1179
1223
  "name": "ft",
1180
- "default": "class extends le{constructor(){super(...arguments),this.size=\"md\",this.color=\"dark\"}render(){var e=\"\",t=\"\";return e=\"sm\"==this.size?\"16px\":\"md\"==this.size?\"24px\":\"lg\"==this.size?\"32px\":\"xl\"==this.size?\"48px\":this.size,t=\"dark\"==this.color?\"#163052\":\"light\"==this.color?\"#ffffff\":this.color,V` <svg class=\"spinner\" style=${`width: ${e}; height: ${e}; color: ${t}`} viewBox=\"0 0 44 44\" role=\"status\" aria-label=\"Loading\" > <circle class=\"circle\" cx=\"22\" cy=\"22\" r=\"20\" fill=\"none\" stroke-width=\"4\" /> </svg> `}}"
1224
+ "default": "class extends ae{constructor(){super(...arguments),this._scrollStyle=\"edge\",this._data=[],this._dataState=\"idle\",this._page=1,this._pageSize=50,this._totalItems=0,this._totalPages=0,this._searchQuery=\"\",this._canScrollLeft=!1,this._canScrollRight=!1,this._canScrollHorizontal=!1,this._columnPickerOpen=!1,this._filterPanelOpened=null,this._filterPanelTab=\"filter\",this._buckets=new Map,this._filterPanelPos={top:0,left:0},this._sorts=[],this._resizing=null,this._resizeObserver=null,this._searchPositionLocked=!1,this._columnWidthsLocked=!1,this._model=new ut,this.def={columns:[]},this._handleClickOutside=e=>{const t=e.composedPath();if(this._columnPickerOpen){const e=this.shadowRoot?.querySelector(\".column-picker-wrapper\");e&&!t.includes(e)&&(this._columnPickerOpen=!1)}this._filterPanelOpened&&(t.some((e=>e.classList?.contains(\"filter-panel\")))||this._handleFilterApply())},this._handleResizeMove=e=>{if(!this._resizing)return;const t=this._model.columns.find((e=>e.id===this._resizing.columnId));if(t){const i=this._resizing.startWidth+(e.clientX-this._resizing.startX);t.width=`${Math.min(900,Math.max(50,i))}px`,this.requestUpdate()}},this._handleResizeEnd=()=>{this._resizing=null,document.removeEventListener(\"mousemove\",this._handleResizeMove),document.removeEventListener(\"mouseup\",this._handleResizeEnd)}}connectedCallback(){super.connectedCallback(),this.classList.toggle(\"kr-table--scroll-overlay\",\"overlay\"===this._scrollStyle),this.classList.toggle(\"kr-table--scroll-edge\",\"edge\"===this._scrollStyle),this._fetch(),this._initRefresh(),document.addEventListener(\"click\",this._handleClickOutside),this._resizeObserver=new ResizeObserver((()=>{this._searchPositionLocked=!1,this._updateSearchPosition()})),this._resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),clearInterval(this._refreshTimer),document.removeEventListener(\"click\",this._handleClickOutside),this._resizeObserver?.disconnect()}willUpdate(e){e.has(\"def\")&&(this._columnWidthsLocked=!1,this._model=new ut,this.def.title&&(this._model.title=this.def.title),this.def.actions&&(this._model.actions=this.def.actions),this.def.data&&(this._model.data=this.def.data),this.def.dataSource&&(this._model.dataSource=this.def.dataSource),\"number\"==typeof this.def.refreshInterval&&(this._model.refreshInterval=this.def.refreshInterval),\"number\"==typeof this.def.pageSize&&(this._model.pageSize=this.def.pageSize),this.def.rowClickable&&(this._model.rowClickable=this.def.rowClickable),this.def.rowHref&&(this._model.rowHref=this.def.rowHref),this._sorts=[],this._model.columns=this.def.columns.map((e=>{const t={...e,filter:null};return t.type||(t.type=\"string\"),e.sort&&this._sorts.push({sortBy:e.id,sortDirection:e.sort}),\"actions\"===t.type?(t.label=e.label??\"\",t.sticky=\"right\",t.resizable=!1,t):((e.filterable||e.facetable)&&(t.filter=new ct,t.filter.field=e.id,t.filter.type=t.type,e.filter?(t.filter.setOperator(e.filter.operator),t.filter.setValue(e.filter.value)):e.facetable&&!e.filterable?(t.filter.operator=\"in\",t.filter.value=[]):\"string\"===t.filter.type&&(t.filter.operator=\"contains\")),t)})),this.def.displayedColumns?this._model.displayedColumns=this.def.displayedColumns:this._model.displayedColumns=this._model.columns.map((e=>e.id)),this._fetch(),this._initRefresh())}updated(e){this._updateScrollFlags(),this._syncSlottedContent()}_syncSlottedContent(){const e=this.getDisplayedColumns().filter((e=>e.render));e.length&&(this.querySelectorAll('[slot^=\"cell-\"]').forEach((e=>e.remove())),this._data.forEach(((t,i)=>{e.forEach((e=>{const s=e.render(t);if(!s)return;const o=document.createElement(\"span\");o.slot=`cell-${i}-${e.id}`,\"actions\"===e.type&&(o.style.display=\"flex\",o.style.gap=\"8px\"),\"string\"==typeof s?o.innerHTML=s:oe(s,o),this.appendChild(o)}))})))}refresh(){this._fetch()}goToPrevPage(){this._page>1&&(this._page--,this._fetch())}goToNextPage(){this._page<this._totalPages&&(this._page++,this._fetch())}goToPage(e){e>=1&&e<=this._totalPages&&(this._page=e,this._fetch())}_toSolrData(){const e={page:this._page-1,size:this._pageSize,sorts:this._sorts,filterFields:[],queryFields:[],facetFields:[]};for(const t of this._model.columns){if(!t.filter||t.filter.isEmpty()||!t.filter.isValid())continue;const i=t.filter.toSolrData();!t.facetable||\"in\"!==t.filter.operator&&\"n_in\"!==t.filter.operator||(i.tagged=!0),e.filterFields.push(i)}for(const t of this._model.columns)t.facetable&&e.facetFields.push({name:t.id,type:\"FIELD\",limit:100,sort:\"count\",minimumCount:1});return this._searchQuery?.trim().length&&e.queryFields.push({name:\"_text_\",operation:\"IS\",value:at(this._searchQuery,!1)}),e}_toDbParams(){const e={page:this._page-1,size:this._pageSize,sorts:this._sorts,filterFields:[],queryFields:[],facetFields:[]};for(const t of this._model.columns)t.filter&&!t.filter.isEmpty()&&t.filter.isValid()&&e.filterFields.push(t.filter.toDbParams());return this._searchQuery?.trim().length&&this._model.columns.filter((e=>e.searchable)).forEach((t=>{e.queryFields.push({name:t.id,operation:\"CONTAINS\",value:this._searchQuery,and:!1})})),e}_fetch(){if(this._model.data)return this._data=this._model.data,this._totalItems=this._model.data.length,this._totalPages=Math.ceil(this._model.data.length/this._pageSize),void(this._dataState=\"success\");if(!this._model.dataSource)return;let e;this._dataState=\"loading\",e=\"db\"===this._model.dataSource.mode?this._toDbParams():this._toSolrData(),this._model.dataSource.fetch(e).then((e=>{switch(this._model.dataSource?.mode){case\"opensearch\":throw Error(\"Opensearch not supported yet\");case\"db\":{const t=e;this._data=t.data.content,this._totalItems=t.data.totalElements,this._totalPages=t.data.totalPages,this._pageSize=t.data.size;break}default:{const t=e;this._data=t.data.content,this._totalItems=t.data.totalElements,this._totalPages=t.data.totalPages,this._pageSize=t.data.size,this._parseFacetResults(t)}}this._dataState=\"success\",this._columnWidthsLocked||requestAnimationFrame((()=>{const e=this.shadowRoot?.querySelectorAll(\".header-row > .header-cell\");if(e){const t=this.getDisplayedColumns();e.forEach(((e,i)=>{i<t.length&&!t[i].width&&\"actions\"!==t[i].type&&(t[i].width=`${e.offsetWidth}px`)}))}this._columnWidthsLocked=!0})),this._updateSearchPosition()})).catch((e=>{this._dataState=\"error\",Ke.show({message:e instanceof Error?e.message:\"Failed to load data\",type:\"error\"})}))}_parseFacetResults(e){if(e.data.facetFields){for(const t of this._model.columns){if(!t.facetable)continue;const i=e.data.facetFields[t.id];if(!i){this._buckets.set(t.id,[]);continue}const s=[];for(const e of i){let i=e.name;\"boolean\"===t.type&&\"string\"==typeof e.name&&(\"true\"===e.name?i=!0:\"false\"===e.name&&(i=!1)),null===e.name&&e.count>0&&s.unshift({val:null,count:e.count}),null!==e.name&&s.push({val:i,count:e.count})}if(t.filter&&(\"in\"===t.filter.operator||\"n_in\"===t.filter.operator)&&Array.isArray(t.filter.value))for(const e of t.filter.value)s.some((t=>t.val===e))||s.push({val:e,count:0});this._buckets.set(t.id,s)}this._buckets=new Map(this._buckets)}}_initRefresh(){clearInterval(this._refreshTimer),this._model.refreshInterval&&this._model.refreshInterval>0&&(this._refreshTimer=window.setInterval((()=>{this._fetch()}),this._model.refreshInterval))}_handleSearch(e){const t=e.target;this._searchQuery=t.value,this._page=1,this._fetch()}_getGridTemplateColumns(){return this.getDisplayedColumns().map((e=>e.width?e.width:\"actions\"===e.type?\"max-content\":\"minmax(80px, auto)\")).join(\" \")}_updateSearchPosition(){if(this._searchPositionLocked)return;const e=this.shadowRoot?.querySelector(\".search\"),t=e?.querySelector(\".search-field\");e&&t&&(e.style.justifyContent=\"center\",t.style.marginLeft=\"\",requestAnimationFrame((()=>{const i=e.getBoundingClientRect(),s=t.getBoundingClientRect().left-i.left;e.style.justifyContent=\"flex-start\",t.style.marginLeft=`${s}px`,this._searchPositionLocked=!0})))}_toggleColumnPicker(){this._columnPickerOpen=!this._columnPickerOpen}_toggleColumn(e){this._model.displayedColumns.includes(e)?this._model.displayedColumns=this._model.displayedColumns.filter((t=>t!==e)):this._model.displayedColumns=[...this._model.displayedColumns,e],this.requestUpdate()}_handleRowMouseDown(){(this._model.rowClickable||this._model.rowHref)&&window.getSelection()?.removeAllRanges()}_handleRowClick(e,t,i){if(!this._model.rowClickable&&!this._model.rowHref)return;const s=window.getSelection();s&&s.toString().length>0?e.preventDefault():this.dispatchEvent(new CustomEvent(\"row-click\",{detail:{row:t,rowIndex:i},bubbles:!0,composed:!0}))}getDisplayedColumns(){return this._model.displayedColumns.map((e=>this._model.columns.find((t=>t.id===e)))).sort(((e,t)=>\"actions\"===e.type&&\"actions\"!==t.type?1:\"actions\"!==e.type&&\"actions\"===t.type?-1:0))}_handleScroll(e){const t=e.target;this._canScrollLeft=t.scrollLeft>0,this._canScrollRight=t.scrollLeft<t.scrollWidth-t.clientWidth-1}_updateScrollFlags(){const e=this.shadowRoot?.querySelector(\".content\");e&&(this._canScrollLeft=e.scrollLeft>0,this._canScrollRight=e.scrollWidth>e.clientWidth&&e.scrollLeft<e.scrollWidth-e.clientWidth-1,this._canScrollHorizontal=e.scrollWidth>e.clientWidth),this.classList.toggle(\"kr-table--scroll-left-available\",this._canScrollLeft),this.classList.toggle(\"kr-table--scroll-right-available\",this._canScrollRight),this.classList.toggle(\"kr-table--scroll-horizontal-available\",this._canScrollHorizontal),this.classList.toggle(\"kr-table--sticky-left\",this.getDisplayedColumns().some((e=>\"left\"===e.sticky))),this.classList.toggle(\"kr-table--sticky-right\",this.getDisplayedColumns().some((e=>\"right\"===e.sticky)))}_handleResizeStart(e,t){e.preventDefault();const i=this.shadowRoot?.querySelector(`.header-cell[data-column-id=\"${t}\"]`);this._resizing={columnId:t,startX:e.clientX,startWidth:i?.offsetWidth||200},document.addEventListener(\"mousemove\",this._handleResizeMove),document.addEventListener(\"mouseup\",this._handleResizeEnd)}_handleSortClick(e,t){if(e.shiftKey){const e=this._sorts.findIndex((e=>e.sortBy===t.id));if(-1===e)this._sorts.push({sortBy:t.id,sortDirection:\"asc\"});else{const t=this._sorts[e];\"asc\"===t.sortDirection?t.sortDirection=\"desc\":this._sorts.splice(e,1)}this.requestUpdate()}else{let e=null;1===this._sorts.length&&(e=this._sorts.find((e=>e.sortBy===t.id))),e?\"asc\"===e.sortDirection?this._sorts=[{sortBy:t.id,sortDirection:\"desc\"}]:this._sorts=[]:this._sorts=[{sortBy:t.id,sortDirection:\"asc\"}]}this._page=1,this._fetch()}_renderSortIndicator(e){if(!e.sortable)return U;const t=this._sorts.findIndex((t=>t.sortBy===e.id));if(-1===t)return j` <span class=\"header-cell__sort\" @click=${t=>this._handleSortClick(t,e)}> <svg class=\"header-cell__sort-arrow header-cell__sort-arrow--ghost\" viewBox=\"0 0 24 24\" fill=\"currentColor\"> <path d=\"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z\"/> </svg> </span> `;let i={};return\"desc\"===this._sorts[t].sortDirection&&(i={transform:\"rotate(180deg)\"}),j` <span class=\"header-cell__sort\" @click=${t=>this._handleSortClick(t,e)}> <svg class=\"header-cell__sort-arrow\" viewBox=\"0 0 24 24\" fill=\"currentColor\" style=${qe(i)}> <path d=\"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z\"/> </svg> ${this._sorts.length>1?j` <span class=\"header-cell__sort-priority\">${t+1}</span> `:U} </span> `}_handleAction(e){e.href||this.dispatchEvent(new CustomEvent(\"action\",{detail:{action:e.id},bubbles:!0,composed:!0}))}_handleKqlChange(e,t){const i=e.target.value.trim();if(i){if(t.filter.setKql(i),this.requestUpdate(),!t.filter.isValid())return}else t.filter.clear(),this.requestUpdate();this._page=1,this._fetch()}_handleFilterPanelToggle(e,t){if(e.stopPropagation(),this._filterPanelOpened===t.id)this._filterPanelOpened=null;else{const i=e.currentTarget.getBoundingClientRect();let s=i.left;s+328>window.innerWidth&&(s=window.innerWidth-328),this._filterPanelPos={top:i.bottom+4,left:s},this._filterPanelOpened=t.id,t.facetable?this._filterPanelTab=\"counts\":this._filterPanelTab=\"filter\"}}_handleKqlClear(e){e.filter.clear(),this._page=1,this._fetch()}_handleFilterClear(){const e=this._model.columns.find((e=>e.id===this._filterPanelOpened));e&&(e.filter.clear(),e.facetable&&!e.filterable&&(e.filter.operator=\"in\",e.filter.value=[])),this._filterPanelOpened=null,this._page=1,this._fetch()}_handleFilterTextKeydown(e,t){\"Enter\"===e.key&&(e.preventDefault(),this._handleFilterApply())}_handleOperatorChange(e,t){t.filter.setOperator(e.target.value),this.requestUpdate()}_handleFilterStringChange(e,t){t.filter.setValue(e.target.value),this.requestUpdate()}_handleFilterNumberChange(e,t){t.filter.setValue(Number(e.target.value)),this.requestUpdate()}_handleFilterDateChange(e,t){t.filter.setValue(new Date(e.target.value),\"day\"),this.requestUpdate()}_handleFilterBooleanChange(e,t){t.filter.setValue(\"true\"===e.target.value),this.requestUpdate()}_handleFilterDateStartChange(e,t){t.filter.setStart(new Date(e.target.value),\"day\"),this.requestUpdate()}_handleFilterDateEndChange(e,t){t.filter.setEnd(new Date(e.target.value),\"day\"),this.requestUpdate()}_handleFilterNumberStartChange(e,t){t.filter.setStart(Number(e.target.value)),this.requestUpdate()}_handleFilterNumberEndChange(e,t){t.filter.setEnd(Number(e.target.value)),this.requestUpdate()}_handleFilterListChange(e,t){const i=e.target.value.split(\",\").map((e=>e.trim())).filter((e=>\"\"!==e));\"number\"===t.type?t.filter.setValue(i.map((e=>Number(e)))):t.filter.setValue(i),this.requestUpdate()}_handleFilterApply(){this._filterPanelOpened=null,this._page=1,this._fetch()}_handleFilterPanelTabChange(e){this._filterPanelTab=e.detail.activeTabId}_handleBucketToggle(e,t,i){t.filter.toggle(i.val),this._page=1,this._fetch()}_renderCellContent(e,t,i){const s=t[e.id];if(e.render)return j`<slot name=\"cell-${i}-${e.id}\"></slot>`;if(null==s)return\"\";switch(e.type){case\"number\":return\"currency\"===e.format&&\"number\"==typeof s?s.toLocaleString(\"en-US\",{style:\"currency\",currency:\"USD\"}):String(s);case\"date\":{let e;if(s instanceof Date)e=s;else if(\"string\"==typeof s&&/^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}/.test(s)){const t=s.replace(/(\\d{2}:\\d{2}:\\d{2}):(\\d+)$/,\"$1.$2\").replace(\" \",\"T\")+\"Z\";e=new Date(t)}else e=new Date(s);return e.toLocaleString(void 0,{year:\"numeric\",month:\"short\",day:\"numeric\",hour:\"numeric\",minute:\"2-digit\",timeZone:\"UTC\"})}case\"boolean\":return!0===s?\"Yes\":!1===s?\"No\":\"\";default:return String(s)}}_getHeaderCellClasses(e,t){return{\"header-cell\":!0,\"header-cell--sortable\":!!e.sortable,\"header-cell--align-center\":\"center\"===e.align,\"header-cell--align-right\":\"right\"===e.align,\"header-cell--sticky-left\":\"left\"===e.sticky,\"header-cell--sticky-left-last\":\"left\"===e.sticky&&!this.getDisplayedColumns().slice(t+1).some((e=>\"left\"===e.sticky)),\"header-cell--sticky-right\":\"right\"===e.sticky,\"header-cell--sticky-right-first\":\"right\"===e.sticky&&!this.getDisplayedColumns().slice(0,t).some((e=>\"right\"===e.sticky))}}_getCellClasses(e,t){return{cell:!0,\"cell--actions\":\"actions\"===e.type,\"cell--align-center\":\"center\"===e.align,\"cell--align-right\":\"right\"===e.align,\"cell--sticky-left\":\"left\"===e.sticky,\"cell--sticky-left-last\":\"left\"===e.sticky&&!this.getDisplayedColumns().slice(t+1).some((e=>\"left\"===e.sticky)),\"cell--sticky-right\":\"right\"===e.sticky,\"cell--sticky-right-first\":\"right\"===e.sticky&&!this.getDisplayedColumns().slice(0,t).some((e=>\"right\"===e.sticky))}}_getCellStyle(e,t){const i={};if(\"left\"===e.sticky){let e=0;for(let i=0;i<t;i++){const t=this.getDisplayedColumns()[i];\"left\"===t.sticky&&(e+=parseInt(t.width||\"0\",10))}i.left=`${e}px`}if(\"right\"===e.sticky){let e=0;for(let i=t+1;i<this.getDisplayedColumns().length;i++){const t=this.getDisplayedColumns()[i];\"right\"===t.sticky&&(e+=parseInt(t.width||\"0\",10))}i.right=`${e}px`}return i}_renderPagination(){const e=(this._page-1)*this._pageSize+1,t=Math.min(this._page*this._pageSize,this._totalItems);return j` <div class=\"pagination\"> <span class=\"pagination-icon ${1===this._page?\"pagination-icon--disabled\":\"\"}\" @click=${this.goToPrevPage} > <svg viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"/></svg> </span> <span class=\"pagination-info\">${e}-${t} of ${this._totalItems}</span> <span class=\"pagination-icon ${this._page===this._totalPages?\"pagination-icon--disabled\":\"\"}\" @click=${this.goToNextPage} > <svg viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"/></svg> </span> </div> `}_renderHeader(){return!this._model.title&&!this._model.actions?.length&&this._totalPages<=1?U:j` <div class=\"header\"> <div class=\"title\">${this._model.title??\"\"}</div> ${\"db\"!==this._model.dataSource?.mode||this._model.columns.some((e=>e.searchable))?j` <div class=\"search\"> <!-- TODO: Saved views dropdown <div class=\"views\"> <span>Default View</span> <svg viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z\"/></svg> </div> --> <div class=\"search-field\"> <svg class=\"search-icon\" viewBox=\"0 -960 960 960\" fill=\"currentColor\"><path d=\"M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z\"/></svg> <input type=\"text\" class=\"search-input\" placeholder=\"Search...\" .value=${this._searchQuery} @input=${this._handleSearch} /> </div> </div> `:j`<div class=\"search\"></div>`} <div class=\"tools\"> ${this._renderPagination()} <span class=\"refresh\" title=\"Refresh\" @click=${()=>this.refresh()}> <svg viewBox=\"0 -960 960 960\" fill=\"currentColor\"><path d=\"M480-160q-134 0-227-93t-93-227q0-134 93-227t227-93q69 0 132 28.5T720-690v-110h80v280H520v-80h168q-32-56-87.5-88T480-720q-100 0-170 70t-70 170q0 100 70 170t170 70q77 0 139-44t87-116h84q-28 106-114 173t-196 67Z\"/></svg> </span> <div class=\"column-picker-wrapper\"> <span class=\"header-icon\" title=\"Columns\" @click=${this._toggleColumnPicker}> <svg viewBox=\"0 -960 960 960\" fill=\"currentColor\"><path d=\"M121-280v-400q0-33 23.5-56.5T201-760h559q33 0 56.5 23.5T840-680v400q0 33-23.5 56.5T760-200H201q-33 0-56.5-23.5T121-280Zm79 0h133v-400H200v400Zm213 0h133v-400H413v400Zm213 0h133v-400H626v400Z\"/></svg> </span> <div class=\"column-picker ${this._columnPickerOpen?\"open\":\"\"}\"> ${[...this._model.columns].filter((e=>\"actions\"!==e.type)).sort(((e,t)=>(e.label??e.id).localeCompare(t.label??t.id))).map((e=>j` <div class=\"column-picker-item\" @click=${()=>this._toggleColumn(e.id)}> <div class=\"column-picker-checkbox ${this._model.displayedColumns.includes(e.id)?\"checked\":\"\"}\"> <svg viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"/></svg> </div> <span class=\"column-picker-label\">${e.label??e.id}</span> </div> `))} </div> </div> ${1===this._model.actions?.length?j` <kr-button class=\"actions\" .href=${this._model.actions[0].href} .target=${this._model.actions[0].target} @click=${()=>this._handleAction(this._model.actions[0])} > ${this._model.actions[0].label} </kr-button> `:this._model.actions?.length?j` <kr-button class=\"actions\" .options=${this._model.actions.map((e=>({id:e.id,label:e.label})))} @option-select=${e=>this._handleAction({id:e.detail.id,label:e.detail.label})} > Actions </kr-button> `:U} </div> </div> `}_renderStatus(){return\"loading\"===this._dataState&&0===this._data.length?j`<div class=\"status\">Loading...</div>`:\"error\"===this._dataState&&0===this._data.length?j`<div class=\"status status--error\">Error loading data</div>`:0===this._data.length?j`<div class=\"status\">No data available</div>`:U}_renderFilterPanel(){if(!this._filterPanelOpened)return U;const e=this._model.columns.find((e=>e.id===this._filterPanelOpened));let t=j``;t=\"empty\"===e.filter.operator||\"n_empty\"===e.filter.operator?j` <input type=\"text\" class=\"filter-panel__input\" disabled .value=${e.filter.text} /> `:\"between\"===e.filter.operator&&\"date\"===e.type?j` <input type=\"date\" class=\"filter-panel__input\" .valueAsDate=${e.filter.value?.start??null} @change=${t=>this._handleFilterDateStartChange(t,e)} /> <input type=\"date\" class=\"filter-panel__input\" .valueAsDate=${e.filter.value?.end??null} @change=${t=>this._handleFilterDateEndChange(t,e)} /> `:\"between\"===e.filter.operator&&\"number\"===e.type?j` <input type=\"number\" class=\"filter-panel__input\" placeholder=\"Start\" .value=${e.filter.value?.start??\"\"} @input=${t=>this._handleFilterNumberStartChange(t,e)} @keydown=${t=>this._handleFilterTextKeydown(t,e)} /> <input type=\"number\" class=\"filter-panel__input\" placeholder=\"End\" .value=${e.filter.value?.end??\"\"} @input=${t=>this._handleFilterNumberEndChange(t,e)} @keydown=${t=>this._handleFilterTextKeydown(t,e)} /> `:\"in\"===e.filter.operator||\"n_in\"===e.filter.operator?j` <textarea class=\"filter-panel__textarea\" rows=\"3\" placeholder=\"Values (comma-separated)\" .value=${e.filter.text} @input=${t=>this._handleFilterListChange(t,e)} @keydown=${t=>this._handleFilterTextKeydown(t,e)} ></textarea> `:\"boolean\"===e.type?j` <kr-select-field placeholder=\"Value\" .value=${String(e.filter.value??\"\")} @change=${t=>this._handleFilterBooleanChange(t,e)} > <kr-select-option value=\"true\">Yes</kr-select-option> <kr-select-option value=\"false\">No</kr-select-option> </kr-select-field> `:\"date\"===e.type?j` <input type=\"date\" class=\"filter-panel__input\" .valueAsDate=${e.filter.value} @change=${t=>this._handleFilterDateChange(t,e)} /> `:\"number\"===e.type?j` <input type=\"number\" class=\"filter-panel__input\" placeholder=\"Value\" min=\"0\" .value=${e.filter.text} @input=${t=>this._handleFilterNumberChange(t,e)} @keydown=${t=>this._handleFilterTextKeydown(t,e)} /> `:j` <input type=\"text\" class=\"filter-panel__input\" placeholder=\"Value\" .value=${e.filter.text} @input=${t=>this._handleFilterStringChange(t,e)} @keydown=${t=>this._handleFilterTextKeydown(t,e)} /> `;const i=j` <div class=\"filter-panel__content\"> <kr-select-field .value=${e.filter.operator} @change=${t=>this._handleOperatorChange(t,e)} > ${st(e.type).map((e=>j` <kr-select-option value=${e.key}>${e.label}</kr-select-option> `))} </kr-select-field> ${t} </div> `,s=this._buckets.get(e.id)||[];let o,r;return o=s.length?j` <div class=\"buckets\"> ${s.map((t=>{let i=\"(Empty)\";null!==t.val&&void 0!==t.val&&(i=\"boolean\"===e.type?!0===t.val||\"true\"===t.val?\"Yes\":\"No\":String(t.val));let s=e.filter.has(t.val);\"n_in\"===e.filter.operator&&(s=!s);let o=U;return s&&(o=j` <svg viewBox=\"0 0 24 24\" fill=\"currentColor\"> <path d=\"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"/> </svg> `),j` <div class=\"bucket\" @click=${i=>this._handleBucketToggle(i,e,t)} > <div class=${we({bucket__checkbox:!0,\"bucket__checkbox--checked\":s})}> ${o} </div> <span class=\"bucket__label\">${i}</span> <span class=\"bucket__count\">${t.count}</span> </div> `}))} </div> `:j`<div class=\"bucket-empty\">No data</div>`,r=e.facetable&&e.filterable?j` <kr-tab-group size=\"small\" active-tab-id=${this._filterPanelTab} @tab-change=${e=>this._handleFilterPanelTabChange(e)} > <kr-tab id=\"filter\" label=\"Filter\"> ${i} </kr-tab> <kr-tab id=\"counts\" label=\"Counts\"> ${o} </kr-tab> </kr-tab-group> `:e.facetable?o:i,j` <div class=\"filter-panel\" style=${qe({top:this._filterPanelPos.top+\"px\",left:this._filterPanelPos.left+\"px\"})} > ${r} <div class=\"filter-panel__actions\"> <kr-button variant=\"outline\" color=\"secondary\" size=\"small\" @click=${this._handleFilterClear}> Clear </kr-button> <kr-button size=\"small\" @click=${this._handleFilterApply}> Apply </kr-button> </div> </div> `}_renderFilterRow(){const e=this.getDisplayedColumns();return e.some((e=>e.filterable||e.facetable))?j` <div class=\"filter-row\"> ${e.map(((t,i)=>t.filterable||t.facetable?j` <div class=${we({\"filter-cell\":!0,\"filter-cell--sticky-left\":\"left\"===t.sticky,\"filter-cell--sticky-right\":\"right\"===t.sticky,\"filter-cell--sticky-right-first\":\"right\"===t.sticky&&!e.slice(0,i).some((e=>\"right\"===e.sticky))})} style=${qe(this._getCellStyle(t,i))} > <div class=\"filter-cell__wrapper\"> <input type=\"text\" class=${we({\"filter-cell__input\":!0,\"filter-cell__input--invalid\":!t.filter.isValid()})} .value=${t.filter.kql} @change=${e=>this._handleKqlChange(e,t)} /> ${t.filter?.kql?.length>0?j` <button class=\"filter-cell__clear\" @click=${()=>this._handleKqlClear(t)} > <svg viewBox=\"0 0 24 24\" fill=\"currentColor\"> <path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/> </svg> </button> `:U} <button class=${we({\"filter-cell__advanced\":!0,\"filter-cell__advanced--opened\":this._filterPanelOpened===t.id})} @click=${e=>this._handleFilterPanelToggle(e,t)} > <svg viewBox=\"0 0 24 24\" fill=\"currentColor\"> <path d=\"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z\"/> </svg> </button> </div> </div> `:j`<div class=${we({\"filter-cell\":!0,\"filter-cell--sticky-left\":\"left\"===t.sticky,\"filter-cell--sticky-right\":\"right\"===t.sticky,\"filter-cell--sticky-right-first\":\"right\"===t.sticky&&!e.slice(0,i).some((e=>\"right\"===e.sticky))})} style=${qe(this._getCellStyle(t,i))} ></div>`))} </div> `:U}_renderTable(){return j` <div class=\"wrapper\"> <div class=\"overlay-left\"></div> <div class=\"overlay-right\"></div> ${this._renderStatus()} <div class=\"content\" @scroll=${this._handleScroll}> <div class=\"table\" style=\"grid-template-columns: ${this._getGridTemplateColumns()}\"> <div class=\"header-row\"> ${this.getDisplayedColumns().map(((e,t)=>j` <div class=${we(this._getHeaderCellClasses(e,t))} style=${qe(this._getCellStyle(e,t))} data-column-id=${e.id} > <span class=\"header-cell__label\">${e.label??e.id}</span> ${this._renderSortIndicator(e)} ${!1!==e.resizable?j`<div class=\"header-cell__resize\" @mousedown=${t=>this._handleResizeStart(t,e.id)} ></div>`:U} </div> `))} </div> ${this._renderFilterRow()} ${this._data.map(((e,t)=>{const i=this.getDisplayedColumns().map(((i,s)=>j` <div class=${we(this._getCellClasses(i,s))} style=${qe(this._getCellStyle(i,s))} data-column-id=${i.id} > ${this._renderCellContent(i,e,t)} </div> `));return this._model.rowHref?j` <a href=${this._model.rowHref(e)} draggable=\"false\" class=${we({row:!0,\"row--clickable\":!0,\"row--link\":!0})} @mousedown=${()=>this._handleRowMouseDown()} @click=${i=>this._handleRowClick(i,e,t)} >${i}</a> `:j` <div class=${we({row:!0,\"row--clickable\":!!this._model.rowClickable})} @mousedown=${()=>this._handleRowMouseDown()} @click=${i=>this._handleRowClick(i,e,t)} >${i}</div> `}))} </div> </div> </div> `}render(){return this._model.columns.length?j` ${this._renderHeader()} ${this._renderTable()} ${this._renderFilterPanel()} `:j`<slot></slot>`}}"
1181
1225
  },
1182
1226
  {
1183
1227
  "kind": "variable",
1184
1228
  "name": "vt",
1185
- "default": "class extends le{constructor(){super(...arguments),this.color=\"dark\"}render(){let e=\"\",t=\"\";return e=\"dark\"===this.color?\"#163052\":\"light\"===this.color?\"#ffffff\":this.color,t=this.trackColor?this.trackColor:\"light\"===this.color?\"#ffffff4d\":\"#0000001a\",V` <div class=\"progress-bar\" style=${`background: ${t}`} role=\"status\" aria-label=\"Loading\" > <div class=\"fill\" style=${`background: ${e}`}></div> </div> `}}"
1229
+ "default": "class extends ae{constructor(){super(...arguments),this.size=\"md\",this.color=\"dark\"}render(){var e=\"\",t=\"\";return e=\"sm\"==this.size?\"16px\":\"md\"==this.size?\"24px\":\"lg\"==this.size?\"32px\":\"xl\"==this.size?\"48px\":this.size,t=\"dark\"==this.color?\"#163052\":\"light\"==this.color?\"#ffffff\":this.color,j` <svg class=\"spinner\" style=${`width: ${e}; height: ${e}; color: ${t}`} viewBox=\"0 0 44 44\" role=\"status\" aria-label=\"Loading\" > <circle class=\"circle\" cx=\"22\" cy=\"22\" r=\"20\" fill=\"none\" stroke-width=\"4\" /> </svg> `}}"
1186
1230
  },
1187
1231
  {
1188
1232
  "kind": "variable",
1189
- "name": "mt"
1233
+ "name": "_t",
1234
+ "default": "class extends ae{constructor(){super(...arguments),this.color=\"dark\"}render(){let e=\"\",t=\"\";return e=\"dark\"===this.color?\"#163052\":\"light\"===this.color?\"#ffffff\":this.color,t=this.trackColor?this.trackColor:\"light\"===this.color?\"#ffffff4d\":\"#0000001a\",j` <div class=\"progress-bar\" style=${`background: ${t}`} role=\"status\" aria-label=\"Loading\" > <div class=\"fill\" style=${`background: ${e}`}></div> </div> `}}"
1190
1235
  },
1191
1236
  {
1192
1237
  "kind": "variable",
1193
- "name": "xt",
1194
- "default": "class extends le{constructor(){super(...arguments),this.files=[],this.emptyMessage=\"No files\"}_handleFileClick(e){if(this.dispatchEvent(new CustomEvent(\"file-click\",{bubbles:!0,composed:!0,detail:{file:e}})),e.url){mt.open({src:e.url,name:e.name}).addEventListener(\"download\",(()=>{this._handleDownload(e)}))}}_handleDownload(e){this.dispatchEvent(new CustomEvent(\"download\",{bubbles:!0,composed:!0,detail:{file:e}}))}_handleDelete(e){this.dispatchEvent(new CustomEvent(\"delete\",{bubbles:!0,composed:!0,detail:{file:e}}))}_getExtension(e){return e.split(\".\").pop()?.toLowerCase()||\"\"}_getExtClass(e){return[\"pdf\"].includes(e)?\"file-list__ext--pdf\":[\"doc\",\"docx\",\"rtf\",\"txt\"].includes(e)?\"file-list__ext--doc\":[\"xls\",\"xlsx\",\"csv\"].includes(e)?\"file-list__ext--xls\":[\"zip\",\"rar\",\"7z\",\"gz\",\"tar\"].includes(e)?\"file-list__ext--zip\":[\"jpg\",\"jpeg\",\"png\",\"gif\",\"webp\",\"svg\",\"bmp\"].includes(e)?\"file-list__ext--img\":\"file-list__ext--default\"}_getExtIcon(e){return[\"jpg\",\"jpeg\",\"png\",\"gif\",\"webp\",\"svg\",\"bmp\"].includes(e)?V`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86-3 3.87L9 13.14 6 17h12l-3.86-5.14z\"/></svg>`:[\"pdf\"].includes(e)?V`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5v1zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5v3zm4-3H19v1h1.5V11H19v2h-1.5V7h3v1.5zM9 9.5h1v-1H9v1zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm10 5.5h1v-3h-1v3z\"/></svg>`:[\"doc\",\"docx\",\"rtf\",\"txt\"].includes(e)?V`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6zm2-6h8v2H8v-2zm0-4h8v2H8v-2zm0 8h5v2H8v-2z\"/></svg>`:[\"xls\",\"xlsx\",\"csv\"].includes(e)?V`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 2v3H5V5h14zm0 5v4H5v-4h14zM5 19v-3h14v3H5zm2-8h4v2H7v-2zm0 5h4v2H7v-2z\"/></svg>`:[\"zip\",\"rar\",\"7z\",\"gz\",\"tar\"].includes(e)?V`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V6h5.17l2 2H20v10zm-8-4h2v2h-2v-2zm0-4h2v2h-2v-2zm-2 2h2v2h-2v-2z\"/></svg>`:V`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z\"/></svg>`}render(){return this.files.length?V` <div class=\"file-list\"> ${this.files.map((e=>{const t=this._getExtension(e.name),i=e.meta||e.date||\"\";return V` <div class=\"file-list__item\"> <div class=\"file-list__ext ${this._getExtClass(t)}\">${this._getExtIcon(t)}</div> <div class=\"file-list__info\"> <a class=\"file-list__name\" @click=${()=>this._handleFileClick(e)}>${e.name}</a> ${i?V`<div class=\"file-list__meta\">${i}</div>`:\"\"} </div> <div class=\"file-list__actions\"> <svg class=\"file-list__action\" @click=${()=>this._handleDownload(e)} xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" title=\"Download\"><path d=\"M19 9h-4V3H9v6H5l7 7 7-7zm-8 2V5h2v6h1.17L12 13.17 9.83 11H11zm-6 7h14v2H5v-2z\"/></svg> <svg class=\"file-list__action file-list__action--delete\" @click=${()=>this._handleDelete(e)} xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" title=\"Delete\"><path d=\"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z\"/></svg> </div> </div> `}))} </div> `:V`<div class=\"file-list__empty\">${this.emptyMessage}</div>`}}"
1238
+ "name": "xt"
1195
1239
  },
1196
1240
  {
1197
1241
  "kind": "variable",
1198
- "name": "St",
1199
- "default": "class extends le{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=${we({\"input--invalid\":this._touched&&this._input&&!this._input.validity.valid})} type=${this.type} name=${this.name} .value=${$t(this.value)} placeholder=${this.placeholder} ?required=${this.required} ?disabled=${this.disabled} ?readonly=${this.readonly} minlength=${kt(this.minlength)} maxlength=${kt(this.maxlength)} pattern=${kt(this.pattern)} autocomplete=${kt(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()}}"
1242
+ "name": "wt",
1243
+ "default": "class extends ae{constructor(){super(...arguments),this.files=[],this.emptyMessage=\"No files\"}_handleFileClick(e){if(this.dispatchEvent(new CustomEvent(\"file-click\",{bubbles:!0,composed:!0,detail:{file:e}})),e.url){xt.open({src:e.url,name:e.name}).addEventListener(\"download\",(()=>{this._handleDownload(e)}))}}_handleDownload(e){this.dispatchEvent(new CustomEvent(\"download\",{bubbles:!0,composed:!0,detail:{file:e}}))}_handleDelete(e){this.dispatchEvent(new CustomEvent(\"delete\",{bubbles:!0,composed:!0,detail:{file:e}}))}_getExtension(e){return e.split(\".\").pop()?.toLowerCase()||\"\"}_getExtClass(e){return[\"pdf\"].includes(e)?\"file-list__ext--pdf\":[\"doc\",\"docx\",\"rtf\",\"txt\"].includes(e)?\"file-list__ext--doc\":[\"xls\",\"xlsx\",\"csv\"].includes(e)?\"file-list__ext--xls\":[\"zip\",\"rar\",\"7z\",\"gz\",\"tar\"].includes(e)?\"file-list__ext--zip\":[\"jpg\",\"jpeg\",\"png\",\"gif\",\"webp\",\"svg\",\"bmp\"].includes(e)?\"file-list__ext--img\":\"file-list__ext--default\"}_getExtIcon(e){return[\"jpg\",\"jpeg\",\"png\",\"gif\",\"webp\",\"svg\",\"bmp\"].includes(e)?j`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86-3 3.87L9 13.14 6 17h12l-3.86-5.14z\"/></svg>`:[\"pdf\"].includes(e)?j`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5v1zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5v3zm4-3H19v1h1.5V11H19v2h-1.5V7h3v1.5zM9 9.5h1v-1H9v1zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm10 5.5h1v-3h-1v3z\"/></svg>`:[\"doc\",\"docx\",\"rtf\",\"txt\"].includes(e)?j`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6zm2-6h8v2H8v-2zm0-4h8v2H8v-2zm0 8h5v2H8v-2z\"/></svg>`:[\"xls\",\"xlsx\",\"csv\"].includes(e)?j`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 2v3H5V5h14zm0 5v4H5v-4h14zM5 19v-3h14v3H5zm2-8h4v2H7v-2zm0 5h4v2H7v-2z\"/></svg>`:[\"zip\",\"rar\",\"7z\",\"gz\",\"tar\"].includes(e)?j`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V6h5.17l2 2H20v10zm-8-4h2v2h-2v-2zm0-4h2v2h-2v-2zm-2 2h2v2h-2v-2z\"/></svg>`:j`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z\"/></svg>`}render(){return this.files.length?j` <div class=\"file-list\"> ${this.files.map((e=>{const t=this._getExtension(e.name),i=e.meta||e.date||\"\";return j` <div class=\"file-list__item\"> <div class=\"file-list__ext ${this._getExtClass(t)}\">${this._getExtIcon(t)}</div> <div class=\"file-list__info\"> <a class=\"file-list__name\" @click=${()=>this._handleFileClick(e)}>${e.name}</a> ${i?j`<div class=\"file-list__meta\">${i}</div>`:\"\"} </div> <div class=\"file-list__actions\"> <svg class=\"file-list__action\" @click=${()=>this._handleDownload(e)} xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" title=\"Download\"><path d=\"M19 9h-4V3H9v6H5l7 7 7-7zm-8 2V5h2v6h1.17L12 13.17 9.83 11H11zm-6 7h14v2H5v-2z\"/></svg> <svg class=\"file-list__action file-list__action--delete\" @click=${()=>this._handleDelete(e)} xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" title=\"Delete\"><path d=\"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z\"/></svg> </div> </div> `}))} </div> `:j`<div class=\"file-list__empty\">${this.emptyMessage}</div>`}}"
1200
1244
  },
1201
1245
  {
1202
1246
  "kind": "variable",
1203
1247
  "name": "zt",
1204
- "default": "class extends le{constructor(){super(),this.label=\"\",this.name=\"\",this.value=\"\",this.placeholder=\"\",this.required=!1,this.disabled=!1,this.readonly=!1,this.rows=3,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._textarea&&this._internals.setValidity(this._textarea.validity,this._textarea.validationMessage)}_handleInput(e){this.value=e.target.value,this._dirty=!0,this._internals.setFormValue(this.value),this._internals.setValidity(this._textarea.validity,this._textarea.validationMessage)}_handleChange(e){this.value=e.target.value,this._internals.setFormValue(this.value)}_handleBlur(){this._touched=!0,this._internals.setValidity(this._textarea.validity,this._textarea.validationMessage)}render(){let e=\"\";return this._touched&&this._textarea&&!this._textarea.validity.valid&&(e=this._textarea.validationMessage),V` <div class=\"wrapper\"> ${this.label?V` <label for=\"textarea\"> ${this.label} ${this.required?V`<span class=\"required\" aria-hidden=\"true\">*</span>`:U} </label> `:U} <textarea id=\"textarea\" class=${we({\"textarea--invalid\":this._touched&&this._textarea&&!this._textarea.validity.valid})} name=${this.name} .value=${$t(this.value)} placeholder=${this.placeholder} ?required=${this.required} ?disabled=${this.disabled} ?readonly=${this.readonly} rows=${this.rows} cols=${kt(this.cols)} minlength=${kt(this.minlength)} maxlength=${kt(this.maxlength)} autocomplete=${kt(this.autocomplete||void 0)} @input=${this._handleInput} @change=${this._handleChange} @blur=${this._handleBlur} ></textarea> ${e?V`<div class=\"validation-message\">${e}</div>`:this.hint?V`<div class=\"hint\">${this.hint}</div>`:U} </div> `}focus(){this._textarea?.focus()}blur(){this._textarea?.blur()}select(){this._textarea?.select()}}"
1248
+ "default": "class extends ae{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),j` <div class=\"wrapper\"> ${this.label?j` <label for=\"input\"> ${this.label} ${this.required?j`<span class=\"required\" aria-hidden=\"true\">*</span>`:\"\"} </label> `:\"\"} <input id=\"input\" class=${we({\"input--invalid\":this._touched&&this._input&&!this._input.validity.valid})} type=${this.type} name=${this.name} .value=${St(this.value)} placeholder=${this.placeholder} ?required=${this.required} ?disabled=${this.disabled} ?readonly=${this.readonly} minlength=${$t(this.minlength)} maxlength=${$t(this.maxlength)} pattern=${$t(this.pattern)} autocomplete=${$t(this.autocomplete||void 0)} @input=${this._handleInput} @change=${this._handleChange} @blur=${this._handleBlur} /> ${e?j`<div class=\"validation-message\">${e}</div>`:this.hint?j`<div class=\"hint\">${this.hint}</div>`:\"\"} </div> `}focus(){this._input?.focus()}blur(){this._input?.blur()}select(){this._input?.select()}}"
1205
1249
  },
1206
1250
  {
1207
1251
  "kind": "variable",
1208
- "name": "Pt",
1209
- "default": "class extends le{constructor(){super(),this._requestId=0,this._handleDocumentClick=e=>{e.composedPath().includes(this)||(this._isOpen=!1)},this.label=\"\",this.name=\"\",this.value=\"\",this.placeholder=\"\",this.disabled=!1,this.readonly=!1,this.required=!1,this.hint=\"\",this.options=[],this.fetch=null,this._isOpen=!1,this._highlightedIndex=-1,this._touched=!1,this._handleInvalid=e=>{e.preventDefault(),this._touched=!0},this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),document.addEventListener(\"click\",this._handleDocumentClick),this.addEventListener(\"invalid\",this._handleInvalid)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(\"click\",this._handleDocumentClick),this.removeEventListener(\"invalid\",this._handleInvalid)}firstUpdated(){this._updateValidity()}updated(e){(e.has(\"required\")||e.has(\"value\"))&&this._updateValidity(),e.has(\"options\")&&this._isOpen&&this._positionDropdown()}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}formResetCallback(){this.value=\"\",this._touched=!1,this._isOpen=!1,this._highlightedIndex=-1,this._internals.setFormValue(\"\"),this._internals.setValidity({})}formStateRestoreCallback(e){this.value=e}_updateValidity(){this._input&&this._internals.setValidity(this._input.validity,this._input.validationMessage)}_fetch(){if(!this.fetch)return;this._requestId++;const e=this._requestId;this.fetch(this.value).then((t=>{e===this._requestId&&(this.options=t)})).catch((e=>{console.error(\"kr-auto-suggest: fetch failed\",e)}))}_handleInput(e){this.value=e.target.value,this._isOpen=!0,this._highlightedIndex=-1,this._positionDropdown(),this._internals.setFormValue(this.value),this._internals.setValidity(this._input.validity,this._input.validationMessage),this.dispatchEvent(new Event(\"change\",{bubbles:!0,composed:!0})),this._fetch()}_positionDropdown(){requestAnimationFrame((()=>{const e=this.shadowRoot?.querySelector(\".dropdown\");if(!e)return;const t=this._input.getBoundingClientRect(),i=window.innerHeight-t.bottom-4-8,s=t.top-4-8;e.style.left=t.left+\"px\",e.style.width=t.width+\"px\",s>i?(e.style.top=\"\",e.style.bottom=window.innerHeight-t.top+4+\"px\",e.style.maxHeight=s+\"px\"):(e.style.bottom=\"\",e.style.top=t.bottom+4+\"px\",e.style.maxHeight=i+\"px\")}))}_handleFocus(){this._isOpen=!0,this._positionDropdown(),this._fetch()}_handleBlur(){this._touched=!0,this._internals.setValidity(this._input.validity,this._input.validationMessage),setTimeout((()=>{this._isOpen=!1,this._highlightedIndex=-1}),200)}_handleKeyDown(e){switch(e.key){case\"ArrowDown\":e.preventDefault(),this._isOpen=!0,this._highlightedIndex=Math.min(this._highlightedIndex+1,this.options.length-1),this._scrollToHighlighted();break;case\"ArrowUp\":e.preventDefault(),-1===this._highlightedIndex?(this._isOpen=!0,this._highlightedIndex=this.options.length-1):this._highlightedIndex=Math.max(this._highlightedIndex-1,0),this._scrollToHighlighted();break;case\"Enter\":this._highlightedIndex>=0&&this.options[this._highlightedIndex]&&(e.preventDefault(),this._selectOption(this.options[this._highlightedIndex]));break;case\"Escape\":e.preventDefault(),this._isOpen=!1,this._highlightedIndex=-1;break;case\"Tab\":this._isOpen=!1,this._highlightedIndex=-1}}_scrollToHighlighted(){this.updateComplete.then((()=>{const e=this.shadowRoot?.querySelector(\".dropdown\"),t=this.shadowRoot?.querySelector(\".option--highlighted\");if(e&&t){const i=e.getBoundingClientRect(),s=t.getBoundingClientRect();(s.bottom>i.bottom||s.top<i.top)&&t.scrollIntoView({block:\"nearest\"})}}))}_selectOption(e){e.disabled||(this.value=e.value,this._isOpen=!1,this._highlightedIndex=-1,this._internals.setFormValue(this.value),this.dispatchEvent(new CustomEvent(\"select\",{detail:{value:e.value,option:e},bubbles:!0,composed:!0})),this.dispatchEvent(new Event(\"change\",{bubbles:!0,composed:!0})))}_handleClear(){this.value=\"\",this._internals.setFormValue(this.value),this.dispatchEvent(new Event(\"change\",{bubbles:!0,composed:!0})),this._input?.focus()}_handleOptionMouseEnter(e,t){this._highlightedIndex=t}_renderOption(e,t){return V` <button class=${we({option:!0,\"option--highlighted\":t===this._highlightedIndex})} type=\"button\" role=\"option\" aria-selected=${t===this._highlightedIndex} ?disabled=${e.disabled} @click=${t=>this._selectOption(e)} @mouseenter=${e=>this._handleOptionMouseEnter(e,t)} > ${e.label||e.value} </button> `}render(){let e=U;return this._touched&&this._input&&!this._input.validity.valid?e=V`<div class=\"validation-message\">${this._input.validationMessage}</div>`:this.hint&&(e=V`<div class=\"hint\">${this.hint}</div>`),V` <div class=\"wrapper\"> ${this.label?V` <label> ${this.label} ${this.required?V`<span class=\"required\">*</span>`:U} </label> `:U} <div class=\"input-wrapper\"> <input type=\"text\" .value=${$t(this.value)} placeholder=${this.placeholder} ?disabled=${this.disabled} ?readonly=${this.readonly} ?required=${this.required} name=${this.name} autocomplete=\"off\" role=\"combobox\" aria-autocomplete=\"list\" aria-expanded=${this._isOpen} aria-controls=\"dropdown\" class=${we({\"input--invalid\":this._touched&&this._input&&!this._input.validity.valid})} @input=${this._handleInput} @blur=${this._handleBlur} @focus=${this._handleFocus} @keydown=${this._handleKeyDown} /> <div class=\"icon-wrapper\"> ${!this.value||this.disabled||this.readonly?U:V` <svg class=\"clear\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-label=\"Clear\" @click=${this._handleClear}> <path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/> </svg> `} ${this.value||this.disabled||this.readonly?U:V` <svg class=\"search-icon\" viewBox=\"0 0 24 24\" fill=\"currentColor\"> <path d=\"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\"/> </svg> `} </div> </div> <div id=\"dropdown\" role=\"listbox\" class=${we({dropdown:!0,\"dropdown--open\":this._isOpen&&this.options.length>0})} > ${this.options.map(((e,t)=>this._renderOption(e,t)))} </div> ${e} </div> `}}"
1252
+ "name": "Tt",
1253
+ "default": "class extends ae{constructor(){super(),this.label=\"\",this.name=\"\",this.value=\"\",this.placeholder=\"\",this.required=!1,this.disabled=!1,this.readonly=!1,this.rows=3,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._textarea&&this._internals.setValidity(this._textarea.validity,this._textarea.validationMessage)}_handleInput(e){this.value=e.target.value,this._dirty=!0,this._internals.setFormValue(this.value),this._internals.setValidity(this._textarea.validity,this._textarea.validationMessage)}_handleChange(e){this.value=e.target.value,this._internals.setFormValue(this.value)}_handleBlur(){this._touched=!0,this._internals.setValidity(this._textarea.validity,this._textarea.validationMessage)}render(){let e=\"\";return this._touched&&this._textarea&&!this._textarea.validity.valid&&(e=this._textarea.validationMessage),j` <div class=\"wrapper\"> ${this.label?j` <label for=\"textarea\"> ${this.label} ${this.required?j`<span class=\"required\" aria-hidden=\"true\">*</span>`:U} </label> `:U} <textarea id=\"textarea\" class=${we({\"textarea--invalid\":this._touched&&this._textarea&&!this._textarea.validity.valid})} name=${this.name} .value=${St(this.value)} placeholder=${this.placeholder} ?required=${this.required} ?disabled=${this.disabled} ?readonly=${this.readonly} rows=${this.rows} cols=${$t(this.cols)} minlength=${$t(this.minlength)} maxlength=${$t(this.maxlength)} autocomplete=${$t(this.autocomplete||void 0)} @input=${this._handleInput} @change=${this._handleChange} @blur=${this._handleBlur} ></textarea> ${e?j`<div class=\"validation-message\">${e}</div>`:this.hint?j`<div class=\"hint\">${this.hint}</div>`:U} </div> `}focus(){this._textarea?.focus()}blur(){this._textarea?.blur()}select(){this._textarea?.select()}}"
1210
1254
  },
1211
1255
  {
1212
1256
  "kind": "variable",
1213
1257
  "name": "It",
1214
- "default": "class extends le{constructor(){super(),this._requestId=0,this._selectedOption=null,this._handleDocumentClick=e=>{e.composedPath().includes(this)||this._close()},this.label=\"\",this.name=\"\",this.value=\"\",this.placeholder=\"Select an option\",this.disabled=!1,this.readonly=!1,this.required=!1,this.hint=\"\",this.optionValue=\"value\",this.optionLabel=\"label\",this.options=[],this.fetch=null,this.fetchSelection=null,this._isOpen=!1,this._highlightedIndex=-1,this._touched=!1,this._searchQuery=\"\",this._loading=!1,this._handleInvalid=e=>{e.preventDefault(),this._touched=!0},this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),document.addEventListener(\"click\",this._handleDocumentClick),this.addEventListener(\"invalid\",this._handleInvalid)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(\"click\",this._handleDocumentClick),this.removeEventListener(\"invalid\",this._handleInvalid)}firstUpdated(){this._updateValidity(),this.value&&this.fetchSelection&&this._resolveSelection()}updated(e){(e.has(\"required\")||e.has(\"value\"))&&this._updateValidity(),e.has(\"value\")&&(this.value?this._selectedOption&&this._getOptionValue(this._selectedOption)===this.value||this._resolveSelection():this._selectedOption=null),e.has(\"options\")&&this._isOpen&&this._positionDropdown()}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}formResetCallback(){this.value=\"\",this._selectedOption=null,this._touched=!1,this._isOpen=!1,this._highlightedIndex=-1,this._searchQuery=\"\",this._internals.setFormValue(\"\"),this._internals.setValidity({})}formStateRestoreCallback(e){this.value=e}focus(){this._isOpen||this._open()}blur(){this._triggerElement?.blur()}_updateValidity(){this.required&&!this.value?this._internals.setValidity({valueMissing:!0},\"Please select an option\",this._triggerElement):this._internals.setValidity({})}_handleTriggerClick(){this.disabled||this.readonly||(this._isOpen?this._close():this._open())}_open(){this._isOpen=!0,this._searchQuery=\"\",this._highlightedIndex=-1,this._fetch(),this.updateComplete.then((()=>{this._positionDropdown(),this._searchInput&&this._searchInput.focus()}))}_close(){this._isOpen=!1,this._highlightedIndex=-1,this._searchQuery=\"\"}_positionDropdown(){requestAnimationFrame((()=>{const e=this.shadowRoot?.querySelector(\".dropdown\");if(!e)return;const t=this._triggerElement.getBoundingClientRect(),i=window.innerHeight-t.bottom-4-8,s=t.top-4-8;e.style.left=t.left+\"px\",e.style.width=t.width+\"px\",i<200&&s>i?(e.style.top=\"\",e.style.bottom=window.innerHeight-t.top+4+\"px\",e.style.maxHeight=s+\"px\"):(e.style.bottom=\"\",e.style.top=t.bottom+4+\"px\",e.style.maxHeight=i+\"px\")}))}_fetch(){if(!this.fetch)return;this._loading=!0,this._requestId++;const e=this._requestId;this.fetch(this._searchQuery).then((t=>{e===this._requestId&&(this.options=t,this._loading=!1)})).catch((e=>{console.error(\"kr-combo-box: fetch failed\",e),this._loading=!1}))}_handleSearchInput(e){this._searchQuery=e.target.value,this._highlightedIndex=-1,this._fetch()}_handleSearchKeyDown(e){switch(e.key){case\"ArrowDown\":e.preventDefault(),this._highlightedIndex=Math.min(this._highlightedIndex+1,this.options.length-1),this._scrollToHighlighted();break;case\"ArrowUp\":e.preventDefault(),-1===this._highlightedIndex?this._highlightedIndex=this.options.length-1:this._highlightedIndex=Math.max(this._highlightedIndex-1,0),this._scrollToHighlighted();break;case\"Enter\":e.preventDefault(),this._highlightedIndex>=0&&this.options[this._highlightedIndex]&&this._selectOption(this.options[this._highlightedIndex]);break;case\"Escape\":e.preventDefault(),this._close(),this._triggerElement?.focus();break;case\"Tab\":this._close()}}_handleTriggerKeyDown(e){\"ArrowDown\"!==e.key&&\"ArrowUp\"!==e.key&&\"Enter\"!==e.key&&\" \"!==e.key||(e.preventDefault(),this._isOpen||this._open())}_handleTriggerBlur(){this._touched=!0,this._updateValidity()}_scrollToHighlighted(){this.updateComplete.then((()=>{const e=this.shadowRoot?.querySelector(\".options\"),t=this.shadowRoot?.querySelector(\".option--highlighted\");if(e&&t){const i=e.getBoundingClientRect(),s=t.getBoundingClientRect();(s.bottom>i.bottom||s.top<i.top)&&t.scrollIntoView({block:\"nearest\"})}}))}_getOptionValue(e){return\"function\"==typeof this.optionValue?this.optionValue(e):e[this.optionValue]}_getOptionLabel(e){let t;return t=\"function\"==typeof this.optionLabel?this.optionLabel(e):e[this.optionLabel],t||this._getOptionValue(e)}_resolveSelection(){if(!this.fetchSelection)return;const e=this.value;this.fetchSelection(this.value).then((t=>{this.value===e&&t&&(this._selectedOption=t,this.requestUpdate())})).catch((e=>{console.error(\"kr-combo-box: fetchSelection failed\",e)}))}_selectOption(e){e.disabled||(this.value=this._getOptionValue(e),this._selectedOption=e,this._close(),this._internals.setFormValue(this.value),this._updateValidity(),this.dispatchEvent(new CustomEvent(\"select\",{detail:{option:e},bubbles:!0,composed:!0})),this.dispatchEvent(new Event(\"change\",{bubbles:!0,composed:!0})),this._triggerElement?.focus())}_handleOptionMouseEnter(e,t){this._highlightedIndex=t}_renderOption(e,t){const i=this._getOptionValue(e);return V` <button class=${we({option:!0,\"option--highlighted\":t===this._highlightedIndex,\"option--selected\":i===this.value})} type=\"button\" role=\"option\" aria-selected=${i===this.value} ?disabled=${e.disabled} @click=${t=>this._selectOption(e)} @mouseenter=${e=>this._handleOptionMouseEnter(e,t)} > ${this._getOptionLabel(e)} </button> `}render(){let e=U;return this._touched&&this.required&&!this.value?e=V`<div class=\"validation-message\">Please select an option</div>`:this.hint&&(e=V`<div class=\"hint\">${this.hint}</div>`),V` <div class=\"wrapper\"> ${this.label?V` <label> ${this.label} ${this.required?V`<span class=\"required\">*</span>`:U} </label> `:U} <button class=${we({trigger:!0,\"trigger--open\":this._isOpen,\"trigger--invalid\":this._touched&&this.required&&!this.value})} type=\"button\" ?disabled=${this.disabled} aria-haspopup=\"listbox\" aria-expanded=${this._isOpen} @click=${this._handleTriggerClick} @keydown=${this._handleTriggerKeyDown} @blur=${this._handleTriggerBlur} > <span class=${we({trigger__value:!0,trigger__placeholder:!this._selectedOption})}> ${this._selectedOption?this._getOptionLabel(this._selectedOption):this.placeholder} </span> <svg class=${we({trigger__icon:!0,\"trigger__icon--open\":this._isOpen})} viewBox=\"0 0 24 24\" fill=\"currentColor\" > <path d=\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z\"/> </svg> </button> <div role=\"listbox\" class=${we({dropdown:!0,\"dropdown--open\":this._isOpen})} > <div class=\"search\"> <div class=\"search__field\"> <input class=\"search__input\" type=\"text\" placeholder=\"Search...\" .value=${this._searchQuery} @input=${this._handleSearchInput} @keydown=${this._handleSearchKeyDown} /> <svg class=\"search__icon\" viewBox=\"0 0 24 24\" fill=\"currentColor\"> <path d=\"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\"/> </svg> </div> </div> <div class=\"options\"> ${this._loading?V`<div class=\"empty\">Loading...</div>`:0===this.options.length?V`<div class=\"empty\">No options found</div>`:this.options.map(((e,t)=>this._renderOption(e,t)))} </div> </div> ${e} </div> `}}"
1258
+ "default": "class extends ae{constructor(){super(),this._requestId=0,this._handleDocumentClick=e=>{e.composedPath().includes(this)||(this._isOpen=!1)},this.label=\"\",this.name=\"\",this.value=\"\",this.placeholder=\"\",this.disabled=!1,this.readonly=!1,this.required=!1,this.hint=\"\",this.options=[],this.fetch=null,this._isOpen=!1,this._highlightedIndex=-1,this._touched=!1,this._handleInvalid=e=>{e.preventDefault(),this._touched=!0},this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),document.addEventListener(\"click\",this._handleDocumentClick),this.addEventListener(\"invalid\",this._handleInvalid)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(\"click\",this._handleDocumentClick),this.removeEventListener(\"invalid\",this._handleInvalid)}firstUpdated(){this._updateValidity()}updated(e){(e.has(\"required\")||e.has(\"value\"))&&this._updateValidity(),e.has(\"options\")&&this._isOpen&&this._positionDropdown()}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}formResetCallback(){this.value=\"\",this._touched=!1,this._isOpen=!1,this._highlightedIndex=-1,this._internals.setFormValue(\"\"),this._internals.setValidity({})}formStateRestoreCallback(e){this.value=e}_updateValidity(){this._input&&this._internals.setValidity(this._input.validity,this._input.validationMessage)}_fetch(){if(!this.fetch)return;this._requestId++;const e=this._requestId;this.fetch(this.value).then((t=>{e===this._requestId&&(this.options=t)})).catch((e=>{console.error(\"kr-auto-suggest: fetch failed\",e)}))}_handleInput(e){this.value=e.target.value,this._isOpen=!0,this._highlightedIndex=-1,this._positionDropdown(),this._internals.setFormValue(this.value),this._internals.setValidity(this._input.validity,this._input.validationMessage),this.dispatchEvent(new Event(\"change\",{bubbles:!0,composed:!0})),this._fetch()}_positionDropdown(){requestAnimationFrame((()=>{const e=this.shadowRoot?.querySelector(\".dropdown\");if(!e)return;const t=this._input.getBoundingClientRect(),i=window.innerHeight-t.bottom-4-8,s=t.top-4-8;e.style.left=t.left+\"px\",e.style.width=t.width+\"px\",s>i?(e.style.top=\"\",e.style.bottom=window.innerHeight-t.top+4+\"px\",e.style.maxHeight=s+\"px\"):(e.style.bottom=\"\",e.style.top=t.bottom+4+\"px\",e.style.maxHeight=i+\"px\")}))}_handleFocus(){this._isOpen=!0,this._positionDropdown(),this._fetch()}_handleBlur(){this._touched=!0,this._internals.setValidity(this._input.validity,this._input.validationMessage),setTimeout((()=>{this._isOpen=!1,this._highlightedIndex=-1}),200)}_handleKeyDown(e){switch(e.key){case\"ArrowDown\":e.preventDefault(),this._isOpen=!0,this._highlightedIndex=Math.min(this._highlightedIndex+1,this.options.length-1),this._scrollToHighlighted();break;case\"ArrowUp\":e.preventDefault(),-1===this._highlightedIndex?(this._isOpen=!0,this._highlightedIndex=this.options.length-1):this._highlightedIndex=Math.max(this._highlightedIndex-1,0),this._scrollToHighlighted();break;case\"Enter\":this._highlightedIndex>=0&&this.options[this._highlightedIndex]&&(e.preventDefault(),this._selectOption(this.options[this._highlightedIndex]));break;case\"Escape\":e.preventDefault(),this._isOpen=!1,this._highlightedIndex=-1;break;case\"Tab\":this._isOpen=!1,this._highlightedIndex=-1}}_scrollToHighlighted(){this.updateComplete.then((()=>{const e=this.shadowRoot?.querySelector(\".dropdown\"),t=this.shadowRoot?.querySelector(\".option--highlighted\");if(e&&t){const i=e.getBoundingClientRect(),s=t.getBoundingClientRect();(s.bottom>i.bottom||s.top<i.top)&&t.scrollIntoView({block:\"nearest\"})}}))}_selectOption(e){e.disabled||(this.value=e.value,this._isOpen=!1,this._highlightedIndex=-1,this._internals.setFormValue(this.value),this.dispatchEvent(new CustomEvent(\"select\",{detail:{value:e.value,option:e},bubbles:!0,composed:!0})),this.dispatchEvent(new Event(\"change\",{bubbles:!0,composed:!0})))}_handleClear(){this.value=\"\",this._internals.setFormValue(this.value),this.dispatchEvent(new Event(\"change\",{bubbles:!0,composed:!0})),this._input?.focus()}_handleOptionMouseEnter(e,t){this._highlightedIndex=t}_renderOption(e,t){return j` <button class=${we({option:!0,\"option--highlighted\":t===this._highlightedIndex})} type=\"button\" role=\"option\" aria-selected=${t===this._highlightedIndex} ?disabled=${e.disabled} @click=${t=>this._selectOption(e)} @mouseenter=${e=>this._handleOptionMouseEnter(e,t)} > ${e.label||e.value} </button> `}render(){let e=U;return this._touched&&this._input&&!this._input.validity.valid?e=j`<div class=\"validation-message\">${this._input.validationMessage}</div>`:this.hint&&(e=j`<div class=\"hint\">${this.hint}</div>`),j` <div class=\"wrapper\"> ${this.label?j` <label> ${this.label} ${this.required?j`<span class=\"required\">*</span>`:U} </label> `:U} <div class=\"input-wrapper\"> <input type=\"text\" .value=${St(this.value)} placeholder=${this.placeholder} ?disabled=${this.disabled} ?readonly=${this.readonly} ?required=${this.required} name=${this.name} autocomplete=\"off\" role=\"combobox\" aria-autocomplete=\"list\" aria-expanded=${this._isOpen} aria-controls=\"dropdown\" class=${we({\"input--invalid\":this._touched&&this._input&&!this._input.validity.valid})} @input=${this._handleInput} @blur=${this._handleBlur} @focus=${this._handleFocus} @keydown=${this._handleKeyDown} /> <div class=\"icon-wrapper\"> ${!this.value||this.disabled||this.readonly?U:j` <svg class=\"clear\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-label=\"Clear\" @click=${this._handleClear}> <path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/> </svg> `} ${this.value||this.disabled||this.readonly?U:j` <svg class=\"search-icon\" viewBox=\"0 0 24 24\" fill=\"currentColor\"> <path d=\"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\"/> </svg> `} </div> </div> <div id=\"dropdown\" role=\"listbox\" class=${we({dropdown:!0,\"dropdown--open\":this._isOpen&&this.options.length>0})} > ${this.options.map(((e,t)=>this._renderOption(e,t)))} </div> ${e} </div> `}}"
1259
+ },
1260
+ {
1261
+ "kind": "variable",
1262
+ "name": "qt",
1263
+ "default": "class extends ae{constructor(){super(),this._requestId=0,this._selectedOption=null,this._handleDocumentClick=e=>{e.composedPath().includes(this)||this._close()},this.label=\"\",this.name=\"\",this.value=\"\",this.placeholder=\"Select an option\",this.disabled=!1,this.readonly=!1,this.required=!1,this.hint=\"\",this.optionValue=\"value\",this.optionLabel=\"label\",this.options=[],this.fetch=null,this.fetchSelection=null,this._isOpen=!1,this._highlightedIndex=-1,this._touched=!1,this._searchQuery=\"\",this._loading=!1,this._handleInvalid=e=>{e.preventDefault(),this._touched=!0},this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),document.addEventListener(\"click\",this._handleDocumentClick),this.addEventListener(\"invalid\",this._handleInvalid)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(\"click\",this._handleDocumentClick),this.removeEventListener(\"invalid\",this._handleInvalid)}firstUpdated(){this._updateValidity(),this.value&&this.fetchSelection&&this._resolveSelection()}updated(e){(e.has(\"required\")||e.has(\"value\"))&&this._updateValidity(),e.has(\"value\")&&(this.value?this._selectedOption&&this._getOptionValue(this._selectedOption)===this.value||this._resolveSelection():this._selectedOption=null),e.has(\"options\")&&this._isOpen&&this._positionDropdown()}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}formResetCallback(){this.value=\"\",this._selectedOption=null,this._touched=!1,this._isOpen=!1,this._highlightedIndex=-1,this._searchQuery=\"\",this._internals.setFormValue(\"\"),this._internals.setValidity({})}formStateRestoreCallback(e){this.value=e}focus(){this._isOpen||this._open()}blur(){this._triggerElement?.blur()}_updateValidity(){this.required&&!this.value?this._internals.setValidity({valueMissing:!0},\"Please select an option\",this._triggerElement):this._internals.setValidity({})}_handleTriggerClick(){this.disabled||this.readonly||(this._isOpen?this._close():this._open())}_open(){this._isOpen=!0,this._searchQuery=\"\",this._highlightedIndex=-1,this._fetch(),this.updateComplete.then((()=>{this._positionDropdown(),this._searchInput&&this._searchInput.focus()}))}_close(){this._isOpen=!1,this._highlightedIndex=-1,this._searchQuery=\"\"}_positionDropdown(){requestAnimationFrame((()=>{const e=this.shadowRoot?.querySelector(\".dropdown\");if(!e)return;const t=this._triggerElement.getBoundingClientRect(),i=window.innerHeight-t.bottom-4-8,s=t.top-4-8;e.style.left=t.left+\"px\",e.style.width=t.width+\"px\",i<200&&s>i?(e.style.top=\"\",e.style.bottom=window.innerHeight-t.top+4+\"px\",e.style.maxHeight=s+\"px\"):(e.style.bottom=\"\",e.style.top=t.bottom+4+\"px\",e.style.maxHeight=i+\"px\")}))}_fetch(){if(!this.fetch)return;this._loading=!0,this._requestId++;const e=this._requestId;this.fetch(this._searchQuery).then((t=>{e===this._requestId&&(this.options=t,this._loading=!1)})).catch((e=>{console.error(\"kr-combo-box: fetch failed\",e),this._loading=!1}))}_handleSearchInput(e){this._searchQuery=e.target.value,this._highlightedIndex=-1,this._fetch()}_handleSearchKeyDown(e){switch(e.key){case\"ArrowDown\":e.preventDefault(),this._highlightedIndex=Math.min(this._highlightedIndex+1,this.options.length-1),this._scrollToHighlighted();break;case\"ArrowUp\":e.preventDefault(),-1===this._highlightedIndex?this._highlightedIndex=this.options.length-1:this._highlightedIndex=Math.max(this._highlightedIndex-1,0),this._scrollToHighlighted();break;case\"Enter\":e.preventDefault(),this._highlightedIndex>=0&&this.options[this._highlightedIndex]&&this._selectOption(this.options[this._highlightedIndex]);break;case\"Escape\":e.preventDefault(),this._close(),this._triggerElement?.focus();break;case\"Tab\":this._close()}}_handleTriggerKeyDown(e){\"ArrowDown\"!==e.key&&\"ArrowUp\"!==e.key&&\"Enter\"!==e.key&&\" \"!==e.key||(e.preventDefault(),this._isOpen||this._open())}_handleTriggerBlur(){this._touched=!0,this._updateValidity()}_scrollToHighlighted(){this.updateComplete.then((()=>{const e=this.shadowRoot?.querySelector(\".options\"),t=this.shadowRoot?.querySelector(\".option--highlighted\");if(e&&t){const i=e.getBoundingClientRect(),s=t.getBoundingClientRect();(s.bottom>i.bottom||s.top<i.top)&&t.scrollIntoView({block:\"nearest\"})}}))}_getOptionValue(e){return\"function\"==typeof this.optionValue?this.optionValue(e):e[this.optionValue]}_getOptionLabel(e){let t;return t=\"function\"==typeof this.optionLabel?this.optionLabel(e):e[this.optionLabel],t||this._getOptionValue(e)}_resolveSelection(){if(!this.fetchSelection)return;const e=this.value;this.fetchSelection(this.value).then((t=>{this.value===e&&t&&(this._selectedOption=t,this.requestUpdate())})).catch((e=>{console.error(\"kr-combo-box: fetchSelection failed\",e)}))}_selectOption(e){e.disabled||(this.value=this._getOptionValue(e),this._selectedOption=e,this._close(),this._internals.setFormValue(this.value),this._updateValidity(),this.dispatchEvent(new CustomEvent(\"select\",{detail:{option:e},bubbles:!0,composed:!0})),this.dispatchEvent(new Event(\"change\",{bubbles:!0,composed:!0})),this._triggerElement?.focus())}_handleOptionMouseEnter(e,t){this._highlightedIndex=t}_renderOption(e,t){const i=this._getOptionValue(e);return j` <button class=${we({option:!0,\"option--highlighted\":t===this._highlightedIndex,\"option--selected\":i===this.value})} type=\"button\" role=\"option\" aria-selected=${i===this.value} ?disabled=${e.disabled} @click=${t=>this._selectOption(e)} @mouseenter=${e=>this._handleOptionMouseEnter(e,t)} > ${this._getOptionLabel(e)} </button> `}render(){let e=U;return this._touched&&this.required&&!this.value?e=j`<div class=\"validation-message\">Please select an option</div>`:this.hint&&(e=j`<div class=\"hint\">${this.hint}</div>`),j` <div class=\"wrapper\"> ${this.label?j` <label> ${this.label} ${this.required?j`<span class=\"required\">*</span>`:U} </label> `:U} <button class=${we({trigger:!0,\"trigger--open\":this._isOpen,\"trigger--invalid\":this._touched&&this.required&&!this.value})} type=\"button\" ?disabled=${this.disabled} aria-haspopup=\"listbox\" aria-expanded=${this._isOpen} @click=${this._handleTriggerClick} @keydown=${this._handleTriggerKeyDown} @blur=${this._handleTriggerBlur} > <span class=${we({trigger__value:!0,trigger__placeholder:!this._selectedOption})}> ${this._selectedOption?this._getOptionLabel(this._selectedOption):this.placeholder} </span> <svg class=${we({trigger__icon:!0,\"trigger__icon--open\":this._isOpen})} viewBox=\"0 0 24 24\" fill=\"currentColor\" > <path d=\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z\"/> </svg> </button> <div role=\"listbox\" class=${we({dropdown:!0,\"dropdown--open\":this._isOpen})} > <div class=\"search\"> <div class=\"search__field\"> <input class=\"search__input\" type=\"text\" placeholder=\"Search...\" .value=${this._searchQuery} @input=${this._handleSearchInput} @keydown=${this._handleSearchKeyDown} /> <svg class=\"search__icon\" viewBox=\"0 0 24 24\" fill=\"currentColor\"> <path d=\"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\"/> </svg> </div> </div> <div class=\"options\"> ${this._loading?j`<div class=\"empty\">Loading...</div>`:0===this.options.length?j`<div class=\"empty\">No options found</div>`:this.options.map(((e,t)=>this._renderOption(e,t)))} </div> </div> ${e} </div> `}}"
1264
+ },
1265
+ {
1266
+ "kind": "variable",
1267
+ "name": "Mt",
1268
+ "default": "class extends ae{constructor(){super(),this._focusedIndex=-1,this.label=\"\",this.name=\"\",this.value=\"\",this.options=[],this.disabled=!1,this.required=!1,this.hint=\"\",this.direction=\"row\",this._touched=!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._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.required&&!this.value?this._internals.setValidity({valueMissing:!0},\"Please select an option\"):this._internals.setValidity({})}_handleCardClick(e,t){this.disabled||t.disabled||(this.value=t.value,this._touched=!0,this._internals.setFormValue(this.value),this._updateValidity(),this.dispatchEvent(new Event(\"change\",{bubbles:!0,composed:!0})))}_handleKeyDown(e,t){if(this.disabled)return;if(\" \"===e.key||\"Enter\"===e.key)return e.preventDefault(),void(this.options[t].disabled||this._handleCardClick(e,this.options[t]));let i=-1;if(\"row\"===this.direction?\"ArrowRight\"===e.key?i=this._findNextEnabledIndex(t,1):\"ArrowLeft\"===e.key&&(i=this._findNextEnabledIndex(t,-1)):\"ArrowDown\"===e.key?i=this._findNextEnabledIndex(t,1):\"ArrowUp\"===e.key&&(i=this._findNextEnabledIndex(t,-1)),i>=0){e.preventDefault(),this._focusedIndex=i;const t=this.shadowRoot?.querySelectorAll(\".card\");t[i]&&t[i].focus()}}_findNextEnabledIndex(e,t){let i=e+t;for(;i>=0&&i<this.options.length;){if(!this.options[i].disabled)return i;i+=t}return-1}render(){return j` <div class=\"wrapper\"> ${this.label?j` <label> ${this.label} ${this.required?j`<span class=\"required\" aria-hidden=\"true\">*</span>`:U} </label> `:U} <div class=${we({cards:!0,\"cards--row\":\"row\"===this.direction,\"cards--column\":\"column\"===this.direction})} role=\"radiogroup\" aria-label=${this.label} > ${this.options.map(((e,t)=>{const i=e.value===this.value,s=this.disabled||!!e.disabled;return j` <div class=${we({card:!0,\"card--selected\":i,\"card--disabled\":s})} role=\"radio\" aria-checked=${i} aria-disabled=${s} tabindex=${s?-1:0} @click=${t=>this._handleCardClick(t,e)} @keydown=${e=>this._handleKeyDown(e,t)} > <div class=\"card__radio\"> ${i?j`<div class=\"card__radio-dot\"></div>`:U} </div> <div class=\"card__content\"> <div class=\"card__label\">${e.label}</div> ${e.description?j`<div class=\"card__description\">${e.description}</div>`:U} </div> </div> `}))} </div> ${this._touched&&this.required&&!this.value?j`<div class=\"validation-message\">Please select an option</div>`:this.hint?j`<div class=\"hint\">${this.hint}</div>`:U} </div> `}}"
1215
1269
  }
1216
1270
  ],
1217
1271
  "exports": [
@@ -1251,7 +1305,7 @@
1251
1305
  "kind": "js",
1252
1306
  "name": "KRAutoSuggest",
1253
1307
  "declaration": {
1254
- "name": "Pt",
1308
+ "name": "It",
1255
1309
  "module": "dist/krubble-components.bundled.min.js"
1256
1310
  }
1257
1311
  },
@@ -1267,7 +1321,7 @@
1267
1321
  "kind": "js",
1268
1322
  "name": "KRCodeDemo",
1269
1323
  "declaration": {
1270
- "name": "Ae",
1324
+ "name": "De",
1271
1325
  "module": "dist/krubble-components.bundled.min.js"
1272
1326
  }
1273
1327
  },
@@ -1275,7 +1329,7 @@
1275
1329
  "kind": "js",
1276
1330
  "name": "KRComboBox",
1277
1331
  "declaration": {
1278
- "name": "It",
1332
+ "name": "qt",
1279
1333
  "module": "dist/krubble-components.bundled.min.js"
1280
1334
  }
1281
1335
  },
@@ -1283,7 +1337,15 @@
1283
1337
  "kind": "js",
1284
1338
  "name": "KRContextMenu",
1285
1339
  "declaration": {
1286
- "name": "De",
1340
+ "name": "Pe",
1341
+ "module": "dist/krubble-components.bundled.min.js"
1342
+ }
1343
+ },
1344
+ {
1345
+ "kind": "js",
1346
+ "name": "KRDateRangePicker",
1347
+ "declaration": {
1348
+ "name": "Ne",
1287
1349
  "module": "dist/krubble-components.bundled.min.js"
1288
1350
  }
1289
1351
  },
@@ -1299,7 +1361,7 @@
1299
1361
  "kind": "js",
1300
1362
  "name": "KRDialogRef",
1301
1363
  "declaration": {
1302
- "name": "Ve",
1364
+ "name": "je",
1303
1365
  "module": "dist/krubble-components.bundled.min.js"
1304
1366
  }
1305
1367
  },
@@ -1307,7 +1369,7 @@
1307
1369
  "kind": "js",
1308
1370
  "name": "KRFileList",
1309
1371
  "declaration": {
1310
- "name": "xt",
1372
+ "name": "wt",
1311
1373
  "module": "dist/krubble-components.bundled.min.js"
1312
1374
  }
1313
1375
  },
@@ -1315,7 +1377,7 @@
1315
1377
  "kind": "js",
1316
1378
  "name": "KRFilePreview",
1317
1379
  "declaration": {
1318
- "name": "mt",
1380
+ "name": "xt",
1319
1381
  "module": "dist/krubble-components.bundled.min.js"
1320
1382
  }
1321
1383
  },
@@ -1323,7 +1385,7 @@
1323
1385
  "kind": "js",
1324
1386
  "name": "KRProgressBar",
1325
1387
  "declaration": {
1326
- "name": "vt",
1388
+ "name": "_t",
1327
1389
  "module": "dist/krubble-components.bundled.min.js"
1328
1390
  }
1329
1391
  },
@@ -1331,7 +1393,15 @@
1331
1393
  "kind": "js",
1332
1394
  "name": "KRQuery",
1333
1395
  "declaration": {
1334
- "name": "dt",
1396
+ "name": "ct",
1397
+ "module": "dist/krubble-components.bundled.min.js"
1398
+ }
1399
+ },
1400
+ {
1401
+ "kind": "js",
1402
+ "name": "KRRadioCards",
1403
+ "declaration": {
1404
+ "name": "Mt",
1335
1405
  "module": "dist/krubble-components.bundled.min.js"
1336
1406
  }
1337
1407
  },
@@ -1339,7 +1409,7 @@
1339
1409
  "kind": "js",
1340
1410
  "name": "KRSelectField",
1341
1411
  "declaration": {
1342
- "name": "Qe",
1412
+ "name": "Je",
1343
1413
  "module": "dist/krubble-components.bundled.min.js"
1344
1414
  }
1345
1415
  },
@@ -1347,7 +1417,7 @@
1347
1417
  "kind": "js",
1348
1418
  "name": "KRSelectOption",
1349
1419
  "declaration": {
1350
- "name": "Je",
1420
+ "name": "tt",
1351
1421
  "module": "dist/krubble-components.bundled.min.js"
1352
1422
  }
1353
1423
  },
@@ -1355,7 +1425,7 @@
1355
1425
  "kind": "js",
1356
1426
  "name": "KRSnackbar",
1357
1427
  "declaration": {
1358
- "name": "Fe",
1428
+ "name": "Ke",
1359
1429
  "module": "dist/krubble-components.bundled.min.js"
1360
1430
  }
1361
1431
  },
@@ -1363,7 +1433,7 @@
1363
1433
  "kind": "js",
1364
1434
  "name": "KRSpinner",
1365
1435
  "declaration": {
1366
- "name": "ft",
1436
+ "name": "vt",
1367
1437
  "module": "dist/krubble-components.bundled.min.js"
1368
1438
  }
1369
1439
  },
@@ -1371,7 +1441,7 @@
1371
1441
  "kind": "js",
1372
1442
  "name": "KRTab",
1373
1443
  "declaration": {
1374
- "name": "Ye",
1444
+ "name": "Qe",
1375
1445
  "module": "dist/krubble-components.bundled.min.js"
1376
1446
  }
1377
1447
  },
@@ -1379,7 +1449,7 @@
1379
1449
  "kind": "js",
1380
1450
  "name": "KRTabGroup",
1381
1451
  "declaration": {
1382
- "name": "Ke",
1452
+ "name": "Ye",
1383
1453
  "module": "dist/krubble-components.bundled.min.js"
1384
1454
  }
1385
1455
  },
@@ -1387,7 +1457,7 @@
1387
1457
  "kind": "js",
1388
1458
  "name": "KRTable",
1389
1459
  "declaration": {
1390
- "name": "pt",
1460
+ "name": "ft",
1391
1461
  "module": "dist/krubble-components.bundled.min.js"
1392
1462
  }
1393
1463
  },
@@ -1395,7 +1465,7 @@
1395
1465
  "kind": "js",
1396
1466
  "name": "KRTextField",
1397
1467
  "declaration": {
1398
- "name": "St",
1468
+ "name": "zt",
1399
1469
  "module": "dist/krubble-components.bundled.min.js"
1400
1470
  }
1401
1471
  },
@@ -1403,7 +1473,7 @@
1403
1473
  "kind": "js",
1404
1474
  "name": "KRTextareaField",
1405
1475
  "declaration": {
1406
- "name": "zt",
1476
+ "name": "Tt",
1407
1477
  "module": "dist/krubble-components.bundled.min.js"
1408
1478
  }
1409
1479
  },
@@ -1411,7 +1481,7 @@
1411
1481
  "kind": "js",
1412
1482
  "name": "KR_OPERATORS",
1413
1483
  "declaration": {
1414
- "name": "et",
1484
+ "name": "it",
1415
1485
  "module": "dist/krubble-components.bundled.min.js"
1416
1486
  }
1417
1487
  },
@@ -1419,7 +1489,7 @@
1419
1489
  "kind": "js",
1420
1490
  "name": "getOperatorsForType",
1421
1491
  "declaration": {
1422
- "name": "tt",
1492
+ "name": "st",
1423
1493
  "module": "dist/krubble-components.bundled.min.js"
1424
1494
  }
1425
1495
  },
@@ -1587,6 +1657,14 @@
1587
1657
  "module": "./dialog/dialog.js"
1588
1658
  }
1589
1659
  },
1660
+ {
1661
+ "kind": "js",
1662
+ "name": "KRDateRangePicker",
1663
+ "declaration": {
1664
+ "name": "KRDateRangePicker",
1665
+ "module": "./date-range-picker/date-range-picker.js"
1666
+ }
1667
+ },
1590
1668
  {
1591
1669
  "kind": "js",
1592
1670
  "name": "KRSnackbar",
@@ -1811,6 +1889,14 @@
1811
1889
  "module": "./form/index.js"
1812
1890
  }
1813
1891
  },
1892
+ {
1893
+ "kind": "js",
1894
+ "name": "KRRadioCards",
1895
+ "declaration": {
1896
+ "name": "KRRadioCards",
1897
+ "module": "./form/index.js"
1898
+ }
1899
+ },
1814
1900
  {
1815
1901
  "kind": "js",
1816
1902
  "name": "ContextMenuItem",
@@ -1850,6 +1936,38 @@
1850
1936
  "name": "KRAutoSuggestOption",
1851
1937
  "module": "./form/auto-suggest/auto-suggest.js"
1852
1938
  }
1939
+ },
1940
+ {
1941
+ "kind": "js",
1942
+ "name": "KRDateRangePickerValue",
1943
+ "declaration": {
1944
+ "name": "KRDateRangePickerValue",
1945
+ "module": "./date-range-picker/date-range-picker.js"
1946
+ }
1947
+ },
1948
+ {
1949
+ "kind": "js",
1950
+ "name": "KRDateRangePickerRelativeOption",
1951
+ "declaration": {
1952
+ "name": "KRDateRangePickerRelativeOption",
1953
+ "module": "./date-range-picker/date-range-picker.js"
1954
+ }
1955
+ },
1956
+ {
1957
+ "kind": "js",
1958
+ "name": "KRDateRangePickerMode",
1959
+ "declaration": {
1960
+ "name": "KRDateRangePickerMode",
1961
+ "module": "./date-range-picker/date-range-picker.js"
1962
+ }
1963
+ },
1964
+ {
1965
+ "kind": "js",
1966
+ "name": "KRRadioCardsOption",
1967
+ "declaration": {
1968
+ "name": "KRRadioCardsOption",
1969
+ "module": "./form/radio-cards/radio-cards.js"
1970
+ }
1853
1971
  }
1854
1972
  ]
1855
1973
  },
@@ -1963,6 +2081,28 @@
1963
2081
  }
1964
2082
  ]
1965
2083
  },
2084
+ {
2085
+ "kind": "javascript-module",
2086
+ "path": "dist/date-range-picker/date-range-picker.js",
2087
+ "declarations": [
2088
+ {
2089
+ "kind": "variable",
2090
+ "name": "KRDateRangePicker",
2091
+ "default": "class KRDateRangePicker extends LitElement { constructor() { super(...arguments); /** * Relative date options to display */ this.relativeOptions = [ { key: 'last-5-minutes', amount: 5, unit: 'minute', type: 'relative' }, { key: 'last-30-minutes', amount: 30, unit: 'minute', type: 'relative' }, { key: 'last-1-hour', amount: 1, unit: 'hour', type: 'relative' }, { key: 'last-6-hours', amount: 6, unit: 'hour', type: 'relative' }, { key: 'last-1-day', amount: 1, unit: 'day', type: 'relative' }, { key: 'last-7-days', amount: 7, unit: 'day', type: 'relative' }, { key: 'last-30-days', amount: 30, unit: 'day', type: 'relative' }, ]; /** * Whether the picker is disabled */ this.disabled = false; /** * Whether the picker is in an invalid state */ this.invalid = false; /** * Placeholder text when no range is selected */ this.placeholder = 'Select a date range'; /** * Initial start date for absolute mode (YYYY-MM-DD) */ this.startDate = ''; /** * Initial end date for absolute mode (YYYY-MM-DD) */ this.endDate = ''; this._isOpen = false; this._activeTab = 'relative'; this._tempStartDate = ''; this._tempEndDate = ''; this._handleClickOutside = (e) => { if (!e.composedPath().includes(this)) { this._isOpen = false; } }; } connectedCallback() { super.connectedCallback(); document.addEventListener('click', this._handleClickOutside); if (this.startDate) this._tempStartDate = this.startDate; if (this.endDate) this._tempEndDate = this.endDate; // Set initial active tab based on mode if (this.mode === 'relative') { this._activeTab = 'relative'; } else if (this.mode === 'absolute') { this._activeTab = 'absolute'; } } disconnectedCallback() { super.disconnectedCallback(); document.removeEventListener('click', this._handleClickOutside); } _handleTriggerClick() { if (this.disabled) return; this._isOpen = !this._isOpen; } _handleTabClick(tab) { this._activeTab = tab; } _handleRelativeSelect(option) { this.value = { type: 'relative', amount: option.amount, unit: option.unit, }; this._isOpen = false; this.dispatchEvent(new CustomEvent('change', { detail: { value: this.value }, bubbles: true, composed: true, })); } _handleApplyAbsolute() { if (!this._tempStartDate) { return; } if (!this._tempEndDate) { return; } if (this._tempStartDate >= this._tempEndDate) { return; } this.value = { type: 'absolute', startDate: this._tempStartDate, endDate: this._tempEndDate, }; this.startDate = this._tempStartDate; this.endDate = this._tempEndDate; this._isOpen = false; this.dispatchEvent(new CustomEvent('change', { detail: { value: this.value }, bubbles: true, composed: true, })); } _handleCancel() { this._isOpen = false; this._tempStartDate = this.startDate; this._tempEndDate = this.endDate; } _formatRelativeOption(option) { if (option.amount === 0) { if (option.unit === 'day') { return 'Today'; } return `This ${option.unit}`; } const unitLabels = { second: option.amount === 1 ? 'second' : 'seconds', minute: option.amount === 1 ? 'minute' : 'minutes', hour: option.amount === 1 ? 'hour' : 'hours', day: option.amount === 1 ? 'day' : 'days', week: option.amount === 1 ? 'week' : 'weeks', month: option.amount === 1 ? 'month' : 'months', year: option.amount === 1 ? 'year' : 'years', }; return `Last ${option.amount} ${unitLabels[option.unit]}`; } _getDisplayValue() { if (!this.value) return ''; if (this.value.type === 'relative' && this.value.amount !== undefined && this.value.unit) { return this._formatRelativeOption({ key: '', amount: this.value.amount, unit: this.value.unit, type: 'relative', }); } if (this.value.type === 'absolute' && this.value.startDate && this.value.endDate) { return `${this.value.startDate} - ${this.value.endDate}`; } return ''; } _renderTriggerText() { const displayValue = this._getDisplayValue(); if (displayValue) { return html `${displayValue}`; } return html `<span class=\"trigger-placeholder\">${this.placeholder}</span>`; } _renderContent() { if (this.mode === 'relative') { return this._renderRelativeContent(); } if (this.mode === 'absolute') { return this._renderAbsoluteContent(); } if (this._activeTab === 'relative') { return this._renderRelativeContent(); } return this._renderAbsoluteContent(); } _renderRelativeContent() { return html ` <div class=\"relative-options\"> ${this.relativeOptions.map((option) => html ` <button class=${classMap({ 'relative-option': true, 'relative-option--selected': this.value?.type === 'relative' && this.value?.amount === option.amount && this.value?.unit === option.unit })} type=\"button\" @click=${() => this._handleRelativeSelect(option)} > ${this._formatRelativeOption(option)} </button> `)} </div> `; } _renderAbsoluteContent() { return html ` <div class=\"absolute\"> <div class=\"date-row\"> <span class=\"date-label\">Start</span> <input class=\"date-input\" type=\"date\" .value=${this._tempStartDate} @change=${this._handleStartDateChange} /> </div> <div class=\"date-row\"> <span class=\"date-label\">End</span> <input class=\"date-input\" type=\"date\" .value=${this._tempEndDate} @change=${this._handleEndDateChange} /> </div> </div> `; } _renderFooter() { if (this.mode === 'absolute') { return html ` <div class=\"footer\"> <kr-button variant=\"outline\" size=\"small\" @click=${this._handleCancel}> Cancel </kr-button> <kr-button variant=\"primary\" size=\"small\" ?disabled=${!this._tempStartDate || !this._tempEndDate} @click=${this._handleApplyAbsolute} > Apply </kr-button> </div> `; } if (this.mode === 'relative') { return nothing; } if (this._activeTab === 'absolute') { return html ` <div class=\"footer\"> <kr-button variant=\"outline\" size=\"small\" @click=${this._handleCancel}> Cancel </kr-button> <kr-button variant=\"primary\" size=\"small\" ?disabled=${!this._tempStartDate || !this._tempEndDate} @click=${this._handleApplyAbsolute} > Apply </kr-button> </div> `; } return nothing; } _handleStartDateChange(e) { this._tempStartDate = e.target.value; } _handleEndDateChange(e) { this._tempEndDate = e.target.value; } render() { return html ` <button part=\"trigger\" class=${classMap({ 'trigger': true, 'trigger--invalid': this.invalid })} type=\"button\" ?disabled=${this.disabled} @click=${this._handleTriggerClick} > <svg class=\"icon\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\"> <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z\" /> </svg> <span class=\"trigger-text\"> ${this._renderTriggerText()} </span> <svg class=\"icon\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\"> <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M19 9l-7 7-7-7\" /> </svg> </button> <div part=\"dropdown\" class=${classMap({ 'dropdown': true, 'dropdown--open': this._isOpen })}> ${!this.mode ? html ` <div class=\"tabs\"> <button class=${classMap({ 'tab': true, 'tab--active': this._activeTab === 'relative' })} type=\"button\" @click=${() => this._handleTabClick('relative')} > Relative </button> <button class=${classMap({ 'tab': true, 'tab--active': this._activeTab === 'absolute' })} type=\"button\" @click=${() => this._handleTabClick('absolute')} > Absolute </button> </div> ` : nothing} <div class=\"content\"> ${this._renderContent()} </div> ${this._renderFooter()} </div> `; } }",
2092
+ "description": "A date range picker component for selecting date ranges with relative and absolute options."
2093
+ }
2094
+ ],
2095
+ "exports": [
2096
+ {
2097
+ "kind": "js",
2098
+ "name": "KRDateRangePicker",
2099
+ "declaration": {
2100
+ "name": "KRDateRangePicker",
2101
+ "module": "dist/date-range-picker/date-range-picker.js"
2102
+ }
2103
+ }
2104
+ ]
2105
+ },
1966
2106
  {
1967
2107
  "kind": "javascript-module",
1968
2108
  "path": "dist/dialog/dialog.js",
@@ -2184,6 +2324,14 @@
2184
2324
  "name": "KRComboBox",
2185
2325
  "module": "./combo-box/combo-box.js"
2186
2326
  }
2327
+ },
2328
+ {
2329
+ "kind": "js",
2330
+ "name": "KRRadioCards",
2331
+ "declaration": {
2332
+ "name": "KRRadioCards",
2333
+ "module": "./radio-cards/radio-cards.js"
2334
+ }
2187
2335
  }
2188
2336
  ]
2189
2337
  },
@@ -3478,204 +3626,252 @@
3478
3626
  },
3479
3627
  {
3480
3628
  "kind": "javascript-module",
3481
- "path": "src/dialog/dialog.ts",
3629
+ "path": "src/date-range-picker/date-range-picker.ts",
3482
3630
  "declarations": [
3483
3631
  {
3484
3632
  "kind": "class",
3485
- "description": "",
3486
- "name": "KRDialogHeader",
3487
- "members": [],
3488
- "superclass": {
3489
- "name": "LitElement",
3490
- "package": "lit"
3491
- },
3492
- "tagName": "kr-dialog-header",
3493
- "customElement": true
3494
- },
3495
- {
3496
- "kind": "class",
3497
- "description": "",
3498
- "name": "KRDialogContent",
3499
- "members": [],
3500
- "superclass": {
3501
- "name": "LitElement",
3502
- "package": "lit"
3503
- },
3504
- "tagName": "kr-dialog-content",
3505
- "customElement": true
3506
- },
3507
- {
3508
- "kind": "class",
3509
- "description": "",
3510
- "name": "KRDialogFooter",
3511
- "members": [],
3512
- "superclass": {
3513
- "name": "LitElement",
3514
- "package": "lit"
3515
- },
3516
- "tagName": "kr-dialog-footer",
3517
- "customElement": true
3518
- },
3519
- {
3520
- "kind": "class",
3521
- "description": "A reference to an open dialog instance.\n\nUsed to close the dialog and retrieve its result.",
3522
- "name": "KRDialogRef",
3633
+ "description": "A date range picker component for selecting date ranges with relative and absolute options.",
3634
+ "name": "KRDateRangePicker",
3635
+ "cssParts": [
3636
+ {
3637
+ "description": "The trigger button element",
3638
+ "name": "trigger"
3639
+ },
3640
+ {
3641
+ "description": "The dropdown container",
3642
+ "name": "dropdown"
3643
+ }
3644
+ ],
3523
3645
  "members": [
3524
3646
  {
3525
3647
  "kind": "field",
3526
- "name": "_resolvePromise",
3648
+ "name": "value",
3527
3649
  "type": {
3528
- "text": "((value: R | undefined) => void) | null"
3650
+ "text": "KRDateRangePickerValue | undefined"
3529
3651
  },
3530
- "privacy": "private",
3531
- "default": "null"
3652
+ "description": "Selected date range value",
3653
+ "attribute": "value"
3532
3654
  },
3533
3655
  {
3534
3656
  "kind": "field",
3535
- "name": "_promise",
3657
+ "name": "relativeOptions",
3536
3658
  "type": {
3537
- "text": "Promise<R | undefined>"
3659
+ "text": "KRDateRangePickerRelativeOption[]"
3538
3660
  },
3539
- "privacy": "private",
3540
- "default": "new Promise((resolve) => { this._resolvePromise = resolve; })"
3661
+ "default": "[ { key: 'last-5-minutes', amount: 5, unit: 'minute', type: 'relative' }, { key: 'last-30-minutes', amount: 30, unit: 'minute', type: 'relative' }, { key: 'last-1-hour', amount: 1, unit: 'hour', type: 'relative' }, { key: 'last-6-hours', amount: 6, unit: 'hour', type: 'relative' }, { key: 'last-1-day', amount: 1, unit: 'day', type: 'relative' }, { key: 'last-7-days', amount: 7, unit: 'day', type: 'relative' }, { key: 'last-30-days', amount: 30, unit: 'day', type: 'relative' }, ]",
3662
+ "description": "Relative date options to display",
3663
+ "attribute": "relativeOptions"
3541
3664
  },
3542
3665
  {
3543
3666
  "kind": "field",
3544
- "name": "_dialogElement",
3667
+ "name": "disabled",
3545
3668
  "type": {
3546
- "text": "KRDialog | null"
3669
+ "text": "boolean"
3547
3670
  },
3548
- "privacy": "private",
3549
- "default": "null"
3550
- },
3551
- {
3552
- "kind": "method",
3553
- "name": "close",
3554
- "parameters": [
3555
- {
3556
- "name": "result",
3557
- "optional": true,
3558
- "type": {
3559
- "text": "R"
3560
- },
3561
- "description": "The result to return to the caller"
3562
- }
3563
- ],
3564
- "description": "Closes the dialog and resolves with the given result."
3671
+ "default": "false",
3672
+ "description": "Whether the picker is disabled",
3673
+ "attribute": "disabled"
3565
3674
  },
3566
- {
3567
- "kind": "method",
3568
- "name": "afterClosed",
3569
- "return": {
3570
- "type": {
3571
- "text": ""
3572
- }
3573
- },
3574
- "description": "Returns a promise that resolves when the dialog is closed."
3575
- }
3576
- ]
3577
- },
3578
- {
3579
- "kind": "class",
3580
- "description": "Generic dialog component that supports both declarative and programmatic usage.\n\nDeclarative: place `<kr-dialog>` in HTML with slotted content and call `.open()` / `.close()`.\nProgrammatic: use `KRDialog.open(Component, config)` to create and show a dialog.",
3581
- "name": "KRDialog",
3582
- "slots": [
3583
- {
3584
- "description": "Default slot for declarative dialog content (kr-dialog-header, kr-dialog-content, kr-dialog-footer)",
3585
- "name": ""
3586
- }
3587
- ],
3588
- "members": [
3589
3675
  {
3590
3676
  "kind": "field",
3591
- "name": "_dialogRef",
3677
+ "name": "invalid",
3592
3678
  "type": {
3593
- "text": "KRDialogRef | null"
3679
+ "text": "boolean"
3594
3680
  },
3595
- "privacy": "private",
3596
- "default": "null"
3681
+ "default": "false",
3682
+ "description": "Whether the picker is in an invalid state",
3683
+ "attribute": "invalid"
3597
3684
  },
3598
3685
  {
3599
3686
  "kind": "field",
3600
- "name": "_contentElement",
3687
+ "name": "placeholder",
3601
3688
  "type": {
3602
- "text": "LitElement | null"
3689
+ "text": "string"
3603
3690
  },
3604
- "privacy": "private",
3605
- "default": "null"
3691
+ "default": "'Select a date range'",
3692
+ "description": "Placeholder text when no range is selected",
3693
+ "attribute": "placeholder"
3606
3694
  },
3607
3695
  {
3608
3696
  "kind": "field",
3609
- "name": "opened",
3697
+ "name": "startDate",
3610
3698
  "type": {
3611
- "text": "boolean"
3699
+ "text": "string"
3612
3700
  },
3613
- "default": "false",
3614
- "attribute": "opened",
3615
- "reflects": true
3701
+ "default": "''",
3702
+ "description": "Initial start date for absolute mode (YYYY-MM-DD)",
3703
+ "attribute": "startDate"
3616
3704
  },
3617
3705
  {
3618
3706
  "kind": "field",
3619
- "name": "label",
3707
+ "name": "endDate",
3620
3708
  "type": {
3621
3709
  "text": "string"
3622
3710
  },
3623
3711
  "default": "''",
3624
- "attribute": "label"
3712
+ "description": "Initial end date for absolute mode (YYYY-MM-DD)",
3713
+ "attribute": "endDate"
3625
3714
  },
3626
3715
  {
3627
3716
  "kind": "field",
3628
- "name": "width",
3717
+ "name": "mode",
3629
3718
  "type": {
3630
- "text": "string"
3719
+ "text": "KRDateRangePickerMode | undefined"
3631
3720
  },
3632
- "default": "'560px'",
3633
- "attribute": "width"
3721
+ "description": "Date range picker mode - 'relative' only or 'absolute' only. If not set, shows both tabs (default)",
3722
+ "attribute": "mode"
3723
+ },
3724
+ {
3725
+ "kind": "field",
3726
+ "name": "_isOpen",
3727
+ "type": {
3728
+ "text": "boolean"
3729
+ },
3730
+ "privacy": "private",
3731
+ "default": "false"
3732
+ },
3733
+ {
3734
+ "kind": "field",
3735
+ "name": "_activeTab",
3736
+ "type": {
3737
+ "text": "'relative' | 'absolute'"
3738
+ },
3739
+ "privacy": "private",
3740
+ "default": "'relative'"
3741
+ },
3742
+ {
3743
+ "kind": "field",
3744
+ "name": "_tempStartDate",
3745
+ "type": {
3746
+ "text": "string"
3747
+ },
3748
+ "privacy": "private",
3749
+ "default": "''"
3750
+ },
3751
+ {
3752
+ "kind": "field",
3753
+ "name": "_tempEndDate",
3754
+ "type": {
3755
+ "text": "string"
3756
+ },
3757
+ "privacy": "private",
3758
+ "default": "''"
3759
+ },
3760
+ {
3761
+ "kind": "field",
3762
+ "name": "_handleClickOutside",
3763
+ "privacy": "private"
3634
3764
  },
3635
3765
  {
3636
3766
  "kind": "method",
3637
- "name": "open",
3638
- "description": "Opens the dialog (declarative mode)."
3767
+ "name": "_handleTriggerClick",
3768
+ "privacy": "private"
3639
3769
  },
3640
3770
  {
3641
3771
  "kind": "method",
3642
- "name": "close",
3643
- "description": "Closes the dialog.\nIn programmatic mode (has _dialogRef), delegates to the dialog ref.\nIn declarative mode, sets opened=false and dispatches close event."
3772
+ "name": "_handleTabClick",
3773
+ "privacy": "private",
3774
+ "parameters": [
3775
+ {
3776
+ "name": "tab",
3777
+ "type": {
3778
+ "text": "'relative' | 'absolute'"
3779
+ }
3780
+ }
3781
+ ]
3644
3782
  },
3645
3783
  {
3646
3784
  "kind": "method",
3647
- "name": "open",
3648
- "static": true,
3785
+ "name": "_handleRelativeSelect",
3786
+ "privacy": "private",
3787
+ "parameters": [
3788
+ {
3789
+ "name": "option",
3790
+ "type": {
3791
+ "text": "KRDateRangePickerRelativeOption"
3792
+ }
3793
+ }
3794
+ ]
3795
+ },
3796
+ {
3797
+ "kind": "method",
3798
+ "name": "_handleApplyAbsolute",
3799
+ "privacy": "private"
3800
+ },
3801
+ {
3802
+ "kind": "method",
3803
+ "name": "_handleCancel",
3804
+ "privacy": "private"
3805
+ },
3806
+ {
3807
+ "kind": "method",
3808
+ "name": "_formatRelativeOption",
3809
+ "privacy": "private",
3649
3810
  "return": {
3650
3811
  "type": {
3651
- "text": "KRDialogRef"
3812
+ "text": "string"
3652
3813
  }
3653
3814
  },
3654
3815
  "parameters": [
3655
3816
  {
3656
- "name": "component",
3657
- "type": {
3658
- "text": "new () => LitElement"
3659
- }
3660
- },
3661
- {
3662
- "name": "config",
3663
- "optional": true,
3817
+ "name": "option",
3664
3818
  "type": {
3665
- "text": "KRDialogConfig"
3819
+ "text": "KRDateRangePickerRelativeOption"
3666
3820
  }
3667
3821
  }
3668
- ],
3669
- "description": "Opens a dialog programmatically by creating a component and injecting it."
3822
+ ]
3670
3823
  },
3671
3824
  {
3672
- "kind": "field",
3673
- "name": "_handleDocumentKeyDown",
3825
+ "kind": "method",
3826
+ "name": "_getDisplayValue",
3827
+ "privacy": "private",
3828
+ "return": {
3829
+ "type": {
3830
+ "text": "string"
3831
+ }
3832
+ }
3833
+ },
3834
+ {
3835
+ "kind": "method",
3836
+ "name": "_renderTriggerText",
3674
3837
  "privacy": "private"
3675
3838
  },
3676
3839
  {
3677
3840
  "kind": "method",
3678
- "name": "_handleBackdropClick",
3841
+ "name": "_renderContent",
3842
+ "privacy": "private"
3843
+ },
3844
+ {
3845
+ "kind": "method",
3846
+ "name": "_renderRelativeContent",
3847
+ "privacy": "private"
3848
+ },
3849
+ {
3850
+ "kind": "method",
3851
+ "name": "_renderAbsoluteContent",
3852
+ "privacy": "private"
3853
+ },
3854
+ {
3855
+ "kind": "method",
3856
+ "name": "_renderFooter",
3857
+ "privacy": "private"
3858
+ },
3859
+ {
3860
+ "kind": "method",
3861
+ "name": "_handleStartDateChange",
3862
+ "privacy": "private",
3863
+ "parameters": [
3864
+ {
3865
+ "name": "e",
3866
+ "type": {
3867
+ "text": "Event"
3868
+ }
3869
+ }
3870
+ ]
3871
+ },
3872
+ {
3873
+ "kind": "method",
3874
+ "name": "_handleEndDateChange",
3679
3875
  "privacy": "private",
3680
3876
  "parameters": [
3681
3877
  {
@@ -3689,235 +3885,318 @@
3689
3885
  ],
3690
3886
  "events": [
3691
3887
  {
3692
- "name": "close",
3888
+ "name": "change",
3693
3889
  "type": {
3694
3890
  "text": "CustomEvent"
3695
3891
  },
3696
- "description": "Fired when a declarative dialog is closed"
3892
+ "description": "Fired when the date range selection changes"
3697
3893
  }
3698
3894
  ],
3699
3895
  "attributes": [
3700
3896
  {
3701
- "name": "opened",
3897
+ "name": "value",
3898
+ "type": {
3899
+ "text": "KRDateRangePickerValue | undefined"
3900
+ },
3901
+ "description": "Selected date range value",
3902
+ "fieldName": "value"
3903
+ },
3904
+ {
3905
+ "name": "relativeOptions",
3906
+ "type": {
3907
+ "text": "KRDateRangePickerRelativeOption[]"
3908
+ },
3909
+ "default": "[ { key: 'last-5-minutes', amount: 5, unit: 'minute', type: 'relative' }, { key: 'last-30-minutes', amount: 30, unit: 'minute', type: 'relative' }, { key: 'last-1-hour', amount: 1, unit: 'hour', type: 'relative' }, { key: 'last-6-hours', amount: 6, unit: 'hour', type: 'relative' }, { key: 'last-1-day', amount: 1, unit: 'day', type: 'relative' }, { key: 'last-7-days', amount: 7, unit: 'day', type: 'relative' }, { key: 'last-30-days', amount: 30, unit: 'day', type: 'relative' }, ]",
3910
+ "description": "Relative date options to display",
3911
+ "fieldName": "relativeOptions"
3912
+ },
3913
+ {
3914
+ "name": "disabled",
3702
3915
  "type": {
3703
3916
  "text": "boolean"
3704
3917
  },
3705
3918
  "default": "false",
3706
- "fieldName": "opened"
3919
+ "description": "Whether the picker is disabled",
3920
+ "fieldName": "disabled"
3707
3921
  },
3708
3922
  {
3709
- "name": "label",
3923
+ "name": "invalid",
3924
+ "type": {
3925
+ "text": "boolean"
3926
+ },
3927
+ "default": "false",
3928
+ "description": "Whether the picker is in an invalid state",
3929
+ "fieldName": "invalid"
3930
+ },
3931
+ {
3932
+ "name": "placeholder",
3933
+ "type": {
3934
+ "text": "string"
3935
+ },
3936
+ "default": "'Select a date range'",
3937
+ "description": "Placeholder text when no range is selected",
3938
+ "fieldName": "placeholder"
3939
+ },
3940
+ {
3941
+ "name": "startDate",
3710
3942
  "type": {
3711
3943
  "text": "string"
3712
3944
  },
3713
3945
  "default": "''",
3714
- "fieldName": "label"
3946
+ "description": "Initial start date for absolute mode (YYYY-MM-DD)",
3947
+ "fieldName": "startDate"
3715
3948
  },
3716
3949
  {
3717
- "name": "width",
3950
+ "name": "endDate",
3718
3951
  "type": {
3719
3952
  "text": "string"
3720
3953
  },
3721
- "default": "'560px'",
3722
- "fieldName": "width"
3954
+ "default": "''",
3955
+ "description": "Initial end date for absolute mode (YYYY-MM-DD)",
3956
+ "fieldName": "endDate"
3957
+ },
3958
+ {
3959
+ "name": "mode",
3960
+ "type": {
3961
+ "text": "KRDateRangePickerMode | undefined"
3962
+ },
3963
+ "description": "Date range picker mode - 'relative' only or 'absolute' only. If not set, shows both tabs (default)",
3964
+ "fieldName": "mode"
3723
3965
  }
3724
3966
  ],
3725
3967
  "superclass": {
3726
3968
  "name": "LitElement",
3727
3969
  "package": "lit"
3728
3970
  },
3729
- "tagName": "kr-dialog",
3971
+ "tagName": "kr-date-range-picker",
3730
3972
  "customElement": true
3731
3973
  }
3732
3974
  ],
3733
3975
  "exports": [
3734
3976
  {
3735
3977
  "kind": "js",
3736
- "name": "KRDialogHeader",
3978
+ "name": "KRDateRangePicker",
3737
3979
  "declaration": {
3738
- "name": "KRDialogHeader",
3739
- "module": "src/dialog/dialog.ts"
3980
+ "name": "KRDateRangePicker",
3981
+ "module": "src/date-range-picker/date-range-picker.ts"
3740
3982
  }
3741
3983
  },
3742
3984
  {
3743
3985
  "kind": "custom-element-definition",
3744
- "name": "kr-dialog-header",
3986
+ "name": "kr-date-range-picker",
3745
3987
  "declaration": {
3746
- "name": "KRDialogHeader",
3747
- "module": "src/dialog/dialog.ts"
3988
+ "name": "KRDateRangePicker",
3989
+ "module": "src/date-range-picker/date-range-picker.ts"
3748
3990
  }
3749
- },
3991
+ }
3992
+ ]
3993
+ },
3994
+ {
3995
+ "kind": "javascript-module",
3996
+ "path": "src/dialog/dialog.ts",
3997
+ "declarations": [
3750
3998
  {
3751
- "kind": "js",
3752
- "name": "KRDialogContent",
3753
- "declaration": {
3754
- "name": "KRDialogContent",
3755
- "module": "src/dialog/dialog.ts"
3756
- }
3999
+ "kind": "class",
4000
+ "description": "",
4001
+ "name": "KRDialogHeader",
4002
+ "members": [],
4003
+ "superclass": {
4004
+ "name": "LitElement",
4005
+ "package": "lit"
4006
+ },
4007
+ "tagName": "kr-dialog-header",
4008
+ "customElement": true
3757
4009
  },
3758
4010
  {
3759
- "kind": "custom-element-definition",
3760
- "name": "kr-dialog-content",
3761
- "declaration": {
3762
- "name": "KRDialogContent",
3763
- "module": "src/dialog/dialog.ts"
3764
- }
4011
+ "kind": "class",
4012
+ "description": "",
4013
+ "name": "KRDialogContent",
4014
+ "members": [],
4015
+ "superclass": {
4016
+ "name": "LitElement",
4017
+ "package": "lit"
4018
+ },
4019
+ "tagName": "kr-dialog-content",
4020
+ "customElement": true
3765
4021
  },
3766
4022
  {
3767
- "kind": "js",
4023
+ "kind": "class",
4024
+ "description": "",
3768
4025
  "name": "KRDialogFooter",
3769
- "declaration": {
3770
- "name": "KRDialogFooter",
3771
- "module": "src/dialog/dialog.ts"
3772
- }
3773
- },
3774
- {
3775
- "kind": "custom-element-definition",
3776
- "name": "kr-dialog-footer",
3777
- "declaration": {
3778
- "name": "KRDialogFooter",
3779
- "module": "src/dialog/dialog.ts"
3780
- }
4026
+ "members": [],
4027
+ "superclass": {
4028
+ "name": "LitElement",
4029
+ "package": "lit"
4030
+ },
4031
+ "tagName": "kr-dialog-footer",
4032
+ "customElement": true
3781
4033
  },
3782
4034
  {
3783
- "kind": "js",
4035
+ "kind": "class",
4036
+ "description": "A reference to an open dialog instance.\n\nUsed to close the dialog and retrieve its result.",
3784
4037
  "name": "KRDialogRef",
3785
- "declaration": {
3786
- "name": "KRDialogRef",
3787
- "module": "src/dialog/dialog.ts"
3788
- }
3789
- },
3790
- {
3791
- "kind": "js",
3792
- "name": "KRDialog",
3793
- "declaration": {
3794
- "name": "KRDialog",
3795
- "module": "src/dialog/dialog.ts"
3796
- }
3797
- },
3798
- {
3799
- "kind": "custom-element-definition",
3800
- "name": "kr-dialog",
3801
- "declaration": {
3802
- "name": "KRDialog",
3803
- "module": "src/dialog/dialog.ts"
3804
- }
3805
- }
3806
- ]
3807
- },
3808
- {
3809
- "kind": "javascript-module",
3810
- "path": "src/file-list/file-list.ts",
3811
- "declarations": [
3812
- {
3813
- "kind": "class",
3814
- "description": "A file list component that displays files with extension-based icons,\ndownload/delete actions, and built-in file preview.\n\nClicking a file name opens a full-screen preview via `KRFilePreview.open()`.",
3815
- "name": "KRFileList",
3816
4038
  "members": [
3817
4039
  {
3818
4040
  "kind": "field",
3819
- "name": "files",
4041
+ "name": "_resolvePromise",
3820
4042
  "type": {
3821
- "text": "KRFile[]"
4043
+ "text": "((value: R | undefined) => void) | null"
3822
4044
  },
3823
- "default": "[]",
3824
- "description": "Array of file objects to display",
3825
- "attribute": "files"
4045
+ "privacy": "private",
4046
+ "default": "null"
3826
4047
  },
3827
4048
  {
3828
4049
  "kind": "field",
3829
- "name": "emptyMessage",
4050
+ "name": "_promise",
3830
4051
  "type": {
3831
- "text": "string"
4052
+ "text": "Promise<R | undefined>"
3832
4053
  },
3833
- "default": "'No files'",
3834
- "description": "Message displayed when the file list is empty",
3835
- "attribute": "empty-message"
3836
- },
3837
- {
3838
- "kind": "method",
3839
- "name": "_handleFileClick",
3840
4054
  "privacy": "private",
3841
- "parameters": [
3842
- {
3843
- "name": "file",
3844
- "type": {
3845
- "text": "KRFile"
3846
- }
3847
- }
3848
- ]
4055
+ "default": "new Promise((resolve) => { this._resolvePromise = resolve; })"
3849
4056
  },
3850
4057
  {
3851
- "kind": "method",
3852
- "name": "_handleDownload",
4058
+ "kind": "field",
4059
+ "name": "_dialogElement",
4060
+ "type": {
4061
+ "text": "KRDialog | null"
4062
+ },
3853
4063
  "privacy": "private",
3854
- "parameters": [
3855
- {
3856
- "name": "file",
3857
- "type": {
3858
- "text": "KRFile"
3859
- }
3860
- }
3861
- ]
4064
+ "default": "null"
3862
4065
  },
3863
4066
  {
3864
4067
  "kind": "method",
3865
- "name": "_handleDelete",
3866
- "privacy": "private",
4068
+ "name": "close",
3867
4069
  "parameters": [
3868
4070
  {
3869
- "name": "file",
4071
+ "name": "result",
4072
+ "optional": true,
3870
4073
  "type": {
3871
- "text": "KRFile"
3872
- }
4074
+ "text": "R"
4075
+ },
4076
+ "description": "The result to return to the caller"
3873
4077
  }
3874
- ]
4078
+ ],
4079
+ "description": "Closes the dialog and resolves with the given result."
3875
4080
  },
3876
4081
  {
3877
4082
  "kind": "method",
3878
- "name": "_getExtension",
3879
- "privacy": "private",
4083
+ "name": "afterClosed",
3880
4084
  "return": {
3881
4085
  "type": {
3882
- "text": "string"
4086
+ "text": ""
3883
4087
  }
3884
4088
  },
3885
- "parameters": [
3886
- {
3887
- "name": "name",
3888
- "type": {
3889
- "text": "string"
3890
- }
3891
- }
3892
- ]
4089
+ "description": "Returns a promise that resolves when the dialog is closed."
4090
+ }
4091
+ ]
4092
+ },
4093
+ {
4094
+ "kind": "class",
4095
+ "description": "Generic dialog component that supports both declarative and programmatic usage.\n\nDeclarative: place `<kr-dialog>` in HTML with slotted content and call `.open()` / `.close()`.\nProgrammatic: use `KRDialog.open(Component, config)` to create and show a dialog.",
4096
+ "name": "KRDialog",
4097
+ "slots": [
4098
+ {
4099
+ "description": "Default slot for declarative dialog content (kr-dialog-header, kr-dialog-content, kr-dialog-footer)",
4100
+ "name": ""
4101
+ }
4102
+ ],
4103
+ "members": [
4104
+ {
4105
+ "kind": "field",
4106
+ "name": "_dialogRef",
4107
+ "type": {
4108
+ "text": "KRDialogRef | null"
4109
+ },
4110
+ "privacy": "private",
4111
+ "default": "null"
3893
4112
  },
3894
4113
  {
3895
- "kind": "method",
3896
- "name": "_getExtClass",
4114
+ "kind": "field",
4115
+ "name": "_contentElement",
4116
+ "type": {
4117
+ "text": "LitElement | null"
4118
+ },
3897
4119
  "privacy": "private",
4120
+ "default": "null"
4121
+ },
4122
+ {
4123
+ "kind": "field",
4124
+ "name": "opened",
4125
+ "type": {
4126
+ "text": "boolean"
4127
+ },
4128
+ "default": "false",
4129
+ "attribute": "opened",
4130
+ "reflects": true
4131
+ },
4132
+ {
4133
+ "kind": "field",
4134
+ "name": "label",
4135
+ "type": {
4136
+ "text": "string"
4137
+ },
4138
+ "default": "''",
4139
+ "attribute": "label"
4140
+ },
4141
+ {
4142
+ "kind": "field",
4143
+ "name": "width",
4144
+ "type": {
4145
+ "text": "string"
4146
+ },
4147
+ "default": "'560px'",
4148
+ "attribute": "width"
4149
+ },
4150
+ {
4151
+ "kind": "method",
4152
+ "name": "open",
4153
+ "description": "Opens the dialog (declarative mode)."
4154
+ },
4155
+ {
4156
+ "kind": "method",
4157
+ "name": "close",
4158
+ "description": "Closes the dialog.\nIn programmatic mode (has _dialogRef), delegates to the dialog ref.\nIn declarative mode, sets opened=false and dispatches close event."
4159
+ },
4160
+ {
4161
+ "kind": "method",
4162
+ "name": "open",
4163
+ "static": true,
3898
4164
  "return": {
3899
4165
  "type": {
3900
- "text": "string"
4166
+ "text": "KRDialogRef"
3901
4167
  }
3902
4168
  },
3903
4169
  "parameters": [
3904
4170
  {
3905
- "name": "ext",
4171
+ "name": "component",
3906
4172
  "type": {
3907
- "text": "string"
4173
+ "text": "new () => LitElement"
4174
+ }
4175
+ },
4176
+ {
4177
+ "name": "config",
4178
+ "optional": true,
4179
+ "type": {
4180
+ "text": "KRDialogConfig"
3908
4181
  }
3909
4182
  }
3910
- ]
4183
+ ],
4184
+ "description": "Opens a dialog programmatically by creating a component and injecting it."
4185
+ },
4186
+ {
4187
+ "kind": "field",
4188
+ "name": "_handleDocumentKeyDown",
4189
+ "privacy": "private"
3911
4190
  },
3912
4191
  {
3913
4192
  "kind": "method",
3914
- "name": "_getExtIcon",
4193
+ "name": "_handleBackdropClick",
3915
4194
  "privacy": "private",
3916
4195
  "parameters": [
3917
4196
  {
3918
- "name": "ext",
4197
+ "name": "e",
3919
4198
  "type": {
3920
- "text": "string"
4199
+ "text": "Event"
3921
4200
  }
3922
4201
  }
3923
4202
  ]
@@ -3925,84 +4204,320 @@
3925
4204
  ],
3926
4205
  "events": [
3927
4206
  {
3928
- "name": "file-click",
4207
+ "name": "close",
3929
4208
  "type": {
3930
4209
  "text": "CustomEvent"
3931
4210
  },
3932
- "description": "Fired when a file name is clicked. Detail: `{ file }`"
3933
- },
4211
+ "description": "Fired when a declarative dialog is closed"
4212
+ }
4213
+ ],
4214
+ "attributes": [
3934
4215
  {
3935
- "name": "download",
4216
+ "name": "opened",
3936
4217
  "type": {
3937
- "text": "CustomEvent"
4218
+ "text": "boolean"
3938
4219
  },
3939
- "description": "Fired when the download icon is clicked. Detail: `{ file }`"
4220
+ "default": "false",
4221
+ "fieldName": "opened"
3940
4222
  },
3941
4223
  {
3942
- "name": "delete",
3943
- "type": {
3944
- "text": "CustomEvent"
3945
- },
3946
- "description": "Fired when the delete icon is clicked. Detail: `{ file }`"
3947
- }
3948
- ],
3949
- "attributes": [
3950
- {
3951
- "name": "files",
4224
+ "name": "label",
3952
4225
  "type": {
3953
- "text": "KRFile[]"
4226
+ "text": "string"
3954
4227
  },
3955
- "default": "[]",
3956
- "description": "Array of file objects to display",
3957
- "fieldName": "files"
4228
+ "default": "''",
4229
+ "fieldName": "label"
3958
4230
  },
3959
4231
  {
3960
- "name": "empty-message",
4232
+ "name": "width",
3961
4233
  "type": {
3962
4234
  "text": "string"
3963
4235
  },
3964
- "default": "'No files'",
3965
- "description": "Message displayed when the file list is empty",
3966
- "fieldName": "emptyMessage"
4236
+ "default": "'560px'",
4237
+ "fieldName": "width"
3967
4238
  }
3968
4239
  ],
3969
4240
  "superclass": {
3970
4241
  "name": "LitElement",
3971
4242
  "package": "lit"
3972
4243
  },
3973
- "tagName": "kr-file-list",
4244
+ "tagName": "kr-dialog",
3974
4245
  "customElement": true
3975
4246
  }
3976
4247
  ],
3977
4248
  "exports": [
3978
4249
  {
3979
4250
  "kind": "js",
3980
- "name": "KRFileList",
4251
+ "name": "KRDialogHeader",
3981
4252
  "declaration": {
3982
- "name": "KRFileList",
3983
- "module": "src/file-list/file-list.ts"
4253
+ "name": "KRDialogHeader",
4254
+ "module": "src/dialog/dialog.ts"
3984
4255
  }
3985
4256
  },
3986
4257
  {
3987
4258
  "kind": "custom-element-definition",
3988
- "name": "kr-file-list",
4259
+ "name": "kr-dialog-header",
3989
4260
  "declaration": {
3990
- "name": "KRFileList",
3991
- "module": "src/file-list/file-list.ts"
4261
+ "name": "KRDialogHeader",
4262
+ "module": "src/dialog/dialog.ts"
3992
4263
  }
3993
- }
3994
- ]
3995
- },
3996
- {
3997
- "kind": "javascript-module",
3998
- "path": "src/file-preview/file-preview.ts",
3999
- "declarations": [
4264
+ },
4000
4265
  {
4001
- "kind": "class",
4002
- "description": "A full-screen file preview overlay.\n\nSupports image files with zoom/pan, PDFs via iframe, and a download\nfallback for other file types. Use the static `open()` method to show\nthe preview imperatively.",
4003
- "name": "KRFilePreview",
4004
- "members": [
4005
- {
4266
+ "kind": "js",
4267
+ "name": "KRDialogContent",
4268
+ "declaration": {
4269
+ "name": "KRDialogContent",
4270
+ "module": "src/dialog/dialog.ts"
4271
+ }
4272
+ },
4273
+ {
4274
+ "kind": "custom-element-definition",
4275
+ "name": "kr-dialog-content",
4276
+ "declaration": {
4277
+ "name": "KRDialogContent",
4278
+ "module": "src/dialog/dialog.ts"
4279
+ }
4280
+ },
4281
+ {
4282
+ "kind": "js",
4283
+ "name": "KRDialogFooter",
4284
+ "declaration": {
4285
+ "name": "KRDialogFooter",
4286
+ "module": "src/dialog/dialog.ts"
4287
+ }
4288
+ },
4289
+ {
4290
+ "kind": "custom-element-definition",
4291
+ "name": "kr-dialog-footer",
4292
+ "declaration": {
4293
+ "name": "KRDialogFooter",
4294
+ "module": "src/dialog/dialog.ts"
4295
+ }
4296
+ },
4297
+ {
4298
+ "kind": "js",
4299
+ "name": "KRDialogRef",
4300
+ "declaration": {
4301
+ "name": "KRDialogRef",
4302
+ "module": "src/dialog/dialog.ts"
4303
+ }
4304
+ },
4305
+ {
4306
+ "kind": "js",
4307
+ "name": "KRDialog",
4308
+ "declaration": {
4309
+ "name": "KRDialog",
4310
+ "module": "src/dialog/dialog.ts"
4311
+ }
4312
+ },
4313
+ {
4314
+ "kind": "custom-element-definition",
4315
+ "name": "kr-dialog",
4316
+ "declaration": {
4317
+ "name": "KRDialog",
4318
+ "module": "src/dialog/dialog.ts"
4319
+ }
4320
+ }
4321
+ ]
4322
+ },
4323
+ {
4324
+ "kind": "javascript-module",
4325
+ "path": "src/file-list/file-list.ts",
4326
+ "declarations": [
4327
+ {
4328
+ "kind": "class",
4329
+ "description": "A file list component that displays files with extension-based icons,\ndownload/delete actions, and built-in file preview.\n\nClicking a file name opens a full-screen preview via `KRFilePreview.open()`.",
4330
+ "name": "KRFileList",
4331
+ "members": [
4332
+ {
4333
+ "kind": "field",
4334
+ "name": "files",
4335
+ "type": {
4336
+ "text": "KRFile[]"
4337
+ },
4338
+ "default": "[]",
4339
+ "description": "Array of file objects to display",
4340
+ "attribute": "files"
4341
+ },
4342
+ {
4343
+ "kind": "field",
4344
+ "name": "emptyMessage",
4345
+ "type": {
4346
+ "text": "string"
4347
+ },
4348
+ "default": "'No files'",
4349
+ "description": "Message displayed when the file list is empty",
4350
+ "attribute": "empty-message"
4351
+ },
4352
+ {
4353
+ "kind": "method",
4354
+ "name": "_handleFileClick",
4355
+ "privacy": "private",
4356
+ "parameters": [
4357
+ {
4358
+ "name": "file",
4359
+ "type": {
4360
+ "text": "KRFile"
4361
+ }
4362
+ }
4363
+ ]
4364
+ },
4365
+ {
4366
+ "kind": "method",
4367
+ "name": "_handleDownload",
4368
+ "privacy": "private",
4369
+ "parameters": [
4370
+ {
4371
+ "name": "file",
4372
+ "type": {
4373
+ "text": "KRFile"
4374
+ }
4375
+ }
4376
+ ]
4377
+ },
4378
+ {
4379
+ "kind": "method",
4380
+ "name": "_handleDelete",
4381
+ "privacy": "private",
4382
+ "parameters": [
4383
+ {
4384
+ "name": "file",
4385
+ "type": {
4386
+ "text": "KRFile"
4387
+ }
4388
+ }
4389
+ ]
4390
+ },
4391
+ {
4392
+ "kind": "method",
4393
+ "name": "_getExtension",
4394
+ "privacy": "private",
4395
+ "return": {
4396
+ "type": {
4397
+ "text": "string"
4398
+ }
4399
+ },
4400
+ "parameters": [
4401
+ {
4402
+ "name": "name",
4403
+ "type": {
4404
+ "text": "string"
4405
+ }
4406
+ }
4407
+ ]
4408
+ },
4409
+ {
4410
+ "kind": "method",
4411
+ "name": "_getExtClass",
4412
+ "privacy": "private",
4413
+ "return": {
4414
+ "type": {
4415
+ "text": "string"
4416
+ }
4417
+ },
4418
+ "parameters": [
4419
+ {
4420
+ "name": "ext",
4421
+ "type": {
4422
+ "text": "string"
4423
+ }
4424
+ }
4425
+ ]
4426
+ },
4427
+ {
4428
+ "kind": "method",
4429
+ "name": "_getExtIcon",
4430
+ "privacy": "private",
4431
+ "parameters": [
4432
+ {
4433
+ "name": "ext",
4434
+ "type": {
4435
+ "text": "string"
4436
+ }
4437
+ }
4438
+ ]
4439
+ }
4440
+ ],
4441
+ "events": [
4442
+ {
4443
+ "name": "file-click",
4444
+ "type": {
4445
+ "text": "CustomEvent"
4446
+ },
4447
+ "description": "Fired when a file name is clicked. Detail: `{ file }`"
4448
+ },
4449
+ {
4450
+ "name": "download",
4451
+ "type": {
4452
+ "text": "CustomEvent"
4453
+ },
4454
+ "description": "Fired when the download icon is clicked. Detail: `{ file }`"
4455
+ },
4456
+ {
4457
+ "name": "delete",
4458
+ "type": {
4459
+ "text": "CustomEvent"
4460
+ },
4461
+ "description": "Fired when the delete icon is clicked. Detail: `{ file }`"
4462
+ }
4463
+ ],
4464
+ "attributes": [
4465
+ {
4466
+ "name": "files",
4467
+ "type": {
4468
+ "text": "KRFile[]"
4469
+ },
4470
+ "default": "[]",
4471
+ "description": "Array of file objects to display",
4472
+ "fieldName": "files"
4473
+ },
4474
+ {
4475
+ "name": "empty-message",
4476
+ "type": {
4477
+ "text": "string"
4478
+ },
4479
+ "default": "'No files'",
4480
+ "description": "Message displayed when the file list is empty",
4481
+ "fieldName": "emptyMessage"
4482
+ }
4483
+ ],
4484
+ "superclass": {
4485
+ "name": "LitElement",
4486
+ "package": "lit"
4487
+ },
4488
+ "tagName": "kr-file-list",
4489
+ "customElement": true
4490
+ }
4491
+ ],
4492
+ "exports": [
4493
+ {
4494
+ "kind": "js",
4495
+ "name": "KRFileList",
4496
+ "declaration": {
4497
+ "name": "KRFileList",
4498
+ "module": "src/file-list/file-list.ts"
4499
+ }
4500
+ },
4501
+ {
4502
+ "kind": "custom-element-definition",
4503
+ "name": "kr-file-list",
4504
+ "declaration": {
4505
+ "name": "KRFileList",
4506
+ "module": "src/file-list/file-list.ts"
4507
+ }
4508
+ }
4509
+ ]
4510
+ },
4511
+ {
4512
+ "kind": "javascript-module",
4513
+ "path": "src/file-preview/file-preview.ts",
4514
+ "declarations": [
4515
+ {
4516
+ "kind": "class",
4517
+ "description": "A full-screen file preview overlay.\n\nSupports image files with zoom/pan, PDFs via iframe, and a download\nfallback for other file types. Use the static `open()` method to show\nthe preview imperatively.",
4518
+ "name": "KRFilePreview",
4519
+ "members": [
4520
+ {
4006
4521
  "kind": "field",
4007
4522
  "name": "_activePreview",
4008
4523
  "type": {
@@ -4436,7 +4951,15 @@
4436
4951
  "name": "KRComboBox",
4437
4952
  "module": "./combo-box/combo-box.js"
4438
4953
  }
4439
- }
4954
+ },
4955
+ {
4956
+ "kind": "js",
4957
+ "name": "KRRadioCards",
4958
+ "declaration": {
4959
+ "name": "KRRadioCards",
4960
+ "module": "./radio-cards/radio-cards.js"
4961
+ }
4962
+ }
4440
4963
  ]
4441
4964
  },
4442
4965
  {
@@ -6760,6 +7283,28 @@
6760
7283
  }
6761
7284
  ]
6762
7285
  },
7286
+ {
7287
+ "kind": "javascript-module",
7288
+ "path": "dist/form/radio-cards/radio-cards.js",
7289
+ "declarations": [
7290
+ {
7291
+ "kind": "variable",
7292
+ "name": "KRRadioCards",
7293
+ "default": "class KRRadioCards extends LitElement { constructor() { super(); this._focusedIndex = -1; /** * The label text above the cards */ this.label = ''; /** * The input name for form submission */ this.name = ''; /** * The currently selected value */ this.value = ''; /** * The card options to display */ this.options = []; /** * Whether the field is disabled */ this.disabled = false; /** * Whether the field is required */ this.required = false; /** * Helper text shown below the cards */ this.hint = ''; /** * Layout direction: 'row' or 'column' */ this.direction = 'row'; this._touched = 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._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.required && !this.value) { this._internals.setValidity({ valueMissing: true }, 'Please select an option'); } else { this._internals.setValidity({}); } } _handleCardClick(e, option) { if (this.disabled || option.disabled) { return; } this.value = option.value; this._touched = true; this._internals.setFormValue(this.value); this._updateValidity(); this.dispatchEvent(new Event('change', { bubbles: true, composed: true })); } _handleKeyDown(e, index) { if (this.disabled) { return; } if (e.key === ' ' || e.key === 'Enter') { e.preventDefault(); if (!this.options[index].disabled) { this._handleCardClick(e, this.options[index]); } return; } let nextIndex = -1; if (this.direction === 'row') { if (e.key === 'ArrowRight') { nextIndex = this._findNextEnabledIndex(index, 1); } else if (e.key === 'ArrowLeft') { nextIndex = this._findNextEnabledIndex(index, -1); } } else { if (e.key === 'ArrowDown') { nextIndex = this._findNextEnabledIndex(index, 1); } else if (e.key === 'ArrowUp') { nextIndex = this._findNextEnabledIndex(index, -1); } } if (nextIndex >= 0) { e.preventDefault(); this._focusedIndex = nextIndex; const cards = this.shadowRoot?.querySelectorAll('.card'); if (cards[nextIndex]) { cards[nextIndex].focus(); } } } _findNextEnabledIndex(current, step) { let next = current + step; while (next >= 0 && next < this.options.length) { if (!this.options[next].disabled) { return next; } next += step; } return -1; } render() { return html ` <div class=\"wrapper\"> ${this.label ? html ` <label> ${this.label} ${this.required ? html `<span class=\"required\" aria-hidden=\"true\">*</span>` : nothing} </label> ` : nothing} <div class=${classMap({ 'cards': true, 'cards--row': this.direction === 'row', 'cards--column': this.direction === 'column', })} role=\"radiogroup\" aria-label=${this.label} > ${this.options.map((option, index) => { const isSelected = option.value === this.value; const isDisabled = this.disabled || !!option.disabled; return html ` <div class=${classMap({ 'card': true, 'card--selected': isSelected, 'card--disabled': isDisabled, })} role=\"radio\" aria-checked=${isSelected} aria-disabled=${isDisabled} tabindex=${isDisabled ? -1 : 0} @click=${(e) => this._handleCardClick(e, option)} @keydown=${(e) => this._handleKeyDown(e, index)} > <div class=\"card__radio\"> ${isSelected ? html `<div class=\"card__radio-dot\"></div>` : nothing} </div> <div class=\"card__content\"> <div class=\"card__label\">${option.label}</div> ${option.description ? html `<div class=\"card__description\">${option.description}</div>` : nothing} </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>` : nothing} </div> `; } }",
7294
+ "description": "A card-style radio group for selecting between a small number of options.\nEach option renders as a bordered card with a radio indicator, label, and optional description.\n\nUses ElementInternals for form association, allowing the component\nto participate in form submission, validation, and reset."
7295
+ }
7296
+ ],
7297
+ "exports": [
7298
+ {
7299
+ "kind": "js",
7300
+ "name": "KRRadioCards",
7301
+ "declaration": {
7302
+ "name": "KRRadioCards",
7303
+ "module": "dist/form/radio-cards/radio-cards.js"
7304
+ }
7305
+ }
7306
+ ]
7307
+ },
6763
7308
  {
6764
7309
  "kind": "javascript-module",
6765
7310
  "path": "dist/form/select-field/select-field.js",
@@ -7753,121 +8298,577 @@
7753
8298
  ]
7754
8299
  },
7755
8300
  {
7756
- "kind": "method",
7757
- "name": "_handleTriggerKeyDown",
7758
- "privacy": "private",
7759
- "return": {
7760
- "type": {
7761
- "text": "void"
7762
- }
7763
- },
7764
- "parameters": [
7765
- {
7766
- "name": "e",
7767
- "type": {
7768
- "text": "KeyboardEvent"
7769
- }
7770
- }
7771
- ]
8301
+ "kind": "method",
8302
+ "name": "_handleTriggerKeyDown",
8303
+ "privacy": "private",
8304
+ "return": {
8305
+ "type": {
8306
+ "text": "void"
8307
+ }
8308
+ },
8309
+ "parameters": [
8310
+ {
8311
+ "name": "e",
8312
+ "type": {
8313
+ "text": "KeyboardEvent"
8314
+ }
8315
+ }
8316
+ ]
8317
+ },
8318
+ {
8319
+ "kind": "method",
8320
+ "name": "_handleTriggerBlur",
8321
+ "privacy": "private",
8322
+ "return": {
8323
+ "type": {
8324
+ "text": "void"
8325
+ }
8326
+ }
8327
+ },
8328
+ {
8329
+ "kind": "method",
8330
+ "name": "_scrollToHighlighted",
8331
+ "privacy": "private",
8332
+ "return": {
8333
+ "type": {
8334
+ "text": "void"
8335
+ }
8336
+ }
8337
+ },
8338
+ {
8339
+ "kind": "method",
8340
+ "name": "_getOptionValue",
8341
+ "privacy": "private",
8342
+ "return": {
8343
+ "type": {
8344
+ "text": "string"
8345
+ }
8346
+ },
8347
+ "parameters": [
8348
+ {
8349
+ "name": "option",
8350
+ "type": {
8351
+ "text": "any"
8352
+ }
8353
+ }
8354
+ ]
8355
+ },
8356
+ {
8357
+ "kind": "method",
8358
+ "name": "_getOptionLabel",
8359
+ "privacy": "private",
8360
+ "return": {
8361
+ "type": {
8362
+ "text": "string"
8363
+ }
8364
+ },
8365
+ "parameters": [
8366
+ {
8367
+ "name": "option",
8368
+ "type": {
8369
+ "text": "any"
8370
+ }
8371
+ }
8372
+ ]
8373
+ },
8374
+ {
8375
+ "kind": "method",
8376
+ "name": "_resolveSelection",
8377
+ "privacy": "private",
8378
+ "return": {
8379
+ "type": {
8380
+ "text": "void"
8381
+ }
8382
+ }
8383
+ },
8384
+ {
8385
+ "kind": "method",
8386
+ "name": "_selectOption",
8387
+ "privacy": "private",
8388
+ "return": {
8389
+ "type": {
8390
+ "text": "void"
8391
+ }
8392
+ },
8393
+ "parameters": [
8394
+ {
8395
+ "name": "option",
8396
+ "type": {
8397
+ "text": "any"
8398
+ }
8399
+ }
8400
+ ]
8401
+ },
8402
+ {
8403
+ "kind": "method",
8404
+ "name": "_handleOptionMouseEnter",
8405
+ "privacy": "private",
8406
+ "return": {
8407
+ "type": {
8408
+ "text": "void"
8409
+ }
8410
+ },
8411
+ "parameters": [
8412
+ {
8413
+ "name": "e",
8414
+ "type": {
8415
+ "text": "Event"
8416
+ }
8417
+ },
8418
+ {
8419
+ "name": "index",
8420
+ "type": {
8421
+ "text": "number"
8422
+ }
8423
+ }
8424
+ ]
8425
+ },
8426
+ {
8427
+ "kind": "method",
8428
+ "name": "_renderOption",
8429
+ "privacy": "private",
8430
+ "parameters": [
8431
+ {
8432
+ "name": "option",
8433
+ "type": {
8434
+ "text": "any"
8435
+ }
8436
+ },
8437
+ {
8438
+ "name": "index",
8439
+ "type": {
8440
+ "text": "number"
8441
+ }
8442
+ }
8443
+ ]
8444
+ }
8445
+ ],
8446
+ "events": [
8447
+ {
8448
+ "name": "select",
8449
+ "type": {
8450
+ "text": "CustomEvent"
8451
+ },
8452
+ "description": "Fired when an option is selected"
8453
+ },
8454
+ {
8455
+ "name": "change",
8456
+ "type": {
8457
+ "text": "Event"
8458
+ },
8459
+ "description": "Fired when the selected value changes"
8460
+ }
8461
+ ],
8462
+ "attributes": [
8463
+ {
8464
+ "name": "label",
8465
+ "type": {
8466
+ "text": "string"
8467
+ },
8468
+ "default": "''",
8469
+ "description": "Label text",
8470
+ "fieldName": "label"
8471
+ },
8472
+ {
8473
+ "name": "name",
8474
+ "type": {
8475
+ "text": "string"
8476
+ },
8477
+ "default": "''",
8478
+ "description": "Name for form submission",
8479
+ "fieldName": "name"
8480
+ },
8481
+ {
8482
+ "name": "value",
8483
+ "type": {
8484
+ "text": "string"
8485
+ },
8486
+ "default": "''",
8487
+ "description": "Currently selected value",
8488
+ "fieldName": "value"
8489
+ },
8490
+ {
8491
+ "name": "placeholder",
8492
+ "type": {
8493
+ "text": "string"
8494
+ },
8495
+ "default": "'Select an option'",
8496
+ "description": "Placeholder text when nothing is selected",
8497
+ "fieldName": "placeholder"
8498
+ },
8499
+ {
8500
+ "name": "disabled",
8501
+ "type": {
8502
+ "text": "boolean"
8503
+ },
8504
+ "default": "false",
8505
+ "description": "Whether the field is disabled",
8506
+ "fieldName": "disabled"
8507
+ },
8508
+ {
8509
+ "name": "readonly",
8510
+ "type": {
8511
+ "text": "boolean"
8512
+ },
8513
+ "default": "false",
8514
+ "description": "Whether the field is readonly",
8515
+ "fieldName": "readonly"
8516
+ },
8517
+ {
8518
+ "name": "required",
8519
+ "type": {
8520
+ "text": "boolean"
8521
+ },
8522
+ "default": "false",
8523
+ "description": "Whether the field is required",
8524
+ "fieldName": "required"
8525
+ },
8526
+ {
8527
+ "name": "hint",
8528
+ "type": {
8529
+ "text": "string"
8530
+ },
8531
+ "default": "''",
8532
+ "description": "Helper text displayed below the field",
8533
+ "fieldName": "hint"
8534
+ },
8535
+ {
8536
+ "name": "option-value",
8537
+ "type": {
8538
+ "text": "string|Function"
8539
+ },
8540
+ "default": "'value'",
8541
+ "description": "Field name or function to extract the value from an option",
8542
+ "fieldName": "optionValue"
8543
+ },
8544
+ {
8545
+ "name": "option-label",
8546
+ "type": {
8547
+ "text": "string|Function"
8548
+ },
8549
+ "default": "'label'",
8550
+ "description": "Field name or function to extract the label from an option",
8551
+ "fieldName": "optionLabel"
8552
+ },
8553
+ {
8554
+ "name": "options",
8555
+ "type": {
8556
+ "text": "any[]"
8557
+ },
8558
+ "default": "[]",
8559
+ "description": "Array of options",
8560
+ "fieldName": "options"
8561
+ }
8562
+ ],
8563
+ "superclass": {
8564
+ "name": "LitElement",
8565
+ "package": "lit"
8566
+ },
8567
+ "tagName": "kr-combo-box",
8568
+ "customElement": true
8569
+ }
8570
+ ],
8571
+ "exports": [
8572
+ {
8573
+ "kind": "js",
8574
+ "name": "KRComboBox",
8575
+ "declaration": {
8576
+ "name": "KRComboBox",
8577
+ "module": "src/form/combo-box/combo-box.ts"
8578
+ }
8579
+ },
8580
+ {
8581
+ "kind": "custom-element-definition",
8582
+ "name": "kr-combo-box",
8583
+ "declaration": {
8584
+ "name": "KRComboBox",
8585
+ "module": "src/form/combo-box/combo-box.ts"
8586
+ }
8587
+ }
8588
+ ]
8589
+ },
8590
+ {
8591
+ "kind": "javascript-module",
8592
+ "path": "src/form/detail-field/detail-field.ts",
8593
+ "declarations": [
8594
+ {
8595
+ "kind": "class",
8596
+ "description": "A read-only field component that displays a label and value.",
8597
+ "name": "KRDetailField",
8598
+ "members": [
8599
+ {
8600
+ "kind": "field",
8601
+ "name": "label",
8602
+ "type": {
8603
+ "text": "string"
8604
+ },
8605
+ "default": "''",
8606
+ "description": "The field label text",
8607
+ "attribute": "label"
8608
+ },
8609
+ {
8610
+ "kind": "field",
8611
+ "name": "value",
8612
+ "type": {
8613
+ "text": "string"
8614
+ },
8615
+ "default": "''",
8616
+ "description": "The value to display",
8617
+ "attribute": "value"
8618
+ }
8619
+ ],
8620
+ "attributes": [
8621
+ {
8622
+ "name": "label",
8623
+ "type": {
8624
+ "text": "string"
8625
+ },
8626
+ "default": "''",
8627
+ "description": "The field label text",
8628
+ "fieldName": "label"
8629
+ },
8630
+ {
8631
+ "name": "value",
8632
+ "type": {
8633
+ "text": "string"
8634
+ },
8635
+ "default": "''",
8636
+ "description": "The value to display",
8637
+ "fieldName": "value"
8638
+ }
8639
+ ],
8640
+ "superclass": {
8641
+ "name": "LitElement",
8642
+ "package": "lit"
8643
+ },
8644
+ "tagName": "kr-detail-field",
8645
+ "customElement": true
8646
+ }
8647
+ ],
8648
+ "exports": [
8649
+ {
8650
+ "kind": "js",
8651
+ "name": "KRDetailField",
8652
+ "declaration": {
8653
+ "name": "KRDetailField",
8654
+ "module": "src/form/detail-field/detail-field.ts"
8655
+ }
8656
+ },
8657
+ {
8658
+ "kind": "custom-element-definition",
8659
+ "name": "kr-detail-field",
8660
+ "declaration": {
8661
+ "name": "KRDetailField",
8662
+ "module": "src/form/detail-field/detail-field.ts"
8663
+ }
8664
+ }
8665
+ ]
8666
+ },
8667
+ {
8668
+ "kind": "javascript-module",
8669
+ "path": "src/form/radio-cards/radio-cards.ts",
8670
+ "declarations": [
8671
+ {
8672
+ "kind": "class",
8673
+ "description": "A card-style radio group for selecting between a small number of options.\nEach option renders as a bordered card with a radio indicator, label, and optional description.\n\nUses ElementInternals for form association, allowing the component\nto participate in form submission, validation, and reset.",
8674
+ "name": "KRRadioCards",
8675
+ "members": [
8676
+ {
8677
+ "kind": "field",
8678
+ "name": "formAssociated",
8679
+ "type": {
8680
+ "text": "boolean"
8681
+ },
8682
+ "static": true,
8683
+ "default": "true"
8684
+ },
8685
+ {
8686
+ "kind": "field",
8687
+ "name": "_internals",
8688
+ "type": {
8689
+ "text": "ElementInternals"
8690
+ },
8691
+ "privacy": "private"
8692
+ },
8693
+ {
8694
+ "kind": "field",
8695
+ "name": "_focusedIndex",
8696
+ "type": {
8697
+ "text": "number"
8698
+ },
8699
+ "privacy": "private",
8700
+ "default": "-1"
8701
+ },
8702
+ {
8703
+ "kind": "field",
8704
+ "name": "label",
8705
+ "type": {
8706
+ "text": "string"
8707
+ },
8708
+ "default": "''",
8709
+ "description": "The label text above the cards",
8710
+ "attribute": "label"
8711
+ },
8712
+ {
8713
+ "kind": "field",
8714
+ "name": "name",
8715
+ "type": {
8716
+ "text": "string"
8717
+ },
8718
+ "default": "''",
8719
+ "description": "The input name for form submission",
8720
+ "attribute": "name"
8721
+ },
8722
+ {
8723
+ "kind": "field",
8724
+ "name": "value",
8725
+ "type": {
8726
+ "text": "string"
8727
+ },
8728
+ "default": "''",
8729
+ "description": "The currently selected value",
8730
+ "attribute": "value"
8731
+ },
8732
+ {
8733
+ "kind": "field",
8734
+ "name": "options",
8735
+ "type": {
8736
+ "text": "KRRadioCardsOption[]"
8737
+ },
8738
+ "default": "[]",
8739
+ "description": "The card options to display"
8740
+ },
8741
+ {
8742
+ "kind": "field",
8743
+ "name": "disabled",
8744
+ "type": {
8745
+ "text": "boolean"
8746
+ },
8747
+ "default": "false",
8748
+ "description": "Whether the field is disabled",
8749
+ "attribute": "disabled"
8750
+ },
8751
+ {
8752
+ "kind": "field",
8753
+ "name": "required",
8754
+ "type": {
8755
+ "text": "boolean"
8756
+ },
8757
+ "default": "false",
8758
+ "description": "Whether the field is required",
8759
+ "attribute": "required"
8760
+ },
8761
+ {
8762
+ "kind": "field",
8763
+ "name": "hint",
8764
+ "type": {
8765
+ "text": "string"
8766
+ },
8767
+ "default": "''",
8768
+ "description": "Helper text shown below the cards",
8769
+ "attribute": "hint"
8770
+ },
8771
+ {
8772
+ "kind": "field",
8773
+ "name": "direction",
8774
+ "type": {
8775
+ "text": "'row' | 'column'"
8776
+ },
8777
+ "default": "'row'",
8778
+ "description": "Layout direction: 'row' or 'column'",
8779
+ "attribute": "direction"
8780
+ },
8781
+ {
8782
+ "kind": "field",
8783
+ "name": "_touched",
8784
+ "type": {
8785
+ "text": "boolean"
8786
+ },
8787
+ "privacy": "private",
8788
+ "default": "false"
8789
+ },
8790
+ {
8791
+ "kind": "field",
8792
+ "name": "form",
8793
+ "readonly": true
8794
+ },
8795
+ {
8796
+ "kind": "field",
8797
+ "name": "validity",
8798
+ "readonly": true
8799
+ },
8800
+ {
8801
+ "kind": "field",
8802
+ "name": "validationMessage",
8803
+ "readonly": true
8804
+ },
8805
+ {
8806
+ "kind": "field",
8807
+ "name": "willValidate",
8808
+ "readonly": true
7772
8809
  },
7773
8810
  {
7774
8811
  "kind": "method",
7775
- "name": "_handleTriggerBlur",
7776
- "privacy": "private",
7777
- "return": {
7778
- "type": {
7779
- "text": "void"
7780
- }
7781
- }
8812
+ "name": "checkValidity"
7782
8813
  },
7783
8814
  {
7784
8815
  "kind": "method",
7785
- "name": "_scrollToHighlighted",
7786
- "privacy": "private",
7787
- "return": {
7788
- "type": {
7789
- "text": "void"
7790
- }
7791
- }
8816
+ "name": "reportValidity"
7792
8817
  },
7793
8818
  {
7794
8819
  "kind": "method",
7795
- "name": "_getOptionValue",
7796
- "privacy": "private",
7797
- "return": {
7798
- "type": {
7799
- "text": "string"
7800
- }
7801
- },
7802
- "parameters": [
7803
- {
7804
- "name": "option",
7805
- "type": {
7806
- "text": "any"
7807
- }
7808
- }
7809
- ]
8820
+ "name": "formResetCallback"
7810
8821
  },
7811
8822
  {
7812
8823
  "kind": "method",
7813
- "name": "_getOptionLabel",
7814
- "privacy": "private",
7815
- "return": {
7816
- "type": {
7817
- "text": "string"
7818
- }
7819
- },
8824
+ "name": "formStateRestoreCallback",
7820
8825
  "parameters": [
7821
8826
  {
7822
- "name": "option",
8827
+ "name": "state",
7823
8828
  "type": {
7824
- "text": "any"
8829
+ "text": "string"
7825
8830
  }
7826
8831
  }
7827
8832
  ]
7828
8833
  },
8834
+ {
8835
+ "kind": "field",
8836
+ "name": "_handleInvalid",
8837
+ "privacy": "private"
8838
+ },
7829
8839
  {
7830
8840
  "kind": "method",
7831
- "name": "_resolveSelection",
7832
- "privacy": "private",
7833
- "return": {
7834
- "type": {
7835
- "text": "void"
7836
- }
7837
- }
8841
+ "name": "_updateValidity",
8842
+ "privacy": "private"
7838
8843
  },
7839
8844
  {
7840
8845
  "kind": "method",
7841
- "name": "_selectOption",
8846
+ "name": "_handleCardClick",
7842
8847
  "privacy": "private",
7843
- "return": {
7844
- "type": {
7845
- "text": "void"
7846
- }
7847
- },
7848
8848
  "parameters": [
8849
+ {
8850
+ "name": "e",
8851
+ "type": {
8852
+ "text": "Event"
8853
+ }
8854
+ },
7849
8855
  {
7850
8856
  "name": "option",
7851
8857
  "type": {
7852
- "text": "any"
8858
+ "text": "KRRadioCardsOption"
7853
8859
  }
7854
8860
  }
7855
8861
  ]
7856
8862
  },
7857
8863
  {
7858
8864
  "kind": "method",
7859
- "name": "_handleOptionMouseEnter",
8865
+ "name": "_handleKeyDown",
7860
8866
  "privacy": "private",
7861
- "return": {
7862
- "type": {
7863
- "text": "void"
7864
- }
7865
- },
7866
8867
  "parameters": [
7867
8868
  {
7868
8869
  "name": "e",
7869
8870
  "type": {
7870
- "text": "Event"
8871
+ "text": "KeyboardEvent"
7871
8872
  }
7872
8873
  },
7873
8874
  {
@@ -7880,17 +8881,22 @@
7880
8881
  },
7881
8882
  {
7882
8883
  "kind": "method",
7883
- "name": "_renderOption",
8884
+ "name": "_findNextEnabledIndex",
7884
8885
  "privacy": "private",
8886
+ "return": {
8887
+ "type": {
8888
+ "text": "number"
8889
+ }
8890
+ },
7885
8891
  "parameters": [
7886
8892
  {
7887
- "name": "option",
8893
+ "name": "current",
7888
8894
  "type": {
7889
- "text": "any"
8895
+ "text": "number"
7890
8896
  }
7891
8897
  },
7892
8898
  {
7893
- "name": "index",
8899
+ "name": "step",
7894
8900
  "type": {
7895
8901
  "text": "number"
7896
8902
  }
@@ -7899,13 +8905,6 @@
7899
8905
  }
7900
8906
  ],
7901
8907
  "events": [
7902
- {
7903
- "name": "select",
7904
- "type": {
7905
- "text": "CustomEvent"
7906
- },
7907
- "description": "Fired when an option is selected"
7908
- },
7909
8908
  {
7910
8909
  "name": "change",
7911
8910
  "type": {
@@ -7921,7 +8920,7 @@
7921
8920
  "text": "string"
7922
8921
  },
7923
8922
  "default": "''",
7924
- "description": "Label text",
8923
+ "description": "The label text above the cards",
7925
8924
  "fieldName": "label"
7926
8925
  },
7927
8926
  {
@@ -7930,7 +8929,7 @@
7930
8929
  "text": "string"
7931
8930
  },
7932
8931
  "default": "''",
7933
- "description": "Name for form submission",
8932
+ "description": "The input name for form submission",
7934
8933
  "fieldName": "name"
7935
8934
  },
7936
8935
  {
@@ -7939,18 +8938,9 @@
7939
8938
  "text": "string"
7940
8939
  },
7941
8940
  "default": "''",
7942
- "description": "Currently selected value",
8941
+ "description": "The currently selected value",
7943
8942
  "fieldName": "value"
7944
8943
  },
7945
- {
7946
- "name": "placeholder",
7947
- "type": {
7948
- "text": "string"
7949
- },
7950
- "default": "'Select an option'",
7951
- "description": "Placeholder text when nothing is selected",
7952
- "fieldName": "placeholder"
7953
- },
7954
8944
  {
7955
8945
  "name": "disabled",
7956
8946
  "type": {
@@ -7960,15 +8950,6 @@
7960
8950
  "description": "Whether the field is disabled",
7961
8951
  "fieldName": "disabled"
7962
8952
  },
7963
- {
7964
- "name": "readonly",
7965
- "type": {
7966
- "text": "boolean"
7967
- },
7968
- "default": "false",
7969
- "description": "Whether the field is readonly",
7970
- "fieldName": "readonly"
7971
- },
7972
8953
  {
7973
8954
  "name": "required",
7974
8955
  "type": {
@@ -7984,137 +8965,42 @@
7984
8965
  "text": "string"
7985
8966
  },
7986
8967
  "default": "''",
7987
- "description": "Helper text displayed below the field",
8968
+ "description": "Helper text shown below the cards",
7988
8969
  "fieldName": "hint"
7989
8970
  },
7990
8971
  {
7991
- "name": "option-value",
7992
- "type": {
7993
- "text": "string|Function"
7994
- },
7995
- "default": "'value'",
7996
- "description": "Field name or function to extract the value from an option",
7997
- "fieldName": "optionValue"
7998
- },
7999
- {
8000
- "name": "option-label",
8001
- "type": {
8002
- "text": "string|Function"
8003
- },
8004
- "default": "'label'",
8005
- "description": "Field name or function to extract the label from an option",
8006
- "fieldName": "optionLabel"
8007
- },
8008
- {
8009
- "name": "options",
8010
- "type": {
8011
- "text": "any[]"
8012
- },
8013
- "default": "[]",
8014
- "description": "Array of options",
8015
- "fieldName": "options"
8016
- }
8017
- ],
8018
- "superclass": {
8019
- "name": "LitElement",
8020
- "package": "lit"
8021
- },
8022
- "tagName": "kr-combo-box",
8023
- "customElement": true
8024
- }
8025
- ],
8026
- "exports": [
8027
- {
8028
- "kind": "js",
8029
- "name": "KRComboBox",
8030
- "declaration": {
8031
- "name": "KRComboBox",
8032
- "module": "src/form/combo-box/combo-box.ts"
8033
- }
8034
- },
8035
- {
8036
- "kind": "custom-element-definition",
8037
- "name": "kr-combo-box",
8038
- "declaration": {
8039
- "name": "KRComboBox",
8040
- "module": "src/form/combo-box/combo-box.ts"
8041
- }
8042
- }
8043
- ]
8044
- },
8045
- {
8046
- "kind": "javascript-module",
8047
- "path": "src/form/detail-field/detail-field.ts",
8048
- "declarations": [
8049
- {
8050
- "kind": "class",
8051
- "description": "A read-only field component that displays a label and value.",
8052
- "name": "KRDetailField",
8053
- "members": [
8054
- {
8055
- "kind": "field",
8056
- "name": "label",
8057
- "type": {
8058
- "text": "string"
8059
- },
8060
- "default": "''",
8061
- "description": "The field label text",
8062
- "attribute": "label"
8063
- },
8064
- {
8065
- "kind": "field",
8066
- "name": "value",
8067
- "type": {
8068
- "text": "string"
8069
- },
8070
- "default": "''",
8071
- "description": "The value to display",
8072
- "attribute": "value"
8073
- }
8074
- ],
8075
- "attributes": [
8076
- {
8077
- "name": "label",
8078
- "type": {
8079
- "text": "string"
8080
- },
8081
- "default": "''",
8082
- "description": "The field label text",
8083
- "fieldName": "label"
8084
- },
8085
- {
8086
- "name": "value",
8972
+ "name": "direction",
8087
8973
  "type": {
8088
- "text": "string"
8974
+ "text": "'row' | 'column'"
8089
8975
  },
8090
- "default": "''",
8091
- "description": "The value to display",
8092
- "fieldName": "value"
8976
+ "default": "'row'",
8977
+ "description": "Layout direction: 'row' or 'column'",
8978
+ "fieldName": "direction"
8093
8979
  }
8094
8980
  ],
8095
8981
  "superclass": {
8096
8982
  "name": "LitElement",
8097
8983
  "package": "lit"
8098
8984
  },
8099
- "tagName": "kr-detail-field",
8985
+ "tagName": "kr-radio-cards",
8100
8986
  "customElement": true
8101
8987
  }
8102
8988
  ],
8103
8989
  "exports": [
8104
8990
  {
8105
8991
  "kind": "js",
8106
- "name": "KRDetailField",
8992
+ "name": "KRRadioCards",
8107
8993
  "declaration": {
8108
- "name": "KRDetailField",
8109
- "module": "src/form/detail-field/detail-field.ts"
8994
+ "name": "KRRadioCards",
8995
+ "module": "src/form/radio-cards/radio-cards.ts"
8110
8996
  }
8111
8997
  },
8112
8998
  {
8113
8999
  "kind": "custom-element-definition",
8114
- "name": "kr-detail-field",
9000
+ "name": "kr-radio-cards",
8115
9001
  "declaration": {
8116
- "name": "KRDetailField",
8117
- "module": "src/form/detail-field/detail-field.ts"
9002
+ "name": "KRRadioCards",
9003
+ "module": "src/form/radio-cards/radio-cards.ts"
8118
9004
  }
8119
9005
  }
8120
9006
  ]