@cgi-learning-hub/ui 0.0.1-dev.1708964890 → 0.0.1-dev.1708974808
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-Tkz5NkF_.cjs +1 -0
- package/dist/Button-X7eWZQfX.js +356 -0
- package/dist/ButtonBase-CKfcGhaU.js +892 -0
- package/dist/ButtonBase-Cg8cBMzO.cjs +75 -0
- package/dist/Input-CAb0EFzc.cjs +1 -0
- package/dist/Input-CbYjsRHK.js +322 -0
- package/dist/{InputBase-C_yPRkam.js → InputBase-B13Nzzhk.js} +215 -193
- package/dist/InputBase-CKlCw9fj.cjs +4 -0
- package/dist/assets/index.css +1 -1
- package/dist/components/AnotherComponent/AnotherComponent.cjs.js +1 -0
- package/dist/components/AnotherComponent/AnotherComponent.d.ts +2 -0
- package/dist/components/AnotherComponent/AnotherComponent.es.js +15 -0
- package/dist/components/AnotherComponent/AnotherComponent.stories.cjs.js +1 -0
- package/dist/components/{Dropzone/Dropzone.stories.d.ts → AnotherComponent/AnotherComponent.stories.d.ts} +2 -1
- package/dist/components/AnotherComponent/AnotherComponent.stories.es.js +22 -0
- package/dist/components/AnotherComponent/index.cjs.js +1 -0
- package/dist/components/AnotherComponent/index.d.ts +2 -0
- package/dist/components/AnotherComponent/index.es.js +4 -0
- package/dist/components/BasicButtons/BasicButtons.cjs.js +1 -0
- package/dist/components/BasicButtons/BasicButtons.d.ts +2 -0
- package/dist/components/BasicButtons/BasicButtons.es.js +189 -0
- package/dist/components/BasicButtons/BasicButtons.stories.cjs.js +1 -0
- package/dist/components/BasicButtons/BasicButtons.stories.d.ts +5 -0
- package/dist/components/BasicButtons/BasicButtons.stories.es.js +22 -0
- package/dist/components/BasicButtons/index.cjs.js +1 -0
- package/dist/components/BasicButtons/index.d.ts +2 -0
- package/dist/components/BasicButtons/index.es.js +4 -0
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +28 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +267 -408
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +5 -5
- 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.d.ts +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +7 -8
- 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.d.ts +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +9 -10
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +2 -4
- package/dist/components/index.es.js +14 -18
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.es.js +247 -77
- package/dist/components/inputs/TextInput/TextInput.cjs.js +13 -11
- package/dist/components/inputs/TextInput/TextInput.es.js +1631 -1844
- package/dist/{createSvgIcon-B6bZPuto.cjs → createSvgIcon-jvI3LIfI.cjs} +1 -1
- package/dist/{createSvgIcon-KaSN8JhZ.js → createSvgIcon-qXNZi4k1.js} +8 -8
- package/dist/extendSxProp-BRHiEwyk.js +29 -0
- package/dist/extendSxProp-CvhhU9Vb.cjs +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +12 -16
- package/dist/useForkRef-82uiK71d.cjs +1 -0
- package/dist/useForkRef-CLcOhrzI.js +44 -0
- package/dist/useTheme-BWRyHzdn.js +65 -0
- package/dist/useTheme-BpLcDNG1.cjs +1 -0
- package/dist/{useThemeProps-Dg9Uoq7q.js → useThemeProps-B6yTTpAe.js} +1024 -1018
- package/dist/useThemeProps-CDriK9TK.cjs +65 -0
- package/package.json +1 -2
- package/dist/Box-7uR7JZiM.cjs +0 -1
- package/dist/Box-CPGTKTgx.js +0 -56
- package/dist/ButtonBase-B0tkJ9zf.js +0 -831
- package/dist/ButtonBase-DCL6Xlnm.cjs +0 -75
- package/dist/CircularProgress-CZX5SfKt.cjs +0 -28
- package/dist/CircularProgress-CguDBnxV.js +0 -215
- package/dist/IconButton-CJ1Nt-jf.js +0 -182
- package/dist/IconButton-De7ZdW2q.cjs +0 -2
- package/dist/InputBase-Dvr5GnwD.cjs +0 -4
- package/dist/Tab-Bhm9hCrX.cjs +0 -1
- package/dist/Tab-C4l6V01S.js +0 -237
- package/dist/TransitionGroupContext-C7wWJ6l7.js +0 -14
- package/dist/TransitionGroupContext-g4tmk10h.cjs +0 -1
- package/dist/Typography-CyFLZjnE.js +0 -202
- package/dist/Typography-DwsN2Ttm.cjs +0 -1
- package/dist/components/Dropzone/Dropzone.cjs.js +0 -5
- package/dist/components/Dropzone/Dropzone.d.ts +0 -9
- package/dist/components/Dropzone/Dropzone.es.js +0 -1210
- package/dist/components/Dropzone/Dropzone.stories.cjs.js +0 -1
- package/dist/components/Dropzone/Dropzone.stories.es.js +0 -17
- package/dist/components/Dropzone/index.cjs.js +0 -1
- package/dist/components/Dropzone/index.d.ts +0 -2
- package/dist/components/Dropzone/index.es.js +0 -4
- package/dist/components/buttons/IconButton.stories.cjs.js +0 -1
- package/dist/components/buttons/IconButton.stories.d.ts +0 -4
- package/dist/components/buttons/IconButton.stories.es.js +0 -27
- package/dist/components/inputs/SearchInput/SearchInput.stories.cjs.js +0 -1
- package/dist/components/inputs/SearchInput/SearchInput.stories.d.ts +0 -4
- package/dist/components/inputs/SearchInput/SearchInput.stories.es.js +0 -16
- package/dist/components/inputs/TextInput/TextInput.stories.cjs.js +0 -1
- package/dist/components/inputs/TextInput/TextInput.stories.d.ts +0 -4
- package/dist/components/inputs/TextInput/TextInput.stories.es.js +0 -17
- package/dist/components/lists/FileList/FileList.cjs.js +0 -1
- package/dist/components/lists/FileList/FileList.d.ts +0 -7
- package/dist/components/lists/FileList/FileList.es.js +0 -19
- package/dist/components/lists/FileList/FileList.stories.cjs.js +0 -1
- package/dist/components/lists/FileList/FileList.stories.d.ts +0 -4
- package/dist/components/lists/FileList/FileList.stories.es.js +0 -28
- package/dist/components/lists/FileList/FileListItem.cjs.js +0 -1
- package/dist/components/lists/FileList/FileListItem.d.ts +0 -13
- package/dist/components/lists/FileList/FileListItem.es.js +0 -41
- package/dist/components/lists/FileList/index.cjs.js +0 -1
- package/dist/components/lists/FileList/index.d.ts +0 -4
- package/dist/components/lists/FileList/index.es.js +0 -6
- package/dist/components/lists/TabList.stories.cjs.js +0 -4
- package/dist/components/lists/TabList.stories.d.ts +0 -4
- package/dist/components/lists/TabList.stories.es.js +0 -1027
- package/dist/components/lists/index.cjs.js +0 -1
- package/dist/components/lists/index.d.ts +0 -1
- package/dist/components/lists/index.es.js +0 -6
- package/dist/createSvgIcon-BX8WQ5r-.cjs +0 -2
- package/dist/createSvgIcon-m_wsenOJ.js +0 -84
- package/dist/isHostComponent-PydJW4A4.cjs +0 -1
- package/dist/isHostComponent-kiaBvYVo.js +0 -6
- package/dist/ownerWindow-C7EH1lr6.js +0 -23
- package/dist/ownerWindow-Dk_4aaak.cjs +0 -1
- package/dist/refType-CHSN6ysS.cjs +0 -1
- package/dist/refType-Hh9tfnoF.js +0 -29
- package/dist/unsupportedProp-Bn6XWqwH.cjs +0 -1
- package/dist/unsupportedProp-BuVD30Gh.js +0 -9
- package/dist/useControlled-BsLcOmhe.js +0 -48
- package/dist/useControlled-jN3fqFfv.cjs +0 -3
- package/dist/useForkRef-CGd3Nhyb.cjs +0 -1
- package/dist/useForkRef-DwN_Iz9R.js +0 -17
- package/dist/useIsFocusVisible-BF0lT08B.cjs +0 -1
- package/dist/useIsFocusVisible-D8ksiuhS.js +0 -69
- package/dist/useSlotProps-MoAYME1z.js +0 -70
- package/dist/useSlotProps-R4s13HHI.cjs +0 -1
- package/dist/useTheme-BDPYLOoP.cjs +0 -1
- package/dist/useTheme-DJEDOopE.js +0 -9
- package/dist/useThemeProps-jkB5q9ie.cjs +0 -65
- package/dist/useTimeout-KN97abZR.js +0 -47
- package/dist/useTimeout-qjxkiZZn.cjs +0 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";const e=require("./useThemeProps-CDriK9TK.cjs"),He=require("react"),P=require("react/jsx-runtime"),z=require("./useForkRef-82uiK71d.cjs"),We=require("react-dom"),Ve=require("@emotion/react");function me(o){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>o[t]})}}return n.default=o,Object.freeze(n)}const l=me(He),Le=me(We);function he(o,n=166){let t;function r(...s){const c=()=>{o.apply(this,s)};clearTimeout(t),t=setTimeout(c,n)}return r.clear=()=>{clearTimeout(t)},r}function Te(o){return o&&o.ownerDocument||document}function oe(o){return Te(o).defaultView||window}function Ue(o){return o==null||Object.keys(o).length===0}function be(o){const{styles:n,defaultTheme:t={}}=o,r=typeof n=="function"?s=>n(Ue(s)?t:s):n;return P.jsx(Ve.Global,{styles:r})}process.env.NODE_ENV!=="production"&&(be.propTypes={defaultTheme:e.PropTypes.object,styles:e.PropTypes.oneOfType([e.PropTypes.array,e.PropTypes.string,e.PropTypes.object,e.PropTypes.func])});function Pe({styles:o,themeId:n,defaultTheme:t={}}){const r=e.useTheme(t),s=typeof o=="function"?o(n&&r[n]||r):o;return P.jsx(be,{styles:s})}process.env.NODE_ENV!=="production"&&(Pe.propTypes={defaultTheme:e.PropTypes.object,styles:e.PropTypes.oneOfType([e.PropTypes.array,e.PropTypes.func,e.PropTypes.number,e.PropTypes.object,e.PropTypes.string,e.PropTypes.bool]),themeId:e.PropTypes.string});function ne(o){return typeof o=="string"}const $e=["onChange","maxRows","minRows","style","value"];function U(o){return parseInt(o,10)||0}const qe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function fe(o){return o==null||Object.keys(o).length===0||o.outerHeightStyle===0&&!o.overflow}const ge=l.forwardRef(function(n,t){const{onChange:r,maxRows:s,minRows:c=1,style:_,value:S}=n,B=e._objectWithoutPropertiesLoose(n,$e),{current:R}=l.useRef(S!=null),w=l.useRef(null),A=z.useForkRef(t,w),g=l.useRef(null),h=l.useRef(0),[O,F]=l.useState({outerHeightStyle:0}),I=l.useCallback(()=>{const u=w.current,a=oe(u).getComputedStyle(u);if(a.width==="0px")return{outerHeightStyle:0};const d=g.current;d.style.width=a.width,d.value=u.value||n.placeholder||"x",d.value.slice(-1)===`
|
|
2
|
+
`&&(d.value+=" ");const b=a.boxSizing,E=U(a.paddingBottom)+U(a.paddingTop),N=U(a.borderBottomWidth)+U(a.borderTopWidth),x=d.scrollHeight;d.value="x";const C=d.scrollHeight;let y=x;c&&(y=Math.max(Number(c)*C,y)),s&&(y=Math.min(Number(s)*C,y)),y=Math.max(y,C);const G=y+(b==="border-box"?E+N:0),j=Math.abs(y-x)<=1;return{outerHeightStyle:G,overflow:j}},[s,c,n.placeholder]),H=(u,T)=>{const{outerHeightStyle:a,overflow:d}=T;return h.current<20&&(a>0&&Math.abs((u.outerHeightStyle||0)-a)>1||u.overflow!==d)?(h.current+=1,{overflow:d,outerHeightStyle:a}):(process.env.NODE_ENV!=="production"&&h.current===20&&console.error(["MUI: Too many re-renders. The layout is unstable.","TextareaAutosize limits the number of renders to prevent an infinite loop."].join(`
|
|
3
|
+
`)),u)},f=l.useCallback(()=>{const u=I();fe(u)||F(T=>H(T,u))},[I]);z.useEnhancedEffect(()=>{const u=()=>{const C=I();fe(C)||Le.flushSync(()=>{F(y=>H(y,C))})},T=()=>{h.current=0,u()};let a;const d=()=>{cancelAnimationFrame(a),a=requestAnimationFrame(()=>{T()})},b=he(T),E=w.current,N=oe(E);N.addEventListener("resize",b);let x;return typeof ResizeObserver<"u"&&(x=new ResizeObserver(process.env.NODE_ENV==="test"?d:T),x.observe(E)),()=>{b.clear(),cancelAnimationFrame(a),N.removeEventListener("resize",b),x&&x.disconnect()}},[I]),z.useEnhancedEffect(()=>{f()}),l.useEffect(()=>{h.current=0},[S]);const q=u=>{h.current=0,R||f(),r&&r(u)};return P.jsxs(l.Fragment,{children:[P.jsx("textarea",e._extends({value:S,onChange:q,ref:A,rows:c,style:e._extends({height:O.outerHeightStyle,overflow:O.overflow?"hidden":void 0},_)},B)),P.jsx("textarea",{"aria-hidden":!0,className:n.className,readOnly:!0,ref:g,tabIndex:-1,style:e._extends({},qe.shadow,_,{paddingTop:0,paddingBottom:0})})]})});process.env.NODE_ENV!=="production"&&(ge.propTypes={className:e.PropTypes.string,maxRows:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),minRows:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),onChange:e.PropTypes.func,placeholder:e.PropTypes.string,style:e.PropTypes.object,value:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.string),e.PropTypes.number,e.PropTypes.string])});function xe({props:o,states:n,muiFormControl:t}){return n.reduce((r,s)=>(r[s]=o[s],t&&typeof o[s]>"u"&&(r[s]=t[s]),r),{})}const we=l.createContext(void 0);process.env.NODE_ENV!=="production"&&(we.displayName="FormControlContext");const te=we;function ve(){return l.useContext(te)}function Ce(o){return P.jsx(Pe,e._extends({},o,{defaultTheme:e.defaultTheme,themeId:e.THEME_ID}))}process.env.NODE_ENV!=="production"&&(Ce.propTypes={styles:e.PropTypes.oneOfType([e.PropTypes.array,e.PropTypes.func,e.PropTypes.number,e.PropTypes.object,e.PropTypes.string,e.PropTypes.bool])});function ye(o){return o!=null&&!(Array.isArray(o)&&o.length===0)}function Se(o,n=!1){return o&&(ye(o.value)&&o.value!==""||n&&ye(o.defaultValue)&&o.defaultValue!=="")}function Ge(o){return o.startAdornment}function Ke(o){return e.generateUtilityClass("MuiInputBase",o)}const Ye=e.generateUtilityClasses("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),$=Ye,Ze=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Re=(o,n)=>{const{ownerState:t}=o;return[n.root,t.formControl&&n.formControl,t.startAdornment&&n.adornedStart,t.endAdornment&&n.adornedEnd,t.error&&n.error,t.size==="small"&&n.sizeSmall,t.multiline&&n.multiline,t.color&&n[`color${e.capitalize(t.color)}`],t.fullWidth&&n.fullWidth,t.hiddenLabel&&n.hiddenLabel]},Oe=(o,n)=>{const{ownerState:t}=o;return[n.input,t.size==="small"&&n.inputSizeSmall,t.multiline&&n.inputMultiline,t.type==="search"&&n.inputTypeSearch,t.startAdornment&&n.inputAdornedStart,t.endAdornment&&n.inputAdornedEnd,t.hiddenLabel&&n.inputHiddenLabel]},Je=o=>{const{classes:n,color:t,disabled:r,error:s,endAdornment:c,focused:_,formControl:S,fullWidth:B,hiddenLabel:R,multiline:w,readOnly:A,size:g,startAdornment:h,type:O}=o,F={root:["root",`color${e.capitalize(t)}`,r&&"disabled",s&&"error",B&&"fullWidth",_&&"focused",S&&"formControl",g&&g!=="medium"&&`size${e.capitalize(g)}`,w&&"multiline",h&&"adornedStart",c&&"adornedEnd",R&&"hiddenLabel",A&&"readOnly"],input:["input",r&&"disabled",O==="search"&&"inputTypeSearch",w&&"inputMultiline",g==="small"&&"inputSizeSmall",R&&"inputHiddenLabel",h&&"inputAdornedStart",c&&"inputAdornedEnd",A&&"readOnly"]};return e.composeClasses(F,Ke,n)},Ee=e.styled("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Re})(({theme:o,ownerState:n})=>e._extends({},o.typography.body1,{color:(o.vars||o).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${$.disabled}`]:{color:(o.vars||o).palette.text.disabled,cursor:"default"}},n.multiline&&e._extends({padding:"4px 0 5px"},n.size==="small"&&{paddingTop:1}),n.fullWidth&&{width:"100%"})),Ne=e.styled("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Oe})(({theme:o,ownerState:n})=>{const t=o.palette.mode==="light",r=e._extends({color:"currentColor"},o.vars?{opacity:o.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},{transition:o.transitions.create("opacity",{duration:o.transitions.duration.shorter})}),s={opacity:"0 !important"},c=o.vars?{opacity:o.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return e._extends({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${$.formControl} &`]:{"&::-webkit-input-placeholder":s,"&::-moz-placeholder":s,"&:-ms-input-placeholder":s,"&::-ms-input-placeholder":s,"&:focus::-webkit-input-placeholder":c,"&:focus::-moz-placeholder":c,"&:focus:-ms-input-placeholder":c,"&:focus::-ms-input-placeholder":c},[`&.${$.disabled}`]:{opacity:1,WebkitTextFillColor:(o.vars||o).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},n.size==="small"&&{paddingTop:1},n.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},n.type==="search"&&{MozAppearance:"textfield"})}),Qe=P.jsx(Ce,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),ze=l.forwardRef(function(n,t){var r;const s=e.useThemeProps({props:n,name:"MuiInputBase"}),{"aria-describedby":c,autoComplete:_,autoFocus:S,className:B,components:R={},componentsProps:w={},defaultValue:A,disabled:g,disableInjectingGlobalStyles:h,endAdornment:O,fullWidth:F=!1,id:I,inputComponent:H="input",inputProps:f={},inputRef:q,maxRows:u,minRows:T,multiline:a=!1,name:d,onBlur:b,onChange:E,onClick:N,onFocus:x,onKeyDown:C,onKeyUp:y,placeholder:G,readOnly:j,renderSuffix:re,rows:W,slotProps:se={},slots:ie={},startAdornment:D,type:le="text",value:_e}=s,Ae=e._objectWithoutPropertiesLoose(s,Ze),V=f.value!=null?f.value:_e,{current:K}=l.useRef(V!=null),k=l.useRef(),Fe=l.useCallback(i=>{process.env.NODE_ENV!=="production"&&i&&i.nodeName!=="INPUT"&&!i.focus&&console.error(["MUI: You have provided a `inputComponent` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join(`
|
|
4
|
+
`))},[]),Ie=z.useForkRef(k,q,f.ref,Fe),[Y,Z]=l.useState(!1),p=ve();process.env.NODE_ENV!=="production"&&l.useEffect(()=>{if(p)return p.registerEffect()},[p]);const m=xe({props:s,muiFormControl:p,states:["color","disabled","error","hiddenLabel","size","required","filled"]});m.focused=p?p.focused:Y,l.useEffect(()=>{!p&&g&&Y&&(Z(!1),b&&b())},[p,g,Y,b]);const J=p&&p.onFilled,Q=p&&p.onEmpty,M=l.useCallback(i=>{Se(i)?J&&J():Q&&Q()},[J,Q]);z.useEnhancedEffect(()=>{K&&M({value:V})},[V,M,K]);const ke=i=>{if(m.disabled){i.stopPropagation();return}x&&x(i),f.onFocus&&f.onFocus(i),p&&p.onFocus?p.onFocus(i):Z(!0)},Be=i=>{b&&b(i),f.onBlur&&f.onBlur(i),p&&p.onBlur?p.onBlur(i):Z(!1)},je=(i,...ce)=>{if(!K){const de=i.target||k.current;if(de==null)throw new Error(process.env.NODE_ENV!=="production"?"MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":e.formatMuiErrorMessage(1));M({value:de.value})}f.onChange&&f.onChange(i,...ce),E&&E(i,...ce)};l.useEffect(()=>{M(k.current)},[]);const De=i=>{k.current&&i.currentTarget===i.target&&k.current.focus(),N&&N(i)};let X=H,v=f;a&&X==="input"&&(W?(process.env.NODE_ENV!=="production"&&(T||u)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),v=e._extends({type:void 0,minRows:W,maxRows:W},v)):v=e._extends({type:void 0,maxRows:u,minRows:T},v),X=ge);const Me=i=>{M(i.animationName==="mui-auto-fill-cancel"?k.current:{value:"x"})};l.useEffect(()=>{p&&p.setAdornedStart(!!D)},[p,D]);const L=e._extends({},s,{color:m.color||"primary",disabled:m.disabled,endAdornment:O,error:m.error,focused:m.focused,formControl:p,fullWidth:F,hiddenLabel:m.hiddenLabel,multiline:a,size:m.size,startAdornment:D,type:le}),pe=Je(L),ae=ie.root||R.Root||Ee,ee=se.root||w.root||{},ue=ie.input||R.Input||Ne;return v=e._extends({},v,(r=se.input)!=null?r:w.input),P.jsxs(l.Fragment,{children:[!h&&Qe,P.jsxs(ae,e._extends({},ee,!ne(ae)&&{ownerState:e._extends({},L,ee.ownerState)},{ref:t,onClick:De},Ae,{className:e.clsx(pe.root,ee.className,B,j&&"MuiInputBase-readOnly"),children:[D,P.jsx(te.Provider,{value:null,children:P.jsx(ue,e._extends({ownerState:L,"aria-invalid":m.error,"aria-describedby":c,autoComplete:_,autoFocus:S,defaultValue:A,disabled:m.disabled,id:I,onAnimationStart:Me,name:d,placeholder:G,readOnly:j,required:m.required,rows:W,value:V,onKeyDown:C,onKeyUp:y,type:le},v,!ne(ue)&&{as:X,ownerState:e._extends({},L,v.ownerState)},{ref:Ie,className:e.clsx(pe.input,v.className,j&&"MuiInputBase-readOnly"),onBlur:Be,onChange:je,onFocus:ke}))}),O,re?re(e._extends({},m,{startAdornment:D})):null]}))]})});process.env.NODE_ENV!=="production"&&(ze.propTypes={"aria-describedby":e.PropTypes.string,autoComplete:e.PropTypes.string,autoFocus:e.PropTypes.bool,classes:e.PropTypes.object,className:e.PropTypes.string,color:e.PropTypes.oneOfType([e.PropTypes.oneOf(["primary","secondary","error","info","success","warning"]),e.PropTypes.string]),components:e.PropTypes.shape({Input:e.PropTypes.elementType,Root:e.PropTypes.elementType}),componentsProps:e.PropTypes.shape({input:e.PropTypes.object,root:e.PropTypes.object}),defaultValue:e.PropTypes.any,disabled:e.PropTypes.bool,disableInjectingGlobalStyles:e.PropTypes.bool,endAdornment:e.PropTypes.node,error:e.PropTypes.bool,fullWidth:e.PropTypes.bool,id:e.PropTypes.string,inputComponent:z.elementTypeAcceptingRef,inputProps:e.PropTypes.object,inputRef:z.refType,margin:e.PropTypes.oneOf(["dense","none"]),maxRows:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),minRows:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),multiline:e.PropTypes.bool,name:e.PropTypes.string,onBlur:e.PropTypes.func,onChange:e.PropTypes.func,onClick:e.PropTypes.func,onFocus:e.PropTypes.func,onInvalid:e.PropTypes.func,onKeyDown:e.PropTypes.func,onKeyUp:e.PropTypes.func,placeholder:e.PropTypes.string,readOnly:e.PropTypes.bool,renderSuffix:e.PropTypes.func,required:e.PropTypes.bool,rows:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),size:e.PropTypes.oneOfType([e.PropTypes.oneOf(["medium","small"]),e.PropTypes.string]),slotProps:e.PropTypes.shape({input:e.PropTypes.object,root:e.PropTypes.object}),slots:e.PropTypes.shape({input:e.PropTypes.elementType,root:e.PropTypes.elementType}),startAdornment:e.PropTypes.node,sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object]),type:e.PropTypes.string,value:e.PropTypes.any});const Xe=ze;exports.FormControlContext=te;exports.InputBase=Xe;exports.InputBaseComponent=Ne;exports.InputBaseRoot=Ee;exports.debounce=he;exports.formControlState=xe;exports.inputBaseClasses=$;exports.inputOverridesResolver=Oe;exports.isAdornedStart=Ge;exports.isFilled=Se;exports.isHostComponent=ne;exports.ownerDocument=Te;exports.ownerWindow=oe;exports.rootOverridesResolver=Re;exports.useFormControl=ve;
|
package/dist/assets/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.
|
|
1
|
+
*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.rounded{border-radius:.25rem}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.font-bold{font-weight:700}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),n=require("../../useTheme-BpLcDNG1.cjs"),o=require("../../ButtonBase-Cg8cBMzO.cjs"),r=require("../../Input-CAb0EFzc.cjs"),s=()=>{const t=n.useTheme();return e.jsxs("div",{children:[e.jsx("button",{className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",children:"Click me from AnotherComponent"}),e.jsx(o.ButtonBase,{style:{backgroundColor:t.palette.primary.main},children:"AnotherComponent"}),e.jsx(r.Input,{className:"bg-blue-500"})]})};module.exports=s;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { u as r } from "../../useTheme-BWRyHzdn.js";
|
|
3
|
+
import { B as n } from "../../ButtonBase-CKfcGhaU.js";
|
|
4
|
+
import { I as m } from "../../Input-CbYjsRHK.js";
|
|
5
|
+
const i = () => {
|
|
6
|
+
const o = r();
|
|
7
|
+
return /* @__PURE__ */ t("div", { children: [
|
|
8
|
+
/* @__PURE__ */ e("button", { className: "bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded", children: "Click me from AnotherComponent" }),
|
|
9
|
+
/* @__PURE__ */ e(n, { style: { backgroundColor: o.palette.primary.main }, children: "AnotherComponent" }),
|
|
10
|
+
/* @__PURE__ */ e(m, { className: "bg-blue-500" })
|
|
11
|
+
] });
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
i as default
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),e=require("./AnotherComponent.cjs.js"),a={title:"Components/AnotherComponent",component:e,argTypes:{}},o=r=>s.jsx(e,{...r}),t=o.bind({});t.args={label:"Primary Button"};const n=o.bind({});n.args={label:"Secondary Button",secondary:!0};exports.Primary=t;exports.Secondary=n;exports.default=a;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import o from "./AnotherComponent.es.js";
|
|
3
|
+
const p = {
|
|
4
|
+
title: "Components/AnotherComponent",
|
|
5
|
+
component: o,
|
|
6
|
+
argTypes: {
|
|
7
|
+
// Définissez ici vos paramètres d'histoires spécifiques aux arguments (args).
|
|
8
|
+
}
|
|
9
|
+
}, t = (n) => /* @__PURE__ */ e(o, { ...n }), r = t.bind({});
|
|
10
|
+
r.args = {
|
|
11
|
+
label: "Primary Button"
|
|
12
|
+
};
|
|
13
|
+
const a = t.bind({});
|
|
14
|
+
a.args = {
|
|
15
|
+
label: "Secondary Button",
|
|
16
|
+
secondary: !0
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
r as Primary,
|
|
20
|
+
a as Secondary,
|
|
21
|
+
p as default
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./AnotherComponent.cjs.js");exports.AnotherComponent=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("react/jsx-runtime"),S=require("react"),e=require("../../useThemeProps-CDriK9TK.cjs"),C=require("../../useTheme-BpLcDNG1.cjs"),V=require("../../extendSxProp-CvhhU9Vb.cjs"),P=require("../../Button-Tkz5NkF_.cjs");function R(o){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const s in o)if(s!=="default"){const t=Object.getOwnPropertyDescriptor(o,s);Object.defineProperty(r,s,t.get?t:{enumerable:!0,get:()=>o[s]})}}return r.default=o,Object.freeze(r)}const f=R(S),D=e.createStyled(),N=["component","direction","spacing","divider","children","className","useFlexGap"],_=e.createTheme(),q=D("div",{name:"MuiStack",slot:"Root",overridesResolver:(o,r)=>r.root});function w(o){return e.useThemeProps$1({props:o,name:"MuiStack",defaultTheme:_})}function E(o,r){const s=f.Children.toArray(o).filter(Boolean);return s.reduce((t,i,p)=>(t.push(i),p<s.length-1&&t.push(f.cloneElement(r,{key:`separator-${p}`})),t),[])}const F=o=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[o],M=({ownerState:o,theme:r})=>{let s=e._extends({display:"flex",flexDirection:"column"},e.handleBreakpoints({theme:r},e.resolveBreakpointValues({values:o.direction,breakpoints:r.breakpoints.values}),t=>({flexDirection:t})));if(o.spacing){const t=e.createUnarySpacing(r),i=Object.keys(r.breakpoints.values).reduce((n,c)=>((typeof o.spacing=="object"&&o.spacing[c]!=null||typeof o.direction=="object"&&o.direction[c]!=null)&&(n[c]=!0),n),{}),p=e.resolveBreakpointValues({values:o.direction,base:i}),l=e.resolveBreakpointValues({values:o.spacing,base:i});typeof p=="object"&&Object.keys(p).forEach((n,c,y)=>{if(!p[n]){const T=c>0?p[y[c-1]]:"column";p[n]=T}});const u=(n,c)=>o.useFlexGap?{gap:e.getValue(t,n)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${F(c?p[c]:o.direction)}`]:e.getValue(t,n)}};s=e.deepmerge(s,e.handleBreakpoints({theme:r},l,u))}return s=e.mergeBreakpointsInOrder(r.breakpoints,s),s};function G(o={}){const{createStyledComponent:r=q,useThemeProps:s=w,componentName:t="MuiStack"}=o,i=()=>{const u={root:["root"]};return e.composeClasses(u,n=>e.generateUtilityClass(t,n),{})},p=r(M),l=f.forwardRef(function(n,c){const y=s(n),d=V.extendSxProp(y),{component:T="div",direction:b="column",spacing:O=0,divider:m,children:v,className:h,useFlexGap:j=!1}=d,x=e._objectWithoutPropertiesLoose(d,N),k={direction:b,spacing:O,useFlexGap:j},B=i();return a.jsx(p,e._extends({as:T,ownerState:k,ref:c,className:e.clsx(B.root,h)},x,{children:m?E(v,m):v}))});return process.env.NODE_ENV!=="production"&&(l.propTypes={children:e.PropTypes.node,direction:e.PropTypes.oneOfType([e.PropTypes.oneOf(["column-reverse","column","row-reverse","row"]),e.PropTypes.arrayOf(e.PropTypes.oneOf(["column-reverse","column","row-reverse","row"])),e.PropTypes.object]),divider:e.PropTypes.node,spacing:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string])),e.PropTypes.number,e.PropTypes.object,e.PropTypes.string]),sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object])}),l}const g=G({createStyledComponent:e.styled("div",{name:"MuiStack",slot:"Root",overridesResolver:(o,r)=>r.root}),useThemeProps:o=>e.useThemeProps({props:o,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(g.propTypes={children:e.PropTypes.node,component:e.PropTypes.elementType,direction:e.PropTypes.oneOfType([e.PropTypes.oneOf(["column-reverse","column","row-reverse","row"]),e.PropTypes.arrayOf(e.PropTypes.oneOf(["column-reverse","column","row-reverse","row"])),e.PropTypes.object]),divider:e.PropTypes.node,spacing:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string])),e.PropTypes.number,e.PropTypes.object,e.PropTypes.string]),sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object]),useFlexGap:e.PropTypes.bool});const $=g,U=e.styled("button")(({theme:o})=>({backgroundColor:o.palette.primary.main})),A=()=>{const o=C.useTheme();return a.jsxs($,{spacing:2,direction:"row",children:[a.jsx(U,{children:"Styled"}),a.jsx(P.Button,{variant:"text",style:{backgroundColor:o.palette.primary.main},children:"Text"}),a.jsx(P.Button,{variant:"contained",children:"Contained"}),a.jsx(P.Button,{variant:"outlined",children:"Outlined"})]})};module.exports=A;
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { jsx as l, jsxs as D } from "react/jsx-runtime";
|
|
2
|
+
import * as v from "react";
|
|
3
|
+
import { j as F, P as e, k as E, a as k, l as O, m as f, n as _, c as w, o as G, _ as M, h as $, p as U, e as A, b as L, q as T, s as j, u as q } from "../../useThemeProps-B6yTTpAe.js";
|
|
4
|
+
import { u as I } from "../../useTheme-BWRyHzdn.js";
|
|
5
|
+
import { e as W } from "../../extendSxProp-BRHiEwyk.js";
|
|
6
|
+
import { B as y } from "../../Button-X7eWZQfX.js";
|
|
7
|
+
const z = F(), H = ["component", "direction", "spacing", "divider", "children", "className", "useFlexGap"], J = E(), K = z("div", {
|
|
8
|
+
name: "MuiStack",
|
|
9
|
+
slot: "Root",
|
|
10
|
+
overridesResolver: (o, r) => r.root
|
|
11
|
+
});
|
|
12
|
+
function Q(o) {
|
|
13
|
+
return U({
|
|
14
|
+
props: o,
|
|
15
|
+
name: "MuiStack",
|
|
16
|
+
defaultTheme: J
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function X(o, r) {
|
|
20
|
+
const c = v.Children.toArray(o).filter(Boolean);
|
|
21
|
+
return c.reduce((a, i, t) => (a.push(i), t < c.length - 1 && a.push(/* @__PURE__ */ v.cloneElement(r, {
|
|
22
|
+
key: `separator-${t}`
|
|
23
|
+
})), a), []);
|
|
24
|
+
}
|
|
25
|
+
const Y = (o) => ({
|
|
26
|
+
row: "Left",
|
|
27
|
+
"row-reverse": "Right",
|
|
28
|
+
column: "Top",
|
|
29
|
+
"column-reverse": "Bottom"
|
|
30
|
+
})[o], Z = ({
|
|
31
|
+
ownerState: o,
|
|
32
|
+
theme: r
|
|
33
|
+
}) => {
|
|
34
|
+
let c = k({
|
|
35
|
+
display: "flex",
|
|
36
|
+
flexDirection: "column"
|
|
37
|
+
}, O({
|
|
38
|
+
theme: r
|
|
39
|
+
}, f({
|
|
40
|
+
values: o.direction,
|
|
41
|
+
breakpoints: r.breakpoints.values
|
|
42
|
+
}), (a) => ({
|
|
43
|
+
flexDirection: a
|
|
44
|
+
})));
|
|
45
|
+
if (o.spacing) {
|
|
46
|
+
const a = _(r), i = Object.keys(r.breakpoints.values).reduce((n, s) => ((typeof o.spacing == "object" && o.spacing[s] != null || typeof o.direction == "object" && o.direction[s] != null) && (n[s] = !0), n), {}), t = f({
|
|
47
|
+
values: o.direction,
|
|
48
|
+
base: i
|
|
49
|
+
}), u = f({
|
|
50
|
+
values: o.spacing,
|
|
51
|
+
base: i
|
|
52
|
+
});
|
|
53
|
+
typeof t == "object" && Object.keys(t).forEach((n, s, p) => {
|
|
54
|
+
if (!t[n]) {
|
|
55
|
+
const m = s > 0 ? t[p[s - 1]] : "column";
|
|
56
|
+
t[n] = m;
|
|
57
|
+
}
|
|
58
|
+
}), c = w(c, O({
|
|
59
|
+
theme: r
|
|
60
|
+
}, u, (n, s) => o.useFlexGap ? {
|
|
61
|
+
gap: T(a, n)
|
|
62
|
+
} : {
|
|
63
|
+
// The useFlexGap={false} implement relies on each child to give up control of the margin.
|
|
64
|
+
// We need to reset the margin to avoid double spacing.
|
|
65
|
+
"& > :not(style):not(style)": {
|
|
66
|
+
margin: 0
|
|
67
|
+
},
|
|
68
|
+
"& > :not(style) ~ :not(style)": {
|
|
69
|
+
[`margin${Y(s ? t[s] : o.direction)}`]: T(a, n)
|
|
70
|
+
}
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
return c = G(r.breakpoints, c), c;
|
|
74
|
+
};
|
|
75
|
+
function ee(o = {}) {
|
|
76
|
+
const {
|
|
77
|
+
// This will allow adding custom styled fn (for example for custom sx style function)
|
|
78
|
+
createStyledComponent: r = K,
|
|
79
|
+
useThemeProps: c = Q,
|
|
80
|
+
componentName: a = "MuiStack"
|
|
81
|
+
} = o, i = () => A({
|
|
82
|
+
root: ["root"]
|
|
83
|
+
}, (n) => L(a, n), {}), t = r(Z), u = /* @__PURE__ */ v.forwardRef(function(n, s) {
|
|
84
|
+
const p = c(n), d = W(p), {
|
|
85
|
+
component: m = "div",
|
|
86
|
+
direction: C = "column",
|
|
87
|
+
spacing: P = 0,
|
|
88
|
+
divider: h,
|
|
89
|
+
children: b,
|
|
90
|
+
className: S,
|
|
91
|
+
useFlexGap: B = !1
|
|
92
|
+
} = d, V = M(d, H), N = {
|
|
93
|
+
direction: C,
|
|
94
|
+
spacing: P,
|
|
95
|
+
useFlexGap: B
|
|
96
|
+
}, R = i();
|
|
97
|
+
return /* @__PURE__ */ l(t, k({
|
|
98
|
+
as: m,
|
|
99
|
+
ownerState: N,
|
|
100
|
+
ref: s,
|
|
101
|
+
className: $(R.root, S)
|
|
102
|
+
}, V, {
|
|
103
|
+
children: h ? X(b, h) : b
|
|
104
|
+
}));
|
|
105
|
+
});
|
|
106
|
+
return process.env.NODE_ENV !== "production" && (u.propTypes = {
|
|
107
|
+
children: e.node,
|
|
108
|
+
direction: e.oneOfType([e.oneOf(["column-reverse", "column", "row-reverse", "row"]), e.arrayOf(e.oneOf(["column-reverse", "column", "row-reverse", "row"])), e.object]),
|
|
109
|
+
divider: e.node,
|
|
110
|
+
spacing: e.oneOfType([e.arrayOf(e.oneOfType([e.number, e.string])), e.number, e.object, e.string]),
|
|
111
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
112
|
+
}), u;
|
|
113
|
+
}
|
|
114
|
+
const x = ee({
|
|
115
|
+
createStyledComponent: j("div", {
|
|
116
|
+
name: "MuiStack",
|
|
117
|
+
slot: "Root",
|
|
118
|
+
overridesResolver: (o, r) => r.root
|
|
119
|
+
}),
|
|
120
|
+
useThemeProps: (o) => q({
|
|
121
|
+
props: o,
|
|
122
|
+
name: "MuiStack"
|
|
123
|
+
})
|
|
124
|
+
});
|
|
125
|
+
process.env.NODE_ENV !== "production" && (x.propTypes = {
|
|
126
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
127
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
128
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
129
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
130
|
+
/**
|
|
131
|
+
* The content of the component.
|
|
132
|
+
*/
|
|
133
|
+
children: e.node,
|
|
134
|
+
/**
|
|
135
|
+
* The component used for the root node.
|
|
136
|
+
* Either a string to use a HTML element or a component.
|
|
137
|
+
*/
|
|
138
|
+
component: e.elementType,
|
|
139
|
+
/**
|
|
140
|
+
* Defines the `flex-direction` style property.
|
|
141
|
+
* It is applied for all screen sizes.
|
|
142
|
+
* @default 'column'
|
|
143
|
+
*/
|
|
144
|
+
direction: e.oneOfType([e.oneOf(["column-reverse", "column", "row-reverse", "row"]), e.arrayOf(e.oneOf(["column-reverse", "column", "row-reverse", "row"])), e.object]),
|
|
145
|
+
/**
|
|
146
|
+
* Add an element between each child.
|
|
147
|
+
*/
|
|
148
|
+
divider: e.node,
|
|
149
|
+
/**
|
|
150
|
+
* Defines the space between immediate children.
|
|
151
|
+
* @default 0
|
|
152
|
+
*/
|
|
153
|
+
spacing: e.oneOfType([e.arrayOf(e.oneOfType([e.number, e.string])), e.number, e.object, e.string]),
|
|
154
|
+
/**
|
|
155
|
+
* The system prop, which allows defining system overrides as well as additional CSS styles.
|
|
156
|
+
*/
|
|
157
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
158
|
+
/**
|
|
159
|
+
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
|
160
|
+
*
|
|
161
|
+
* While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
|
|
162
|
+
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
|
163
|
+
*
|
|
164
|
+
* To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
|
|
165
|
+
* @default false
|
|
166
|
+
*/
|
|
167
|
+
useFlexGap: e.bool
|
|
168
|
+
});
|
|
169
|
+
const oe = x, re = j("button")(({ theme: o }) => ({
|
|
170
|
+
backgroundColor: o.palette.primary.main
|
|
171
|
+
})), ie = () => {
|
|
172
|
+
const o = I();
|
|
173
|
+
return /* @__PURE__ */ D(oe, { spacing: 2, direction: "row", children: [
|
|
174
|
+
/* @__PURE__ */ l(re, { children: "Styled" }),
|
|
175
|
+
/* @__PURE__ */ l(
|
|
176
|
+
y,
|
|
177
|
+
{
|
|
178
|
+
variant: "text",
|
|
179
|
+
style: { backgroundColor: o.palette.primary.main },
|
|
180
|
+
children: "Text"
|
|
181
|
+
}
|
|
182
|
+
),
|
|
183
|
+
/* @__PURE__ */ l(y, { variant: "contained", children: "Contained" }),
|
|
184
|
+
/* @__PURE__ */ l(y, { variant: "outlined", children: "Outlined" })
|
|
185
|
+
] });
|
|
186
|
+
};
|
|
187
|
+
export {
|
|
188
|
+
ie as default
|
|
189
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),e=require("./BasicButtons.cjs.js"),a={title:"Components/BasicButtons",component:e,argTypes:{}},t=s=>r.jsx(e,{...s}),o=t.bind({});o.args={label:"Primary Button"};const n=t.bind({});n.args={label:"Secondary Button",secondary:!0};exports.Primary=o;exports.Secondary=n;exports.default=a;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import t from "./BasicButtons.es.js";
|
|
3
|
+
const i = {
|
|
4
|
+
title: "Components/BasicButtons",
|
|
5
|
+
component: t,
|
|
6
|
+
argTypes: {
|
|
7
|
+
// Définissez ici vos paramètres d'histoires spécifiques aux arguments (args).
|
|
8
|
+
}
|
|
9
|
+
}, o = (n) => /* @__PURE__ */ r(t, { ...n }), s = o.bind({});
|
|
10
|
+
s.args = {
|
|
11
|
+
label: "Primary Button"
|
|
12
|
+
};
|
|
13
|
+
const a = o.bind({});
|
|
14
|
+
a.args = {
|
|
15
|
+
label: "Secondary Button",
|
|
16
|
+
secondary: !0
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
s as Primary,
|
|
20
|
+
a as Secondary,
|
|
21
|
+
i as default
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./BasicButtons.cjs.js");exports.BasicButtons=t;
|
|
@@ -1 +1,28 @@
|
|
|
1
|
-
"use strict";const d=require("react/jsx-runtime"),q=require("react"),L=require("./DefaultButtonIcon.cjs.js"),t=require("../../../useThemeProps-jkB5q9ie.cjs"),D=require("../../../ButtonBase-DCL6Xlnm.cjs"),U=require("../../../useId-Cw0TtD-8.cjs"),F=require("../../../refType-CHSN6ysS.cjs"),G=require("../../../CircularProgress-CZX5SfKt.cjs"),S=require("../../../useTheme-BDPYLOoP.cjs");function H(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 p=H(q);function A(o){return t.generateUtilityClass("MuiButton",o)}const J=t.generateUtilityClasses("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),$=J,m=p.createContext({});process.env.NODE_ENV!=="production"&&(m.displayName="ButtonGroupContext");const E=m,O=p.createContext(void 0);process.env.NODE_ENV!=="production"&&(O.displayName="ButtonGroupButtonContext");const K=O,Q=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],X=o=>{const{color:n,disableElevation:i,fullWidth:a,size:r,variant:e,classes:s}=o,u={root:["root",e,`${e}${t.capitalize(n)}`,`size${t.capitalize(r)}`,`${e}Size${t.capitalize(r)}`,n==="inherit"&&"colorInherit",i&&"disableElevation",a&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${t.capitalize(r)}`],endIcon:["endIcon",`iconSize${t.capitalize(r)}`]},y=t.composeClasses(u,A,s);return t._extends({},s,y)},R=o=>t._extends({},o.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},o.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},o.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),Y=t.styled(D.ButtonBase,{shouldForwardProp:o=>t.rootShouldForwardProp(o)||o==="classes",name:"MuiButton",slot:"Root",overridesResolver:(o,n)=>{const{ownerState:i}=o;return[n.root,n[i.variant],n[`${i.variant}${t.capitalize(i.color)}`],n[`size${t.capitalize(i.size)}`],n[`${i.variant}Size${t.capitalize(i.size)}`],i.color==="inherit"&&n.colorInherit,i.disableElevation&&n.disableElevation,i.fullWidth&&n.fullWidth]}})(({theme:o,ownerState:n})=>{var i,a;const r=o.palette.mode==="light"?o.palette.grey[300]:o.palette.grey[800],e=o.palette.mode==="light"?o.palette.grey.A100:o.palette.grey[700];return t._extends({},o.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(o.vars||o).shape.borderRadius,transition:o.transitions.create(["background-color","box-shadow","border-color","color"],{duration:o.transitions.duration.short}),"&:hover":t._extends({textDecoration:"none",backgroundColor:o.vars?`rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})`:t.alpha(o.palette.text.primary,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},n.variant==="text"&&n.color!=="inherit"&&{backgroundColor:o.vars?`rgba(${o.vars.palette[n.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})`:t.alpha(o.palette[n.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},n.variant==="outlined"&&n.color!=="inherit"&&{border:`1px solid ${(o.vars||o).palette[n.color].main}`,backgroundColor:o.vars?`rgba(${o.vars.palette[n.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})`:t.alpha(o.palette[n.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},n.variant==="contained"&&{backgroundColor:o.vars?o.vars.palette.Button.inheritContainedHoverBg:e,boxShadow:(o.vars||o).shadows[4],"@media (hover: none)":{boxShadow:(o.vars||o).shadows[2],backgroundColor:(o.vars||o).palette.grey[300]}},n.variant==="contained"&&n.color!=="inherit"&&{backgroundColor:(o.vars||o).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(o.vars||o).palette[n.color].main}}),"&:active":t._extends({},n.variant==="contained"&&{boxShadow:(o.vars||o).shadows[8]}),[`&.${$.focusVisible}`]:t._extends({},n.variant==="contained"&&{boxShadow:(o.vars||o).shadows[6]}),[`&.${$.disabled}`]:t._extends({color:(o.vars||o).palette.action.disabled},n.variant==="outlined"&&{border:`1px solid ${(o.vars||o).palette.action.disabledBackground}`},n.variant==="contained"&&{color:(o.vars||o).palette.action.disabled,boxShadow:(o.vars||o).shadows[0],backgroundColor:(o.vars||o).palette.action.disabledBackground})},n.variant==="text"&&{padding:"6px 8px"},n.variant==="text"&&n.color!=="inherit"&&{color:(o.vars||o).palette[n.color].main},n.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},n.variant==="outlined"&&n.color!=="inherit"&&{color:(o.vars||o).palette[n.color].main,border:o.vars?`1px solid rgba(${o.vars.palette[n.color].mainChannel} / 0.5)`:`1px solid ${t.alpha(o.palette[n.color].main,.5)}`},n.variant==="contained"&&{color:o.vars?o.vars.palette.text.primary:(i=(a=o.palette).getContrastText)==null?void 0:i.call(a,o.palette.grey[300]),backgroundColor:o.vars?o.vars.palette.Button.inheritContainedBg:r,boxShadow:(o.vars||o).shadows[2]},n.variant==="contained"&&n.color!=="inherit"&&{color:(o.vars||o).palette[n.color].contrastText,backgroundColor:(o.vars||o).palette[n.color].main},n.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},n.size==="small"&&n.variant==="text"&&{padding:"4px 5px",fontSize:o.typography.pxToRem(13)},n.size==="large"&&n.variant==="text"&&{padding:"8px 11px",fontSize:o.typography.pxToRem(15)},n.size==="small"&&n.variant==="outlined"&&{padding:"3px 9px",fontSize:o.typography.pxToRem(13)},n.size==="large"&&n.variant==="outlined"&&{padding:"7px 21px",fontSize:o.typography.pxToRem(15)},n.size==="small"&&n.variant==="contained"&&{padding:"4px 10px",fontSize:o.typography.pxToRem(13)},n.size==="large"&&n.variant==="contained"&&{padding:"8px 22px",fontSize:o.typography.pxToRem(15)},n.fullWidth&&{width:"100%"})},({ownerState:o})=>o.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${$.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${$.disabled}`]:{boxShadow:"none"}}),Z=t.styled("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(o,n)=>{const{ownerState:i}=o;return[n.startIcon,n[`iconSize${t.capitalize(i.size)}`]]}})(({ownerState:o})=>t._extends({display:"inherit",marginRight:8,marginLeft:-4},o.size==="small"&&{marginLeft:-2},R(o))),w=t.styled("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(o,n)=>{const{ownerState:i}=o;return[n.endIcon,n[`iconSize${t.capitalize(i.size)}`]]}})(({ownerState:o})=>t._extends({display:"inherit",marginRight:-4,marginLeft:8},o.size==="small"&&{marginRight:-2},R(o))),_=p.forwardRef(function(n,i){const a=p.useContext(E),r=p.useContext(K),e=t.resolveProps(a,n),s=t.useThemeProps({props:e,name:"MuiButton"}),{children:u,color:y="primary",component:g="button",className:f,disabled:P=!1,disableElevation:T=!1,disableFocusRipple:I=!1,endIcon:v,focusVisibleClassName:C,fullWidth:c=!1,size:z="medium",startIcon:b,type:B,variant:j="text"}=s,k=t._objectWithoutPropertiesLoose(s,Q),h=t._extends({},s,{color:y,component:g,disabled:P,disableElevation:T,disableFocusRipple:I,fullWidth:c,size:z,type:B,variant:j}),x=X(h),W=b&&d.jsx(Z,{className:x.startIcon,ownerState:h,children:b}),M=v&&d.jsx(w,{className:x.endIcon,ownerState:h,children:v}),V=r||"";return d.jsxs(Y,t._extends({ownerState:h,className:t.clsx(a.className,x.root,f,V),component:g,disabled:P,focusRipple:!I,focusVisibleClassName:t.clsx(x.focusVisible,C),ref:i,type:B},k,{classes:x,children:[W,u,M]}))});process.env.NODE_ENV!=="production"&&(_.propTypes={children:t.PropTypes.node,classes:t.PropTypes.object,className:t.PropTypes.string,color:t.PropTypes.oneOfType([t.PropTypes.oneOf(["inherit","primary","secondary","success","error","info","warning"]),t.PropTypes.string]),component:t.PropTypes.elementType,disabled:t.PropTypes.bool,disableElevation:t.PropTypes.bool,disableFocusRipple:t.PropTypes.bool,disableRipple:t.PropTypes.bool,endIcon:t.PropTypes.node,focusVisibleClassName:t.PropTypes.string,fullWidth:t.PropTypes.bool,href:t.PropTypes.string,size:t.PropTypes.oneOfType([t.PropTypes.oneOf(["small","medium","large"]),t.PropTypes.string]),startIcon:t.PropTypes.node,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]),type:t.PropTypes.oneOfType([t.PropTypes.oneOf(["button","reset","submit"]),t.PropTypes.string]),variant:t.PropTypes.oneOfType([t.PropTypes.oneOf(["contained","outlined","text"]),t.PropTypes.string])});const oo=_;function no(o){return t.generateUtilityClass("MuiLoadingButton",o)}const to=t.generateUtilityClasses("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),l=to,io=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],ao=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)}`]},e=t.composeClasses(r,no,a);return t._extends({},a,e)},ro=o=>o!=="ownerState"&&o!=="theme"&&o!=="sx"&&o!=="as"&&o!=="classes",eo=t.styled(oo,{shouldForwardProp:o=>ro(o)||o==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(o,n)=>[n.root,n.startIconLoadingStart&&{[`& .${l.startIconLoadingStart}`]:n.startIconLoadingStart},n.endIconLoadingEnd&&{[`& .${l.endIconLoadingEnd}`]:n.endIconLoadingEnd}]})(({ownerState:o,theme:n})=>t._extends({[`& .${l.startIconLoadingStart}, & .${l.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}),[`&.${l.loading}`]:{color:"transparent"}},o.loadingPosition==="start"&&o.fullWidth&&{[`& .${l.startIconLoadingStart}, & .${l.endIconLoadingEnd}`]:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0,marginRight:-8}},o.loadingPosition==="end"&&o.fullWidth&&{[`& .${l.startIconLoadingStart}, & .${l.endIconLoadingEnd}`]:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0,marginLeft:-8}})),so=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})),N=p.forwardRef(function(n,i){const a=p.useContext(E),r=t.resolveProps(a,n),e=t.useThemeProps({props:r,name:"MuiLoadingButton"}),{children:s,disabled:u=!1,id:y,loading:g=!1,loadingIndicator:f,loadingPosition:P="center",variant:T="text"}=e,I=t._objectWithoutPropertiesLoose(e,io),v=U.useId(y),C=f??d.jsx(G.CircularProgress,{"aria-labelledby":v,color:"inherit",size:16}),c=t._extends({},e,{disabled:u,loading:g,loadingIndicator:C,loadingPosition:P,variant:T}),z=ao(c),b=g?d.jsx(so,{className:z.loadingIndicator,ownerState:c,children:C}):null;return d.jsxs(eo,t._extends({disabled:u||g,id:v,ref:i},I,{variant:T,classes:z,ownerState:c,children:[c.loadingPosition==="end"?s:b,c.loadingPosition==="end"?b:s]}))});process.env.NODE_ENV!=="production"&&(N.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:F.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 lo=N,co=t.styled(lo,{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}})),po=({icon:o,text:n,...i})=>{const a=S.useTheme(),r=i.contentColor??a.palette.primary.main;return d.jsxs(co,{...i,variant:"outlined",contentColor:r,hoverColor:i.hoverColor??r,children:[(o==null?void 0:o.position)==="left"?d.jsx(L,{...o}):null,n,(o==null?void 0:o.position)==="right"?d.jsx(L,{...o}):null]})};module.exports=po;
|
|
1
|
+
"use strict";const l=require("react/jsx-runtime"),E=require("react"),L=require("./DefaultButtonIcon.cjs.js"),t=require("../../../useThemeProps-CDriK9TK.cjs"),O=require("../../../Button-Tkz5NkF_.cjs"),S=require("../../../useId-Cw0TtD-8.cjs"),R=require("../../../useForkRef-82uiK71d.cjs"),x=require("@emotion/react"),z=require("../../../useTheme-BpLcDNG1.cjs");function N(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>o[n]})}}return e.default=o,Object.freeze(e)}const k=N(E);function U(o){return t.generateUtilityClass("MuiCircularProgress",o)}t.generateUtilityClasses("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const q=["className","color","disableShrink","size","style","thickness","value","variant"];let I=o=>o,$,_,j,B;const p=44,W=x.keyframes($||($=I`
|
|
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;
|