@smilodon/core 1.4.13 → 1.5.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.
@@ -15,6 +15,7 @@ export declare class EnhancedSelect extends HTMLElement {
15
15
  private _shadow;
16
16
  private _container;
17
17
  private _inputContainer;
18
+ private _inputContent;
18
19
  private _input;
19
20
  private _dropdown;
20
21
  private _optionsContainer;
@@ -50,6 +51,10 @@ export declare class EnhancedSelect extends HTMLElement {
50
51
  private _tracking;
51
52
  private _suppressBlurClose;
52
53
  private _renderCycleId;
54
+ private _suppressNextOpenClick;
55
+ private _resolvedDropdownPlacement;
56
+ private _multiScrollDrag;
57
+ private _liftedAncestors;
53
58
  get classMap(): ClassMap | undefined;
54
59
  set classMap(map: ClassMap | undefined);
55
60
  /**
@@ -68,7 +73,22 @@ export declare class EnhancedSelect extends HTMLElement {
68
73
  private _mirrorDocumentStylesIntoShadow;
69
74
  private _createContainer;
70
75
  private _createInputContainer;
76
+ private _createInputContent;
77
+ private _setCssVariable;
78
+ private _applyStyleVariableMap;
79
+ private _syncStyleConfigVariables;
80
+ private _resolveDropdownPlacement;
81
+ private _syncDropdownPlacement;
82
+ private _syncDirectionConfig;
83
+ private _setIconContent;
71
84
  private _syncInputContainerMode;
85
+ private _syncMultiSelectDisplayConfig;
86
+ private _canUseHorizontalMultiScroll;
87
+ private _isScrollableMultiSelectMode;
88
+ private _isPointerOnInputScrollbar;
89
+ private _beginMultiScrollDrag;
90
+ private _updateMultiScrollDrag;
91
+ private _endMultiScrollDrag;
72
92
  private _createInput;
73
93
  private _createDropdown;
74
94
  private _createOptionsContainer;
@@ -83,6 +103,9 @@ export declare class EnhancedSelect extends HTMLElement {
83
103
  private _handleOpen;
84
104
  private _handleClose;
85
105
  private _updateDropdownVisibility;
106
+ private _liftStackingAncestors;
107
+ private _restoreLiftedAncestors;
108
+ private _createsStackingContext;
86
109
  private _updateArrowRotation;
87
110
  private _isPerfEnabled;
88
111
  private _perfMark;
@@ -30,6 +30,8 @@ export interface OptionConfig {
30
30
  classMap?: ClassMap;
31
31
  /** Show remove button (for multi-select) */
32
32
  showRemoveButton?: boolean;
33
+ /** Custom icon/markup for the remove button */
34
+ removeButtonIcon?: string;
33
35
  }
34
36
  export interface OptionEventDetail {
35
37
  item: unknown;
@@ -45,6 +45,11 @@ export interface ExpandableConfig {
45
45
  /** Label for the collapse button */
46
46
  collapseLabel?: string;
47
47
  }
48
+ export interface DropdownPlacementConfig {
49
+ /** Preferred dropdown placement mode */
50
+ mode: 'bottom' | 'top' | 'auto';
51
+ }
52
+ export type SelectDirection = 'ltr' | 'rtl';
48
53
  export interface ClearControlConfig {
49
54
  /** Enable clear control button inside input container */
50
55
  enabled: boolean;
@@ -68,11 +73,25 @@ export interface SelectionConfig {
68
73
  maxSelections?: number;
69
74
  /** Show remove button on selected options in multi-select */
70
75
  showRemoveButton?: boolean;
76
+ /** Custom icon/markup for multi-select remove buttons (chips and selected option remove buttons) */
77
+ removeButtonIcon?: string;
71
78
  /** Close dropdown after selection in single-select */
72
79
  closeOnSelect?: boolean;
73
80
  /** Allow repeated trigger clicks to toggle the dropdown open/closed */
74
81
  toggleOnTriggerClick?: boolean;
75
82
  }
83
+ export interface MultiSelectDisplayConfig {
84
+ /** Layout mode for selected chips in multi-select mode */
85
+ mode: 'wrap' | 'vertical' | 'horizontal';
86
+ /** Maximum visible height of the selected-chip area */
87
+ maxHeight?: string;
88
+ /** Horizontal overflow behavior for the chip area */
89
+ overflowX?: 'auto' | 'scroll' | 'hidden';
90
+ /** Vertical overflow behavior for the chip area */
91
+ overflowY?: 'auto' | 'scroll' | 'hidden';
92
+ /** Enable drag-to-scroll interactions in horizontal mode */
93
+ dragScroll?: boolean;
94
+ }
76
95
  export interface StyleConfig {
77
96
  /** Container styles */
78
97
  container?: Partial<CSSStyleDeclaration>;
@@ -86,8 +105,26 @@ export interface StyleConfig {
86
105
  disabledOption?: Partial<CSSStyleDeclaration>;
87
106
  /** Hover option styles */
88
107
  hoverOption?: Partial<CSSStyleDeclaration>;
108
+ /** Active option styles */
109
+ activeOption?: Partial<CSSStyleDeclaration>;
89
110
  /** Input field styles */
90
111
  input?: Partial<CSSStyleDeclaration>;
112
+ /** Multi-select badge styles */
113
+ badge?: Partial<CSSStyleDeclaration>;
114
+ /** Multi-select badge hover styles */
115
+ badgeHover?: Partial<CSSStyleDeclaration>;
116
+ /** Multi-select badge active styles */
117
+ badgeActive?: Partial<CSSStyleDeclaration>;
118
+ /** Multi-select badge label styles */
119
+ badgeLabel?: Partial<CSSStyleDeclaration>;
120
+ /** Multi-select badge remove button styles */
121
+ badgeRemove?: Partial<CSSStyleDeclaration>;
122
+ /** Multi-select badge remove button hover styles */
123
+ badgeRemoveHover?: Partial<CSSStyleDeclaration>;
124
+ /** Multi-select badge remove button active styles */
125
+ badgeRemoveActive?: Partial<CSSStyleDeclaration>;
126
+ /** Group header styles */
127
+ groupHeader?: Partial<CSSStyleDeclaration>;
91
128
  /** Loading indicator styles */
92
129
  loader?: Partial<CSSStyleDeclaration>;
93
130
  /** Custom CSS class names */
@@ -97,9 +134,14 @@ export interface StyleConfig {
97
134
  option?: string;
98
135
  selectedOption?: string;
99
136
  disabledOption?: string;
137
+ activeOption?: string;
100
138
  input?: string;
101
139
  loader?: string;
102
140
  removeButton?: string;
141
+ badge?: string;
142
+ badgeLabel?: string;
143
+ badgeRemove?: string;
144
+ groupHeader?: string;
103
145
  };
104
146
  }
105
147
  export interface ServerSideConfig {
@@ -182,6 +224,12 @@ export interface LimitationsConfig {
182
224
  export interface GlobalSelectConfig {
183
225
  /** Selection behavior */
184
226
  selection: SelectionConfig;
227
+ /** Text and layout direction for the select */
228
+ direction: SelectDirection;
229
+ /** Dropdown placement behavior */
230
+ dropdownPlacement: DropdownPlacementConfig;
231
+ /** Multi-select chip display behavior */
232
+ multiSelectDisplay: MultiSelectDisplayConfig;
185
233
  /** Scroll to selected configuration */
186
234
  scrollToSelected: ScrollToSelectedConfig;
187
235
  /** Load more configuration */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smilodon/core",
3
- "version": "1.4.13",
3
+ "version": "1.5.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",