@spscommerce/ds-react 5.29.1 → 5.32.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/index.es.js CHANGED
@@ -30755,6 +30755,7 @@ const propsDoc$M = {
30755
30755
  notClearable: "boolean",
30756
30756
  options: "Eventually<any[]> | (filter?: string) => Eventually<any[]>",
30757
30757
  onChange: "ChangeEventHandler",
30758
+ onOpen: "OnOpenHandler",
30758
30759
  placeholder: "string",
30759
30760
  searchDebounce: "number",
30760
30761
  searchPlaceholder: "string",
@@ -30783,6 +30784,7 @@ const propTypes$O = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
30783
30784
  fun()
30784
30785
  ]).isRequired,
30785
30786
  onChange: fun(),
30787
+ onOpen: fun(),
30786
30788
  placeholder: propTypes$1O.exports.string,
30787
30789
  searchDebounce: propTypes$1O.exports.number,
30788
30790
  searchPlaceholder: propTypes$1O.exports.string,
@@ -30812,6 +30814,7 @@ const SpsSelect = React.forwardRef((props2, ref2) => {
30812
30814
  options,
30813
30815
  onChange,
30814
30816
  onClick,
30817
+ onOpen,
30815
30818
  placeholder,
30816
30819
  searchDebounce,
30817
30820
  searchPlaceholder = "Search\u2026",
@@ -30840,6 +30843,7 @@ const SpsSelect = React.forwardRef((props2, ref2) => {
30840
30843
  "options",
30841
30844
  "onChange",
30842
30845
  "onClick",
30846
+ "onOpen",
30843
30847
  "placeholder",
30844
30848
  "searchDebounce",
30845
30849
  "searchPlaceholder",
@@ -30953,6 +30957,7 @@ const SpsSelect = React.forwardRef((props2, ref2) => {
30953
30957
  });
30954
30958
  useDidUpdateEffect(() => {
30955
30959
  if (state.isOpen) {
30960
+ onOpen == null ? void 0 : onOpen();
30956
30961
  const event = document.createEvent("CustomEvent");
30957
30962
  event.initCustomEvent("DropdownOpened", false, false, wrapperId);
30958
30963
  document.dispatchEvent(event);
@@ -35380,7 +35385,8 @@ const propsDoc$t = {
35380
35385
  icon: { type: "ReactNodeOrRenderFn", required: "true" },
35381
35386
  error: "boolean",
35382
35387
  title: { type: "string", required: "true" },
35383
- warning: "boolean"
35388
+ warning: "boolean",
35389
+ disabled: "boolean"
35384
35390
  };
35385
35391
  const propTypes$v = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
35386
35392
  href: propTypes$1O.exports.string,
@@ -35388,7 +35394,8 @@ const propTypes$v = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
35388
35394
  icon: nodeOrRenderFn.isRequired,
35389
35395
  error: propTypes$1O.exports.bool,
35390
35396
  title: propTypes$1O.exports.string.isRequired,
35391
- warning: propTypes$1O.exports.bool
35397
+ warning: propTypes$1O.exports.bool,
35398
+ disabled: propTypes$1O.exports.bool
35392
35399
  });
35393
35400
  function SpsTile(props2) {
35394
35401
  const _a = props2, {
@@ -35399,7 +35406,8 @@ function SpsTile(props2) {
35399
35406
  error = false,
35400
35407
  title,
35401
35408
  unsafelyReplaceClassName,
35402
- warning = false
35409
+ warning = false,
35410
+ disabled = false
35403
35411
  } = _a, rest = __objRest(_a, [
35404
35412
  "className",
35405
35413
  "href",
@@ -35408,9 +35416,10 @@ function SpsTile(props2) {
35408
35416
  "error",
35409
35417
  "title",
35410
35418
  "unsafelyReplaceClassName",
35411
- "warning"
35419
+ "warning",
35420
+ "disabled"
35412
35421
  ]);
35413
- const classes = clsx(unsafelyReplaceClassName || "sps-tile", className, error && "sps-tile--error", warning && "sps-tile--warning");
35422
+ const classes = clsx(unsafelyReplaceClassName || "sps-tile", className, error && "sps-tile--error", warning && "sps-tile--warning", disabled && "sps-tile--disabled");
35414
35423
  React.useEffect(() => {
35415
35424
  if (warning && error) {
35416
35425
  throw new Error("Tile should have warning or error, not both");
@@ -35420,7 +35429,7 @@ function SpsTile(props2) {
35420
35429
  className: "sps-tile-container sfg-col-3 sfg-break-col-6"
35421
35430
  }, /* @__PURE__ */ React.createElement("a", __spreadValues({
35422
35431
  className: classes,
35423
- href,
35432
+ href: disabled ? void 0 : href,
35424
35433
  target,
35425
35434
  rel: target === "_blank" ? "noopener noreferrer" : void 0
35426
35435
  }, rest), (warning || error) && /* @__PURE__ */ React.createElement("div", {
@@ -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>;
@@ -33,7 +34,7 @@ declare const propTypes: {
33
34
  unsafelyReplaceClassName: PropTypes.Requireable<string>;
34
35
  };
35
36
  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<{
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<{
37
38
  focus: () => void;
38
39
  }>>;
39
40
  export {};
@@ -6,6 +6,7 @@ declare const propTypes: {
6
6
  error: PropTypes.Requireable<boolean>;
7
7
  title: PropTypes.Validator<string>;
8
8
  warning: PropTypes.Requireable<boolean>;
9
+ disabled: PropTypes.Requireable<boolean>;
9
10
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
10
11
  className: PropTypes.Requireable<string>;
11
12
  "data-testid": PropTypes.Requireable<string>;
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.29.1",
4
+ "version": "5.32.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": "5.29.1",
32
- "@spscommerce/ds-illustrations": "5.29.1",
33
- "@spscommerce/ds-shared": "5.29.1",
34
- "@spscommerce/positioning": "5.29.1",
35
- "@spscommerce/utils": "5.29.1",
31
+ "@spscommerce/ds-colors": "5.32.0",
32
+ "@spscommerce/ds-illustrations": "5.32.0",
33
+ "@spscommerce/ds-shared": "5.32.0",
34
+ "@spscommerce/positioning": "5.32.0",
35
+ "@spscommerce/utils": "5.32.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": "5.29.1",
44
- "@spscommerce/ds-illustrations": "5.29.1",
45
- "@spscommerce/ds-shared": "5.29.1",
46
- "@spscommerce/positioning": "5.29.1",
47
- "@spscommerce/utils": "5.29.1",
43
+ "@spscommerce/ds-colors": "5.32.0",
44
+ "@spscommerce/ds-illustrations": "5.32.0",
45
+ "@spscommerce/ds-shared": "5.32.0",
46
+ "@spscommerce/positioning": "5.32.0",
47
+ "@spscommerce/utils": "5.32.0",
48
48
  "@testing-library/react": "^9.3.2",
49
49
  "@types/prop-types": "^15.7.1",
50
50
  "@types/react": "^16.9.0",