@cgi-learning-hub/ui 0.0.1-dev.1709027888 → 0.0.1-dev.1709044405
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Box-BOcHeUdU.cjs +1 -0
- package/dist/{Box-CPGTKTgx.js → Box-D7vtSZv3.js} +5 -5
- package/dist/{ButtonBase-B0tkJ9zf.js → ButtonBase-CWtGa3RS.js} +7 -6
- package/dist/{ButtonBase-DCL6Xlnm.cjs → ButtonBase-DiSWcqQX.cjs} +4 -4
- package/dist/{CircularProgress-CguDBnxV.js → CircularProgress-Cz74KUii.js} +37 -36
- package/dist/CircularProgress-DvzJ2zk9.cjs +28 -0
- package/dist/DefaultButton-3CeAmGTy.js +580 -0
- package/dist/DefaultButton-h0ISM4Pr.cjs +1 -0
- package/dist/IconButton-BRyHYK0S.cjs +2 -0
- package/dist/{IconButton-CJ1Nt-jf.js → IconButton-BvgHzYLs.js} +30 -28
- package/dist/{InputBase-C_yPRkam.js → InputBase-DXIea1Cc.js} +3 -3
- package/dist/{InputBase-Dvr5GnwD.cjs → InputBase-Dp2-NOH_.cjs} +3 -3
- package/dist/SearchInput-BVsQljml.js +176 -0
- package/dist/SearchInput-BbZiaK5Z.cjs +1 -0
- package/dist/Tabs-D7bi9NGH.js +1089 -0
- package/dist/Tabs-DBqF7m2y.cjs +4 -0
- package/dist/TextInput-CUnrSiJ9.js +5793 -0
- package/dist/TextInput-D7EBtZs8.cjs +12 -0
- package/dist/TimePicker-CZ8EXNU_.js +17528 -0
- package/dist/TimePicker-DjIOSP8-.cjs +16 -0
- package/dist/{Typography-CyFLZjnE.js → Typography-BsS5MVop.js} +39 -38
- package/dist/Typography-Dj96Ct2C.cjs +1 -0
- package/dist/components/Dropzone/Dropzone.cjs.js +1 -1
- package/dist/components/Dropzone/Dropzone.d.ts +1 -3
- package/dist/components/Dropzone/Dropzone.es.js +4 -4
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +7 -577
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +4 -4
- package/dist/components/buttons/DefaultButton/index.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/index.es.js +2 -2
- package/dist/components/buttons/IconButton.stories.cjs.js +1 -1
- package/dist/components/buttons/IconButton.stories.es.js +2 -2
- package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +4 -4
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +2 -2
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +1 -1
- package/dist/components/buttons/index.cjs.js +1 -1
- package/dist/components/buttons/index.es.js +2 -2
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +30 -2
- package/dist/components/index.es.js +85 -18
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.es.js +6 -173
- package/dist/components/inputs/SearchInput/SearchInput.stories.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.stories.es.js +4 -4
- package/dist/components/inputs/SearchInput/index.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/index.es.js +2 -2
- package/dist/components/inputs/TextInput/TextInput.cjs.js +1 -12
- package/dist/components/inputs/TextInput/TextInput.es.js +5 -5774
- package/dist/components/inputs/TextInput/TextInput.stories.cjs.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.stories.es.js +5 -5
- package/dist/components/inputs/TextInput/index.cjs.js +1 -1
- package/dist/components/inputs/TextInput/index.es.js +2 -2
- package/dist/components/inputs/index.cjs.js +1 -1
- package/dist/components/inputs/index.es.js +4 -4
- package/dist/components/lists/FileList/FileList.cjs.js +1 -1
- package/dist/components/lists/FileList/FileList.es.js +1 -1
- package/dist/components/lists/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/lists/FileList/FileListItem.es.js +5 -5
- package/dist/components/lists/TabList.stories.cjs.js +1 -4
- package/dist/components/lists/TabList.stories.es.js +85 -932
- package/dist/createSvgIcon-DWH-VQOB.cjs +2 -0
- package/dist/{createSvgIcon-m_wsenOJ.js → createSvgIcon-Dt2OaWlr.js} +11 -11
- package/dist/{createSvgIcon-KaSN8JhZ.js → createSvgIcon-FbpDQQ7X.js} +3 -3
- package/dist/createSvgIcon-K1XmJ33T.cjs +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +85 -18
- package/dist/refType-BgO8A5K8.cjs +1 -0
- package/dist/{refType-Hh9tfnoF.js → refType-D_zuIflA.js} +1 -1
- package/dist/{useThemeProps-Dg9Uoq7q.js → styled-DWGei2G_.js} +621 -611
- package/dist/{useThemeProps-jkB5q9ie.cjs → styled-DhUFTujV.cjs} +22 -22
- package/dist/useForkRef-DfdM2MN5.cjs +1 -0
- package/dist/{useIsFocusVisible-BF0lT08B.cjs → useIsFocusVisible-9FderFRK.cjs} +1 -1
- package/dist/{useIsFocusVisible-D8ksiuhS.js → useIsFocusVisible-B88all80.js} +1 -1
- package/dist/{useSlotProps-MoAYME1z.js → useSlotProps-80kGxOhD.js} +2 -2
- package/dist/useSlotProps-DZRn5pp7.cjs +1 -0
- package/dist/{useTheme-DJEDOopE.js → useTheme-Jkpgyx74.js} +1 -1
- package/dist/useTheme-dCptpuPr.cjs +1 -0
- package/dist/{useTimeout-KN97abZR.js → useTimeout-C7IkLqZ9.js} +1 -1
- package/dist/{useTimeout-qjxkiZZn.cjs → useTimeout-DHarDhEH.cjs} +1 -1
- package/package.json +2 -1
- package/dist/Box-7uR7JZiM.cjs +0 -1
- package/dist/CircularProgress-CZX5SfKt.cjs +0 -28
- package/dist/IconButton-De7ZdW2q.cjs +0 -2
- package/dist/Tab-Bhm9hCrX.cjs +0 -1
- package/dist/Tab-C4l6V01S.js +0 -237
- package/dist/Typography-DwsN2Ttm.cjs +0 -1
- package/dist/createSvgIcon-B6bZPuto.cjs +0 -1
- package/dist/createSvgIcon-BX8WQ5r-.cjs +0 -2
- package/dist/refType-CHSN6ysS.cjs +0 -1
- package/dist/useForkRef-CGd3Nhyb.cjs +0 -1
- package/dist/useSlotProps-R4s13HHI.cjs +0 -1
- package/dist/useTheme-BDPYLOoP.cjs +0 -1
- package/dist/{useForkRef-DwN_Iz9R.js → useForkRef-CQ5u1_mH.js} +1 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { g as z, a as R, s as C, c as n, _ as t,
|
|
1
|
+
import { g as z, a as R, s as C, c as n, _ as t, b as f, e as B, f as I, h as O, P as r, i as $ } from "./styled-DWGei2G_.js";
|
|
2
2
|
import * as d from "react";
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { B as x } from "./ButtonBase-
|
|
5
|
-
import { c as k } from "./refType-
|
|
3
|
+
import { jsx as T } from "react/jsx-runtime";
|
|
4
|
+
import { B as x } from "./ButtonBase-CWtGa3RS.js";
|
|
5
|
+
import { c as k } from "./refType-D_zuIflA.js";
|
|
6
6
|
function P(o) {
|
|
7
|
-
return
|
|
7
|
+
return z("MuiIconButton", o);
|
|
8
8
|
}
|
|
9
|
-
const j =
|
|
9
|
+
const j = R("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge"]), E = j, M = ["edge", "children", "className", "color", "disabled", "disableFocusRipple", "size"], N = (o) => {
|
|
10
10
|
const {
|
|
11
11
|
classes: e,
|
|
12
|
-
disabled:
|
|
13
|
-
color:
|
|
12
|
+
disabled: s,
|
|
13
|
+
color: a,
|
|
14
14
|
edge: i,
|
|
15
15
|
size: l
|
|
16
16
|
} = o, c = {
|
|
17
|
-
root: ["root",
|
|
17
|
+
root: ["root", s && "disabled", a !== "default" && `color${n(a)}`, i && `edge${n(i)}`, `size${n(l)}`]
|
|
18
18
|
};
|
|
19
|
-
return
|
|
20
|
-
},
|
|
19
|
+
return $(c, P, e);
|
|
20
|
+
}, _ = C(x, {
|
|
21
21
|
name: "MuiIconButton",
|
|
22
22
|
slot: "Root",
|
|
23
23
|
overridesResolver: (o, e) => {
|
|
24
24
|
const {
|
|
25
|
-
ownerState:
|
|
25
|
+
ownerState: s
|
|
26
26
|
} = o;
|
|
27
|
-
return [e.root,
|
|
27
|
+
return [e.root, s.color !== "default" && e[`color${n(s.color)}`], s.edge && e[`edge${n(s.edge)}`], e[`size${n(s.size)}`]];
|
|
28
28
|
}
|
|
29
29
|
})(({
|
|
30
30
|
theme: o,
|
|
@@ -57,15 +57,15 @@ const j = z("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
57
57
|
theme: o,
|
|
58
58
|
ownerState: e
|
|
59
59
|
}) => {
|
|
60
|
-
var
|
|
61
|
-
const
|
|
60
|
+
var s;
|
|
61
|
+
const a = (s = (o.vars || o).palette) == null ? void 0 : s[e.color];
|
|
62
62
|
return t({}, e.color === "inherit" && {
|
|
63
63
|
color: "inherit"
|
|
64
64
|
}, e.color !== "inherit" && e.color !== "default" && t({
|
|
65
|
-
color:
|
|
65
|
+
color: a == null ? void 0 : a.main
|
|
66
66
|
}, !e.disableRipple && {
|
|
67
|
-
"&:hover": t({},
|
|
68
|
-
backgroundColor: o.vars ? `rgba(${
|
|
67
|
+
"&:hover": t({}, a && {
|
|
68
|
+
backgroundColor: o.vars ? `rgba(${a.mainChannel} / ${o.vars.palette.action.hoverOpacity})` : f(a.main, o.palette.action.hoverOpacity)
|
|
69
69
|
}, {
|
|
70
70
|
// Reset on touch devices, it doesn't add specificity
|
|
71
71
|
"@media (hover: none)": {
|
|
@@ -79,13 +79,13 @@ const j = z("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
79
79
|
padding: 12,
|
|
80
80
|
fontSize: o.typography.pxToRem(28)
|
|
81
81
|
}, {
|
|
82
|
-
[`&.${
|
|
82
|
+
[`&.${E.disabled}`]: {
|
|
83
83
|
backgroundColor: "transparent",
|
|
84
84
|
color: (o.vars || o).palette.action.disabled
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
|
-
}), b = /* @__PURE__ */ d.forwardRef(function(e,
|
|
88
|
-
const
|
|
87
|
+
}), b = /* @__PURE__ */ d.forwardRef(function(e, s) {
|
|
88
|
+
const a = B({
|
|
89
89
|
props: e,
|
|
90
90
|
name: "MuiIconButton"
|
|
91
91
|
}), {
|
|
@@ -96,19 +96,19 @@ const j = z("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
96
96
|
disabled: p = !1,
|
|
97
97
|
disableFocusRipple: u = !1,
|
|
98
98
|
size: y = "medium"
|
|
99
|
-
} =
|
|
99
|
+
} = a, m = I(a, M), g = t({}, a, {
|
|
100
100
|
edge: i,
|
|
101
101
|
color: v,
|
|
102
102
|
disabled: p,
|
|
103
103
|
disableFocusRipple: u,
|
|
104
104
|
size: y
|
|
105
|
-
}), h =
|
|
106
|
-
return /* @__PURE__ */
|
|
105
|
+
}), h = N(g);
|
|
106
|
+
return /* @__PURE__ */ T(_, t({
|
|
107
107
|
className: O(h.root, c),
|
|
108
108
|
centerRipple: !0,
|
|
109
109
|
focusRipple: !u,
|
|
110
110
|
disabled: p,
|
|
111
|
-
ref:
|
|
111
|
+
ref: s,
|
|
112
112
|
ownerState: g
|
|
113
113
|
}, m, {
|
|
114
114
|
children: l
|
|
@@ -122,7 +122,7 @@ process.env.NODE_ENV !== "production" && (b.propTypes = {
|
|
|
122
122
|
/**
|
|
123
123
|
* The icon to display.
|
|
124
124
|
*/
|
|
125
|
-
children: k(r.node, (o) => d.Children.toArray(o.children).some((
|
|
125
|
+
children: k(r.node, (o) => d.Children.toArray(o.children).some((s) => /* @__PURE__ */ d.isValidElement(s) && s.props.onClick) ? new Error(["MUI: You are providing an onClick event listener to a child of a button element.", "Prefer applying it to the IconButton directly.", "This guarantees that the whole <button> will be responsive to click events."].join(`
|
|
126
126
|
`)) : null),
|
|
127
127
|
/**
|
|
128
128
|
* Override or extend the styles applied to the component.
|
|
@@ -176,7 +176,9 @@ process.env.NODE_ENV !== "production" && (b.propTypes = {
|
|
|
176
176
|
*/
|
|
177
177
|
sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object])
|
|
178
178
|
});
|
|
179
|
-
const
|
|
179
|
+
const V = b;
|
|
180
180
|
export {
|
|
181
|
-
|
|
181
|
+
V as I,
|
|
182
|
+
P as g,
|
|
183
|
+
E as i
|
|
182
184
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { P as e, u as Pe,
|
|
1
|
+
import { P as e, u as Pe, f as ge, _ as c, d as De, T as We, a as Ve, g as _e, s as we, e as Le, h as fe, c as ee, i as je, q as Ue } from "./styled-DWGei2G_.js";
|
|
2
2
|
import * as s from "react";
|
|
3
3
|
import { jsx as R, jsxs as oe } from "react/jsx-runtime";
|
|
4
|
-
import { a as ve, u as ne } from "./useForkRef-
|
|
4
|
+
import { a as ve, u as ne } from "./useForkRef-CQ5u1_mH.js";
|
|
5
5
|
import * as $e from "react-dom";
|
|
6
6
|
import { a as me, d as Ge } from "./ownerWindow-C7EH1lr6.js";
|
|
7
7
|
import { i as he } from "./isHostComponent-kiaBvYVo.js";
|
|
8
|
-
import { e as Ke, r as qe } from "./refType-
|
|
8
|
+
import { e as Ke, r as qe } from "./refType-D_zuIflA.js";
|
|
9
9
|
import { Global as Ye } from "@emotion/react";
|
|
10
10
|
function Ze(o) {
|
|
11
11
|
return o == null || Object.keys(o).length === 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("./
|
|
1
|
+
"use strict";const e=require("./styled-DhUFTujV.cjs"),He=require("react"),P=require("react/jsx-runtime"),H=require("./useForkRef-DfdM2MN5.cjs"),De=require("react-dom"),oe=require("./ownerWindow-Dk_4aaak.cjs"),ce=require("./isHostComponent-PydJW4A4.cjs"),fe=require("./refType-BgO8A5K8.cjs"),We=require("@emotion/react");function he(o){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>o[t]})}}return n.default=o,Object.freeze(n)}const l=he(He),Ve=he(De);function Le(o){return o==null||Object.keys(o).length===0}function Te(o){const{styles:n,defaultTheme:t={}}=o,r=typeof n=="function"?s=>n(Le(s)?t:s):n;return P.jsx(We.Global,{styles:r})}process.env.NODE_ENV!=="production"&&(Te.propTypes={defaultTheme:e.PropTypes.object,styles:e.PropTypes.oneOfType([e.PropTypes.array,e.PropTypes.string,e.PropTypes.object,e.PropTypes.func])});function be({styles:o,themeId:n,defaultTheme:t={}}){const r=e.useTheme(t),s=typeof o=="function"?o(n&&r[n]||r):o;return P.jsx(Te,{styles:s})}process.env.NODE_ENV!=="production"&&(be.propTypes={defaultTheme:e.PropTypes.object,styles:e.PropTypes.oneOfType([e.PropTypes.array,e.PropTypes.func,e.PropTypes.number,e.PropTypes.object,e.PropTypes.string,e.PropTypes.bool]),themeId:e.PropTypes.string});const Pe=l.createContext(void 0);process.env.NODE_ENV!=="production"&&(Pe.displayName="FormControlContext");const ne=Pe;function ge(){return l.useContext(ne)}const $e=["onChange","maxRows","minRows","style","value"];function $(o){return parseInt(o,10)||0}const qe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function ye(o){return o==null||Object.keys(o).length===0||o.outerHeightStyle===0&&!o.overflow}const xe=l.forwardRef(function(n,t){const{onChange:r,maxRows:s,minRows:d=1,style:z,value:S}=n,k=e._objectWithoutPropertiesLoose(n,$e),{current:R}=l.useRef(S!=null),w=l.useRef(null),_=H.useForkRef(t,w),g=l.useRef(null),h=l.useRef(0),[O,A]=l.useState({outerHeightStyle:0}),F=l.useCallback(()=>{const u=w.current,a=oe.ownerWindow(u).getComputedStyle(u);if(a.width==="0px")return{outerHeightStyle:0};const c=g.current;c.style.width=a.width,c.value=u.value||n.placeholder||"x",c.value.slice(-1)===`
|
|
2
2
|
`&&(c.value+=" ");const b=a.boxSizing,E=$(a.paddingBottom)+$(a.paddingTop),N=$(a.borderBottomWidth)+$(a.borderTopWidth),x=c.scrollHeight;c.value="x";const C=c.scrollHeight;let y=x;d&&(y=Math.max(Number(d)*C,y)),s&&(y=Math.min(Number(s)*C,y)),y=Math.max(y,C);const G=y+(b==="border-box"?E+N:0),B=Math.abs(y-x)<=1;return{outerHeightStyle:G,overflow:B}},[s,d,n.placeholder]),D=(u,T)=>{const{outerHeightStyle:a,overflow:c}=T;return h.current<20&&(a>0&&Math.abs((u.outerHeightStyle||0)-a)>1||u.overflow!==c)?(h.current+=1,{overflow:c,outerHeightStyle:a}):(process.env.NODE_ENV!=="production"&&h.current===20&&console.error(["MUI: Too many re-renders. The layout is unstable.","TextareaAutosize limits the number of renders to prevent an infinite loop."].join(`
|
|
3
|
-
`)),u)},f=
|
|
4
|
-
`))},[]),Fe=H.useForkRef(I,U,f.ref,Ae),[Y,Z]=
|
|
3
|
+
`)),u)},f=l.useCallback(()=>{const u=F();ye(u)||A(T=>D(T,u))},[F]);H.useEnhancedEffect(()=>{const u=()=>{const C=F();ye(C)||Ve.flushSync(()=>{A(y=>D(y,C))})},T=()=>{h.current=0,u()};let a;const c=()=>{cancelAnimationFrame(a),a=requestAnimationFrame(()=>{T()})},b=oe.debounce(T),E=w.current,N=oe.ownerWindow(E);N.addEventListener("resize",b);let x;return typeof ResizeObserver<"u"&&(x=new ResizeObserver(process.env.NODE_ENV==="test"?c:T),x.observe(E)),()=>{b.clear(),cancelAnimationFrame(a),N.removeEventListener("resize",b),x&&x.disconnect()}},[F]),H.useEnhancedEffect(()=>{f()}),l.useEffect(()=>{h.current=0},[S]);const U=u=>{h.current=0,R||f(),r&&r(u)};return P.jsxs(l.Fragment,{children:[P.jsx("textarea",e._extends({value:S,onChange:U,ref:_,rows:d,style:e._extends({height:O.outerHeightStyle,overflow:O.overflow?"hidden":void 0},z)},k)),P.jsx("textarea",{"aria-hidden":!0,className:n.className,readOnly:!0,ref:g,tabIndex:-1,style:e._extends({},qe.shadow,z,{paddingTop:0,paddingBottom:0})})]})});process.env.NODE_ENV!=="production"&&(xe.propTypes={className:e.PropTypes.string,maxRows:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),minRows:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),onChange:e.PropTypes.func,placeholder:e.PropTypes.string,style:e.PropTypes.object,value:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.string),e.PropTypes.number,e.PropTypes.string])});function we({props:o,states:n,muiFormControl:t}){return n.reduce((r,s)=>(r[s]=o[s],t&&typeof o[s]>"u"&&(r[s]=t[s]),r),{})}function ve(o){return P.jsx(be,e._extends({},o,{defaultTheme:e.defaultTheme,themeId:e.THEME_ID}))}process.env.NODE_ENV!=="production"&&(ve.propTypes={styles:e.PropTypes.oneOfType([e.PropTypes.array,e.PropTypes.func,e.PropTypes.number,e.PropTypes.object,e.PropTypes.string,e.PropTypes.bool])});function me(o){return o!=null&&!(Array.isArray(o)&&o.length===0)}function Ce(o,n=!1){return o&&(me(o.value)&&o.value!==""||n&&me(o.defaultValue)&&o.defaultValue!=="")}function Ue(o){return o.startAdornment}function Ge(o){return e.generateUtilityClass("MuiInputBase",o)}const Ke=e.generateUtilityClasses("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),q=Ke,Ye=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Se=(o,n)=>{const{ownerState:t}=o;return[n.root,t.formControl&&n.formControl,t.startAdornment&&n.adornedStart,t.endAdornment&&n.adornedEnd,t.error&&n.error,t.size==="small"&&n.sizeSmall,t.multiline&&n.multiline,t.color&&n[`color${e.capitalize(t.color)}`],t.fullWidth&&n.fullWidth,t.hiddenLabel&&n.hiddenLabel]},Re=(o,n)=>{const{ownerState:t}=o;return[n.input,t.size==="small"&&n.inputSizeSmall,t.multiline&&n.inputMultiline,t.type==="search"&&n.inputTypeSearch,t.startAdornment&&n.inputAdornedStart,t.endAdornment&&n.inputAdornedEnd,t.hiddenLabel&&n.inputHiddenLabel]},Ze=o=>{const{classes:n,color:t,disabled:r,error:s,endAdornment:d,focused:z,formControl:S,fullWidth:k,hiddenLabel:R,multiline:w,readOnly:_,size:g,startAdornment:h,type:O}=o,A={root:["root",`color${e.capitalize(t)}`,r&&"disabled",s&&"error",k&&"fullWidth",z&&"focused",S&&"formControl",g&&g!=="medium"&&`size${e.capitalize(g)}`,w&&"multiline",h&&"adornedStart",d&&"adornedEnd",R&&"hiddenLabel",_&&"readOnly"],input:["input",r&&"disabled",O==="search"&&"inputTypeSearch",w&&"inputMultiline",g==="small"&&"inputSizeSmall",R&&"inputHiddenLabel",h&&"inputAdornedStart",d&&"inputAdornedEnd",_&&"readOnly"]};return e.composeClasses(A,Ge,n)},Oe=e.styled("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Se})(({theme:o,ownerState:n})=>e._extends({},o.typography.body1,{color:(o.vars||o).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${q.disabled}`]:{color:(o.vars||o).palette.text.disabled,cursor:"default"}},n.multiline&&e._extends({padding:"4px 0 5px"},n.size==="small"&&{paddingTop:1}),n.fullWidth&&{width:"100%"})),Ee=e.styled("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Re})(({theme:o,ownerState:n})=>{const t=o.palette.mode==="light",r=e._extends({color:"currentColor"},o.vars?{opacity:o.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},{transition:o.transitions.create("opacity",{duration:o.transitions.duration.shorter})}),s={opacity:"0 !important"},d=o.vars?{opacity:o.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return e._extends({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${q.formControl} &`]:{"&::-webkit-input-placeholder":s,"&::-moz-placeholder":s,"&:-ms-input-placeholder":s,"&::-ms-input-placeholder":s,"&:focus::-webkit-input-placeholder":d,"&:focus::-moz-placeholder":d,"&:focus:-ms-input-placeholder":d,"&:focus::-ms-input-placeholder":d},[`&.${q.disabled}`]:{opacity:1,WebkitTextFillColor:(o.vars||o).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},n.size==="small"&&{paddingTop:1},n.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},n.type==="search"&&{MozAppearance:"textfield"})}),Je=P.jsx(ve,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Ne=l.forwardRef(function(n,t){var r;const s=e.useThemeProps({props:n,name:"MuiInputBase"}),{"aria-describedby":d,autoComplete:z,autoFocus:S,className:k,components:R={},componentsProps:w={},defaultValue:_,disabled:g,disableInjectingGlobalStyles:h,endAdornment:O,fullWidth:A=!1,id:F,inputComponent:D="input",inputProps:f={},inputRef:U,maxRows:u,minRows:T,multiline:a=!1,name:c,onBlur:b,onChange:E,onClick:N,onFocus:x,onKeyDown:C,onKeyUp:y,placeholder:G,readOnly:B,renderSuffix:te,rows:W,slotProps:re={},slots:se={},startAdornment:j,type:ie="text",value:ze}=s,_e=e._objectWithoutPropertiesLoose(s,Ye),V=f.value!=null?f.value:ze,{current:K}=l.useRef(V!=null),I=l.useRef(),Ae=l.useCallback(i=>{process.env.NODE_ENV!=="production"&&i&&i.nodeName!=="INPUT"&&!i.focus&&console.error(["MUI: You have provided a `inputComponent` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join(`
|
|
4
|
+
`))},[]),Fe=H.useForkRef(I,U,f.ref,Ae),[Y,Z]=l.useState(!1),p=ge();process.env.NODE_ENV!=="production"&&l.useEffect(()=>{if(p)return p.registerEffect()},[p]);const m=we({props:s,muiFormControl:p,states:["color","disabled","error","hiddenLabel","size","required","filled"]});m.focused=p?p.focused:Y,l.useEffect(()=>{!p&&g&&Y&&(Z(!1),b&&b())},[p,g,Y,b]);const J=p&&p.onFilled,Q=p&&p.onEmpty,M=l.useCallback(i=>{Ce(i)?J&&J():Q&&Q()},[J,Q]);H.useEnhancedEffect(()=>{K&&M({value:V})},[V,M,K]);const Ie=i=>{if(m.disabled){i.stopPropagation();return}x&&x(i),f.onFocus&&f.onFocus(i),p&&p.onFocus?p.onFocus(i):Z(!0)},ke=i=>{b&&b(i),f.onBlur&&f.onBlur(i),p&&p.onBlur?p.onBlur(i):Z(!1)},Be=(i,...ue)=>{if(!K){const de=i.target||I.current;if(de==null)throw new Error(process.env.NODE_ENV!=="production"?"MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":e.formatMuiErrorMessage(1));M({value:de.value})}f.onChange&&f.onChange(i,...ue),E&&E(i,...ue)};l.useEffect(()=>{M(I.current)},[]);const je=i=>{I.current&&i.currentTarget===i.target&&I.current.focus(),N&&N(i)};let X=D,v=f;a&&X==="input"&&(W?(process.env.NODE_ENV!=="production"&&(T||u)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),v=e._extends({type:void 0,minRows:W,maxRows:W},v)):v=e._extends({type:void 0,maxRows:u,minRows:T},v),X=xe);const Me=i=>{M(i.animationName==="mui-auto-fill-cancel"?I.current:{value:"x"})};l.useEffect(()=>{p&&p.setAdornedStart(!!j)},[p,j]);const L=e._extends({},s,{color:m.color||"primary",disabled:m.disabled,endAdornment:O,error:m.error,focused:m.focused,formControl:p,fullWidth:A,hiddenLabel:m.hiddenLabel,multiline:a,size:m.size,startAdornment:j,type:ie}),le=Ze(L),pe=se.root||R.Root||Oe,ee=re.root||w.root||{},ae=se.input||R.Input||Ee;return v=e._extends({},v,(r=re.input)!=null?r:w.input),P.jsxs(l.Fragment,{children:[!h&&Je,P.jsxs(pe,e._extends({},ee,!ce.isHostComponent(pe)&&{ownerState:e._extends({},L,ee.ownerState)},{ref:t,onClick:je},_e,{className:e.clsx(le.root,ee.className,k,B&&"MuiInputBase-readOnly"),children:[j,P.jsx(ne.Provider,{value:null,children:P.jsx(ae,e._extends({ownerState:L,"aria-invalid":m.error,"aria-describedby":d,autoComplete:z,autoFocus:S,defaultValue:_,disabled:m.disabled,id:F,onAnimationStart:Me,name:c,placeholder:G,readOnly:B,required:m.required,rows:W,value:V,onKeyDown:C,onKeyUp:y,type:ie},v,!ce.isHostComponent(ae)&&{as:X,ownerState:e._extends({},L,v.ownerState)},{ref:Fe,className:e.clsx(le.input,v.className,B&&"MuiInputBase-readOnly"),onBlur:ke,onChange:Be,onFocus:Ie}))}),O,te?te(e._extends({},m,{startAdornment:j})):null]}))]})});process.env.NODE_ENV!=="production"&&(Ne.propTypes={"aria-describedby":e.PropTypes.string,autoComplete:e.PropTypes.string,autoFocus:e.PropTypes.bool,classes:e.PropTypes.object,className:e.PropTypes.string,color:e.PropTypes.oneOfType([e.PropTypes.oneOf(["primary","secondary","error","info","success","warning"]),e.PropTypes.string]),components:e.PropTypes.shape({Input:e.PropTypes.elementType,Root:e.PropTypes.elementType}),componentsProps:e.PropTypes.shape({input:e.PropTypes.object,root:e.PropTypes.object}),defaultValue:e.PropTypes.any,disabled:e.PropTypes.bool,disableInjectingGlobalStyles:e.PropTypes.bool,endAdornment:e.PropTypes.node,error:e.PropTypes.bool,fullWidth:e.PropTypes.bool,id:e.PropTypes.string,inputComponent:fe.elementTypeAcceptingRef,inputProps:e.PropTypes.object,inputRef:fe.refType,margin:e.PropTypes.oneOf(["dense","none"]),maxRows:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),minRows:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),multiline:e.PropTypes.bool,name:e.PropTypes.string,onBlur:e.PropTypes.func,onChange:e.PropTypes.func,onClick:e.PropTypes.func,onFocus:e.PropTypes.func,onInvalid:e.PropTypes.func,onKeyDown:e.PropTypes.func,onKeyUp:e.PropTypes.func,placeholder:e.PropTypes.string,readOnly:e.PropTypes.bool,renderSuffix:e.PropTypes.func,required:e.PropTypes.bool,rows:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),size:e.PropTypes.oneOfType([e.PropTypes.oneOf(["medium","small"]),e.PropTypes.string]),slotProps:e.PropTypes.shape({input:e.PropTypes.object,root:e.PropTypes.object}),slots:e.PropTypes.shape({input:e.PropTypes.elementType,root:e.PropTypes.elementType}),startAdornment:e.PropTypes.node,sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object]),type:e.PropTypes.string,value:e.PropTypes.any});const Qe=Ne;exports.FormControlContext=ne;exports.InputBase=Qe;exports.InputBaseComponent=Ee;exports.InputBaseRoot=Oe;exports.formControlState=we;exports.inputBaseClasses=q;exports.inputOverridesResolver=Re;exports.isAdornedStart=Ue;exports.isFilled=Ce;exports.rootOverridesResolver=Se;exports.useFormControl=ge;
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { jsx as o, jsxs as A } from "react/jsx-runtime";
|
|
2
|
+
import * as b from "react";
|
|
3
|
+
import { a as T, g as S, s as I, _ as m, e as L, f as N, h as R, P as e, c as v, i as z } from "./styled-DWGei2G_.js";
|
|
4
|
+
import { u as M, F as O, I as _ } from "./InputBase-DXIea1Cc.js";
|
|
5
|
+
import { T as $ } from "./Typography-BsS5MVop.js";
|
|
6
|
+
import { c as j } from "./createSvgIcon-FbpDQQ7X.js";
|
|
7
|
+
const F = j(/* @__PURE__ */ o("path", {
|
|
8
|
+
d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"
|
|
9
|
+
}), "Search");
|
|
10
|
+
function U(n) {
|
|
11
|
+
return S("MuiInputAdornment", n);
|
|
12
|
+
}
|
|
13
|
+
const w = T("MuiInputAdornment", ["root", "filled", "standard", "outlined", "positionStart", "positionEnd", "disablePointerEvents", "hiddenLabel", "sizeSmall"]), g = w;
|
|
14
|
+
var y;
|
|
15
|
+
const B = ["children", "className", "component", "disablePointerEvents", "disableTypography", "position", "variant"], D = (n, t) => {
|
|
16
|
+
const {
|
|
17
|
+
ownerState: s
|
|
18
|
+
} = n;
|
|
19
|
+
return [t.root, t[`position${v(s.position)}`], s.disablePointerEvents === !0 && t.disablePointerEvents, t[s.variant]];
|
|
20
|
+
}, V = (n) => {
|
|
21
|
+
const {
|
|
22
|
+
classes: t,
|
|
23
|
+
disablePointerEvents: s,
|
|
24
|
+
hiddenLabel: a,
|
|
25
|
+
position: r,
|
|
26
|
+
size: l,
|
|
27
|
+
variant: p
|
|
28
|
+
} = n, d = {
|
|
29
|
+
root: ["root", s && "disablePointerEvents", r && `position${v(r)}`, p, a && "hiddenLabel", l && `size${v(l)}`]
|
|
30
|
+
};
|
|
31
|
+
return z(d, U, t);
|
|
32
|
+
}, k = I("div", {
|
|
33
|
+
name: "MuiInputAdornment",
|
|
34
|
+
slot: "Root",
|
|
35
|
+
overridesResolver: D
|
|
36
|
+
})(({
|
|
37
|
+
theme: n,
|
|
38
|
+
ownerState: t
|
|
39
|
+
}) => m({
|
|
40
|
+
display: "flex",
|
|
41
|
+
height: "0.01em",
|
|
42
|
+
// Fix IE11 flexbox alignment. To remove at some point.
|
|
43
|
+
maxHeight: "2em",
|
|
44
|
+
alignItems: "center",
|
|
45
|
+
whiteSpace: "nowrap",
|
|
46
|
+
color: (n.vars || n).palette.action.active
|
|
47
|
+
}, t.variant === "filled" && {
|
|
48
|
+
// Styles applied to the root element if `variant="filled"`.
|
|
49
|
+
[`&.${g.positionStart}&:not(.${g.hiddenLabel})`]: {
|
|
50
|
+
marginTop: 16
|
|
51
|
+
}
|
|
52
|
+
}, t.position === "start" && {
|
|
53
|
+
// Styles applied to the root element if `position="start"`.
|
|
54
|
+
marginRight: 8
|
|
55
|
+
}, t.position === "end" && {
|
|
56
|
+
// Styles applied to the root element if `position="end"`.
|
|
57
|
+
marginLeft: 8
|
|
58
|
+
}, t.disablePointerEvents === !0 && {
|
|
59
|
+
// Styles applied to the root element if `disablePointerEvents={true}`.
|
|
60
|
+
pointerEvents: "none"
|
|
61
|
+
})), E = /* @__PURE__ */ b.forwardRef(function(t, s) {
|
|
62
|
+
const a = L({
|
|
63
|
+
props: t,
|
|
64
|
+
name: "MuiInputAdornment"
|
|
65
|
+
}), {
|
|
66
|
+
children: r,
|
|
67
|
+
className: l,
|
|
68
|
+
component: p = "div",
|
|
69
|
+
disablePointerEvents: d = !1,
|
|
70
|
+
disableTypography: P = !1,
|
|
71
|
+
position: h,
|
|
72
|
+
variant: c
|
|
73
|
+
} = a, x = N(a, B), i = M() || {};
|
|
74
|
+
let u = c;
|
|
75
|
+
c && i.variant && process.env.NODE_ENV !== "production" && c === i.variant && console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."), i && !u && (u = i.variant);
|
|
76
|
+
const f = m({}, a, {
|
|
77
|
+
hiddenLabel: i.hiddenLabel,
|
|
78
|
+
size: i.size,
|
|
79
|
+
disablePointerEvents: d,
|
|
80
|
+
position: h,
|
|
81
|
+
variant: u
|
|
82
|
+
}), C = V(f);
|
|
83
|
+
return /* @__PURE__ */ o(O.Provider, {
|
|
84
|
+
value: null,
|
|
85
|
+
children: /* @__PURE__ */ o(k, m({
|
|
86
|
+
as: p,
|
|
87
|
+
ownerState: f,
|
|
88
|
+
className: R(C.root, l),
|
|
89
|
+
ref: s
|
|
90
|
+
}, x, {
|
|
91
|
+
children: typeof r == "string" && !P ? /* @__PURE__ */ o($, {
|
|
92
|
+
color: "text.secondary",
|
|
93
|
+
children: r
|
|
94
|
+
}) : /* @__PURE__ */ A(b.Fragment, {
|
|
95
|
+
children: [h === "start" ? (
|
|
96
|
+
/* notranslate needed while Google Translate will not fix zero-width space issue */
|
|
97
|
+
y || (y = /* @__PURE__ */ o("span", {
|
|
98
|
+
className: "notranslate",
|
|
99
|
+
children: ""
|
|
100
|
+
}))
|
|
101
|
+
) : null, r]
|
|
102
|
+
})
|
|
103
|
+
}))
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
process.env.NODE_ENV !== "production" && (E.propTypes = {
|
|
107
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
108
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
109
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
110
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
111
|
+
/**
|
|
112
|
+
* The content of the component, normally an `IconButton` or string.
|
|
113
|
+
*/
|
|
114
|
+
children: e.node,
|
|
115
|
+
/**
|
|
116
|
+
* Override or extend the styles applied to the component.
|
|
117
|
+
*/
|
|
118
|
+
classes: e.object,
|
|
119
|
+
/**
|
|
120
|
+
* @ignore
|
|
121
|
+
*/
|
|
122
|
+
className: e.string,
|
|
123
|
+
/**
|
|
124
|
+
* The component used for the root node.
|
|
125
|
+
* Either a string to use a HTML element or a component.
|
|
126
|
+
*/
|
|
127
|
+
component: e.elementType,
|
|
128
|
+
/**
|
|
129
|
+
* Disable pointer events on the root.
|
|
130
|
+
* This allows for the content of the adornment to focus the `input` on click.
|
|
131
|
+
* @default false
|
|
132
|
+
*/
|
|
133
|
+
disablePointerEvents: e.bool,
|
|
134
|
+
/**
|
|
135
|
+
* If children is a string then disable wrapping in a Typography component.
|
|
136
|
+
* @default false
|
|
137
|
+
*/
|
|
138
|
+
disableTypography: e.bool,
|
|
139
|
+
/**
|
|
140
|
+
* The position this adornment should appear relative to the `Input`.
|
|
141
|
+
*/
|
|
142
|
+
position: e.oneOf(["end", "start"]).isRequired,
|
|
143
|
+
/**
|
|
144
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
145
|
+
*/
|
|
146
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
147
|
+
/**
|
|
148
|
+
* The variant to use.
|
|
149
|
+
* Note: If you are using the `TextField` component or the `FormControl` component
|
|
150
|
+
* you do not have to set this manually.
|
|
151
|
+
*/
|
|
152
|
+
variant: e.oneOf(["filled", "outlined", "standard"])
|
|
153
|
+
});
|
|
154
|
+
const q = E, H = I(_)(({ theme: n }) => ({
|
|
155
|
+
width: "auto",
|
|
156
|
+
padding: "0px 12px",
|
|
157
|
+
backgroundColor: n.palette.grey[50],
|
|
158
|
+
borderRadius: 30,
|
|
159
|
+
"& .MuiInputBase-input": {
|
|
160
|
+
padding: "8px 0px"
|
|
161
|
+
}
|
|
162
|
+
})), X = ({
|
|
163
|
+
placeholder: n = "Rechercher",
|
|
164
|
+
...t
|
|
165
|
+
}) => /* @__PURE__ */ o(
|
|
166
|
+
H,
|
|
167
|
+
{
|
|
168
|
+
...t,
|
|
169
|
+
placeholder: n,
|
|
170
|
+
startAdornment: /* @__PURE__ */ o(q, { position: "start", disablePointerEvents: !0, children: /* @__PURE__ */ o(F, {}) })
|
|
171
|
+
}
|
|
172
|
+
);
|
|
173
|
+
export {
|
|
174
|
+
q as I,
|
|
175
|
+
X as S
|
|
176
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),j=require("react"),e=require("./styled-DhUFTujV.cjs"),m=require("./InputBase-Dp2-NOH_.cjs"),E=require("./Typography-Dj96Ct2C.cjs"),S=require("./createSvgIcon-K1XmJ33T.cjs");function A(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,s.get?s:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const h=A(j),C=S.createSvgIcon(r.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search");function O(t){return e.generateUtilityClass("MuiInputAdornment",t)}const _=e.generateUtilityClasses("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]),b=_;var f;const z=["children","className","component","disablePointerEvents","disableTypography","position","variant"],N=(t,n)=>{const{ownerState:o}=t;return[n.root,n[`position${e.capitalize(o.position)}`],o.disablePointerEvents===!0&&n.disablePointerEvents,n[o.variant]]},R=t=>{const{classes:n,disablePointerEvents:o,hiddenLabel:s,position:i,size:p,variant:l}=t,c={root:["root",o&&"disablePointerEvents",i&&`position${e.capitalize(i)}`,l,s&&"hiddenLabel",p&&`size${e.capitalize(p)}`]};return e.composeClasses(c,O,n)},L=e.styled("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:N})(({theme:t,ownerState:n})=>e._extends({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},n.variant==="filled"&&{[`&.${b.positionStart}&:not(.${b.hiddenLabel})`]:{marginTop:16}},n.position==="start"&&{marginRight:8},n.position==="end"&&{marginLeft:8},n.disablePointerEvents===!0&&{pointerEvents:"none"})),P=h.forwardRef(function(n,o){const s=e.useThemeProps({props:n,name:"MuiInputAdornment"}),{children:i,className:p,component:l="div",disablePointerEvents:c=!1,disableTypography:T=!1,position:y,variant:d}=s,x=e._objectWithoutPropertiesLoose(s,z),a=m.useFormControl()||{};let u=d;d&&a.variant&&process.env.NODE_ENV!=="production"&&d===a.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),a&&!u&&(u=a.variant);const v=e._extends({},s,{hiddenLabel:a.hiddenLabel,size:a.size,disablePointerEvents:c,position:y,variant:u}),I=R(v);return r.jsx(m.FormControlContext.Provider,{value:null,children:r.jsx(L,e._extends({as:l,ownerState:v,className:e.clsx(I.root,p),ref:o},x,{children:typeof i=="string"&&!T?r.jsx(E.Typography,{color:"text.secondary",children:i}):r.jsxs(h.Fragment,{children:[y==="start"?f||(f=r.jsx("span",{className:"notranslate",children:""})):null,i]})}))})});process.env.NODE_ENV!=="production"&&(P.propTypes={children:e.PropTypes.node,classes:e.PropTypes.object,className:e.PropTypes.string,component:e.PropTypes.elementType,disablePointerEvents:e.PropTypes.bool,disableTypography:e.PropTypes.bool,position:e.PropTypes.oneOf(["end","start"]).isRequired,sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object]),variant:e.PropTypes.oneOf(["filled","outlined","standard"])});const g=P,$=e.styled(m.InputBase)(({theme:t})=>({width:"auto",padding:"0px 12px",backgroundColor:t.palette.grey[50],borderRadius:30,"& .MuiInputBase-input":{padding:"8px 0px"}})),q=({placeholder:t="Rechercher",...n})=>r.jsx($,{...n,placeholder:t,startAdornment:r.jsx(g,{position:"start",disablePointerEvents:!0,children:r.jsx(C,{})})});exports.InputAdornment=g;exports.SearchInput=q;
|