@rufous/ui 0.3.67 → 0.3.69
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/main.cjs +3 -1
- package/dist/main.d.cts +14 -1
- package/dist/main.d.ts +14 -1
- package/dist/main.js +3 -1
- package/package.json +2 -2
package/dist/main.cjs
CHANGED
|
@@ -11692,6 +11692,7 @@ function SmartSelect({
|
|
|
11692
11692
|
filterOptions: filterOptionsProp,
|
|
11693
11693
|
renderOption: renderOptionProp,
|
|
11694
11694
|
limitTags,
|
|
11695
|
+
showSelectedOnSearch = false,
|
|
11695
11696
|
label,
|
|
11696
11697
|
placeholder,
|
|
11697
11698
|
variant = "outlined",
|
|
@@ -11950,6 +11951,7 @@ function SmartSelect({
|
|
|
11950
11951
|
const filteredUnselected = unselected.filter(
|
|
11951
11952
|
(opt) => getOptionLabel(opt).toLowerCase().includes(q2) || (getOptionSubLabel?.(opt) ?? "").toLowerCase().includes(q2)
|
|
11952
11953
|
).slice(0, searchThreshold);
|
|
11954
|
+
if (!showSelectedOnSearch) return filteredUnselected;
|
|
11953
11955
|
return [...selected, ...filteredUnselected];
|
|
11954
11956
|
}
|
|
11955
11957
|
const effectiveVal = strictSelection ? strictValidation.canonicalValue : value;
|
|
@@ -11971,7 +11973,7 @@ function SmartSelect({
|
|
|
11971
11973
|
return opts.filter(
|
|
11972
11974
|
(opt) => getOptionLabel(opt).toLowerCase().includes(q) || (getOptionSubLabel?.(opt) ?? "").toLowerCase().includes(q)
|
|
11973
11975
|
).slice(0, searchThreshold);
|
|
11974
|
-
}, [filterOptionsProp, multiple, selectedKeys, getValue, getOptionLabel, getOptionSubLabel, value, searchThreshold, strictSelection, strictValidation]);
|
|
11976
|
+
}, [filterOptionsProp, multiple, selectedKeys, getValue, getOptionLabel, getOptionSubLabel, value, searchThreshold, strictSelection, strictValidation, showSelectedOnSearch]);
|
|
11975
11977
|
return /* @__PURE__ */ import_react46.default.createElement(
|
|
11976
11978
|
Autocomplete,
|
|
11977
11979
|
{
|
package/dist/main.d.cts
CHANGED
|
@@ -2905,6 +2905,19 @@ interface SmartSelectProps<T = any> {
|
|
|
2905
2905
|
}) => ReactNode;
|
|
2906
2906
|
/** In multiple mode, cap how many tag chips are shown before "+N more" */
|
|
2907
2907
|
limitTags?: number;
|
|
2908
|
+
/**
|
|
2909
|
+
* In multiple mode, controls whether already-selected options stay visible
|
|
2910
|
+
* at the top of the dropdown while the user is actively searching.
|
|
2911
|
+
*
|
|
2912
|
+
* - **false** (default): selected options are hidden during search — only
|
|
2913
|
+
* matching results are shown. They reappear when a result is selected, the
|
|
2914
|
+
* search text is cleared, or the dropdown is reopened.
|
|
2915
|
+
* - **true**: existing behaviour — selected options remain pinned at the top
|
|
2916
|
+
* with search results listed below them.
|
|
2917
|
+
*
|
|
2918
|
+
* Only applies to `multiple` selection mode. Default: **false**.
|
|
2919
|
+
*/
|
|
2920
|
+
showSelectedOnSearch?: boolean;
|
|
2908
2921
|
label?: string;
|
|
2909
2922
|
placeholder?: string;
|
|
2910
2923
|
variant?: 'outlined' | 'filled' | 'standard';
|
|
@@ -2918,7 +2931,7 @@ interface SmartSelectProps<T = any> {
|
|
|
2918
2931
|
style?: CSSProperties;
|
|
2919
2932
|
sx?: SxProp;
|
|
2920
2933
|
}
|
|
2921
|
-
declare function SmartSelect<T = any>({ options, value, onChange, inputValue: inputValueProp, onInputChange, onSearchChange, searchResults, debounceMs, searchThreshold, getOptionLabel, getOptionValue, getOptionSubLabel, getOptionChildren, multiple, allowChildNodesSelection, strictSelection, loading, loadingText, filterOptions: filterOptionsProp, renderOption: renderOptionProp, limitTags, label, placeholder, variant, size, disabled, error, helperText, fullWidth, required, className, style, sx, }: SmartSelectProps<T>): React__default.JSX.Element;
|
|
2934
|
+
declare function SmartSelect<T = any>({ options, value, onChange, inputValue: inputValueProp, onInputChange, onSearchChange, searchResults, debounceMs, searchThreshold, getOptionLabel, getOptionValue, getOptionSubLabel, getOptionChildren, multiple, allowChildNodesSelection, strictSelection, loading, loadingText, filterOptions: filterOptionsProp, renderOption: renderOptionProp, limitTags, showSelectedOnSearch, label, placeholder, variant, size, disabled, error, helperText, fullWidth, required, className, style, sx, }: SmartSelectProps<T>): React__default.JSX.Element;
|
|
2922
2935
|
|
|
2923
2936
|
type ToolbarButton = 'undo' | 'redo' | 'ai' | 'paragraph' | 'fontsize' | 'font' | 'color' | 'bold' | 'italic' | 'strike' | 'link' | 'lineheight' | 'ul' | 'ol' | 'align' | 'indent' | 'outdent' | 'table' | 'image' | 'video' | 'cut' | 'copy' | 'paste' | 'specialchars' | 'code' | 'fullscreen' | 'tts' | 'stt' | 'translate' | 'todo' | '|';
|
|
2924
2937
|
type EditorVariant = 'default' | 'basic';
|
package/dist/main.d.ts
CHANGED
|
@@ -2905,6 +2905,19 @@ interface SmartSelectProps<T = any> {
|
|
|
2905
2905
|
}) => ReactNode;
|
|
2906
2906
|
/** In multiple mode, cap how many tag chips are shown before "+N more" */
|
|
2907
2907
|
limitTags?: number;
|
|
2908
|
+
/**
|
|
2909
|
+
* In multiple mode, controls whether already-selected options stay visible
|
|
2910
|
+
* at the top of the dropdown while the user is actively searching.
|
|
2911
|
+
*
|
|
2912
|
+
* - **false** (default): selected options are hidden during search — only
|
|
2913
|
+
* matching results are shown. They reappear when a result is selected, the
|
|
2914
|
+
* search text is cleared, or the dropdown is reopened.
|
|
2915
|
+
* - **true**: existing behaviour — selected options remain pinned at the top
|
|
2916
|
+
* with search results listed below them.
|
|
2917
|
+
*
|
|
2918
|
+
* Only applies to `multiple` selection mode. Default: **false**.
|
|
2919
|
+
*/
|
|
2920
|
+
showSelectedOnSearch?: boolean;
|
|
2908
2921
|
label?: string;
|
|
2909
2922
|
placeholder?: string;
|
|
2910
2923
|
variant?: 'outlined' | 'filled' | 'standard';
|
|
@@ -2918,7 +2931,7 @@ interface SmartSelectProps<T = any> {
|
|
|
2918
2931
|
style?: CSSProperties;
|
|
2919
2932
|
sx?: SxProp;
|
|
2920
2933
|
}
|
|
2921
|
-
declare function SmartSelect<T = any>({ options, value, onChange, inputValue: inputValueProp, onInputChange, onSearchChange, searchResults, debounceMs, searchThreshold, getOptionLabel, getOptionValue, getOptionSubLabel, getOptionChildren, multiple, allowChildNodesSelection, strictSelection, loading, loadingText, filterOptions: filterOptionsProp, renderOption: renderOptionProp, limitTags, label, placeholder, variant, size, disabled, error, helperText, fullWidth, required, className, style, sx, }: SmartSelectProps<T>): React__default.JSX.Element;
|
|
2934
|
+
declare function SmartSelect<T = any>({ options, value, onChange, inputValue: inputValueProp, onInputChange, onSearchChange, searchResults, debounceMs, searchThreshold, getOptionLabel, getOptionValue, getOptionSubLabel, getOptionChildren, multiple, allowChildNodesSelection, strictSelection, loading, loadingText, filterOptions: filterOptionsProp, renderOption: renderOptionProp, limitTags, showSelectedOnSearch, label, placeholder, variant, size, disabled, error, helperText, fullWidth, required, className, style, sx, }: SmartSelectProps<T>): React__default.JSX.Element;
|
|
2922
2935
|
|
|
2923
2936
|
type ToolbarButton = 'undo' | 'redo' | 'ai' | 'paragraph' | 'fontsize' | 'font' | 'color' | 'bold' | 'italic' | 'strike' | 'link' | 'lineheight' | 'ul' | 'ol' | 'align' | 'indent' | 'outdent' | 'table' | 'image' | 'video' | 'cut' | 'copy' | 'paste' | 'specialchars' | 'code' | 'fullscreen' | 'tts' | 'stt' | 'translate' | 'todo' | '|';
|
|
2924
2937
|
type EditorVariant = 'default' | 'basic';
|
package/dist/main.js
CHANGED
|
@@ -11486,6 +11486,7 @@ function SmartSelect({
|
|
|
11486
11486
|
filterOptions: filterOptionsProp,
|
|
11487
11487
|
renderOption: renderOptionProp,
|
|
11488
11488
|
limitTags,
|
|
11489
|
+
showSelectedOnSearch = false,
|
|
11489
11490
|
label,
|
|
11490
11491
|
placeholder,
|
|
11491
11492
|
variant = "outlined",
|
|
@@ -11744,6 +11745,7 @@ function SmartSelect({
|
|
|
11744
11745
|
const filteredUnselected = unselected.filter(
|
|
11745
11746
|
(opt) => getOptionLabel(opt).toLowerCase().includes(q2) || (getOptionSubLabel?.(opt) ?? "").toLowerCase().includes(q2)
|
|
11746
11747
|
).slice(0, searchThreshold);
|
|
11748
|
+
if (!showSelectedOnSearch) return filteredUnselected;
|
|
11747
11749
|
return [...selected, ...filteredUnselected];
|
|
11748
11750
|
}
|
|
11749
11751
|
const effectiveVal = strictSelection ? strictValidation.canonicalValue : value;
|
|
@@ -11765,7 +11767,7 @@ function SmartSelect({
|
|
|
11765
11767
|
return opts.filter(
|
|
11766
11768
|
(opt) => getOptionLabel(opt).toLowerCase().includes(q) || (getOptionSubLabel?.(opt) ?? "").toLowerCase().includes(q)
|
|
11767
11769
|
).slice(0, searchThreshold);
|
|
11768
|
-
}, [filterOptionsProp, multiple, selectedKeys, getValue, getOptionLabel, getOptionSubLabel, value, searchThreshold, strictSelection, strictValidation]);
|
|
11770
|
+
}, [filterOptionsProp, multiple, selectedKeys, getValue, getOptionLabel, getOptionSubLabel, value, searchThreshold, strictSelection, strictValidation, showSelectedOnSearch]);
|
|
11769
11771
|
return /* @__PURE__ */ React191.createElement(
|
|
11770
11772
|
Autocomplete,
|
|
11771
11773
|
{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rufous/ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.69",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Experimental: A lightweight React UI component library (Beta)",
|
|
7
7
|
"style": "./dist/main.css",
|
|
@@ -92,4 +92,4 @@
|
|
|
92
92
|
"react": "^18.0.0 || ^19.0.0",
|
|
93
93
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
94
94
|
}
|
|
95
|
-
}
|
|
95
|
+
}
|