@cgi-learning-hub/ui 1.2.0-dev.1725006670 → 1.2.0-dev.1725450842
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-BJvmuM0Y.js → Box-B6xx2g1Y.js} +32 -30
- package/dist/Box-P3WhGgSH.cjs +1 -0
- package/dist/Button-BlSyZq45.js +454 -0
- package/dist/Button-CZO3I5oS.cjs +1 -0
- package/dist/ButtonBase-C-IxZjoy.cjs +75 -0
- package/dist/ButtonBase-Mr4S_NG8.js +890 -0
- package/dist/CircularProgress-D1dO7At_.cjs +28 -0
- package/dist/CircularProgress-bltZBt14.js +251 -0
- package/dist/DatePicker-B8FaO6N3.cjs +19 -0
- package/dist/{DatePicker-xLT3dl8F.js → DatePicker-BM4qYpPt.js} +3809 -3722
- package/dist/DefaultButton-BbTf0WK8.cjs +1 -0
- package/dist/{DefaultButton-CKY6tuni.js → DefaultButton-Crs2UW2V.js} +95 -75
- package/dist/DefaultPropsProvider-BDdV3S11.js +468 -0
- package/dist/DefaultPropsProvider-DwweZ7qj.cjs +17 -0
- package/dist/IconButton-8pelIq63.cjs +2 -0
- package/dist/IconButton-DeGwRNnI.js +239 -0
- package/dist/InputAdornment-BhrFtLIz.cjs +1 -0
- package/dist/{InputAdornment-zaw7AFWU.js → InputAdornment-Dd24Ymt-.js} +81 -65
- package/dist/InputBase-BUzAEUpC.js +802 -0
- package/dist/InputBase-OefmcFzX.cjs +3 -0
- package/dist/Stack-BnpqP5GW.cjs +1 -0
- package/dist/{Stack-Dlgk5t_M.js → Stack-D_hQlRGm.js} +62 -60
- package/dist/Tabs-BqbRbRmo.cjs +4 -0
- package/dist/Tabs-D0SZWveL.js +1222 -0
- package/dist/TextField-DXEOL4uC.cjs +12 -0
- package/dist/{TextField-DG1754qQ.js → TextField-cX-VBTii.js} +3033 -2408
- package/dist/{Tooltip-BjTwTSrD.js → Tooltip-B3_y8U1N.js} +4682 -3406
- package/dist/Tooltip-DiglEjt6.cjs +100 -0
- package/dist/TransitionGroupContext-LWgXgADB.cjs +1 -0
- package/dist/TransitionGroupContext-SbAHUhOx.js +64 -0
- package/dist/Typography-DWgJpyZG.cjs +1 -0
- package/dist/Typography-kwaQt8VQ.js +258 -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.d.ts +3 -1
- package/dist/components/PaperHeader/PaperHeader.es.js +26 -28
- 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 +62 -59
- 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/createSvgIcon-BNfyXTi3.cjs +2 -0
- package/dist/createSvgIcon-BwYG_otT.js +249 -0
- package/dist/createSvgIcon-DIHNjNhw.js +88 -0
- package/dist/createSvgIcon-DMxj0zKp.cjs +1 -0
- package/dist/extendSxProp-BkIEJBCN.js +37 -0
- package/dist/extendSxProp-DhEbeVWY.cjs +1 -0
- package/dist/{fr-CXEmlY0d.js → fr-BmQdNgE2.js} +13 -13
- package/dist/{fr-C4bcUC-9.cjs → fr-BwBKunbe.cjs} +1 -1
- package/dist/generateUtilityClasses-BwskEdpL.js +58 -0
- package/dist/generateUtilityClasses-CzQVzFT6.cjs +1 -0
- package/dist/identifier-Dx5_fEyA.cjs +59 -0
- package/dist/identifier-SatcAo-F.js +2930 -0
- package/dist/index-C1wNRRuv.js +89 -0
- package/dist/index-D30fIOec.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-D1DDOFsy.cjs → refType-CVYH4raj.cjs} +1 -1
- package/dist/{refType-DiVIFcsY.js → refType-Dv9Yduc2.js} +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-1gSw-INq.js → useTheme-5-WD2s8Q.js} +5 -5
- package/dist/useTheme-C3EDRRFw.js +128 -0
- package/dist/useTheme-C8ZuVDEs.cjs +1 -0
- package/dist/useTheme-pRydhCrj.cjs +1 -0
- package/dist/useThemeProps-D26oU7wL.cjs +1 -0
- package/dist/useThemeProps-uqUSigAC.js +40 -0
- package/package.json +8 -8
- 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/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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const c=require("react/jsx-runtime"),m=require("react"),T=require("./components/DefaultButton/DefaultButtonIcon.cjs.js"),g=require("./DefaultPropsProvider-DwweZ7qj.cjs"),M=require("./TransitionGroupContext-LWgXgADB.cjs"),d=require("./ButtonBase-C-IxZjoy.cjs"),r=require("./identifier-Dx5_fEyA.cjs"),f=require("./generateUtilityClasses-CzQVzFT6.cjs"),C=require("./Button-CZO3I5oS.cjs"),q=require("./useId-D5Txt-1B.cjs"),k=require("./CircularProgress-D1dO7At_.cjs");function R(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(o,i,n.get?n:{enumerable:!0,get:()=>t[i]})}}return o.default=t,Object.freeze(o)}const h=R(m);function D(t,o){return process.env.NODE_ENV==="production"?()=>null:function(...n){return t(...n)||o(...n)}}function j(t,o){const i=d._extends({},o);return Object.keys(t).forEach(n=>{if(n.toString().match(/^(components|slots)$/))i[n]=d._extends({},t[n],i[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){const s=t[n]||{},a=o[n];i[n]={},!a||!Object.keys(a)?i[n]=s:!s||!Object.keys(s)?i[n]=a:(i[n]=d._extends({},a),Object.keys(s).forEach(l=>{i[n][l]=j(s[l],a[l])}))}else i[n]===void 0&&(i[n]=t[n])}),i}function $(t){return f.generateUtilityClass("MuiLoadingButton",t)}const z=f.generateUtilityClasses("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),e=z,U=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],W=t=>{const{loading:o,loadingPosition:i,classes:n}=t,s={root:["root",o&&"loading"],startIcon:[o&&`startIconLoading${r.capitalize(i)}`],endIcon:[o&&`endIconLoading${r.capitalize(i)}`],loadingIndicator:["loadingIndicator",o&&`loadingIndicator${r.capitalize(i)}`]},a=f.composeClasses(s,$,n);return d._extends({},n,a)},G=t=>t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"&&t!=="classes",F=g.styled(C.Button,{shouldForwardProp:t=>G(t)||t==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(t,o)=>[o.root,o.startIconLoadingStart&&{[`& .${e.startIconLoadingStart}`]:o.startIconLoadingStart},o.endIconLoadingEnd&&{[`& .${e.endIconLoadingEnd}`]:o.endIconLoadingEnd}]})(({ownerState:t,theme:o})=>d._extends({[`& .${e.startIconLoadingStart}, & .${e.endIconLoadingEnd}`]:{transition:o.transitions.create(["opacity"],{duration:o.transitions.duration.short}),opacity:0}},t.loadingPosition==="center"&&{transition:o.transitions.create(["background-color","box-shadow","border-color"],{duration:o.transitions.duration.short}),[`&.${e.loading}`]:{color:"transparent"}},t.loadingPosition==="start"&&t.fullWidth&&{[`& .${e.startIconLoadingStart}, & .${e.endIconLoadingEnd}`]:{transition:o.transitions.create(["opacity"],{duration:o.transitions.duration.short}),opacity:0,marginRight:-8}},t.loadingPosition==="end"&&t.fullWidth&&{[`& .${e.startIconLoadingStart}, & .${e.endIconLoadingEnd}`]:{transition:o.transitions.create(["opacity"],{duration:o.transitions.duration.short}),opacity:0,marginLeft:-8}})),V=g.styled("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(t,o)=>{const{ownerState:i}=t;return[o.loadingIndicator,o[`loadingIndicator${r.capitalize(i.loadingPosition)}`]]}})(({theme:t,ownerState:o})=>d._extends({position:"absolute",visibility:"visible",display:"flex"},o.loadingPosition==="start"&&(o.variant==="outlined"||o.variant==="contained")&&{left:o.size==="small"?10:14},o.loadingPosition==="start"&&o.variant==="text"&&{left:6},o.loadingPosition==="center"&&{left:"50%",transform:"translate(-50%)",color:(t.vars||t).palette.action.disabled},o.loadingPosition==="end"&&(o.variant==="outlined"||o.variant==="contained")&&{right:o.size==="small"?10:14},o.loadingPosition==="end"&&o.variant==="text"&&{right:6},o.loadingPosition==="start"&&o.fullWidth&&{position:"relative",left:-10},o.loadingPosition==="end"&&o.fullWidth&&{position:"relative",right:-10})),y=h.forwardRef(function(o,i){const n=h.useContext(C.ButtonGroupContext),s=j(n,o),a=g.useDefaultProps({props:s,name:"MuiLoadingButton"}),{children:l,disabled:P=!1,id:E,loading:p=!1,loadingIndicator:b,loadingPosition:O="center",variant:I="text"}=a,_=M._objectWithoutPropertiesLoose(a,U),L=q.useId(E),v=b??c.jsx(k.CircularProgress,{"aria-labelledby":L,color:"inherit",size:16}),u=d._extends({},a,{disabled:P,loading:p,loadingIndicator:v,loadingPosition:O,variant:I}),B=W(u),x=p?c.jsx(V,{className:B.loadingIndicator,ownerState:u,children:v}):null;return c.jsxs(F,d._extends({disabled:P||p,id:L,ref:i},_,{variant:I,classes:B,ownerState:u,children:[u.loadingPosition==="end"?l:x,u.loadingPosition==="end"?x:l]}))});process.env.NODE_ENV!=="production"&&(y.propTypes={children:r.PropTypes.node,classes:r.PropTypes.object,disabled:r.PropTypes.bool,id:r.PropTypes.string,loading:r.PropTypes.bool,loadingIndicator:r.PropTypes.node,loadingPosition:D(r.PropTypes.oneOf(["start","end","center"]),t=>t.loadingPosition==="start"&&!t.startIcon?new Error('MUI: The loadingPosition="start" should be used in combination with startIcon.'):t.loadingPosition==="end"&&!t.endIcon?new Error('MUI: The loadingPosition="end" should be used in combination with endIcon.'):null),sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object]),variant:r.PropTypes.oneOfType([r.PropTypes.oneOf(["contained","outlined","text"]),r.PropTypes.string])});const H=g.styled(y)(({color:t,theme:o})=>({justifyContent:"center",alignItems:"center",columnGap:8,minHeight:38,paddingLeft:12,paddingRight:12,textTransform:"none",color:t,borderColor:t,borderRadius:5,borderWidth:2,transition:"all 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms","&.MuiButton-contained":{color:o.palette.common.white},"&.MuiButton-outlined":{borderRadius:5,borderWidth:2,"&.MuiButton-colorPrimary":{"&:active":{borderColor:o.palette.primary.main,color:o.palette.primary.main},"&:hover":{backgroundColor:o.palette.primary.dark,borderColor:o.palette.primary.dark,color:o.palette.common.white}},"&.MuiButton-colorSecondary":{"&:active":{borderColor:o.palette.secondary.main,color:o.palette.secondary.main},"&:hover":{backgroundColor:o.palette.secondary.main,color:o.palette.common.white}},"&.MuiButton-colorError":{"&:active":{borderColor:o.palette.error.main,color:o.palette.error.main},"&:hover":{backgroundColor:o.palette.error.main,color:o.palette.common.white}}}})),S=({icon:t,text:o,...i})=>{const n=i.color??"primary";return c.jsxs(H,{...i,color:n,children:[(t==null?void 0:t.position)==="left"?c.jsx(T,{...t}):null,o,(t==null?void 0:t.position)==="right"?c.jsx(T,{...t}):null]})};exports.DefaultButton=S;exports.LoadingButton=y;exports.getLoadingButtonUtilityClass=$;exports.loadingButtonClasses=e;
|
|
@@ -1,41 +1,61 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { s as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { u as
|
|
8
|
-
import { c as
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsx as g, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import * as h from "react";
|
|
3
|
+
import B from "./components/DefaultButton/DefaultButtonIcon.es.js";
|
|
4
|
+
import { s as I, u as j } from "./DefaultPropsProvider-BDdV3S11.js";
|
|
5
|
+
import { _ as k } from "./TransitionGroupContext-SbAHUhOx.js";
|
|
6
|
+
import { _ as l } from "./ButtonBase-Mr4S_NG8.js";
|
|
7
|
+
import { K as u, P as a } from "./identifier-SatcAo-F.js";
|
|
8
|
+
import { g as R, a as T, c as W } from "./generateUtilityClasses-BwskEdpL.js";
|
|
9
|
+
import { B as _, a as D } from "./Button-BlSyZq45.js";
|
|
10
|
+
import { u as U } from "./useId-CyGZMA-F.js";
|
|
11
|
+
import { C as z } from "./CircularProgress-bltZBt14.js";
|
|
12
|
+
function F(n, o) {
|
|
13
|
+
return process.env.NODE_ENV === "production" ? () => null : function(...t) {
|
|
14
|
+
return n(...t) || o(...t);
|
|
15
|
+
};
|
|
12
16
|
}
|
|
13
|
-
|
|
17
|
+
function x(n, o) {
|
|
18
|
+
const i = l({}, o);
|
|
19
|
+
return Object.keys(n).forEach((t) => {
|
|
20
|
+
if (t.toString().match(/^(components|slots)$/))
|
|
21
|
+
i[t] = l({}, n[t], i[t]);
|
|
22
|
+
else if (t.toString().match(/^(componentsProps|slotProps)$/)) {
|
|
23
|
+
const s = n[t] || {}, r = o[t];
|
|
24
|
+
i[t] = {}, !r || !Object.keys(r) ? i[t] = s : !s || !Object.keys(s) ? i[t] = r : (i[t] = l({}, r), Object.keys(s).forEach((e) => {
|
|
25
|
+
i[t][e] = x(s[e], r[e]);
|
|
26
|
+
}));
|
|
27
|
+
} else i[t] === void 0 && (i[t] = n[t]);
|
|
28
|
+
}), i;
|
|
29
|
+
}
|
|
30
|
+
function G(n) {
|
|
31
|
+
return R("MuiLoadingButton", n);
|
|
32
|
+
}
|
|
33
|
+
const V = T("MuiLoadingButton", ["root", "loading", "loadingIndicator", "loadingIndicatorCenter", "loadingIndicatorStart", "loadingIndicatorEnd", "endIconLoadingEnd", "startIconLoadingStart"]), d = V, H = ["children", "disabled", "id", "loading", "loadingIndicator", "loadingPosition", "variant"], K = (n) => {
|
|
14
34
|
const {
|
|
15
35
|
loading: o,
|
|
16
36
|
loadingPosition: i,
|
|
17
|
-
classes:
|
|
18
|
-
} = n,
|
|
37
|
+
classes: t
|
|
38
|
+
} = n, s = {
|
|
19
39
|
root: ["root", o && "loading"],
|
|
20
|
-
startIcon: [o && `startIconLoading${
|
|
21
|
-
endIcon: [o && `endIconLoading${
|
|
22
|
-
loadingIndicator: ["loadingIndicator", o && `loadingIndicator${
|
|
23
|
-
},
|
|
24
|
-
return l({},
|
|
25
|
-
},
|
|
26
|
-
shouldForwardProp: (n) =>
|
|
40
|
+
startIcon: [o && `startIconLoading${u(i)}`],
|
|
41
|
+
endIcon: [o && `endIconLoading${u(i)}`],
|
|
42
|
+
loadingIndicator: ["loadingIndicator", o && `loadingIndicator${u(i)}`]
|
|
43
|
+
}, r = W(s, G, t);
|
|
44
|
+
return l({}, t, r);
|
|
45
|
+
}, q = (n) => n !== "ownerState" && n !== "theme" && n !== "sx" && n !== "as" && n !== "classes", A = I(_, {
|
|
46
|
+
shouldForwardProp: (n) => q(n) || n === "classes",
|
|
27
47
|
name: "MuiLoadingButton",
|
|
28
48
|
slot: "Root",
|
|
29
49
|
overridesResolver: (n, o) => [o.root, o.startIconLoadingStart && {
|
|
30
|
-
[`& .${
|
|
50
|
+
[`& .${d.startIconLoadingStart}`]: o.startIconLoadingStart
|
|
31
51
|
}, o.endIconLoadingEnd && {
|
|
32
|
-
[`& .${
|
|
52
|
+
[`& .${d.endIconLoadingEnd}`]: o.endIconLoadingEnd
|
|
33
53
|
}]
|
|
34
54
|
})(({
|
|
35
55
|
ownerState: n,
|
|
36
56
|
theme: o
|
|
37
57
|
}) => l({
|
|
38
|
-
[`& .${
|
|
58
|
+
[`& .${d.startIconLoadingStart}, & .${d.endIconLoadingEnd}`]: {
|
|
39
59
|
transition: o.transitions.create(["opacity"], {
|
|
40
60
|
duration: o.transitions.duration.short
|
|
41
61
|
}),
|
|
@@ -45,11 +65,11 @@ const G = W("MuiLoadingButton", ["root", "loading", "loadingIndicator", "loading
|
|
|
45
65
|
transition: o.transitions.create(["background-color", "box-shadow", "border-color"], {
|
|
46
66
|
duration: o.transitions.duration.short
|
|
47
67
|
}),
|
|
48
|
-
[`&.${
|
|
68
|
+
[`&.${d.loading}`]: {
|
|
49
69
|
color: "transparent"
|
|
50
70
|
}
|
|
51
71
|
}, n.loadingPosition === "start" && n.fullWidth && {
|
|
52
|
-
[`& .${
|
|
72
|
+
[`& .${d.startIconLoadingStart}, & .${d.endIconLoadingEnd}`]: {
|
|
53
73
|
transition: o.transitions.create(["opacity"], {
|
|
54
74
|
duration: o.transitions.duration.short
|
|
55
75
|
}),
|
|
@@ -57,21 +77,21 @@ const G = W("MuiLoadingButton", ["root", "loading", "loadingIndicator", "loading
|
|
|
57
77
|
marginRight: -8
|
|
58
78
|
}
|
|
59
79
|
}, n.loadingPosition === "end" && n.fullWidth && {
|
|
60
|
-
[`& .${
|
|
80
|
+
[`& .${d.startIconLoadingStart}, & .${d.endIconLoadingEnd}`]: {
|
|
61
81
|
transition: o.transitions.create(["opacity"], {
|
|
62
82
|
duration: o.transitions.duration.short
|
|
63
83
|
}),
|
|
64
84
|
opacity: 0,
|
|
65
85
|
marginLeft: -8
|
|
66
86
|
}
|
|
67
|
-
})), J =
|
|
87
|
+
})), J = I("span", {
|
|
68
88
|
name: "MuiLoadingButton",
|
|
69
89
|
slot: "LoadingIndicator",
|
|
70
90
|
overridesResolver: (n, o) => {
|
|
71
91
|
const {
|
|
72
92
|
ownerState: i
|
|
73
93
|
} = n;
|
|
74
|
-
return [o.loadingIndicator, o[`loadingIndicator${
|
|
94
|
+
return [o.loadingIndicator, o[`loadingIndicator${u(i.loadingPosition)}`]];
|
|
75
95
|
}
|
|
76
96
|
})(({
|
|
77
97
|
theme: n,
|
|
@@ -98,45 +118,45 @@ const G = W("MuiLoadingButton", ["root", "loading", "loadingIndicator", "loading
|
|
|
98
118
|
}, o.loadingPosition === "end" && o.fullWidth && {
|
|
99
119
|
position: "relative",
|
|
100
120
|
right: -10
|
|
101
|
-
})),
|
|
102
|
-
const
|
|
103
|
-
props:
|
|
121
|
+
})), E = /* @__PURE__ */ h.forwardRef(function(o, i) {
|
|
122
|
+
const t = h.useContext(D), s = x(t, o), r = j({
|
|
123
|
+
props: s,
|
|
104
124
|
name: "MuiLoadingButton"
|
|
105
125
|
}), {
|
|
106
|
-
children:
|
|
107
|
-
disabled:
|
|
126
|
+
children: e,
|
|
127
|
+
disabled: b = !1,
|
|
108
128
|
id: $,
|
|
109
|
-
loading:
|
|
110
|
-
loadingIndicator:
|
|
111
|
-
loadingPosition:
|
|
112
|
-
variant:
|
|
113
|
-
} =
|
|
129
|
+
loading: f = !1,
|
|
130
|
+
loadingIndicator: p,
|
|
131
|
+
loadingPosition: M = "center",
|
|
132
|
+
variant: L = "text"
|
|
133
|
+
} = r, O = k(r, H), P = U($), y = p ?? /* @__PURE__ */ g(z, {
|
|
114
134
|
"aria-labelledby": P,
|
|
115
135
|
color: "inherit",
|
|
116
136
|
size: 16
|
|
117
|
-
}),
|
|
118
|
-
disabled:
|
|
119
|
-
loading:
|
|
120
|
-
loadingIndicator:
|
|
121
|
-
loadingPosition:
|
|
122
|
-
variant:
|
|
123
|
-
}),
|
|
124
|
-
className:
|
|
125
|
-
ownerState:
|
|
126
|
-
children:
|
|
137
|
+
}), c = l({}, r, {
|
|
138
|
+
disabled: b,
|
|
139
|
+
loading: f,
|
|
140
|
+
loadingIndicator: y,
|
|
141
|
+
loadingPosition: M,
|
|
142
|
+
variant: L
|
|
143
|
+
}), m = K(c), v = f ? /* @__PURE__ */ g(J, {
|
|
144
|
+
className: m.loadingIndicator,
|
|
145
|
+
ownerState: c,
|
|
146
|
+
children: y
|
|
127
147
|
}) : null;
|
|
128
148
|
return /* @__PURE__ */ C(A, l({
|
|
129
|
-
disabled:
|
|
149
|
+
disabled: b || f,
|
|
130
150
|
id: P,
|
|
131
151
|
ref: i
|
|
132
|
-
},
|
|
133
|
-
variant:
|
|
134
|
-
classes:
|
|
135
|
-
ownerState:
|
|
136
|
-
children: [
|
|
152
|
+
}, O, {
|
|
153
|
+
variant: L,
|
|
154
|
+
classes: m,
|
|
155
|
+
ownerState: c,
|
|
156
|
+
children: [c.loadingPosition === "end" ? e : v, c.loadingPosition === "end" ? v : e]
|
|
137
157
|
}));
|
|
138
158
|
});
|
|
139
|
-
process.env.NODE_ENV !== "production" && (
|
|
159
|
+
process.env.NODE_ENV !== "production" && (E.propTypes = {
|
|
140
160
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
141
161
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
142
162
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -144,48 +164,48 @@ process.env.NODE_ENV !== "production" && (x.propTypes = {
|
|
|
144
164
|
/**
|
|
145
165
|
* The content of the component.
|
|
146
166
|
*/
|
|
147
|
-
children:
|
|
167
|
+
children: a.node,
|
|
148
168
|
/**
|
|
149
169
|
* Override or extend the styles applied to the component.
|
|
150
170
|
*/
|
|
151
|
-
classes:
|
|
171
|
+
classes: a.object,
|
|
152
172
|
/**
|
|
153
173
|
* If `true`, the component is disabled.
|
|
154
174
|
* @default false
|
|
155
175
|
*/
|
|
156
|
-
disabled:
|
|
176
|
+
disabled: a.bool,
|
|
157
177
|
/**
|
|
158
178
|
* @ignore
|
|
159
179
|
*/
|
|
160
|
-
id:
|
|
180
|
+
id: a.string,
|
|
161
181
|
/**
|
|
162
182
|
* If `true`, the loading indicator is shown and the button becomes disabled.
|
|
163
183
|
* @default false
|
|
164
184
|
*/
|
|
165
|
-
loading:
|
|
185
|
+
loading: a.bool,
|
|
166
186
|
/**
|
|
167
187
|
* Element placed before the children if the button is in loading state.
|
|
168
188
|
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
169
189
|
* By default we render a `CircularProgress` that is labelled by the button itself.
|
|
170
190
|
* @default <CircularProgress color="inherit" size={16} />
|
|
171
191
|
*/
|
|
172
|
-
loadingIndicator:
|
|
192
|
+
loadingIndicator: a.node,
|
|
173
193
|
/**
|
|
174
194
|
* The loading indicator can be positioned on the start, end, or the center of the button.
|
|
175
195
|
* @default 'center'
|
|
176
196
|
*/
|
|
177
|
-
loadingPosition:
|
|
197
|
+
loadingPosition: F(a.oneOf(["start", "end", "center"]), (n) => n.loadingPosition === "start" && !n.startIcon ? new Error('MUI: The loadingPosition="start" should be used in combination with startIcon.') : n.loadingPosition === "end" && !n.endIcon ? new Error('MUI: The loadingPosition="end" should be used in combination with endIcon.') : null),
|
|
178
198
|
/**
|
|
179
199
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
180
200
|
*/
|
|
181
|
-
sx:
|
|
201
|
+
sx: a.oneOfType([a.arrayOf(a.oneOfType([a.func, a.object, a.bool])), a.func, a.object]),
|
|
182
202
|
/**
|
|
183
203
|
* The variant to use.
|
|
184
204
|
* @default 'text'
|
|
185
205
|
*/
|
|
186
|
-
variant:
|
|
206
|
+
variant: a.oneOfType([a.oneOf(["contained", "outlined", "text"]), a.string])
|
|
187
207
|
});
|
|
188
|
-
const
|
|
208
|
+
const Q = I(E)(
|
|
189
209
|
({ color: n, theme: o }) => ({
|
|
190
210
|
justifyContent: "center",
|
|
191
211
|
alignItems: "center",
|
|
@@ -238,21 +258,21 @@ const K = p(x)(
|
|
|
238
258
|
}
|
|
239
259
|
}
|
|
240
260
|
})
|
|
241
|
-
),
|
|
261
|
+
), ao = ({
|
|
242
262
|
icon: n,
|
|
243
263
|
text: o,
|
|
244
264
|
...i
|
|
245
265
|
}) => {
|
|
246
|
-
const
|
|
247
|
-
return /* @__PURE__ */ C(
|
|
248
|
-
(n == null ? void 0 : n.position) === "left" ? /* @__PURE__ */
|
|
266
|
+
const t = i.color ?? "primary";
|
|
267
|
+
return /* @__PURE__ */ C(Q, { ...i, color: t, children: [
|
|
268
|
+
(n == null ? void 0 : n.position) === "left" ? /* @__PURE__ */ g(B, { ...n }) : null,
|
|
249
269
|
o,
|
|
250
|
-
(n == null ? void 0 : n.position) === "right" ? /* @__PURE__ */
|
|
270
|
+
(n == null ? void 0 : n.position) === "right" ? /* @__PURE__ */ g(B, { ...n }) : null
|
|
251
271
|
] });
|
|
252
272
|
};
|
|
253
273
|
export {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
274
|
+
ao as D,
|
|
275
|
+
E as L,
|
|
276
|
+
G as g,
|
|
277
|
+
d as l
|
|
258
278
|
};
|