@cgi-learning-hub/ui 0.0.1-dev.1708959157 → 0.0.1-dev.1708959744

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