@cgi-learning-hub/ui 1.2.0-dev.1725030880 → 1.2.0-dev.1725451328
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/Box-BDMtAH2P.cjs +1 -0
- package/dist/{Box-BJvmuM0Y.js → Box-CONPkck2.js} +32 -30
- package/dist/Button-By3A0teb.js +454 -0
- package/dist/Button-CBAa7bmK.cjs +1 -0
- package/dist/ButtonBase-D0vqeM8I.js +890 -0
- package/dist/ButtonBase-DePtV_m6.cjs +75 -0
- package/dist/CircularProgress-BRnSv2J2.cjs +28 -0
- package/dist/CircularProgress-BrfcRJbv.js +251 -0
- package/dist/DatePicker-Cw1xQ3Sn.cjs +19 -0
- package/dist/{DatePicker-xLT3dl8F.js → DatePicker-wZ1VHlXF.js} +4241 -4100
- package/dist/DefaultButton-B1wjXZO7.cjs +1 -0
- package/dist/DefaultButton-dbnwLtyd.js +351 -0
- package/dist/DefaultPropsProvider-B6IbLm7M.cjs +17 -0
- package/dist/DefaultPropsProvider-QV6PDjPd.js +468 -0
- package/dist/IconButton-BiLAYORS.js +239 -0
- package/dist/IconButton-DE-QtB3Q.cjs +2 -0
- package/dist/{InputAdornment-zaw7AFWU.js → InputAdornment-7ED2C-w1.js} +81 -65
- package/dist/InputAdornment-CJbpwt2R.cjs +1 -0
- package/dist/InputBase-LZPaeC-A.cjs +3 -0
- package/dist/InputBase-jbXydPMc.js +802 -0
- package/dist/{Stack-Dlgk5t_M.js → Stack-BzF_6-v5.js} +62 -60
- package/dist/Stack-D6Kv6y1D.cjs +1 -0
- package/dist/Tabs-CV_eM5RY.js +1222 -0
- package/dist/Tabs-DcqpjpXb.cjs +4 -0
- package/dist/TextField-DAxS82qf.cjs +12 -0
- package/dist/{TextField-DG1754qQ.js → TextField-G9MOGCdw.js} +3033 -2408
- package/dist/{Tooltip-BjTwTSrD.js → Tooltip-D_4ANHAc.js} +4682 -3406
- package/dist/Tooltip-Ma-NowZd.cjs +100 -0
- package/dist/TransitionGroupContext-B5aSBz0G.js +64 -0
- package/dist/TransitionGroupContext-gQFtuZSh.cjs +1 -0
- package/dist/Typography-4kqbsc6q.js +258 -0
- package/dist/Typography-CNQVeQXr.cjs +1 -0
- package/dist/components/DatePicker/DatePicker.cjs.js +1 -1
- package/dist/components/DatePicker/DatePicker.es.js +3 -3
- package/dist/components/DatePicker/DatePicker.stories.cjs.js +1 -1
- package/dist/components/DatePicker/DatePicker.stories.es.js +3 -3
- package/dist/components/DatePicker/index.cjs.js +1 -1
- package/dist/components/DatePicker/index.es.js +1 -1
- package/dist/components/DefaultButton/DefaultButton.cjs.js +1 -1
- package/dist/components/DefaultButton/DefaultButton.es.js +2 -2
- package/dist/components/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
- package/dist/components/DefaultButton/DefaultButtonIcon.es.js +108 -67
- package/dist/components/DefaultButton/index.cjs.js +1 -1
- package/dist/components/DefaultButton/index.es.js +1 -1
- package/dist/components/Dropzone/Dropzone.cjs.js +5 -5
- package/dist/components/Dropzone/Dropzone.es.js +8 -8
- package/dist/components/FileList/FileList.cjs.js +1 -1
- package/dist/components/FileList/FileList.es.js +1 -1
- package/dist/components/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/FileList/FileListItem.es.js +10 -11
- package/dist/components/IconButton.stories.cjs.js +1 -1
- package/dist/components/IconButton.stories.es.js +13 -14
- package/dist/components/Loader/Loader.cjs.js +1 -1
- package/dist/components/Loader/Loader.es.js +1 -1
- package/dist/components/PaperHeader/PaperHeader.cjs.js +1 -1
- package/dist/components/PaperHeader/PaperHeader.es.js +2 -2
- package/dist/components/PaperHeader/PaperHeader.stories.cjs.js +1 -1
- package/dist/components/PaperHeader/PaperHeader.stories.es.js +7 -7
- package/dist/components/PasswordInput/PasswordInput.cjs.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.es.js +5 -5
- package/dist/components/PrimaryButton/PrimaryButton.cjs.js +1 -1
- package/dist/components/PrimaryButton/PrimaryButton.es.js +1 -1
- package/dist/components/PrimaryButton/PrimaryButton.stories.cjs.js +1 -1
- package/dist/components/PrimaryButton/PrimaryButton.stories.es.js +1 -1
- package/dist/components/QueryError/QueryError.cjs.js +1 -1
- package/dist/components/QueryError/QueryError.es.js +1 -1
- package/dist/components/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/SearchInput/SearchInput.es.js +4 -4
- package/dist/components/SecondaryButton/SecondaryButton.cjs.js +1 -1
- package/dist/components/SecondaryButton/SecondaryButton.es.js +1 -1
- package/dist/components/SecondaryButton/SecondaryButton.stories.cjs.js +1 -1
- package/dist/components/SecondaryButton/SecondaryButton.stories.es.js +1 -1
- package/dist/components/TabList.stories.cjs.js +1 -1
- package/dist/components/TabList.stories.es.js +100 -87
- package/dist/components/TextInput/TextInput.cjs.js +1 -1
- package/dist/components/TextInput/TextInput.es.js +1 -1
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.es.js +240 -235
- package/dist/composeClasses-B_ETVugV.cjs +1 -0
- package/dist/composeClasses-zmPRtZOg.js +16 -0
- package/dist/createSvgIcon-B6bEgasO.js +249 -0
- package/dist/createSvgIcon-C92jLZ0q.cjs +2 -0
- package/dist/createSvgIcon-Cdsg9tFu.js +88 -0
- package/dist/createSvgIcon-CrOALbij.cjs +1 -0
- package/dist/extendSxProp-BpSXIdup.js +37 -0
- package/dist/extendSxProp-DVE8Tgj8.cjs +1 -0
- package/dist/{fr-CXEmlY0d.js → fr-D92L3a1M.js} +13 -13
- package/dist/{fr-C4bcUC-9.cjs → fr-EMw1nUC-.cjs} +1 -1
- package/dist/identifier-7NboR24y.cjs +59 -0
- package/dist/identifier-Bsv46xiT.js +2930 -0
- package/dist/index-C9spydU3.js +89 -0
- package/dist/index-DHDspyh-.cjs +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +238 -233
- package/dist/{ownerWindow-C7EH1lr6.js → ownerWindow-BoRkeomM.js} +2 -2
- package/dist/{refType-DiVIFcsY.js → refType-BnS1d2D8.js} +1 -1
- package/dist/{refType-D1DDOFsy.cjs → refType-YgbJS0xl.cjs} +1 -1
- package/dist/useControlled-Bf7_InaL.cjs +3 -0
- package/dist/useControlled-D59BLg1S.js +48 -0
- package/dist/useEventCallback-BgMlqKLP.js +14 -0
- package/dist/useEventCallback-CrCf96iG.cjs +1 -0
- package/dist/useId-CyGZMA-F.js +19 -0
- package/dist/useId-D5Txt-1B.cjs +1 -0
- package/dist/useTheme-A9inJAFh.cjs +1 -0
- package/dist/useTheme-C0nMwKpp.js +128 -0
- package/dist/{useTheme-1gSw-INq.js → useTheme-DzMeSzHc.js} +5 -5
- package/dist/useTheme-Zq6D7sUp.cjs +1 -0
- package/dist/useThemeProps-YFPF1eJp.js +40 -0
- package/dist/useThemeProps-r2yCksSx.cjs +1 -0
- package/package.json +15 -15
- package/dist/Box-2ZrLOc7U.cjs +0 -1
- package/dist/Button-HyZp1VKI.js +0 -359
- package/dist/Button-NhaA68Of.cjs +0 -1
- package/dist/ButtonBase-CnINN-P4.cjs +0 -75
- package/dist/ButtonBase-cOL6Mpcp.js +0 -827
- package/dist/CircularProgress-01RZzfpF.cjs +0 -28
- package/dist/CircularProgress-DO4r9-x8.js +0 -217
- package/dist/DatePicker-DZBeZYG6.cjs +0 -19
- package/dist/DefaultButton-BMmuKPgA.cjs +0 -1
- package/dist/DefaultButton-CKY6tuni.js +0 -258
- package/dist/IconButton-3v-0zgZW.cjs +0 -2
- package/dist/IconButton-BBfmzBP6.js +0 -184
- package/dist/InputAdornment-DHmtETz3.cjs +0 -1
- package/dist/InputBase-BpGQgBej.cjs +0 -3
- package/dist/InputBase-COUxfhh1.js +0 -794
- package/dist/Stack-D9IYPfJ8.cjs +0 -1
- package/dist/Tabs-Blo-8Ro5.js +0 -1091
- package/dist/Tabs-D0e7cB4l.cjs +0 -4
- package/dist/TextField-8AuRLRIK.cjs +0 -12
- package/dist/Tooltip-Cp3Dh6LR.cjs +0 -95
- package/dist/TransitionGroupContext-BkoHK5Kx.js +0 -14
- package/dist/TransitionGroupContext-mYDSzffd.cjs +0 -1
- package/dist/Typography-DjrvRhOr.js +0 -178
- package/dist/Typography-YHooSvuR.cjs +0 -1
- package/dist/createStyled--XbpooZB.js +0 -142
- package/dist/createStyled-CuYz_ckk.cjs +0 -1
- package/dist/createSvgIcon-CUiH3cta.cjs +0 -1
- package/dist/createSvgIcon-D29Io9jD.js +0 -183
- package/dist/createSvgIcon-DTc4Xvfk.cjs +0 -2
- package/dist/createSvgIcon-DvOXtgXV.js +0 -76
- package/dist/identifier-CAQ9PWqs.js +0 -3046
- package/dist/identifier-CWIj084w.cjs +0 -50
- package/dist/isHostComponent-PydJW4A4.cjs +0 -1
- package/dist/isHostComponent-kiaBvYVo.js +0 -6
- package/dist/styled-Bt4oYVnF.cjs +0 -17
- package/dist/styled-Co-8YWfm.js +0 -533
- package/dist/useControlled-DKpcyPsg.cjs +0 -3
- package/dist/useControlled-DoRrpN8o.js +0 -48
- package/dist/useId-BW-oWmul.js +0 -19
- package/dist/useId-Cw0TtD-8.cjs +0 -1
- package/dist/useIsFocusVisible-Bv_7uvif.cjs +0 -1
- package/dist/useIsFocusVisible-DhASXQ4o.js +0 -69
- package/dist/useTheme-Dm6RnXrf.cjs +0 -1
- package/dist/useTheme-HJhneR9g.js +0 -99
- package/dist/useTheme-T2P7WhLG.cjs +0 -1
- package/dist/useThemeProps-BKIVQv3E.js +0 -17
- package/dist/useThemeProps-BfZ3lLQs.js +0 -27
- package/dist/useThemeProps-BpFUkYqe.cjs +0 -1
- package/dist/useThemeProps-Co5ylM0H.cjs +0 -1
- package/dist/useTimeout-BdvDipeg.js +0 -47
- package/dist/useTimeout-XUWYBnl6.cjs +0 -1
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./identifier-CWIj084w.cjs"),y=require("react"),U=require("./styled-Bt4oYVnF.cjs"),_=require("react/jsx-runtime"),Y=require("./useTimeout-XUWYBnl6.cjs"),te=require("./TransitionGroupContext-mYDSzffd.cjs"),oe=require("@emotion/react"),ue=require("./useForkRef-CGd3Nhyb.cjs"),Oe=require("./useIsFocusVisible-Bv_7uvif.cjs"),ce=require("./refType-D1DDOFsy.cjs");function Ie(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const a=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(r,s,a.get?a:{enumerable:!0,get:()=>t[s]})}}return r.default=t,Object.freeze(r)}const p=Ie(y);function Ue(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function re(t,r){var s=function(n){return r&&y.isValidElement(n)?r(n):n},a=Object.create(null);return t&&y.Children.map(t,function(o){return o}).forEach(function(o){a[o.key]=s(o)}),a}function $e(t,r){t=t||{},r=r||{};function s(h){return h in r?r[h]:t[h]}var a=Object.create(null),o=[];for(var n in t)n in r?o.length&&(a[n]=o,o=[]):o.push(n);var i,c={};for(var u in r){if(a[u])for(i=0;i<a[u].length;i++){var d=a[u][i];c[a[u][i]]=s(d)}c[u]=s(u)}for(i=0;i<o.length;i++)c[o[i]]=s(o[i]);return c}function w(t,r,s){return s[r]!=null?s[r]:t.props[r]}function qe(t,r){return re(t.children,function(s){return y.cloneElement(s,{onExited:r.bind(null,s),in:!0,appear:w(s,"appear",t),enter:w(s,"enter",t),exit:w(s,"exit",t)})})}function ze(t,r,s){var a=re(t.children),o=$e(r,a);return Object.keys(o).forEach(function(n){var i=o[n];if(y.isValidElement(i)){var c=n in r,u=n in a,d=r[n],h=y.isValidElement(d)&&!d.props.in;u&&(!c||h)?o[n]=y.cloneElement(i,{onExited:s.bind(null,i),in:!0,exit:w(i,"exit",t),enter:w(i,"enter",t)}):!u&&c&&!h?o[n]=y.cloneElement(i,{in:!1}):u&&c&&y.isValidElement(d)&&(o[n]=y.cloneElement(i,{onExited:s.bind(null,i),in:d.props.in,exit:w(i,"exit",t),enter:w(i,"enter",t)}))}}),o}var Ke=Object.values||function(t){return Object.keys(t).map(function(r){return t[r]})},Xe={component:"div",childFactory:function(r){return r}},G=function(t){te._inheritsLoose(r,t);function r(a,o){var n;n=t.call(this,a,o)||this;var i=n.handleExited.bind(Ue(n));return n.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},n}var s=r.prototype;return s.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},s.componentWillUnmount=function(){this.mounted=!1},r.getDerivedStateFromProps=function(o,n){var i=n.children,c=n.handleExited,u=n.firstRender;return{children:u?qe(o,c):ze(o,i,c),firstRender:!1}},s.handleExited=function(o,n){var i=re(this.props.children);o.key in i||(o.props.onExited&&o.props.onExited(n),this.mounted&&this.setState(function(c){var u=e._extends({},c.children);return delete u[o.key],{children:u}}))},s.render=function(){var o=this.props,n=o.component,i=o.childFactory,c=e._objectWithoutPropertiesLoose(o,["component","childFactory"]),u=this.state.contextValue,d=Ke(this.state.children).map(i);return delete c.appear,delete c.enter,delete c.exit,n===null?y.createElement(te.TransitionGroupContext.Provider,{value:u},d):y.createElement(te.TransitionGroupContext.Provider,{value:u},y.createElement(n,c,d))},r}(y.Component);G.propTypes=process.env.NODE_ENV!=="production"?{component:e.PropTypes.any,children:e.PropTypes.node,appear:e.PropTypes.bool,enter:e.PropTypes.bool,exit:e.PropTypes.bool,childFactory:e.PropTypes.func}:{};G.defaultProps=Xe;function me(t){const{className:r,classes:s,pulsate:a=!1,rippleX:o,rippleY:n,rippleSize:i,in:c,onExited:u,timeout:d}=t,[h,g]=p.useState(!1),b=e.clsx(r,s.ripple,s.rippleVisible,a&&s.ripplePulsate),C={width:i,height:i,top:-(i/2)+n,left:-(i/2)+o},m=e.clsx(s.child,h&&s.childLeaving,a&&s.childPulsate);return!c&&!h&&g(!0),p.useEffect(()=>{if(!c&&u!=null){const R=setTimeout(u,d);return()=>{clearTimeout(R)}}},[u,c,d]),_.jsx("span",{className:b,style:C,children:_.jsx("span",{className:m})})}process.env.NODE_ENV!=="production"&&(me.propTypes={classes:e.PropTypes.object.isRequired,className:e.PropTypes.string,in:e.PropTypes.bool,onExited:e.PropTypes.func,pulsate:e.PropTypes.bool,rippleSize:e.PropTypes.number,rippleX:e.PropTypes.number,rippleY:e.PropTypes.number,timeout:e.PropTypes.number.isRequired});const T=e.generateUtilityClasses("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Ye=["center","classes","className"];let H=t=>t,pe,de,fe,he;const ne=550,Ae=80,We=oe.keyframes(pe||(pe=H`
|
|
2
|
-
0% {
|
|
3
|
-
transform: scale(0);
|
|
4
|
-
opacity: 0.1;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
100% {
|
|
8
|
-
transform: scale(1);
|
|
9
|
-
opacity: 0.3;
|
|
10
|
-
}
|
|
11
|
-
`)),Ge=oe.keyframes(de||(de=H`
|
|
12
|
-
0% {
|
|
13
|
-
opacity: 1;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
100% {
|
|
17
|
-
opacity: 0;
|
|
18
|
-
}
|
|
19
|
-
`)),He=oe.keyframes(fe||(fe=H`
|
|
20
|
-
0% {
|
|
21
|
-
transform: scale(1);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
50% {
|
|
25
|
-
transform: scale(0.92);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
100% {
|
|
29
|
-
transform: scale(1);
|
|
30
|
-
}
|
|
31
|
-
`)),Je=U.styled("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Qe=U.styled(me,{name:"MuiTouchRipple",slot:"Ripple"})(he||(he=H`
|
|
32
|
-
opacity: 0;
|
|
33
|
-
position: absolute;
|
|
34
|
-
|
|
35
|
-
&.${0} {
|
|
36
|
-
opacity: 0.3;
|
|
37
|
-
transform: scale(1);
|
|
38
|
-
animation-name: ${0};
|
|
39
|
-
animation-duration: ${0}ms;
|
|
40
|
-
animation-timing-function: ${0};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&.${0} {
|
|
44
|
-
animation-duration: ${0}ms;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
& .${0} {
|
|
48
|
-
opacity: 1;
|
|
49
|
-
display: block;
|
|
50
|
-
width: 100%;
|
|
51
|
-
height: 100%;
|
|
52
|
-
border-radius: 50%;
|
|
53
|
-
background-color: currentColor;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
& .${0} {
|
|
57
|
-
opacity: 0;
|
|
58
|
-
animation-name: ${0};
|
|
59
|
-
animation-duration: ${0}ms;
|
|
60
|
-
animation-timing-function: ${0};
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
& .${0} {
|
|
64
|
-
position: absolute;
|
|
65
|
-
/* @noflip */
|
|
66
|
-
left: 0px;
|
|
67
|
-
top: 0;
|
|
68
|
-
animation-name: ${0};
|
|
69
|
-
animation-duration: 2500ms;
|
|
70
|
-
animation-timing-function: ${0};
|
|
71
|
-
animation-iteration-count: infinite;
|
|
72
|
-
animation-delay: 200ms;
|
|
73
|
-
}
|
|
74
|
-
`),T.rippleVisible,We,ne,({theme:t})=>t.transitions.easing.easeInOut,T.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,T.child,T.childLeaving,Ge,ne,({theme:t})=>t.transitions.easing.easeInOut,T.childPulsate,He,({theme:t})=>t.transitions.easing.easeInOut),ye=p.forwardRef(function(r,s){const a=U.useDefaultProps({props:r,name:"MuiTouchRipple"}),{center:o=!1,classes:n={},className:i}=a,c=e._objectWithoutPropertiesLoose(a,Ye),[u,d]=p.useState([]),h=p.useRef(0),g=p.useRef(null);p.useEffect(()=>{g.current&&(g.current(),g.current=null)},[u]);const b=p.useRef(!1),C=Y.useTimeout(),m=p.useRef(null),R=p.useRef(null),$=p.useCallback(f=>{const{pulsate:x,rippleX:M,rippleY:S,rippleSize:I,cb:z}=f;d(E=>[...E,_.jsx(Qe,{classes:{ripple:e.clsx(n.ripple,T.ripple),rippleVisible:e.clsx(n.rippleVisible,T.rippleVisible),ripplePulsate:e.clsx(n.ripplePulsate,T.ripplePulsate),child:e.clsx(n.child,T.child),childLeaving:e.clsx(n.childLeaving,T.childLeaving),childPulsate:e.clsx(n.childPulsate,T.childPulsate)},timeout:ne,pulsate:x,rippleX:M,rippleY:S,rippleSize:I},h.current)]),h.current+=1,g.current=z},[n]),F=p.useCallback((f={},x={},M=()=>{})=>{const{pulsate:S=!1,center:I=o||x.pulsate,fakeElement:z=!1}=x;if((f==null?void 0:f.type)==="mousedown"&&b.current){b.current=!1;return}(f==null?void 0:f.type)==="touchstart"&&(b.current=!0);const E=z?null:R.current,N=E?E.getBoundingClientRect():{width:0,height:0,left:0,top:0};let v,k,B;if(I||f===void 0||f.clientX===0&&f.clientY===0||!f.clientX&&!f.touches)v=Math.round(N.width/2),k=Math.round(N.height/2);else{const{clientX:j,clientY:V}=f.touches&&f.touches.length>0?f.touches[0]:f;v=Math.round(j-N.left),k=Math.round(V-N.top)}if(I)B=Math.sqrt((2*N.width**2+N.height**2)/3),B%2===0&&(B+=1);else{const j=Math.max(Math.abs((E?E.clientWidth:0)-v),v)*2+2,V=Math.max(Math.abs((E?E.clientHeight:0)-k),k)*2+2;B=Math.sqrt(j**2+V**2)}f!=null&&f.touches?m.current===null&&(m.current=()=>{$({pulsate:S,rippleX:v,rippleY:k,rippleSize:B,cb:M})},C.start(Ae,()=>{m.current&&(m.current(),m.current=null)})):$({pulsate:S,rippleX:v,rippleY:k,rippleSize:B,cb:M})},[o,$,C]),q=p.useCallback(()=>{F({},{pulsate:!0})},[F]),O=p.useCallback((f,x)=>{if(C.clear(),(f==null?void 0:f.type)==="touchend"&&m.current){m.current(),m.current=null,C.start(0,()=>{O(f,x)});return}m.current=null,d(M=>M.length>0?M.slice(1):M),g.current=x},[C]);return p.useImperativeHandle(s,()=>({pulsate:q,start:F,stop:O}),[q,F,O]),_.jsx(Je,e._extends({className:e.clsx(T.root,n.root,i),ref:R},c,{children:_.jsx(G,{component:null,exit:!0,children:u})}))});process.env.NODE_ENV!=="production"&&(ye.propTypes={center:e.PropTypes.bool,classes:e.PropTypes.object,className:e.PropTypes.string});function Ze(t){return e.generateUtilityClass("MuiButtonBase",t)}const et=e.generateUtilityClasses("MuiButtonBase",["root","disabled","focusVisible"]),tt=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],nt=t=>{const{disabled:r,focusVisible:s,focusVisibleClassName:a,classes:o}=t,n={root:["root",r&&"disabled",s&&"focusVisible"]},i=U.composeClasses(n,Ze,o);return s&&a&&(i.root+=` ${a}`),i},ot=U.styled("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,r)=>r.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${et.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Te=p.forwardRef(function(r,s){const a=U.useDefaultProps({props:r,name:"MuiButtonBase"}),{action:o,centerRipple:n=!1,children:i,className:c,component:u="button",disabled:d=!1,disableRipple:h=!1,disableTouchRipple:g=!1,focusRipple:b=!1,LinkComponent:C="a",onBlur:m,onClick:R,onContextMenu:$,onDragLeave:F,onFocus:q,onFocusVisible:O,onKeyDown:f,onKeyUp:x,onMouseDown:M,onMouseLeave:S,onMouseUp:I,onTouchEnd:z,onTouchMove:E,onTouchStart:N,tabIndex:v=0,TouchRippleProps:k,touchRippleRef:B,type:j}=a,V=e._objectWithoutPropertiesLoose(a,tt),K=p.useRef(null),P=p.useRef(null),be=ue.useForkRef(P,B),{isFocusVisibleRef:se,onFocus:Pe,onBlur:ge,ref:Re}=Oe.useIsFocusVisible(),[L,A]=p.useState(!1);d&&L&&A(!1),p.useImperativeHandle(o,()=>({focusVisible:()=>{A(!0),K.current.focus()}}),[]);const[J,xe]=p.useState(!1);p.useEffect(()=>{xe(!0)},[]);const Q=J&&!h&&!d;p.useEffect(()=>{L&&b&&!h&&J&&P.current.pulsate()},[h,b,L,J]);function D(l,le,Fe=g){return Y.useEventCallback(ae=>(le&&le(ae),!Fe&&P.current&&P.current[l](ae),!0))}const Me=D("start",M),Ee=D("stop",$),Ce=D("stop",F),ve=D("stop",I),Ve=D("stop",l=>{L&&l.preventDefault(),S&&S(l)}),De=D("start",N),Ne=D("stop",z),ke=D("stop",E),Be=D("stop",l=>{ge(l),se.current===!1&&A(!1),m&&m(l)},!1),Se=Y.useEventCallback(l=>{K.current||(K.current=l.currentTarget),Pe(l),se.current===!0&&(A(!0),O&&O(l)),q&&q(l)}),Z=()=>{const l=K.current;return u&&u!=="button"&&!(l.tagName==="A"&&l.href)},ee=p.useRef(!1),je=Y.useEventCallback(l=>{b&&!ee.current&&L&&P.current&&l.key===" "&&(ee.current=!0,P.current.stop(l,()=>{P.current.start(l)})),l.target===l.currentTarget&&Z()&&l.key===" "&&l.preventDefault(),f&&f(l),l.target===l.currentTarget&&Z()&&l.key==="Enter"&&!d&&(l.preventDefault(),R&&R(l))}),Le=Y.useEventCallback(l=>{b&&l.key===" "&&P.current&&L&&!l.defaultPrevented&&(ee.current=!1,P.current.stop(l,()=>{P.current.pulsate(l)})),x&&x(l),R&&l.target===l.currentTarget&&Z()&&l.key===" "&&!l.defaultPrevented&&R(l)});let W=u;W==="button"&&(V.href||V.to)&&(W=C);const X={};W==="button"?(X.type=j===void 0?"button":j,X.disabled=d):(!V.href&&!V.to&&(X.role="button"),d&&(X["aria-disabled"]=d));const we=ue.useForkRef(s,Re,K);process.env.NODE_ENV!=="production"&&p.useEffect(()=>{Q&&!P.current&&console.error(["MUI: The `component` prop provided to ButtonBase is invalid.","Please make sure the children prop is rendered in this custom component."].join(`
|
|
75
|
-
`))},[Q]);const ie=e._extends({},a,{centerRipple:n,component:u,disabled:d,disableRipple:h,disableTouchRipple:g,focusRipple:b,tabIndex:v,focusVisible:L}),_e=nt(ie);return _.jsxs(ot,e._extends({as:W,className:e.clsx(_e.root,c),ownerState:ie,onBlur:Be,onClick:R,onContextMenu:Ee,onFocus:Se,onKeyDown:je,onKeyUp:Le,onMouseDown:Me,onMouseLeave:Ve,onMouseUp:ve,onDragLeave:Ce,onTouchEnd:Ne,onTouchMove:ke,onTouchStart:De,ref:we,tabIndex:d?-1:v,type:j},X,V,{children:[i,Q?_.jsx(ye,e._extends({ref:be,center:n},k)):null]}))});process.env.NODE_ENV!=="production"&&(Te.propTypes={action:ce.refType,centerRipple:e.PropTypes.bool,children:e.PropTypes.node,classes:e.PropTypes.object,className:e.PropTypes.string,component:ce.elementTypeAcceptingRef,disabled:e.PropTypes.bool,disableRipple:e.PropTypes.bool,disableTouchRipple:e.PropTypes.bool,focusRipple:e.PropTypes.bool,focusVisibleClassName:e.PropTypes.string,href:e.PropTypes.any,LinkComponent:e.PropTypes.elementType,onBlur:e.PropTypes.func,onClick:e.PropTypes.func,onContextMenu:e.PropTypes.func,onDragLeave:e.PropTypes.func,onFocus:e.PropTypes.func,onFocusVisible:e.PropTypes.func,onKeyDown:e.PropTypes.func,onKeyUp:e.PropTypes.func,onMouseDown:e.PropTypes.func,onMouseLeave:e.PropTypes.func,onMouseUp:e.PropTypes.func,onTouchEnd:e.PropTypes.func,onTouchMove:e.PropTypes.func,onTouchStart:e.PropTypes.func,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]),tabIndex:e.PropTypes.number,TouchRippleProps:e.PropTypes.object,touchRippleRef:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.shape({current:e.PropTypes.shape({pulsate:e.PropTypes.func.isRequired,start:e.PropTypes.func.isRequired,stop:e.PropTypes.func.isRequired})})]),type:e.PropTypes.oneOfType([e.PropTypes.oneOf(["button","reset","submit"]),e.PropTypes.string])});exports.ButtonBase=Te;exports.TransitionGroup=G;
|