@sap-ux/ui-components
Version:
SAP UI Components Library
26 lines (19 loc) • 26.3 kB
JavaScript
"use strict";(()=>{var I=Object.defineProperty,T=Object.defineProperties;var k=Object.getOwnPropertyDescriptors;var y=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var C=(m,o,e)=>o in m?I(m,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):m[o]=e,i=(m,o)=>{for(var e in o||(o={}))L.call(o,e)&&C(m,e,o[e]);if(y)for(var e of y(o))A.call(o,e)&&C(m,e,o[e]);return m},h=(m,o)=>T(m,k(o));(self.webpackChunk_sap_ux_ui_components=self.webpackChunk_sap_ux_ui_components||[]).push([[578],{"./src/components/UIButton/UIActionButton.tsx"(m,o,e){var d=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(o,"__esModule",{value:!0}),o.UIActionButton=void 0;const a=d(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),S=e("../../node_modules/.pnpm/@fluentui+react@8.125.6_@types+react-dom@16.9.25_@types+react@16.14.69__@types+react@16_03684c25d5c3502754322356d0aa96d9/node_modules/@fluentui/react/lib-commonjs/index.js"),s=e("./src/components/UIContextualMenu/index.tsx"),t=e("./src/components/UIButton/UIDefaultButton.tsx");class n extends a.default.Component{constructor(v){super(v),this.setStyle=()=>({root:{minWidth:"initial",minHeight:t.BASE_STYLES.height,height:t.BASE_STYLES.height,fontSize:"13px",fontWeight:400,color:"var(--vscode-foreground)",borderRadius:0,whiteSpace:"nowrap",backgroundColor:"transparent",textDecoration:"underline",selectors:{"&:active":{textDecoration:"none"},".ms-Fabric--isFocusVisible &:focus:after":{outline:"1px solid var(--vscode-focusBorder)"}}},label:{marginLeft:0,marginRight:0,fontSize:"13px",fontWeight:400},rootDisabled:{backgroundColor:"transparent",color:"var(--vscode-foreground)",opacity:"0.4",pointerEvents:"none"},rootHovered:{color:"var(--vscode-foreground)",backgroundColor:"var(--vscode-menubar-selectionBackground)",outline:"1px solid var(--vscode-contrastActiveBorder)",borderRadius:"var(--vscode-cornerRadius-small, 4px)",textDecoration:"none",selectors:{color:"var(--vscode-foreground)"}},icon:{height:16,lineHeight:16,marginLeft:0,position:"relative",top:1},menuIcon:{position:"relative",top:1}})}render(){return a.default.createElement(S.ActionButton,h(i({},this.props),{styles:this.setStyle(),menuAs:s.UIContextualMenu}))}}o.UIActionButton=n,n.__docgenInfo={description:`UIActionButton component
based on https://developer.microsoft.com/en-us/fluentui#/controls/web/button
UIActionButton
{React.Component<IButtonProps, {}>}`,methods:[{name:"setStyle",docblock:null,modifiers:[],params:[],returns:{type:{name:"IButtonStyles"}}}],displayName:"UIActionButton",props:{menuProps:{required:!1,tsType:{name:"UIIContextualMenuProps"},description:""}},composes:["IButtonProps"]}},"./src/components/UIButton/UIDefaultButton.tsx"(m,o,e){var d=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(o,"__esModule",{value:!0}),o.UIDefaultButton=o.BASE_STYLES=void 0;const a=d(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),S=e("../../node_modules/.pnpm/@fluentui+react@8.125.6_@types+react-dom@16.9.25_@types+react@16.14.69__@types+react@16_03684c25d5c3502754322356d0aa96d9/node_modules/@fluentui/react/lib-commonjs/index.js"),s=e("./src/components/UIContextualMenu/index.tsx"),t=e("./src/components/UIInput/index.tsx"),n=e("./src/components/Icons.tsx"),r="var(--vscode-button-border, transparent)",v=`var(--vscode-button-secondaryBorder, ${r})`;o.BASE_STYLES={color:"var(--vscode-button-foreground)",checkedBorderColor:"var(--vscode-contrastActiveBorder, var(--vscode-button-border, transparent))",primary:{backgroundColor:"var(--vscode-button-background)",disabledBorderColor:r,borderColor:r,hoverBackgroundColor:"var(--vscode-button-hoverBackground)",hoverBorderColor:r},secondary:{backgroundColor:"var(--vscode-button-secondaryBackground)",disabledBorderColor:v,borderColor:v,hoverBackgroundColor:"var(--vscode-button-secondaryHoverBackground)",hoverBorderColor:v,color:"var(--vscode-button-secondaryForeground)"},alert:{backgroundColor:"var(--vscode-errorForeground)",disabledBorderColor:r,borderColor:r,hoverBackgroundColor:"var(--vscode-editorError-foreground)",hoverBorderColor:r},transparent:{backgroundColor:"transparent",disabledBorderColor:"transparent",borderColor:"transparent",hoverBackgroundColor:"var(--vscode-toolbar-hoverBackground, var(--vscode-menubar-selectionBackground))",hoverBorderColor:"var(--vscode-contrastActiveBorder, transparent)",hoverBorderStyle:"dashed",color:"var(--vscode-foreground)",checkedBackgroundColor:"var(--vscode-button-background)",checkedColor:"var(--vscode-button-foreground)",checkedBorderStyle:"solid"},height:26};const f="svg > path, svg > rect";class g extends a.default.Component{constructor(l){super(l),this.setStyle=u=>{const{primary:b,alert:B,transparent:p}=u,_={position:"absolute",width:1,right:o.BASE_STYLES.height-1,top:0,bottom:0,backgroundColor:"var(--vscode-editor-background)"},E={root:this.getInteractionStyle(!1,b,B,p),checked:this.getInteractionStyle(!0,b,B,p)};return{root:h(i(i(i({minWidth:"initial",minHeight:o.BASE_STYLES.height,height:o.BASE_STYLES.height,fontSize:"13px",fontWeight:400,borderRadius:t.COMMON_INPUT_STYLES.borderRadius,paddingLeft:13,paddingRight:13,backgroundColor:o.BASE_STYLES.secondary.backgroundColor,borderColor:o.BASE_STYLES.secondary.borderColor,color:o.BASE_STYLES.secondary.color},b&&{backgroundColor:o.BASE_STYLES.primary.backgroundColor,borderColor:o.BASE_STYLES.primary.borderColor,color:o.BASE_STYLES.color}),B&&{backgroundColor:o.BASE_STYLES.alert.backgroundColor,borderColor:o.BASE_STYLES.alert.borderColor,color:o.BASE_STYLES.color}),p&&{backgroundColor:o.BASE_STYLES.transparent.backgroundColor,borderColor:o.BASE_STYLES.transparent.borderColor,color:o.BASE_STYLES.transparent.color}),{selectors:{".ms-Fabric--isFocusVisible &:focus:after":{outlineColor:"var(--vscode-focusBorder)",inset:-3}}}),flexContainer:{height:18},label:{marginLeft:0,marginRight:0,fontWeight:400,lineHeight:20,whiteSpace:"nowrap"},rootDisabled:this.getRootDisabledStyles(b,B,p),rootPressed:E.root,rootHovered:E.root,icon:this.getIconStyleOverrides(b,B,p),menuIcon:this.getMenuIconStyleOverrides(b,B),rootChecked:i(i(i({backgroundColor:o.BASE_STYLES.secondary.backgroundColor,color:o.BASE_STYLES.secondary.color,borderColor:o.BASE_STYLES.checkedBorderColor},b&&{backgroundColor:o.BASE_STYLES.primary.backgroundColor,color:o.BASE_STYLES.color}),B&&{backgroundColor:o.BASE_STYLES.alert.backgroundColor,color:o.BASE_STYLES.color}),p&&{backgroundColor:o.BASE_STYLES.transparent.checkedBackgroundColor,color:o.BASE_STYLES.transparent.checkedColor,borderStyle:o.BASE_STYLES.transparent.checkedBorderStyle}),rootCheckedHovered:E.checked,rootCheckedPressed:E.checked,splitButtonMenuButton:{padding:6,minHeight:o.BASE_STYLES.height,height:o.BASE_STYLES.height,boxSizing:"border-box",borderRadius:`0 ${t.COMMON_INPUT_STYLES.borderRadius} ${t.COMMON_INPUT_STYLES.borderRadius} 0 !important`,borderLeft:"none",outline:"transparent",userSelect:"none",display:"inline-block",textDecoration:"none",textAlign:"center",cursor:"pointer",verticalAlign:"top",width:o.BASE_STYLES.height,marginLeft:-1,marginTop:0,marginRight:0,marginBottom:0,backgroundColor:o.BASE_STYLES.primary.backgroundColor,borderColor:o.BASE_STYLES.primary.borderColor,color:o.BASE_STYLES.color,selectors:{"&:hover":{color:o.BASE_STYLES.color,backgroundColor:"var(--vscode-button-hoverBackground)",borderColor:"var(--vscode-contrastActiveBorder, var(--vscode-button-hoverBackground))",selectors:{[f]:{fill:o.BASE_STYLES.color}}}}},splitButtonMenuButtonDisabled:i(i({opacity:"0.5 !important",backgroundColor:"var(--vscode-button-secondaryBackground,#5f6a79)",borderColor:o.BASE_STYLES.secondary.backgroundColor,color:o.BASE_STYLES.secondary.color},b&&{color:o.BASE_STYLES.color,backgroundColor:o.BASE_STYLES.primary.backgroundColor,borderColor:"var(--vscode-button-background)"}),B&&{color:o.BASE_STYLES.color,backgroundColor:o.BASE_STYLES.alert.backgroundColor,borderColor:"var(--vscode-button-background)"}),splitButtonMenuFocused:{selectors:{"&:focus":{color:"red"}}},splitButtonMenuButtonExpanded:{color:o.BASE_STYLES.color,backgroundColor:"var(--vscode-button-hoverBackground)",borderColor:"var(--vscode-contrastActiveBorder, var(--vscode-button-hoverBackground))",selectors:{[f]:{fill:o.BASE_STYLES.color},"&:hover":{color:o.BASE_STYLES.color,backgroundColor:"var(--vscode-button-hoverBackground)",borderColor:"var(--vscode-contrastActiveBorder, var(--vscode-button-hoverBackground))",selectors:{[f]:{fill:o.BASE_STYLES.color}}}}},splitButtonDivider:_,splitButtonDividerDisabled:_,splitButtonContainerFocused:{".ms-Fabric--isFocusVisible &:focus:after":{border:"none",outlineColor:"var(--vscode-focusBorder)",inset:-2}}}}}getInteractionStyle(l,u,b,B){let p=i(i(i({color:o.BASE_STYLES.secondary.color,backgroundColor:o.BASE_STYLES.secondary.hoverBackgroundColor,borderColor:o.BASE_STYLES.secondary.hoverBorderColor,selectors:{[f]:{fill:o.BASE_STYLES.secondary.color}}},u&&{color:o.BASE_STYLES.color,backgroundColor:o.BASE_STYLES.primary.hoverBackgroundColor,borderColor:o.BASE_STYLES.primary.hoverBorderColor,selectors:{[f]:{fill:o.BASE_STYLES.color}}}),b&&{color:o.BASE_STYLES.color,backgroundColor:o.BASE_STYLES.alert.hoverBackgroundColor,borderColor:o.BASE_STYLES.alert.hoverBorderColor,selectors:{[f]:{fill:o.BASE_STYLES.color}}}),l&&{borderColor:o.BASE_STYLES.checkedBorderColor});return B&&(l?p=h(i({},p),{color:o.BASE_STYLES.color,backgroundColor:o.BASE_STYLES.primary.backgroundColor,borderColor:o.BASE_STYLES.primary.borderColor,selectors:{[f]:{fill:o.BASE_STYLES.color}}}):p=h(i({},p),{color:o.BASE_STYLES.transparent.color,backgroundColor:o.BASE_STYLES.transparent.hoverBackgroundColor,borderColor:o.BASE_STYLES.transparent.hoverBorderColor,borderStyle:o.BASE_STYLES.transparent.hoverBorderStyle,selectors:{[f]:{fill:o.BASE_STYLES.transparent.color}}})),l&&(p=h(i({},p),{borderColor:o.BASE_STYLES.checkedBorderColor})),p}getRootDisabledStyles(l,u,b){return i(i(i({opacity:"0.5 !important",backgroundColor:o.BASE_STYLES.secondary.backgroundColor,borderColor:o.BASE_STYLES.secondary.disabledBorderColor,color:o.BASE_STYLES.secondary.color},l&&{opacity:"0.5 !important",color:o.BASE_STYLES.color,backgroundColor:o.BASE_STYLES.primary.backgroundColor,borderColor:o.BASE_STYLES.primary.disabledBorderColor}),u&&{opacity:"0.5 !important",color:o.BASE_STYLES.color,backgroundColor:o.BASE_STYLES.alert.backgroundColor,borderColor:o.BASE_STYLES.alert.disabledBorderColor}),b&&{color:o.BASE_STYLES.transparent.color,backgroundColor:o.BASE_STYLES.transparent.backgroundColor,borderColor:o.BASE_STYLES.transparent.disabledBorderColor})}getIconStyleOverrides(l,u,b){return i(i(i({height:16,lineHeight:16,marginLeft:-3,color:o.BASE_STYLES.secondary.color,selectors:{[f]:{fill:o.BASE_STYLES.secondary.color}}},l&&{color:o.BASE_STYLES.color,selectors:{[f]:{fill:o.BASE_STYLES.color}}}),u&&{color:o.BASE_STYLES.color,selectors:{[f]:{fill:o.BASE_STYLES.color}}}),b&&{color:o.BASE_STYLES.transparent.color,selectors:{[f]:{fill:o.BASE_STYLES.transparent.color}}})}getMenuIconStyleOverrides(l,u){return{selectors:i(i({"svg > path":{fill:o.BASE_STYLES.secondary.color}},l&&{"svg > path":{fill:o.BASE_STYLES.color}}),u&&{"svg > path":{fill:o.BASE_STYLES.color}})}}render(){var u;const l=(u=this.props.menuProps)!=null&&u.items?{iconName:n.UiIcons.ArrowDown}:void 0;return a.default.createElement(S.DefaultButton,h(i({menuIconProps:l},this.props),{styles:this.setStyle(this.props),menuAs:s.UIContextualMenu}))}}o.UIDefaultButton=g,g.__docgenInfo={description:`UIDefaultButton component
based on https://developer.microsoft.com/en-us/fluentui#/controls/web/button
UIDefaultButton
{React.Component<UIDefaultButtonProps, {}>}`,methods:[{name:"setStyle",docblock:`Method returns styles of root button element.
props Button props.
Styles of root button element.`,modifiers:[],params:[{name:"props",description:"Button props.",optional:!1,type:{name:"UIDefaultButtonProps",alias:"UIDefaultButtonProps"}}],returns:{description:"Styles of root button element.",type:{name:"IButtonStyles"}},description:"Method returns styles of root button element."}],displayName:"UIDefaultButton",props:{transparent:{required:!1,tsType:{name:"boolean"},description:`Changes the visual presentation of the button to be transparent.
false`},alert:{required:!1,tsType:{name:"boolean"},description:""},primary:{required:!1,tsType:{name:"boolean"},description:""},menuProps:{required:!1,tsType:{name:"UIIContextualMenuProps"},description:""}},composes:["IButtonProps"]}},"./src/components/UIButton/UIIconButton.tsx"(m,o,e){var d=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(o,"__esModule",{value:!0}),o.UIIconButton=o.UIIconButtonSizes=void 0;const a=d(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),S=e("../../node_modules/.pnpm/@fluentui+react@8.125.6_@types+react-dom@16.9.25_@types+react@16.14.69__@types+react@16_03684c25d5c3502754322356d0aa96d9/node_modules/@fluentui/react/lib-commonjs/index.js"),s=e("./src/components/UIContextualMenu/index.tsx");var t;(function(r){r.Default="Default",r.Wide="Wide"})(t||(o.UIIconButtonSizes=t={}));class n extends a.default.Component{constructor(v){super(v),this.setStyle=f=>{var l;const c=((l=f.sizeType)!=null?l:t.Default)===t.Default?16:26;return{root:{minWidth:"initial",height:16,width:c,boxSizing:"content-box",padding:3,backgroundColor:"transparent",borderRadius:"var(--vscode-cornerRadius-small, 4px)",selectors:{".ms-Fabric--isFocusVisible &:focus:after":{outline:"1px solid var(--vscode-focusBorder)"}}},rootDisabled:{backgroundColor:"transparent",opacity:"0.4"},rootHasMenu:{width:c},rootHovered:{backgroundColor:this.getButtonInteractionBackgroundColor("--vscode-toolbar-hoverBackground"),outline:"1px dashed var(--vscode-contrastActiveBorder)",borderRadius:"var(--vscode-cornerRadius-small, 4px)"},rootPressed:{backgroundColor:this.getButtonInteractionBackgroundColor("--vscode-toolbar-activeBackground")},rootExpanded:{backgroundColor:this.getButtonInteractionBackgroundColor("--vscode-toolbar-hoverBackground"),width:c},rootExpandedHovered:{backgroundColor:"transparent"},flexContainer:{width:"100%",height:"100%",pointerEvents:"none"},icon:{height:16,width:c,lineHeight:16,display:"flex",alignItems:"center",justifyContent:"center"},iconHovered:{backgroundColor:"transparent"},menuIconExpanded:{display:"none"},menuIcon:{display:"none"},rootChecked:{backgroundColor:"var(--vscode-button-background)",color:"var(--vscode-button-foreground)",outline:"1px solid var(--vscode-contrastActiveBorder)",selectors:{".ms-Fabric--isFocusVisible &:focus:after":{inset:"-1px"}}},rootCheckedHovered:{backgroundColor:"var(--vscode-button-background)",outline:"1px dashed var(--vscode-contrastActiveBorder)"},iconChecked:{color:"var(--vscode-button-foreground)",selectors:{"> svg *":{fill:"currentColor"}}}}}}getButtonInteractionBackgroundColor(v){return`var(${v}, var(--vscode-menubar-selectionBackground))`}render(){return a.default.createElement(S.IconButton,h(i({},this.props),{styles:this.setStyle(this.props),menuAs:s.UIContextualMenu}))}}o.UIIconButton=n,n.__docgenInfo={description:`UIIconButton component.
based on https://developer.microsoft.com/en-us/fluentui#/controls/web/button
UIIconButton
{React.Component<ButtonProps, {}>}`,methods:[{name:"setStyle",docblock:null,modifiers:[],params:[{name:"props",optional:!1,type:{name:"ButtonProps",alias:"ButtonProps"}}],returns:{type:{name:"IButtonStyles"}}}],displayName:"UIIconButton",props:{sizeType:{required:!1,tsType:{name:"UIIconButtonSizes"},description:""},menuProps:{required:!1,tsType:{name:"UIIContextualMenuProps"},description:""}},composes:["IBaseButtonProps"]}},"./src/components/UIButton/UISmallButton.tsx"(m,o,e){var d=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(o,"__esModule",{value:!0}),o.UISmallButton=void 0;const a=d(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),S=e("../../node_modules/.pnpm/@fluentui+react@8.125.6_@types+react-dom@16.9.25_@types+react@16.14.69__@types+react@16_03684c25d5c3502754322356d0aa96d9/node_modules/@fluentui/react/lib-commonjs/index.js");class s extends a.default.Component{constructor(n){super(n),this.buttonSecondaryForeground="--vscode-button-secondaryForeground",this.setStyle=r=>({root:h(i({minWidth:"initial",height:16,fontSize:"11px",fontWeight:400,borderRadius:"var(--vscode-cornerRadius-circle, 9999px)",paddingLeft:13,paddingRight:13,backgroundColor:"var(--vscode-button-secondaryBackground, #5f6a79)",borderColor:"var(--vscode-contrastBorder, var(--vscode-button-secondaryBackground, #5f6a79))",color:this.getColorwithFallback(this.buttonSecondaryForeground,"#ffffff")},r.primary&&{backgroundColor:this.getColor("--vscode-button-background"),borderColor:"var(--vscode-contrastBorder, var(--vscode-button-background))",color:this.getColor("--vscode-button-foreground")}),{selectors:{".ms-Fabric--isFocusVisible &:focus:after":{outlineColor:"var(--vscode-focusBorder)",inset:-3}}}),label:{marginLeft:0,marginRight:0,fontWeight:400,lineHeight:11,whiteSpace:"nowrap"},rootDisabled:i({opacity:"0.5 !important",backgroundColor:"var(--vscode-button-secondaryBackground,#5f6a79)",borderColor:"var(--vscode-button-secondaryBackground, #5f6a79)",color:this.getColorwithFallback(this.buttonSecondaryForeground,"#ffffff")},r.primary&&{opacity:"0.5 !important",color:this.getColor("--vscode-button-foreground"),backgroundColor:"var(--vscode-button-background)",borderColor:"var(--vscode-button-background)"}),rootHovered:i({color:this.getColorwithFallback(this.buttonSecondaryForeground,"#ffffff"),backgroundColor:"var(--vscode-button-secondaryHoverBackground, #4c5561)",borderColor:"var(--vscode-contrastActiveBorder, var(--vscode-button-secondaryHoverBackground, #4c5561))",selectors:{"svg > path, svg > rect":{fill:this.getColorwithFallback(this.buttonSecondaryForeground,"#ffffff")}}},r.primary&&{color:"var(--vscode-button-foreground)",backgroundColor:"var(--vscode-button-hoverBackground)",borderColor:"var(--vscode-contrastActiveBorder, var(--vscode-button-hoverBackground))",selectors:{"svg > path, svg > rect":{fill:"var(--vscode-button-foreground)"}}})})}getColor(n){return`var(${n})`}getColorwithFallback(n,r){return`var(${n}, ${r})`}render(){return a.default.createElement(S.DefaultButton,h(i({},this.props),{styles:this.setStyle(this.props)}))}}o.UISmallButton=s,s.__docgenInfo={description:"",methods:[{name:"setStyle",docblock:null,modifiers:[],params:[{name:"props",optional:!1,type:{name:"IButtonProps",alias:"IButtonProps"}}],returns:{type:{name:"IButtonStyles"}}}],displayName:"UISmallButton"}},"./src/components/UIButton/UISplitButton.tsx"(m,o,e){var d=this&&this.__createBinding||(Object.create?(function(g,c,l,u){u===void 0&&(u=l);var b=Object.getOwnPropertyDescriptor(c,l);(!b||("get"in b?!c.__esModule:b.writable||b.configurable))&&(b={enumerable:!0,get:function(){return c[l]}}),Object.defineProperty(g,u,b)}):(function(g,c,l,u){u===void 0&&(u=l),g[u]=c[l]})),a=this&&this.__setModuleDefault||(Object.create?(function(g,c){Object.defineProperty(g,"default",{enumerable:!0,value:c})}):function(g,c){g.default=c}),S=this&&this.__importStar||(function(){var g=function(c){return g=Object.getOwnPropertyNames||function(l){var u=[];for(var b in l)Object.prototype.hasOwnProperty.call(l,b)&&(u[u.length]=b);return u},g(c)};return function(c){if(c&&c.__esModule)return c;var l={};if(c!=null)for(var u=g(c),b=0;b<u.length;b++)u[b]!=="default"&&d(l,c,u[b]);return a(l,c),l}})();Object.defineProperty(o,"__esModule",{value:!0}),o.UISplitButton=void 0;const s=S(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),t=e("./src/components/UIButton/UIDefaultButton.tsx"),n=e("./src/components/UIContextualMenu/index.tsx"),r=e("./src/components/Icons.tsx"),v=e("./src/utilities/index.ts");class f extends s.Component{constructor(c){super(c),this.id=this.props.id?this.props.id:(0,v.getUIId)("ui-split-button-"),this.onClick=()=>{this.props.callback(this.props.button.key)},this.onMenuItemClick=(l,u)=>{u!=null&&u.key&&this.props.callback(u.key)},this.state={menu:{items:c.menuItems,onItemClick:this.onMenuItemClick}},this.onClick=this.onClick.bind(this)}static getDerivedStateFromProps(c,l){return{menu:{items:c.menuItems,onItemClick:l.menu.onItemClick}}}render(){return s.createElement(t.UIDefaultButton,{ariaLabel:this.props.ariaLabel,ariaDescription:this.props.ariaDescription,id:this.id,className:"ui-split-button",primary:!0,split:!0,onClick:this.onClick.bind(this),menuProps:this.state.menu,menuIconProps:{iconName:r.UiIcons.ArrowDown},menuAs:n.UIContextualMenu,disabled:this.props.disabled},this.props.button.text)}}o.UISplitButton=f,f.__docgenInfo={description:`UISplitButton component
UISplitButton
{React.Component<UISplitButtonProps, UISplitButtonState>}`,methods:[{name:"onClick",docblock:null,modifiers:[],params:[],returns:{type:{name:"void"}}},{name:"onMenuItemClick",docblock:null,modifiers:[],params:[{name:"ev",optional:!0,type:{name:"union",raw:"React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>",elements:[{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLElement>",elements:[{name:"HTMLElement"}]},{name:"ReactKeyboardEvent",raw:"React.KeyboardEvent<HTMLElement>",elements:[{name:"HTMLElement"}]}]}},{name:"item",optional:!0,type:{name:"UIContextualMenuItem",alias:"UIContextualMenuItem"}}],returns:{type:{name:"void"}}}],displayName:"UISplitButton",props:{button:{required:!0,tsType:{name:"UIContextualMenuItem"},description:""},menuItems:{required:!0,tsType:{name:"Array",elements:[{name:"UIContextualMenuItem"}],raw:"UIContextualMenuItem[]"},description:""},callback:{required:!0,tsType:{name:"signature",type:"function",raw:"(key: string) => void",signature:{arguments:[{type:{name:"string"},name:"key"}],return:{name:"void"}}},description:""},id:{required:!1,tsType:{name:"string"},description:""},ariaLabel:{required:!1,tsType:{name:"string"},description:""},ariaDescription:{required:!1,tsType:{name:"string"},description:""},disabled:{required:!1,tsType:{name:"boolean"},description:""}}}},"./src/components/UIButton/index.tsx"(m,o,e){var d=this&&this.__createBinding||(Object.create?(function(S,s,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(s,t);(!r||("get"in r?!s.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return s[t]}}),Object.defineProperty(S,n,r)}):(function(S,s,t,n){n===void 0&&(n=t),S[n]=s[t]})),a=this&&this.__exportStar||function(S,s){for(var t in S)t!=="default"&&!Object.prototype.hasOwnProperty.call(s,t)&&d(s,S,t)};Object.defineProperty(o,"__esModule",{value:!0}),a(e("./src/components/UIButton/UIActionButton.tsx"),o),a(e("./src/components/UIButton/UIDefaultButton.tsx"),o),a(e("./src/components/UIButton/UIIconButton.tsx"),o),a(e("./src/components/UIButton/UISplitButton.tsx"),o),a(e("./src/components/UIButton/UISmallButton.tsx"),o)},"./src/utilities/Debounce.ts"(m,o){Object.defineProperty(o,"__esModule",{value:!0}),o.debounce=e;function e(d,a){let S;return(...s)=>{clearTimeout(S),S=window.setTimeout(()=>{d(...s)},a)}}},"./src/utilities/Dom.ts"(m,o){Object.defineProperty(o,"__esModule",{value:!0}),o.isHTMLElement=e,o.isHTMLInputElement=d;function e(a){return"title"in a}function d(a){return"value"in a&&"tagName"in a&&a.tagName==="INPUT"}},"./src/utilities/Focus.ts"(m,o,e){Object.defineProperty(o,"__esModule",{value:!0}),o.isElementTabbable=o.getPreviousElement=o.getNextElement=o.setUIFocusVisibility=o.getUILastFocusable=o.getUIFirstFocusable=void 0,o.focusToSibling=a;const d=e("../../node_modules/.pnpm/@fluentui+react@8.125.6_@types+react-dom@16.9.25_@types+react@16.14.69__@types+react@16_03684c25d5c3502754322356d0aa96d9/node_modules/@fluentui/react/lib-commonjs/index.js");Object.defineProperty(o,"getUIFirstFocusable",{enumerable:!0,get:function(){return d.getFirstFocusable}}),Object.defineProperty(o,"getUILastFocusable",{enumerable:!0,get:function(){return d.getLastFocusable}}),Object.defineProperty(o,"setUIFocusVisibility",{enumerable:!0,get:function(){return d.setFocusVisibility}}),Object.defineProperty(o,"getNextElement",{enumerable:!0,get:function(){return d.getNextElement}}),Object.defineProperty(o,"getPreviousElement",{enumerable:!0,get:function(){return d.getPreviousElement}}),Object.defineProperty(o,"isElementTabbable",{enumerable:!0,get:function(){return d.isElementTabbable}});function a(S,s){const t=(0,d.getDocument)();if(t){let n=null;if(s?n=(0,d.getNextElement)(t.body,S,!1,!1,!0,!0):n=(0,d.getPreviousElement)(t.body,S,!1,!1,!0,!0),n)return n.focus(),n}return null}},"./src/utilities/Id.ts"(m,o,e){Object.defineProperty(o,"__esModule",{value:!0}),o.getUIId=void 0;const d=e("../../node_modules/.pnpm/@fluentui+react@8.125.6_@types+react-dom@16.9.25_@types+react@16.14.69__@types+react@16_03684c25d5c3502754322356d0aa96d9/node_modules/@fluentui/react/lib-commonjs/index.js");Object.defineProperty(o,"getUIId",{enumerable:!0,get:function(){return d.getId}})},"./src/utilities/Keys.ts"(m,o,e){Object.defineProperty(o,"__esModule",{value:!0}),o.UIKeyCodes=void 0;const d=e("../../node_modules/.pnpm/@fluentui+react@8.125.6_@types+react-dom@16.9.25_@types+react@16.14.69__@types+react@16_03684c25d5c3502754322356d0aa96d9/node_modules/@fluentui/react/lib-commonjs/index.js");Object.defineProperty(o,"UIKeyCodes",{enumerable:!0,get:function(){return d.KeyCodes}})},"./src/utilities/index.ts"(m,o,e){var d=this&&this.__createBinding||(Object.create?(function(S,s,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(s,t);(!r||("get"in r?!s.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return s[t]}}),Object.defineProperty(S,n,r)}):(function(S,s,t,n){n===void 0&&(n=t),S[n]=s[t]})),a=this&&this.__exportStar||function(S,s){for(var t in S)t!=="default"&&!Object.prototype.hasOwnProperty.call(s,t)&&d(s,S,t)};Object.defineProperty(o,"__esModule",{value:!0}),a(e("./src/utilities/Debounce.ts"),o),a(e("./src/utilities/Dom.ts"),o),a(e("./src/utilities/Focus.ts"),o),a(e("./src/utilities/Id.ts"),o),a(e("./src/utilities/Keys.ts"),o)}}]);})();