@spscommerce/ds-react 5.33.11 → 6.0.0
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/dateRangePicker/SpsDateRangePicker.d.ts +13 -15
- package/lib/datepicker/SpsDatepicker.d.ts +10 -11
- package/lib/{datepicker-v2 → datepicker}/SpsDatepickerCalendar.d.ts +0 -0
- package/lib/{datepicker-v2 → datepicker}/SpsDatepickerPopup.d.ts +0 -0
- package/lib/datepicker/index.d.ts +2 -0
- package/lib/{datepicker-v2 → datepicker}/useCalendar.d.ts +0 -0
- package/lib/{datepicker-v2 → datepicker}/useMoment.d.ts +0 -0
- package/lib/{datepicker-v2 → datepicker}/utils.d.ts +0 -0
- package/lib/{datepicker-v2 → datepicker}/validation.d.ts +0 -0
- package/lib/index.cjs.js +426 -401
- package/lib/index.d.ts +0 -2
- package/lib/index.es.js +1414 -2862
- package/lib/modal/SpsModal.d.ts +9 -16
- package/lib/pagination/SpsPageSelector.d.ts +1 -0
- package/lib/pagination/SpsPagination.d.ts +1 -0
- package/lib/toggle/SpsToggle.d.ts +0 -4
- package/package.json +11 -11
- package/lib/datepicker-v2/SpsDateRangePickerV2.d.ts +0 -21
- package/lib/datepicker-v2/SpsDatepickerV2.d.ts +0 -18
- package/lib/datepicker-v2/index.d.ts +0 -4
- package/lib/modal/SpsModalAction.d.ts +0 -18
- package/lib/modal/SpsModalBody.d.ts +0 -10
- package/lib/modal/SpsModalFooter.d.ts +0 -16
- package/lib/modal/SpsModalHeader.d.ts +0 -11
- package/lib/modal/SpsModalOverlay.d.ts +0 -12
- package/lib/modal-v2/SpsModalV2.d.ts +0 -18
- package/lib/modal-v2/index.d.ts +0 -1
package/lib/modal/SpsModal.d.ts
CHANGED
|
@@ -1,25 +1,18 @@
|
|
|
1
|
+
import { ModalKind, ModalSize } from "@spscommerce/ds-shared";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import * as PropTypes from "../prop-types";
|
|
3
|
-
import { SpsModalHeader } from "./SpsModalHeader";
|
|
4
|
-
import { SpsModalOverlay } from "./SpsModalOverlay";
|
|
5
|
-
import { SpsModalBody } from "./SpsModalBody";
|
|
6
|
-
import { SpsModalFooter } from "./SpsModalFooter";
|
|
7
|
-
import { SpsModalAction } from "./SpsModalAction";
|
|
8
4
|
declare const propTypes: {
|
|
9
|
-
kind: PropTypes.Requireable<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
onOpen: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
-
size: PropTypes.Requireable<string>;
|
|
16
|
-
backdrop: PropTypes.Requireable<string>;
|
|
17
|
-
actionRequired: PropTypes.Requireable<boolean>;
|
|
5
|
+
kind: PropTypes.Requireable<ModalKind>;
|
|
6
|
+
size: PropTypes.Requireable<ModalSize>;
|
|
7
|
+
title: PropTypes.Requireable<string>;
|
|
8
|
+
onClose: PropTypes.Requireable<() => void>;
|
|
9
|
+
focusElementOnOpen: PropTypes.Requireable<React.MutableRefObject<HTMLElement>>;
|
|
18
10
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
19
11
|
className: PropTypes.Requireable<string>;
|
|
20
12
|
"data-testid": PropTypes.Requireable<string>;
|
|
21
13
|
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
22
14
|
};
|
|
23
15
|
export declare type SpsModalProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
24
|
-
declare function
|
|
25
|
-
export {
|
|
16
|
+
export declare function SpsModalFooter({ children }: SpsModalProps): JSX.Element;
|
|
17
|
+
export declare function SpsModal({ children, className, id: idProp, kind, size, onClose, focusElementOnOpen, title, ...rest }: SpsModalProps): JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -8,6 +8,7 @@ declare const propTypes: {
|
|
|
8
8
|
onPageChange: PropTypes.Requireable<(number: any) => void>;
|
|
9
9
|
page: PropTypes.Requireable<number>;
|
|
10
10
|
disabled: PropTypes.Requireable<boolean>;
|
|
11
|
+
unknownPageCount: PropTypes.Requireable<boolean>;
|
|
11
12
|
};
|
|
12
13
|
export declare type SpsPageSelectorProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
13
14
|
export declare function SpsPageSelector(props: SpsPageSelectorProps): JSX.Element;
|
|
@@ -10,6 +10,7 @@ declare const propTypes: {
|
|
|
10
10
|
pageSizeOptions: PropTypes.Requireable<number[]>;
|
|
11
11
|
totalResults: PropTypes.Requireable<number>;
|
|
12
12
|
disabled: PropTypes.Requireable<boolean>;
|
|
13
|
+
unknownPageCount: PropTypes.Requireable<boolean>;
|
|
13
14
|
};
|
|
14
15
|
export declare type SpsPaginationProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
15
16
|
export declare function SpsPagination(props: SpsPaginationProps): JSX.Element;
|
|
@@ -4,15 +4,11 @@ import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
|
|
|
4
4
|
import * as PropTypes from "../prop-types";
|
|
5
5
|
declare const propTypes: {
|
|
6
6
|
active: PropTypes.Requireable<boolean>;
|
|
7
|
-
activeDescription: PropTypes.Deprecated<string>;
|
|
8
|
-
activeLabel: PropTypes.Deprecated<string>;
|
|
9
7
|
description: PropTypes.Requireable<string>;
|
|
10
8
|
disabled: PropTypes.Requireable<boolean>;
|
|
11
9
|
formControl: PropTypes.Requireable<SpsFormControl<boolean>>;
|
|
12
10
|
formMeta: PropTypes.Requireable<SpsFormFieldMeta<boolean>>;
|
|
13
11
|
id: PropTypes.Requireable<string>;
|
|
14
|
-
inactiveDescription: PropTypes.Deprecated<string>;
|
|
15
|
-
inactiveLabel: PropTypes.Deprecated<string>;
|
|
16
12
|
label: PropTypes.Requireable<string>;
|
|
17
13
|
large: PropTypes.Requireable<boolean>;
|
|
18
14
|
onChange: PropTypes.Requireable<(isActive: boolean) => void>;
|
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": "
|
|
4
|
+
"version": "6.0.0",
|
|
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,11 +28,11 @@
|
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@react-stately/collections": "^3.3.3",
|
|
31
|
-
"@spscommerce/ds-colors": "
|
|
32
|
-
"@spscommerce/ds-illustrations": "
|
|
33
|
-
"@spscommerce/ds-shared": "
|
|
34
|
-
"@spscommerce/positioning": "
|
|
35
|
-
"@spscommerce/utils": "
|
|
31
|
+
"@spscommerce/ds-colors": "6.0.0",
|
|
32
|
+
"@spscommerce/ds-illustrations": "6.0.0",
|
|
33
|
+
"@spscommerce/ds-shared": "6.0.0",
|
|
34
|
+
"@spscommerce/positioning": "6.0.0",
|
|
35
|
+
"@spscommerce/utils": "6.0.0",
|
|
36
36
|
"moment": "^2.25.3",
|
|
37
37
|
"moment-timezone": "^0.5.28",
|
|
38
38
|
"react": "^16.9.0",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@react-stately/collections": "^3.3.3",
|
|
43
|
-
"@spscommerce/ds-colors": "
|
|
44
|
-
"@spscommerce/ds-illustrations": "
|
|
45
|
-
"@spscommerce/ds-shared": "
|
|
46
|
-
"@spscommerce/positioning": "
|
|
47
|
-
"@spscommerce/utils": "
|
|
43
|
+
"@spscommerce/ds-colors": "6.0.0",
|
|
44
|
+
"@spscommerce/ds-illustrations": "6.0.0",
|
|
45
|
+
"@spscommerce/ds-shared": "6.0.0",
|
|
46
|
+
"@spscommerce/positioning": "6.0.0",
|
|
47
|
+
"@spscommerce/utils": "6.0.0",
|
|
48
48
|
"@testing-library/react": "^9.3.2",
|
|
49
49
|
"@types/prop-types": "^15.7.1",
|
|
50
50
|
"@types/react": "^16.9.0",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { SimpleDate, SimpleDateRange, DatePreset } from "@spscommerce/ds-shared";
|
|
2
|
-
import * as PropTypes from "../prop-types";
|
|
3
|
-
import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
|
|
4
|
-
declare const propTypes: {
|
|
5
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
6
|
-
formMeta: PropTypes.Requireable<SpsFormFieldMeta<SimpleDateRange | DatePreset>>;
|
|
7
|
-
maxDate: PropTypes.Requireable<SimpleDate>;
|
|
8
|
-
minDate: PropTypes.Requireable<SimpleDate>;
|
|
9
|
-
onChange: PropTypes.Requireable<(newDateRange: SimpleDateRange | DatePreset) => void>;
|
|
10
|
-
presets: PropTypes.Requireable<DatePreset[]>;
|
|
11
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
12
|
-
className: PropTypes.Requireable<string>;
|
|
13
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
14
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
15
|
-
};
|
|
16
|
-
export declare type SpsDateRangePickerV2Props = {
|
|
17
|
-
value?: SimpleDateRange | DatePreset;
|
|
18
|
-
} & Omit<PropTypes.InferTS<typeof propTypes, HTMLInputElement>, "value">;
|
|
19
|
-
export declare const DEFAULT_PRESETS: DatePreset[];
|
|
20
|
-
export declare function SpsDateRangePickerV2({ children, className, disabled, formMeta, id, maxDate, minDate, onChange, presets, value, "data-testid": testId, ...rest }: SpsDateRangePickerV2Props): JSX.Element;
|
|
21
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { SimpleDate } from "@spscommerce/ds-shared";
|
|
2
|
-
import * as PropTypes from "../prop-types";
|
|
3
|
-
import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
|
|
4
|
-
declare const propTypes: {
|
|
5
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
6
|
-
formMeta: PropTypes.Requireable<SpsFormFieldMeta<SimpleDate>>;
|
|
7
|
-
maxDate: PropTypes.Requireable<SimpleDate>;
|
|
8
|
-
minDate: PropTypes.Requireable<SimpleDate>;
|
|
9
|
-
onChange: PropTypes.Requireable<(newDate: SimpleDate) => void>;
|
|
10
|
-
value: PropTypes.Requireable<SimpleDate>;
|
|
11
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
12
|
-
className: PropTypes.Requireable<string>;
|
|
13
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
14
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
15
|
-
};
|
|
16
|
-
export declare type SpsDatepickerV2Props = PropTypes.InferTS<typeof propTypes, HTMLInputElement>;
|
|
17
|
-
export declare function SpsDatepickerV2({ children, className, disabled, formMeta, id, maxDate, minDate, onChange, value, "data-testid": testId, ...rest }: SpsDatepickerV2Props): JSX.Element;
|
|
18
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ButtonKind } from "@spscommerce/ds-shared";
|
|
2
|
-
import * as PropTypes from "../prop-types";
|
|
3
|
-
declare const propTypes: {
|
|
4
|
-
kind: PropTypes.Requireable<ButtonKind>;
|
|
5
|
-
closeModal: PropTypes.Requireable<() => void>;
|
|
6
|
-
handleAsync: PropTypes.Requireable<PropTypes.InferProps<{
|
|
7
|
-
turnAsyncOn: PropTypes.Requireable<(...args: any[]) => any>;
|
|
8
|
-
turnAsyncOff: PropTypes.Requireable<(...args: any[]) => any>;
|
|
9
|
-
isAsyncOn: PropTypes.Requireable<boolean>;
|
|
10
|
-
}>>;
|
|
11
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
12
|
-
className: PropTypes.Requireable<string>;
|
|
13
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
14
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
15
|
-
};
|
|
16
|
-
export declare type SpsModalActionProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
17
|
-
export declare function SpsModalAction(props: SpsModalActionProps): JSX.Element;
|
|
18
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as PropTypes from "../prop-types";
|
|
2
|
-
declare const propTypes: {
|
|
3
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
4
|
-
className: PropTypes.Requireable<string>;
|
|
5
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
6
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
7
|
-
};
|
|
8
|
-
export declare type SpsModalBodyProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
9
|
-
export declare function SpsModalBody(props: SpsModalBodyProps): JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as PropTypes from "../prop-types";
|
|
2
|
-
declare const propTypes: {
|
|
3
|
-
handleAsync: PropTypes.Requireable<PropTypes.InferProps<{
|
|
4
|
-
turnAsyncOn: PropTypes.Requireable<(...args: any[]) => any>;
|
|
5
|
-
turnAsyncOff: PropTypes.Requireable<(...args: any[]) => any>;
|
|
6
|
-
isAsyncOn: PropTypes.Requireable<boolean>;
|
|
7
|
-
}>>;
|
|
8
|
-
closeModal: PropTypes.Requireable<(...args: any[]) => any>;
|
|
9
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
10
|
-
className: PropTypes.Requireable<string>;
|
|
11
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
12
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
13
|
-
};
|
|
14
|
-
export declare type SpsModalFooterProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
15
|
-
export declare function SpsModalFooter(props: SpsModalFooterProps): JSX.Element;
|
|
16
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as PropTypes from "../prop-types";
|
|
2
|
-
declare const propTypes: {
|
|
3
|
-
header: PropTypes.Requireable<string | (() => string)>;
|
|
4
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
5
|
-
className: PropTypes.Requireable<string>;
|
|
6
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
7
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
8
|
-
};
|
|
9
|
-
export declare type SpsModalHeaderProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
10
|
-
export declare function SpsModalHeader(props: SpsModalHeaderProps): JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as PropTypes from "../prop-types";
|
|
2
|
-
declare const propTypes: {
|
|
3
|
-
onOverlayClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
4
|
-
backdrop: PropTypes.Requireable<string>;
|
|
5
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
6
|
-
className: PropTypes.Requireable<string>;
|
|
7
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
8
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
9
|
-
};
|
|
10
|
-
export declare type SpsModalOverlayProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
11
|
-
export declare function SpsModalOverlay(props: SpsModalOverlayProps): JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ModalKind, ModalSize } from "@spscommerce/ds-shared";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import * as PropTypes from "../prop-types";
|
|
4
|
-
declare const propTypes: {
|
|
5
|
-
kind: PropTypes.Requireable<ModalKind>;
|
|
6
|
-
size: PropTypes.Requireable<ModalSize>;
|
|
7
|
-
title: PropTypes.Requireable<string>;
|
|
8
|
-
onClose: PropTypes.Requireable<() => void>;
|
|
9
|
-
focusElementOnOpen: PropTypes.Requireable<React.MutableRefObject<HTMLElement>>;
|
|
10
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
11
|
-
className: PropTypes.Requireable<string>;
|
|
12
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
13
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
14
|
-
};
|
|
15
|
-
export declare type SpsModalV2Props = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
16
|
-
export declare function SpsModalV2Footer({ children }: SpsModalV2Props): JSX.Element;
|
|
17
|
-
export declare function SpsModalV2({ children, className, id: idProp, kind, size, onClose, focusElementOnOpen, title, ...rest }: SpsModalV2Props): JSX.Element;
|
|
18
|
-
export {};
|
package/lib/modal-v2/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./SpsModalV2";
|