@smilodon/core 1.5.5 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -89,6 +89,9 @@ export declare class EnhancedSelect extends HTMLElement {
89
89
  private _createInputContent;
90
90
  private _setCssVariable;
91
91
  private _applyStyleVariableMap;
92
+ private _getDisabledOptionBehavior;
93
+ private _isDisabledOptionSelectable;
94
+ private _isOptionSelectionBlocked;
92
95
  private _syncStyleConfigVariables;
93
96
  private _resolveDropdownPlacement;
94
97
  private _syncDropdownPlacement;
@@ -2,6 +2,7 @@
2
2
  * Independent Option Component
3
3
  * High cohesion, low coupling - handles its own selection state and events
4
4
  */
5
+ import type { DisabledOptionBehaviorConfig } from '../config/global-config';
5
6
  import { ClassMap } from '../types';
6
7
  export interface OptionConfig {
7
8
  /** The data item this option represents */
@@ -14,6 +15,8 @@ export interface OptionConfig {
14
15
  selected: boolean;
15
16
  /** Whether this option is disabled */
16
17
  disabled?: boolean;
18
+ /** Behavior overrides for visually disabled options */
19
+ disabledBehavior?: DisabledOptionBehaviorConfig;
17
20
  /** Whether this option is focused/active */
18
21
  active?: boolean;
19
22
  /** Custom value accessor */
@@ -47,6 +50,8 @@ export declare class SelectOption extends HTMLElement {
47
50
  private _removeButton?;
48
51
  constructor(config: OptionConfig);
49
52
  private _initializeStyles;
53
+ private _getDisabledBehavior;
54
+ private _isDisabledSelectionBlocked;
50
55
  private _render;
51
56
  private _attachEventListeners;
52
57
  private _handleSelect;
@@ -69,10 +69,14 @@ export interface SelectionConfig {
69
69
  mode: 'single' | 'multi';
70
70
  /** Allow deselection in single-select mode */
71
71
  allowDeselect?: boolean;
72
+ /** Control how visually disabled (dimmed) options behave */
73
+ disabledOptionBehavior?: DisabledOptionBehaviorConfig;
72
74
  /** Maximum selections in multi-select (0 = unlimited) */
73
75
  maxSelections?: number;
74
76
  /** Show remove button on selected options in multi-select */
75
77
  showRemoveButton?: boolean;
78
+ /** Show the selected-state side indicator on lightweight/custom-rendered options */
79
+ showSelectedIndicator?: boolean;
76
80
  /** Custom icon/markup for multi-select remove buttons (chips and selected option remove buttons) */
77
81
  removeButtonIcon?: string;
78
82
  /** Close dropdown after selection in single-select */
@@ -80,6 +84,14 @@ export interface SelectionConfig {
80
84
  /** Allow repeated trigger clicks to toggle the dropdown open/closed */
81
85
  toggleOnTriggerClick?: boolean;
82
86
  }
87
+ export interface DisabledOptionBehaviorConfig {
88
+ /** Allow visually disabled options to be selected */
89
+ selectable?: boolean;
90
+ /** Allow visually disabled options to receive hover styling */
91
+ hoverable?: boolean;
92
+ /** Allow visually disabled options to receive keyboard active/focus styling */
93
+ focusable?: boolean;
94
+ }
83
95
  export interface MultiSelectDisplayConfig {
84
96
  /** Layout mode for selected chips in multi-select mode */
85
97
  mode: 'wrap' | 'vertical' | 'horizontal';
@@ -107,6 +119,8 @@ export interface StyleConfig {
107
119
  hoverOption?: Partial<CSSStyleDeclaration>;
108
120
  /** Active option styles */
109
121
  activeOption?: Partial<CSSStyleDeclaration>;
122
+ /** Selected indicator bar styles for lightweight/custom-rendered options */
123
+ selectedIndicator?: Partial<CSSStyleDeclaration>;
110
124
  /** Input field styles */
111
125
  input?: Partial<CSSStyleDeclaration>;
112
126
  /** Multi-select badge styles */
@@ -119,6 +133,8 @@ export interface StyleConfig {
119
133
  badgeLabel?: Partial<CSSStyleDeclaration>;
120
134
  /** Multi-select badge remove button styles */
121
135
  badgeRemove?: Partial<CSSStyleDeclaration>;
136
+ /** Multi-select badge remove icon styles */
137
+ badgeRemoveIcon?: Partial<CSSStyleDeclaration>;
122
138
  /** Multi-select badge remove button hover styles */
123
139
  badgeRemoveHover?: Partial<CSSStyleDeclaration>;
124
140
  /** Multi-select badge remove button active styles */
@@ -141,6 +157,7 @@ export interface StyleConfig {
141
157
  badge?: string;
142
158
  badgeLabel?: string;
143
159
  badgeRemove?: string;
160
+ badgeRemoveIcon?: string;
144
161
  groupHeader?: string;
145
162
  };
146
163
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smilodon/core",
3
- "version": "1.5.5",
3
+ "version": "1.6.0",
4
4
  "description": "High-performance native select component with extreme-scale virtualization - React, Vue, Svelte, Vanilla JS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",