@smilodon/core 1.3.13 → 1.4.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.
- package/dist/index.cjs +170 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +170 -16
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.umd.js +170 -16
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/types/src/components/enhanced-select.d.ts +2 -1
- package/dist/types/src/components/select-option.d.ts +3 -0
- package/dist/types/src/types.d.ts +6 -0
- package/dist/types/tests/styling-contract.spec.d.ts +1 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* server-side selection, and full customization
|
|
5
5
|
*/
|
|
6
6
|
import type { GlobalSelectConfig } from '../config/global-config';
|
|
7
|
-
import type { GroupedItem } from '../types';
|
|
7
|
+
import type { GroupedItem, ClassMap } from '../types';
|
|
8
8
|
import type { OptionRenderer as OptionRendererFn } from '../renderers/contracts';
|
|
9
9
|
export declare class EnhancedSelect extends HTMLElement {
|
|
10
10
|
private _config;
|
|
@@ -35,6 +35,7 @@ export declare class EnhancedSelect extends HTMLElement {
|
|
|
35
35
|
private _rangeAnchorIndex;
|
|
36
36
|
private _optionRenderer?;
|
|
37
37
|
private _rendererHelpers;
|
|
38
|
+
classMap?: ClassMap;
|
|
38
39
|
constructor();
|
|
39
40
|
connectedCallback(): void;
|
|
40
41
|
disconnectedCallback(): void;
|
|
@@ -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 { ClassMap } from '../types';
|
|
5
6
|
export interface OptionConfig {
|
|
6
7
|
/** The data item this option represents */
|
|
7
8
|
item: unknown;
|
|
@@ -25,6 +26,8 @@ export interface OptionConfig {
|
|
|
25
26
|
style?: Partial<CSSStyleDeclaration>;
|
|
26
27
|
/** Custom class names */
|
|
27
28
|
className?: string;
|
|
29
|
+
/** Class map for state classes */
|
|
30
|
+
classMap?: ClassMap;
|
|
28
31
|
/** Show remove button (for multi-select) */
|
|
29
32
|
showRemoveButton?: boolean;
|
|
30
33
|
}
|
|
@@ -11,6 +11,12 @@ export interface RemoteConfig {
|
|
|
11
11
|
transformer?: (resp: unknown) => unknown[] | Promise<unknown[]>;
|
|
12
12
|
cacheTTL?: number;
|
|
13
13
|
}
|
|
14
|
+
export interface ClassMap {
|
|
15
|
+
selected?: string;
|
|
16
|
+
active?: string;
|
|
17
|
+
disabled?: string;
|
|
18
|
+
[key: string]: string | undefined;
|
|
19
|
+
}
|
|
14
20
|
export interface SelectEventDetail<T = unknown> {
|
|
15
21
|
item: T;
|
|
16
22
|
index: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED