@cgi-learning-hub/ui 0.0.1-dev.1708942498 → 0.0.1-dev.1708959744
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/dist/{Button-X7eWZQfX.js → Button-CmBnwwn3.js} +12 -12
- package/dist/{Button-Tkz5NkF_.cjs → Button-wMPAZpnO.cjs} +1 -1
- package/dist/ButtonBase-Bw43M3TO.js +831 -0
- package/dist/ButtonBase-XPViWbp_.cjs +75 -0
- package/dist/CircularProgress-BCdQaPFF.cjs +28 -0
- package/dist/CircularProgress-DRE9BLTL.js +215 -0
- package/dist/Input-DHic6dYE.cjs +1 -0
- package/dist/{Input-CbYjsRHK.js → Input-Dk-cN0Fb.js} +10 -10
- package/dist/{InputBase-B13Nzzhk.js → InputBase-BbXy6VDy.js} +138 -157
- package/dist/InputBase-WBNJQn8V.cjs +4 -0
- package/dist/Tab-C2Tmr8Sv.cjs +1 -0
- package/dist/Tab-CWxCqAvH.js +237 -0
- package/dist/TransitionGroupContext-C7wWJ6l7.js +14 -0
- package/dist/TransitionGroupContext-g4tmk10h.cjs +1 -0
- package/dist/Typography-B1bdo7yt.js +177 -0
- package/dist/Typography-CO64FVmw.cjs +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/components/AnotherComponent/AnotherComponent.cjs.js +1 -1
- package/dist/components/AnotherComponent/AnotherComponent.es.js +3 -3
- package/dist/components/BasicButtons/BasicButtons.cjs.js +1 -1
- package/dist/components/BasicButtons/BasicButtons.es.js +10 -10
- package/dist/components/BasicButtons/BasicButtons.stories.cjs.js +1 -1
- package/dist/components/Dropzone/Dropzone.cjs.js +5 -0
- package/dist/components/Dropzone/Dropzone.d.ts +9 -0
- package/dist/components/Dropzone/Dropzone.es.js +1209 -0
- package/dist/components/Dropzone/index.cjs.js +1 -0
- package/dist/components/Dropzone/index.d.ts +2 -0
- package/dist/components/Dropzone/index.es.js +4 -0
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +1 -28
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +126 -333
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +8 -8
- package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +1 -1
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.es.js +20 -12
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.es.js +77 -247
- package/dist/components/inputs/TextInput/TextInput.cjs.js +11 -13
- package/dist/components/inputs/TextInput/TextInput.es.js +367 -404
- package/dist/components/lists/FileList/FileList.cjs.js +1 -0
- package/dist/components/lists/FileList/FileList.d.ts +7 -0
- package/dist/components/lists/FileList/FileList.es.js +19 -0
- package/dist/components/lists/FileList/FileListItem.cjs.js +2 -0
- package/dist/components/lists/FileList/FileListItem.d.ts +13 -0
- package/dist/components/lists/FileList/FileListItem.es.js +216 -0
- package/dist/components/lists/FileList/index.cjs.js +1 -0
- package/dist/components/lists/FileList/index.d.ts +4 -0
- package/dist/components/lists/FileList/index.es.js +6 -0
- package/dist/components/lists/index.cjs.js +1 -0
- package/dist/components/lists/index.d.ts +1 -0
- package/dist/components/lists/index.es.js +6 -0
- package/dist/createSvgIcon-9NfUaq9H.js +143 -0
- package/dist/createSvgIcon-B7HVs3ZC.cjs +2 -0
- package/dist/{createSvgIcon-jvI3LIfI.cjs → createSvgIcon-BivvPRyr.cjs} +1 -1
- package/dist/{createSvgIcon-qXNZi4k1.js → createSvgIcon-DLZM3vHe.js} +14 -14
- package/dist/{extendSxProp-BRHiEwyk.js → extendSxProp-CVD6j4mA.js} +1 -1
- package/dist/{extendSxProp-CvhhU9Vb.cjs → extendSxProp-D5gpnasP.cjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +18 -10
- package/dist/ownerWindow-BoRkeomM.js +23 -0
- package/dist/ownerWindow-Dk_4aaak.cjs +1 -0
- package/dist/refType-CMQbzE37.js +29 -0
- package/dist/refType-dllUCpD8.cjs +1 -0
- package/dist/useControlled-BsLcOmhe.js +48 -0
- package/dist/useControlled-jN3fqFfv.cjs +3 -0
- package/dist/useForkRef-CGd3Nhyb.cjs +1 -0
- package/dist/useForkRef-DwN_Iz9R.js +17 -0
- package/dist/useIsFocusVisible-BF0lT08B.cjs +1 -0
- package/dist/useIsFocusVisible-D8ksiuhS.js +69 -0
- package/dist/useTheme-BSwuVDD3.js +9 -0
- package/dist/useTheme-C-LTLVMt.cjs +1 -0
- package/dist/{useThemeProps-CDriK9TK.cjs → useThemeProps-C6ClLEqN.cjs} +14 -14
- package/dist/{useThemeProps-B6yTTpAe.js → useThemeProps-kb_vU-1P.js} +741 -714
- package/dist/useTimeout-KN97abZR.js +47 -0
- package/dist/useTimeout-qjxkiZZn.cjs +1 -0
- package/package.json +2 -1
- package/dist/ButtonBase-CKfcGhaU.js +0 -892
- package/dist/ButtonBase-Cg8cBMzO.cjs +0 -75
- package/dist/Input-CAb0EFzc.cjs +0 -1
- package/dist/InputBase-CKlCw9fj.cjs +0 -4
- package/dist/useForkRef-82uiK71d.cjs +0 -1
- package/dist/useForkRef-CLcOhrzI.js +0 -44
- package/dist/useTheme-BWRyHzdn.js +0 -65
- package/dist/useTheme-BpLcDNG1.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Dropzone.cjs.js");exports.Dropzone=e;
|
|
@@ -1,28 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
2
|
-
0% {
|
|
3
|
-
transform: rotate(0deg);
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
100% {
|
|
7
|
-
transform: rotate(360deg);
|
|
8
|
-
}
|
|
9
|
-
`)),w=x.keyframes(_||(_=I`
|
|
10
|
-
0% {
|
|
11
|
-
stroke-dasharray: 1px, 200px;
|
|
12
|
-
stroke-dashoffset: 0;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
50% {
|
|
16
|
-
stroke-dasharray: 100px, 200px;
|
|
17
|
-
stroke-dashoffset: -15px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
100% {
|
|
21
|
-
stroke-dasharray: 100px, 200px;
|
|
22
|
-
stroke-dashoffset: -125px;
|
|
23
|
-
}
|
|
24
|
-
`)),F=o=>{const{classes:e,variant:n,color:r,disableShrink:i}=o,s={root:["root",n,`color${t.capitalize(r)}`],svg:["svg"],circle:["circle",`circle${t.capitalize(n)}`,i&&"circleDisableShrink"]};return t.composeClasses(s,U,e)},G=t.styled("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:n}=o;return[e.root,e[n.variant],e[`color${t.capitalize(n.color)}`]]}})(({ownerState:o,theme:e})=>t._extends({display:"inline-block"},o.variant==="determinate"&&{transition:e.transitions.create("transform")},o.color!=="inherit"&&{color:(e.vars||e).palette[o.color].main}),({ownerState:o})=>o.variant==="indeterminate"&&x.css(j||(j=I`
|
|
25
|
-
animation: ${0} 1.4s linear infinite;
|
|
26
|
-
`),W)),V=t.styled("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(o,e)=>e.svg})({display:"block"}),K=t.styled("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(o,e)=>{const{ownerState:n}=o;return[e.circle,e[`circle${t.capitalize(n.variant)}`],n.disableShrink&&e.circleDisableShrink]}})(({ownerState:o,theme:e})=>t._extends({stroke:"currentColor"},o.variant==="determinate"&&{transition:e.transitions.create("stroke-dashoffset")},o.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:o})=>o.variant==="indeterminate"&&!o.disableShrink&&x.css(B||(B=I`
|
|
27
|
-
animation: ${0} 1.4s ease-in-out infinite;
|
|
28
|
-
`),w)),M=k.forwardRef(function(e,n){const r=t.useThemeProps({props:e,name:"MuiCircularProgress"}),{className:i,color:s="primary",disableShrink:v=!1,size:u=40,style:C,thickness:c=3.6,value:g=0,variant:b="indeterminate"}=r,T=t._objectWithoutPropertiesLoose(r,q),y=t._extends({},r,{color:s,disableShrink:v,size:u,thickness:c,value:g,variant:b}),P=F(y),f={},d={},h={};if(b==="determinate"){const m=2*Math.PI*((p-c)/2);f.strokeDasharray=m.toFixed(3),h["aria-valuenow"]=Math.round(g),f.strokeDashoffset=`${((100-g)/100*m).toFixed(3)}px`,d.transform="rotate(-90deg)"}return l.jsx(G,t._extends({className:t.clsx(P.root,i),style:t._extends({width:u,height:u},d,C),ownerState:y,ref:n,role:"progressbar"},h,T,{children:l.jsx(V,{className:P.svg,ownerState:y,viewBox:`${p/2} ${p/2} ${p} ${p}`,children:l.jsx(K,{className:P.circle,style:f,ownerState:y,cx:p,cy:p,r:(p-c)/2,fill:"none",strokeWidth:c})})}))});process.env.NODE_ENV!=="production"&&(M.propTypes={classes:t.PropTypes.object,className:t.PropTypes.string,color:t.PropTypes.oneOfType([t.PropTypes.oneOf(["inherit","primary","secondary","error","info","success","warning"]),t.PropTypes.string]),disableShrink:R.chainPropTypes(t.PropTypes.bool,o=>o.disableShrink&&o.variant&&o.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:t.PropTypes.oneOfType([t.PropTypes.number,t.PropTypes.string]),style:t.PropTypes.object,sx:t.PropTypes.oneOfType([t.PropTypes.arrayOf(t.PropTypes.oneOfType([t.PropTypes.func,t.PropTypes.object,t.PropTypes.bool])),t.PropTypes.func,t.PropTypes.object]),thickness:t.PropTypes.number,value:t.PropTypes.number,variant:t.PropTypes.oneOf(["determinate","indeterminate"])});const H=M;function Y(o){return t.generateUtilityClass("MuiLoadingButton",o)}const Z=t.generateUtilityClasses("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),a=Z,A=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],J=o=>{const{loading:e,loadingPosition:n,classes:r}=o,i={root:["root",e&&"loading"],startIcon:[e&&`startIconLoading${t.capitalize(n)}`],endIcon:[e&&`endIconLoading${t.capitalize(n)}`],loadingIndicator:["loadingIndicator",e&&`loadingIndicator${t.capitalize(n)}`]},s=t.composeClasses(i,Y,r);return t._extends({},r,s)},Q=o=>o!=="ownerState"&&o!=="theme"&&o!=="sx"&&o!=="as"&&o!=="classes",X=t.styled(O.Button,{shouldForwardProp:o=>Q(o)||o==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(o,e)=>[e.root,e.startIconLoadingStart&&{[`& .${a.startIconLoadingStart}`]:e.startIconLoadingStart},e.endIconLoadingEnd&&{[`& .${a.endIconLoadingEnd}`]:e.endIconLoadingEnd}]})(({ownerState:o,theme:e})=>t._extends({[`& .${a.startIconLoadingStart}, & .${a.endIconLoadingEnd}`]:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},o.loadingPosition==="center"&&{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${a.loading}`]:{color:"transparent"}},o.loadingPosition==="start"&&o.fullWidth&&{[`& .${a.startIconLoadingStart}, & .${a.endIconLoadingEnd}`]:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0,marginRight:-8}},o.loadingPosition==="end"&&o.fullWidth&&{[`& .${a.startIconLoadingStart}, & .${a.endIconLoadingEnd}`]:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0,marginLeft:-8}})),oo=t.styled("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(o,e)=>{const{ownerState:n}=o;return[e.loadingIndicator,e[`loadingIndicator${t.capitalize(n.loadingPosition)}`]]}})(({theme:o,ownerState:e})=>t._extends({position:"absolute",visibility:"visible",display:"flex"},e.loadingPosition==="start"&&(e.variant==="outlined"||e.variant==="contained")&&{left:e.size==="small"?10:14},e.loadingPosition==="start"&&e.variant==="text"&&{left:6},e.loadingPosition==="center"&&{left:"50%",transform:"translate(-50%)",color:(o.vars||o).palette.action.disabled},e.loadingPosition==="end"&&(e.variant==="outlined"||e.variant==="contained")&&{right:e.size==="small"?10:14},e.loadingPosition==="end"&&e.variant==="text"&&{right:6},e.loadingPosition==="start"&&e.fullWidth&&{position:"relative",left:-10},e.loadingPosition==="end"&&e.fullWidth&&{position:"relative",right:-10})),D=k.forwardRef(function(e,n){const r=k.useContext(O.ButtonGroupContext),i=t.resolveProps(r,e),s=t.useThemeProps({props:i,name:"MuiLoadingButton"}),{children:v,disabled:u=!1,id:C,loading:c=!1,loadingIndicator:g,loadingPosition:b="center",variant:T="text"}=s,y=t._objectWithoutPropertiesLoose(s,A),P=S.useId(C),f=g??l.jsx(H,{"aria-labelledby":P,color:"inherit",size:16}),d=t._extends({},s,{disabled:u,loading:c,loadingIndicator:f,loadingPosition:b,variant:T}),h=J(d),m=c?l.jsx(oo,{className:h.loadingIndicator,ownerState:d,children:f}):null;return l.jsxs(X,t._extends({disabled:u||c,id:P,ref:n},y,{variant:T,classes:h,ownerState:d,children:[d.loadingPosition==="end"?v:m,d.loadingPosition==="end"?m:v]}))});process.env.NODE_ENV!=="production"&&(D.propTypes={children:t.PropTypes.node,classes:t.PropTypes.object,disabled:t.PropTypes.bool,id:t.PropTypes.string,loading:t.PropTypes.bool,loadingIndicator:t.PropTypes.node,loadingPosition:R.chainPropTypes(t.PropTypes.oneOf(["start","end","center"]),o=>o.loadingPosition==="start"&&!o.startIcon?new Error('MUI: The loadingPosition="start" should be used in combination with startIcon.'):o.loadingPosition==="end"&&!o.endIcon?new Error('MUI: The loadingPosition="end" should be used in combination with endIcon.'):null),sx:t.PropTypes.oneOfType([t.PropTypes.arrayOf(t.PropTypes.oneOfType([t.PropTypes.func,t.PropTypes.object,t.PropTypes.bool])),t.PropTypes.func,t.PropTypes.object]),variant:t.PropTypes.oneOfType([t.PropTypes.oneOf(["contained","outlined","text"]),t.PropTypes.string])});const to=D,eo=t.styled(to,{shouldForwardProp:o=>o!=="contentColor"&&o!=="hoverColor"})(({contentColor:o,hoverColor:e,theme:n})=>({justifyContent:"center",alignItems:"center",columnGap:8,minHeight:38,paddingLeft:12,paddingRight:12,textTransform:"none",color:o,borderColor:o,borderRadius:5,borderWidth:2,"&:hover":{color:n.palette.common.white,backgroundColor:e,borderColor:e,borderWidth:2}})),no=({icon:o,text:e,...n})=>{const r=z.useTheme(),i=n.contentColor??r.palette.primary.main;return l.jsxs(eo,{...n,variant:"outlined",contentColor:i,hoverColor:n.hoverColor??i,children:[(o==null?void 0:o.position)==="left"?l.jsx(L,{...o}):null,e,(o==null?void 0:o.position)==="right"?l.jsx(L,{...o}):null]})};module.exports=no;
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime"),C=require("react"),h=require("./DefaultButtonIcon.cjs.js"),t=require("../../../useThemeProps-C6ClLEqN.cjs"),T=require("../../../Button-wMPAZpnO.cjs"),$=require("../../../useId-Cw0TtD-8.cjs"),j=require("../../../refType-dllUCpD8.cjs"),_=require("../../../CircularProgress-BCdQaPFF.cjs"),E=require("../../../useTheme-C-LTLVMt.cjs");function O(o){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const i in o)if(i!=="default"){const a=Object.getOwnPropertyDescriptor(o,i);Object.defineProperty(n,i,a.get?a:{enumerable:!0,get:()=>o[i]})}}return n.default=o,Object.freeze(n)}const L=O(C);function q(o){return t.generateUtilityClass("MuiLoadingButton",o)}const R=t.generateUtilityClasses("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),e=R,z=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],M=o=>{const{loading:n,loadingPosition:i,classes:a}=o,r={root:["root",n&&"loading"],startIcon:[n&&`startIconLoading${t.capitalize(i)}`],endIcon:[n&&`endIconLoading${t.capitalize(i)}`],loadingIndicator:["loadingIndicator",n&&`loadingIndicator${t.capitalize(i)}`]},d=t.composeClasses(r,q,a);return t._extends({},a,d)},W=o=>o!=="ownerState"&&o!=="theme"&&o!=="sx"&&o!=="as"&&o!=="classes",D=t.styled(T.Button,{shouldForwardProp:o=>W(o)||o==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(o,n)=>[n.root,n.startIconLoadingStart&&{[`& .${e.startIconLoadingStart}`]:n.startIconLoadingStart},n.endIconLoadingEnd&&{[`& .${e.endIconLoadingEnd}`]:n.endIconLoadingEnd}]})(({ownerState:o,theme:n})=>t._extends({[`& .${e.startIconLoadingStart}, & .${e.endIconLoadingEnd}`]:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0}},o.loadingPosition==="center"&&{transition:n.transitions.create(["background-color","box-shadow","border-color"],{duration:n.transitions.duration.short}),[`&.${e.loading}`]:{color:"transparent"}},o.loadingPosition==="start"&&o.fullWidth&&{[`& .${e.startIconLoadingStart}, & .${e.endIconLoadingEnd}`]:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0,marginRight:-8}},o.loadingPosition==="end"&&o.fullWidth&&{[`& .${e.startIconLoadingStart}, & .${e.endIconLoadingEnd}`]:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0,marginLeft:-8}})),U=t.styled("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(o,n)=>{const{ownerState:i}=o;return[n.loadingIndicator,n[`loadingIndicator${t.capitalize(i.loadingPosition)}`]]}})(({theme:o,ownerState:n})=>t._extends({position:"absolute",visibility:"visible",display:"flex"},n.loadingPosition==="start"&&(n.variant==="outlined"||n.variant==="contained")&&{left:n.size==="small"?10:14},n.loadingPosition==="start"&&n.variant==="text"&&{left:6},n.loadingPosition==="center"&&{left:"50%",transform:"translate(-50%)",color:(o.vars||o).palette.action.disabled},n.loadingPosition==="end"&&(n.variant==="outlined"||n.variant==="contained")&&{right:n.size==="small"?10:14},n.loadingPosition==="end"&&n.variant==="text"&&{right:6},n.loadingPosition==="start"&&n.fullWidth&&{position:"relative",left:-10},n.loadingPosition==="end"&&n.fullWidth&&{position:"relative",right:-10})),v=L.forwardRef(function(n,i){const a=L.useContext(T.ButtonGroupContext),r=t.resolveProps(a,n),d=t.useThemeProps({props:r,name:"MuiLoadingButton"}),{children:u,disabled:g=!1,id:x,loading:c=!1,loadingIndicator:p,loadingPosition:m="center",variant:P="text"}=d,B=t._objectWithoutPropertiesLoose(d,z),I=$.useId(x),f=p??s.jsx(_.CircularProgress,{"aria-labelledby":I,color:"inherit",size:16}),l=t._extends({},d,{disabled:g,loading:c,loadingIndicator:f,loadingPosition:m,variant:P}),y=M(l),b=c?s.jsx(U,{className:y.loadingIndicator,ownerState:l,children:f}):null;return s.jsxs(D,t._extends({disabled:g||c,id:I,ref:i},B,{variant:P,classes:y,ownerState:l,children:[l.loadingPosition==="end"?u:b,l.loadingPosition==="end"?b:u]}))});process.env.NODE_ENV!=="production"&&(v.propTypes={children:t.PropTypes.node,classes:t.PropTypes.object,disabled:t.PropTypes.bool,id:t.PropTypes.string,loading:t.PropTypes.bool,loadingIndicator:t.PropTypes.node,loadingPosition:j.chainPropTypes(t.PropTypes.oneOf(["start","end","center"]),o=>o.loadingPosition==="start"&&!o.startIcon?new Error('MUI: The loadingPosition="start" should be used in combination with startIcon.'):o.loadingPosition==="end"&&!o.endIcon?new Error('MUI: The loadingPosition="end" should be used in combination with endIcon.'):null),sx:t.PropTypes.oneOfType([t.PropTypes.arrayOf(t.PropTypes.oneOfType([t.PropTypes.func,t.PropTypes.object,t.PropTypes.bool])),t.PropTypes.func,t.PropTypes.object]),variant:t.PropTypes.oneOfType([t.PropTypes.oneOf(["contained","outlined","text"]),t.PropTypes.string])});const N=v,k=t.styled(N,{shouldForwardProp:o=>o!=="contentColor"&&o!=="hoverColor"})(({contentColor:o,hoverColor:n,theme:i})=>({justifyContent:"center",alignItems:"center",columnGap:8,minHeight:38,paddingLeft:12,paddingRight:12,textTransform:"none",color:o,borderColor:o,borderRadius:5,borderWidth:2,"&:hover":{color:i.palette.common.white,backgroundColor:n,borderColor:n,borderWidth:2}})),F=({icon:o,text:n,...i})=>{const a=E.useTheme(),r=i.contentColor??a.palette.primary.main;return s.jsxs(k,{...i,variant:"outlined",contentColor:r,hoverColor:i.hoverColor??r,children:[(o==null?void 0:o.position)==="left"?s.jsx(h,{...o}):null,n,(o==null?void 0:o.position)==="right"?s.jsx(h,{...o}):null]})};module.exports=F;
|
|
@@ -1,349 +1,142 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { B as
|
|
6
|
-
import { u as
|
|
7
|
-
import { c as
|
|
8
|
-
import {
|
|
9
|
-
import { u as
|
|
10
|
-
function
|
|
11
|
-
return
|
|
1
|
+
import { jsx as g, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import * as C from "react";
|
|
3
|
+
import B from "./DefaultButtonIcon.es.js";
|
|
4
|
+
import { g as R, c as j, s as f, a as l, e as c, l as M, f as O, _ as W, P as t, j as U } from "../../../useThemeProps-kb_vU-1P.js";
|
|
5
|
+
import { B as _, a as z } from "../../../Button-CmBnwwn3.js";
|
|
6
|
+
import { u as D } from "../../../useId-BW-oWmul.js";
|
|
7
|
+
import { c as F } from "../../../refType-CMQbzE37.js";
|
|
8
|
+
import { C as N } from "../../../CircularProgress-DRE9BLTL.js";
|
|
9
|
+
import { u as k } from "../../../useTheme-BSwuVDD3.js";
|
|
10
|
+
function G(n) {
|
|
11
|
+
return j("MuiLoadingButton", n);
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
const J = ["className", "color", "disableShrink", "size", "style", "thickness", "value", "variant"];
|
|
15
|
-
let k = (o) => o, E, M, R, O;
|
|
16
|
-
const u = 44, Q = z(E || (E = k`
|
|
17
|
-
0% {
|
|
18
|
-
transform: rotate(0deg);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
100% {
|
|
22
|
-
transform: rotate(360deg);
|
|
23
|
-
}
|
|
24
|
-
`)), X = z(M || (M = k`
|
|
25
|
-
0% {
|
|
26
|
-
stroke-dasharray: 1px, 200px;
|
|
27
|
-
stroke-dashoffset: 0;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
50% {
|
|
31
|
-
stroke-dasharray: 100px, 200px;
|
|
32
|
-
stroke-dashoffset: -15px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
100% {
|
|
36
|
-
stroke-dasharray: 100px, 200px;
|
|
37
|
-
stroke-dashoffset: -125px;
|
|
38
|
-
}
|
|
39
|
-
`)), oo = (o) => {
|
|
40
|
-
const {
|
|
41
|
-
classes: t,
|
|
42
|
-
variant: r,
|
|
43
|
-
color: i,
|
|
44
|
-
disableShrink: a
|
|
45
|
-
} = o, s = {
|
|
46
|
-
root: ["root", r, `color${g(i)}`],
|
|
47
|
-
svg: ["svg"],
|
|
48
|
-
circle: ["circle", `circle${g(r)}`, a && "circleDisableShrink"]
|
|
49
|
-
};
|
|
50
|
-
return U(s, A, t);
|
|
51
|
-
}, to = I("span", {
|
|
52
|
-
name: "MuiCircularProgress",
|
|
53
|
-
slot: "Root",
|
|
54
|
-
overridesResolver: (o, t) => {
|
|
55
|
-
const {
|
|
56
|
-
ownerState: r
|
|
57
|
-
} = o;
|
|
58
|
-
return [t.root, t[r.variant], t[`color${g(r.color)}`]];
|
|
59
|
-
}
|
|
60
|
-
})(({
|
|
61
|
-
ownerState: o,
|
|
62
|
-
theme: t
|
|
63
|
-
}) => e({
|
|
64
|
-
display: "inline-block"
|
|
65
|
-
}, o.variant === "determinate" && {
|
|
66
|
-
transition: t.transitions.create("transform")
|
|
67
|
-
}, o.color !== "inherit" && {
|
|
68
|
-
color: (t.vars || t).palette[o.color].main
|
|
69
|
-
}), ({
|
|
70
|
-
ownerState: o
|
|
71
|
-
}) => o.variant === "indeterminate" && w(R || (R = k`
|
|
72
|
-
animation: ${0} 1.4s linear infinite;
|
|
73
|
-
`), Q)), no = I("svg", {
|
|
74
|
-
name: "MuiCircularProgress",
|
|
75
|
-
slot: "Svg",
|
|
76
|
-
overridesResolver: (o, t) => t.svg
|
|
77
|
-
})({
|
|
78
|
-
display: "block"
|
|
79
|
-
// Keeps the progress centered
|
|
80
|
-
}), ro = I("circle", {
|
|
81
|
-
name: "MuiCircularProgress",
|
|
82
|
-
slot: "Circle",
|
|
83
|
-
overridesResolver: (o, t) => {
|
|
84
|
-
const {
|
|
85
|
-
ownerState: r
|
|
86
|
-
} = o;
|
|
87
|
-
return [t.circle, t[`circle${g(r.variant)}`], r.disableShrink && t.circleDisableShrink];
|
|
88
|
-
}
|
|
89
|
-
})(({
|
|
90
|
-
ownerState: o,
|
|
91
|
-
theme: t
|
|
92
|
-
}) => e({
|
|
93
|
-
stroke: "currentColor"
|
|
94
|
-
}, o.variant === "determinate" && {
|
|
95
|
-
transition: t.transitions.create("stroke-dashoffset")
|
|
96
|
-
}, o.variant === "indeterminate" && {
|
|
97
|
-
// Some default value that looks fine waiting for the animation to kicks in.
|
|
98
|
-
strokeDasharray: "80px, 200px",
|
|
99
|
-
strokeDashoffset: 0
|
|
100
|
-
// Add the unit to fix a Edge 16 and below bug.
|
|
101
|
-
}), ({
|
|
102
|
-
ownerState: o
|
|
103
|
-
}) => o.variant === "indeterminate" && !o.disableShrink && w(O || (O = k`
|
|
104
|
-
animation: ${0} 1.4s ease-in-out infinite;
|
|
105
|
-
`), X)), F = /* @__PURE__ */ B.forwardRef(function(t, r) {
|
|
106
|
-
const i = j({
|
|
107
|
-
props: t,
|
|
108
|
-
name: "MuiCircularProgress"
|
|
109
|
-
}), {
|
|
110
|
-
className: a,
|
|
111
|
-
color: s = "primary",
|
|
112
|
-
disableShrink: C = !1,
|
|
113
|
-
size: h = 40,
|
|
114
|
-
style: $,
|
|
115
|
-
thickness: l = 3.6,
|
|
116
|
-
value: p = 0,
|
|
117
|
-
variant: x = "indeterminate"
|
|
118
|
-
} = i, L = N(i, J), m = e({}, i, {
|
|
119
|
-
color: s,
|
|
120
|
-
disableShrink: C,
|
|
121
|
-
size: h,
|
|
122
|
-
thickness: l,
|
|
123
|
-
value: p,
|
|
124
|
-
variant: x
|
|
125
|
-
}), v = oo(m), b = {}, c = {}, P = {};
|
|
126
|
-
if (x === "determinate") {
|
|
127
|
-
const y = 2 * Math.PI * ((u - l) / 2);
|
|
128
|
-
b.strokeDasharray = y.toFixed(3), P["aria-valuenow"] = Math.round(p), b.strokeDashoffset = `${((100 - p) / 100 * y).toFixed(3)}px`, c.transform = "rotate(-90deg)";
|
|
129
|
-
}
|
|
130
|
-
return /* @__PURE__ */ f(to, e({
|
|
131
|
-
className: V(v.root, a),
|
|
132
|
-
style: e({
|
|
133
|
-
width: h,
|
|
134
|
-
height: h
|
|
135
|
-
}, c, $),
|
|
136
|
-
ownerState: m,
|
|
137
|
-
ref: r,
|
|
138
|
-
role: "progressbar"
|
|
139
|
-
}, P, L, {
|
|
140
|
-
children: /* @__PURE__ */ f(no, {
|
|
141
|
-
className: v.svg,
|
|
142
|
-
ownerState: m,
|
|
143
|
-
viewBox: `${u / 2} ${u / 2} ${u} ${u}`,
|
|
144
|
-
children: /* @__PURE__ */ f(ro, {
|
|
145
|
-
className: v.circle,
|
|
146
|
-
style: b,
|
|
147
|
-
ownerState: m,
|
|
148
|
-
cx: u,
|
|
149
|
-
cy: u,
|
|
150
|
-
r: (u - l) / 2,
|
|
151
|
-
fill: "none",
|
|
152
|
-
strokeWidth: l
|
|
153
|
-
})
|
|
154
|
-
})
|
|
155
|
-
}));
|
|
156
|
-
});
|
|
157
|
-
process.env.NODE_ENV !== "production" && (F.propTypes = {
|
|
158
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
159
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
160
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
161
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
162
|
-
/**
|
|
163
|
-
* Override or extend the styles applied to the component.
|
|
164
|
-
*/
|
|
165
|
-
classes: n.object,
|
|
166
|
-
/**
|
|
167
|
-
* @ignore
|
|
168
|
-
*/
|
|
169
|
-
className: n.string,
|
|
170
|
-
/**
|
|
171
|
-
* The color of the component.
|
|
172
|
-
* It supports both default and custom theme colors, which can be added as shown in the
|
|
173
|
-
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
174
|
-
* @default 'primary'
|
|
175
|
-
*/
|
|
176
|
-
color: n.oneOfType([n.oneOf(["inherit", "primary", "secondary", "error", "info", "success", "warning"]), n.string]),
|
|
177
|
-
/**
|
|
178
|
-
* If `true`, the shrink animation is disabled.
|
|
179
|
-
* This only works if variant is `indeterminate`.
|
|
180
|
-
* @default false
|
|
181
|
-
*/
|
|
182
|
-
disableShrink: W(n.bool, (o) => o.disableShrink && o.variant && o.variant !== "indeterminate" ? new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect.") : null),
|
|
183
|
-
/**
|
|
184
|
-
* The size of the component.
|
|
185
|
-
* If using a number, the pixel unit is assumed.
|
|
186
|
-
* If using a string, you need to provide the CSS unit, e.g. '3rem'.
|
|
187
|
-
* @default 40
|
|
188
|
-
*/
|
|
189
|
-
size: n.oneOfType([n.number, n.string]),
|
|
190
|
-
/**
|
|
191
|
-
* @ignore
|
|
192
|
-
*/
|
|
193
|
-
style: n.object,
|
|
194
|
-
/**
|
|
195
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
196
|
-
*/
|
|
197
|
-
sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
|
|
198
|
-
/**
|
|
199
|
-
* The thickness of the circle.
|
|
200
|
-
* @default 3.6
|
|
201
|
-
*/
|
|
202
|
-
thickness: n.number,
|
|
203
|
-
/**
|
|
204
|
-
* The value of the progress indicator for the determinate variant.
|
|
205
|
-
* Value between 0 and 100.
|
|
206
|
-
* @default 0
|
|
207
|
-
*/
|
|
208
|
-
value: n.number,
|
|
209
|
-
/**
|
|
210
|
-
* The variant to use.
|
|
211
|
-
* Use indeterminate when there is no progress value.
|
|
212
|
-
* @default 'indeterminate'
|
|
213
|
-
*/
|
|
214
|
-
variant: n.oneOf(["determinate", "indeterminate"])
|
|
215
|
-
});
|
|
216
|
-
const io = F;
|
|
217
|
-
function ao(o) {
|
|
218
|
-
return D("MuiLoadingButton", o);
|
|
219
|
-
}
|
|
220
|
-
const eo = _("MuiLoadingButton", ["root", "loading", "loadingIndicator", "loadingIndicatorCenter", "loadingIndicatorStart", "loadingIndicatorEnd", "endIconLoadingEnd", "startIconLoadingStart"]), d = eo, so = ["children", "disabled", "id", "loading", "loadingIndicator", "loadingPosition", "variant"], lo = (o) => {
|
|
13
|
+
const H = R("MuiLoadingButton", ["root", "loading", "loadingIndicator", "loadingIndicatorCenter", "loadingIndicatorStart", "loadingIndicatorEnd", "endIconLoadingEnd", "startIconLoadingStart"]), a = H, V = ["children", "disabled", "id", "loading", "loadingIndicator", "loadingPosition", "variant"], q = (n) => {
|
|
221
14
|
const {
|
|
222
|
-
loading:
|
|
223
|
-
loadingPosition:
|
|
224
|
-
classes:
|
|
225
|
-
} =
|
|
226
|
-
root: ["root",
|
|
227
|
-
startIcon: [
|
|
228
|
-
endIcon: [
|
|
229
|
-
loadingIndicator: ["loadingIndicator",
|
|
230
|
-
},
|
|
231
|
-
return
|
|
232
|
-
},
|
|
233
|
-
shouldForwardProp: (
|
|
15
|
+
loading: o,
|
|
16
|
+
loadingPosition: i,
|
|
17
|
+
classes: r
|
|
18
|
+
} = n, s = {
|
|
19
|
+
root: ["root", o && "loading"],
|
|
20
|
+
startIcon: [o && `startIconLoading${c(i)}`],
|
|
21
|
+
endIcon: [o && `endIconLoading${c(i)}`],
|
|
22
|
+
loadingIndicator: ["loadingIndicator", o && `loadingIndicator${c(i)}`]
|
|
23
|
+
}, d = U(s, G, r);
|
|
24
|
+
return l({}, r, d);
|
|
25
|
+
}, A = (n) => n !== "ownerState" && n !== "theme" && n !== "sx" && n !== "as" && n !== "classes", J = f(_, {
|
|
26
|
+
shouldForwardProp: (n) => A(n) || n === "classes",
|
|
234
27
|
name: "MuiLoadingButton",
|
|
235
28
|
slot: "Root",
|
|
236
|
-
overridesResolver: (
|
|
237
|
-
[`& .${
|
|
238
|
-
},
|
|
239
|
-
[`& .${
|
|
29
|
+
overridesResolver: (n, o) => [o.root, o.startIconLoadingStart && {
|
|
30
|
+
[`& .${a.startIconLoadingStart}`]: o.startIconLoadingStart
|
|
31
|
+
}, o.endIconLoadingEnd && {
|
|
32
|
+
[`& .${a.endIconLoadingEnd}`]: o.endIconLoadingEnd
|
|
240
33
|
}]
|
|
241
34
|
})(({
|
|
242
|
-
ownerState:
|
|
243
|
-
theme:
|
|
244
|
-
}) =>
|
|
245
|
-
[`& .${
|
|
246
|
-
transition:
|
|
247
|
-
duration:
|
|
35
|
+
ownerState: n,
|
|
36
|
+
theme: o
|
|
37
|
+
}) => l({
|
|
38
|
+
[`& .${a.startIconLoadingStart}, & .${a.endIconLoadingEnd}`]: {
|
|
39
|
+
transition: o.transitions.create(["opacity"], {
|
|
40
|
+
duration: o.transitions.duration.short
|
|
248
41
|
}),
|
|
249
42
|
opacity: 0
|
|
250
43
|
}
|
|
251
|
-
},
|
|
252
|
-
transition:
|
|
253
|
-
duration:
|
|
44
|
+
}, n.loadingPosition === "center" && {
|
|
45
|
+
transition: o.transitions.create(["background-color", "box-shadow", "border-color"], {
|
|
46
|
+
duration: o.transitions.duration.short
|
|
254
47
|
}),
|
|
255
|
-
[`&.${
|
|
48
|
+
[`&.${a.loading}`]: {
|
|
256
49
|
color: "transparent"
|
|
257
50
|
}
|
|
258
|
-
},
|
|
259
|
-
[`& .${
|
|
260
|
-
transition:
|
|
261
|
-
duration:
|
|
51
|
+
}, n.loadingPosition === "start" && n.fullWidth && {
|
|
52
|
+
[`& .${a.startIconLoadingStart}, & .${a.endIconLoadingEnd}`]: {
|
|
53
|
+
transition: o.transitions.create(["opacity"], {
|
|
54
|
+
duration: o.transitions.duration.short
|
|
262
55
|
}),
|
|
263
56
|
opacity: 0,
|
|
264
57
|
marginRight: -8
|
|
265
58
|
}
|
|
266
|
-
},
|
|
267
|
-
[`& .${
|
|
268
|
-
transition:
|
|
269
|
-
duration:
|
|
59
|
+
}, n.loadingPosition === "end" && n.fullWidth && {
|
|
60
|
+
[`& .${a.startIconLoadingStart}, & .${a.endIconLoadingEnd}`]: {
|
|
61
|
+
transition: o.transitions.create(["opacity"], {
|
|
62
|
+
duration: o.transitions.duration.short
|
|
270
63
|
}),
|
|
271
64
|
opacity: 0,
|
|
272
65
|
marginLeft: -8
|
|
273
66
|
}
|
|
274
|
-
})),
|
|
67
|
+
})), K = f("span", {
|
|
275
68
|
name: "MuiLoadingButton",
|
|
276
69
|
slot: "LoadingIndicator",
|
|
277
|
-
overridesResolver: (
|
|
70
|
+
overridesResolver: (n, o) => {
|
|
278
71
|
const {
|
|
279
|
-
ownerState:
|
|
280
|
-
} =
|
|
281
|
-
return [
|
|
72
|
+
ownerState: i
|
|
73
|
+
} = n;
|
|
74
|
+
return [o.loadingIndicator, o[`loadingIndicator${c(i.loadingPosition)}`]];
|
|
282
75
|
}
|
|
283
76
|
})(({
|
|
284
|
-
theme:
|
|
285
|
-
ownerState:
|
|
286
|
-
}) =>
|
|
77
|
+
theme: n,
|
|
78
|
+
ownerState: o
|
|
79
|
+
}) => l({
|
|
287
80
|
position: "absolute",
|
|
288
81
|
visibility: "visible",
|
|
289
82
|
display: "flex"
|
|
290
|
-
},
|
|
291
|
-
left:
|
|
292
|
-
},
|
|
83
|
+
}, o.loadingPosition === "start" && (o.variant === "outlined" || o.variant === "contained") && {
|
|
84
|
+
left: o.size === "small" ? 10 : 14
|
|
85
|
+
}, o.loadingPosition === "start" && o.variant === "text" && {
|
|
293
86
|
left: 6
|
|
294
|
-
},
|
|
87
|
+
}, o.loadingPosition === "center" && {
|
|
295
88
|
left: "50%",
|
|
296
89
|
transform: "translate(-50%)",
|
|
297
|
-
color: (
|
|
298
|
-
},
|
|
299
|
-
right:
|
|
300
|
-
},
|
|
90
|
+
color: (n.vars || n).palette.action.disabled
|
|
91
|
+
}, o.loadingPosition === "end" && (o.variant === "outlined" || o.variant === "contained") && {
|
|
92
|
+
right: o.size === "small" ? 10 : 14
|
|
93
|
+
}, o.loadingPosition === "end" && o.variant === "text" && {
|
|
301
94
|
right: 6
|
|
302
|
-
},
|
|
95
|
+
}, o.loadingPosition === "start" && o.fullWidth && {
|
|
303
96
|
position: "relative",
|
|
304
97
|
left: -10
|
|
305
|
-
},
|
|
98
|
+
}, o.loadingPosition === "end" && o.fullWidth && {
|
|
306
99
|
position: "relative",
|
|
307
100
|
right: -10
|
|
308
|
-
})),
|
|
309
|
-
const
|
|
310
|
-
props:
|
|
101
|
+
})), x = /* @__PURE__ */ C.forwardRef(function(o, i) {
|
|
102
|
+
const r = C.useContext(z), s = M(r, o), d = O({
|
|
103
|
+
props: s,
|
|
311
104
|
name: "MuiLoadingButton"
|
|
312
105
|
}), {
|
|
313
|
-
children:
|
|
314
|
-
disabled:
|
|
106
|
+
children: I,
|
|
107
|
+
disabled: p = !1,
|
|
315
108
|
id: $,
|
|
316
|
-
loading:
|
|
317
|
-
loadingIndicator:
|
|
318
|
-
loadingPosition:
|
|
319
|
-
variant:
|
|
320
|
-
} =
|
|
321
|
-
"aria-labelledby":
|
|
109
|
+
loading: u = !1,
|
|
110
|
+
loadingIndicator: h,
|
|
111
|
+
loadingPosition: E = "center",
|
|
112
|
+
variant: m = "text"
|
|
113
|
+
} = d, T = W(d, V), L = D($), P = h ?? /* @__PURE__ */ g(N, {
|
|
114
|
+
"aria-labelledby": L,
|
|
322
115
|
color: "inherit",
|
|
323
116
|
size: 16
|
|
324
|
-
}),
|
|
325
|
-
disabled:
|
|
326
|
-
loading:
|
|
327
|
-
loadingIndicator:
|
|
328
|
-
loadingPosition:
|
|
329
|
-
variant:
|
|
330
|
-
}),
|
|
331
|
-
className:
|
|
332
|
-
ownerState:
|
|
333
|
-
children:
|
|
117
|
+
}), e = l({}, d, {
|
|
118
|
+
disabled: p,
|
|
119
|
+
loading: u,
|
|
120
|
+
loadingIndicator: P,
|
|
121
|
+
loadingPosition: E,
|
|
122
|
+
variant: m
|
|
123
|
+
}), b = q(e), v = u ? /* @__PURE__ */ g(K, {
|
|
124
|
+
className: b.loadingIndicator,
|
|
125
|
+
ownerState: e,
|
|
126
|
+
children: P
|
|
334
127
|
}) : null;
|
|
335
|
-
return /* @__PURE__ */
|
|
336
|
-
disabled:
|
|
337
|
-
id:
|
|
338
|
-
ref:
|
|
339
|
-
},
|
|
340
|
-
variant:
|
|
341
|
-
classes:
|
|
342
|
-
ownerState:
|
|
343
|
-
children: [
|
|
128
|
+
return /* @__PURE__ */ y(J, l({
|
|
129
|
+
disabled: p || u,
|
|
130
|
+
id: L,
|
|
131
|
+
ref: i
|
|
132
|
+
}, T, {
|
|
133
|
+
variant: m,
|
|
134
|
+
classes: b,
|
|
135
|
+
ownerState: e,
|
|
136
|
+
children: [e.loadingPosition === "end" ? I : v, e.loadingPosition === "end" ? v : I]
|
|
344
137
|
}));
|
|
345
138
|
});
|
|
346
|
-
process.env.NODE_ENV !== "production" && (
|
|
139
|
+
process.env.NODE_ENV !== "production" && (x.propTypes = {
|
|
347
140
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
348
141
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
349
142
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -351,50 +144,50 @@ process.env.NODE_ENV !== "production" && (G.propTypes = {
|
|
|
351
144
|
/**
|
|
352
145
|
* The content of the component.
|
|
353
146
|
*/
|
|
354
|
-
children:
|
|
147
|
+
children: t.node,
|
|
355
148
|
/**
|
|
356
149
|
* Override or extend the styles applied to the component.
|
|
357
150
|
*/
|
|
358
|
-
classes:
|
|
151
|
+
classes: t.object,
|
|
359
152
|
/**
|
|
360
153
|
* If `true`, the component is disabled.
|
|
361
154
|
* @default false
|
|
362
155
|
*/
|
|
363
|
-
disabled:
|
|
156
|
+
disabled: t.bool,
|
|
364
157
|
/**
|
|
365
158
|
* @ignore
|
|
366
159
|
*/
|
|
367
|
-
id:
|
|
160
|
+
id: t.string,
|
|
368
161
|
/**
|
|
369
162
|
* If `true`, the loading indicator is shown and the button becomes disabled.
|
|
370
163
|
* @default false
|
|
371
164
|
*/
|
|
372
|
-
loading:
|
|
165
|
+
loading: t.bool,
|
|
373
166
|
/**
|
|
374
167
|
* Element placed before the children if the button is in loading state.
|
|
375
168
|
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
376
169
|
* By default we render a `CircularProgress` that is labelled by the button itself.
|
|
377
170
|
* @default <CircularProgress color="inherit" size={16} />
|
|
378
171
|
*/
|
|
379
|
-
loadingIndicator:
|
|
172
|
+
loadingIndicator: t.node,
|
|
380
173
|
/**
|
|
381
174
|
* The loading indicator can be positioned on the start, end, or the center of the button.
|
|
382
175
|
* @default 'center'
|
|
383
176
|
*/
|
|
384
|
-
loadingPosition:
|
|
177
|
+
loadingPosition: F(t.oneOf(["start", "end", "center"]), (n) => n.loadingPosition === "start" && !n.startIcon ? new Error('MUI: The loadingPosition="start" should be used in combination with startIcon.') : n.loadingPosition === "end" && !n.endIcon ? new Error('MUI: The loadingPosition="end" should be used in combination with endIcon.') : null),
|
|
385
178
|
/**
|
|
386
179
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
387
180
|
*/
|
|
388
|
-
sx:
|
|
181
|
+
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
|
|
389
182
|
/**
|
|
390
183
|
* The variant to use.
|
|
391
184
|
* @default 'text'
|
|
392
185
|
*/
|
|
393
|
-
variant:
|
|
186
|
+
variant: t.oneOfType([t.oneOf(["contained", "outlined", "text"]), t.string])
|
|
394
187
|
});
|
|
395
|
-
const
|
|
396
|
-
shouldForwardProp: (
|
|
397
|
-
})(({ contentColor:
|
|
188
|
+
const Q = x, X = f(Q, {
|
|
189
|
+
shouldForwardProp: (n) => n !== "contentColor" && n !== "hoverColor"
|
|
190
|
+
})(({ contentColor: n, hoverColor: o, theme: i }) => ({
|
|
398
191
|
justifyContent: "center",
|
|
399
192
|
alignItems: "center",
|
|
400
193
|
columnGap: 8,
|
|
@@ -402,37 +195,37 @@ const fo = G, ho = I(fo, {
|
|
|
402
195
|
paddingLeft: 12,
|
|
403
196
|
paddingRight: 12,
|
|
404
197
|
textTransform: "none",
|
|
405
|
-
color:
|
|
406
|
-
borderColor:
|
|
198
|
+
color: n,
|
|
199
|
+
borderColor: n,
|
|
407
200
|
borderRadius: 5,
|
|
408
201
|
borderWidth: 2,
|
|
409
202
|
"&:hover": {
|
|
410
|
-
color:
|
|
411
|
-
backgroundColor:
|
|
412
|
-
borderColor:
|
|
203
|
+
color: i.palette.common.white,
|
|
204
|
+
backgroundColor: o,
|
|
205
|
+
borderColor: o,
|
|
413
206
|
borderWidth: 2
|
|
414
207
|
}
|
|
415
|
-
})),
|
|
416
|
-
icon:
|
|
417
|
-
text:
|
|
418
|
-
...
|
|
208
|
+
})), ao = ({
|
|
209
|
+
icon: n,
|
|
210
|
+
text: o,
|
|
211
|
+
...i
|
|
419
212
|
}) => {
|
|
420
|
-
const
|
|
421
|
-
return /* @__PURE__ */
|
|
422
|
-
|
|
213
|
+
const r = k(), s = i.contentColor ?? r.palette.primary.main;
|
|
214
|
+
return /* @__PURE__ */ y(
|
|
215
|
+
X,
|
|
423
216
|
{
|
|
424
|
-
...
|
|
217
|
+
...i,
|
|
425
218
|
variant: "outlined",
|
|
426
|
-
contentColor:
|
|
427
|
-
hoverColor:
|
|
219
|
+
contentColor: s,
|
|
220
|
+
hoverColor: i.hoverColor ?? s,
|
|
428
221
|
children: [
|
|
429
|
-
(
|
|
430
|
-
|
|
431
|
-
(
|
|
222
|
+
(n == null ? void 0 : n.position) === "left" ? /* @__PURE__ */ g(B, { ...n }) : null,
|
|
223
|
+
o,
|
|
224
|
+
(n == null ? void 0 : n.position) === "right" ? /* @__PURE__ */ g(B, { ...n }) : null
|
|
432
225
|
]
|
|
433
226
|
}
|
|
434
227
|
);
|
|
435
228
|
};
|
|
436
229
|
export {
|
|
437
|
-
|
|
230
|
+
ao as default
|
|
438
231
|
};
|