@spscommerce/ds-react 8.29.4 → 8.29.5

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.umd.cjs CHANGED
@@ -6749,7 +6749,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
6749
6749
  </div>
6750
6750
  );
6751
6751
  }
6752
- `}}}},ww={disabled:"boolean",href:"string",label:"string",icon:"SpsIcon",kind:"StdButtonKind",options:"Array<SpsActionMethod | [SpsActionDescriptor, () => void]>",spinning:"boolean",spinningTitle:"string"};function ki(e){const{children:t,className:n,"data-testid":r,disabled:a,href:s,label:l,options:c,icon:p,kind:m=G.StdButtonKind.DEFAULT,spinning:f,spinningTitle:u,unsafelyReplaceClassName:h,...g}=e,y=o.useRef(null),[E,C]=o.useState({width:0}),[T,D]=o.useState(!1),[M,I]=o.useState(!1);o.useLayoutEffect(()=>{y.current&&C({width:y.current.offsetWidth})},[]),o.useEffect(()=>{I(!!f)},[f]);const k=()=>{D(!0)},V=()=>{D(!1)},B=Y(h||"sps-split-button",`sps-split-button--${m}`,T&&"sps-split-button--open",n);return o.createElement(o.Fragment,null,M?o.createElement(ze,{className:n,"data-testid":r,style:{width:E.width},kind:m,icon:p,href:s,spinning:!0,spinningTitle:u},l):o.createElement("div",{ref:y,className:B,"data-testid":r,...g},o.createElement(ze,{kind:m,icon:p,href:s,disabled:a},l),o.createElement(jn,{kind:m,options:c,disabled:a,onOpen:k,onClose:V})))}Object.assign(ki,{props:ww,displayName:"SpsSplitButton"});const qu={kinds:{label:"Regular Split Buttons",description:v.code`<p>info about split buttons</p>`,examples:{basic:{description:v.code`<p>Basic</p>`,imports:v.code`
6752
+ `}}}},ww={disabled:"boolean",href:"string",label:"string",icon:"SpsIcon",kind:"StdButtonKind",options:"Array<SpsActionMethod | [SpsActionDescriptor, () => void]>",spinning:"boolean",spinningTitle:"string"};function ki(e){const{children:t,className:n,"data-testid":r,disabled:a,href:s,label:l,options:c,icon:p,kind:m=G.StdButtonKind.DEFAULT,spinning:f,spinningTitle:u,unsafelyReplaceClassName:h,onClick:g,...y}=e,E=o.useRef(null),[C,T]=o.useState({width:0}),[D,M]=o.useState(!1),[I,k]=o.useState(!1);o.useLayoutEffect(()=>{E.current&&T({width:E.current.offsetWidth})},[]),o.useEffect(()=>{k(!!f)},[f]);const V=()=>{M(!0)},B=()=>{M(!1)},w=Y(h||"sps-split-button",`sps-split-button--${m}`,D&&"sps-split-button--open",n);return o.createElement(o.Fragment,null,I?o.createElement(ze,{className:n,"data-testid":r,style:{width:C.width},kind:m,icon:p,href:s,spinning:!0,spinningTitle:u},l):o.createElement("div",{ref:E,className:w,"data-testid":r,...y},o.createElement(ze,{kind:m,icon:p,href:s,disabled:a,onClick:g},l),o.createElement(jn,{kind:m,options:c,disabled:a,onOpen:V,onClose:B})))}Object.assign(ki,{props:ww,displayName:"SpsSplitButton"});const qu={kinds:{label:"Regular Split Buttons",description:v.code`<p>info about split buttons</p>`,examples:{basic:{description:v.code`<p>Basic</p>`,imports:v.code`
6753
6753
  import { SpsSplitButton } from "@spscommerce/ds-react";
6754
6754
  `,jsx:v.code`
6755
6755
  <React.Fragment>
@@ -12,5 +12,6 @@ export type SpsSplitButtonProps = React.PropsWithChildren<SpsGlobalPropTypes & {
12
12
  options?: Parameters<typeof SpsDropdown>[0]["options"];
13
13
  spinning?: boolean;
14
14
  spinningTitle?: string;
15
+ onClick?: () => void;
15
16
  }> & React.HTMLAttributes<HTMLDivElement>;
16
17
  export declare function SpsSplitButton(props: SpsSplitButtonProps): React.JSX.Element;
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": "8.29.4",
4
+ "version": "8.29.5",
5
5
  "author": "SPS Commerce",
6
6
  "license": "UNLICENSED",
7
7
  "repository": "https://github.com/spscommerce/woodland/tree/main/packages/@spscommerce/ds-react",
@@ -46,11 +46,11 @@
46
46
  "moment-timezone": "^0.5.48",
47
47
  "react": "^16.9.0",
48
48
  "react-dom": "^16.9.0",
49
- "@sps-woodland/illustrations": "8.29.4",
50
- "@sps-woodland/tabs": "8.29.4",
51
- "@spscommerce/ds-colors": "8.29.4",
52
- "@spscommerce/ds-shared": "8.29.4",
53
- "@spscommerce/positioning": "8.29.4"
49
+ "@sps-woodland/illustrations": "8.29.5",
50
+ "@sps-woodland/tabs": "8.29.5",
51
+ "@spscommerce/ds-colors": "8.29.5",
52
+ "@spscommerce/ds-shared": "8.29.5",
53
+ "@spscommerce/positioning": "8.29.5"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@react-spectrum/provider": "^3.4.1",
@@ -72,12 +72,12 @@
72
72
  "raf-stub": "^2.0.2",
73
73
  "react": "^16.9.0",
74
74
  "react-dom": "^16.9.0",
75
- "@sps-woodland/illustrations": "8.29.4",
76
- "@sps-woodland/tabs": "8.29.4",
77
- "@spscommerce/ds-colors": "8.29.4",
78
- "@spscommerce/ds-shared": "8.29.4",
79
- "@spscommerce/positioning": "8.29.4",
80
- "test": "8.29.4"
75
+ "@sps-woodland/illustrations": "8.29.5",
76
+ "@sps-woodland/tabs": "8.29.5",
77
+ "@spscommerce/ds-colors": "8.29.5",
78
+ "@spscommerce/ds-shared": "8.29.5",
79
+ "@spscommerce/positioning": "8.29.5",
80
+ "test": "8.29.5"
81
81
  },
82
82
  "scripts": {
83
83
  "build": "pnpm run build:js && pnpm run build:types",