@spscommerce/ds-react 6.0.0-rc1 → 6.1.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/autocomplete/SpsAutocomplete.d.ts +2 -1
- package/lib/dropdown/SpsDropdown.d.ts +1 -0
- package/lib/fieldset/SpsFieldset.d.ts +1 -1
- package/lib/index.cjs.js +514 -357
- package/lib/index.es.js +755 -322
- package/lib/multi-select/SpsMultiSelect.d.ts +2 -1
- package/lib/option-list/SpsOptionListProps.d.ts +2 -0
- package/lib/pagination/SpsPageSelector.d.ts +1 -0
- package/lib/pagination/SpsPagination.d.ts +1 -0
- package/lib/product-bar/SpsProductBar.d.ts +1 -1
- package/lib/select/SpsSelect.d.ts +3 -1
- package/lib/table/SpsTable.d.ts +5 -2
- package/lib/table/SpsTableContext.d.ts +20 -0
- package/lib/table/SpsTableHead.d.ts +1 -4
- package/lib/table/SpsTableHeader.d.ts +3 -5
- package/lib/table/SpsTableRow.d.ts +1 -4
- package/lib/table/index.d.ts +1 -0
- package/lib/table/useColumnResizer.d.ts +8 -0
- package/lib/table/usePinnedStyles.d.ts +1 -1
- package/lib/tile-list/SpsTile.d.ts +3 -0
- package/lib/utils/Provide.d.ts +24 -0
- package/lib/utils/bindProps.d.ts +33 -0
- package/lib/utils/index.d.ts +2 -0
- package/package.json +13 -12
- package/lib/datepicker/SpsDateRangePicker.d.ts +0 -21
- package/lib/datepicker-v2/SpsDateRangePickerV2.d.ts +0 -21
- package/lib/datepicker-v2/SpsDatepickerCalendar.d.ts +0 -18
- package/lib/datepicker-v2/SpsDatepickerPopup.d.ts +0 -13
- package/lib/datepicker-v2/SpsDatepickerV2.d.ts +0 -18
- package/lib/datepicker-v2/index.d.ts +0 -4
- package/lib/datepicker-v2/useCalendar.d.ts +0 -2
- package/lib/datepicker-v2/useMoment.d.ts +0 -3
- package/lib/datepicker-v2/utils.d.ts +0 -23
- package/lib/datepicker-v2/validation.d.ts +0 -10
- 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
|
@@ -28,11 +28,12 @@ declare const propTypes: {
|
|
|
28
28
|
loading: PropTypes.Requireable<boolean>;
|
|
29
29
|
maxHeightOptionListPx: PropTypes.Requireable<number>;
|
|
30
30
|
maxHeightOptionListRem: PropTypes.Requireable<number>;
|
|
31
|
+
disableOptionsMemoization: PropTypes.Requireable<boolean>;
|
|
31
32
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
32
33
|
className: PropTypes.Requireable<string>;
|
|
33
34
|
"data-testid": PropTypes.Requireable<string>;
|
|
34
35
|
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
35
36
|
};
|
|
36
37
|
export declare type SpsMultiSelectProps = PropTypes.InferTS<typeof propTypes, HTMLInputElement>;
|
|
37
|
-
export declare function SpsMultiSelect({ action, captionKey, className, clearSearchOnBlur, debounce, disabled, disableSelected, comparisonKey, formControl, formMeta, hideSelected, id, onChange, onSearchChange, options, placeholder, tallOptionList, textKey, unsafelyReplaceClassName, value, zeroState, loading, icon, maxHeightOptionListPx, maxHeightOptionListRem, "data-testid": testId, ...rest }: SpsMultiSelectProps): JSX.Element;
|
|
38
|
+
export declare function SpsMultiSelect({ action, captionKey, className, clearSearchOnBlur, debounce, disabled, disableSelected, comparisonKey, formControl, formMeta, hideSelected, id, onChange, onSearchChange, options, placeholder, tallOptionList, textKey, unsafelyReplaceClassName, value, zeroState, loading, icon, maxHeightOptionListPx, maxHeightOptionListRem, disableOptionsMemoization, "data-testid": testId, ...rest }: SpsMultiSelectProps): JSX.Element;
|
|
38
39
|
export {};
|
|
@@ -15,6 +15,7 @@ export declare const spsOptionListPassthroughProps: {
|
|
|
15
15
|
zeroState: string;
|
|
16
16
|
maxHeightPx: string;
|
|
17
17
|
maxHeightRem: string;
|
|
18
|
+
disableOptionsMemoization: string;
|
|
18
19
|
};
|
|
19
20
|
propTypes: {
|
|
20
21
|
captionKey: PropTypes.Requireable<string>;
|
|
@@ -57,6 +58,7 @@ export declare const propTypes: {
|
|
|
57
58
|
ignoreWidthStyles: PropTypes.Requireable<boolean>;
|
|
58
59
|
loading: PropTypes.Requireable<boolean>;
|
|
59
60
|
filterByTextAndCaptionKey: PropTypes.Requireable<boolean>;
|
|
61
|
+
disableOptionsMemoization: PropTypes.Requireable<boolean>;
|
|
60
62
|
hideInlineSearch: PropTypes.Requireable<boolean>;
|
|
61
63
|
onSearchChange: PropTypes.Requireable<ChangeEventHandler<Element>>;
|
|
62
64
|
search: PropTypes.Requireable<string>;
|
|
@@ -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;
|
|
@@ -6,7 +6,7 @@ declare const propTypes: {
|
|
|
6
6
|
onTabChange: PropTypes.Requireable<(newTab: string) => void>;
|
|
7
7
|
onProductNameClick: PropTypes.Requireable<React.MouseEventHandler<Element>>;
|
|
8
8
|
productLogoSrc: PropTypes.Requireable<string>;
|
|
9
|
-
productName: PropTypes.
|
|
9
|
+
productName: PropTypes.Requireable<string>;
|
|
10
10
|
productNameHref: PropTypes.Requireable<string>;
|
|
11
11
|
tabs: PropTypes.Requireable<string[]>;
|
|
12
12
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
@@ -14,6 +14,7 @@ declare const propTypes: {
|
|
|
14
14
|
notClearable: PropTypes.Requireable<boolean>;
|
|
15
15
|
options: PropTypes.Validator<any[] | Promise<any[]> | ((filter?: string) => Eventually<any[]>)>;
|
|
16
16
|
onChange: PropTypes.Requireable<React.ChangeEventHandler<Element>>;
|
|
17
|
+
onOpen: PropTypes.Requireable<(...args: any[]) => any>;
|
|
17
18
|
placeholder: PropTypes.Requireable<string>;
|
|
18
19
|
searchDebounce: PropTypes.Requireable<number>;
|
|
19
20
|
searchPlaceholder: PropTypes.Requireable<string>;
|
|
@@ -27,13 +28,14 @@ declare const propTypes: {
|
|
|
27
28
|
filterByTextAndCaptionKey: PropTypes.Requireable<boolean>;
|
|
28
29
|
maxHeightOptionListPx: PropTypes.Requireable<number>;
|
|
29
30
|
maxHeightOptionListRem: PropTypes.Requireable<number>;
|
|
31
|
+
disableOptionsMemoization: PropTypes.Requireable<boolean>;
|
|
30
32
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
31
33
|
className: PropTypes.Requireable<string>;
|
|
32
34
|
"data-testid": PropTypes.Requireable<string>;
|
|
33
35
|
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
34
36
|
};
|
|
35
37
|
export declare type SpsSelectProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
36
|
-
export declare const SpsSelect: React.ForwardRefExoticComponent<Pick<SpsSelectProps, "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "data-testid" | "unsafelyReplaceClassName" | "formMeta" | "formControl" | "loading" | "filterByTextAndCaptionKey" | "searchDebounce" | "searchPlaceholder" | "captionKey" | "comparisonKey" | "options" | "textKey" | "valueKey" | "zeroState" | "tallOptionList" | "maxHeightOptionListPx" | "maxHeightOptionListRem" | "notClearable" | "autoFixWidth"> & React.RefAttributes<{
|
|
38
|
+
export declare const SpsSelect: React.ForwardRefExoticComponent<Pick<SpsSelectProps, "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "data-testid" | "unsafelyReplaceClassName" | "formMeta" | "formControl" | "loading" | "filterByTextAndCaptionKey" | "disableOptionsMemoization" | "searchDebounce" | "searchPlaceholder" | "captionKey" | "comparisonKey" | "options" | "textKey" | "valueKey" | "zeroState" | "tallOptionList" | "maxHeightOptionListPx" | "maxHeightOptionListRem" | "onOpen" | "notClearable" | "autoFixWidth"> & React.RefAttributes<{
|
|
37
39
|
focus: () => void;
|
|
38
40
|
}>>;
|
|
39
41
|
export {};
|
package/lib/table/SpsTable.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SortChangeHandler, SortedColumn } from "@spscommerce/ds-shared";
|
|
1
|
+
import type { SortChangeHandler, SortedColumn, ResizeState, ResizeStateChangeHandler } from "@spscommerce/ds-shared";
|
|
2
2
|
import * as PropTypes from "../prop-types";
|
|
3
3
|
declare const propTypes: {
|
|
4
4
|
onSortChange: PropTypes.Requireable<SortChangeHandler>;
|
|
@@ -6,11 +6,14 @@ declare const propTypes: {
|
|
|
6
6
|
selectable: PropTypes.Requireable<boolean>;
|
|
7
7
|
maxHeightPx: PropTypes.Requireable<number>;
|
|
8
8
|
maxHeightRem: PropTypes.Requireable<number>;
|
|
9
|
+
resizeable: PropTypes.Requireable<boolean>;
|
|
10
|
+
resizeState: PropTypes.Requireable<ResizeState>;
|
|
11
|
+
onResizeStateChange: PropTypes.Requireable<ResizeStateChangeHandler>;
|
|
9
12
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
10
13
|
className: PropTypes.Requireable<string>;
|
|
11
14
|
"data-testid": PropTypes.Requireable<string>;
|
|
12
15
|
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
13
16
|
};
|
|
14
17
|
export declare type SpsTableProps = PropTypes.InferTS<typeof propTypes, HTMLTableElement>;
|
|
15
|
-
export declare function SpsTable(
|
|
18
|
+
export declare function SpsTable({ children, className, onSortChange, sort, "data-testid": testId, unsafelyReplaceClassName, maxHeightPx, maxHeightRem, resizeable, resizeState, onResizeStateChange, ...rest }: SpsTableProps): JSX.Element;
|
|
16
19
|
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SortChangeHandler, SortedColumn, ResizeState, ResizeStateChangeHandler } from "@spscommerce/ds-shared";
|
|
3
|
+
interface SpsTableContextValue {
|
|
4
|
+
resizeable: boolean;
|
|
5
|
+
resizeState: ResizeState;
|
|
6
|
+
setResizeState: ResizeStateChangeHandler;
|
|
7
|
+
setSingleResizeState: (resizeKey: string, columnWidth: number | null) => void;
|
|
8
|
+
sort: SortedColumn[];
|
|
9
|
+
setSort: SortChangeHandler;
|
|
10
|
+
}
|
|
11
|
+
declare const SpsTableContext: React.Context<SpsTableContextValue>;
|
|
12
|
+
interface SpsTableContextProviderProps {
|
|
13
|
+
resizeable?: boolean;
|
|
14
|
+
sort?: SortedColumn[];
|
|
15
|
+
onSortChange?: SortChangeHandler;
|
|
16
|
+
resizeState?: ResizeState;
|
|
17
|
+
onResizeStateChange?: ResizeStateChangeHandler;
|
|
18
|
+
}
|
|
19
|
+
declare const SpsTableContextProvider: React.FC<SpsTableContextProviderProps>;
|
|
20
|
+
export { SpsTableContext, SpsTableContextProvider };
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type { SortChangeHandler, SortedColumn } from "@spscommerce/ds-shared";
|
|
2
1
|
import * as PropTypes from "../prop-types";
|
|
3
2
|
declare const propTypes: {
|
|
4
|
-
onSortChange: PropTypes.Requireable<SortChangeHandler>;
|
|
5
|
-
currentSort: PropTypes.Requireable<SortedColumn[]>;
|
|
6
3
|
pinned: PropTypes.Requireable<boolean>;
|
|
7
4
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
8
5
|
className: PropTypes.Requireable<string>;
|
|
@@ -10,6 +7,6 @@ declare const propTypes: {
|
|
|
10
7
|
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
11
8
|
};
|
|
12
9
|
export declare type SpsTableHeadProps = PropTypes.InferTS<typeof propTypes, HTMLTableSectionElement>;
|
|
13
|
-
export declare function SpsTableHead(
|
|
10
|
+
export declare function SpsTableHead({ children, className, "data-testid": testId, unsafelyReplaceClassName, pinned, ...rest }: SpsTableHeadProps): JSX.Element;
|
|
14
11
|
export declare function SpsThead(props: SpsTableHeadProps): JSX.Element;
|
|
15
12
|
export {};
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import type { SortChangeHandler, SortedColumn } from "@spscommerce/ds-shared";
|
|
2
1
|
import * as PropTypes from "../prop-types";
|
|
3
2
|
declare const propTypes: {
|
|
4
3
|
controlCell: PropTypes.Requireable<boolean>;
|
|
5
|
-
currentSort: PropTypes.Requireable<SortedColumn[]>;
|
|
6
|
-
onSortChange: PropTypes.Requireable<SortChangeHandler>;
|
|
7
4
|
sortKey: PropTypes.Requireable<string>;
|
|
5
|
+
resizeKey: PropTypes.Requireable<string>;
|
|
8
6
|
pinned: PropTypes.Requireable<boolean>;
|
|
9
7
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
10
8
|
className: PropTypes.Requireable<string>;
|
|
11
9
|
"data-testid": PropTypes.Requireable<string>;
|
|
12
10
|
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
13
11
|
};
|
|
14
|
-
export declare type SpsTableHeaderProps = PropTypes.InferTS<typeof propTypes,
|
|
15
|
-
export declare function SpsTableHeader(
|
|
12
|
+
export declare type SpsTableHeaderProps = PropTypes.InferTS<typeof propTypes, HTMLTableCellElement>;
|
|
13
|
+
export declare function SpsTableHeader({ children, className, controlCell, sortKey, resizeKey, "data-testid": testId, unsafelyReplaceClassName, pinned, ...rest }: SpsTableHeaderProps): JSX.Element;
|
|
16
14
|
export declare function SpsTh(props: SpsTableHeaderProps): JSX.Element;
|
|
17
15
|
export {};
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import type { SortChangeHandler, SortedColumn } from "@spscommerce/ds-shared";
|
|
2
1
|
import * as PropTypes from "../prop-types";
|
|
3
2
|
declare const propTypes: {
|
|
4
|
-
currentSort: PropTypes.Requireable<SortedColumn[]>;
|
|
5
|
-
onSortChange: PropTypes.Requireable<SortChangeHandler>;
|
|
6
3
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
7
4
|
className: PropTypes.Requireable<string>;
|
|
8
5
|
"data-testid": PropTypes.Requireable<string>;
|
|
9
6
|
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
10
7
|
};
|
|
11
8
|
export declare type SpsTableRowProps = PropTypes.InferTS<typeof propTypes, HTMLTableRowElement>;
|
|
12
|
-
export declare function SpsTableRow(
|
|
9
|
+
export declare function SpsTableRow({ children, className, "data-testid": testId, unsafelyReplaceClassName, ...rest }: SpsTableRowProps): JSX.Element;
|
|
13
10
|
export declare function SpsTr(props: SpsTableRowProps): JSX.Element;
|
|
14
11
|
export {};
|
package/lib/table/index.d.ts
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare const useColumnResizer: ({ tableHeaderRef, resizerRef, resizeKey, }: {
|
|
3
|
+
tableHeaderRef: React.MutableRefObject<HTMLTableCellElement>;
|
|
4
|
+
resizerRef: React.MutableRefObject<HTMLSpanElement>;
|
|
5
|
+
resizeKey: string;
|
|
6
|
+
}) => {
|
|
7
|
+
isResizeable: boolean;
|
|
8
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
export declare const usePinnedCellStyle: (isPinned: boolean, elementRef: React.MutableRefObject<
|
|
2
|
+
export declare const usePinnedCellStyle: (isPinned: boolean, elementRef: React.MutableRefObject<HTMLTableCellElement>) => void;
|
|
3
3
|
export declare const usePinnedTableBackgroundStyle: (containerRef: React.MutableRefObject<HTMLDivElement>) => void;
|
|
4
4
|
export declare const usePinnedTableHeadStyle: (containerRef: React.MutableRefObject<HTMLDivElement>, maxHeight: number) => void;
|
|
5
5
|
export declare const useMaxHeightTableStyle: (containerRef: React.MutableRefObject<HTMLDivElement>, maxHeight: number) => void;
|
|
@@ -4,8 +4,11 @@ declare const propTypes: {
|
|
|
4
4
|
target: PropTypes.Requireable<string>;
|
|
5
5
|
icon: PropTypes.Validator<PropTypes.ReactNodeOrRenderFn>;
|
|
6
6
|
error: PropTypes.Requireable<boolean>;
|
|
7
|
+
errorIcon: PropTypes.Requireable<PropTypes.ReactNodeOrRenderFn>;
|
|
7
8
|
title: PropTypes.Validator<string>;
|
|
8
9
|
warning: PropTypes.Requireable<boolean>;
|
|
10
|
+
warningIcon: PropTypes.Requireable<PropTypes.ReactNodeOrRenderFn>;
|
|
11
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
9
12
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
10
13
|
className: PropTypes.Requireable<string>;
|
|
11
14
|
"data-testid": PropTypes.Requireable<string>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* This is the use case for Nested: wrapping JSX in a flat list of
|
|
4
|
+
* multiple React context providers instead of creating a pyramid of doom.
|
|
5
|
+
*
|
|
6
|
+
* bindProps (see bindProps.tsx in this same directory) was
|
|
7
|
+
* created to be used with this, so you can set props on the
|
|
8
|
+
* providers, including and especially `value` on the built-in
|
|
9
|
+
* context object's `.Provider` component.
|
|
10
|
+
*
|
|
11
|
+
* <Provide providers={[
|
|
12
|
+
* ProplessProviderFromALibrary,
|
|
13
|
+
* bindProps(MyReallyUsefulContext.Provider, { value: "foo" }),
|
|
14
|
+
* // ...etc
|
|
15
|
+
* ]}>
|
|
16
|
+
* (component tree that will have access to context from these providers)
|
|
17
|
+
* </Provide>
|
|
18
|
+
*/
|
|
19
|
+
declare type ProvideProps = React.HTMLProps<HTMLDivElement> & {
|
|
20
|
+
providers?: React.ElementType[];
|
|
21
|
+
};
|
|
22
|
+
export declare const Provide: React.FC<ProvideProps>;
|
|
23
|
+
export declare const SpsApp: React.FC<ProvideProps>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* takes in an ElementType (e.g. a React component) and
|
|
4
|
+
* returns a new version of that component where certain
|
|
5
|
+
* props are ALWAYS set to predefined values.
|
|
6
|
+
*
|
|
7
|
+
* for example, consider the following component:
|
|
8
|
+
* const Foo: React.FC<{
|
|
9
|
+
* a: string;
|
|
10
|
+
* b: string;
|
|
11
|
+
* }> = function ({ a, b }) {
|
|
12
|
+
* return (
|
|
13
|
+
* <span>
|
|
14
|
+
* a is {a} and b is {b}
|
|
15
|
+
* </span>
|
|
16
|
+
* );
|
|
17
|
+
* };
|
|
18
|
+
*
|
|
19
|
+
* <Foo a="dog" b="cat"/> would produce <span>a is dog and b is cat</span>
|
|
20
|
+
*
|
|
21
|
+
* But if you bind the prop a...
|
|
22
|
+
* const FooWithBoundA = bindProps(Foo, { a: "parakeet" });
|
|
23
|
+
*
|
|
24
|
+
* then <FooWithBoundA b="cat"/> will produce <span>a is parakeet and b is cat</span>
|
|
25
|
+
*
|
|
26
|
+
* The type of the props is the same, except that prop a is pre-set and so no
|
|
27
|
+
* longer something that can be passed in.
|
|
28
|
+
*
|
|
29
|
+
* This was created to be used with <Provide> (see Provide.tsx in this same directory),
|
|
30
|
+
* but may have other use cases.
|
|
31
|
+
*/
|
|
32
|
+
export declare type BoundFC<T extends React.ElementType, K extends Partial<React.ComponentProps<T>>> = React.FC<Omit<React.ComponentProps<T>, keyof K>>;
|
|
33
|
+
export declare function bindProps<T extends React.ElementType, K extends Partial<React.ComponentProps<T>>>(E: T, boundProps: K, deps?: unknown[]): BoundFC<T, K>;
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
export * from "./bindProps";
|
|
1
2
|
export * from "./contentOf";
|
|
2
3
|
export * from "./FauxChangeEvent";
|
|
3
4
|
export * from "./getPosition";
|
|
5
|
+
export * from "./Provide";
|
|
4
6
|
export * from "./selectChildren";
|
|
5
7
|
export * from "./useCheckDeprecatedProps";
|
|
6
8
|
export * from "./useDidUpdateEffect";
|
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": "6.
|
|
4
|
+
"version": "6.1.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,11 +28,11 @@
|
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@react-stately/collections": "^3.3.3",
|
|
31
|
-
"@spscommerce/ds-colors": "6.
|
|
32
|
-
"@spscommerce/ds-illustrations": "6.
|
|
33
|
-
"@spscommerce/ds-shared": "6.
|
|
34
|
-
"@spscommerce/positioning": "6.
|
|
35
|
-
"@spscommerce/utils": "6.
|
|
31
|
+
"@spscommerce/ds-colors": "6.1.1",
|
|
32
|
+
"@spscommerce/ds-illustrations": "6.1.1",
|
|
33
|
+
"@spscommerce/ds-shared": "6.1.1",
|
|
34
|
+
"@spscommerce/positioning": "6.1.1",
|
|
35
|
+
"@spscommerce/utils": "6.1.1",
|
|
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": "6.
|
|
44
|
-
"@spscommerce/ds-illustrations": "6.
|
|
45
|
-
"@spscommerce/ds-shared": "6.
|
|
46
|
-
"@spscommerce/positioning": "6.
|
|
47
|
-
"@spscommerce/utils": "6.
|
|
43
|
+
"@spscommerce/ds-colors": "6.1.1",
|
|
44
|
+
"@spscommerce/ds-illustrations": "6.1.1",
|
|
45
|
+
"@spscommerce/ds-shared": "6.1.1",
|
|
46
|
+
"@spscommerce/positioning": "6.1.1",
|
|
47
|
+
"@spscommerce/utils": "6.1.1",
|
|
48
48
|
"@testing-library/react": "^9.3.2",
|
|
49
49
|
"@types/prop-types": "^15.7.1",
|
|
50
50
|
"@types/react": "^16.9.0",
|
|
@@ -64,5 +64,6 @@
|
|
|
64
64
|
"watch": "vite build --watch",
|
|
65
65
|
"clean": "git clean -fdX",
|
|
66
66
|
"pub": "pnpm pack && node ../../scripts/publish-package.js"
|
|
67
|
-
}
|
|
67
|
+
},
|
|
68
|
+
"readme": "[//]: # \"START_AUTOGENERATED\"\n\n## [@spscommerce/ds-react](https://github.com/spscommerce/ui-angular/tree/master/packages/@spscommerce/ds-react#readme)\n\n\n\n\n\nSPS Design System React components \n \n ### Installation \n \n ```shell\nnpm install --save @spscommerce/ds-react\n```\n\n#### Peer Dependencies\n\n<div class=\"row\">\n <div class=\"col-5\"> \n <table class=\"sps-table\">\n <thead class=\"sps-table__head\">\n <tr class=\"sps-table__row\">\n <th class=\"sps-table__header\">\n <span class=\"sps-table__header-cell-body\"> \n Package\n </span>\n </th>\n <th class=\"sps-table__header text-right\">\n <span class=\"sps-table__header-cell-body\"> \n Version\n </span>\n </th>\n </tr>\n </thead>\n <tbody class=\"sps-table__body\">\n <tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/ds-shared#readme\">@spscommerce/ds-shared</a></td><td class=\"sps-table__cell text-right\">^1.1.0</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/positioning#readme\">@spscommerce/positioning</a></td><td class=\"sps-table__cell text-right\">^1.1.0</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/utils#readme\">@spscommerce/utils</a></td><td class=\"sps-table__cell text-right\">^1.1.0</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"lukeed/clsx\">clsx</a></td><td class=\"sps-table__cell text-right\">^1.0.3</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"https://momentjs.com\">moment</a></td><td class=\"sps-table__cell text-right\">^2.25.3</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"http://momentjs.com/timezone/\">moment-timezone</a></td><td class=\"sps-table__cell text-right\">^0.5.28</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"ai/nanoid\">nanoid</a></td><td class=\"sps-table__cell text-right\">^2.1.6</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"https://facebook.github.io/react/\">prop-types</a></td><td class=\"sps-table__cell text-right\">^15.7.2</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"https://reactjs.org/\">react</a></td><td class=\"sps-table__cell text-right\">^16.9.0</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"https://reactjs.org/\">react-dom</a></td><td class=\"sps-table__cell text-right\">^16.9.0</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"https://scroll-into-view-if-needed.netlify.com\">scroll-into-view-if-needed</a></td><td class=\"sps-table__cell text-right\">^2.2.20</td></tr>\n </tbody>\n </table>\n </div>\n <div class=\"col-7\">\n \n </div>\n</div>\n\n[//]: # \"END_AUTOGENERATED\"\n"
|
|
68
69
|
}
|
|
@@ -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 SpsDateRangePickerProps = {
|
|
17
|
-
value?: SimpleDateRange | DatePreset;
|
|
18
|
-
} & Omit<PropTypes.InferTS<typeof propTypes, HTMLInputElement>, "value">;
|
|
19
|
-
export declare const DEFAULT_PRESETS: DatePreset[];
|
|
20
|
-
export declare function SpsDateRangePicker({ children, className, disabled, formMeta, id, maxDate, minDate, onChange, presets, value, "data-testid": testId, ...rest }: SpsDateRangePickerProps): JSX.Element;
|
|
21
|
-
export {};
|
|
@@ -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, SimpleDateRange } from "@spscommerce/ds-shared";
|
|
2
|
-
import * as PropTypes from "../prop-types";
|
|
3
|
-
declare const propTypes: {
|
|
4
|
-
maxDate: PropTypes.Requireable<SimpleDate>;
|
|
5
|
-
minDate: PropTypes.Requireable<SimpleDate>;
|
|
6
|
-
onNewSelection: PropTypes.Validator<(date: SimpleDate) => void>;
|
|
7
|
-
selectedDate: PropTypes.Requireable<SimpleDate>;
|
|
8
|
-
selectedRange: PropTypes.Requireable<SimpleDate[]>;
|
|
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 interface SpsDatepickerCalendarProps extends PropTypes.InferTS<typeof propTypes, HTMLDivElement> {
|
|
15
|
-
selectedRange?: SimpleDateRange;
|
|
16
|
-
}
|
|
17
|
-
export declare function SpsDatepickerCalendar(props: SpsDatepickerCalendarProps): JSX.Element;
|
|
18
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as PropTypes from "../prop-types";
|
|
3
|
-
declare const propTypes: {
|
|
4
|
-
attachTo: PropTypes.Validator<React.MutableRefObject<HTMLElement>>;
|
|
5
|
-
isOpen: PropTypes.Validator<boolean>;
|
|
6
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
7
|
-
className: PropTypes.Requireable<string>;
|
|
8
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
9
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
10
|
-
};
|
|
11
|
-
export declare type SpsDatepickerPopupProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
|
|
12
|
-
export declare const SpsDatepickerPopup: React.ForwardRefExoticComponent<Pick<SpsDatepickerPopupProps, "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "data-testid" | "unsafelyReplaceClassName" | "isOpen" | "attachTo"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
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,23 +0,0 @@
|
|
|
1
|
-
import type { SimpleDate, SimpleDateRange, DatePreset } from "@spscommerce/ds-shared";
|
|
2
|
-
import type { Moment } from "moment-timezone";
|
|
3
|
-
export declare const FORMAT = "MM/DD/YYYY";
|
|
4
|
-
export declare const FORMAT_PATTERN: RegExp;
|
|
5
|
-
export declare const SYMBOL_DATE_PARSE_ERROR: unique symbol;
|
|
6
|
-
export declare const SimpleDateUtils: Readonly<{
|
|
7
|
-
createFrom(input: string | Moment): SimpleDate;
|
|
8
|
-
createRangeFrom(input: string): SimpleDateRange;
|
|
9
|
-
isValid(date: SimpleDate): boolean;
|
|
10
|
-
nullifyInvalidDate(value: any): SimpleDate | null;
|
|
11
|
-
toMoment(date: SimpleDate): Moment;
|
|
12
|
-
toString(date: SimpleDate): string;
|
|
13
|
-
toStringRange(dateRange: SimpleDateRange): string;
|
|
14
|
-
create(): SimpleDate;
|
|
15
|
-
isSameDate(d1: SimpleDate, d2: SimpleDate): boolean;
|
|
16
|
-
isSameMonth(d1: SimpleDate, d2: SimpleDate): boolean;
|
|
17
|
-
isAfter(date: SimpleDate, referenceDate: SimpleDate): boolean;
|
|
18
|
-
isBefore(date: SimpleDate, referenceDate: SimpleDate): boolean;
|
|
19
|
-
isInRange(date: SimpleDate, range: SimpleDateRange, inclusive?: boolean): boolean;
|
|
20
|
-
prevMonth(date: SimpleDate): SimpleDate;
|
|
21
|
-
nextMonth(date: SimpleDate): SimpleDate;
|
|
22
|
-
createRangeFromPreset(preset: DatePreset): SimpleDateRange;
|
|
23
|
-
}>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { SimpleDate, SimpleDateRange } from "@spscommerce/ds-shared";
|
|
2
|
-
import type { Duration } from "moment-timezone";
|
|
3
|
-
import type { SpsValidator, SpsValidatorFactory } from "../form/validation/types";
|
|
4
|
-
export declare const date: SpsValidator<SimpleDate | SimpleDateRange>;
|
|
5
|
-
export declare const dateRange: SpsValidator<SimpleDateRange | Duration>;
|
|
6
|
-
export interface DateConstraintError {
|
|
7
|
-
minExceeded: string | null;
|
|
8
|
-
maxExceeded: string | null;
|
|
9
|
-
}
|
|
10
|
-
export declare const dateConstraint: SpsValidatorFactory<SimpleDate | SimpleDateRange>;
|
|
@@ -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 {};
|