decap-cms-ui-default 3.2.0 → 3.3.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/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.3.0](https://github.com/decaporg/decap-cms/compare/decap-cms-ui-default@3.1.4...decap-cms-ui-default@3.3.0) (2025-07-15)
7
+
8
+ ### Features
9
+
10
+ - add logo to header ([#7487](https://github.com/decaporg/decap-cms/issues/7487)) ([b540ace](https://github.com/decaporg/decap-cms/commit/b540acec943eb231df6aac7b1d515d9b4b84fa5d))
11
+
6
12
  # [3.2.0](https://github.com/decaporg/decap-cms/compare/decap-cms-ui-default@3.1.4...decap-cms-ui-default@3.2.0) (2025-06-26)
7
13
 
8
14
  **Note:** Version bump only for package decap-cms-ui-default
@@ -7,5 +7,5 @@
7
7
  to {
8
8
  transform: rotate(360deg);
9
9
  }
10
- `},Rr=S("div",{target:"ep2bezb2",label:"LoaderText"})({name:"xpdb8l",styles:"width:auto!important;height:auto!important;text-align:center;color:#767676;margin-top:55px;line-height:35px"}),Br=S("div",{target:"ep2bezb1",label:"LoaderItem"})({name:"12zl32h",styles:"position:absolute;white-space:nowrap;transform:translateX(-50%)"});class Pr extends g().Component{constructor(...t){super(...t),Tr(this,"state",{currentItem:0}),Tr(this,"setAnimation",()=>{if(this.interval)return;const{children:t}=this.props;this.interval=setInterval(()=>{const e=this.state.currentItem===t.length-1?0:this.state.currentItem+1;this.setState({currentItem:e})},5e3)}),Tr(this,"renderChild",()=>{const{children:t}=this.props,{currentItem:r}=this.state;return t?"string"==typeof t?(0,e.jsx)(Rr,null,t):Array.isArray(t)?(this.setAnimation(),(0,e.jsx)(Rr,null,(0,e.jsx)(Ir,{className:{enter:Dr.enter,enterActive:Dr.enterActive,exit:Dr.exit,exitActive:Dr.exitActive},timeout:500},(0,e.jsx)(Br,{key:r},t[r])))):void 0:null})}componentDidMount(){O().checkPropTypes(Pr.propTypes,this.props,"prop","Loader")}componentWillUnmount(){this.interval&&clearInterval(this.interval)}render(){const{className:t}=this.props;return(0,e.jsx)("div",{className:t},this.renderChild())}}Tr(Pr,"propTypes",{children:O().node,className:O().string});const qr=S(Pr,{target:"ep2bezb0",label:"StyledLoader"})("display:",t=>t.active?"block":"none",";position:absolute;top:50%;left:50%;margin:0;text-align:center;z-index:",J.zIndex1000,";transform:translateX(-50%) translateY(-50%);&:before,&:after{content:'';position:absolute;top:0%;left:50%;width:2.2857rem;height:2.2857rem;margin:0 0 0 -1.1429rem;border-radius:500rem;border-style:solid;border-width:0.2em;}&:before{border-color:rgba(0, 0, 0, 0.1);}&:after{animation:",Ar.loader," 0.6s linear;animation-iteration-count:infinite;border-color:",A.active," transparent transparent;box-shadow:0 0 0 1px transparent;}"),Nr={default:{background:A.textFieldBorder,text:A.controlLabel},active:{background:A.active,text:A.textLight},error:{background:A.errorText,text:D.white}};function Zr({isActive:t,hasErrors:e}){return e?Nr.error:t?Nr.active:Nr.default}const Ur=S("label",{target:"e1xtv0oy0",label:"FieldLabel"})(N.fieldLabel,";color:",t=>Zr(t).text,";background-color:",t=>Zr(t).background,";display:inline-block;border:0;border-radius:3px 3px 0 0;padding:3px 6px 2px;margin:0;transition:all ",P.main,";position:relative;&:before,&:after{content:'';display:block;position:absolute;top:0;right:-4px;height:100%;width:4px;background-color:inherit;}&:after{border-bottom-left-radius:3px;background-color:#fff;}"),Fr={small:"28px",large:"40px"},Hr=S("button",{target:"em2wuvj0",label:"ButtonRound"})(V.button,";",q.dropMiddle,";background-color:",D.white,";color:",t=>A[t.isActive?"active":"inactive"],";border-radius:32px;display:flex;justify-content:center;align-items:center;width:",t=>Fr[t.size],";height:",t=>Fr[t.size],";padding:0;"),Kr=S("button",{target:"ek00w7u3",label:"ToggleContainer"})({name:"1afa32y",styles:"display:inline-flex;align-items:center;justify-content:center;position:relative;width:40px;height:20px;cursor:pointer;border:none;padding:0;margin:0;background:transparent"});var Wr={name:"18x3ccc-ToggleHandle",styles:"transform:translateX(20px);label:ToggleHandle;"};const Vr=S("span",{target:"ek00w7u2",label:"ToggleHandle"})(q.dropDeep,";position:absolute;left:0;top:0;width:20px;height:20px;border-radius:50%;background-color:",D.white,";transition:transform ",P.main,";",t=>t.isActive&&Wr,";"),Gr=S("span",{target:"ek00w7u1",label:"ToggleBackground"})("width:34px;height:14px;border-radius:10px;background-color:",A.active,";");function $r({id:t,active:r,onChange:n,onFocus:o,onBlur:i,className:s,Container:a=Kr,Background:u=Gr,Handle:c=Vr}){const[l,p]=(0,v.useState)(r);return(0,e.jsx)(a,{id:t,onFocus:o,onBlur:i,className:s,onClick:function(){p(t=>!t),n&&n(!l)},role:"switch","aria-checked":null==l?void 0:l.toString(),"aria-expanded":null},(0,e.jsx)(u,{isActive:l}),(0,e.jsx)(c,{isActive:l}))}$r.propTypes={id:O().string,active:O().bool,onChange:O().func,onFocus:O().func,onBlur:O().func,className:O().string,Container:O().func,Background:O().func,Handle:O().func};const Xr=S($r,{target:"ek00w7u0",label:"StyledToggle"})(""),Jr=S("a",{target:"e1sptrq41",label:"GoBackButtonStyle"})({name:"1d6fxhx",styles:"display:flex;align-items:center;margin-top:50px;padding:10px;font-size:14px"}),Yr=S("p",{target:"e1sptrq40",label:"ButtonText"})("color:",D.gray,";margin:0 10px;");class Qr extends g().Component{componentDidMount(){O().checkPropTypes(Qr.propTypes,this.props,"prop","GoBackButton")}render(){const{href:t,t:r}=this.props;return(0,e.jsx)(Jr,{href:t},(0,e.jsx)(Xe,{type:"arrow",size:"small"}),(0,e.jsx)(Yr,null,r("ui.default.goBackToSite")))}}var tn,en,rn;tn=Qr,en="propTypes",rn={href:O().string.isRequired,t:O().func.isRequired},(en=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(en))in tn?Object.defineProperty(tn,en,{value:rn,enumerable:!0,configurable:!0,writable:!0}):tn[en]=rn;const nn=S("section",{target:"exus10f5",label:"StyledAuthenticationPage"})({name:"14ts7qn",styles:"display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;gap:50px;height:100vh"}),on=S("span",{target:"exus10f4",label:"CustomIconWrapper"})({name:"1hhl19u",styles:"width:300px;height:auto"}),sn=S(Xe,{target:"exus10f3",label:"DecapLogoIcon"})({name:"pit38s",styles:"height:auto"}),an=S(Xe,{target:"exus10f2",label:"NetlifyCreditIcon"})({name:"iy5sn8",styles:"color:#c4c6d2;position:absolute;bottom:10px"});function un({url:t}){return(0,e.jsx)(on,null,(0,e.jsx)("img",{src:t,alt:"Logo"}))}function cn(t){return t?(0,e.jsx)(un,{url:t}):(0,e.jsx)(sn,{size:"300px",type:"decap-cms"})}const ln=S("button",{target:"exus10f1",label:"LoginButton"})(V.button,";",q.dropDeep,";",V.default,";",V.gray,";&[disabled]{",V.disabled,";}padding:0 12px;margin-top:0;display:flex;align-items:center;position:relative;"),pn=S("button",{target:"exus10f0",label:"TextButton"})(V.button,";",V.default,";",V.grayText,";margin-top:0;display:flex;align-items:center;position:relative;");function fn({onLogin:t,loginDisabled:r,loginErrorMessage:n,renderButtonContent:o,renderPageContent:i,logoUrl:s,siteUrl:a,t:u}){return(0,e.jsx)(nn,null,cn(s),n?(0,e.jsx)("p",null,n):null,i?i({LoginButton:ln,TextButton:pn,showAbortButton:!a}):null,o?(0,e.jsx)(ln,{disabled:r,onClick:t},o()):null,a&&(0,e.jsx)(Qr,{href:a,t:u}),s?(0,e.jsx)(an,{size:"100px",type:"decap-cms"}):null)}fn.propTypes={onLogin:O().func,logoUrl:O().string,siteUrl:O().string,loginDisabled:O().bool,loginErrorMessage:O().node,renderButtonContent:O().func,renderPageContent:O().func,t:O().func.isRequired};const hn=S("div",{target:"es44anv0",label:"WidgetPreviewContainer"})({name:"1wf5os2",styles:"margin:15px 2px"});var dn=i(3044),vn=i.n(dn);const gn=S("div",{target:"ekazr9y3",label:"TopBarContainer"})("align-items:center;background-color:",A.textFieldBorder,";display:flex;justify-content:space-between;margin:0 -14px;padding:13px;");var yn={name:"5r0eyy-ExpandButtonContainer",styles:"display:flex;align-items:center;font-size:14px;font-weight:500;line-height:1;label:ExpandButtonContainer;"};const mn=S("div",{target:"ekazr9y2",label:"ExpandButtonContainer"})(t=>t.hasHeading&&yn,";"),_n=S("button",{target:"ekazr9y1",label:"ExpandButton"})(V.button,";padding:4px;background-color:transparent;color:inherit;&:last-of-type{margin-right:4px;}"),bn=S("button",{target:"ekazr9y0",label:"AddButton"})(V.button," ",V.widget," ",Xe,"{margin-left:6px;}");class xn extends g().Component{componentDidMount(){O().checkPropTypes(xn.propTypes,this.props,"prop","ObjectWidgetTopBar")}renderAddUI(){return this.props.allowAdd?this.props.types&&this.props.types.size>0?this.renderTypesDropdown(this.props.types):this.renderAddButton():null}renderTypesDropdown(t){return(0,e.jsx)(or,{renderButton:()=>(0,e.jsx)(tr,null,this.props.t("editor.editorWidgets.list.addType",{item:this.props.label}))},t.map((t,r)=>(0,e.jsx)(ir,{key:r,label:t.get("label",t.get("name")),onClick:()=>this.props.onAddType(t.get("name"))})))}renderAddButton(){return(0,e.jsx)(bn,{onClick:this.props.onAdd},this.props.t("editor.editorWidgets.list.add",{item:this.props.label}),(0,e.jsx)(Xe,{type:"add",size:"xsmall"}))}render(){const{onCollapseToggle:t,collapsed:r,heading:n=null}=this.props;return(0,e.jsx)(gn,null,(0,e.jsx)(mn,{hasHeading:!!n},(0,e.jsx)(_n,{onClick:t,"data-testid":"expand-button"},(0,e.jsx)(Xe,{type:"chevron",direction:r?"right":"down",size:"small"})),n),this.renderAddUI())}}!function(t,e,r){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(xn,"propTypes",{allowAdd:O().bool,types:vn().list,onAdd:O().func,onAddType:O().func,onCollapseToggle:O().func,collapsed:O().bool,heading:O().node,label:O().string,t:O().func.isRequired});const wn=xn,Ln={Dropdown:or,DropdownItem:ir,DropdownCheckedItem:ur,DropdownButton:E.Button,StyledDropdownButton:tr,ListItemTopBar:dr,FieldLabel:Ur,Icon:Xe,IconButton:function({size:t,isActive:r,type:n,onClick:o,className:i,title:s}){return(0,e.jsx)(Hr,{size:t,isActive:r,className:i,onClick:o,title:s},(0,e.jsx)(Xe,{type:n,size:t}))},Loader:qr,Toggle:Xr,ToggleContainer:Kr,ToggleBackground:Gr,ToggleHandle:Vr,AuthenticationPage:fn,WidgetPreviewContainer:hn,ObjectWidgetTopBar:wn,fonts:T,colorsRaw:D,colors:A,lengths:R,components:$,buttons:V,shadows:q,text:N,borders:B,transitions:P,effects:U,zIndex:J,reactSelectStyles:X,GlobalStyles:function(){return(0,e.jsx)(e.Global,{styles:(0,e.css)("*,*:before,*:after{box-sizing:border-box;}:focus{outline:-webkit-focus-ring-color auto ",R.borderRadius,";}[data-whatintent='mouse'] *:focus{outline:none;}input{border:0;}body{font-family:",T.primary,";font-weight:normal;background-color:",A.background,";color:",A.text,";margin:0;}ul,ol{padding-left:0;}h1,h2,h3,h4,h5,h6,p{font-family:",T.primary,";color:",A.textLead,";font-size:15px;line-height:1.5;margin-top:0;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1{font-size:24px;letter-spacing:0.4px;color:",A.textLead,";}a,button{font-size:14px;font-weight:500;}a{color:",A.text,";text-decoration:none;}button{font-family:inherit;}img{max-width:100%;}textarea{resize:none;};label:GlobalStyles;")})},renderPageLogo:cn}})(),s.DecapCmsUiDefault})());
10
+ `},Rr=S("div",{target:"ep2bezb2",label:"LoaderText"})({name:"xpdb8l",styles:"width:auto!important;height:auto!important;text-align:center;color:#767676;margin-top:55px;line-height:35px"}),Br=S("div",{target:"ep2bezb1",label:"LoaderItem"})({name:"12zl32h",styles:"position:absolute;white-space:nowrap;transform:translateX(-50%)"});class Pr extends g().Component{constructor(...t){super(...t),Tr(this,"state",{currentItem:0}),Tr(this,"setAnimation",()=>{if(this.interval)return;const{children:t}=this.props;this.interval=setInterval(()=>{const e=this.state.currentItem===t.length-1?0:this.state.currentItem+1;this.setState({currentItem:e})},5e3)}),Tr(this,"renderChild",()=>{const{children:t}=this.props,{currentItem:r}=this.state;return t?"string"==typeof t?(0,e.jsx)(Rr,null,t):Array.isArray(t)?(this.setAnimation(),(0,e.jsx)(Rr,null,(0,e.jsx)(Ir,{className:{enter:Dr.enter,enterActive:Dr.enterActive,exit:Dr.exit,exitActive:Dr.exitActive},timeout:500},(0,e.jsx)(Br,{key:r},t[r])))):void 0:null})}componentDidMount(){O().checkPropTypes(Pr.propTypes,this.props,"prop","Loader")}componentWillUnmount(){this.interval&&clearInterval(this.interval)}render(){const{className:t}=this.props;return(0,e.jsx)("div",{className:t},this.renderChild())}}Tr(Pr,"propTypes",{children:O().node,className:O().string});const qr=S(Pr,{target:"ep2bezb0",label:"StyledLoader"})("display:",t=>t.active?"block":"none",";position:absolute;top:50%;left:50%;margin:0;text-align:center;z-index:",J.zIndex1000,";transform:translateX(-50%) translateY(-50%);&:before,&:after{content:'';position:absolute;top:0%;left:50%;width:2.2857rem;height:2.2857rem;margin:0 0 0 -1.1429rem;border-radius:500rem;border-style:solid;border-width:0.2em;}&:before{border-color:rgba(0, 0, 0, 0.1);}&:after{animation:",Ar.loader," 0.6s linear;animation-iteration-count:infinite;border-color:",A.active," transparent transparent;box-shadow:0 0 0 1px transparent;}"),Nr={default:{background:A.textFieldBorder,text:A.controlLabel},active:{background:A.active,text:A.textLight},error:{background:A.errorText,text:D.white}};function Zr({isActive:t,hasErrors:e}){return e?Nr.error:t?Nr.active:Nr.default}const Ur=S("label",{target:"e1xtv0oy0",label:"FieldLabel"})(N.fieldLabel,";color:",t=>Zr(t).text,";background-color:",t=>Zr(t).background,";display:inline-block;border:0;border-radius:3px 3px 0 0;padding:3px 6px 2px;margin:0;transition:all ",P.main,";position:relative;&:before,&:after{content:'';display:block;position:absolute;top:0;right:-4px;height:100%;width:4px;background-color:inherit;}&:after{border-bottom-left-radius:3px;background-color:#fff;}"),Fr={small:"28px",large:"40px"},Hr=S("button",{target:"em2wuvj0",label:"ButtonRound"})(V.button,";",q.dropMiddle,";background-color:",D.white,";color:",t=>A[t.isActive?"active":"inactive"],";border-radius:32px;display:flex;justify-content:center;align-items:center;width:",t=>Fr[t.size],";height:",t=>Fr[t.size],";padding:0;"),Kr=S("button",{target:"ek00w7u3",label:"ToggleContainer"})({name:"1afa32y",styles:"display:inline-flex;align-items:center;justify-content:center;position:relative;width:40px;height:20px;cursor:pointer;border:none;padding:0;margin:0;background:transparent"});var Wr={name:"18x3ccc-ToggleHandle",styles:"transform:translateX(20px);label:ToggleHandle;"};const Vr=S("span",{target:"ek00w7u2",label:"ToggleHandle"})(q.dropDeep,";position:absolute;left:0;top:0;width:20px;height:20px;border-radius:50%;background-color:",D.white,";transition:transform ",P.main,";",t=>t.isActive&&Wr,";"),Gr=S("span",{target:"ek00w7u1",label:"ToggleBackground"})("width:34px;height:14px;border-radius:10px;background-color:",A.active,";");function $r({id:t,active:r,onChange:n,onFocus:o,onBlur:i,className:s,Container:a=Kr,Background:u=Gr,Handle:c=Vr}){const[l,p]=(0,v.useState)(r);return(0,e.jsx)(a,{id:t,onFocus:o,onBlur:i,className:s,onClick:function(){p(t=>!t),n&&n(!l)},role:"switch","aria-checked":null==l?void 0:l.toString(),"aria-expanded":null},(0,e.jsx)(u,{isActive:l}),(0,e.jsx)(c,{isActive:l}))}$r.propTypes={id:O().string,active:O().bool,onChange:O().func,onFocus:O().func,onBlur:O().func,className:O().string,Container:O().func,Background:O().func,Handle:O().func};const Xr=S($r,{target:"ek00w7u0",label:"StyledToggle"})(""),Jr=S("a",{target:"e1sptrq41",label:"GoBackButtonStyle"})({name:"1d6fxhx",styles:"display:flex;align-items:center;margin-top:50px;padding:10px;font-size:14px"}),Yr=S("p",{target:"e1sptrq40",label:"ButtonText"})("color:",D.gray,";margin:0 10px;");class Qr extends g().Component{componentDidMount(){O().checkPropTypes(Qr.propTypes,this.props,"prop","GoBackButton")}render(){const{href:t,t:r}=this.props;return(0,e.jsx)(Jr,{href:t},(0,e.jsx)(Xe,{type:"arrow",size:"small"}),(0,e.jsx)(Yr,null,r("ui.default.goBackToSite")))}}var tn,en,rn;tn=Qr,en="propTypes",rn={href:O().string.isRequired,t:O().func.isRequired},(en=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(en))in tn?Object.defineProperty(tn,en,{value:rn,enumerable:!0,configurable:!0,writable:!0}):tn[en]=rn;const nn=S("section",{target:"exus10f5",label:"StyledAuthenticationPage"})({name:"14ts7qn",styles:"display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;gap:50px;height:100vh"}),on=S("span",{target:"exus10f4",label:"CustomIconWrapper"})({name:"lrqmip",styles:"width:300px;height:auto;text-align:center;margin-bottom:1rem"}),sn=S(Xe,{target:"exus10f3",label:"DecapLogoIcon"})({name:"pit38s",styles:"height:auto"}),an=S(Xe,{target:"exus10f2",label:"NetlifyCreditIcon"})({name:"iy5sn8",styles:"color:#c4c6d2;position:absolute;bottom:10px"});function un({url:t}){return(0,e.jsx)(on,null,(0,e.jsx)("img",{src:t,alt:"Logo"}))}function cn(t){return t?(0,e.jsx)(un,{url:t}):(0,e.jsx)(sn,{size:"300px",type:"decap-cms"})}const ln=S("button",{target:"exus10f1",label:"LoginButton"})(V.button,";",q.dropDeep,";",V.default,";",V.gray,";&[disabled]{",V.disabled,";}padding:0 12px;margin-top:0;display:flex;align-items:center;position:relative;"),pn=S("button",{target:"exus10f0",label:"TextButton"})(V.button,";",V.default,";",V.grayText,";margin-top:0;display:flex;align-items:center;position:relative;");function fn({onLogin:t,loginDisabled:r,loginErrorMessage:n,renderButtonContent:o,renderPageContent:i,logoUrl:s,logo:a,siteUrl:u,t:c}){const l=s||(null==a?void 0:a.src);return(0,e.jsx)(nn,null,cn(l),n?(0,e.jsx)("p",null,n):null,i?i({LoginButton:ln,TextButton:pn,showAbortButton:!u}):null,o?(0,e.jsx)(ln,{disabled:r,onClick:t},o()):null,u&&(0,e.jsx)(Qr,{href:u,t:c}),l?(0,e.jsx)(an,{size:"100px",type:"decap-cms"}):null)}fn.propTypes={onLogin:O().func,logoUrl:O().string,logo:O().shape({src:O().string,show_in_header:O().bool}),siteUrl:O().string,loginDisabled:O().bool,loginErrorMessage:O().node,renderButtonContent:O().func,renderPageContent:O().func,t:O().func.isRequired};const hn=S("div",{target:"es44anv0",label:"WidgetPreviewContainer"})({name:"1wf5os2",styles:"margin:15px 2px"});var dn=i(3044),vn=i.n(dn);const gn=S("div",{target:"ekazr9y3",label:"TopBarContainer"})("align-items:center;background-color:",A.textFieldBorder,";display:flex;justify-content:space-between;margin:0 -14px;padding:13px;");var yn={name:"5r0eyy-ExpandButtonContainer",styles:"display:flex;align-items:center;font-size:14px;font-weight:500;line-height:1;label:ExpandButtonContainer;"};const mn=S("div",{target:"ekazr9y2",label:"ExpandButtonContainer"})(t=>t.hasHeading&&yn,";"),_n=S("button",{target:"ekazr9y1",label:"ExpandButton"})(V.button,";padding:4px;background-color:transparent;color:inherit;&:last-of-type{margin-right:4px;}"),bn=S("button",{target:"ekazr9y0",label:"AddButton"})(V.button," ",V.widget," ",Xe,"{margin-left:6px;}");class xn extends g().Component{componentDidMount(){O().checkPropTypes(xn.propTypes,this.props,"prop","ObjectWidgetTopBar")}renderAddUI(){return this.props.allowAdd?this.props.types&&this.props.types.size>0?this.renderTypesDropdown(this.props.types):this.renderAddButton():null}renderTypesDropdown(t){return(0,e.jsx)(or,{renderButton:()=>(0,e.jsx)(tr,null,this.props.t("editor.editorWidgets.list.addType",{item:this.props.label}))},t.map((t,r)=>(0,e.jsx)(ir,{key:r,label:t.get("label",t.get("name")),onClick:()=>this.props.onAddType(t.get("name"))})))}renderAddButton(){return(0,e.jsx)(bn,{onClick:this.props.onAdd},this.props.t("editor.editorWidgets.list.add",{item:this.props.label}),(0,e.jsx)(Xe,{type:"add",size:"xsmall"}))}render(){const{onCollapseToggle:t,collapsed:r,heading:n=null}=this.props;return(0,e.jsx)(gn,null,(0,e.jsx)(mn,{hasHeading:!!n},(0,e.jsx)(_n,{onClick:t,"data-testid":"expand-button"},(0,e.jsx)(Xe,{type:"chevron",direction:r?"right":"down",size:"small"})),n),this.renderAddUI())}}!function(t,e,r){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(xn,"propTypes",{allowAdd:O().bool,types:vn().list,onAdd:O().func,onAddType:O().func,onCollapseToggle:O().func,collapsed:O().bool,heading:O().node,label:O().string,t:O().func.isRequired});const wn=xn,Ln={Dropdown:or,DropdownItem:ir,DropdownCheckedItem:ur,DropdownButton:E.Button,StyledDropdownButton:tr,ListItemTopBar:dr,FieldLabel:Ur,Icon:Xe,IconButton:function({size:t,isActive:r,type:n,onClick:o,className:i,title:s}){return(0,e.jsx)(Hr,{size:t,isActive:r,className:i,onClick:o,title:s},(0,e.jsx)(Xe,{type:n,size:t}))},Loader:qr,Toggle:Xr,ToggleContainer:Kr,ToggleBackground:Gr,ToggleHandle:Vr,AuthenticationPage:fn,WidgetPreviewContainer:hn,ObjectWidgetTopBar:wn,fonts:T,colorsRaw:D,colors:A,lengths:R,components:$,buttons:V,shadows:q,text:N,borders:B,transitions:P,effects:U,zIndex:J,reactSelectStyles:X,GlobalStyles:function(){return(0,e.jsx)(e.Global,{styles:(0,e.css)("*,*:before,*:after{box-sizing:border-box;}:focus{outline:-webkit-focus-ring-color auto ",R.borderRadius,";}[data-whatintent='mouse'] *:focus{outline:none;}input{border:0;}body{font-family:",T.primary,";font-weight:normal;background-color:",A.background,";color:",A.text,";margin:0;}ul,ol{padding-left:0;}h1,h2,h3,h4,h5,h6,p{font-family:",T.primary,";color:",A.textLead,";font-size:15px;line-height:1.5;margin-top:0;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1{font-size:24px;letter-spacing:0.4px;color:",A.textLead,";}a,button{font-size:14px;font-weight:500;}a{color:",A.text,";text-decoration:none;}button{font-family:inherit;}img{max-width:100%;}textarea{resize:none;};label:GlobalStyles;")})},renderPageLogo:cn}})(),s.DecapCmsUiDefault})());
11
11
  //# sourceMappingURL=decap-cms-ui-default.js.map