@cgi-learning-hub/ui 0.0.1-dev.1708964890 → 0.0.1-dev.1708974808

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/dist/Button-Tkz5NkF_.cjs +1 -0
  2. package/dist/Button-X7eWZQfX.js +356 -0
  3. package/dist/ButtonBase-CKfcGhaU.js +892 -0
  4. package/dist/ButtonBase-Cg8cBMzO.cjs +75 -0
  5. package/dist/Input-CAb0EFzc.cjs +1 -0
  6. package/dist/Input-CbYjsRHK.js +322 -0
  7. package/dist/{InputBase-C_yPRkam.js → InputBase-B13Nzzhk.js} +215 -193
  8. package/dist/InputBase-CKlCw9fj.cjs +4 -0
  9. package/dist/assets/index.css +1 -1
  10. package/dist/components/AnotherComponent/AnotherComponent.cjs.js +1 -0
  11. package/dist/components/AnotherComponent/AnotherComponent.d.ts +2 -0
  12. package/dist/components/AnotherComponent/AnotherComponent.es.js +15 -0
  13. package/dist/components/AnotherComponent/AnotherComponent.stories.cjs.js +1 -0
  14. package/dist/components/{Dropzone/Dropzone.stories.d.ts → AnotherComponent/AnotherComponent.stories.d.ts} +2 -1
  15. package/dist/components/AnotherComponent/AnotherComponent.stories.es.js +22 -0
  16. package/dist/components/AnotherComponent/index.cjs.js +1 -0
  17. package/dist/components/AnotherComponent/index.d.ts +2 -0
  18. package/dist/components/AnotherComponent/index.es.js +4 -0
  19. package/dist/components/BasicButtons/BasicButtons.cjs.js +1 -0
  20. package/dist/components/BasicButtons/BasicButtons.d.ts +2 -0
  21. package/dist/components/BasicButtons/BasicButtons.es.js +189 -0
  22. package/dist/components/BasicButtons/BasicButtons.stories.cjs.js +1 -0
  23. package/dist/components/BasicButtons/BasicButtons.stories.d.ts +5 -0
  24. package/dist/components/BasicButtons/BasicButtons.stories.es.js +22 -0
  25. package/dist/components/BasicButtons/index.cjs.js +1 -0
  26. package/dist/components/BasicButtons/index.d.ts +2 -0
  27. package/dist/components/BasicButtons/index.es.js +4 -0
  28. package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +28 -1
  29. package/dist/components/buttons/DefaultButton/DefaultButton.es.js +267 -408
  30. package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
  31. package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +5 -5
  32. package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
  33. package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +1 -1
  34. package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +1 -1
  35. package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.d.ts +1 -1
  36. package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +7 -8
  37. package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +1 -1
  38. package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +1 -1
  39. package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +1 -1
  40. package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.d.ts +1 -1
  41. package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +9 -10
  42. package/dist/components/index.cjs.js +1 -1
  43. package/dist/components/index.d.ts +2 -4
  44. package/dist/components/index.es.js +14 -18
  45. package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
  46. package/dist/components/inputs/SearchInput/SearchInput.es.js +247 -77
  47. package/dist/components/inputs/TextInput/TextInput.cjs.js +13 -11
  48. package/dist/components/inputs/TextInput/TextInput.es.js +1631 -1844
  49. package/dist/{createSvgIcon-B6bZPuto.cjs → createSvgIcon-jvI3LIfI.cjs} +1 -1
  50. package/dist/{createSvgIcon-KaSN8JhZ.js → createSvgIcon-qXNZi4k1.js} +8 -8
  51. package/dist/extendSxProp-BRHiEwyk.js +29 -0
  52. package/dist/extendSxProp-CvhhU9Vb.cjs +1 -0
  53. package/dist/index.cjs.js +1 -1
  54. package/dist/index.es.js +12 -16
  55. package/dist/useForkRef-82uiK71d.cjs +1 -0
  56. package/dist/useForkRef-CLcOhrzI.js +44 -0
  57. package/dist/useTheme-BWRyHzdn.js +65 -0
  58. package/dist/useTheme-BpLcDNG1.cjs +1 -0
  59. package/dist/{useThemeProps-Dg9Uoq7q.js → useThemeProps-B6yTTpAe.js} +1024 -1018
  60. package/dist/useThemeProps-CDriK9TK.cjs +65 -0
  61. package/package.json +1 -2
  62. package/dist/Box-7uR7JZiM.cjs +0 -1
  63. package/dist/Box-CPGTKTgx.js +0 -56
  64. package/dist/ButtonBase-B0tkJ9zf.js +0 -831
  65. package/dist/ButtonBase-DCL6Xlnm.cjs +0 -75
  66. package/dist/CircularProgress-CZX5SfKt.cjs +0 -28
  67. package/dist/CircularProgress-CguDBnxV.js +0 -215
  68. package/dist/IconButton-CJ1Nt-jf.js +0 -182
  69. package/dist/IconButton-De7ZdW2q.cjs +0 -2
  70. package/dist/InputBase-Dvr5GnwD.cjs +0 -4
  71. package/dist/Tab-Bhm9hCrX.cjs +0 -1
  72. package/dist/Tab-C4l6V01S.js +0 -237
  73. package/dist/TransitionGroupContext-C7wWJ6l7.js +0 -14
  74. package/dist/TransitionGroupContext-g4tmk10h.cjs +0 -1
  75. package/dist/Typography-CyFLZjnE.js +0 -202
  76. package/dist/Typography-DwsN2Ttm.cjs +0 -1
  77. package/dist/components/Dropzone/Dropzone.cjs.js +0 -5
  78. package/dist/components/Dropzone/Dropzone.d.ts +0 -9
  79. package/dist/components/Dropzone/Dropzone.es.js +0 -1210
  80. package/dist/components/Dropzone/Dropzone.stories.cjs.js +0 -1
  81. package/dist/components/Dropzone/Dropzone.stories.es.js +0 -17
  82. package/dist/components/Dropzone/index.cjs.js +0 -1
  83. package/dist/components/Dropzone/index.d.ts +0 -2
  84. package/dist/components/Dropzone/index.es.js +0 -4
  85. package/dist/components/buttons/IconButton.stories.cjs.js +0 -1
  86. package/dist/components/buttons/IconButton.stories.d.ts +0 -4
  87. package/dist/components/buttons/IconButton.stories.es.js +0 -27
  88. package/dist/components/inputs/SearchInput/SearchInput.stories.cjs.js +0 -1
  89. package/dist/components/inputs/SearchInput/SearchInput.stories.d.ts +0 -4
  90. package/dist/components/inputs/SearchInput/SearchInput.stories.es.js +0 -16
  91. package/dist/components/inputs/TextInput/TextInput.stories.cjs.js +0 -1
  92. package/dist/components/inputs/TextInput/TextInput.stories.d.ts +0 -4
  93. package/dist/components/inputs/TextInput/TextInput.stories.es.js +0 -17
  94. package/dist/components/lists/FileList/FileList.cjs.js +0 -1
  95. package/dist/components/lists/FileList/FileList.d.ts +0 -7
  96. package/dist/components/lists/FileList/FileList.es.js +0 -19
  97. package/dist/components/lists/FileList/FileList.stories.cjs.js +0 -1
  98. package/dist/components/lists/FileList/FileList.stories.d.ts +0 -4
  99. package/dist/components/lists/FileList/FileList.stories.es.js +0 -28
  100. package/dist/components/lists/FileList/FileListItem.cjs.js +0 -1
  101. package/dist/components/lists/FileList/FileListItem.d.ts +0 -13
  102. package/dist/components/lists/FileList/FileListItem.es.js +0 -41
  103. package/dist/components/lists/FileList/index.cjs.js +0 -1
  104. package/dist/components/lists/FileList/index.d.ts +0 -4
  105. package/dist/components/lists/FileList/index.es.js +0 -6
  106. package/dist/components/lists/TabList.stories.cjs.js +0 -4
  107. package/dist/components/lists/TabList.stories.d.ts +0 -4
  108. package/dist/components/lists/TabList.stories.es.js +0 -1027
  109. package/dist/components/lists/index.cjs.js +0 -1
  110. package/dist/components/lists/index.d.ts +0 -1
  111. package/dist/components/lists/index.es.js +0 -6
  112. package/dist/createSvgIcon-BX8WQ5r-.cjs +0 -2
  113. package/dist/createSvgIcon-m_wsenOJ.js +0 -84
  114. package/dist/isHostComponent-PydJW4A4.cjs +0 -1
  115. package/dist/isHostComponent-kiaBvYVo.js +0 -6
  116. package/dist/ownerWindow-C7EH1lr6.js +0 -23
  117. package/dist/ownerWindow-Dk_4aaak.cjs +0 -1
  118. package/dist/refType-CHSN6ysS.cjs +0 -1
  119. package/dist/refType-Hh9tfnoF.js +0 -29
  120. package/dist/unsupportedProp-Bn6XWqwH.cjs +0 -1
  121. package/dist/unsupportedProp-BuVD30Gh.js +0 -9
  122. package/dist/useControlled-BsLcOmhe.js +0 -48
  123. package/dist/useControlled-jN3fqFfv.cjs +0 -3
  124. package/dist/useForkRef-CGd3Nhyb.cjs +0 -1
  125. package/dist/useForkRef-DwN_Iz9R.js +0 -17
  126. package/dist/useIsFocusVisible-BF0lT08B.cjs +0 -1
  127. package/dist/useIsFocusVisible-D8ksiuhS.js +0 -69
  128. package/dist/useSlotProps-MoAYME1z.js +0 -70
  129. package/dist/useSlotProps-R4s13HHI.cjs +0 -1
  130. package/dist/useTheme-BDPYLOoP.cjs +0 -1
  131. package/dist/useTheme-DJEDOopE.js +0 -9
  132. package/dist/useThemeProps-jkB5q9ie.cjs +0 -65
  133. package/dist/useTimeout-KN97abZR.js +0 -47
  134. package/dist/useTimeout-qjxkiZZn.cjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";const a=require("./useThemeProps-CDriK9TK.cjs"),M=require("react"),x=require("react/jsx-runtime"),S=require("./ButtonBase-Cg8cBMzO.cjs");function V(o){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:()=>o[t]})}}return n.default=o,Object.freeze(n)}const c=V(M);function L(o){return a.generateUtilityClass("MuiButton",o)}const G=a.generateUtilityClasses("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),d=G,T=c.createContext({});process.env.NODE_ENV!=="production"&&(T.displayName="ButtonGroupContext");const P=T,B=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(B.displayName="ButtonGroupButtonContext");const D=B,F=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],q=o=>{const{color:n,disableElevation:t,fullWidth:i,size:e,variant:r,classes:s}=o,u={root:["root",r,`${r}${a.capitalize(n)}`,`size${a.capitalize(e)}`,`${r}Size${a.capitalize(e)}`,n==="inherit"&&"colorInherit",t&&"disableElevation",i&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${a.capitalize(e)}`],endIcon:["endIcon",`iconSize${a.capitalize(e)}`]},v=a.composeClasses(u,L,s);return a._extends({},s,v)},$=o=>a._extends({},o.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},o.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},o.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),U=a.styled(S.ButtonBase,{shouldForwardProp:o=>a.rootShouldForwardProp(o)||o==="classes",name:"MuiButton",slot:"Root",overridesResolver:(o,n)=>{const{ownerState:t}=o;return[n.root,n[t.variant],n[`${t.variant}${a.capitalize(t.color)}`],n[`size${a.capitalize(t.size)}`],n[`${t.variant}Size${a.capitalize(t.size)}`],t.color==="inherit"&&n.colorInherit,t.disableElevation&&n.disableElevation,t.fullWidth&&n.fullWidth]}})(({theme:o,ownerState:n})=>{var t,i;const e=o.palette.mode==="light"?o.palette.grey[300]:o.palette.grey[800],r=o.palette.mode==="light"?o.palette.grey.A100:o.palette.grey[700];return a._extends({},o.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(o.vars||o).shape.borderRadius,transition:o.transitions.create(["background-color","box-shadow","border-color","color"],{duration:o.transitions.duration.short}),"&:hover":a._extends({textDecoration:"none",backgroundColor:o.vars?`rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})`:a.alpha(o.palette.text.primary,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},n.variant==="text"&&n.color!=="inherit"&&{backgroundColor:o.vars?`rgba(${o.vars.palette[n.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})`:a.alpha(o.palette[n.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},n.variant==="outlined"&&n.color!=="inherit"&&{border:`1px solid ${(o.vars||o).palette[n.color].main}`,backgroundColor:o.vars?`rgba(${o.vars.palette[n.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})`:a.alpha(o.palette[n.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},n.variant==="contained"&&{backgroundColor:o.vars?o.vars.palette.Button.inheritContainedHoverBg:r,boxShadow:(o.vars||o).shadows[4],"@media (hover: none)":{boxShadow:(o.vars||o).shadows[2],backgroundColor:(o.vars||o).palette.grey[300]}},n.variant==="contained"&&n.color!=="inherit"&&{backgroundColor:(o.vars||o).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(o.vars||o).palette[n.color].main}}),"&:active":a._extends({},n.variant==="contained"&&{boxShadow:(o.vars||o).shadows[8]}),[`&.${d.focusVisible}`]:a._extends({},n.variant==="contained"&&{boxShadow:(o.vars||o).shadows[6]}),[`&.${d.disabled}`]:a._extends({color:(o.vars||o).palette.action.disabled},n.variant==="outlined"&&{border:`1px solid ${(o.vars||o).palette.action.disabledBackground}`},n.variant==="contained"&&{color:(o.vars||o).palette.action.disabled,boxShadow:(o.vars||o).shadows[0],backgroundColor:(o.vars||o).palette.action.disabledBackground})},n.variant==="text"&&{padding:"6px 8px"},n.variant==="text"&&n.color!=="inherit"&&{color:(o.vars||o).palette[n.color].main},n.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},n.variant==="outlined"&&n.color!=="inherit"&&{color:(o.vars||o).palette[n.color].main,border:o.vars?`1px solid rgba(${o.vars.palette[n.color].mainChannel} / 0.5)`:`1px solid ${a.alpha(o.palette[n.color].main,.5)}`},n.variant==="contained"&&{color:o.vars?o.vars.palette.text.primary:(t=(i=o.palette).getContrastText)==null?void 0:t.call(i,o.palette.grey[300]),backgroundColor:o.vars?o.vars.palette.Button.inheritContainedBg:e,boxShadow:(o.vars||o).shadows[2]},n.variant==="contained"&&n.color!=="inherit"&&{color:(o.vars||o).palette[n.color].contrastText,backgroundColor:(o.vars||o).palette[n.color].main},n.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},n.size==="small"&&n.variant==="text"&&{padding:"4px 5px",fontSize:o.typography.pxToRem(13)},n.size==="large"&&n.variant==="text"&&{padding:"8px 11px",fontSize:o.typography.pxToRem(15)},n.size==="small"&&n.variant==="outlined"&&{padding:"3px 9px",fontSize:o.typography.pxToRem(13)},n.size==="large"&&n.variant==="outlined"&&{padding:"7px 21px",fontSize:o.typography.pxToRem(15)},n.size==="small"&&n.variant==="contained"&&{padding:"4px 10px",fontSize:o.typography.pxToRem(13)},n.size==="large"&&n.variant==="contained"&&{padding:"8px 22px",fontSize:o.typography.pxToRem(15)},n.fullWidth&&{width:"100%"})},({ownerState:o})=>o.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${d.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${d.disabled}`]:{boxShadow:"none"}}),H=a.styled("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(o,n)=>{const{ownerState:t}=o;return[n.startIcon,n[`iconSize${a.capitalize(t.size)}`]]}})(({ownerState:o})=>a._extends({display:"inherit",marginRight:8,marginLeft:-4},o.size==="small"&&{marginLeft:-2},$(o))),A=a.styled("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(o,n)=>{const{ownerState:t}=o;return[n.endIcon,n[`iconSize${a.capitalize(t.size)}`]]}})(({ownerState:o})=>a._extends({display:"inherit",marginRight:-4,marginLeft:8},o.size==="small"&&{marginRight:-2},$(o))),I=c.forwardRef(function(n,t){const i=c.useContext(P),e=c.useContext(D),r=a.resolveProps(i,n),s=a.useThemeProps({props:r,name:"MuiButton"}),{children:u,color:v="primary",component:b="button",className:h,disabled:y=!1,disableElevation:O=!1,disableFocusRipple:g=!1,endIcon:f,focusVisibleClassName:R,fullWidth:m=!1,size:N="medium",startIcon:z,type:C,variant:_="text"}=s,k=a._objectWithoutPropertiesLoose(s,F),p=a._extends({},s,{color:v,component:b,disabled:y,disableElevation:O,disableFocusRipple:g,fullWidth:m,size:N,type:C,variant:_}),l=q(p),E=z&&x.jsx(H,{className:l.startIcon,ownerState:p,children:z}),W=f&&x.jsx(A,{className:l.endIcon,ownerState:p,children:f}),j=e||"";return x.jsxs(U,a._extends({ownerState:p,className:a.clsx(i.className,l.root,h,j),component:b,disabled:y,focusRipple:!g,focusVisibleClassName:a.clsx(l.focusVisible,R),ref:t,type:C},k,{classes:l,children:[E,u,W]}))});process.env.NODE_ENV!=="production"&&(I.propTypes={children:a.PropTypes.node,classes:a.PropTypes.object,className:a.PropTypes.string,color:a.PropTypes.oneOfType([a.PropTypes.oneOf(["inherit","primary","secondary","success","error","info","warning"]),a.PropTypes.string]),component:a.PropTypes.elementType,disabled:a.PropTypes.bool,disableElevation:a.PropTypes.bool,disableFocusRipple:a.PropTypes.bool,disableRipple:a.PropTypes.bool,endIcon:a.PropTypes.node,focusVisibleClassName:a.PropTypes.string,fullWidth:a.PropTypes.bool,href:a.PropTypes.string,size:a.PropTypes.oneOfType([a.PropTypes.oneOf(["small","medium","large"]),a.PropTypes.string]),startIcon:a.PropTypes.node,sx:a.PropTypes.oneOfType([a.PropTypes.arrayOf(a.PropTypes.oneOfType([a.PropTypes.func,a.PropTypes.object,a.PropTypes.bool])),a.PropTypes.func,a.PropTypes.object]),type:a.PropTypes.oneOfType([a.PropTypes.oneOf(["button","reset","submit"]),a.PropTypes.string]),variant:a.PropTypes.oneOfType([a.PropTypes.oneOf(["contained","outlined","text"]),a.PropTypes.string])});const J=I;exports.Button=J;exports.ButtonGroupContext=P;
