@cgi-learning-hub/ui 0.0.1-dev.1709568003 → 0.0.1-dev.1709569638
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-erN4AuKs.js → Box-C0qXdJzV.js} +8 -8
- package/dist/Box-DjRIKMD0.cjs +1 -0
- package/dist/ButtonBase-BvllyU4w.cjs +75 -0
- package/dist/ButtonBase-C14ZYs6z.js +833 -0
- package/dist/CircularProgress-Bf46-VRs.js +217 -0
- package/dist/CircularProgress-DjSMBYnK.cjs +28 -0
- package/dist/{DefaultButton-DbpZOb47.js → DefaultButton-B-2UppUm.js} +146 -355
- package/dist/DefaultButton-DPZOltN5.cjs +1 -0
- package/dist/{IconButton-DE5JOshS.js → IconButton-1URziYlU.js} +8 -8
- package/dist/IconButton-X6l-U-im.cjs +2 -0
- package/dist/InputBase-BrkAyp4z.cjs +4 -0
- package/dist/{InputBase-C8AzQJJ9.js → InputBase-D_wYPpmB.js} +173 -160
- package/dist/{LocalizationProvider-Cov62Xe0.js → LocalizationProvider-BD64DNxF.js} +3 -4
- package/dist/LocalizationProvider-DqwEOZOd.cjs +5 -0
- package/dist/SearchInput-CMLDZJ8k.cjs +1 -0
- package/dist/SearchInput-D2HnePqk.js +177 -0
- package/dist/Tabs-B9BPJaDx.js +1090 -0
- package/dist/Tabs-Dx8YJT4c.cjs +4 -0
- package/dist/TextInput-BO1q4hT2.cjs +12 -0
- package/dist/{TextInput-DmMk4i-V.js → TextInput-DiA3Q5CJ.js} +1353 -1594
- package/dist/TimePicker-CBI_tdzH.js +19695 -0
- package/dist/TimePicker-CnW0kylk.cjs +69 -0
- package/dist/Typography-CRt6WSxo.js +204 -0
- package/dist/Typography-DsPQABF2.cjs +1 -0
- package/dist/components/Dropzone/Dropzone.cjs.js +5 -5
- package/dist/components/Dropzone/Dropzone.es.js +11 -12
- package/dist/components/LocalizationProvider/LocalizationProvider.cjs.js +1 -1
- package/dist/components/LocalizationProvider/LocalizationProvider.es.js +1 -1
- package/dist/components/LocalizationProvider/index.cjs.js +1 -1
- package/dist/components/LocalizationProvider/index.es.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +3 -3
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +6 -6
- package/dist/components/buttons/DefaultButton/index.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/index.es.js +1 -1
- package/dist/components/buttons/IconButton.stories.cjs.js +1 -1
- package/dist/components/buttons/IconButton.stories.es.js +9 -10
- package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +2 -2
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +2 -2
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +1 -1
- package/dist/components/buttons/index.cjs.js +1 -1
- package/dist/components/buttons/index.es.js +1 -1
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.es.js +91 -90
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.es.js +6 -174
- package/dist/components/inputs/SearchInput/SearchInput.stories.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.stories.es.js +4 -4
- package/dist/components/inputs/SearchInput/index.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/index.es.js +2 -2
- package/dist/components/inputs/TextInput/TextInput.cjs.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.es.js +2 -2
- package/dist/components/inputs/TextInput/TextInput.stories.cjs.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.stories.es.js +1 -1
- package/dist/components/inputs/TextInput/index.cjs.js +1 -1
- package/dist/components/inputs/TextInput/index.es.js +1 -1
- package/dist/components/inputs/index.cjs.js +1 -1
- package/dist/components/inputs/index.es.js +4 -4
- package/dist/components/lists/FileList/FileList.cjs.js +1 -1
- package/dist/components/lists/FileList/FileList.es.js +2 -2
- package/dist/components/lists/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/lists/FileList/FileListItem.es.js +39 -7
- package/dist/components/lists/FileList/index.cjs.js +1 -1
- package/dist/components/lists/FileList/index.es.js +4 -4
- package/dist/components/lists/TabList.stories.cjs.js +1 -1
- package/dist/components/lists/TabList.stories.es.js +16 -18
- package/dist/components/lists/index.cjs.js +1 -1
- package/dist/components/lists/index.es.js +4 -4
- package/dist/createSvgIcon-BOQCM03y.cjs +2 -0
- package/dist/createSvgIcon-C2VxBqzG.cjs +1 -0
- package/dist/{createSvgIcon-DeRU4e-L.js → createSvgIcon-Dspfpz-l.js} +18 -20
- package/dist/createSvgIcon-xJp3_zwo.js +84 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +94 -93
- package/dist/isHostComponent-PydJW4A4.cjs +1 -0
- package/dist/isHostComponent-kiaBvYVo.js +6 -0
- package/dist/refType-5EEBZL5_.cjs +1 -0
- package/dist/{refType-CoCfCK--.js → refType-BBFUe6fu.js} +1 -1
- package/dist/styled-D8lXwcQy.js +423 -0
- package/dist/styled-DFoJwRxe.cjs +24 -0
- package/dist/useSlotProps-BoMYRJkF.js +72 -0
- package/dist/useSlotProps-EKKRQjEn.cjs +1 -0
- package/dist/useTheme-BkW5nNsn.cjs +1 -0
- package/dist/useTheme-Bo1inEHN.js +9 -0
- package/dist/useThemeProps-BRWSvuZw.cjs +42 -0
- package/dist/useThemeProps-CZzcR_pm.js +2288 -0
- package/package.json +5 -2
- package/dist/Box-CjHm9A9L.cjs +0 -1
- package/dist/ButtonBase-BybMkBUd.cjs +0 -75
- package/dist/ButtonBase-CGcs8Gbj.cjs +0 -75
- package/dist/ButtonBase-V1pwsMMs.js +0 -649
- package/dist/ButtonBase-aujiNoUb.js +0 -649
- package/dist/DefaultButton-Cg4tPCgf.cjs +0 -28
- package/dist/FileListItem-ChKTjDnV.js +0 -254
- package/dist/FileListItem-CjFIZgYg.cjs +0 -28
- package/dist/IconButton-CHXclgOn.cjs +0 -2
- package/dist/InputBase-D6eXzDaz.cjs +0 -4
- package/dist/LocalizationProvider-42pD7VmS.cjs +0 -5
- package/dist/Tabs-DiWeNGD4.js +0 -1167
- package/dist/Tabs-DoxP7EMA.cjs +0 -4
- package/dist/TextInput-BbSyyuvO.cjs +0 -12
- package/dist/TimePicker-B5MjZCK0.cjs +0 -89
- package/dist/TimePicker-BmxG3a2D.js +0 -28354
- package/dist/TransitionGroup-COuDopJ-.js +0 -188
- package/dist/TransitionGroup-X90dkobW.cjs +0 -1
- package/dist/Typography-B90UzlQW.js +0 -179
- package/dist/Typography-KFjBz5Hm.cjs +0 -1
- package/dist/clamp-0LjYbpE_.cjs +0 -23
- package/dist/clamp-BGJvJ0FN.js +0 -1641
- package/dist/createSvgIcon-BSYat4nx.js +0 -74
- package/dist/createSvgIcon-BqRWmIPG.cjs +0 -1
- package/dist/createSvgIcon-doNQ5emq.cjs +0 -2
- package/dist/refType-Bt58K9Sk.cjs +0 -1
- package/dist/styled-BU8dAebc.js +0 -1751
- package/dist/styled-DGjsLYEN.cjs +0 -45
- package/dist/styled-DP6LeBLQ.js +0 -261
- package/dist/styled-Dkd1VGM-.cjs +0 -1
- package/dist/useTheme-C132tQV-.js +0 -10
- package/dist/useTheme-CliHZTkE.cjs +0 -1
- package/dist/useThemeProps-63SNG58r.js +0 -753
- package/dist/useThemeProps-CVatCXfo.cjs +0 -20
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { s as h, u as T,
|
|
2
|
-
import {
|
|
1
|
+
import { s as h, u as T, e as B, _ as N, f as y, T as C, C as b, P as e } from "./useThemeProps-CZzcR_pm.js";
|
|
2
|
+
import { b as _, c as P, g } from "./styled-D8lXwcQy.js";
|
|
3
3
|
import * as j from "react";
|
|
4
4
|
import { jsx as v } from "react/jsx-runtime";
|
|
5
|
-
import { e as E } from "./
|
|
5
|
+
import { e as E } from "./Typography-CRt6WSxo.js";
|
|
6
6
|
const O = ["className", "component"];
|
|
7
7
|
function I(m = {}) {
|
|
8
8
|
const {
|
|
@@ -10,7 +10,7 @@ function I(m = {}) {
|
|
|
10
10
|
defaultTheme: l,
|
|
11
11
|
defaultClassName: a = "MuiBox-root",
|
|
12
12
|
generateClassName: n
|
|
13
|
-
} = m, x =
|
|
13
|
+
} = m, x = _("div", {
|
|
14
14
|
shouldForwardProp: (o) => o !== "theme" && o !== "sx" && o !== "as"
|
|
15
15
|
})(h);
|
|
16
16
|
return /* @__PURE__ */ j.forwardRef(function(d, f) {
|
|
@@ -21,16 +21,16 @@ function I(m = {}) {
|
|
|
21
21
|
return /* @__PURE__ */ v(x, N({
|
|
22
22
|
as: p,
|
|
23
23
|
ref: f,
|
|
24
|
-
className:
|
|
24
|
+
className: P(i, n ? n(a) : a),
|
|
25
25
|
theme: t && s[t] || s
|
|
26
26
|
}, u));
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
-
const M =
|
|
30
|
-
themeId:
|
|
29
|
+
const M = g("MuiBox", ["root"]), R = M, S = y(), c = I({
|
|
30
|
+
themeId: C,
|
|
31
31
|
defaultTheme: S,
|
|
32
32
|
defaultClassName: R.root,
|
|
33
|
-
generateClassName:
|
|
33
|
+
generateClassName: b.generate
|
|
34
34
|
});
|
|
35
35
|
process.env.NODE_ENV !== "production" && (c.propTypes = {
|
|
36
36
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./useThemeProps-BRWSvuZw.cjs"),a=require("./styled-DFoJwRxe.cjs"),T=require("react"),P=require("react/jsx-runtime"),h=require("./Typography-DsPQABF2.cjs");function b(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const s in o)if(s!=="default"){const r=Object.getOwnPropertyDescriptor(o,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:()=>o[s]})}}return t.default=o,Object.freeze(t)}const N=b(T),g=["className","component"];function B(o={}){const{themeId:t,defaultTheme:s,defaultClassName:r="MuiBox-root",generateClassName:p}=o,i=a.styled$1("div",{shouldForwardProp:n=>n!=="theme"&&n!=="sx"&&n!=="as"})(e.styleFunctionSx);return N.forwardRef(function(d,m){const c=e.useTheme(s),u=h.extendSxProp(d),{className:y,component:f="div"}=u,x=e._objectWithoutPropertiesLoose(u,g);return P.jsx(i,e._extends({as:f,ref:m,className:a.clsx(y,p?p(r):r),theme:t&&c[t]||c},x))})}const O=a.generateUtilityClasses("MuiBox",["root"]),_=O,j=e.createTheme(),l=B({themeId:e.THEME_ID,defaultTheme:j,defaultClassName:_.root,generateClassName:e.ClassNameGenerator.generate});process.env.NODE_ENV!=="production"&&(l.propTypes={children:e.PropTypes.node,component:e.PropTypes.elementType,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])});const C=l;exports.Box=C;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";const e=require("./useThemeProps-BRWSvuZw.cjs"),T=require("react"),m=require("./styled-DFoJwRxe.cjs"),F=require("react/jsx-runtime"),Y=require("./useTimeout-DHarDhEH.cjs"),ee=require("./TransitionGroupContext-g4tmk10h.cjs"),ne=require("@emotion/react"),ue=require("./useForkRef-DfdM2MN5.cjs"),$e=require("./useIsFocusVisible-9FderFRK.cjs"),ce=require("./refType-5EEBZL5_.cjs");function Ie(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(s,r,a.get?a:{enumerable:!0,get:()=>t[r]})}}return s.default=t,Object.freeze(s)}const p=Ie(T);function Ue(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function oe(t,s){var r=function(n){return s&&T.isValidElement(n)?s(n):n},a=Object.create(null);return t&&T.Children.map(t,function(o){return o}).forEach(function(o){a[o.key]=r(o)}),a}function qe(t,s){t=t||{},s=s||{};function r(h){return h in s?s[h]:t[h]}var a=Object.create(null),o=[];for(var n in t)n in s?o.length&&(a[n]=o,o=[]):o.push(n);var i,c={};for(var u in s){if(a[u])for(i=0;i<a[u].length;i++){var d=a[u][i];c[a[u][i]]=r(d)}c[u]=r(u)}for(i=0;i<o.length;i++)c[o[i]]=r(o[i]);return c}function _(t,s,r){return r[s]!=null?r[s]:t.props[s]}function ze(t,s){return oe(t.children,function(r){return T.cloneElement(r,{onExited:s.bind(null,r),in:!0,appear:_(r,"appear",t),enter:_(r,"enter",t),exit:_(r,"exit",t)})})}function Ke(t,s,r){var a=oe(t.children),o=qe(s,a);return Object.keys(o).forEach(function(n){var i=o[n];if(T.isValidElement(i)){var c=n in s,u=n in a,d=s[n],h=T.isValidElement(d)&&!d.props.in;u&&(!c||h)?o[n]=T.cloneElement(i,{onExited:r.bind(null,i),in:!0,exit:_(i,"exit",t),enter:_(i,"enter",t)}):!u&&c&&!h?o[n]=T.cloneElement(i,{in:!1}):u&&c&&T.isValidElement(d)&&(o[n]=T.cloneElement(i,{onExited:r.bind(null,i),in:d.props.in,exit:_(i,"exit",t),enter:_(i,"enter",t)}))}}),o}var Xe=Object.values||function(t){return Object.keys(t).map(function(s){return t[s]})},Ye={component:"div",childFactory:function(s){return s}},se=function(t){ee._inheritsLoose(s,t);function s(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 r=s.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},s.getDerivedStateFromProps=function(o,n){var i=n.children,c=n.handleExited,u=n.firstRender;return{children:u?ze(o,c):Ke(o,i,c),firstRender:!1}},r.handleExited=function(o,n){var i=oe(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}}))},r.render=function(){var o=this.props,n=o.component,i=o.childFactory,c=e._objectWithoutPropertiesLoose(o,["component","childFactory"]),u=this.state.contextValue,d=Xe(this.state.children).map(i);return delete c.appear,delete c.enter,delete c.exit,n===null?T.createElement(ee.TransitionGroupContext.Provider,{value:u},d):T.createElement(ee.TransitionGroupContext.Provider,{value:u},T.createElement(n,c,d))},s}(T.Component);se.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}:{};se.defaultProps=Ye;const me=se;function ye(t){const{className:s,classes:r,pulsate:a=!1,rippleX:o,rippleY:n,rippleSize:i,in:c,onExited:u,timeout:d}=t,[h,R]=p.useState(!1),P=m.clsx(s,r.ripple,r.rippleVisible,a&&r.ripplePulsate),v={width:i,height:i,top:-(i/2)+n,left:-(i/2)+o},y=m.clsx(r.child,h&&r.childLeaving,a&&r.childPulsate);return!c&&!h&&R(!0),p.useEffect(()=>{if(!c&&u!=null){const x=setTimeout(u,d);return()=>{clearTimeout(x)}}},[u,c,d]),F.jsx("span",{className:P,style:v,children:F.jsx("span",{className:y})})}process.env.NODE_ENV!=="production"&&(ye.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 b=m.generateUtilityClasses("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Ae=["center","classes","className"];let G=t=>t,pe,de,fe,he;const te=550,We=80,Ge=ne.keyframes(pe||(pe=G`
|
|
2
|
+
0% {
|
|
3
|
+
transform: scale(0);
|
|
4
|
+
opacity: 0.1;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
100% {
|
|
8
|
+
transform: scale(1);
|
|
9
|
+
opacity: 0.3;
|
|
10
|
+
}
|
|
11
|
+
`)),He=ne.keyframes(de||(de=G`
|
|
12
|
+
0% {
|
|
13
|
+
opacity: 1;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
100% {
|
|
17
|
+
opacity: 0;
|
|
18
|
+
}
|
|
19
|
+
`)),Je=ne.keyframes(fe||(fe=G`
|
|
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
|
+
`)),Qe=m.styled("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Ze=m.styled(ye,{name:"MuiTouchRipple",slot:"Ripple"})(he||(he=G`
|
|
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
|
+
`),b.rippleVisible,Ge,te,({theme:t})=>t.transitions.easing.easeInOut,b.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,b.child,b.childLeaving,He,te,({theme:t})=>t.transitions.easing.easeInOut,b.childPulsate,Je,({theme:t})=>t.transitions.easing.easeInOut),Te=p.forwardRef(function(s,r){const a=e.useThemeProps({props:s,name:"MuiTouchRipple"}),{center:o=!1,classes:n={},className:i}=a,c=e._objectWithoutPropertiesLoose(a,Ae),[u,d]=p.useState([]),h=p.useRef(0),R=p.useRef(null);p.useEffect(()=>{R.current&&(R.current(),R.current=null)},[u]);const P=p.useRef(!1),v=Y.useTimeout(),y=p.useRef(null),x=p.useRef(null),U=p.useCallback(f=>{const{pulsate:M,rippleX:E,rippleY:j,rippleSize:I,cb:z}=f;d(C=>[...C,F.jsx(Ze,{classes:{ripple:m.clsx(n.ripple,b.ripple),rippleVisible:m.clsx(n.rippleVisible,b.rippleVisible),ripplePulsate:m.clsx(n.ripplePulsate,b.ripplePulsate),child:m.clsx(n.child,b.child),childLeaving:m.clsx(n.childLeaving,b.childLeaving),childPulsate:m.clsx(n.childPulsate,b.childPulsate)},timeout:te,pulsate:M,rippleX:E,rippleY:j,rippleSize:I},h.current)]),h.current+=1,R.current=z},[n]),O=p.useCallback((f={},M={},E=()=>{})=>{const{pulsate:j=!1,center:I=o||M.pulsate,fakeElement:z=!1}=M;if((f==null?void 0:f.type)==="mousedown"&&P.current){P.current=!1;return}(f==null?void 0:f.type)==="touchstart"&&(P.current=!0);const C=z?null:x.current,k=C?C.getBoundingClientRect():{width:0,height:0,left:0,top:0};let V,B,S;if(I||f===void 0||f.clientX===0&&f.clientY===0||!f.clientX&&!f.touches)V=Math.round(k.width/2),B=Math.round(k.height/2);else{const{clientX:L,clientY:N}=f.touches&&f.touches.length>0?f.touches[0]:f;V=Math.round(L-k.left),B=Math.round(N-k.top)}if(I)S=Math.sqrt((2*k.width**2+k.height**2)/3),S%2===0&&(S+=1);else{const L=Math.max(Math.abs((C?C.clientWidth:0)-V),V)*2+2,N=Math.max(Math.abs((C?C.clientHeight:0)-B),B)*2+2;S=Math.sqrt(L**2+N**2)}f!=null&&f.touches?y.current===null&&(y.current=()=>{U({pulsate:j,rippleX:V,rippleY:B,rippleSize:S,cb:E})},v.start(We,()=>{y.current&&(y.current(),y.current=null)})):U({pulsate:j,rippleX:V,rippleY:B,rippleSize:S,cb:E})},[o,U,v]),q=p.useCallback(()=>{O({},{pulsate:!0})},[O]),$=p.useCallback((f,M)=>{if(v.clear(),(f==null?void 0:f.type)==="touchend"&&y.current){y.current(),y.current=null,v.start(0,()=>{$(f,M)});return}y.current=null,d(E=>E.length>0?E.slice(1):E),R.current=M},[v]);return p.useImperativeHandle(r,()=>({pulsate:q,start:O,stop:$}),[q,O,$]),F.jsx(Qe,e._extends({className:m.clsx(b.root,n.root,i),ref:x},c,{children:F.jsx(me,{component:null,exit:!0,children:u})}))});process.env.NODE_ENV!=="production"&&(Te.propTypes={center:e.PropTypes.bool,classes:e.PropTypes.object,className:e.PropTypes.string});const et=Te;function tt(t){return e.generateUtilityClass("MuiButtonBase",t)}const nt=m.generateUtilityClasses("MuiButtonBase",["root","disabled","focusVisible"]),ot=["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"],st=t=>{const{disabled:s,focusVisible:r,focusVisibleClassName:a,classes:o}=t,n={root:["root",s&&"disabled",r&&"focusVisible"]},i=m.composeClasses(n,tt,o);return r&&a&&(i.root+=` ${a}`),i},rt=m.styled("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,s)=>s.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"},[`&.${nt.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),be=p.forwardRef(function(s,r){const a=e.useThemeProps({props:s,name:"MuiButtonBase"}),{action:o,centerRipple:n=!1,children:i,className:c,component:u="button",disabled:d=!1,disableRipple:h=!1,disableTouchRipple:R=!1,focusRipple:P=!1,LinkComponent:v="a",onBlur:y,onClick:x,onContextMenu:U,onDragLeave:O,onFocus:q,onFocusVisible:$,onKeyDown:f,onKeyUp:M,onMouseDown:E,onMouseLeave:j,onMouseUp:I,onTouchEnd:z,onTouchMove:C,onTouchStart:k,tabIndex:V=0,TouchRippleProps:B,touchRippleRef:S,type:L}=a,N=e._objectWithoutPropertiesLoose(a,ot),K=p.useRef(null),g=p.useRef(null),Pe=ue.useForkRef(g,S),{isFocusVisibleRef:re,onFocus:ge,onBlur:Re,ref:xe}=$e.useIsFocusVisible(),[w,A]=p.useState(!1);d&&w&&A(!1),p.useImperativeHandle(o,()=>({focusVisible:()=>{A(!0),K.current.focus()}}),[]);const[H,Me]=p.useState(!1);p.useEffect(()=>{Me(!0)},[]);const J=H&&!h&&!d;p.useEffect(()=>{w&&P&&!h&&H&&g.current.pulsate()},[h,P,w,H]);function D(l,le,Oe=R){return Y.useEventCallback(ae=>(le&&le(ae),!Oe&&g.current&&g.current[l](ae),!0))}const Ee=D("start",E),Ce=D("stop",U),ve=D("stop",O),Ve=D("stop",I),Ne=D("stop",l=>{w&&l.preventDefault(),j&&j(l)}),De=D("start",k),ke=D("stop",z),Be=D("stop",C),Se=D("stop",l=>{Re(l),re.current===!1&&A(!1),y&&y(l)},!1),je=Y.useEventCallback(l=>{K.current||(K.current=l.currentTarget),ge(l),re.current===!0&&(A(!0),$&&$(l)),q&&q(l)}),Q=()=>{const l=K.current;return u&&u!=="button"&&!(l.tagName==="A"&&l.href)},Z=p.useRef(!1),Le=Y.useEventCallback(l=>{P&&!Z.current&&w&&g.current&&l.key===" "&&(Z.current=!0,g.current.stop(l,()=>{g.current.start(l)})),l.target===l.currentTarget&&Q()&&l.key===" "&&l.preventDefault(),f&&f(l),l.target===l.currentTarget&&Q()&&l.key==="Enter"&&!d&&(l.preventDefault(),x&&x(l))}),we=Y.useEventCallback(l=>{P&&l.key===" "&&g.current&&w&&!l.defaultPrevented&&(Z.current=!1,g.current.stop(l,()=>{g.current.pulsate(l)})),M&&M(l),x&&l.target===l.currentTarget&&Q()&&l.key===" "&&!l.defaultPrevented&&x(l)});let W=u;W==="button"&&(N.href||N.to)&&(W=v);const X={};W==="button"?(X.type=L===void 0?"button":L,X.disabled=d):(!N.href&&!N.to&&(X.role="button"),d&&(X["aria-disabled"]=d));const _e=ue.useForkRef(r,xe,K);process.env.NODE_ENV!=="production"&&p.useEffect(()=>{J&&!g.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
|
+
`))},[J]);const ie=e._extends({},a,{centerRipple:n,component:u,disabled:d,disableRipple:h,disableTouchRipple:R,focusRipple:P,tabIndex:V,focusVisible:w}),Fe=st(ie);return F.jsxs(rt,e._extends({as:W,className:m.clsx(Fe.root,c),ownerState:ie,onBlur:Se,onClick:x,onContextMenu:Ce,onFocus:je,onKeyDown:Le,onKeyUp:we,onMouseDown:Ee,onMouseLeave:Ne,onMouseUp:Ve,onDragLeave:ve,onTouchEnd:ke,onTouchMove:Be,onTouchStart:De,ref:_e,tabIndex:d?-1:V,type:L},X,N,{children:[i,J?F.jsx(et,e._extends({ref:Pe,center:n},B)):null]}))});process.env.NODE_ENV!=="production"&&(be.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])});const it=be;exports.ButtonBase=it;exports.TransitionGroup=me;
|