@cgi-learning-hub/ui 0.0.1-dev.1708382893 → 0.0.1-dev.1708424507

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 (53) hide show
  1. package/dist/Button-8coRSZ3M.cjs +1 -0
  2. package/dist/Button-BJMp7Tz3.js +355 -0
  3. package/dist/ButtonBase-DfYGPVje.js +892 -0
  4. package/dist/ButtonBase-xIJbOm-V.cjs +75 -0
  5. package/dist/Input-DS9hzPC3.js +322 -0
  6. package/dist/Input-DWEaLJ-2.cjs +1 -0
  7. package/dist/{InputBase-CGq779n2.js → InputBase-B31rEvBe.js} +59 -60
  8. package/dist/InputBase-BuseI3Oe.cjs +4 -0
  9. package/dist/components/AnotherComponent/AnotherComponent.cjs.js +1 -1
  10. package/dist/components/AnotherComponent/AnotherComponent.es.js +7 -6
  11. package/dist/components/AnotherComponent/AnotherComponent.stories.d.ts +1 -1
  12. package/dist/components/BasicButtons/BasicButtons.cjs.js +1 -1
  13. package/dist/components/BasicButtons/BasicButtons.es.js +22 -23
  14. package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +1 -1
  15. package/dist/components/buttons/DefaultButton/DefaultButton.es.js +3 -3
  16. package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
  17. package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +12 -13
  18. package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
  19. package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +1 -1
  20. package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +1 -1
  21. package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +1 -1
  22. package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +1 -1
  23. package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +1 -1
  24. package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +1 -1
  25. package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +1 -1
  26. package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
  27. package/dist/components/inputs/SearchInput/SearchInput.es.js +18 -19
  28. package/dist/components/inputs/TextInput/TextInput.cjs.js +13 -13
  29. package/dist/components/inputs/TextInput/TextInput.es.js +1015 -1329
  30. package/dist/{createSvgIcon-CHLyeSLU.js → createSvgIcon-BPyRt0N5.js} +12 -13
  31. package/dist/createSvgIcon-Cz9hf1Fl.cjs +1 -0
  32. package/dist/{extendSxProp-BqGiF689.js → extendSxProp-DzGZiKZk.js} +1 -1
  33. package/dist/extendSxProp-LEI89AMt.cjs +1 -0
  34. package/dist/{useForkRef-GL_-ZsET.js → useForkRef-C0Hk1SEc.js} +1 -1
  35. package/dist/useForkRef-YQvz-OME.cjs +1 -0
  36. package/dist/useTheme-BzgwMQvX.cjs +1 -0
  37. package/dist/{TransitionGroupContext-BjDSFqZJ.js → useTheme-D1_U7jx5.js} +20 -14
  38. package/dist/useThemeProps-Aqe6oH65.cjs +65 -0
  39. package/dist/useThemeProps-Dkkbtzcg.js +2696 -0
  40. package/package.json +1 -1
  41. package/dist/Button-D0o8tGej.cjs +0 -75
  42. package/dist/Button-D0z_AY3E.js +0 -1241
  43. package/dist/InputBase-lIiwyvaO.cjs +0 -4
  44. package/dist/TransitionGroupContext-B6r0bfvS.cjs +0 -1
  45. package/dist/createSvgIcon-DHY1YrJ8.cjs +0 -1
  46. package/dist/defaultTheme-BKohU5FP.js +0 -2232
  47. package/dist/defaultTheme-DdZ2uQhZ.cjs +0 -42
  48. package/dist/extendSxProp-DRVELas3.cjs +0 -1
  49. package/dist/styled-1ec4DLGK.js +0 -472
  50. package/dist/styled-DqWU6H76.cjs +0 -24
  51. package/dist/useForkRef-BkcfGVSE.cjs +0 -1
  52. package/dist/useTheme-B4qd7ENB.js +0 -9
  53. package/dist/useTheme-DjsJvzN5.cjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";const a=require("./useThemeProps-Aqe6oH65.cjs"),j=require("react"),x=require("react/jsx-runtime"),M=require("./ButtonBase-xIJbOm-V.cjs");function S(o){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const i in o)if(i!=="default"){const t=Object.getOwnPropertyDescriptor(o,i);Object.defineProperty(n,i,t.get?t:{enumerable:!0,get:()=>o[i]})}}return n.default=o,Object.freeze(n)}const c=S(j);function V(o){return a.generateUtilityClass("MuiButton",o)}const L=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=L,T=c.createContext({});process.env.NODE_ENV!=="production"&&(T.displayName="ButtonGroupContext");const G=T,P=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(P.displayName="ButtonGroupButtonContext");const D=P,F=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],q=o=>{const{color:n,disableElevation:i,fullWidth:t,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",i&&"disableElevation",t&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${a.capitalize(e)}`],endIcon:["endIcon",`iconSize${a.capitalize(e)}`]},v=a.composeClasses(u,V,s);return a._extends({},s,v)},B=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(M.ButtonBase,{shouldForwardProp:o=>a.rootShouldForwardProp(o)||o==="classes",name:"MuiButton",slot:"Root",overridesResolver:(o,n)=>{const{ownerState:i}=o;return[n.root,n[i.variant],n[`${i.variant}${a.capitalize(i.color)}`],n[`size${a.capitalize(i.size)}`],n[`${i.variant}Size${a.capitalize(i.size)}`],i.color==="inherit"&&n.colorInherit,i.disableElevation&&n.disableElevation,i.fullWidth&&n.fullWidth]}})(({theme:o,ownerState:n})=>{var i,t;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:(i=(t=o.palette).getContrastText)==null?void 0:i.call(t,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:i}=o;return[n.startIcon,n[`iconSize${a.capitalize(i.size)}`]]}})(({ownerState:o})=>a._extends({display:"inherit",marginRight:8,marginLeft:-4},o.size==="small"&&{marginLeft:-2},B(o))),A=a.styled("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(o,n)=>{const{ownerState:i}=o;return[n.endIcon,n[`iconSize${a.capitalize(i.size)}`]]}})(({ownerState:o})=>a._extends({display:"inherit",marginRight:-4,marginLeft:8},o.size==="small"&&{marginRight:-2},B(o))),$=c.forwardRef(function(n,i){const t=c.useContext(G),e=c.useContext(D),r=a.resolveProps(t,n),s=a.useThemeProps({props:r,name:"MuiButton"}),{children:u,color:v="primary",component:b="button",className:I,disabled:y=!1,disableElevation:h=!1,disableFocusRipple:g=!1,endIcon:f,focusVisibleClassName:O,fullWidth:R=!1,size:m="medium",startIcon:z,type:C,variant:N="text"}=s,_=a._objectWithoutPropertiesLoose(s,F),p=a._extends({},s,{color:v,component:b,disabled:y,disableElevation:h,disableFocusRipple:g,fullWidth:R,size:m,type:C,variant:N}),l=q(p),k=z&&x.jsx(H,{className:l.startIcon,ownerState:p,children:z}),E=f&&x.jsx(A,{className:l.endIcon,ownerState:p,children:f}),W=e||"";return x.jsxs(U,a._extends({ownerState:p,className:a.clsx(t.className,l.root,I,W),component:b,disabled:y,focusRipple:!g,focusVisibleClassName:a.clsx(l.focusVisible,O),ref:i,type:C},_,{classes:l,children:[k,u,E]}))});process.env.NODE_ENV!=="production"&&($.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=$;exports.Button=J;
@@ -0,0 +1,355 @@
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 a, e as q } from "./useThemeProps-Dkkbtzcg.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-DfYGPVje.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: n,
15
+ disableElevation: i,
16
+ fullWidth: e,
17
+ size: s,
18
+ variant: l,
19
+ classes: c
20
+ } = o, g = {
21
+ root: ["root", l, `${l}${r(n)}`, `size${r(s)}`, `${l}Size${r(s)}`, n === "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
+ }), no = f(K, {
40
+ shouldForwardProp: (o) => D(o) || o === "classes",
41
+ name: "MuiButton",
42
+ slot: "Root",
43
+ overridesResolver: (o, n) => {
44
+ const {
45
+ ownerState: i
46
+ } = o;
47
+ return [n.root, n[i.variant], n[`${i.variant}${r(i.color)}`], n[`size${r(i.size)}`], n[`${i.variant}Size${r(i.size)}`], i.color === "inherit" && n.colorInherit, i.disableElevation && n.disableElevation, i.fullWidth && n.fullWidth];
48
+ }
49
+ })(({
50
+ theme: o,
51
+ ownerState: n
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
+ }, n.variant === "text" && n.color !== "inherit" && {
70
+ backgroundColor: o.vars ? `rgba(${o.vars.palette[n.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : v(o.palette[n.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
+ }, n.variant === "outlined" && n.color !== "inherit" && {
76
+ border: `1px solid ${(o.vars || o).palette[n.color].main}`,
77
+ backgroundColor: o.vars ? `rgba(${o.vars.palette[n.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : v(o.palette[n.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
+ }, n.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
+ }, n.variant === "contained" && n.color !== "inherit" && {
91
+ backgroundColor: (o.vars || o).palette[n.color].dark,
92
+ // Reset on touch devices, it doesn't add specificity
93
+ "@media (hover: none)": {
94
+ backgroundColor: (o.vars || o).palette[n.color].main
95
+ }
96
+ }),
97
+ "&:active": t({}, n.variant === "contained" && {
98
+ boxShadow: (o.vars || o).shadows[8]
99
+ }),
100
+ [`&.${b.focusVisible}`]: t({}, n.variant === "contained" && {
101
+ boxShadow: (o.vars || o).shadows[6]
102
+ }),
103
+ [`&.${b.disabled}`]: t({
104
+ color: (o.vars || o).palette.action.disabled
105
+ }, n.variant === "outlined" && {
106
+ border: `1px solid ${(o.vars || o).palette.action.disabledBackground}`
107
+ }, n.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
+ }, n.variant === "text" && {
113
+ padding: "6px 8px"
114
+ }, n.variant === "text" && n.color !== "inherit" && {
115
+ color: (o.vars || o).palette[n.color].main
116
+ }, n.variant === "outlined" && {
117
+ padding: "5px 15px",
118
+ border: "1px solid currentColor"
119
+ }, n.variant === "outlined" && n.color !== "inherit" && {
120
+ color: (o.vars || o).palette[n.color].main,
121
+ border: o.vars ? `1px solid rgba(${o.vars.palette[n.color].mainChannel} / 0.5)` : `1px solid ${v(o.palette[n.color].main, 0.5)}`
122
+ }, n.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
+ }, n.variant === "contained" && n.color !== "inherit" && {
130
+ color: (o.vars || o).palette[n.color].contrastText,
131
+ backgroundColor: (o.vars || o).palette[n.color].main
132
+ }, n.color === "inherit" && {
133
+ color: "inherit",
134
+ borderColor: "currentColor"
135
+ }, n.size === "small" && n.variant === "text" && {
136
+ padding: "4px 5px",
137
+ fontSize: o.typography.pxToRem(13)
138
+ }, n.size === "large" && n.variant === "text" && {
139
+ padding: "8px 11px",
140
+ fontSize: o.typography.pxToRem(15)
141
+ }, n.size === "small" && n.variant === "outlined" && {
142
+ padding: "3px 9px",
143
+ fontSize: o.typography.pxToRem(13)
144
+ }, n.size === "large" && n.variant === "outlined" && {
145
+ padding: "7px 21px",
146
+ fontSize: o.typography.pxToRem(15)
147
+ }, n.size === "small" && n.variant === "contained" && {
148
+ padding: "4px 10px",
149
+ fontSize: o.typography.pxToRem(13)
150
+ }, n.size === "large" && n.variant === "contained" && {
151
+ padding: "8px 22px",
152
+ fontSize: o.typography.pxToRem(15)
153
+ }, n.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
+ }), ao = f("span", {
173
+ name: "MuiButton",
174
+ slot: "StartIcon",
175
+ overridesResolver: (o, n) => {
176
+ const {
177
+ ownerState: i
178
+ } = o;
179
+ return [n.startIcon, n[`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, n) => {
193
+ const {
194
+ ownerState: i
195
+ } = o;
196
+ return [n.endIcon, n[`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(n, i) {
207
+ const e = p.useContext(Y), s = p.useContext(Z), l = U(e, n), 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(ao, {
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(no, 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: a.node,
267
+ /**
268
+ * Override or extend the styles applied to the component.
269
+ */
270
+ classes: a.object,
271
+ /**
272
+ * @ignore
273
+ */
274
+ className: a.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: a.oneOfType([a.oneOf(["inherit", "primary", "secondary", "success", "error", "info", "warning"]), a.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: a.elementType,
287
+ /**
288
+ * If `true`, the component is disabled.
289
+ * @default false
290
+ */
291
+ disabled: a.bool,
292
+ /**
293
+ * If `true`, no elevation is used.
294
+ * @default false
295
+ */
296
+ disableElevation: a.bool,
297
+ /**
298
+ * If `true`, the keyboard focus ripple is disabled.
299
+ * @default false
300
+ */
301
+ disableFocusRipple: a.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: a.bool,
310
+ /**
311
+ * Element placed after the children.
312
+ */
313
+ endIcon: a.node,
314
+ /**
315
+ * @ignore
316
+ */
317
+ focusVisibleClassName: a.string,
318
+ /**
319
+ * If `true`, the button will take up the full width of its container.
320
+ * @default false
321
+ */
322
+ fullWidth: a.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: a.string,
328
+ /**
329
+ * The size of the component.
330
+ * `small` is equivalent to the dense button styling.
331
+ * @default 'medium'
332
+ */
333
+ size: a.oneOfType([a.oneOf(["small", "medium", "large"]), a.string]),
334
+ /**
335
+ * Element placed before the children.
336
+ */
337
+ startIcon: a.node,
338
+ /**
339
+ * The system prop that allows defining system overrides as well as additional CSS styles.
340
+ */
341
+ sx: a.oneOfType([a.arrayOf(a.oneOfType([a.func, a.object, a.bool])), a.func, a.object]),
342
+ /**
343
+ * @ignore
344
+ */
345
+ type: a.oneOfType([a.oneOf(["button", "reset", "submit"]), a.string]),
346
+ /**
347
+ * The variant to use.
348
+ * @default 'text'
349
+ */
350
+ variant: a.oneOfType([a.oneOf(["contained", "outlined", "text"]), a.string])
351
+ });
352
+ const eo = O;
353
+ export {
354
+ eo as B
355
+ };