@qwanyx/stack 0.2.21 → 0.2.22
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/components/ComboBox.d.ts +44 -0
- package/dist/index.cjs.js +27 -27
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +1764 -1545
- package/package.json +1 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ComboBox Component
|
|
3
|
+
* Searchable multi-select dropdown with chips
|
|
4
|
+
*/
|
|
5
|
+
export interface ComboBoxOption {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
color?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ComboBoxProps {
|
|
11
|
+
/** Available options */
|
|
12
|
+
options: ComboBoxOption[];
|
|
13
|
+
/** Selected option IDs */
|
|
14
|
+
value: string[];
|
|
15
|
+
/** Called when selection changes */
|
|
16
|
+
onChange: (value: string[]) => void;
|
|
17
|
+
/** Placeholder text */
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
/** Allow creating new options */
|
|
20
|
+
allowCreate?: boolean;
|
|
21
|
+
/** Called when a new option is created */
|
|
22
|
+
onCreate?: (label: string) => ComboBoxOption | void;
|
|
23
|
+
/** Label above the input */
|
|
24
|
+
label?: string;
|
|
25
|
+
/** Disabled state */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** Max selections (0 = unlimited) */
|
|
28
|
+
max?: number;
|
|
29
|
+
/** Theme customization */
|
|
30
|
+
theme?: ComboBoxTheme;
|
|
31
|
+
/** Additional CSS class */
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ComboBoxTheme {
|
|
35
|
+
background?: string;
|
|
36
|
+
text?: string;
|
|
37
|
+
textSecondary?: string;
|
|
38
|
+
border?: string;
|
|
39
|
+
primary?: string;
|
|
40
|
+
chipBackground?: string;
|
|
41
|
+
chipText?: string;
|
|
42
|
+
hoverBackground?: string;
|
|
43
|
+
}
|
|
44
|
+
export declare function ComboBox({ options, value, onChange, placeholder, allowCreate, onCreate, label, disabled, max, theme: themeProp, className, }: ComboBoxProps): import("react/jsx-runtime").JSX.Element;
|