@lumx/core 4.17.1-alpha.1 → 4.17.1-alpha.2

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.
@@ -23,12 +23,13 @@ export declare function setup({ components: { Combobox, IconButton, Button }, de
23
23
  value: string;
24
24
  };
25
25
  decorators: ((story: any, context: any) => any)[];
26
- render: ({ value, onChange, onSelect, }: {
26
+ render: ({ value, onChange, onSelect, selectionMode, }: {
27
27
  value: string;
28
28
  onChange: (v: string) => void;
29
29
  onSelect?: (option: {
30
30
  value: string;
31
- }) => boolean | void;
31
+ }) => void;
32
+ selectionMode?: "fill" | "keep" | "clear";
32
33
  }) => import("react").JSX.Element;
33
34
  };
34
35
  ClickAwayClosesPopup: {
@@ -45,12 +46,13 @@ export declare function setup({ components: { Combobox, IconButton, Button }, de
45
46
  value: string;
46
47
  };
47
48
  decorators: ((story: any, context: any) => any)[];
48
- render: ({ value, onChange, onSelect, }: {
49
+ render: ({ value, onChange, onSelect, selectionMode, }: {
49
50
  value: string;
50
51
  onChange: (v: string) => void;
51
52
  onSelect?: (option: {
52
53
  value: string;
53
- }) => boolean | void;
54
+ }) => void;
55
+ selectionMode?: "fill" | "keep" | "clear";
54
56
  }) => import("react").JSX.Element;
55
57
  };
56
58
  OptionMoreInfoKeyboardHighlight: {
@@ -114,7 +116,7 @@ export declare function setup({ components: { Combobox, IconButton, Button }, de
114
116
  value: string;
115
117
  onSelect: (option: {
116
118
  value: string;
117
- }) => boolean | void;
119
+ }) => void;
118
120
  }) => import("react").JSX.Element;
119
121
  };
120
122
  ButtonTypeaheadWhileOpen: {
@@ -127,7 +129,7 @@ export declare function setup({ components: { Combobox, IconButton, Button }, de
127
129
  value: string;
128
130
  onSelect: (option: {
129
131
  value: string;
130
- }) => boolean | void;
132
+ }) => void;
131
133
  }) => import("react").JSX.Element;
132
134
  };
133
135
  ButtonEndFromClosed: {
@@ -140,7 +142,7 @@ export declare function setup({ components: { Combobox, IconButton, Button }, de
140
142
  value: string;
141
143
  onSelect: (option: {
142
144
  value: string;
143
- }) => boolean | void;
145
+ }) => void;
144
146
  }) => import("react").JSX.Element;
145
147
  };
146
148
  ButtonHomeFromClosed: {
@@ -153,7 +155,7 @@ export declare function setup({ components: { Combobox, IconButton, Button }, de
153
155
  value: string;
154
156
  onSelect: (option: {
155
157
  value: string;
156
- }) => boolean | void;
158
+ }) => void;
157
159
  }) => import("react").JSX.Element;
158
160
  };
159
161
  ButtonArrowDownFromClosed: {
@@ -166,7 +168,7 @@ export declare function setup({ components: { Combobox, IconButton, Button }, de
166
168
  value: string;
167
169
  onSelect: (option: {
168
170
  value: string;
169
- }) => boolean | void;
171
+ }) => void;
170
172
  }) => import("react").JSX.Element;
171
173
  };
172
174
  ClearAfterSelect: {
@@ -175,12 +177,13 @@ export declare function setup({ components: { Combobox, IconButton, Button }, de
175
177
  value: string;
176
178
  };
177
179
  decorators: ((story: any, context: any) => any)[];
178
- render: ({ value, onChange, onSelect, }: {
180
+ render: ({ value, onChange, onSelect, selectionMode, }: {
179
181
  value: string;
180
182
  onChange: (v: string) => void;
181
183
  onSelect?: (option: {
182
184
  value: string;
183
- }) => boolean | void;
185
+ }) => void;
186
+ selectionMode?: "fill" | "keep" | "clear";
184
187
  }) => import("react").JSX.Element;
185
188
  };
186
189
  };
@@ -45,70 +45,71 @@ export declare function getActiveOption(): HTMLElement | null;
45
45
  * Exported so TestStories.tsx can reuse the same templates for browser-only tests.
46
46
  */
47
47
  export declare function createTemplates(Combobox: ComboboxNamespace, IconButton: any): {
48
- inputTemplate: ({ value, onChange, onSelect, }: {
48
+ inputTemplate: ({ value, onChange, onSelect, selectionMode, }: {
49
49
  value: string;
50
50
  onChange: (v: string) => void;
51
51
  onSelect?: (option: {
52
52
  value: string;
53
- }) => boolean | void;
53
+ }) => void;
54
+ selectionMode?: "fill" | "keep" | "clear";
54
55
  }) => import("react").JSX.Element;
55
56
  manualFilterTemplate: ({ value, onChange, onSelect, }: {
56
57
  value: string;
57
58
  onChange: (v: string) => void;
58
59
  onSelect?: (option: {
59
60
  value: string;
60
- }) => boolean | void;
61
+ }) => void;
61
62
  }) => import("react").JSX.Element;
62
63
  filterOffTemplate: ({ value, onChange, onSelect, }: {
63
64
  value: string;
64
65
  onChange: (v: string) => void;
65
66
  onSelect?: (option: {
66
67
  value: string;
67
- }) => boolean | void;
68
+ }) => void;
68
69
  }) => import("react").JSX.Element;
69
70
  openOnFocusTemplate: ({ value, onChange, onSelect, }: {
70
71
  value: string;
71
72
  onChange: (v: string) => void;
72
73
  onSelect?: (option: {
73
74
  value: string;
74
- }) => boolean | void;
75
+ }) => void;
75
76
  }) => import("react").JSX.Element;
