@spscommerce/ds-react 5.8.1 → 5.10.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/fieldset/SpsFieldset.d.ts +1 -1
- package/lib/form/SpsForm.examples.d.ts +12 -0
- package/lib/form/hooks/useSpsForm.d.ts +3 -0
- package/lib/form/validation/types.d.ts +1 -0
- package/lib/index.cjs.js +209 -90
- package/lib/index.es.js +7900 -7659
- package/lib/side-nav/SpsSideNav.d.ts +9 -7
- package/lib/side-nav/SpsSideNavBranch.d.ts +1 -1
- package/package.json +9 -9
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
/** TODO: Fix circular deps, update to follow our patterns, then remove eslint override */
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import type { SpsIcon, TagKind } from "@spscommerce/ds-shared";
|
|
4
|
-
export interface
|
|
4
|
+
export interface SideNavItem {
|
|
5
5
|
name: string;
|
|
6
6
|
tag?: TagKind;
|
|
7
|
+
key?: string | number;
|
|
7
8
|
tagContent?: string;
|
|
8
|
-
subNavItems?:
|
|
9
|
+
subNavItems?: SideNavItem[];
|
|
9
10
|
icon?: SpsIcon;
|
|
10
11
|
}
|
|
11
12
|
export interface SideNavSection {
|
|
12
|
-
sectionTitle
|
|
13
|
-
|
|
13
|
+
sectionTitle?: string;
|
|
14
|
+
key?: string | number;
|
|
15
|
+
navItems: SideNavItem[];
|
|
14
16
|
}
|
|
15
|
-
export interface SideNavBranch extends
|
|
17
|
+
export interface SideNavBranch extends SideNavItem {
|
|
16
18
|
expanded: boolean;
|
|
17
19
|
}
|
|
18
20
|
export interface SpsSideNavProps {
|
|
19
21
|
title?: string;
|
|
20
22
|
titleIcon?: SpsIcon;
|
|
21
23
|
activeNavItem: string;
|
|
22
|
-
onNavChange?: (newNav: string) => void;
|
|
24
|
+
onNavChange?: (newNav: string, newNavKey?: string | number) => void;
|
|
23
25
|
navOptions: SideNavSection[];
|
|
24
26
|
tabs?: string[];
|
|
25
27
|
initialActiveTab?: string;
|
|
@@ -32,5 +34,5 @@ export interface SpsSideNavProps {
|
|
|
32
34
|
* @param nav SideNavItems[] array of navigation branches to be checked
|
|
33
35
|
* @param activeTab string currently active tab
|
|
34
36
|
*/
|
|
35
|
-
export declare const findParentBranches: (nav:
|
|
37
|
+
export declare const findParentBranches: (nav: SideNavItem[], activeTab: string) => boolean;
|
|
36
38
|
export declare const SpsSideNav: React.FC<SpsSideNavProps>;
|
|
@@ -4,6 +4,6 @@ import type { SideNavBranch } from "./SpsSideNav";
|
|
|
4
4
|
export interface SpsSideNavBranchProps {
|
|
5
5
|
branch: SideNavBranch;
|
|
6
6
|
activeBranch: string;
|
|
7
|
-
setActiveBranch: (activeChildBranchName: string) => void;
|
|
7
|
+
setActiveBranch: (activeChildBranchName: string, activeChildBranchKey?: string | number) => void;
|
|
8
8
|
}
|
|
9
9
|
export declare const SpsSideNavBranch: React.FC<SpsSideNavBranchProps>;
|
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": "5.
|
|
4
|
+
"version": "5.10.1",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/ds-react",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@react-stately/collections": "^3.3.3",
|
|
31
|
-
"@spscommerce/ds-colors": "5.
|
|
32
|
-
"@spscommerce/ds-shared": "5.
|
|
33
|
-
"@spscommerce/positioning": "5.
|
|
34
|
-
"@spscommerce/utils": "5.
|
|
31
|
+
"@spscommerce/ds-colors": "5.10.1",
|
|
32
|
+
"@spscommerce/ds-shared": "5.10.1",
|
|
33
|
+
"@spscommerce/positioning": "5.10.1",
|
|
34
|
+
"@spscommerce/utils": "5.10.1",
|
|
35
35
|
"moment": "^2.25.3",
|
|
36
36
|
"moment-timezone": "^0.5.28",
|
|
37
37
|
"react": "^16.9.0",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@react-stately/collections": "^3.3.3",
|
|
42
|
-
"@spscommerce/ds-colors": "5.
|
|
43
|
-
"@spscommerce/ds-shared": "5.
|
|
44
|
-
"@spscommerce/positioning": "5.
|
|
45
|
-
"@spscommerce/utils": "5.
|
|
42
|
+
"@spscommerce/ds-colors": "5.10.1",
|
|
43
|
+
"@spscommerce/ds-shared": "5.10.1",
|
|
44
|
+
"@spscommerce/positioning": "5.10.1",
|
|
45
|
+
"@spscommerce/utils": "5.10.1",
|
|
46
46
|
"@testing-library/react": "^9.3.2",
|
|
47
47
|
"@types/prop-types": "^15.7.1",
|
|
48
48
|
"@types/react": "^16.9.0",
|