@cgi-learning-hub/ui 0.0.1-dev.1708424507 → 0.0.1-dev.1708424596
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/components/AnotherComponent/AnotherComponent.cjs.js +1 -1
- package/dist/components/AnotherComponent/AnotherComponent.es.js +6 -7
- package/dist/components/AnotherComponent/AnotherComponent.stories.d.ts +1 -1
- package/dist/components/BasicButtons/BasicButtons.cjs.js +98 -1
- package/dist/components/BasicButtons/BasicButtons.es.js +1897 -103
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +1 -3
- package/dist/components/index.es.js +4 -14
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +4 -14
- package/dist/useTheme-CEi3JABy.cjs +42 -0
- package/dist/useTheme-DVWKQU4F.js +2235 -0
- package/package.json +1 -3
- package/dist/Button-8coRSZ3M.cjs +0 -1
- package/dist/Button-BJMp7Tz3.js +0 -355
- package/dist/ButtonBase-DfYGPVje.js +0 -892
- package/dist/ButtonBase-xIJbOm-V.cjs +0 -75
- package/dist/Input-DS9hzPC3.js +0 -322
- package/dist/Input-DWEaLJ-2.cjs +0 -1
- package/dist/InputBase-B31rEvBe.js +0 -854
- package/dist/InputBase-BuseI3Oe.cjs +0 -4
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +0 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.d.ts +0 -12
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +0 -47
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +0 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.d.ts +0 -9
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +0 -143
- package/dist/components/buttons/DefaultButton/index.cjs.js +0 -1
- package/dist/components/buttons/DefaultButton/index.d.ts +0 -2
- package/dist/components/buttons/DefaultButton/index.es.js +0 -4
- package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +0 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.d.ts +0 -5
- package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +0 -11
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +0 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.d.ts +0 -4
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +0 -24
- package/dist/components/buttons/PrimaryButton/index.cjs.js +0 -1
- package/dist/components/buttons/PrimaryButton/index.d.ts +0 -2
- package/dist/components/buttons/PrimaryButton/index.es.js +0 -4
- package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +0 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.d.ts +0 -5
- package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +0 -11
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +0 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.d.ts +0 -4
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +0 -24
- package/dist/components/buttons/SecondaryButton/index.cjs.js +0 -1
- package/dist/components/buttons/SecondaryButton/index.d.ts +0 -2
- package/dist/components/buttons/SecondaryButton/index.es.js +0 -4
- package/dist/components/buttons/index.cjs.js +0 -1
- package/dist/components/buttons/index.d.ts +0 -3
- package/dist/components/buttons/index.es.js +0 -8
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +0 -1
- package/dist/components/inputs/SearchInput/SearchInput.d.ts +0 -5
- package/dist/components/inputs/SearchInput/SearchInput.es.js +0 -345
- package/dist/components/inputs/SearchInput/index.cjs.js +0 -1
- package/dist/components/inputs/SearchInput/index.d.ts +0 -2
- package/dist/components/inputs/SearchInput/index.es.js +0 -4
- package/dist/components/inputs/TextInput/TextInput.cjs.js +0 -14
- package/dist/components/inputs/TextInput/TextInput.d.ts +0 -5
- package/dist/components/inputs/TextInput/TextInput.es.js +0 -5577
- package/dist/components/inputs/TextInput/index.cjs.js +0 -1
- package/dist/components/inputs/TextInput/index.d.ts +0 -2
- package/dist/components/inputs/TextInput/index.es.js +0 -4
- package/dist/components/inputs/index.cjs.js +0 -1
- package/dist/components/inputs/index.d.ts +0 -2
- package/dist/components/inputs/index.es.js +0 -6
- package/dist/createSvgIcon-BPyRt0N5.js +0 -182
- package/dist/createSvgIcon-Cz9hf1Fl.cjs +0 -1
- package/dist/extendSxProp-DzGZiKZk.js +0 -29
- package/dist/extendSxProp-LEI89AMt.cjs +0 -1
- package/dist/useForkRef-C0Hk1SEc.js +0 -44
- package/dist/useForkRef-YQvz-OME.cjs +0 -1
- package/dist/useTheme-BzgwMQvX.cjs +0 -1
- package/dist/useTheme-D1_U7jx5.js +0 -65
- package/dist/useThemeProps-Aqe6oH65.cjs +0 -65
- package/dist/useThemeProps-Dkkbtzcg.js +0 -2696
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),t=require("@mui/material"),o=require("../../useTheme-CEi3JABy.cjs"),r=()=>{const n=o.useTheme();return e.jsxs("div",{children:[e.jsx("button",{className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",children:"Click me from AnotherComponent"}),e.jsx(t.ButtonBase,{style:{backgroundColor:n.palette.primary.main},children:"AnotherComponent"}),e.jsx(t.Input,{className:"bg-blue-500"})]})};module.exports=r;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const o = r();
|
|
2
|
+
import { ButtonBase as n, Input as r } from "@mui/material";
|
|
3
|
+
import { u as m } from "../../useTheme-DVWKQU4F.js";
|
|
4
|
+
const p = () => {
|
|
5
|
+
const o = m();
|
|
7
6
|
return /* @__PURE__ */ t("div", { children: [
|
|
8
7
|
/* @__PURE__ */ e("button", { className: "bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded", children: "Click me from AnotherComponent" }),
|
|
9
8
|
/* @__PURE__ */ e(n, { style: { backgroundColor: o.palette.primary.main }, children: "AnotherComponent" }),
|
|
10
|
-
/* @__PURE__ */ e(
|
|
9
|
+
/* @__PURE__ */ e(r, { className: "bg-blue-500" })
|
|
11
10
|
] });
|
|
12
11
|
};
|
|
13
12
|
export {
|
|
14
|
-
|
|
13
|
+
p as default
|
|
15
14
|
};
|
|
@@ -1 +1,98 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const j=require("react/jsx-runtime"),B=require("react"),t=require("../../useTheme-CEi3JABy.cjs"),Tt=require("@emotion/styled"),Me=require("@emotion/react");function bt(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const f=bt(B);function Ze(e){var o,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(o=0;o<s;o++)e[o]&&(n=Ze(e[o]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function D(){for(var e,o,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(o=Ze(e))&&(r&&(r+=" "),r+=o);return r}function vt(e,o){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||o(...r)}}function Pt(e){const{prototype:o={}}=e;return!!o.isReactComponent}function gt(e,o,n,r,s){const i=e[o],a=s||o;if(i==null||typeof window>"u")return null;let p;return typeof i=="function"&&!Pt(i)&&(p="Did you accidentally provide a plain function component instead?"),p!==void 0?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${p} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const xt=vt(t.PropTypes.elementType,gt);var Ce={exports:{}},P={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-is.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Le;function Et(){if(Le)return P;Le=1;var e=Symbol.for("react.element"),o=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),p=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),$=Symbol.for("react.offscreen"),R;R=Symbol.for("react.module.reference");function b(l){if(typeof l=="object"&&l!==null){var S=l.$$typeof;switch(S){case e:switch(l=l.type,l){case n:case s:case r:case u:case y:return l;default:switch(l=l&&l.$$typeof,l){case p:case a:case c:case v:case x:case i:return l;default:return S}}case o:return S}}}return P.ContextConsumer=a,P.ContextProvider=i,P.Element=e,P.ForwardRef=c,P.Fragment=n,P.Lazy=v,P.Memo=x,P.Portal=o,P.Profiler=s,P.StrictMode=r,P.Suspense=u,P.SuspenseList=y,P.isAsyncMode=function(){return!1},P.isConcurrentMode=function(){return!1},P.isContextConsumer=function(l){return b(l)===a},P.isContextProvider=function(l){return b(l)===i},P.isElement=function(l){return typeof l=="object"&&l!==null&&l.$$typeof===e},P.isForwardRef=function(l){return b(l)===c},P.isFragment=function(l){return b(l)===n},P.isLazy=function(l){return b(l)===v},P.isMemo=function(l){return b(l)===x},P.isPortal=function(l){return b(l)===o},P.isProfiler=function(l){return b(l)===s},P.isStrictMode=function(l){return b(l)===r},P.isSuspense=function(l){return b(l)===u},P.isSuspenseList=function(l){return b(l)===y},P.isValidElementType=function(l){return typeof l=="string"||typeof l=="function"||l===n||l===s||l===r||l===u||l===y||l===$||typeof l=="object"&&l!==null&&(l.$$typeof===v||l.$$typeof===x||l.$$typeof===i||l.$$typeof===a||l.$$typeof===c||l.$$typeof===R||l.getModuleId!==void 0)},P.typeOf=b,P}var g={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-is.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var De;function Rt(){return De||(De=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),o=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),p=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),$=Symbol.for("react.offscreen"),R=!1,b=!1,l=!1,S=!1,z=!1,I;I=Symbol.for("react.module.reference");function T(d){return!!(typeof d=="string"||typeof d=="function"||d===n||d===s||z||d===r||d===u||d===y||S||d===$||R||b||l||typeof d=="object"&&d!==null&&(d.$$typeof===v||d.$$typeof===x||d.$$typeof===i||d.$$typeof===a||d.$$typeof===c||d.$$typeof===I||d.getModuleId!==void 0))}function m(d){if(typeof d=="object"&&d!==null){var Q=d.$$typeof;switch(Q){case e:var H=d.type;switch(H){case n:case s:case r:case u:case y:return H;default:var ne=H&&H.$$typeof;switch(ne){case p:case a:case c:case v:case x:case i:return ne;default:return Q}}case o:return Q}}}var E=a,O=i,N=e,w=c,M=n,_=v,C=x,V=o,k=s,W=r,L=u,G=y,F=!1,te=!1;function oe(d){return F||(F=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function ye(d){return te||(te=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function me(d){return m(d)===a}function he(d){return m(d)===i}function Y(d){return typeof d=="object"&&d!==null&&d.$$typeof===e}function X(d){return m(d)===c}function Z(d){return m(d)===n}function Te(d){return m(d)===v}function J(d){return m(d)===x}function U(d){return m(d)===o}function be(d){return m(d)===s}function ve(d){return m(d)===r}function Pe(d){return m(d)===u}function ge(d){return m(d)===y}g.ContextConsumer=E,g.ContextProvider=O,g.Element=N,g.ForwardRef=w,g.Fragment=M,g.Lazy=_,g.Memo=C,g.Portal=V,g.Profiler=k,g.StrictMode=W,g.Suspense=L,g.SuspenseList=G,g.isAsyncMode=oe,g.isConcurrentMode=ye,g.isContextConsumer=me,g.isContextProvider=he,g.isElement=Y,g.isForwardRef=X,g.isFragment=Z,g.isLazy=Te,g.isMemo=J,g.isPortal=U,g.isProfiler=be,g.isStrictMode=ve,g.isSuspense=Pe,g.isSuspenseList=ge,g.isValidElementType=T,g.typeOf=m}()),g}process.env.NODE_ENV==="production"?Ce.exports=Et():Ce.exports=Rt();var we=Ce.exports;const _t=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Ct(e){const o=`${e}`.match(_t);return o&&o[1]||""}function Je(e,o=""){return e.displayName||e.name||Ct(e)||o}function Ae(e,o,n){const r=Je(o);return e.displayName||(r!==""?`${n}(${r})`:n)}function St(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Je(e,"Component");if(typeof e=="object")switch(e.$$typeof){case we.ForwardRef:return Ae(e,e.render,"ForwardRef");case we.Memo:return Ae(e,e.type,"memo");default:return}}}const $t=t.PropTypes.oneOfType([t.PropTypes.func,t.PropTypes.object]),Ot=$t;function Mt(e,o){typeof e=="function"?e(o):e&&(e.current=o)}const It=typeof window<"u"?f.useLayoutEffect:f.useEffect;function se(e){const o=f.useRef(e);return It(()=>{o.current=e}),f.useRef((...n)=>(0,o.current)(...n)).current}function We(...e){return f.useMemo(()=>e.every(o=>o==null)?null:o=>{e.forEach(n=>{Mt(n,o)})},e)}const Ue={};function zt(e,o){const n=f.useRef(Ue);return n.current===Ue&&(n.current=e(o)),n}const Nt=[];function Vt(e){f.useEffect(e,Nt)}class ue{constructor(){this.currentId=0,this.clear=()=>{this.currentId!==0&&(clearTimeout(this.currentId),this.currentId=0)},this.disposeEffect=()=>this.clear}static create(){return new ue}start(o,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,n()},o)}}function jt(){const e=zt(ue.create).current;return Vt(e.disposeEffect),e}let pe=!0,Se=!1;const kt=new ue,Bt={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Ft(e){const{type:o,tagName:n}=e;return!!(n==="INPUT"&&Bt[o]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function Lt(e){e.metaKey||e.altKey||e.ctrlKey||(pe=!0)}function Re(){pe=!1}function Dt(){this.visibilityState==="hidden"&&Se&&(pe=!0)}function wt(e){e.addEventListener("keydown",Lt,!0),e.addEventListener("mousedown",Re,!0),e.addEventListener("pointerdown",Re,!0),e.addEventListener("touchstart",Re,!0),e.addEventListener("visibilitychange",Dt,!0)}function At(e){const{target:o}=e;try{return o.matches(":focus-visible")}catch{}return pe||Ft(o)}function Wt(){const e=f.useCallback(s=>{s!=null&&wt(s.ownerDocument)},[]),o=f.useRef(!1);function n(){return o.current?(Se=!0,kt.start(100,()=>{Se=!1}),o.current=!1,!0):!1}function r(s){return At(s)?(o.current=!0,!0):!1}return{isFocusVisibleRef:o,onFocus:r,onBlur:n,ref:e}}function Ie(e,o){const n=t._extends({},o);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=t._extends({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const s=e[r]||{},i=o[r];n[r]={},!i||!Object.keys(i)?n[r]=s:!s||!Object.keys(s)?n[r]=i:(n[r]=t._extends({},i),Object.keys(s).forEach(a=>{n[r][a]=Ie(s[a],i[a])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function ze(e,o,n=void 0){const r={};return Object.keys(e).forEach(s=>{r[s]=e[s].reduce((i,a)=>{if(a){const p=o(a);p!==""&&i.push(p),n&&n[a]&&i.push(n[a])}return i},[]).join(" ")}),r}function Ne(e,o,n="Mui"){const r={};return o.forEach(s=>{r[s]=t.generateUtilityClass(e,s,n)}),r}/**
|
|
18
|
+
* @mui/styled-engine v5.15.9
|
|
19
|
+
*
|
|
20
|
+
* @license MIT
|
|
21
|
+
* This source code is licensed under the MIT license found in the
|
|
22
|
+
* LICENSE file in the root directory of this source tree.
|
|
23
|
+
*/function Ut(e,o){const n=Tt(e,o);return process.env.NODE_ENV!=="production"?(...r)=>{const s=typeof e=="string"?`"${e}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${s})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
24
|
+
`)):r.some(i=>i===void 0)&&console.error(`MUI: the styled(${s})(...args) API requires all its args to be defined.`),n(...r)}:n}const Yt=(e,o)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=o(e.__emotion_styles))},qt=["sx"],Gt=e=>{var o,n;const r={systemProps:{},otherProps:{}},s=(o=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?o:t.defaultSxConfig;return Object.keys(e).forEach(i=>{s[i]?r.systemProps[i]=e[i]:r.otherProps[i]=e[i]}),r};function Kt(e){const{sx:o}=e,n=t._objectWithoutPropertiesLoose(e,qt),{systemProps:r,otherProps:s}=Gt(n);let i;return Array.isArray(o)?i=[r,...o]:typeof o=="function"?i=(...a)=>{const p=o(...a);return t.isPlainObject(p)?t._extends({},r,p):r}:i=t._extends({},r,o),t._extends({},s,{sx:i})}const Xt=["ownerState"],Ht=["variants"],Zt=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Jt(e){return Object.keys(e).length===0}function Qt(e){return typeof e=="string"&&e.charCodeAt(0)>96}function ce(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const eo=t.createTheme(),Ye=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function ie({defaultTheme:e,theme:o,themeId:n}){return Jt(o)?e:o[n]||o}function to(e){return e?(o,n)=>n[e]:null}function le(e,o){let{ownerState:n}=o,r=t._objectWithoutPropertiesLoose(o,Xt);const s=typeof e=="function"?e(t._extends({ownerState:n},r)):e;if(Array.isArray(s))return s.flatMap(i=>le(i,t._extends({ownerState:n},r)));if(s&&typeof s=="object"&&Array.isArray(s.variants)){const{variants:i=[]}=s;let p=t._objectWithoutPropertiesLoose(s,Ht);return i.forEach(c=>{let u=!0;typeof c.props=="function"?u=c.props(t._extends({ownerState:n},r)):Object.keys(c.props).forEach(y=>{(n==null?void 0:n[y])!==c.props[y]&&r[y]!==c.props[y]&&(u=!1)}),u&&(Array.isArray(p)||(p=[p]),p.push(typeof c.style=="function"?c.style(t._extends({ownerState:n},r)):c.style))}),p}return s}function Qe(e={}){const{themeId:o,defaultTheme:n=eo,rootShouldForwardProp:r=ce,slotShouldForwardProp:s=ce}=e,i=a=>t.styleFunctionSx(t._extends({},a,{theme:ie(t._extends({},a,{defaultTheme:n,themeId:o}))}));return i.__mui_systemSx=!0,(a,p={})=>{Yt(a,m=>m.filter(E=>!(E!=null&&E.__mui_systemSx)));const{name:c,slot:u,skipVariantsResolver:y,skipSx:x,overridesResolver:v=to(Ye(u))}=p,$=t._objectWithoutPropertiesLoose(p,Zt),R=y!==void 0?y:u&&u!=="Root"&&u!=="root"||!1,b=x||!1;let l;process.env.NODE_ENV!=="production"&&c&&(l=`${c}-${Ye(u||"Root")}`);let S=ce;u==="Root"||u==="root"?S=r:u?S=s:Qt(a)&&(S=void 0);const z=Ut(a,t._extends({shouldForwardProp:S,label:l},$)),I=m=>typeof m=="function"&&m.__emotion_real!==m||t.isPlainObject(m)?E=>le(m,t._extends({},E,{theme:ie({theme:E.theme,defaultTheme:n,themeId:o})})):m,T=(m,...E)=>{let O=I(m);const N=E?E.map(I):[];c&&v&&N.push(_=>{const C=ie(t._extends({},_,{defaultTheme:n,themeId:o}));if(!C.components||!C.components[c]||!C.components[c].styleOverrides)return null;const V=C.components[c].styleOverrides,k={};return Object.entries(V).forEach(([W,L])=>{k[W]=le(L,t._extends({},_,{theme:C}))}),v(_,k)}),c&&!R&&N.push(_=>{var C;const V=ie(t._extends({},_,{defaultTheme:n,themeId:o})),k=V==null||(C=V.components)==null||(C=C[c])==null?void 0:C.variants;return le({variants:k},t._extends({},_,{theme:V}))}),b||N.push(i);const w=N.length-E.length;if(Array.isArray(m)&&w>0){const _=new Array(w).fill("");O=[...m,..._],O.raw=[...m.raw,..._]}const M=z(O,...N);if(process.env.NODE_ENV!=="production"){let _;c&&(_=`${c}${t.capitalize(u||"")}`),_===void 0&&(_=`Styled(${St(a)})`),M.displayName=_}return a.muiName&&(M.muiName=a.muiName),M};return z.withConfig&&(T.withConfig=z.withConfig),T}}const oo=Qe();function no(e){const{theme:o,name:n,props:r}=e;return!o||!o.components||!o.components[n]||!o.components[n].defaultProps?r:Ie(o.components[n].defaultProps,r)}function et({props:e,name:o,defaultTheme:n,themeId:r}){let s=t.useTheme$1(n);return r&&(s=s[r]||s),no({theme:s,name:o,props:e})}const ro=["component","direction","spacing","divider","children","className","useFlexGap"],so=t.createTheme(),io=oo("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,o)=>o.root});function ao(e){return et({props:e,name:"MuiStack",defaultTheme:so})}function co(e,o){const n=f.Children.toArray(e).filter(Boolean);return n.reduce((r,s,i)=>(r.push(s),i<n.length-1&&r.push(f.cloneElement(o,{key:`separator-${i}`})),r),[])}const lo=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],uo=({ownerState:e,theme:o})=>{let n=t._extends({display:"flex",flexDirection:"column"},t.handleBreakpoints({theme:o},t.resolveBreakpointValues({values:e.direction,breakpoints:o.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=t.createUnarySpacing(o),s=Object.keys(o.breakpoints.values).reduce((c,u)=>((typeof e.spacing=="object"&&e.spacing[u]!=null||typeof e.direction=="object"&&e.direction[u]!=null)&&(c[u]=!0),c),{}),i=t.resolveBreakpointValues({values:e.direction,base:s}),a=t.resolveBreakpointValues({values:e.spacing,base:s});typeof i=="object"&&Object.keys(i).forEach((c,u,y)=>{if(!i[c]){const v=u>0?i[y[u-1]]:"column";i[c]=v}});const p=(c,u)=>e.useFlexGap?{gap:t.getValue(r,c)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${lo(u?i[u]:e.direction)}`]:t.getValue(r,c)}};n=t.deepmerge(n,t.handleBreakpoints({theme:o},a,p))}return n=t.mergeBreakpointsInOrder(o.breakpoints,n),n};function po(e={}){const{createStyledComponent:o=io,useThemeProps:n=ao,componentName:r="MuiStack"}=e,s=()=>ze({root:["root"]},c=>t.generateUtilityClass(r,c),{}),i=o(uo),a=f.forwardRef(function(c,u){const y=n(c),x=Kt(y),{component:v="div",direction:$="column",spacing:R=0,divider:b,children:l,className:S,useFlexGap:z=!1}=x,I=t._objectWithoutPropertiesLoose(x,ro),T={direction:$,spacing:R,useFlexGap:z},m=s();return j.jsx(i,t._extends({as:v,ownerState:T,ref:u,className:D(m.root,S)},I,{children:b?co(l,b):l}))});return process.env.NODE_ENV!=="production"&&(a.propTypes={children:t.PropTypes.node,direction:t.PropTypes.oneOfType([t.PropTypes.oneOf(["column-reverse","column","row-reverse","row"]),t.PropTypes.arrayOf(t.PropTypes.oneOf(["column-reverse","column","row-reverse","row"])),t.PropTypes.object]),divider:t.PropTypes.node,spacing:t.PropTypes.oneOfType([t.PropTypes.arrayOf(t.PropTypes.oneOfType([t.PropTypes.number,t.PropTypes.string])),t.PropTypes.number,t.PropTypes.object,t.PropTypes.string]),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])}),a}const tt=e=>ce(e)&&e!=="classes",q=Qe({themeId:t.THEME_ID,defaultTheme:t.defaultTheme,rootShouldForwardProp:tt});function de({props:e,name:o}){return et({props:e,name:o,defaultTheme:t.defaultTheme,themeId:t.THEME_ID})}function $e(e,o){return $e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},$e(e,o)}function fo(e,o){e.prototype=Object.create(o.prototype),e.prototype.constructor=e,$e(e,o)}const qe=B.createContext(null);function yo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ve(e,o){var n=function(i){return o&&B.isValidElement(i)?o(i):i},r=Object.create(null);return e&&B.Children.map(e,function(s){return s}).forEach(function(s){r[s.key]=n(s)}),r}function mo(e,o){e=e||{},o=o||{};function n(y){return y in o?o[y]:e[y]}var r=Object.create(null),s=[];for(var i in e)i in o?s.length&&(r[i]=s,s=[]):s.push(i);var a,p={};for(var c in o){if(r[c])for(a=0;a<r[c].length;a++){var u=r[c][a];p[r[c][a]]=n(u)}p[c]=n(c)}for(a=0;a<s.length;a++)p[s[a]]=n(s[a]);return p}function K(e,o,n){return n[o]!=null?n[o]:e.props[o]}function ho(e,o){return Ve(e.children,function(n){return B.cloneElement(n,{onExited:o.bind(null,n),in:!0,appear:K(n,"appear",e),enter:K(n,"enter",e),exit:K(n,"exit",e)})})}function To(e,o,n){var r=Ve(e.children),s=mo(o,r);return Object.keys(s).forEach(function(i){var a=s[i];if(B.isValidElement(a)){var p=i in o,c=i in r,u=o[i],y=B.isValidElement(u)&&!u.props.in;c&&(!p||y)?s[i]=B.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:K(a,"exit",e),enter:K(a,"enter",e)}):!c&&p&&!y?s[i]=B.cloneElement(a,{in:!1}):c&&p&&B.isValidElement(u)&&(s[i]=B.cloneElement(a,{onExited:n.bind(null,a),in:u.props.in,exit:K(a,"exit",e),enter:K(a,"enter",e)}))}}),s}var bo=Object.values||function(e){return Object.keys(e).map(function(o){return e[o]})},vo={component:"div",childFactory:function(o){return o}},je=function(e){fo(o,e);function o(r,s){var i;i=e.call(this,r,s)||this;var a=i.handleExited.bind(yo(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var n=o.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},o.getDerivedStateFromProps=function(s,i){var a=i.children,p=i.handleExited,c=i.firstRender;return{children:c?ho(s,p):To(s,a,p),firstRender:!1}},n.handleExited=function(s,i){var a=Ve(this.props.children);s.key in a||(s.props.onExited&&s.props.onExited(i),this.mounted&&this.setState(function(p){var c=t._extends({},p.children);return delete c[s.key],{children:c}}))},n.render=function(){var s=this.props,i=s.component,a=s.childFactory,p=t._objectWithoutPropertiesLoose(s,["component","childFactory"]),c=this.state.contextValue,u=bo(this.state.children).map(a);return delete p.appear,delete p.enter,delete p.exit,i===null?B.createElement(qe.Provider,{value:c},u):B.createElement(qe.Provider,{value:c},B.createElement(i,p,u))},o}(B.Component);je.propTypes=process.env.NODE_ENV!=="production"?{component:t.PropTypes.any,children:t.PropTypes.node,appear:t.PropTypes.bool,enter:t.PropTypes.bool,exit:t.PropTypes.bool,childFactory:t.PropTypes.func}:{};je.defaultProps=vo;const Po=je;function ot(e){const{className:o,classes:n,pulsate:r=!1,rippleX:s,rippleY:i,rippleSize:a,in:p,onExited:c,timeout:u}=e,[y,x]=f.useState(!1),v=D(o,n.ripple,n.rippleVisible,r&&n.ripplePulsate),$={width:a,height:a,top:-(a/2)+i,left:-(a/2)+s},R=D(n.child,y&&n.childLeaving,r&&n.childPulsate);return!p&&!y&&x(!0),f.useEffect(()=>{if(!p&&c!=null){const b=setTimeout(c,u);return()=>{clearTimeout(b)}}},[c,p,u]),j.jsx("span",{className:v,style:$,children:j.jsx("span",{className:R})})}process.env.NODE_ENV!=="production"&&(ot.propTypes={classes:t.PropTypes.object.isRequired,className:t.PropTypes.string,in:t.PropTypes.bool,onExited:t.PropTypes.func,pulsate:t.PropTypes.bool,rippleSize:t.PropTypes.number,rippleX:t.PropTypes.number,rippleY:t.PropTypes.number,timeout:t.PropTypes.number.isRequired});const A=Ne("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),go=["center","classes","className"];let fe=e=>e,Ge,Ke,Xe,He;const Oe=550,xo=80,Eo=Me.keyframes(Ge||(Ge=fe`
|
|
25
|
+
0% {
|
|
26
|
+
transform: scale(0);
|
|
27
|
+
opacity: 0.1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
100% {
|
|
31
|
+
transform: scale(1);
|
|
32
|
+
opacity: 0.3;
|
|
33
|
+
}
|
|
34
|
+
`)),Ro=Me.keyframes(Ke||(Ke=fe`
|
|
35
|
+
0% {
|
|
36
|
+
opacity: 1;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
100% {
|
|
40
|
+
opacity: 0;
|
|
41
|
+
}
|
|
42
|
+
`)),_o=Me.keyframes(Xe||(Xe=fe`
|
|
43
|
+
0% {
|
|
44
|
+
transform: scale(1);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
50% {
|
|
48
|
+
transform: scale(0.92);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
100% {
|
|
52
|
+
transform: scale(1);
|
|
53
|
+
}
|
|
54
|
+
`)),Co=q("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),So=q(ot,{name:"MuiTouchRipple",slot:"Ripple"})(He||(He=fe`
|
|
55
|
+
opacity: 0;
|
|
56
|
+
position: absolute;
|
|
57
|
+
|
|
58
|
+
&.${0} {
|
|
59
|
+
opacity: 0.3;
|
|
60
|
+
transform: scale(1);
|
|
61
|
+
animation-name: ${0};
|
|
62
|
+
animation-duration: ${0}ms;
|
|
63
|
+
animation-timing-function: ${0};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&.${0} {
|
|
67
|
+
animation-duration: ${0}ms;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
& .${0} {
|
|
71
|
+
opacity: 1;
|
|
72
|
+
display: block;
|
|
73
|
+
width: 100%;
|
|
74
|
+
height: 100%;
|
|
75
|
+
border-radius: 50%;
|
|
76
|
+
background-color: currentColor;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
& .${0} {
|
|
80
|
+
opacity: 0;
|
|
81
|
+
animation-name: ${0};
|
|
82
|
+
animation-duration: ${0}ms;
|
|
83
|
+
animation-timing-function: ${0};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
& .${0} {
|
|
87
|
+
position: absolute;
|
|
88
|
+
/* @noflip */
|
|
89
|
+
left: 0px;
|
|
90
|
+
top: 0;
|
|
91
|
+
animation-name: ${0};
|
|
92
|
+
animation-duration: 2500ms;
|
|
93
|
+
animation-timing-function: ${0};
|
|
94
|
+
animation-iteration-count: infinite;
|
|
95
|
+
animation-delay: 200ms;
|
|
96
|
+
}
|
|
97
|
+
`),A.rippleVisible,Eo,Oe,({theme:e})=>e.transitions.easing.easeInOut,A.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,A.child,A.childLeaving,Ro,Oe,({theme:e})=>e.transitions.easing.easeInOut,A.childPulsate,_o,({theme:e})=>e.transitions.easing.easeInOut),nt=f.forwardRef(function(o,n){const r=de({props:o,name:"MuiTouchRipple"}),{center:s=!1,classes:i={},className:a}=r,p=t._objectWithoutPropertiesLoose(r,go),[c,u]=f.useState([]),y=f.useRef(0),x=f.useRef(null);f.useEffect(()=>{x.current&&(x.current(),x.current=null)},[c]);const v=f.useRef(!1),$=jt(),R=f.useRef(null),b=f.useRef(null),l=f.useCallback(T=>{const{pulsate:m,rippleX:E,rippleY:O,rippleSize:N,cb:w}=T;u(M=>[...M,j.jsx(So,{classes:{ripple:D(i.ripple,A.ripple),rippleVisible:D(i.rippleVisible,A.rippleVisible),ripplePulsate:D(i.ripplePulsate,A.ripplePulsate),child:D(i.child,A.child),childLeaving:D(i.childLeaving,A.childLeaving),childPulsate:D(i.childPulsate,A.childPulsate)},timeout:Oe,pulsate:m,rippleX:E,rippleY:O,rippleSize:N},y.current)]),y.current+=1,x.current=w},[i]),S=f.useCallback((T={},m={},E=()=>{})=>{const{pulsate:O=!1,center:N=s||m.pulsate,fakeElement:w=!1}=m;if((T==null?void 0:T.type)==="mousedown"&&v.current){v.current=!1;return}(T==null?void 0:T.type)==="touchstart"&&(v.current=!0);const M=w?null:b.current,_=M?M.getBoundingClientRect():{width:0,height:0,left:0,top:0};let C,V,k;if(N||T===void 0||T.clientX===0&&T.clientY===0||!T.clientX&&!T.touches)C=Math.round(_.width/2),V=Math.round(_.height/2);else{const{clientX:W,clientY:L}=T.touches&&T.touches.length>0?T.touches[0]:T;C=Math.round(W-_.left),V=Math.round(L-_.top)}if(N)k=Math.sqrt((2*_.width**2+_.height**2)/3),k%2===0&&(k+=1);else{const W=Math.max(Math.abs((M?M.clientWidth:0)-C),C)*2+2,L=Math.max(Math.abs((M?M.clientHeight:0)-V),V)*2+2;k=Math.sqrt(W**2+L**2)}T!=null&&T.touches?R.current===null&&(R.current=()=>{l({pulsate:O,rippleX:C,rippleY:V,rippleSize:k,cb:E})},$.start(xo,()=>{R.current&&(R.current(),R.current=null)})):l({pulsate:O,rippleX:C,rippleY:V,rippleSize:k,cb:E})},[s,l,$]),z=f.useCallback(()=>{S({},{pulsate:!0})},[S]),I=f.useCallback((T,m)=>{if($.clear(),(T==null?void 0:T.type)==="touchend"&&R.current){R.current(),R.current=null,$.start(0,()=>{I(T,m)});return}R.current=null,u(E=>E.length>0?E.slice(1):E),x.current=m},[$]);return f.useImperativeHandle(n,()=>({pulsate:z,start:S,stop:I}),[z,S,I]),j.jsx(Co,t._extends({className:D(A.root,i.root,a),ref:b},p,{children:j.jsx(Po,{component:null,exit:!0,children:c})}))});process.env.NODE_ENV!=="production"&&(nt.propTypes={center:t.PropTypes.bool,classes:t.PropTypes.object,className:t.PropTypes.string});const $o=nt;function Oo(e){return t.generateUtilityClass("MuiButtonBase",e)}const Mo=Ne("MuiButtonBase",["root","disabled","focusVisible"]),Io=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],zo=e=>{const{disabled:o,focusVisible:n,focusVisibleClassName:r,classes:s}=e,a=ze({root:["root",o&&"disabled",n&&"focusVisible"]},Oo,s);return n&&r&&(a.root+=` ${r}`),a},No=q("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,o)=>o.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Mo.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),rt=f.forwardRef(function(o,n){const r=de({props:o,name:"MuiButtonBase"}),{action:s,centerRipple:i=!1,children:a,className:p,component:c="button",disabled:u=!1,disableRipple:y=!1,disableTouchRipple:x=!1,focusRipple:v=!1,LinkComponent:$="a",onBlur:R,onClick:b,onContextMenu:l,onDragLeave:S,onFocus:z,onFocusVisible:I,onKeyDown:T,onKeyUp:m,onMouseDown:E,onMouseLeave:O,onMouseUp:N,onTouchEnd:w,onTouchMove:M,onTouchStart:_,tabIndex:C=0,TouchRippleProps:V,touchRippleRef:k,type:W}=r,L=t._objectWithoutPropertiesLoose(r,Io),G=f.useRef(null),F=f.useRef(null),te=We(F,k),{isFocusVisibleRef:oe,onFocus:ye,onBlur:me,ref:he}=Wt(),[Y,X]=f.useState(!1);u&&Y&&X(!1),f.useImperativeHandle(s,()=>({focusVisible:()=>{X(!0),G.current.focus()}}),[]);const[Z,Te]=f.useState(!1);f.useEffect(()=>{Te(!0)},[]);const J=Z&&!y&&!u;f.useEffect(()=>{Y&&v&&!y&&Z&&F.current.pulsate()},[y,v,Y,Z]);function U(h,Be,ht=x){return se(Fe=>(Be&&Be(Fe),!ht&&F.current&&F.current[h](Fe),!0))}const be=U("start",E),ve=U("stop",l),Pe=U("stop",S),ge=U("stop",N),d=U("stop",h=>{Y&&h.preventDefault(),O&&O(h)}),Q=U("start",_),H=U("stop",w),ne=U("stop",M),ut=U("stop",h=>{me(h),oe.current===!1&&X(!1),R&&R(h)},!1),pt=se(h=>{G.current||(G.current=h.currentTarget),ye(h),oe.current===!0&&(X(!0),I&&I(h)),z&&z(h)}),xe=()=>{const h=G.current;return c&&c!=="button"&&!(h.tagName==="A"&&h.href)},Ee=f.useRef(!1),dt=se(h=>{v&&!Ee.current&&Y&&F.current&&h.key===" "&&(Ee.current=!0,F.current.stop(h,()=>{F.current.start(h)})),h.target===h.currentTarget&&xe()&&h.key===" "&&h.preventDefault(),T&&T(h),h.target===h.currentTarget&&xe()&&h.key==="Enter"&&!u&&(h.preventDefault(),b&&b(h))}),ft=se(h=>{v&&h.key===" "&&F.current&&Y&&!h.defaultPrevented&&(Ee.current=!1,F.current.stop(h,()=>{F.current.pulsate(h)})),m&&m(h),b&&h.target===h.currentTarget&&xe()&&h.key===" "&&!h.defaultPrevented&&b(h)});let re=c;re==="button"&&(L.href||L.to)&&(re=$);const ee={};re==="button"?(ee.type=W===void 0?"button":W,ee.disabled=u):(!L.href&&!L.to&&(ee.role="button"),u&&(ee["aria-disabled"]=u));const yt=We(n,he,G);process.env.NODE_ENV!=="production"&&f.useEffect(()=>{J&&!F.current&&console.error(["MUI: The `component` prop provided to ButtonBase is invalid.","Please make sure the children prop is rendered in this custom component."].join(`
|
|
98
|
+
`))},[J]);const ke=t._extends({},r,{centerRipple:i,component:c,disabled:u,disableRipple:y,disableTouchRipple:x,focusRipple:v,tabIndex:C,focusVisible:Y}),mt=zo(ke);return j.jsxs(No,t._extends({as:re,className:D(mt.root,p),ownerState:ke,onBlur:ut,onClick:b,onContextMenu:ve,onFocus:pt,onKeyDown:dt,onKeyUp:ft,onMouseDown:be,onMouseLeave:d,onMouseUp:ge,onDragLeave:Pe,onTouchEnd:H,onTouchMove:ne,onTouchStart:Q,ref:yt,tabIndex:u?-1:C,type:W},ee,L,{children:[a,J?j.jsx($o,t._extends({ref:te,center:i},V)):null]}))});process.env.NODE_ENV!=="production"&&(rt.propTypes={action:Ot,centerRipple:t.PropTypes.bool,children:t.PropTypes.node,classes:t.PropTypes.object,className:t.PropTypes.string,component:xt,disabled:t.PropTypes.bool,disableRipple:t.PropTypes.bool,disableTouchRipple:t.PropTypes.bool,focusRipple:t.PropTypes.bool,focusVisibleClassName:t.PropTypes.string,href:t.PropTypes.any,LinkComponent:t.PropTypes.elementType,onBlur:t.PropTypes.func,onClick:t.PropTypes.func,onContextMenu:t.PropTypes.func,onDragLeave:t.PropTypes.func,onFocus:t.PropTypes.func,onFocusVisible:t.PropTypes.func,onKeyDown:t.PropTypes.func,onKeyUp:t.PropTypes.func,onMouseDown:t.PropTypes.func,onMouseLeave:t.PropTypes.func,onMouseUp:t.PropTypes.func,onTouchEnd:t.PropTypes.func,onTouchMove:t.PropTypes.func,onTouchStart:t.PropTypes.func,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]),tabIndex:t.PropTypes.number,TouchRippleProps:t.PropTypes.object,touchRippleRef:t.PropTypes.oneOfType([t.PropTypes.func,t.PropTypes.shape({current:t.PropTypes.shape({pulsate:t.PropTypes.func.isRequired,start:t.PropTypes.func.isRequired,stop:t.PropTypes.func.isRequired})})]),type:t.PropTypes.oneOfType([t.PropTypes.oneOf(["button","reset","submit"]),t.PropTypes.string])});const Vo=rt;function jo(e){return t.generateUtilityClass("MuiButton",e)}const ko=Ne("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"]),ae=ko,st=f.createContext({});process.env.NODE_ENV!=="production"&&(st.displayName="ButtonGroupContext");const Bo=st,it=f.createContext(void 0);process.env.NODE_ENV!=="production"&&(it.displayName="ButtonGroupButtonContext");const Fo=it,Lo=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Do=e=>{const{color:o,disableElevation:n,fullWidth:r,size:s,variant:i,classes:a}=e,p={root:["root",i,`${i}${t.capitalize(o)}`,`size${t.capitalize(s)}`,`${i}Size${t.capitalize(s)}`,o==="inherit"&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${t.capitalize(s)}`],endIcon:["endIcon",`iconSize${t.capitalize(s)}`]},c=ze(p,jo,a);return t._extends({},a,c)},at=e=>t._extends({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),wo=q(Vo,{shouldForwardProp:e=>tt(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:n}=e;return[o.root,o[n.variant],o[`${n.variant}${t.capitalize(n.color)}`],o[`size${t.capitalize(n.size)}`],o[`${n.variant}Size${t.capitalize(n.size)}`],n.color==="inherit"&&o.colorInherit,n.disableElevation&&o.disableElevation,n.fullWidth&&o.fullWidth]}})(({theme:e,ownerState:o})=>{var n,r;const s=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],i=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return t._extends({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":t._extends({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:t.alpha(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},o.variant==="text"&&o.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:t.alpha(e.palette[o.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},o.variant==="outlined"&&o.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[o.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:t.alpha(e.palette[o.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},o.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},o.variant==="contained"&&o.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[o.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[o.color].main}}),"&:active":t._extends({},o.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${ae.focusVisible}`]:t._extends({},o.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${ae.disabled}`]:t._extends({color:(e.vars||e).palette.action.disabled},o.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},o.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},o.variant==="text"&&{padding:"6px 8px"},o.variant==="text"&&o.color!=="inherit"&&{color:(e.vars||e).palette[o.color].main},o.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},o.variant==="outlined"&&o.color!=="inherit"&&{color:(e.vars||e).palette[o.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[o.color].mainChannel} / 0.5)`:`1px solid ${t.alpha(e.palette[o.color].main,.5)}`},o.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:s,boxShadow:(e.vars||e).shadows[2]},o.variant==="contained"&&o.color!=="inherit"&&{color:(e.vars||e).palette[o.color].contrastText,backgroundColor:(e.vars||e).palette[o.color].main},o.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},o.size==="small"&&o.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},o.size==="large"&&o.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},o.size==="small"&&o.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},o.size==="large"&&o.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},o.size==="small"&&o.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},o.size==="large"&&o.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},o.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${ae.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${ae.disabled}`]:{boxShadow:"none"}}),Ao=q("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,o)=>{const{ownerState:n}=e;return[o.startIcon,o[`iconSize${t.capitalize(n.size)}`]]}})(({ownerState:e})=>t._extends({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},at(e))),Wo=q("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,o)=>{const{ownerState:n}=e;return[o.endIcon,o[`iconSize${t.capitalize(n.size)}`]]}})(({ownerState:e})=>t._extends({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},at(e))),ct=f.forwardRef(function(o,n){const r=f.useContext(Bo),s=f.useContext(Fo),i=Ie(r,o),a=de({props:i,name:"MuiButton"}),{children:p,color:c="primary",component:u="button",className:y,disabled:x=!1,disableElevation:v=!1,disableFocusRipple:$=!1,endIcon:R,focusVisibleClassName:b,fullWidth:l=!1,size:S="medium",startIcon:z,type:I,variant:T="text"}=a,m=t._objectWithoutPropertiesLoose(a,Lo),E=t._extends({},a,{color:c,component:u,disabled:x,disableElevation:v,disableFocusRipple:$,fullWidth:l,size:S,type:I,variant:T}),O=Do(E),N=z&&j.jsx(Ao,{className:O.startIcon,ownerState:E,children:z}),w=R&&j.jsx(Wo,{className:O.endIcon,ownerState:E,children:R}),M=s||"";return j.jsxs(wo,t._extends({ownerState:E,className:D(r.className,O.root,y,M),component:u,disabled:x,focusRipple:!$,focusVisibleClassName:D(O.focusVisible,b),ref:n,type:I},m,{classes:O,children:[N,p,w]}))});process.env.NODE_ENV!=="production"&&(ct.propTypes={children:t.PropTypes.node,classes:t.PropTypes.object,className:t.PropTypes.string,color:t.PropTypes.oneOfType([t.PropTypes.oneOf(["inherit","primary","secondary","success","error","info","warning"]),t.PropTypes.string]),component:t.PropTypes.elementType,disabled:t.PropTypes.bool,disableElevation:t.PropTypes.bool,disableFocusRipple:t.PropTypes.bool,disableRipple:t.PropTypes.bool,endIcon:t.PropTypes.node,focusVisibleClassName:t.PropTypes.string,fullWidth:t.PropTypes.bool,href:t.PropTypes.string,size:t.PropTypes.oneOfType([t.PropTypes.oneOf(["small","medium","large"]),t.PropTypes.string]),startIcon:t.PropTypes.node,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]),type:t.PropTypes.oneOfType([t.PropTypes.oneOf(["button","reset","submit"]),t.PropTypes.string]),variant:t.PropTypes.oneOfType([t.PropTypes.oneOf(["contained","outlined","text"]),t.PropTypes.string])});const _e=ct,lt=po({createStyledComponent:q("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,o)=>o.root}),useThemeProps:e=>de({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(lt.propTypes={children:t.PropTypes.node,component:t.PropTypes.elementType,direction:t.PropTypes.oneOfType([t.PropTypes.oneOf(["column-reverse","column","row-reverse","row"]),t.PropTypes.arrayOf(t.PropTypes.oneOf(["column-reverse","column","row-reverse","row"])),t.PropTypes.object]),divider:t.PropTypes.node,spacing:t.PropTypes.oneOfType([t.PropTypes.arrayOf(t.PropTypes.oneOfType([t.PropTypes.number,t.PropTypes.string])),t.PropTypes.number,t.PropTypes.object,t.PropTypes.string]),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]),useFlexGap:t.PropTypes.bool});const Uo=lt,Yo=q("button")(({theme:e})=>({backgroundColor:e.palette.primary.main})),qo=()=>{const e=t.useTheme();return j.jsxs(Uo,{spacing:2,direction:"row",children:[j.jsx(Yo,{children:"Styled"}),j.jsx(_e,{variant:"text",style:{backgroundColor:e.palette.primary.main},children:"Text"}),j.jsx(_e,{variant:"contained",children:"Contained"}),j.jsx(_e,{variant:"outlined",children:"Outlined"})]})};module.exports=qo;
|