@spscommerce/ds-react 8.42.3 → 8.42.4
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 +5200 -5191
- package/lib/index.umd.cjs +111 -111
- package/lib/option-list/SpsOptionListProps.d.ts +16 -2
- package/package.json +14 -14
|
@@ -2,6 +2,16 @@ import type { ChangeEventHandler, KeyboardEvent, MutableRefObject, PropsWithChil
|
|
|
2
2
|
import type { SpsActionMethod, Position } from "@spscommerce/ds-shared";
|
|
3
3
|
import type { Eventually } from "@spscommerce/utils";
|
|
4
4
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
5
|
+
/**
|
|
6
|
+
* Minimal keyboard event data to store in state.
|
|
7
|
+
* We don't store the full KeyboardEvent because React 19's profiler traverses
|
|
8
|
+
* all object properties in dev mode, and KeyboardEvent.view is a Window reference
|
|
9
|
+
* that causes SecurityError when accessed in cross-origin iframes.
|
|
10
|
+
*/
|
|
11
|
+
export interface MinimalKeyboardEvent {
|
|
12
|
+
key: string;
|
|
13
|
+
preventDefault: () => void;
|
|
14
|
+
}
|
|
5
15
|
export declare const spsOptionListPassthroughProps: {
|
|
6
16
|
docs: {
|
|
7
17
|
options: string;
|
|
@@ -55,7 +65,7 @@ export type SpsOptionListProps = PropsWithChildren<SpsGlobalPropTypes & SpsOptio
|
|
|
55
65
|
id: string;
|
|
56
66
|
isOpen?: boolean;
|
|
57
67
|
keepOpen?: boolean;
|
|
58
|
-
keyDown?:
|
|
68
|
+
keyDown?: MinimalKeyboardEvent | null;
|
|
59
69
|
nullOption?: string;
|
|
60
70
|
offsets?: number[];
|
|
61
71
|
onOptionListChanged?: (filteredListLength: number) => void;
|
|
@@ -71,5 +81,9 @@ export type SpsOptionListProps = PropsWithChildren<SpsGlobalPropTypes & SpsOptio
|
|
|
71
81
|
filterByTextAndCaptionKey?: boolean;
|
|
72
82
|
disableOptionsMemoization?: boolean;
|
|
73
83
|
disableDefaultOptionsFiltering?: boolean;
|
|
74
|
-
typeaheadEvent?:
|
|
84
|
+
typeaheadEvent?: MinimalKeyboardEvent;
|
|
75
85
|
}> & HTMLAttributes<HTMLDivElement>;
|
|
86
|
+
/**
|
|
87
|
+
* Helper to extract minimal keyboard event data for safe storage in React state.
|
|
88
|
+
*/
|
|
89
|
+
export declare function toMinimalKeyboardEvent(event: KeyboardEvent | React.KeyboardEvent<Element>): MinimalKeyboardEvent;
|
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.4",
|
|
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/illustrations": "8.42.
|
|
50
|
-
"@sps-woodland/tabs": "8.42.
|
|
51
|
-
"@spscommerce/ds-colors": "8.42.
|
|
52
|
-
"@spscommerce/ds-shared": "8.42.
|
|
53
|
-
"@spscommerce/i18n": "8.42.
|
|
54
|
-
"@spscommerce/positioning": "8.42.
|
|
49
|
+
"@sps-woodland/illustrations": "8.42.4",
|
|
50
|
+
"@sps-woodland/tabs": "8.42.4",
|
|
51
|
+
"@spscommerce/ds-colors": "8.42.4",
|
|
52
|
+
"@spscommerce/ds-shared": "8.42.4",
|
|
53
|
+
"@spscommerce/i18n": "8.42.4",
|
|
54
|
+
"@spscommerce/positioning": "8.42.4"
|
|
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.4",
|
|
77
|
+
"@sps-woodland/tabs": "8.42.4",
|
|
78
|
+
"@spscommerce/ds-colors": "8.42.4",
|
|
79
|
+
"@spscommerce/ds-shared": "8.42.4",
|
|
80
|
+
"@spscommerce/i18n": "8.42.4",
|
|
81
|
+
"@spscommerce/positioning": "8.42.4",
|
|
82
|
+
"test": "8.42.4"
|
|
83
83
|
},
|
|
84
84
|
"scripts": {
|
|
85
85
|
"build": "pnpm run build:js && pnpm run build:types",
|