@@ -0,0 +1,356 @@
1
+ import { g as j, b as F, s as f, r as D, f as r, a as t, t as v, v as U, u as H, _ as A, h, P as n, e as q } from "./useThemeProps-B6yTTpAe.js";
2
+ import * as p from "react";
3
+ import { jsx as m, jsxs as J } from "react/jsx-runtime";
4
+ import { B as K } from "./ButtonBase-CKfcGhaU.js";
5
+ function Q(o) {
6
+ return F("MuiButton", o);
7
+ }
8
+ const X = j("MuiButton", ["root", "text", "textInherit", "textPrimary", "textSecondary", "textSuccess", "textError", "textInfo", "textWarning", "outlined", "outlinedInherit", "outlinedPrimary", "outlinedSecondary", "outlinedSuccess", "outlinedError", "outlinedInfo", "outlinedWarning", "contained", "containedInherit", "containedPrimary", "containedSecondary", "containedSuccess", "containedError", "containedInfo", "containedWarning", "disableElevation", "focusVisible", "disabled", "colorInherit", "textSizeSmall", "textSizeMedium", "textSizeLarge", "outlinedSizeSmall", "outlinedSizeMedium", "outlinedSizeLarge", "containedSizeSmall", "containedSizeMedium", "containedSizeLarge", "sizeMedium", "sizeSmall", "sizeLarge", "fullWidth", "startIcon", "endIcon", "iconSizeSmall", "iconSizeMedium", "iconSizeLarge"]), b = X, R = /* @__PURE__ */ p.createContext({});
9
+ process.env.NODE_ENV !== "production" && (R.displayName = "ButtonGroupContext");
10
+ const Y = R, N = /* @__PURE__ */ p.createContext(void 0);
11
+ process.env.NODE_ENV !== "production" && (N.displayName = "ButtonGroupButtonContext");
12
+ const Z = N, w = ["children", "color", "component", "className", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"], oo = (o) => {
13
+ const {
14
+ color: a,
15
+ disableElevation: i,
16
+ fullWidth: e,
17
+ size: s,
18
+ variant: l,
19
+ classes: c
20
+ } = o, g = {
21
+ root: ["root", l, `${l}${r(a)}`, `size${r(s)}`, `${l}Size${r(s)}`, a === "inherit" && "colorInherit", i && "disableElevation", e && "fullWidth"],
22
+ label: ["label"],
23
+ startIcon: ["startIcon", `iconSize${r(s)}`],
24
+ endIcon: ["endIcon", `iconSize${r(s)}`]
25
+ }, x = q(g, Q, c);
26
+ return t({}, c, x);
27
+ }, E = (o) => t({}, o.size === "small" && {
28
+ "& > *:nth-of-type(1)": {
29
+ fontSize: 18
30
+ }
31
+ }, o.size === "medium" && {
32
+ "& > *:nth-of-type(1)": {
33
+ fontSize: 20
34
+ }
35
+ }, o.size === "large" && {
36
+ "& > *:nth-of-type(1)": {
37
+ fontSize: 22
38
+ }
39
+ }), ao = f(K, {
40
+ shouldForwardProp: (o) => D(o) || o === "classes",
41
+ name: "MuiButton",
42
+ slot: "Root",
43
+ overridesResolver: (o, a) => {
44
+ const {
45
+ ownerState: i
46
+ } = o;
47
+ return [a.root, a[i.variant], a[`${i.variant}${r(i.color)}`], a[`size${r(i.size)}`], a[`${i.variant}Size${r(i.size)}`], i.color === "inherit" && a.colorInherit, i.disableElevation && a.disableElevation, i.fullWidth && a.fullWidth];
48
+ }
49
+ })(({
50
+ theme: o,
51
+ ownerState: a
52
+ }) => {
53
+ var i, e;
54
+ const s = o.palette.mode === "light" ? o.palette.grey[300] : o.palette.grey[800], l = o.palette.mode === "light" ? o.palette.grey.A100 : o.palette.grey[700];
55
+ return t({}, o.typography.button, {
56
+ minWidth: 64,
57
+ padding: "6px 16px",
58
+ borderRadius: (o.vars || o).shape.borderRadius,
59
+ transition: o.transitions.create(["background-color", "box-shadow", "border-color", "color"], {
60
+ duration: o.transitions.duration.short
61
+ }),
62
+ "&:hover": t({
63
+ textDecoration: "none",
64
+ backgroundColor: o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : v(o.palette.text.primary, o.palette.action.hoverOpacity),
65
+ // Reset on touch devices, it doesn't add specificity
66
+ "@media (hover: none)": {
67
+ backgroundColor: "transparent"
68
+ }
69
+ }, a.variant === "text" && a.color !== "inherit" && {
70
+ backgroundColor: o.vars ? `rgba(${o.vars.palette[a.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : v(o.palette[a.color].main, o.palette.action.hoverOpacity),
71
+ // Reset on touch devices, it doesn't add specificity
72
+ "@media (hover: none)": {
73
+ backgroundColor: "transparent"
74
+ }
75
+ }, a.variant === "outlined" && a.color !== "inherit" && {
76
+ border: `1px solid ${(o.vars || o).palette[a.color].main}`,
77
+ backgroundColor: o.vars ? `rgba(${o.vars.palette[a.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : v(o.palette[a.color].main, o.palette.action.hoverOpacity),
78
+ // Reset on touch devices, it doesn't add specificity
79
+ "@media (hover: none)": {
80
+ backgroundColor: "transparent"
81
+ }
82
+ }, a.variant === "contained" && {
83
+ backgroundColor: o.vars ? o.vars.palette.Button.inheritContainedHoverBg : l,
84
+ boxShadow: (o.vars || o).shadows[4],
85
+ // Reset on touch devices, it doesn't add specificity
86
+ "@media (hover: none)": {
87
+ boxShadow: (o.vars || o).shadows[2],
88
+ backgroundColor: (o.vars || o).palette.grey[300]
89
+ }
90
+ }, a.variant === "contained" && a.color !== "inherit" && {
91
+ backgroundColor: (o.vars || o).palette[a.color].dark,
92
+ // Reset on touch devices, it doesn't add specificity
93
+ "@media (hover: none)": {
94
+ backgroundColor: (o.vars || o).palette[a.color].main
95
+ }
96
+ }),
97
+ "&:active": t({}, a.variant === "contained" && {
98
+ boxShadow: (o.vars || o).shadows[8]
99
+ }),
100
+ [`&.${b.focusVisible}`]: t({}, a.variant === "contained" && {
101
+ boxShadow: (o.vars || o).shadows[6]
102
+ }),
103
+ [`&.${b.disabled}`]: t({
104
+ color: (o.vars || o).palette.action.disabled
105
+ }, a.variant === "outlined" && {
106
+ border: `1px solid ${(o.vars || o).palette.action.disabledBackground}`
107
+ }, a.variant === "contained" && {
108
+ color: (o.vars || o).palette.action.disabled,
109
+ boxShadow: (o.vars || o).shadows[0],
110
+ backgroundColor: (o.vars || o).palette.action.disabledBackground
111
+ })
112
+ }, a.variant === "text" && {
113
+ padding: "6px 8px"
114
+ }, a.variant === "text" && a.color !== "inherit" && {
115
+ color: (o.vars || o).palette[a.color].main
116
+ }, a.variant === "outlined" && {
117
+ padding: "5px 15px",
118
+ border: "1px solid currentColor"
119
+ }, a.variant === "outlined" && a.color !== "inherit" && {
120
+ color: (o.vars || o).palette[a.color].main,
121
+ border: o.vars ? `1px solid rgba(${o.vars.palette[a.color].mainChannel} / 0.5)` : `1px solid ${v(o.palette[a.color].main, 0.5)}`
122
+ }, a.variant === "contained" && {
123
+ color: o.vars ? (
124
+ // this is safe because grey does not change between default light/dark mode
125
+ o.vars.palette.text.primary
126
+ ) : (i = (e = o.palette).getContrastText) == null ? void 0 : i.call(e, o.palette.grey[300]),
127
+ backgroundColor: o.vars ? o.vars.palette.Button.inheritContainedBg : s,
128
+ boxShadow: (o.vars || o).shadows[2]
129
+ }, a.variant === "contained" && a.color !== "inherit" && {
130
+ color: (o.vars || o).palette[a.color].contrastText,
131
+ backgroundColor: (o.vars || o).palette[a.color].main
132
+ }, a.color === "inherit" && {
133
+ color: "inherit",
134
+ borderColor: "currentColor"
135
+ }, a.size === "small" && a.variant === "text" && {
136
+ padding: "4px 5px",
137
+ fontSize: o.typography.pxToRem(13)
138
+ }, a.size === "large" && a.variant === "text" && {
139
+ padding: "8px 11px",
140
+ fontSize: o.typography.pxToRem(15)
141
+ }, a.size === "small" && a.variant === "outlined" && {
142
+ padding: "3px 9px",
143
+ fontSize: o.typography.pxToRem(13)
144
+ }, a.size === "large" && a.variant === "outlined" && {
145
+ padding: "7px 21px",
146
+ fontSize: o.typography.pxToRem(15)
147
+ }, a.size === "small" && a.variant === "contained" && {
148
+ padding: "4px 10px",
149
+ fontSize: o.typography.pxToRem(13)
150
+ }, a.size === "large" && a.variant === "contained" && {
151
+ padding: "8px 22px",
152
+ fontSize: o.typography.pxToRem(15)
153
+ }, a.fullWidth && {
154
+ width: "100%"
155
+ });
156
+ }, ({
157
+ ownerState: o
158
+ }) => o.disableElevation && {
159
+ boxShadow: "none",
160
+ "&:hover": {
161
+ boxShadow: "none"
162
+ },
163
+ [`&.${b.focusVisible}`]: {
164
+ boxShadow: "none"
165
+ },
166
+ "&:active": {
167
+ boxShadow: "none"
168
+ },
169
+ [`&.${b.disabled}`]: {
170
+ boxShadow: "none"
171
+ }
172
+ }), no = f("span", {
173
+ name: "MuiButton",
174
+ slot: "StartIcon",
175
+ overridesResolver: (o, a) => {
176
+ const {
177
+ ownerState: i
178
+ } = o;
179
+ return [a.startIcon, a[`iconSize${r(i.size)}`]];
180
+ }
181
+ })(({
182
+ ownerState: o
183
+ }) => t({
184
+ display: "inherit",
185
+ marginRight: 8,
186
+ marginLeft: -4
187
+ }, o.size === "small" && {
188
+ marginLeft: -2
189
+ }, E(o))), io = f("span", {
190
+ name: "MuiButton",
191
+ slot: "EndIcon",
192
+ overridesResolver: (o, a) => {
193
+ const {
194
+ ownerState: i
195
+ } = o;
196
+ return [a.endIcon, a[`iconSize${r(i.size)}`]];
197
+ }
198
+ })(({
199
+ ownerState: o
200
+ }) => t({
201
+ display: "inherit",
202
+ marginRight: -4,
203
+ marginLeft: 8
204
+ }, o.size === "small" && {
205
+ marginRight: -2
206
+ }, E(o))), O = /* @__PURE__ */ p.forwardRef(function(a, i) {
207
+ const e = p.useContext(Y), s = p.useContext(Z), l = U(e, a), c = H({
208
+ props: l,
209
+ name: "MuiButton"
210
+ }), {
211
+ children: g,
212
+ color: x = "primary",
213
+ component: y = "button",
214
+ className: k,
215
+ disabled: C = !1,
216
+ disableElevation: T = !1,
217
+ disableFocusRipple: z = !1,
218
+ endIcon: B,
219
+ focusVisibleClassName: P,
220
+ fullWidth: W = !1,
221
+ size: M = "medium",
222
+ startIcon: $,
223
+ type: I,
224
+ variant: V = "text"
225
+ } = c, S = A(c, w), u = t({}, c, {
226
+ color: x,
227
+ component: y,
228
+ disabled: C,
229
+ disableElevation: T,
230
+ disableFocusRipple: z,
231
+ fullWidth: W,
232
+ size: M,
233
+ type: I,
234
+ variant: V
235
+ }), d = oo(u), L = $ && /* @__PURE__ */ m(no, {
236
+ className: d.startIcon,
237
+ ownerState: u,
238
+ children: $
239
+ }), _ = B && /* @__PURE__ */ m(io, {
240
+ className: d.endIcon,
241
+ ownerState: u,
242
+ children: B
243
+ }), G = s || "";
244
+ return /* @__PURE__ */ J(ao, t({
245
+ ownerState: u,
246
+ className: h(e.className, d.root, k, G),
247
+ component: y,
248
+ disabled: C,
249
+ focusRipple: !z,
250
+ focusVisibleClassName: h(d.focusVisible, P),
251
+ ref: i,
252
+ type: I
253
+ }, S, {
254
+ classes: d,
255
+ children: [L, g, _]
256
+ }));
257
+ });
258
+ process.env.NODE_ENV !== "production" && (O.propTypes = {
259
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
260
+ // │ These PropTypes are generated from the TypeScript type definitions. │
261
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
262
+ // └─────────────────────────────────────────────────────────────────────┘
263
+ /**
264
+ * The content of the component.
265
+ */
266
+ children: n.node,
267
+ /**
268
+ * Override or extend the styles applied to the component.
269
+ */
270
+ classes: n.object,
271
+ /**
272
+ * @ignore
273
+ */
274
+ className: n.string,
275
+ /**
276
+ * The color of the component.
277
+ * It supports both default and custom theme colors, which can be added as shown in the
278
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
279
+ * @default 'primary'
280
+ */
281
+ color: n.oneOfType([n.oneOf(["inherit", "primary", "secondary", "success", "error", "info", "warning"]), n.string]),
282
+ /**
283
+ * The component used for the root node.
284
+ * Either a string to use a HTML element or a component.
285
+ */
286
+ component: n.elementType,
287
+ /**
288
+ * If `true`, the component is disabled.
289
+ * @default false
290
+ */
291
+ disabled: n.bool,
292
+ /**
293
+ * If `true`, no elevation is used.
294
+ * @default false
295
+ */
296
+ disableElevation: n.bool,
297
+ /**
298
+ * If `true`, the keyboard focus ripple is disabled.
299
+ * @default false
300
+ */
301
+ disableFocusRipple: n.bool,
302
+ /**
303
+ * If `true`, the ripple effect is disabled.
304
+ *
305
+ * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
306
+ * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
307
+ * @default false
308
+ */
309
+ disableRipple: n.bool,
310
+ /**
311
+ * Element placed after the children.
312
+ */
313
+ endIcon: n.node,
314
+ /**
315
+ * @ignore
316
+ */
317
+ focusVisibleClassName: n.string,
318
+ /**
319
+ * If `true`, the button will take up the full width of its container.
320
+ * @default false
321
+ */
322
+ fullWidth: n.bool,
323
+ /**
324
+ * The URL to link to when the button is clicked.
325
+ * If defined, an `a` element will be used as the root node.
326
+ */
327
+ href: n.string,
328
+ /**
329
+ * The size of the component.
330
+ * `small` is equivalent to the dense button styling.
331
+ * @default 'medium'
332
+ */
333
+ size: n.oneOfType([n.oneOf(["small", "medium", "large"]), n.string]),
334
+ /**
335
+ * Element placed before the children.
336
+ */
337
+ startIcon: n.node,
338
+ /**
339
+ * The system prop that allows defining system overrides as well as additional CSS styles.
340
+ */
341
+ sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
342
+ /**
343
+ * @ignore
344
+ */
345
+ type: n.oneOfType([n.oneOf(["button", "reset", "submit"]), n.string]),
346
+ /**
347
+ * The variant to use.
348
+ * @default 'text'
349
+ */
350
+ variant: n.oneOfType([n.oneOf(["contained", "outlined", "text"]), n.string])
351
+ });
352
+ const eo = O;
353
+ export {
354
+ eo as B,
355
+ Y as a
356
+ };