@nuralyui/select 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle.js +153 -84
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/react.js.map +1 -1
- package/select.component.d.ts +19 -1
- package/select.component.js +49 -14
- package/select.component.js.map +1 -1
- package/select.constant.d.ts +1 -1
- package/select.constant.js +1 -1
- package/select.constant.js.map +1 -1
- package/select.style.js +148 -79
- package/select.style.js.map +1 -1
- package/select.types.js.map +1 -1
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/select/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AAEH,yBAAyB;AACzB,cAAc,uBAAuB,CAAC;AAEtC,+BAA+B;AAC/B,cAAc,mBAAmB,CAAC;AAElC,oBAAoB;AACpB,cAAc,sBAAsB,CAAC;AAErC,uCAAuC;AACvC,cAAc,wBAAwB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2023 Nuraly, Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\n/**\n * Select Component Module\n * \n * Advanced select component with multiple selection modes, validation, \n * keyboard navigation, and accessibility features.\n */\n\n// === Main Component ===\nexport * from './select.component.js';\n\n// === Types and Interfaces ===\nexport * from './select.types.js';\n\n// === Constants ===\nexport * from './select.constant.js';\n\n// === Controllers (Advanced Usage) ===\nexport * from './controllers/index.js';\n\n// === Controller Interfaces (Type-Only Exports) ===\nexport type { \n SelectHost,\n SelectBaseController,\n SelectionController,\n KeyboardController,\n DropdownController,\n FocusController,\n ValidationController,\n ErrorHandler\n} from './interfaces/index.js';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuralyui/select",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "A comprehensive select component with advanced features including multi-selection, keyboard navigation, validation, and accessibility support.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
package/react.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../../src/components/select/react.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC;IACtC,OAAO,EAAE,WAAW;IACpB,YAAY,EAAE,iBAAiB;IAC/B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACN,kBAAkB;QAClB,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,SAAS;QACpB,OAAO,EAAE,OAAO;QAChB,MAAM,EAAE,MAAM;QAEd,yBAAyB;QACzB,cAAc,EAAE,eAAe;QAC/B,eAAe,EAAE,gBAAgB;QACjC,YAAY,EAAE,YAAY;QAC1B,aAAa,EAAE,cAAc;QAC7B,aAAa,EAAE,cAAc;KAC9B;CACF,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { createComponent } from '@lit-labs/react';\nimport { HySelectComponent } from './select.component.js';\n\n/**\n * React wrapper for the HySelectComponent\n * Provides React-compatible props and event handling\n */\nexport const HySelect = createComponent({\n tagName: 'nr-select',\n elementClass: HySelectComponent,\n react: React,\n events: {\n // Standard events\n onChange: 'change',\n onChanged: 'changed', // Legacy event for backward compatibility\n onFocus: 'focus',\n onBlur: 'blur',\n \n // Select-specific events\n onDropdownOpen: 'dropdown-open',\n onDropdownClose: 'dropdown-close',\n onValidation: 'validation',\n onSelectError: 'select-error',\n onSelectFocus: 'select-focus',\n },\n});\n\n// Export type for React props\nexport type HySelectProps = React.ComponentProps<typeof HySelect>;"]}
|
package/select.component.d.ts
CHANGED
|
@@ -51,6 +51,8 @@ declare const HySelectComponent_base: (new (...args: any[]) => import("@nuralyui
|
|
|
51
51
|
* @slot helper-text - Helper text below select
|
|
52
52
|
* @slot trigger - Custom trigger content (slot type only)
|
|
53
53
|
* @slot selected-display - Custom display for selected values (multi-select only, when use-custom-selected-display is true)
|
|
54
|
+
* @slot before-options - Content rendered before the options list (e.g., search, filters)
|
|
55
|
+
* @slot after-options - Content rendered after the options list (e.g., create button, form)
|
|
54
56
|
*
|
|
55
57
|
* @cssproperty --select-border-color - Border color
|
|
56
58
|
* @cssproperty --select-background - Background color
|
|
@@ -220,6 +222,22 @@ export declare class HySelectComponent extends HySelectComponent_base implements
|
|
|
220
222
|
* @param message - Custom validation message (empty string to clear)
|
|
221
223
|
*/
|
|
222
224
|
setCustomValidity(message: string): void;
|
|
225
|
+
/**
|
|
226
|
+
* Gets the current validation status
|
|
227
|
+
* @returns ValidationStatus object with isValid and message
|
|
228
|
+
*/
|
|
229
|
+
getValidationStatus(): {
|
|
230
|
+
isValid: boolean;
|
|
231
|
+
validationMessage: string;
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* Gets the current validation message
|
|
235
|
+
*/
|
|
236
|
+
get validationMessage(): string;
|
|
237
|
+
/**
|
|
238
|
+
* Clears validation state
|
|
239
|
+
*/
|
|
240
|
+
clearValidation(): void;
|
|
223
241
|
/**
|
|
224
242
|
* Searches for options with the given query
|
|
225
243
|
* @param query - Search query string
|
|
@@ -295,7 +313,7 @@ export declare class HySelectComponent extends HySelectComponent_base implements
|
|
|
295
313
|
/**
|
|
296
314
|
* Main render method that delegates to specific type renderers
|
|
297
315
|
*/
|
|
298
|
-
protected render(): import("lit").TemplateResult<1>;
|
|
316
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
299
317
|
/**
|
|
300
318
|
* Renders the default select appearance with full features
|
|
301
319
|
*/
|
package/select.component.js
CHANGED
|
@@ -65,6 +65,8 @@ import { SelectSelectionController, SelectKeyboardController, SelectDropdownCont
|
|
|
65
65
|
* @slot helper-text - Helper text below select
|
|
66
66
|
* @slot trigger - Custom trigger content (slot type only)
|
|
67
67
|
* @slot selected-display - Custom display for selected values (multi-select only, when use-custom-selected-display is true)
|
|
68
|
+
* @slot before-options - Content rendered before the options list (e.g., search, filters)
|
|
69
|
+
* @slot after-options - Content rendered after the options list (e.g., create button, form)
|
|
68
70
|
*
|
|
69
71
|
* @cssproperty --select-border-color - Border color
|
|
70
72
|
* @cssproperty --select-background - Background color
|
|
@@ -109,7 +111,7 @@ let HySelectComponent = class HySelectComponent extends NuralyUIBaseMixin(LitEle
|
|
|
109
111
|
/** Message to display when no options are available */
|
|
110
112
|
this.noOptionsMessage = 'No options available';
|
|
111
113
|
/** Icon to display with the no options message */
|
|
112
|
-
this.noOptionsIcon = '
|
|
114
|
+
this.noOptionsIcon = 'info';
|
|
113
115
|
/** Enable search/filter functionality */
|
|
114
116
|
this.searchable = false;
|
|
115
117
|
/** Enable clear button to clear all selections */
|
|
@@ -338,6 +340,30 @@ let HySelectComponent = class HySelectComponent extends NuralyUIBaseMixin(LitEle
|
|
|
338
340
|
setCustomValidity(message) {
|
|
339
341
|
this.validationController.setCustomValidity(message);
|
|
340
342
|
}
|
|
343
|
+
/**
|
|
344
|
+
* Gets the current validation status
|
|
345
|
+
* @returns ValidationStatus object with isValid and message
|
|
346
|
+
*/
|
|
347
|
+
getValidationStatus() {
|
|
348
|
+
const isValid = this.validationController.checkValidity();
|
|
349
|
+
return {
|
|
350
|
+
isValid,
|
|
351
|
+
validationMessage: this.validationController.validationMessage || ''
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Gets the current validation message
|
|
356
|
+
*/
|
|
357
|
+
get validationMessage() {
|
|
358
|
+
return this.validationController.validationMessage || '';
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Clears validation state
|
|
362
|
+
*/
|
|
363
|
+
clearValidation() {
|
|
364
|
+
this.validationController.setCustomValidity('');
|
|
365
|
+
this.status = SelectStatus.Default;
|
|
366
|
+
}
|
|
341
367
|
/**
|
|
342
368
|
* Searches for options with the given query
|
|
343
369
|
* @param query - Search query string
|
|
@@ -445,21 +471,24 @@ let HySelectComponent = class HySelectComponent extends NuralyUIBaseMixin(LitEle
|
|
|
445
471
|
${this.renderStatusIcon()}
|
|
446
472
|
${this.renderClearButton(selectedOptions)}
|
|
447
473
|
<nr-icon
|
|
448
|
-
name="
|
|
474
|
+
name="chevron-down"
|
|
449
475
|
size="${this.size}"
|
|
450
476
|
class="arrow-icon"
|
|
451
477
|
aria-hidden="true"
|
|
452
478
|
></nr-icon>
|
|
453
479
|
</div>
|
|
454
480
|
|
|
455
|
-
<div
|
|
481
|
+
<div
|
|
456
482
|
class="options"
|
|
457
483
|
role="listbox"
|
|
458
484
|
aria-multiselectable="${this.multiple}"
|
|
459
485
|
style=${this.maxHeight ? styleMap({ 'max-height': this.maxHeight }) : nothing}
|
|
486
|
+
@click=${(e) => e.stopPropagation()}
|
|
460
487
|
>
|
|
461
488
|
${this.searchable ? this.renderSearchInput() : nothing}
|
|
489
|
+
<slot name="before-options"></slot>
|
|
462
490
|
${this.renderSelectOptions()}
|
|
491
|
+
<slot name="after-options"></slot>
|
|
463
492
|
</div>
|
|
464
493
|
</div>
|
|
465
494
|
</div>
|
|
@@ -491,16 +520,19 @@ let HySelectComponent = class HySelectComponent extends NuralyUIBaseMixin(LitEle
|
|
|
491
520
|
@keydown=${this.handleKeyDown}
|
|
492
521
|
>
|
|
493
522
|
${selectedOptions.length > 0 ? selectedOptions[0].label : this.placeholder}
|
|
494
|
-
<nr-icon name="
|
|
523
|
+
<nr-icon name="chevron-down" class="arrow-icon"></nr-icon>
|
|
495
524
|
</button>
|
|
496
525
|
|
|
497
|
-
<div
|
|
498
|
-
class="options"
|
|
526
|
+
<div
|
|
527
|
+
class="options"
|
|
499
528
|
role="listbox"
|
|
500
529
|
style=${this.maxHeight ? styleMap({ 'max-height': this.maxHeight }) : nothing}
|
|
530
|
+
@click=${(e) => e.stopPropagation()}
|
|
501
531
|
>
|
|
502
532
|
${this.searchable ? this.renderSearchInput() : nothing}
|
|
533
|
+
<slot name="before-options"></slot>
|
|
503
534
|
${this.renderSelectOptions()}
|
|
535
|
+
<slot name="after-options"></slot>
|
|
504
536
|
</div>
|
|
505
537
|
`;
|
|
506
538
|
}
|
|
@@ -510,13 +542,16 @@ let HySelectComponent = class HySelectComponent extends NuralyUIBaseMixin(LitEle
|
|
|
510
542
|
renderSlot() {
|
|
511
543
|
return html `
|
|
512
544
|
<slot name="trigger" @click=${this.handleTriggerClick}></slot>
|
|
513
|
-
<div
|
|
514
|
-
class="options"
|
|
545
|
+
<div
|
|
546
|
+
class="options"
|
|
515
547
|
role="listbox"
|
|
516
548
|
style=${this.maxHeight ? styleMap({ 'max-height': this.maxHeight }) : nothing}
|
|
549
|
+
@click=${(e) => e.stopPropagation()}
|
|
517
550
|
>
|
|
518
551
|
${this.searchable ? this.renderSearchInput() : nothing}
|
|
552
|
+
<slot name="before-options"></slot>
|
|
519
553
|
${this.renderSelectOptions()}
|
|
554
|
+
<slot name="after-options"></slot>
|
|
520
555
|
</div>
|
|
521
556
|
`;
|
|
522
557
|
}
|
|
@@ -537,7 +572,7 @@ let HySelectComponent = class HySelectComponent extends NuralyUIBaseMixin(LitEle
|
|
|
537
572
|
<span class="tag">
|
|
538
573
|
<span class="tag-label">${option.label}</span>
|
|
539
574
|
<nr-icon
|
|
540
|
-
name="
|
|
575
|
+
name="x"
|
|
541
576
|
size="${this.size}"
|
|
542
577
|
class="tag-close"
|
|
543
578
|
@click=${(e) => this.handleTagRemove(e, option)}
|
|
@@ -556,11 +591,11 @@ let HySelectComponent = class HySelectComponent extends NuralyUIBaseMixin(LitEle
|
|
|
556
591
|
renderStatusIcon() {
|
|
557
592
|
switch (this.status) {
|
|
558
593
|
case SelectStatus.Warning:
|
|
559
|
-
return html `<nr-icon name="
|
|
594
|
+
return html `<nr-icon name="alert-triangle" size="${this.size}" class="status-icon warning"></nr-icon>`;
|
|
560
595
|
case SelectStatus.Error:
|
|
561
|
-
return html `<nr-icon name="
|
|
596
|
+
return html `<nr-icon name="alert-circle" size="${this.size}" class="status-icon error"></nr-icon>`;
|
|
562
597
|
case SelectStatus.Success:
|
|
563
|
-
return html `<nr-icon name="check
|
|
598
|
+
return html `<nr-icon name="circle-check" size="${this.size}" class="status-icon success"></nr-icon>`;
|
|
564
599
|
default:
|
|
565
600
|
return nothing;
|
|
566
601
|
}
|
|
@@ -574,7 +609,7 @@ let HySelectComponent = class HySelectComponent extends NuralyUIBaseMixin(LitEle
|
|
|
574
609
|
}
|
|
575
610
|
return html `
|
|
576
611
|
<nr-icon
|
|
577
|
-
name="
|
|
612
|
+
name="x"
|
|
578
613
|
size="${this.size}"
|
|
579
614
|
class="clear-icon"
|
|
580
615
|
@click=${this.handleClearAll}
|
|
@@ -640,7 +675,7 @@ let HySelectComponent = class HySelectComponent extends NuralyUIBaseMixin(LitEle
|
|
|
640
675
|
|
|
641
676
|
${option.state && option.message ? html `
|
|
642
677
|
<div class="option-message ${option.state}">
|
|
643
|
-
<nr-icon name="${option.state === 'error' ? '
|
|
678
|
+
<nr-icon name="${option.state === 'error' ? 'alert-circle' : 'alert-triangle'}" size="${this.size}"></nr-icon>
|
|
644
679
|
<span>${option.message}</span>
|
|
645
680
|
</div>
|
|
646
681
|
` : nothing}
|
package/select.component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.component.js","sourceRoot":"","sources":["../../../src/components/select/select.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE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AAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;wDACnB;AAItC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qDACf;AAI5B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDAChB;AAI3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC;4DACZ;AAIhD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sDACF;AAIzB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,6BAA6B,EAAE,CAAC;mEAC5B;AAI1C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;oDAC7B;AAIvB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDACpB;AAIvB;IADC,KAAK,CAAC,UAAU,CAAC;yDACW;AAI7B;IADC,KAAK,CAAC,UAAU,CAAC;kDACI;AAItB;IADC,KAAK,CAAC,eAAe,CAAC;sDACQ;AA/FpB,iBAAiB;IAD7B,aAAa,CAAC,WAAW,CAAC;GACd,iBAAiB,CAksB7B;SAlsBY,iBAAiB","sourcesContent":["/**\n * @license\n * Copyright 2023 Nuraly, Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\nimport { LitElement, html, nothing } from 'lit';\nimport { property, customElement, query } from 'lit/decorators.js';\nimport { styles } from './select.style.js';\nimport { map } from 'lit/directives/map.js';\nimport { choose } from 'lit/directives/choose.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { NuralyUIBaseMixin } from '@nuralyui/common/mixins';\n\n// Import types\nimport {\n SelectOption,\n SelectType,\n SelectSize,\n SelectStatus\n} from './select.types.js';\n\n// Import controllers\nimport {\n SelectSelectionController,\n SelectKeyboardController,\n SelectDropdownController,\n SelectFocusController,\n SelectValidationController,\n SelectSearchController,\n SelectEventController\n} from './controllers/index.js';\n\n// Import interfaces\nimport { SelectHost } from './interfaces/index.js';\n\n/**\n * Advanced select component with multiple selection modes, validation, and accessibility features.\n * \n * Supports single and multiple selection, custom rendering, validation states, keyboard navigation,\n * and various display types including default, inline, button, and slot-based configurations.\n * \n * @example\n * ```html\n * <!-- Basic select -->\n * <nr-select placeholder=\"Choose an option\">\n * <option value=\"1\">Option 1</option>\n * <option value=\"2\">Option 2</option>\n * </nr-select>\n * \n * <!-- Multiple selection -->\n * <nr-select multiple placeholder=\"Choose multiple options\"></nr-select>\n * \n * <!-- With validation -->\n * <nr-select required status=\"error\"></nr-select>\n * \n * <!-- Button style -->\n * <nr-select type=\"button\"></nr-select>\n * \n * <!-- With search functionality -->\n * <nr-select searchable search-placeholder=\"Search options...\"></nr-select>\n * \n * <!-- With clear button -->\n * <nr-select clearable></nr-select>\n * \n * <!-- Full width block select -->\n * <nr-select block></nr-select>\n * ```\n * \n * @fires nr-change - Selection changed\n * @fires nr-focus - Component focused \n * @fires nr-blur - Component blurred\n * @fires nr-dropdown-open - Dropdown opened\n * @fires nr-dropdown-close - Dropdown closed\n * @fires nr-validation - Validation state changed\n * \n * @slot label - Select label content\n * @slot helper-text - Helper text below select\n * @slot trigger - Custom trigger content (slot type only)\n * @slot selected-display - Custom display for selected values (multi-select only, when use-custom-selected-display is true)\n * \n * @cssproperty --select-border-color - Border color\n * @cssproperty --select-background - Background color\n * @cssproperty --select-text-color - Text color\n * @cssproperty --select-focus-color - Focus indicator color\n * @cssproperty --select-dropdown-shadow - Dropdown shadow\n * @cssproperty --select-dropdown-max-height - Maximum height of dropdown\n * @cssproperty --select-no-options-color - No options message text color\n * @cssproperty --select-no-options-icon-color - No options icon color\n * @cssproperty --select-no-options-padding - Padding for no options message\n * @cssproperty --select-no-options-gap - Gap between icon and text\n * @cssproperty --select-search-border - Search input border\n * @cssproperty --select-search-background - Search input background\n * @cssproperty --select-search-padding - Search input padding\n */\n@customElement('nr-select')\nexport class HySelectComponent extends NuralyUIBaseMixin(LitElement) implements SelectHost {\n static override styles = styles;\n \n override requiredComponents = [ \"nr-input\", \"nr-icon\" ];\n\n /** Array of options to display in the select dropdown */\n @property({ type: Array }) \n options: SelectOption[] = [];\n \n /** Placeholder text shown when no option is selected */\n @property({ type: String }) \n placeholder: string = 'Select an option';\n \n /** Disables the select component */\n @property({ type: Boolean, reflect: true }) \n disabled: boolean = false;\n \n /** Select display type (default, inline, button, slot) */\n @property({ type: String, reflect: true }) \n type: SelectType = SelectType.Default;\n \n /** Enables multiple option selection */\n @property({ type: Boolean, attribute: 'multiple' }) \n multiple: boolean = false;\n \n /** Controls dropdown visibility */\n @property({ type: Boolean, reflect: true }) \n show: boolean = false;\n \n /** Validation status (default, warning, error, success) */\n @property({ type: String, reflect: true }) \n status: SelectStatus = SelectStatus.Default;\n \n /** Select size (small, medium, large) */\n @property({ type: String, reflect: true }) \n size: SelectSize = SelectSize.Medium;\n \n /** Makes the select required for form validation */\n @property({ type: Boolean, reflect: true }) \n required: boolean = false;\n \n /** Form field name */\n @property({ type: String }) \n name: string = '';\n \n /** Current selected value(s) */\n @property() \n value: string | string[] = '';\n \n /** Message to display when no options are available */\n @property({ type: String, attribute: 'no-options-message' })\n noOptionsMessage: string = 'No options available';\n \n /** Icon to display with the no options message */\n @property({ type: String, attribute: 'no-options-icon' })\n noOptionsIcon: string = 'circle-info';\n \n /** Enable search/filter functionality */\n @property({ type: Boolean, reflect: true })\n searchable: boolean = false;\n \n /** Enable clear button to clear all selections */\n @property({ type: Boolean, reflect: true })\n clearable: boolean = false;\n \n /** Placeholder text for the search input */\n @property({ type: String, attribute: 'search-placeholder' })\n searchPlaceholder: string = 'Search options...';\n \n /** Current search query */\n @property({ type: String })\n searchQuery: string = '';\n\n /** Enable custom selected display slot */\n @property({ type: Boolean, attribute: 'use-custom-selected-display' })\n useCustomSelectedDisplay: boolean = false;\n\n /** Maximum height of the options dropdown */\n @property({ type: String, attribute: 'max-height' })\n maxHeight: string = '';\n\n /** Makes select full width */\n @property({ type: Boolean, reflect: true })\n block: boolean = false;\n\n /** Options dropdown container element */\n @query('.options') \n optionsElement!: HTMLElement;\n \n /** Main wrapper element */\n @query('.wrapper') \n wrapper!: HTMLElement;\n \n /** Search input element */\n @query('.search-input')\n searchInput?: HTMLInputElement;\n\n /** Handles option selection logic */\n private selectionController = new SelectSelectionController(this);\n \n /** Manages dropdown visibility and positioning */\n private dropdownController = new SelectDropdownController(this);\n \n /** Handles keyboard navigation */\n private keyboardController = new SelectKeyboardController(this, this.selectionController, this.dropdownController);\n \n /** Manages focus states */\n private focusController = new SelectFocusController(this);\n \n /** Handles validation logic */\n private validationController = new SelectValidationController(this, this.selectionController);\n \n /** Handles search/filter functionality */\n private searchController = new SelectSearchController(this);\n \n /** Handles all event management */\n private eventController = new SelectEventController(this);\n\n /**\n * Component connected to DOM - initialize base functionality\n */\n override connectedCallback(): void {\n super.connectedCallback();\n }\n\n /**\n * Component disconnected from DOM - cleanup event listeners\n */\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n }\n\n /**\n * Called before update to handle property changes\n */\n override willUpdate(changedProperties: Map<string, any>): void {\n super.willUpdate(changedProperties);\n \n // If options or value changed, reinitialize selection\n if ((changedProperties.has('options') || changedProperties.has('value')) && \n this.options.length > 0 && \n this.value && \n (Array.isArray(this.value) ? this.value.length > 0 : this.value !== '')) {\n // Reset initialization flag to allow reinit\n (this.selectionController as any)._initialized = false;\n this.selectionController.initializeFromValue();\n }\n }\n\n /**\n * First render complete - setup controllers and initialize state\n */\n override firstUpdated(changedProperties: any): void {\n super.firstUpdated(changedProperties);\n \n // Configure dropdown controller with DOM element references\n if (this.optionsElement && this.wrapper) {\n this.dropdownController.setElements(this.optionsElement, this.wrapper);\n } else {\n // Retry element setup if DOM isn't ready yet\n setTimeout(() => {\n if (this.optionsElement && this.wrapper) {\n this.dropdownController.setElements(this.optionsElement, this.wrapper);\n }\n }, 100);\n }\n\n // Apply default selection if specified\n if (this.value && (Array.isArray(this.value) ? this.value.length > 0 : this.value !== '')) {\n this.selectionController.initializeFromValue();\n }\n }\n\n // === Public API Methods ===\n\n /**\n * Gets the currently selected options\n * @returns Array of selected options\n */\n get selectedOptions(): SelectOption[] {\n return this.selectionController.getSelectedOptions();\n }\n\n /**\n * Gets the first selected option (for single selection mode)\n * @returns Selected option or undefined if none selected\n */\n get selectedOption(): SelectOption | undefined {\n return this.selectionController.getSelectedOption();\n }\n\n /**\n * Selects an option programmatically\n * @param option - The option to select\n */\n selectOption(option: SelectOption): void {\n this.selectionController.selectOption(option);\n }\n\n /**\n * Unselects an option programmatically\n * @param option - The option to unselect\n */\n unselectOption(option: SelectOption): void {\n this.selectionController.unselectOption(option);\n }\n\n /**\n * Toggles an option's selection state\n * @param option - The option to toggle\n */\n toggleOption(option: SelectOption): void {\n this.selectionController.toggleOption(option);\n }\n\n /**\n * Clears all current selections\n */\n clearSelection(): void {\n this.selectionController.clearSelection();\n }\n\n /**\n * Checks if a specific option is currently selected\n * @param option - The option to check\n * @returns True if the option is selected\n */\n isOptionSelected(option: SelectOption): boolean {\n return this.selectionController.isOptionSelected(option);\n }\n\n /**\n * Toggles the dropdown visibility\n */\n toggleDropdown(): void {\n this.dropdownController.toggle();\n }\n\n /**\n * Opens the dropdown programmatically\n */\n openDropdown(): void {\n this.dropdownController.open();\n }\n\n /**\n * Closes the dropdown programmatically\n */\n closeDropdown(): void {\n this.dropdownController.close();\n }\n\n /**\n * Focuses the select component\n */\n override focus(): void {\n this.focusController.focus();\n }\n\n /**\n * Removes focus from the select component\n */\n override blur(): void {\n this.focusController.blur();\n }\n\n /**\n * Validates the current selection according to component rules\n * @returns True if valid, false otherwise\n */\n validate(): boolean {\n return this.validationController.validate();\n }\n\n /**\n * Checks if the current selection is valid without showing validation UI\n * @returns True if valid, false otherwise\n */\n checkValidity(): boolean {\n return this.validationController.checkValidity();\n }\n\n /**\n * Reports the current validation state and shows validation UI if invalid\n * @returns True if valid, false otherwise\n */\n reportValidity(): boolean {\n return this.validationController.reportValidity();\n }\n\n /**\n * Sets a custom validation message\n * @param message - Custom validation message (empty string to clear)\n */\n setCustomValidity(message: string): void {\n this.validationController.setCustomValidity(message);\n }\n\n /**\n * Searches for options with the given query\n * @param query - Search query string\n */\n searchOptions(query: string): void {\n this.searchController.search(query);\n }\n\n /**\n * Clears the current search query\n */\n clearSearch(): void {\n this.searchController.clearSearch();\n }\n\n /**\n * Gets the filtered options based on current search\n * @returns Array of filtered options\n */\n getSearchFilteredOptions(): SelectOption[] {\n return this.searchController.getFilteredOptions(this.options);\n }\n\n /**\n * Gets the current search query\n * @returns Current search query string\n */\n getCurrentSearchQuery(): string {\n return this.searchController.searchQuery;\n }\n\n /**\n * Gets the currently selected options\n * @returns Array of selected option objects\n */\n getSelectedOptions(): SelectOption[] {\n return this.selectedOptions;\n }\n\n /**\n * Manually trigger setup of global event listeners\n */\n setupGlobalEventListeners(): void {\n this.eventController.setupEventListeners();\n }\n\n /**\n * Manually trigger removal of global event listeners\n */\n removeGlobalEventListeners(): void {\n this.eventController.removeEventListeners();\n }\n\n \n /**\n * Handles clicks on the select trigger element\n */\n private handleTriggerClick = (event: Event): void => {\n this.eventController.handleTriggerClick(event);\n };\n\n /**\n * Handles clicks on individual options\n */\n private handleOptionClick = (event: Event, option: SelectOption): void => {\n this.eventController.handleOptionClick(event, option);\n };\n\n /**\n * Handles removal of selected tags in multiple selection mode\n */\n private handleTagRemove = (event: Event, option: SelectOption): void => {\n this.eventController.handleTagRemove(event, option);\n };\n\n /**\n * Handles the clear all selections button\n */\n private handleClearAll = (event: Event): void => {\n this.eventController.handleClearAll(event);\n };\n\n /**\n * Handles keyboard navigation and interactions\n */\n private handleKeyDown = (event: KeyboardEvent): void => {\n this.eventController.handleKeyDown(event);\n };\n\n /**\n * Handles focus events\n */\n private handleFocus = (): void => {\n this.eventController.handleFocus();\n };\n\n /**\n * Handles blur events\n */\n private handleBlur = (): void => {\n this.eventController.handleBlur();\n };\n\n /**\n * Filters options based on search query\n */\n private getFilteredOptions(): SelectOption[] {\n return this.searchController.getFilteredOptions(this.options);\n };\n\n /**\n * Sets up global event listeners (called when dropdown opens)\n */\n public setupEventListeners(): void {\n this.eventController.setupEventListeners();\n }\n\n /**\n * Removes global event listeners (called on disconnect or dropdown close)\n */\n public removeEventListeners(): void {\n this.eventController.removeEventListeners();\n }\n \n /**\n * Main render method that delegates to specific type renderers\n */\n protected override render() {\n return html`${choose(this.type, [\n [SelectType.Default, () => this.renderDefault()],\n [SelectType.Inline, () => this.renderInline()],\n [SelectType.Button, () => this.renderButton()],\n [SelectType.Slot, () => this.renderSlot()],\n ])}`;\n }\n /**\n * Renders the default select appearance with full features\n */\n private renderDefault() {\n const selectedOptions = this.selectedOptions;\n const validationClasses = this.validationController.getValidationClasses();\n \n return html`\n <slot name=\"label\"></slot>\n <div \n class=\"${classMap({\n 'wrapper': true,\n ...validationClasses\n })}\"\n data-theme=\"${this.currentTheme}\"\n tabindex=\"0\"\n role=\"combobox\"\n aria-expanded=\"${this.show}\"\n aria-haspopup=\"listbox\"\n aria-labelledby=\"select-label\"\n\n @click=${this.handleTriggerClick}\n @keydown=${this.handleKeyDown}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n >\n <div class=\"select\">\n <div class=\"select-trigger\">\n ${this.renderSelectedContent(selectedOptions)}\n </div>\n \n <div class=\"icons-container\">\n ${this.renderStatusIcon()}\n ${this.renderClearButton(selectedOptions)}\n <nr-icon \n name=\"angle-down\" \n size=\"${this.size}\"\n class=\"arrow-icon\"\n aria-hidden=\"true\"\n ></nr-icon>\n </div>\n \n <div \n class=\"options\"\n role=\"listbox\"\n aria-multiselectable=\"${this.multiple}\"\n style=${this.maxHeight ? styleMap({ 'max-height': this.maxHeight }) : nothing}\n >\n ${this.searchable ? this.renderSearchInput() : nothing}\n ${this.renderSelectOptions()}\n </div>\n </div>\n </div>\n \n ${this.renderValidationMessage()}\n <slot name=\"helper-text\"></slot>\n `;\n }\n\n /**\n * Renders inline select with integrated label and helper text\n */\n private renderInline() {\n return html`\n <slot name=\"label\"></slot>\n ${this.renderDefault()}\n <slot name=\"helper-text\"></slot>\n `;\n }\n\n /**\n * Renders select as a button-style component\n */\n private renderButton() {\n const selectedOptions = this.selectedOptions;\n return html`\n <button\n class=\"select-button\"\n ?disabled=${this.disabled}\n @click=${this.handleTriggerClick}\n @keydown=${this.handleKeyDown}\n >\n ${selectedOptions.length > 0 ? selectedOptions[0].label : this.placeholder}\n <nr-icon name=\"angle-down\" class=\"arrow-icon\"></nr-icon>\n </button>\n \n <div \n class=\"options\" \n role=\"listbox\"\n style=${this.maxHeight ? styleMap({ 'max-height': this.maxHeight }) : nothing}\n >\n ${this.searchable ? this.renderSearchInput() : nothing}\n ${this.renderSelectOptions()}\n </div>\n `;\n }\n\n /**\n * Renders select with custom trigger content via slots\n */\n private renderSlot() {\n return html`\n <slot name=\"trigger\" @click=${this.handleTriggerClick}></slot>\n <div \n class=\"options\" \n role=\"listbox\"\n style=${this.maxHeight ? styleMap({ 'max-height': this.maxHeight }) : nothing}\n >\n ${this.searchable ? this.renderSearchInput() : nothing}\n ${this.renderSelectOptions()}\n </div>\n `;\n }\n\n /**\n * Renders the selected content in the trigger area\n */\n private renderSelectedContent(selectedOptions: SelectOption[]) {\n if (selectedOptions.length === 0) {\n return html`<span class=\"placeholder\" aria-hidden=\"true\">${this.placeholder}</span>`;\n }\n\n if (this.multiple) {\n // Check if custom display slot should be used\n if (this.useCustomSelectedDisplay) {\n return html`<slot name=\"selected-display\" .selectedOptions=${selectedOptions}></slot>`;\n }\n \n // Default behavior: render tags\n return map(selectedOptions, (option) => html`\n <span class=\"tag\">\n <span class=\"tag-label\">${option.label}</span>\n <nr-icon \n name=\"remove\"\n size=\"${this.size}\"\n class=\"tag-close\"\n @click=${(e: Event) => this.handleTagRemove(e, option)}\n aria-label=\"Remove ${option.label}\"\n ></nr-icon>\n </span>\n `);\n } else {\n return html`${selectedOptions[0].label}`;\n }\n }\n\n /**\n * Renders status/validation icons based on current status\n */\n private renderStatusIcon() {\n switch (this.status) {\n case SelectStatus.Warning:\n return html`<nr-icon name=\"warning\" size=\"${this.size}\" class=\"status-icon warning\"></nr-icon>`;\n case SelectStatus.Error:\n return html`<nr-icon name=\"exclamation-circle\" size=\"${this.size}\" class=\"status-icon error\"></nr-icon>`;\n case SelectStatus.Success:\n return html`<nr-icon name=\"check-circle\" size=\"${this.size}\" class=\"status-icon success\"></nr-icon>`;\n default:\n return nothing;\n }\n }\n\n /**\n * Renders the clear all selections button when applicable\n */\n private renderClearButton(selectedOptions: SelectOption[]) {\n if (!this.clearable || selectedOptions.length === 0 || this.disabled) {\n return nothing;\n }\n\n return html`\n <nr-icon\n name=\"remove\"\n size=\"${this.size}\"\n class=\"clear-icon\"\n @click=${this.handleClearAll}\n aria-label=\"Clear selection\"\n tabindex=\"-1\"\n ></nr-icon>\n `;\n }\n\n /**\n * Renders all available options in the dropdown\n */\n private renderSelectOptions() {\n const filteredOptions = this.getFilteredOptions();\n \n // Show \"no options\" message when no options are available (original array empty)\n if (!this.options || this.options.length === 0) {\n return html`\n <div class=\"no-options\" role=\"option\" aria-disabled=\"true\">\n <div class=\"no-options-content\">\n <nr-icon \n name=\"${this.noOptionsIcon}\" \n class=\"no-options-icon\"\n aria-hidden=\"true\">\n </nr-icon>\n <span class=\"no-options-text\">${this.noOptionsMessage}</span>\n </div>\n </div>\n `;\n }\n \n // Show \"no results\" message when search returns no results\n if (this.searchController.hasNoResults(this.options)) {\n return this.searchController.renderNoResults();\n }\n \n // Cache the focused option to avoid multiple controller accesses\n const focusedOption = this.keyboardController.focusedOption;\n \n return map(filteredOptions, (option) => {\n const isSelected = this.isOptionSelected(option);\n const isFocused = focusedOption && focusedOption.value === option.value;\n \n return html`\n <div\n class=\"${classMap({\n 'option': true,\n 'selected': isSelected,\n 'focused': isFocused,\n 'disabled': Boolean(option.disabled)\n })}\"\n role=\"option\"\n aria-selected=\"${isSelected}\"\n aria-disabled=\"${Boolean(option.disabled)}\"\n data-value=\"${option.value}\"\n @click=${(e: Event) => this.handleOptionClick(e, option)}\n style=${styleMap(option.style ? { style: option.style } : {})}\n title=\"${option.title || ''}\"\n >\n <div class=\"option-content\">\n ${option.icon ? html`<nr-icon name=\"${option.icon}\" size=\"${this.size}\" class=\"option-icon\"></nr-icon>` : nothing}\n <div class=\"option-text\">\n ${option.htmlContent ? html`<div .innerHTML=${option.htmlContent}></div>` : option.label}\n ${option.description ? html`<div class=\"option-description\">${option.description}</div>` : nothing}\n </div>\n </div>\n \n ${isSelected ? html`<nr-icon name=\"check\" size=\"${this.size}\" class=\"check-icon\" aria-hidden=\"true\"></nr-icon>` : nothing}\n \n ${option.state && option.message ? html`\n <div class=\"option-message ${option.state}\">\n <nr-icon name=\"${option.state === 'error' ? 'exclamation-circle' : 'warning'}\" size=\"${this.size}\"></nr-icon>\n <span>${option.message}</span>\n </div>\n ` : nothing}\n </div>\n `;\n });\n }\n\n /**\n * Renders the search input when searchable is enabled\n */\n private renderSearchInput() {\n return this.searchController.renderSearchInput();\n }\n\n /**\n * Renders validation message when present\n */\n private renderValidationMessage() {\n const validationMessage = this.validationController.validationMessage;\n if (!validationMessage) return nothing;\n\n return html`\n <div class=\"validation-message ${this.status}\" id=\"validation-message\">\n ${validationMessage}\n </div>\n `;\n }\n}"]}
|
|
1
|
+
{"version":3,"file":"select.component.js","sourceRoot":"","sources":["../../../../src/components/select/select.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AA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AAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDACpB;AAIvB;IADC,KAAK,CAAC,UAAU,CAAC;yDACW;AAI7B;IADC,KAAK,CAAC,UAAU,CAAC;kDACI;AAItB;IADC,KAAK,CAAC,eAAe,CAAC;sDACQ;AA/FpB,iBAAiB;IAD7B,aAAa,CAAC,WAAW,CAAC;GACd,iBAAiB,CAsuB7B;SAtuBY,iBAAiB","sourcesContent":["/**\n * @license\n * Copyright 2023 Nuraly, Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\nimport { LitElement, html, nothing } from 'lit';\nimport { property, customElement, query } from 'lit/decorators.js';\nimport { styles } from './select.style.js';\nimport { map } from 'lit/directives/map.js';\nimport { choose } from 'lit/directives/choose.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { NuralyUIBaseMixin } from '@nuralyui/common/mixins';\n\n// Import types\nimport {\n SelectOption,\n SelectType,\n SelectSize,\n SelectStatus\n} from './select.types.js';\n\n// Import controllers\nimport {\n SelectSelectionController,\n SelectKeyboardController,\n SelectDropdownController,\n SelectFocusController,\n SelectValidationController,\n SelectSearchController,\n SelectEventController\n} from './controllers/index.js';\n\n// Import interfaces\nimport { SelectHost } from './interfaces/index.js';\n\n/**\n * Advanced select component with multiple selection modes, validation, and accessibility features.\n * \n * Supports single and multiple selection, custom rendering, validation states, keyboard navigation,\n * and various display types including default, inline, button, and slot-based configurations.\n * \n * @example\n * ```html\n * <!-- Basic select -->\n * <nr-select placeholder=\"Choose an option\">\n * <option value=\"1\">Option 1</option>\n * <option value=\"2\">Option 2</option>\n * </nr-select>\n * \n * <!-- Multiple selection -->\n * <nr-select multiple placeholder=\"Choose multiple options\"></nr-select>\n * \n * <!-- With validation -->\n * <nr-select required status=\"error\"></nr-select>\n * \n * <!-- Button style -->\n * <nr-select type=\"button\"></nr-select>\n * \n * <!-- With search functionality -->\n * <nr-select searchable search-placeholder=\"Search options...\"></nr-select>\n * \n * <!-- With clear button -->\n * <nr-select clearable></nr-select>\n * \n * <!-- Full width block select -->\n * <nr-select block></nr-select>\n * ```\n * \n * @fires nr-change - Selection changed\n * @fires nr-focus - Component focused \n * @fires nr-blur - Component blurred\n * @fires nr-dropdown-open - Dropdown opened\n * @fires nr-dropdown-close - Dropdown closed\n * @fires nr-validation - Validation state changed\n * \n * @slot label - Select label content\n * @slot helper-text - Helper text below select\n * @slot trigger - Custom trigger content (slot type only)\n * @slot selected-display - Custom display for selected values (multi-select only, when use-custom-selected-display is true)\n * @slot before-options - Content rendered before the options list (e.g., search, filters)\n * @slot after-options - Content rendered after the options list (e.g., create button, form)\n * \n * @cssproperty --select-border-color - Border color\n * @cssproperty --select-background - Background color\n * @cssproperty --select-text-color - Text color\n * @cssproperty --select-focus-color - Focus indicator color\n * @cssproperty --select-dropdown-shadow - Dropdown shadow\n * @cssproperty --select-dropdown-max-height - Maximum height of dropdown\n * @cssproperty --select-no-options-color - No options message text color\n * @cssproperty --select-no-options-icon-color - No options icon color\n * @cssproperty --select-no-options-padding - Padding for no options message\n * @cssproperty --select-no-options-gap - Gap between icon and text\n * @cssproperty --select-search-border - Search input border\n * @cssproperty --select-search-background - Search input background\n * @cssproperty --select-search-padding - Search input padding\n */\n@customElement('nr-select')\nexport class HySelectComponent extends NuralyUIBaseMixin(LitElement) implements SelectHost {\n static override styles = styles;\n \n override requiredComponents = [ \"nr-input\", \"nr-icon\" ];\n\n /** Array of options to display in the select dropdown */\n @property({ type: Array }) \n options: SelectOption[] = [];\n \n /** Placeholder text shown when no option is selected */\n @property({ type: String }) \n placeholder: string = 'Select an option';\n \n /** Disables the select component */\n @property({ type: Boolean, reflect: true }) \n disabled: boolean = false;\n \n /** Select display type (default, inline, button, slot) */\n @property({ type: String, reflect: true }) \n type: SelectType = SelectType.Default;\n \n /** Enables multiple option selection */\n @property({ type: Boolean, attribute: 'multiple' }) \n multiple: boolean = false;\n \n /** Controls dropdown visibility */\n @property({ type: Boolean, reflect: true }) \n show: boolean = false;\n \n /** Validation status (default, warning, error, success) */\n @property({ type: String, reflect: true }) \n status: SelectStatus = SelectStatus.Default;\n \n /** Select size (small, medium, large) */\n @property({ type: String, reflect: true }) \n size: SelectSize = SelectSize.Medium;\n \n /** Makes the select required for form validation */\n @property({ type: Boolean, reflect: true }) \n required: boolean = false;\n \n /** Form field name */\n @property({ type: String }) \n name: string = '';\n \n /** Current selected value(s) */\n @property() \n value: string | string[] = '';\n \n /** Message to display when no options are available */\n @property({ type: String, attribute: 'no-options-message' })\n noOptionsMessage: string = 'No options available';\n \n /** Icon to display with the no options message */\n @property({ type: String, attribute: 'no-options-icon' })\n noOptionsIcon: string = 'info';\n \n /** Enable search/filter functionality */\n @property({ type: Boolean, reflect: true })\n searchable: boolean = false;\n \n /** Enable clear button to clear all selections */\n @property({ type: Boolean, reflect: true })\n clearable: boolean = false;\n \n /** Placeholder text for the search input */\n @property({ type: String, attribute: 'search-placeholder' })\n searchPlaceholder: string = 'Search options...';\n \n /** Current search query */\n @property({ type: String })\n searchQuery: string = '';\n\n /** Enable custom selected display slot */\n @property({ type: Boolean, attribute: 'use-custom-selected-display' })\n useCustomSelectedDisplay: boolean = false;\n\n /** Maximum height of the options dropdown */\n @property({ type: String, attribute: 'max-height' })\n maxHeight: string = '';\n\n /** Makes select full width */\n @property({ type: Boolean, reflect: true })\n block: boolean = false;\n\n /** Options dropdown container element */\n @query('.options') \n optionsElement!: HTMLElement;\n \n /** Main wrapper element */\n @query('.wrapper') \n wrapper!: HTMLElement;\n \n /** Search input element */\n @query('.search-input')\n searchInput?: HTMLInputElement;\n\n /** Handles option selection logic */\n private selectionController = new SelectSelectionController(this);\n \n /** Manages dropdown visibility and positioning */\n private dropdownController = new SelectDropdownController(this);\n \n /** Handles keyboard navigation */\n private keyboardController = new SelectKeyboardController(this, this.selectionController, this.dropdownController);\n \n /** Manages focus states */\n private focusController = new SelectFocusController(this);\n \n /** Handles validation logic */\n private validationController = new SelectValidationController(this, this.selectionController);\n \n /** Handles search/filter functionality */\n private searchController = new SelectSearchController(this);\n \n /** Handles all event management */\n private eventController = new SelectEventController(this);\n\n /**\n * Component connected to DOM - initialize base functionality\n */\n override connectedCallback(): void {\n super.connectedCallback();\n }\n\n /**\n * Component disconnected from DOM - cleanup event listeners\n */\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n }\n\n /**\n * Called before update to handle property changes\n */\n override willUpdate(changedProperties: Map<string, any>): void {\n super.willUpdate(changedProperties);\n \n // If options or value changed, reinitialize selection\n if ((changedProperties.has('options') || changedProperties.has('value')) && \n this.options.length > 0 && \n this.value && \n (Array.isArray(this.value) ? this.value.length > 0 : this.value !== '')) {\n // Reset initialization flag to allow reinit\n (this.selectionController as any)._initialized = false;\n this.selectionController.initializeFromValue();\n }\n }\n\n /**\n * First render complete - setup controllers and initialize state\n */\n override firstUpdated(changedProperties: any): void {\n super.firstUpdated(changedProperties);\n \n // Configure dropdown controller with DOM element references\n if (this.optionsElement && this.wrapper) {\n this.dropdownController.setElements(this.optionsElement, this.wrapper);\n } else {\n // Retry element setup if DOM isn't ready yet\n setTimeout(() => {\n if (this.optionsElement && this.wrapper) {\n this.dropdownController.setElements(this.optionsElement, this.wrapper);\n }\n }, 100);\n }\n\n // Apply default selection if specified\n if (this.value && (Array.isArray(this.value) ? this.value.length > 0 : this.value !== '')) {\n this.selectionController.initializeFromValue();\n }\n }\n\n // === Public API Methods ===\n\n /**\n * Gets the currently selected options\n * @returns Array of selected options\n */\n get selectedOptions(): SelectOption[] {\n return this.selectionController.getSelectedOptions();\n }\n\n /**\n * Gets the first selected option (for single selection mode)\n * @returns Selected option or undefined if none selected\n */\n get selectedOption(): SelectOption | undefined {\n return this.selectionController.getSelectedOption();\n }\n\n /**\n * Selects an option programmatically\n * @param option - The option to select\n */\n selectOption(option: SelectOption): void {\n this.selectionController.selectOption(option);\n }\n\n /**\n * Unselects an option programmatically\n * @param option - The option to unselect\n */\n unselectOption(option: SelectOption): void {\n this.selectionController.unselectOption(option);\n }\n\n /**\n * Toggles an option's selection state\n * @param option - The option to toggle\n */\n toggleOption(option: SelectOption): void {\n this.selectionController.toggleOption(option);\n }\n\n /**\n * Clears all current selections\n */\n clearSelection(): void {\n this.selectionController.clearSelection();\n }\n\n /**\n * Checks if a specific option is currently selected\n * @param option - The option to check\n * @returns True if the option is selected\n */\n isOptionSelected(option: SelectOption): boolean {\n return this.selectionController.isOptionSelected(option);\n }\n\n /**\n * Toggles the dropdown visibility\n */\n toggleDropdown(): void {\n this.dropdownController.toggle();\n }\n\n /**\n * Opens the dropdown programmatically\n */\n openDropdown(): void {\n this.dropdownController.open();\n }\n\n /**\n * Closes the dropdown programmatically\n */\n closeDropdown(): void {\n this.dropdownController.close();\n }\n\n /**\n * Focuses the select component\n */\n override focus(): void {\n this.focusController.focus();\n }\n\n /**\n * Removes focus from the select component\n */\n override blur(): void {\n this.focusController.blur();\n }\n\n /**\n * Validates the current selection according to component rules\n * @returns True if valid, false otherwise\n */\n validate(): boolean {\n return this.validationController.validate();\n }\n\n /**\n * Checks if the current selection is valid without showing validation UI\n * @returns True if valid, false otherwise\n */\n checkValidity(): boolean {\n return this.validationController.checkValidity();\n }\n\n /**\n * Reports the current validation state and shows validation UI if invalid\n * @returns True if valid, false otherwise\n */\n reportValidity(): boolean {\n return this.validationController.reportValidity();\n }\n\n /**\n * Sets a custom validation message\n * @param message - Custom validation message (empty string to clear)\n */\n setCustomValidity(message: string): void {\n this.validationController.setCustomValidity(message);\n }\n\n /**\n * Gets the current validation status\n * @returns ValidationStatus object with isValid and message\n */\n getValidationStatus(): { isValid: boolean; validationMessage: string } {\n const isValid = this.validationController.checkValidity();\n return {\n isValid,\n validationMessage: this.validationController.validationMessage || ''\n };\n }\n\n /**\n * Gets the current validation message\n */\n get validationMessage(): string {\n return this.validationController.validationMessage || '';\n }\n\n /**\n * Clears validation state\n */\n clearValidation(): void {\n this.validationController.setCustomValidity('');\n this.status = SelectStatus.Default;\n }\n\n /**\n * Searches for options with the given query\n * @param query - Search query string\n */\n searchOptions(query: string): void {\n this.searchController.search(query);\n }\n\n /**\n * Clears the current search query\n */\n clearSearch(): void {\n this.searchController.clearSearch();\n }\n\n /**\n * Gets the filtered options based on current search\n * @returns Array of filtered options\n */\n getSearchFilteredOptions(): SelectOption[] {\n return this.searchController.getFilteredOptions(this.options);\n }\n\n /**\n * Gets the current search query\n * @returns Current search query string\n */\n getCurrentSearchQuery(): string {\n return this.searchController.searchQuery;\n }\n\n /**\n * Gets the currently selected options\n * @returns Array of selected option objects\n */\n getSelectedOptions(): SelectOption[] {\n return this.selectedOptions;\n }\n\n /**\n * Manually trigger setup of global event listeners\n */\n setupGlobalEventListeners(): void {\n this.eventController.setupEventListeners();\n }\n\n /**\n * Manually trigger removal of global event listeners\n */\n removeGlobalEventListeners(): void {\n this.eventController.removeEventListeners();\n }\n\n \n /**\n * Handles clicks on the select trigger element\n */\n private handleTriggerClick = (event: Event): void => {\n this.eventController.handleTriggerClick(event);\n };\n\n /**\n * Handles clicks on individual options\n */\n private handleOptionClick = (event: Event, option: SelectOption): void => {\n this.eventController.handleOptionClick(event, option);\n };\n\n /**\n * Handles removal of selected tags in multiple selection mode\n */\n private handleTagRemove = (event: Event, option: SelectOption): void => {\n this.eventController.handleTagRemove(event, option);\n };\n\n /**\n * Handles the clear all selections button\n */\n private handleClearAll = (event: Event): void => {\n this.eventController.handleClearAll(event);\n };\n\n /**\n * Handles keyboard navigation and interactions\n */\n private handleKeyDown = (event: KeyboardEvent): void => {\n this.eventController.handleKeyDown(event);\n };\n\n /**\n * Handles focus events\n */\n private handleFocus = (): void => {\n this.eventController.handleFocus();\n };\n\n /**\n * Handles blur events\n */\n private handleBlur = (): void => {\n this.eventController.handleBlur();\n };\n\n /**\n * Filters options based on search query\n */\n private getFilteredOptions(): SelectOption[] {\n return this.searchController.getFilteredOptions(this.options);\n };\n\n /**\n * Sets up global event listeners (called when dropdown opens)\n */\n public setupEventListeners(): void {\n this.eventController.setupEventListeners();\n }\n\n /**\n * Removes global event listeners (called on disconnect or dropdown close)\n */\n public removeEventListeners(): void {\n this.eventController.removeEventListeners();\n }\n \n /**\n * Main render method that delegates to specific type renderers\n */\n protected override render() {\n return html`${choose(this.type, [\n [SelectType.Default, () => this.renderDefault()],\n [SelectType.Inline, () => this.renderInline()],\n [SelectType.Button, () => this.renderButton()],\n [SelectType.Slot, () => this.renderSlot()],\n ])}`;\n }\n /**\n * Renders the default select appearance with full features\n */\n private renderDefault() {\n const selectedOptions = this.selectedOptions;\n const validationClasses = this.validationController.getValidationClasses();\n \n return html`\n <slot name=\"label\"></slot>\n <div \n class=\"${classMap({\n 'wrapper': true,\n ...validationClasses\n })}\"\n data-theme=\"${this.currentTheme}\"\n tabindex=\"0\"\n role=\"combobox\"\n aria-expanded=\"${this.show}\"\n aria-haspopup=\"listbox\"\n aria-labelledby=\"select-label\"\n\n @click=${this.handleTriggerClick}\n @keydown=${this.handleKeyDown}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n >\n <div class=\"select\">\n <div class=\"select-trigger\">\n ${this.renderSelectedContent(selectedOptions)}\n </div>\n \n <div class=\"icons-container\">\n ${this.renderStatusIcon()}\n ${this.renderClearButton(selectedOptions)}\n <nr-icon \n name=\"chevron-down\" \n size=\"${this.size}\"\n class=\"arrow-icon\"\n aria-hidden=\"true\"\n ></nr-icon>\n </div>\n \n <div\n class=\"options\"\n role=\"listbox\"\n aria-multiselectable=\"${this.multiple}\"\n style=${this.maxHeight ? styleMap({ 'max-height': this.maxHeight }) : nothing}\n @click=${(e: Event) => e.stopPropagation()}\n >\n ${this.searchable ? this.renderSearchInput() : nothing}\n <slot name=\"before-options\"></slot>\n ${this.renderSelectOptions()}\n <slot name=\"after-options\"></slot>\n </div>\n </div>\n </div>\n \n ${this.renderValidationMessage()}\n <slot name=\"helper-text\"></slot>\n `;\n }\n\n /**\n * Renders inline select with integrated label and helper text\n */\n private renderInline() {\n return html`\n <slot name=\"label\"></slot>\n ${this.renderDefault()}\n <slot name=\"helper-text\"></slot>\n `;\n }\n\n /**\n * Renders select as a button-style component\n */\n private renderButton() {\n const selectedOptions = this.selectedOptions;\n return html`\n <button\n class=\"select-button\"\n ?disabled=${this.disabled}\n @click=${this.handleTriggerClick}\n @keydown=${this.handleKeyDown}\n >\n ${selectedOptions.length > 0 ? selectedOptions[0].label : this.placeholder}\n <nr-icon name=\"chevron-down\" class=\"arrow-icon\"></nr-icon>\n </button>\n \n <div\n class=\"options\"\n role=\"listbox\"\n style=${this.maxHeight ? styleMap({ 'max-height': this.maxHeight }) : nothing}\n @click=${(e: Event) => e.stopPropagation()}\n >\n ${this.searchable ? this.renderSearchInput() : nothing}\n <slot name=\"before-options\"></slot>\n ${this.renderSelectOptions()}\n <slot name=\"after-options\"></slot>\n </div>\n `;\n }\n\n /**\n * Renders select with custom trigger content via slots\n */\n private renderSlot() {\n return html`\n <slot name=\"trigger\" @click=${this.handleTriggerClick}></slot>\n <div\n class=\"options\"\n role=\"listbox\"\n style=${this.maxHeight ? styleMap({ 'max-height': this.maxHeight }) : nothing}\n @click=${(e: Event) => e.stopPropagation()}\n >\n ${this.searchable ? this.renderSearchInput() : nothing}\n <slot name=\"before-options\"></slot>\n ${this.renderSelectOptions()}\n <slot name=\"after-options\"></slot>\n </div>\n `;\n }\n\n /**\n * Renders the selected content in the trigger area\n */\n private renderSelectedContent(selectedOptions: SelectOption[]) {\n if (selectedOptions.length === 0) {\n return html`<span class=\"placeholder\" aria-hidden=\"true\">${this.placeholder}</span>`;\n }\n\n if (this.multiple) {\n // Check if custom display slot should be used\n if (this.useCustomSelectedDisplay) {\n return html`<slot name=\"selected-display\" .selectedOptions=${selectedOptions}></slot>`;\n }\n \n // Default behavior: render tags\n return map(selectedOptions, (option) => html`\n <span class=\"tag\">\n <span class=\"tag-label\">${option.label}</span>\n <nr-icon \n name=\"x\"\n size=\"${this.size}\"\n class=\"tag-close\"\n @click=${(e: Event) => this.handleTagRemove(e, option)}\n aria-label=\"Remove ${option.label}\"\n ></nr-icon>\n </span>\n `);\n } else {\n return html`${selectedOptions[0].label}`;\n }\n }\n\n /**\n * Renders status/validation icons based on current status\n */\n private renderStatusIcon() {\n switch (this.status) {\n case SelectStatus.Warning:\n return html`<nr-icon name=\"alert-triangle\" size=\"${this.size}\" class=\"status-icon warning\"></nr-icon>`;\n case SelectStatus.Error:\n return html`<nr-icon name=\"alert-circle\" size=\"${this.size}\" class=\"status-icon error\"></nr-icon>`;\n case SelectStatus.Success:\n return html`<nr-icon name=\"circle-check\" size=\"${this.size}\" class=\"status-icon success\"></nr-icon>`;\n default:\n return nothing;\n }\n }\n\n /**\n * Renders the clear all selections button when applicable\n */\n private renderClearButton(selectedOptions: SelectOption[]) {\n if (!this.clearable || selectedOptions.length === 0 || this.disabled) {\n return nothing;\n }\n\n return html`\n <nr-icon\n name=\"x\"\n size=\"${this.size}\"\n class=\"clear-icon\"\n @click=${this.handleClearAll}\n aria-label=\"Clear selection\"\n tabindex=\"-1\"\n ></nr-icon>\n `;\n }\n\n /**\n * Renders all available options in the dropdown\n */\n private renderSelectOptions() {\n const filteredOptions = this.getFilteredOptions();\n \n // Show \"no options\" message when no options are available (original array empty)\n if (!this.options || this.options.length === 0) {\n return html`\n <div class=\"no-options\" role=\"option\" aria-disabled=\"true\">\n <div class=\"no-options-content\">\n <nr-icon \n name=\"${this.noOptionsIcon}\" \n class=\"no-options-icon\"\n aria-hidden=\"true\">\n </nr-icon>\n <span class=\"no-options-text\">${this.noOptionsMessage}</span>\n </div>\n </div>\n `;\n }\n \n // Show \"no results\" message when search returns no results\n if (this.searchController.hasNoResults(this.options)) {\n return this.searchController.renderNoResults();\n }\n \n // Cache the focused option to avoid multiple controller accesses\n const focusedOption = this.keyboardController.focusedOption;\n \n return map(filteredOptions, (option) => {\n const isSelected = this.isOptionSelected(option);\n const isFocused = focusedOption && focusedOption.value === option.value;\n \n return html`\n <div\n class=\"${classMap({\n 'option': true,\n 'selected': isSelected,\n 'focused': isFocused,\n 'disabled': Boolean(option.disabled)\n })}\"\n role=\"option\"\n aria-selected=\"${isSelected}\"\n aria-disabled=\"${Boolean(option.disabled)}\"\n data-value=\"${option.value}\"\n @click=${(e: Event) => this.handleOptionClick(e, option)}\n style=${styleMap(option.style ? { style: option.style } : {})}\n title=\"${option.title || ''}\"\n >\n <div class=\"option-content\">\n ${option.icon ? html`<nr-icon name=\"${option.icon}\" size=\"${this.size}\" class=\"option-icon\"></nr-icon>` : nothing}\n <div class=\"option-text\">\n ${option.htmlContent ? html`<div .innerHTML=${option.htmlContent}></div>` : option.label}\n ${option.description ? html`<div class=\"option-description\">${option.description}</div>` : nothing}\n </div>\n </div>\n \n ${isSelected ? html`<nr-icon name=\"check\" size=\"${this.size}\" class=\"check-icon\" aria-hidden=\"true\"></nr-icon>` : nothing}\n \n ${option.state && option.message ? html`\n <div class=\"option-message ${option.state}\">\n <nr-icon name=\"${option.state === 'error' ? 'alert-circle' : 'alert-triangle'}\" size=\"${this.size}\"></nr-icon>\n <span>${option.message}</span>\n </div>\n ` : nothing}\n </div>\n `;\n });\n }\n\n /**\n * Renders the search input when searchable is enabled\n */\n private renderSearchInput() {\n return this.searchController.renderSearchInput();\n }\n\n /**\n * Renders validation message when present\n */\n private renderValidationMessage() {\n const validationMessage = this.validationController.validationMessage;\n if (!validationMessage) return nothing;\n\n return html`\n <div class=\"validation-message ${this.status}\" id=\"validation-message\">\n ${validationMessage}\n </div>\n `;\n }\n}"]}
|
package/select.constant.d.ts
CHANGED
|
@@ -112,7 +112,7 @@ export declare const SELECT_ARIA: {
|
|
|
112
112
|
};
|
|
113
113
|
export declare const SELECT_DEFAULTS: {
|
|
114
114
|
readonly PLACEHOLDER: "Select an option";
|
|
115
|
-
readonly MAX_HEIGHT: "
|
|
115
|
+
readonly MAX_HEIGHT: "auto";
|
|
116
116
|
readonly DROPDOWN_OFFSET: 4;
|
|
117
117
|
readonly TAG_MAX_WIDTH: "150px";
|
|
118
118
|
readonly TRANSITION_DURATION: 200;
|
package/select.constant.js
CHANGED
|
@@ -113,7 +113,7 @@ export const SELECT_ARIA = {
|
|
|
113
113
|
// Default values
|
|
114
114
|
export const SELECT_DEFAULTS = {
|
|
115
115
|
PLACEHOLDER: 'Select an option',
|
|
116
|
-
MAX_HEIGHT: '
|
|
116
|
+
MAX_HEIGHT: 'auto',
|
|
117
117
|
DROPDOWN_OFFSET: 4,
|
|
118
118
|
TAG_MAX_WIDTH: '150px',
|
|
119
119
|
TRANSITION_DURATION: 200,
|
package/select.constant.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.constant.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"select.constant.js","sourceRoot":"","sources":["../../../../src/components/select/select.constant.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,mCAAmC;IACnC,MAAM,EAAE,WAAW;IACnB,0CAA0C;IAC1C,KAAK,EAAE,UAAU;IACjB,uCAAuC;IACvC,IAAI,EAAE,SAAS;IACf,gCAAgC;IAChC,aAAa,EAAE,kBAAkB;IACjC,iCAAiC;IACjC,cAAc,EAAE,mBAAmB;IACnC,0CAA0C;IAC1C,UAAU,EAAE,eAAe;IAC3B,yCAAyC;IACzC,KAAK,EAAE,iBAAiB;CAChB,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,iCAAiC;IACjC,OAAO,EAAE,SAAS;IAClB,6BAA6B;IAC7B,MAAM,EAAE,QAAQ;IAChB,mCAAmC;IACnC,OAAO,EAAE,gBAAgB;IACzB,uCAAuC;IACvC,OAAO,EAAE,SAAS;IAClB,8BAA8B;IAC9B,MAAM,EAAE,QAAQ;IAChB,kCAAkC;IAClC,QAAQ,EAAE,UAAU;IACpB,iCAAiC;IACjC,OAAO,EAAE,SAAS;IAClB,2BAA2B;IAC3B,QAAQ,EAAE,UAAU;IACpB,gDAAgD;IAChD,GAAG,EAAE,KAAK;IACV,2BAA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AiB;AACjB,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,WAAW,EAAE,kBAAkB;IAC/B,UAAU,EAAE,MAAM;IAClB,eAAe,EAAE,CAAC;IAClB,aAAa,EAAE,OAAO;IACtB,mBAAmB,EAAE,GAAG;IACxB,cAAc,EAAE,GAAG;CACX,CAAC;AAEX,oCAAoC;AACpC,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,WAAW;IACvB,QAAQ,EAAE,SAAS;IACnB,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;CACF,CAAC;AAEX,8CAA8C;AAC9C,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAC/B,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2023 Nuraly, Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\n/**\n * Constants for the select component\n */\n\n/**\n * Event names fired by the select component\n */\nexport const SELECT_EVENTS = {\n /** Fired when selection changes */\n CHANGE: 'nr-change',\n /** Fired when component receives focus */\n FOCUS: 'nr-focus',\n /** Fired when component loses focus */\n BLUR: 'nr-blur',\n /** Fired when dropdown opens */\n DROPDOWN_OPEN: 'nr-dropdown-open',\n /** Fired when dropdown closes */\n DROPDOWN_CLOSE: 'nr-dropdown-close',\n /** Fired when validation state changes */\n VALIDATION: 'nr-validation',\n /** Fired when validation error occurs */\n ERROR: 'nr-select-error',\n} as const;\n\n/**\n * CSS class names used throughout the select component\n */\nexport const SELECT_CLASSES = {\n /** Main wrapper element class */\n WRAPPER: 'wrapper',\n /** Select container class */\n SELECT: 'select',\n /** Clickable trigger area class */\n TRIGGER: 'select-trigger',\n /** Dropdown options container class */\n OPTIONS: 'options',\n /** Individual option class */\n OPTION: 'option',\n /** Selected option state class */\n SELECTED: 'selected',\n /** Focused option state class */\n FOCUSED: 'focused',\n /** Disabled state class */\n DISABLED: 'disabled',\n /** Selected option tag class (multiple mode) */\n TAG: 'tag',\n /** Tag label text class */\n TAG_LABEL: 'tag-label',\n /** Tag close button class */\n TAG_CLOSE: 'tag-close',\n /** Icons container class */\n ICONS_CONTAINER: 'icons-container',\n /** Dropdown arrow icon class */\n ARROW_ICON: 'arrow-icon',\n /** Clear selection icon class */\n CLEAR_ICON: 'clear-icon',\n /** Status/validation icon class */\n STATUS_ICON: 'status-icon',\n /** Selected option check mark class */\n CHECK_ICON: 'check-icon',\n /** Validation message class */\n VALIDATION_MESSAGE: 'validation-message',\n /** Placeholder text class */\n PLACEHOLDER: 'placeholder',\n /** No options available message class */\n NO_OPTIONS: 'no-options',\n /** No options content wrapper class */\n NO_OPTIONS_CONTENT: 'no-options-content',\n /** No options icon class */\n NO_OPTIONS_ICON: 'no-options-icon',\n /** No options text class */\n NO_OPTIONS_TEXT: 'no-options-text',\n /** Search container class */\n SEARCH_CONTAINER: 'search-container',\n /** Search input class */\n SEARCH_INPUT: 'search-input',\n /** Search icon class */\n SEARCH_ICON: 'search-icon',\n /** Search clear button class */\n SEARCH_CLEAR: 'search-clear',\n} as const;\n\n/**\n * ARIA roles and attributes for accessibility compliance\n */\nexport const SELECT_ARIA = {\n /** ARIA role for the main select element */\n COMBOBOX: 'combobox',\n /** ARIA role for the options container */\n LISTBOX: 'listbox',\n /** ARIA role for individual options */\n OPTION: 'option',\n /** ARIA attribute indicating dropdown expanded state */\n EXPANDED: 'aria-expanded',\n /** ARIA attribute indicating popup presence */\n HASPOPUP: 'aria-haspopup',\n /** ARIA attribute for multiple selection capability */\n MULTISELECTABLE: 'aria-multiselectable',\n /** ARIA attribute for selected state */\n SELECTED: 'aria-selected',\n /** ARIA attribute for disabled state */\n DISABLED: 'aria-disabled',\n /** ARIA attribute for required field */\n REQUIRED: 'aria-required',\n /** ARIA attribute for validation state */\n INVALID: 'aria-invalid',\n /** ARIA attribute linking to description */\n DESCRIBEDBY: 'aria-describedby',\n LABELLEDBY: 'aria-labelledby',\n} as const;\n\n// Default values\nexport const SELECT_DEFAULTS = {\n PLACEHOLDER: 'Select an option',\n MAX_HEIGHT: 'auto',\n DROPDOWN_OFFSET: 4,\n TAG_MAX_WIDTH: '150px',\n TRANSITION_DURATION: 200,\n DEBOUNCE_DELAY: 300,\n} as const;\n\n// Key codes for keyboard navigation\nexport const SELECT_KEYS = {\n ENTER: 'Enter',\n SPACE: ' ',\n ESCAPE: 'Escape',\n ARROW_DOWN: 'ArrowDown',\n ARROW_UP: 'ArrowUp',\n HOME: 'Home',\n END: 'End',\n TAB: 'Tab',\n} as const;\n\n// Legacy constants for backward compatibility\nexport const EMPTY_STRING = '';\nexport const MULTIPLE_OPTIONS_SEPARATOR = ', ';\n"]}
|