@spscommerce/ds-react 5.33.3 → 5.33.6

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.es.js CHANGED
@@ -1764,7 +1764,8 @@ const spsOptionListPassthroughProps = {
1764
1764
  valueKey: "string",
1765
1765
  zeroState: "string",
1766
1766
  maxHeightPx: "number",
1767
- maxHeightRem: "number"
1767
+ maxHeightRem: "number",
1768
+ disableOptionsMemoization: "boolean"
1768
1769
  },
1769
1770
  propTypes: {
1770
1771
  captionKey: propTypes$1O.exports.string,
@@ -1810,7 +1811,8 @@ const propTypes$1K = __spreadProps(__spreadValues(__spreadValues(__spreadValues(
1810
1811
  specialAction: fun(),
1811
1812
  ignoreWidthStyles: propTypes$1O.exports.bool,
1812
1813
  loading: propTypes$1O.exports.bool,
1813
- filterByTextAndCaptionKey: propTypes$1O.exports.bool
1814
+ filterByTextAndCaptionKey: propTypes$1O.exports.bool,
1815
+ disableOptionsMemoization: propTypes$1O.exports.bool
1814
1816
  });
1815
1817
  async function updateOptions(props2, searchState, searchStatePatch, setOptionList, setAnyOptionHasIcon, promiseRef) {
1816
1818
  const options = typeof props2.options === "function" ? props2.options(searchState.value) : props2.options || [];
@@ -1865,7 +1867,7 @@ function useOptionListOptions(props2, searchState, searchStatePatch) {
1865
1867
  const [anyOptionHasIcon, setAnyOptionHasIcon] = React.useState(false);
1866
1868
  const promiseRef = React.useRef(null);
1867
1869
  const optionsRef = React.useRef(props2.options);
1868
- if (typeof props2.options !== "function") {
1870
+ if (typeof props2.options !== "function" || props2.disableOptionsMemoization) {
1869
1871
  optionsRef.current = props2.options;
1870
1872
  }
1871
1873
  const update2 = React.useMemo(() => typeof optionsRef.current === "function" ? debounce(updateOptions, typeof props2.searchDebounce !== "undefined" ? props2.searchDebounce : 500) : updateOptions, [optionsRef.current, props2.disabledOptions]);
@@ -2126,6 +2128,7 @@ const SpsOptionList = React.forwardRef((props2, ref2) => {
2126
2128
  filterByTextAndCaptionKey,
2127
2129
  maxHeightPx,
2128
2130
  maxHeightRem,
2131
+ disableOptionsMemoization,
2129
2132
  "data-testid": testId
2130
2133
  } = _a, rest = __objRest(_a, [
2131
2134
  "captionKey",
@@ -2163,6 +2166,7 @@ const SpsOptionList = React.forwardRef((props2, ref2) => {
2163
2166
  "filterByTextAndCaptionKey",
2164
2167
  "maxHeightPx",
2165
2168
  "maxHeightRem",
2169
+ "disableOptionsMemoization",
2166
2170
  "data-testid"
2167
2171
  ]);
2168
2172
  const specialActionOption = React.useMemo(() => specialAction ? new SpsOptionListOption(specialAction, {
@@ -2603,7 +2607,8 @@ const propsDoc$1G = {
2603
2607
  zeroState: "string",
2604
2608
  loading: "boolean",
2605
2609
  maxHeightOptionListPx: "number",
2606
- maxHeightOptionListRem: "number"
2610
+ maxHeightOptionListRem: "number",
2611
+ disableOptionsMemoization: "boolean"
2607
2612
  };
2608
2613
  const propTypes$1J = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
2609
2614
  debounce: propTypes$1O.exports.number,
@@ -2623,7 +2628,8 @@ const propTypes$1J = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
2623
2628
  zeroState: propTypes$1O.exports.string,
2624
2629
  loading: propTypes$1O.exports.bool,
2625
2630
  maxHeightOptionListPx: propTypes$1O.exports.number,
2626
- maxHeightOptionListRem: propTypes$1O.exports.number
2631
+ maxHeightOptionListRem: propTypes$1O.exports.number,
2632
+ disableOptionsMemoization: propTypes$1O.exports.bool
2627
2633
  });
2628
2634
  function SpsAutocomplete(_e) {
2629
2635
  var _f = _e, {
@@ -2644,6 +2650,7 @@ function SpsAutocomplete(_e) {
2644
2650
  loading,
2645
2651
  maxHeightOptionListPx,
2646
2652
  maxHeightOptionListRem,
2653
+ disableOptionsMemoization,
2647
2654
  "data-testid": testId
2648
2655
  } = _f, rest = __objRest(_f, [
2649
2656
  "className",
@@ -2663,6 +2670,7 @@ function SpsAutocomplete(_e) {
2663
2670
  "loading",
2664
2671
  "maxHeightOptionListPx",
2665
2672
  "maxHeightOptionListRem",
2673
+ "disableOptionsMemoization",
2666
2674
  "data-testid"
2667
2675
  ]);
2668
2676
  const meta = formMeta || formControl2;
@@ -2777,7 +2785,8 @@ function SpsAutocomplete(_e) {
2777
2785
  zeroState,
2778
2786
  loading,
2779
2787
  maxHeightPx: maxHeightOptionListPx,
2780
- maxHeightRem: maxHeightOptionListRem
2788
+ maxHeightRem: maxHeightOptionListRem,
2789
+ disableOptionsMemoization
2781
2790
  }));
2782
2791
  }
2783
2792
  Object.assign(SpsAutocomplete, {
@@ -2919,7 +2928,8 @@ const propsDoc$1F = {
2919
2928
  onClose: "() => void",
2920
2929
  loading: "boolean",
2921
2930
  maxHeightOptionListPx: "number",
2922
- maxHeightOptionListRem: "number"
2931
+ maxHeightOptionListRem: "number",
2932
+ disableOptionsMemoization: "boolean"
2923
2933
  };
2924
2934
  const propTypes$1I = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
2925
2935
  alignLeft: propTypes$1O.exports.bool,
@@ -2935,7 +2945,8 @@ const propTypes$1I = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
2935
2945
  onClose: fun(),
2936
2946
  loading: propTypes$1O.exports.bool,
2937
2947
  maxHeightOptionListPx: propTypes$1O.exports.number,
2938
- maxHeightOptionListRem: propTypes$1O.exports.number
2948
+ maxHeightOptionListRem: propTypes$1O.exports.number,
2949
+ disableOptionsMemoization: propTypes$1O.exports.bool
2939
2950
  });
2940
2951
  function SpsDropdown(props2) {
2941
2952
  const _a = props2, {
@@ -2956,7 +2967,8 @@ function SpsDropdown(props2) {
2956
2967
  onClose,
2957
2968
  loading,
2958
2969
  maxHeightOptionListPx,
2959
- maxHeightOptionListRem
2970
+ maxHeightOptionListRem,
2971
+ disableOptionsMemoization
2960
2972
  } = _a, rest = __objRest(_a, [
2961
2973
  "alignLeft",
2962
2974
  "className",
@@ -2975,7 +2987,8 @@ function SpsDropdown(props2) {
2975
2987
  "onClose",
2976
2988
  "loading",
2977
2989
  "maxHeightOptionListPx",
2978
- "maxHeightOptionListRem"
2990
+ "maxHeightOptionListRem",
2991
+ "disableOptionsMemoization"
2979
2992
  ]);
2980
2993
  const { t: t2 } = React.useContext(I18nContext);
2981
2994
  const id2 = useElementId(idProp);
@@ -3076,7 +3089,8 @@ function SpsDropdown(props2) {
3076
3089
  optionRole: "option",
3077
3090
  loading,
3078
3091
  maxHeightPx: maxHeightOptionListPx,
3079
- maxHeightRem: maxHeightOptionListRem
3092
+ maxHeightRem: maxHeightOptionListRem,
3093
+ disableOptionsMemoization
3080
3094
  }), /* @__PURE__ */ React.createElement("div", {
3081
3095
  onClick: handleButtonClick,
3082
3096
  className: buttonClasses,
@@ -30109,7 +30123,8 @@ const propsDoc$P = {
30109
30123
  zeroState: "string",
30110
30124
  loading: "boolean",
30111
30125
  maxHeightOptionListPx: "number",
30112
- maxHeightOptionListRem: "number"
30126
+ maxHeightOptionListRem: "number",
30127
+ disableOptionsMemoization: "boolean"
30113
30128
  };
30114
30129
  const propTypes$R = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
30115
30130
  action: fun(),
@@ -30137,7 +30152,8 @@ const propTypes$R = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
30137
30152
  zeroState: propTypes$1O.exports.string,
30138
30153
  loading: propTypes$1O.exports.bool,
30139
30154
  maxHeightOptionListPx: propTypes$1O.exports.number,
30140
- maxHeightOptionListRem: propTypes$1O.exports.number
30155
+ maxHeightOptionListRem: propTypes$1O.exports.number,
30156
+ disableOptionsMemoization: propTypes$1O.exports.bool
30141
30157
  });
30142
30158
  function SpsMultiSelect(_A) {
30143
30159
  var _B = _A, {
@@ -30166,6 +30182,7 @@ function SpsMultiSelect(_A) {
30166
30182
  icon,
30167
30183
  maxHeightOptionListPx,
30168
30184
  maxHeightOptionListRem,
30185
+ disableOptionsMemoization,
30169
30186
  "data-testid": testId
30170
30187
  } = _B, rest = __objRest(_B, [
30171
30188
  "action",
@@ -30193,6 +30210,7 @@ function SpsMultiSelect(_A) {
30193
30210
  "icon",
30194
30211
  "maxHeightOptionListPx",
30195
30212
  "maxHeightOptionListRem",
30213
+ "disableOptionsMemoization",
30196
30214
  "data-testid"
30197
30215
  ]);
30198
30216
  const meta = formMeta || formControl2;
@@ -30405,7 +30423,8 @@ function SpsMultiSelect(_A) {
30405
30423
  zeroState,
30406
30424
  loading,
30407
30425
  maxHeightPx: maxHeightOptionListPx,
30408
- maxHeightRem: maxHeightOptionListRem
30426
+ maxHeightRem: maxHeightOptionListRem,
30427
+ disableOptionsMemoization
30409
30428
  }));
30410
30429
  }
30411
30430
  Object.assign(SpsMultiSelect, {
@@ -30768,7 +30787,8 @@ const propsDoc$M = {
30768
30787
  loading: "boolean",
30769
30788
  filterByTextAndCaptionKey: "boolean",
30770
30789
  maxHeightOptionListPx: "number",
30771
- maxHeightOptionListRem: "number"
30790
+ maxHeightOptionListRem: "number",
30791
+ disableOptionsMemoization: "boolean"
30772
30792
  };
30773
30793
  const propTypes$O = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
30774
30794
  action: fun(),
@@ -30797,7 +30817,8 @@ const propTypes$O = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
30797
30817
  loading: propTypes$1O.exports.bool,
30798
30818
  filterByTextAndCaptionKey: propTypes$1O.exports.bool,
30799
30819
  maxHeightOptionListPx: propTypes$1O.exports.number,
30800
- maxHeightOptionListRem: propTypes$1O.exports.number
30820
+ maxHeightOptionListRem: propTypes$1O.exports.number,
30821
+ disableOptionsMemoization: propTypes$1O.exports.bool
30801
30822
  });
30802
30823
  const SpsSelect = React.forwardRef((props2, ref2) => {
30803
30824
  const _a = props2, {
@@ -30828,7 +30849,8 @@ const SpsSelect = React.forwardRef((props2, ref2) => {
30828
30849
  filterByTextAndCaptionKey,
30829
30850
  maxHeightOptionListPx,
30830
30851
  maxHeightOptionListRem,
30831
- "data-testid": testId
30852
+ "data-testid": testId,
30853
+ disableOptionsMemoization
30832
30854
  } = _a, rest = __objRest(_a, [
30833
30855
  "action",
30834
30856
  "autoFixWidth",
@@ -30857,7 +30879,8 @@ const SpsSelect = React.forwardRef((props2, ref2) => {
30857
30879
  "filterByTextAndCaptionKey",
30858
30880
  "maxHeightOptionListPx",
30859
30881
  "maxHeightOptionListRem",
30860
- "data-testid"
30882
+ "data-testid",
30883
+ "disableOptionsMemoization"
30861
30884
  ]);
30862
30885
  const meta = formMeta || formControl2;
30863
30886
  const { wrapperId, controlId } = useFormControlId(id2, meta);
@@ -31029,6 +31052,7 @@ const SpsSelect = React.forwardRef((props2, ref2) => {
31029
31052
  loading,
31030
31053
  maxHeightPx: maxHeightOptionListPx,
31031
31054
  maxHeightRem: maxHeightOptionListRem,
31055
+ disableOptionsMemoization,
31032
31056
  "data-testid": `${testId}-option-list`
31033
31057
  }));
31034
31058
  });
@@ -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>;
@@ -28,13 +28,14 @@ declare const propTypes: {
28
28
  filterByTextAndCaptionKey: 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 SpsSelectProps = PropTypes.InferTS<typeof propTypes, HTMLDivElement>;
37
- 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" | "onOpen" | "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<{
38
39
  focus: () => void;
39
40
  }>>;
40
41
  export {};
@@ -2,8 +2,7 @@ import * as React from "react";
2
2
  /**
3
3
  * takes in an ElementType (e.g. a React component) and
4
4
  * returns a new version of that component where certain
5
- * props are ALWAYS set to predefined values regardless of
6
- * what is passed in.
5
+ * props are ALWAYS set to predefined values.
7
6
  *
8
7
  * for example, consider the following component:
9
8
  * const Foo: React.FC<{
@@ -22,12 +21,13 @@ import * as React from "react";
22
21
  * But if you bind the prop a...
23
22
  * const FooWithBoundA = bindProps(Foo, { a: "parakeet" });
24
23
  *
25
- * then <FooWithBoundA a="dog" b="cat"/> will produce <span>a is parakeet and b is cat</span>
24
+ * then <FooWithBoundA b="cat"/> will produce <span>a is parakeet and b is cat</span>
26
25
  *
27
- * The type of the props is the same, but prop a is always going to be overridden to its
28
- * bound value.
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.
29
28
  *
30
29
  * This was created to be used with <Provide> (see Provide.tsx in this same directory),
31
30
  * but may have other use cases.
32
31
  */
33
- export declare function bindProps<T extends React.ElementType>(E: T, boundProps: Partial<React.ComponentProps<T>>, deps?: unknown[]): React.FC<React.ComponentProps<T>>;
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/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.33.3",
4
+ "version": "5.33.6",
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": "5.33.3",
32
- "@spscommerce/ds-illustrations": "5.33.3",
33
- "@spscommerce/ds-shared": "5.33.3",
34
- "@spscommerce/positioning": "5.33.3",
35
- "@spscommerce/utils": "5.33.3",
31
+ "@spscommerce/ds-colors": "5.33.6",
32
+ "@spscommerce/ds-illustrations": "5.33.6",
33
+ "@spscommerce/ds-shared": "5.33.6",
34
+ "@spscommerce/positioning": "5.33.6",
35
+ "@spscommerce/utils": "5.33.6",
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": "5.33.3",
44
- "@spscommerce/ds-illustrations": "5.33.3",
45
- "@spscommerce/ds-shared": "5.33.3",
46
- "@spscommerce/positioning": "5.33.3",
47
- "@spscommerce/utils": "5.33.3",
43
+ "@spscommerce/ds-colors": "5.33.6",
44
+ "@spscommerce/ds-illustrations": "5.33.6",
45
+ "@spscommerce/ds-shared": "5.33.6",
46
+ "@spscommerce/positioning": "5.33.6",
47
+ "@spscommerce/utils": "5.33.6",
48
48
  "@testing-library/react": "^9.3.2",
49
49
  "@types/prop-types": "^15.7.1",
50
50
  "@types/react": "^16.9.0",