76
77
  noOpenOnFocusTemplate: ({ value, onChange, onSelect, }: {
77
78
  value: string;
78
79
  onChange: (v: string) => void;
79
80
  onSelect?: (option: {
80
81
  value: string;
81
- }) => boolean | void;
82
+ }) => void;
82
83
  }) => import("react").JSX.Element;
83
84
  buttonTemplate: ({ value, onSelect }: {
84
85
  value: string;
85
86
  onSelect: (option: {
86
87
  value: string;
87
- }) => boolean | void;
88
+ }) => void;
88
89
  }) => import("react").JSX.Element;
89
90
  showLabelButtonTemplate: ({ value, onSelect, }: {
90
91
  value: string;
91
92
  onSelect: (option: {
92
93
  value: string;
93
- }) => boolean | void;
94
+ }) => void;
94
95
  }) => import("react").JSX.Element;
95
96
  showTooltipButtonTemplate: ({ value, onSelect, }: {
96
97
  value: string;
97
98
  onSelect: (option: {
98
99
  value: string;
99
- }) => boolean | void;
100
+ }) => void;
100
101
  }) => import("react").JSX.Element;
101
102
  noValueButtonTemplate: ({ value, onSelect, }: {
102
103
  value: string;
103
104
  onSelect: (option: {
104
105
  value: string;
105
- }) => boolean | void;
106
+ }) => void;
106
107
  }) => import("react").JSX.Element;
107
108
  selectedButtonTemplate: ({ value, onSelect, }: {
108
109
  value: string;
109
110
  onSelect: (option: {
110
111
  value: string;
111
- }) => boolean | void;
112
+ }) => void;
112
113
  }) => import("react").JSX.Element;
113
114
  disabledInputTemplate: ({ value, onChange }: {
114
115
  value: string;
@@ -118,14 +119,14 @@ export declare function createTemplates(Combobox: ComboboxNamespace, IconButton:
118
119
  value: string;
119
120
  onSelect: (option: {
120
121
  value: string;
121
- }) => boolean | void;
122
+ }) => void;
122
123
  }) => import("react").JSX.Element;
123
124
  gridInputTemplate: ({ value, onChange, onSelect, onDelete, onEdit, }: {
124
125
  value: string;
125
126
  onChange: (v: string) => void;
126
127
  onSelect?: (option: {
127
128
  value: string;
128
- }) => boolean | void;
129
+ }) => void;
129
130
  onDelete?: (...args: unknown[]) => void;
130
131
  onEdit?: (...args: unknown[]) => void;
131
132
  }) => import("react").JSX.Element;
@@ -133,7 +134,7 @@ export declare function createTemplates(Combobox: ComboboxNamespace, IconButton:
133
134
  value: string;
134
135
  onSelect: (option: {
135
136
  value: string;
136
- }) => boolean | void;
137
+ }) => void;
137
138
  onDelete?: (...args: unknown[]) => void;
138
139
  }) => import("react").JSX.Element;
139
140
  emptyStateTemplate: ({ value, onChange }: {
@@ -41,14 +41,10 @@ export interface ComboboxEventMap {
41
41
  }
42
42
  /** Callbacks provided by the consumer (React/Vue) to react to combobox state changes. */
43
43
  export interface ComboboxCallbacks {
44
- /**
45
- * Called when an option is selected (click or keyboard).
46
- * Return `false` to skip the default behaviour of updating the input value via `onChange`.
47
- * The combobox will still close normally.
48
- */
44
+ /** Called when an option is selected (click or keyboard). */
49
45
  onSelect?(option: {
50
46
  value: string;
51
- }): boolean | void;
47
+ }): void;
52
48
  }
53
49
  /**
54
50
  * Behavioral options for input-mode combobox (autocomplete/filter pattern).
@@ -73,6 +69,19 @@ export interface ComboboxInputOptions {
73
69
  * @default false (true when filter is 'off')
74
70
  */
75
71
  openOnFocus?: boolean;
72
+ /**
73
+ * Controls what happens to the input value when an option is selected.
74
+ *
75
+ * - `'fill'` (default) — The input is updated with the selected option value via `onChange`.
76
+ * - `'keep'` — The input value is left unchanged; `onChange` is not called.
77
+ * Useful when the component manages the displayed value independently (e.g. showing
78
+ * an option display name rather than the raw option ID). The filter still resets.
79
+ * - `'clear'` — The input is cleared (empty string) via `onChange` after selection.
80
+ * Useful for multi-select patterns where typing starts fresh after each pick.
81
+ *
82
+ * @default 'fill'
83
+ */
84
+ selectionMode?: 'fill' | 'keep' | 'clear';
76
85
  }
77
86
  /** Handle returned by `setupCombobox`. Used by framework wrappers and mode controllers. */
78
87
  export interface ComboboxHandle {
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "dependencies": {
9
9
  "@floating-ui/dom": "^1.7.5",
10
- "@lumx/icons": "^4.17.1-alpha.1",
10
+ "@lumx/icons": "^4.17.1-alpha.2",
11
11
  "classnames": "^2.3.2",
12
12
  "focus-visible": "^5.0.2",
13
13
  "lodash": "4.18.1",
@@ -66,7 +66,7 @@
66
66
  "update-version-changelog": "yarn version-changelog ../../CHANGELOG.md"
67
67
  },
68
68
  "sideEffects": false,
69
- "version": "4.17.1-alpha.1",
69
+ "version": "4.17.1-alpha.2",
70
70
  "devDependencies": {
71
71
  "@rollup/plugin-typescript": "^12.3.0",
72
72
  "@testing-library/dom": "^10.4.1",