@spscommerce/ds-react 8.42.0 → 8.42.1
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/lib/index.js +3654 -3587
- package/lib/index.umd.cjs +133 -86
- package/lib/option-list/SpsOptionListProps.d.ts +10 -0
- package/lib/option-list/useOptionListSearch.d.ts +1 -1
- package/lib/select/SpsSelect.d.ts +4 -0
- package/package.json +14 -14
|
@@ -31,7 +31,17 @@ export interface SpsOptionListPassthroughProps {
|
|
|
31
31
|
maxHeightRem?: number;
|
|
32
32
|
}
|
|
33
33
|
export interface SpsSearchableOptionListProps {
|
|
34
|
+
/**
|
|
35
|
+
* Hides the inline search input when options is a function (async).
|
|
36
|
+
* By default, async options show the search input; set this to true to hide it.
|
|
37
|
+
*/
|
|
34
38
|
hideInlineSearch?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Shows the inline search input when options is a static array.
|
|
41
|
+
* By default, static arrays don't show the search input; set this to true to show it.
|
|
42
|
+
* Useful when you want to manage filtering externally via onSearchChange.
|
|
43
|
+
*/
|
|
44
|
+
showInlineSearch?: boolean;
|
|
35
45
|
onSearchChange?: ChangeEventHandler;
|
|
36
46
|
search?: string;
|
|
37
47
|
searchDebounce?: number;
|
|
@@ -6,7 +6,7 @@ export interface OptionListSearchState {
|
|
|
6
6
|
value: string;
|
|
7
7
|
replacementPattern: RegExp | null;
|
|
8
8
|
}
|
|
9
|
-
export declare function useOptionListSearch({ hideInlineSearch, options, onSearchChange, search, searchPlaceholder, searchInputRef, }: SpsOptionListProps): [
|
|
9
|
+
export declare function useOptionListSearch({ hideInlineSearch, showInlineSearch, options, onSearchChange, search, searchPlaceholder, searchInputRef, }: SpsOptionListProps): [
|
|
10
10
|
JSX.Element,
|
|
11
11
|
OptionListSearchState,
|
|
12
12
|
React.Dispatch<Partial<OptionListSearchState>>
|
|
@@ -16,10 +16,12 @@ export type SpsSelectProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
|
16
16
|
notClearable?: boolean;
|
|
17
17
|
options: Eventually<any[]> | ((filter?: string) => Eventually<any[]>);
|
|
18
18
|
onChange?: React.ChangeEventHandler;
|
|
19
|
+
onSearchChange?: (searchText: string) => void;
|
|
19
20
|
onOpen?: () => void;
|
|
20
21
|
placeholder?: string;
|
|
21
22
|
searchDebounce?: number;
|
|
22
23
|
searchPlaceholder?: string;
|
|
24
|
+
showInlineSearch?: boolean;
|
|
23
25
|
tallOptionList?: boolean;
|
|
24
26
|
textKey?: string;
|
|
25
27
|
valueKey?: string;
|
|
@@ -49,10 +51,12 @@ export declare const SpsSelect: React.ForwardRefExoticComponent<SpsGlobalPropTyp
|
|
|
49
51
|
notClearable?: boolean;
|
|
50
52
|
options: Eventually<any[]> | ((filter?: string) => Eventually<any[]>);
|
|
51
53
|
onChange?: React.ChangeEventHandler;
|
|
54
|
+
onSearchChange?: (searchText: string) => void;
|
|
52
55
|
onOpen?: () => void;
|
|
53
56
|
placeholder?: string;
|
|
54
57
|
searchDebounce?: number;
|
|
55
58
|
searchPlaceholder?: string;
|
|
59
|
+
showInlineSearch?: boolean;
|
|
56
60
|
tallOptionList?: boolean;
|
|
57
61
|
textKey?: string;
|
|
58
62
|
valueKey?: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spscommerce/ds-react",
|
|
3
3
|
"description": "SPS Design System React components",
|
|
4
|
-
"version": "8.42.
|
|
4
|
+
"version": "8.42.1",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/spscommerce/woodland/tree/main/packages/@spscommerce/ds-react",
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
"moment-timezone": "^0.5.28",
|
|
47
47
|
"react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
48
48
|
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
49
|
-
"@sps-woodland/
|
|
50
|
-
"@
|
|
51
|
-
"@spscommerce/ds-
|
|
52
|
-
"@spscommerce/
|
|
53
|
-
"@
|
|
54
|
-
"@spscommerce/positioning": "8.42.
|
|
49
|
+
"@sps-woodland/illustrations": "8.42.1",
|
|
50
|
+
"@sps-woodland/tabs": "8.42.1",
|
|
51
|
+
"@spscommerce/ds-colors": "8.42.1",
|
|
52
|
+
"@spscommerce/ds-shared": "8.42.1",
|
|
53
|
+
"@spscommerce/i18n": "8.42.1",
|
|
54
|
+
"@spscommerce/positioning": "8.42.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@react-spectrum/provider": "^3.4.1",
|
|
@@ -73,13 +73,13 @@
|
|
|
73
73
|
"raf-stub": "^3.0.0",
|
|
74
74
|
"react": "^16.9.0",
|
|
75
75
|
"react-dom": "^16.9.0",
|
|
76
|
-
"@sps-woodland/illustrations": "8.42.
|
|
77
|
-
"@sps-woodland/tabs": "8.42.
|
|
78
|
-
"@spscommerce/ds-colors": "8.42.
|
|
79
|
-
"@spscommerce/ds-shared": "8.42.
|
|
80
|
-
"@spscommerce/i18n": "8.42.
|
|
81
|
-
"@spscommerce/positioning": "8.42.
|
|
82
|
-
"test": "8.42.
|
|
76
|
+
"@sps-woodland/illustrations": "8.42.1",
|
|
77
|
+
"@sps-woodland/tabs": "8.42.1",
|
|
78
|
+
"@spscommerce/ds-colors": "8.42.1",
|
|
79
|
+
"@spscommerce/ds-shared": "8.42.1",
|
|
80
|
+
"@spscommerce/i18n": "8.42.1",
|
|
81
|
+
"@spscommerce/positioning": "8.42.1",
|
|
82
|
+
"test": "8.42.1"
|
|
83
83
|
},
|
|
84
84
|
"scripts": {
|
|
85
85
|
"build": "pnpm run build:js && pnpm run build:types",
|