@cgi-learning-hub/ui 0.0.1-dev.1713359037 → 0.0.1-dev.1716882954
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-B5JvteYc.cjs +1 -0
- package/dist/{Box-CcD_sRqe.js → Box-w9A3CGWz.js} +24 -26
- package/dist/{ButtonBase-BBqNg9BC.js → ButtonBase-ClqFvN38.js} +102 -107
- package/dist/ButtonBase-DLRUHDp_.cjs +75 -0
- package/dist/{CircularProgress-G9G_loET.js → CircularProgress-CKU4oqMn.js} +4 -4
- package/dist/{CircularProgress-DVnd6kxt.cjs → CircularProgress-LIVNb3Un.cjs} +1 -1
- package/dist/DefaultButton-Bk1TaeJZ.cjs +1 -0
- package/dist/{DefaultButton-DDeufcNs.js → DefaultButton-Pk7aXp0l.js} +94 -95
- package/dist/{IconButton-B6XIqj_T.js → IconButton-SMmmWi-o.js} +28 -29
- package/dist/IconButton-djnEGxm7.cjs +2 -0
- package/dist/InputBase-BPq0sWTY.cjs +3 -0
- package/dist/{InputBase-CdKFPwS3.js → InputBase-BnfifOOr.js} +280 -320
- package/dist/{LocalizationProvider-CNYbKILJ.cjs → LocalizationProvider-BqBo3ogt.cjs} +1 -1
- package/dist/{LocalizationProvider-0zrjdh3x.js → LocalizationProvider-DabIC_L5.js} +2 -2
- package/dist/{SearchInput-Q5BP0X0K.js → SearchInput-BEYRgfVH.js} +25 -25
- package/dist/SearchInput-CoPiN90W.cjs +1 -0
- package/dist/Tabs-Cr7s6H3h.cjs +4 -0
- package/dist/{Tabs-CDBEadDu.js → Tabs-NsW3-ZTG.js} +264 -265
- package/dist/TextInput-DMTI0kNm.cjs +12 -0
- package/dist/{TextInput-BNe_BIm9.js → TextInput-Db4gwAZh.js} +1388 -1397
- package/dist/{TimePicker-CLYqSUwA.js → TimePicker-BFhOku5y.js} +5172 -4988
- package/dist/TimePicker-UQHnH9uN.cjs +73 -0
- package/dist/{TransitionGroupContext-C7wWJ6l7.js → TransitionGroupContext-BkoHK5Kx.js} +2 -2
- package/dist/{TransitionGroupContext-g4tmk10h.cjs → TransitionGroupContext-mYDSzffd.cjs} +1 -1
- package/dist/Typography-DOPsRNd4.cjs +1 -0
- package/dist/{Typography-CkEznQ8f.js → Typography-dcZWbxlM.js} +74 -100
- package/dist/assets/index.css +1 -1
- package/dist/components/Dropzone/Dropzone.cjs.js +5 -5
- package/dist/components/Dropzone/Dropzone.d.ts +3 -2
- package/dist/components/Dropzone/Dropzone.es.js +9 -9
- package/dist/components/Dropzone/Dropzone.stories.d.ts +2 -1
- package/dist/components/Dropzone/index.d.ts +2 -2
- package/dist/components/Icons/MoodleIcon/MoodleIcon.cjs.js +1 -0
- package/dist/components/Icons/MoodleIcon/MoodleIcon.d.ts +6 -0
- package/dist/components/Icons/MoodleIcon/MoodleIcon.es.js +14 -0
- package/dist/components/Icons/MoodleIcon/MoodleIcon.stories.cjs.js +1 -0
- package/dist/components/Icons/MoodleIcon/MoodleIcon.stories.d.ts +5 -0
- package/dist/components/Icons/MoodleIcon/MoodleIcon.stories.es.js +14 -0
- package/dist/components/Icons/MoodleIcon/index.cjs.js +1 -0
- package/dist/components/Icons/MoodleIcon/index.d.ts +2 -0
- package/dist/components/Icons/MoodleIcon/index.es.js +4 -0
- package/dist/components/LoaderBackdrop/LoaderBackdrop.cjs.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.d.ts +2 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.es.js +1 -0
- package/dist/components/LoaderBackdrop/LoaderBackdrop.stories.d.ts +2 -1
- package/dist/components/LoaderBackdrop/index.d.ts +2 -2
- package/dist/components/LocalizationProvider/LocalizationProvider.cjs.js +1 -1
- package/dist/components/LocalizationProvider/LocalizationProvider.d.ts +2 -1
- package/dist/components/LocalizationProvider/LocalizationProvider.es.js +2 -2
- package/dist/components/LocalizationProvider/index.cjs.js +1 -1
- package/dist/components/LocalizationProvider/index.d.ts +2 -2
- package/dist/components/LocalizationProvider/index.es.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.d.ts +3 -2
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +2 -2
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.d.ts +2 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +16 -16
- package/dist/components/buttons/DefaultButton/index.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/index.d.ts +2 -2
- package/dist/components/buttons/DefaultButton/index.es.js +1 -1
- package/dist/components/buttons/IconButton.stories.cjs.js +1 -1
- package/dist/components/buttons/IconButton.stories.d.ts +2 -1
- package/dist/components/buttons/IconButton.stories.es.js +10 -9
- package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.d.ts +2 -2
- package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.d.ts +2 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +1 -1
- package/dist/components/buttons/PrimaryButton/index.d.ts +2 -2
- package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.d.ts +2 -2
- package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.d.ts +2 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +1 -1
- package/dist/components/buttons/SecondaryButton/index.d.ts +2 -2
- package/dist/components/buttons/index.cjs.js +1 -1
- package/dist/components/buttons/index.d.ts +3 -3
- package/dist/components/buttons/index.es.js +1 -1
- package/dist/components/feedback/Alert/Alert.d.ts +2 -1
- package/dist/components/feedback/Alert/Alert.stories.d.ts +2 -1
- package/dist/components/feedback/Alert/index.d.ts +2 -2
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +111 -110
- package/dist/components/index.es.js +140 -138
- package/dist/components/inputs/PasswordInput/PasswordInput.cjs.js +1 -1
- package/dist/components/inputs/PasswordInput/PasswordInput.d.ts +2 -1
- package/dist/components/inputs/PasswordInput/PasswordInput.es.js +7 -6
- package/dist/components/inputs/PasswordInput/PasswordInput.stories.d.ts +2 -1
- package/dist/components/inputs/PasswordInput/index.d.ts +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.d.ts +2 -2
- package/dist/components/inputs/SearchInput/SearchInput.es.js +3 -3
- package/dist/components/inputs/SearchInput/SearchInput.stories.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.stories.d.ts +2 -1
- package/dist/components/inputs/SearchInput/SearchInput.stories.es.js +1 -1
- package/dist/components/inputs/SearchInput/index.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/index.d.ts +2 -2
- package/dist/components/inputs/SearchInput/index.es.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.cjs.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.d.ts +2 -2
- package/dist/components/inputs/TextInput/TextInput.es.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.stories.cjs.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.stories.d.ts +2 -1
- package/dist/components/inputs/TextInput/TextInput.stories.es.js +1 -1
- package/dist/components/inputs/TextInput/index.cjs.js +1 -1
- package/dist/components/inputs/TextInput/index.d.ts +2 -2
- package/dist/components/inputs/TextInput/index.es.js +1 -1
- package/dist/components/inputs/index.cjs.js +1 -1
- package/dist/components/inputs/index.d.ts +3 -3
- package/dist/components/inputs/index.es.js +2 -2
- package/dist/components/lists/FileList/FileList.cjs.js +1 -1
- package/dist/components/lists/FileList/FileList.d.ts +3 -2
- package/dist/components/lists/FileList/FileList.es.js +9 -11
- package/dist/components/lists/FileList/FileList.stories.d.ts +2 -1
- package/dist/components/lists/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/lists/FileList/FileListItem.d.ts +2 -1
- package/dist/components/lists/FileList/FileListItem.es.js +11 -10
- package/dist/components/lists/FileList/index.d.ts +4 -4
- package/dist/components/lists/TabList.stories.cjs.js +1 -1
- package/dist/components/lists/TabList.stories.d.ts +2 -1
- package/dist/components/lists/TabList.stories.es.js +48 -49
- package/dist/components/lists/index.d.ts +1 -1
- package/dist/{createSvgIcon-DfXrmzRs.js → createSvgIcon-B7iWPHJ8.js} +3 -3
- package/dist/createSvgIcon-BI_WIb5V.js +74 -0
- package/dist/{createSvgIcon-10LjrjuM.cjs → createSvgIcon-DxmHHVAO.cjs} +1 -1
- package/dist/createSvgIcon-bF0lGTlg.cjs +2 -0
- package/dist/{fr-BNYi5x0Z.cjs → fr-BunYFA4w.cjs} +1 -1
- package/dist/{fr-HqFYdKZp.js → fr-CxSZx9ZV.js} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +178 -176
- package/dist/{refType-B-3PavG_.cjs → refType-B2Uz1rXB.cjs} +1 -1
- package/dist/{refType-BklAUjsY.js → refType-BZaHOHyZ.js} +7 -7
- package/dist/styled-C9DDL6BK.cjs +26 -0
- package/dist/styled-DIjdzFBV.js +1218 -0
- package/dist/useSlotProps-B8ywiWUP.js +87 -0
- package/dist/useSlotProps-CYib4OeI.cjs +1 -0
- package/dist/{useThemeProps-DDcolYEZ.js → useThemeProps-B20BBUTu.js} +1035 -927
- package/dist/useThemeProps-zi1FRI5J.cjs +42 -0
- package/package.json +16 -16
- package/dist/Box-C0uoTW0F.cjs +0 -1
- package/dist/ButtonBase-C_YtHw1h.cjs +0 -75
- package/dist/DefaultButton-DlTnxizc.cjs +0 -1
- package/dist/IconButton-Cz-zGz0v.cjs +0 -2
- package/dist/InputBase-DCjJT6Ht.cjs +0 -4
- package/dist/SearchInput-sybrE3fq.cjs +0 -1
- package/dist/Tabs-DX6Gm63O.cjs +0 -4
- package/dist/TextInput-Bla-t0jF.cjs +0 -12
- package/dist/TimePicker-EGYtgZTn.cjs +0 -71
- package/dist/Typography-B7jZzwxf.cjs +0 -1
- package/dist/createSvgIcon-Cy5_B3av.cjs +0 -2
- package/dist/createSvgIcon-MpAknZJY.js +0 -84
- package/dist/styled-CCfndrS2.js +0 -424
- package/dist/styled-jkrYOquU.cjs +0 -24
- package/dist/useSlotProps-Br7yUp1t.js +0 -78
- package/dist/useSlotProps-I3uiiCEn.cjs +0 -1
- package/dist/useThemeProps-BYFHMDRd.cjs +0 -42
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { g as
|
|
1
|
+
import { g as h, c as n, _ as t, a as f, u as z, b as R, P as r } from "./useThemeProps-B20BBUTu.js";
|
|
2
2
|
import * as d from "react";
|
|
3
|
-
import { g as
|
|
3
|
+
import { g as C, s as B, c as I, a as O } from "./styled-DIjdzFBV.js";
|
|
4
4
|
import { jsx as T } from "react/jsx-runtime";
|
|
5
|
-
import { B as
|
|
6
|
-
import { c as
|
|
7
|
-
function
|
|
8
|
-
return
|
|
5
|
+
import { B as $ } from "./ButtonBase-ClqFvN38.js";
|
|
6
|
+
import { c as x } from "./refType-BZaHOHyZ.js";
|
|
7
|
+
function k(o) {
|
|
8
|
+
return h("MuiIconButton", o);
|
|
9
9
|
}
|
|
10
|
-
const
|
|
10
|
+
const P = C("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge"]), _ = P, j = ["edge", "children", "className", "color", "disabled", "disableFocusRipple", "size"], E = (o) => {
|
|
11
11
|
const {
|
|
12
12
|
classes: e,
|
|
13
13
|
disabled: s,
|
|
@@ -17,8 +17,8 @@ const j = B("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
17
17
|
} = o, c = {
|
|
18
18
|
root: ["root", s && "disabled", a !== "default" && `color${n(a)}`, i && `edge${n(i)}`, `size${n(l)}`]
|
|
19
19
|
};
|
|
20
|
-
return
|
|
21
|
-
},
|
|
20
|
+
return O(c, k, e);
|
|
21
|
+
}, M = B($, {
|
|
22
22
|
name: "MuiIconButton",
|
|
23
23
|
slot: "Root",
|
|
24
24
|
overridesResolver: (o, e) => {
|
|
@@ -80,42 +80,42 @@ const j = B("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
80
80
|
padding: 12,
|
|
81
81
|
fontSize: o.typography.pxToRem(28)
|
|
82
82
|
}, {
|
|
83
|
-
[`&.${
|
|
83
|
+
[`&.${_.disabled}`]: {
|
|
84
84
|
backgroundColor: "transparent",
|
|
85
85
|
color: (o.vars || o).palette.action.disabled
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
|
-
}),
|
|
89
|
-
const a =
|
|
88
|
+
}), N = /* @__PURE__ */ d.forwardRef(function(e, s) {
|
|
89
|
+
const a = z({
|
|
90
90
|
props: e,
|
|
91
91
|
name: "MuiIconButton"
|
|
92
92
|
}), {
|
|
93
93
|
edge: i = !1,
|
|
94
94
|
children: l,
|
|
95
95
|
className: c,
|
|
96
|
-
color:
|
|
96
|
+
color: b = "default",
|
|
97
97
|
disabled: p = !1,
|
|
98
98
|
disableFocusRipple: u = !1,
|
|
99
|
-
size:
|
|
100
|
-
} = a,
|
|
99
|
+
size: v = "medium"
|
|
100
|
+
} = a, m = R(a, j), g = t({}, a, {
|
|
101
101
|
edge: i,
|
|
102
|
-
color:
|
|
102
|
+
color: b,
|
|
103
103
|
disabled: p,
|
|
104
104
|
disableFocusRipple: u,
|
|
105
|
-
size:
|
|
106
|
-
}),
|
|
107
|
-
return /* @__PURE__ */ T(
|
|
108
|
-
className:
|
|
105
|
+
size: v
|
|
106
|
+
}), y = E(g);
|
|
107
|
+
return /* @__PURE__ */ T(M, t({
|
|
108
|
+
className: I(y.root, c),
|
|
109
109
|
centerRipple: !0,
|
|
110
110
|
focusRipple: !u,
|
|
111
111
|
disabled: p,
|
|
112
|
-
ref: s
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
ref: s
|
|
113
|
+
}, m, {
|
|
114
|
+
ownerState: g,
|
|
115
115
|
children: l
|
|
116
116
|
}));
|
|
117
117
|
});
|
|
118
|
-
process.env.NODE_ENV !== "production" && (
|
|
118
|
+
process.env.NODE_ENV !== "production" && (N.propTypes = {
|
|
119
119
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
120
120
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
121
121
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -123,7 +123,7 @@ process.env.NODE_ENV !== "production" && (b.propTypes = {
|
|
|
123
123
|
/**
|
|
124
124
|
* The icon to display.
|
|
125
125
|
*/
|
|
126
|
-
children:
|
|
126
|
+
children: x(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(`
|
|
127
127
|
`)) : null),
|
|
128
128
|
/**
|
|
129
129
|
* Override or extend the styles applied to the component.
|
|
@@ -177,9 +177,8 @@ process.env.NODE_ENV !== "production" && (b.propTypes = {
|
|
|
177
177
|
*/
|
|
178
178
|
sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object])
|
|
179
179
|
});
|
|
180
|
-
const W = b;
|
|
181
180
|
export {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
181
|
+
N as I,
|
|
182
|
+
k as g,
|
|
183
|
+
_ as i
|
|
185
184
|
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("./useThemeProps-zi1FRI5J.cjs"),z=require("react"),a=require("./styled-C9DDL6BK.cjs"),h=require("react/jsx-runtime"),m=require("./ButtonBase-DLRUHDp_.cjs"),C=require("./refType-B2Uz1rXB.cjs");function R(o){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:()=>o[t]})}}return r.default=o,Object.freeze(r)}const c=R(z);function y(o){return e.generateUtilityClass("MuiIconButton",o)}const B=a.generateUtilityClasses("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),g=B,O=["edge","children","className","color","disabled","disableFocusRipple","size"],x=o=>{const{classes:r,disabled:t,color:s,edge:n,size:i}=o,l={root:["root",t&&"disabled",s!=="default"&&`color${e.capitalize(s)}`,n&&`edge${e.capitalize(n)}`,`size${e.capitalize(i)}`]};return a.composeClasses(l,y,r)},_=a.styled(m.ButtonBase,{name:"MuiIconButton",slot:"Root",overridesResolver:(o,r)=>{const{ownerState:t}=o;return[r.root,t.color!=="default"&&r[`color${e.capitalize(t.color)}`],t.edge&&r[`edge${e.capitalize(t.edge)}`],r[`size${e.capitalize(t.size)}`]]}})(({theme:o,ownerState:r})=>e._extends({textAlign:"center",flex:"0 0 auto",fontSize:o.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(o.vars||o).palette.action.active,transition:o.transitions.create("background-color",{duration:o.transitions.duration.shortest})},!r.disableRipple&&{"&:hover":{backgroundColor:o.vars?`rgba(${o.vars.palette.action.activeChannel} / ${o.vars.palette.action.hoverOpacity})`:e.alpha_1(o.palette.action.active,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},r.edge==="start"&&{marginLeft:r.size==="small"?-3:-12},r.edge==="end"&&{marginRight:r.size==="small"?-3:-12}),({theme:o,ownerState:r})=>{var t;const s=(t=(o.vars||o).palette)==null?void 0:t[r.color];return e._extends({},r.color==="inherit"&&{color:"inherit"},r.color!=="inherit"&&r.color!=="default"&&e._extends({color:s==null?void 0:s.main},!r.disableRipple&&{"&:hover":e._extends({},s&&{backgroundColor:o.vars?`rgba(${s.mainChannel} / ${o.vars.palette.action.hoverOpacity})`:e.alpha_1(s.main,o.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),r.size==="small"&&{padding:5,fontSize:o.typography.pxToRem(18)},r.size==="large"&&{padding:12,fontSize:o.typography.pxToRem(28)},{[`&.${g.disabled}`]:{backgroundColor:"transparent",color:(o.vars||o).palette.action.disabled}})}),f=c.forwardRef(function(r,t){const s=e.useThemeProps({props:r,name:"MuiIconButton"}),{edge:n=!1,children:i,className:l,color:b="default",disabled:p=!1,disableFocusRipple:d=!1,size:T="medium"}=s,v=e._objectWithoutPropertiesLoose(s,O),u=e._extends({},s,{edge:n,color:b,disabled:p,disableFocusRipple:d,size:T}),P=x(u);return h.jsx(_,e._extends({className:a.clsx(P.root,l),centerRipple:!0,focusRipple:!d,disabled:p,ref:t},v,{ownerState:u,children:i}))});process.env.NODE_ENV!=="production"&&(f.propTypes={children:C.chainPropTypes(e.PropTypes.node,o=>c.Children.toArray(o.children).some(t=>c.isValidElement(t)&&t.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
|
|
2
|
+
`)):null),classes:e.PropTypes.object,className:e.PropTypes.string,color:e.PropTypes.oneOfType([e.PropTypes.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),e.PropTypes.string]),disabled:e.PropTypes.bool,disableFocusRipple:e.PropTypes.bool,disableRipple:e.PropTypes.bool,edge:e.PropTypes.oneOf(["end","start",!1]),size:e.PropTypes.oneOfType([e.PropTypes.oneOf(["small","medium","large"]),e.PropTypes.string]),sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object])});exports.IconButton=f;exports.getIconButtonUtilityClass=y;exports.iconButtonClasses=g;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";const e=require("./useThemeProps-zi1FRI5J.cjs"),Be=require("react"),O=require("./styled-C9DDL6BK.cjs"),T=require("react/jsx-runtime"),B=require("./useForkRef-DfdM2MN5.cjs"),ee=require("./ownerWindow-Dk_4aaak.cjs"),ue=require("./isHostComponent-PydJW4A4.cjs"),de=require("./refType-B2Uz1rXB.cjs");function je(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 a=je(Be);function fe({styles:o,themeId:n,defaultTheme:t={}}){const r=e.useTheme(t),i=typeof o=="function"?o(n&&r[n]||r):o;return T.jsx(O.GlobalStyles,{styles:i})}process.env.NODE_ENV!=="production"&&(fe.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 U=a.createContext(void 0);process.env.NODE_ENV!=="production"&&(U.displayName="FormControlContext");function ye(){return a.useContext(U)}const Me=["onChange","maxRows","minRows","style","value"];function L(o){return parseInt(o,10)||0}const We={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function He(o){return o==null||Object.keys(o).length===0||o.outerHeightStyle===0&&!o.overflowing}const me=a.forwardRef(function(n,t){const{onChange:r,maxRows:i,minRows:d=1,style:E,value:z}=n,I=e._objectWithoutPropertiesLoose(n,Me),{current:C}=a.useRef(z!=null),m=a.useRef(null),N=B.useForkRef(t,m),h=a.useRef(null),v=a.useCallback(()=>{const u=m.current,p=ee.ownerWindow(u).getComputedStyle(u);if(p.width==="0px")return{outerHeightStyle:0,overflowing:!1};const c=h.current;c.style.width=p.width,c.value=u.value||n.placeholder||"x",c.value.slice(-1)===`
|
|
2
|
+
`&&(c.value+=" ");const S=p.boxSizing,R=L(p.paddingBottom)+L(p.paddingTop),g=L(p.borderBottomWidth)+L(p.borderTopWidth),j=c.scrollHeight;c.value="x";const x=c.scrollHeight;let y=j;d&&(y=Math.max(Number(d)*x,y)),i&&(y=Math.min(Number(i)*x,y)),y=Math.max(y,x);const M=y+(S==="border-box"?R+g:0),W=Math.abs(y-j)<=1;return{outerHeightStyle:M,overflowing:W}},[i,d,n.placeholder]),b=a.useCallback(()=>{const u=v();if(He(u))return;const P=m.current;P.style.height=`${u.outerHeightStyle}px`,P.style.overflow=u.overflowing?"hidden":""},[v]);B.useEnhancedEffect(()=>{const u=()=>{b()};let P;const p=()=>{cancelAnimationFrame(P),P=requestAnimationFrame(()=>{u()})},c=ee.debounce(u),S=m.current,R=ee.ownerWindow(S);R.addEventListener("resize",c);let g;return typeof ResizeObserver<"u"&&(g=new ResizeObserver(process.env.NODE_ENV==="test"?p:u),g.observe(S)),()=>{c.clear(),cancelAnimationFrame(P),R.removeEventListener("resize",c),g&&g.disconnect()}},[v,b]),B.useEnhancedEffect(()=>{b()});const F=u=>{C||b(),r&&r(u)};return T.jsxs(a.Fragment,{children:[T.jsx("textarea",e._extends({value:z,onChange:F,ref:N,rows:d,style:E},I)),T.jsx("textarea",{"aria-hidden":!0,className:n.className,readOnly:!0,ref:h,tabIndex:-1,style:e._extends({},We.shadow,E,{paddingTop:0,paddingBottom:0})})]})});process.env.NODE_ENV!=="production"&&(me.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 he({props:o,states:n,muiFormControl:t}){return n.reduce((r,i)=>(r[i]=o[i],t&&typeof o[i]>"u"&&(r[i]=t[i]),r),{})}function Te(o){return T.jsx(fe,e._extends({},o,{defaultTheme:e.defaultTheme,themeId:e.THEME_ID}))}process.env.NODE_ENV!=="production"&&(Te.propTypes={styles:e.PropTypes.oneOfType([e.PropTypes.array,e.PropTypes.func,e.PropTypes.number,e.PropTypes.object,e.PropTypes.string,e.PropTypes.bool])});function ce(o){return o!=null&&!(Array.isArray(o)&&o.length===0)}function be(o,n=!1){return o&&(ce(o.value)&&o.value!==""||n&&ce(o.defaultValue)&&o.defaultValue!=="")}function De(o){return o.startAdornment}function Ve(o){return e.generateUtilityClass("MuiInputBase",o)}const q=O.generateUtilityClasses("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Le=["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"],Pe=(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]},ge=(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]},qe=o=>{const{classes:n,color:t,disabled:r,error:i,endAdornment:d,focused:E,formControl:z,fullWidth:I,hiddenLabel:C,multiline:m,readOnly:N,size:h,startAdornment:v,type:b}=o,F={root:["root",`color${e.capitalize(t)}`,r&&"disabled",i&&"error",I&&"fullWidth",E&&"focused",z&&"formControl",h&&h!=="medium"&&`size${e.capitalize(h)}`,m&&"multiline",v&&"adornedStart",d&&"adornedEnd",C&&"hiddenLabel",N&&"readOnly"],input:["input",r&&"disabled",b==="search"&&"inputTypeSearch",m&&"inputMultiline",h==="small"&&"inputSizeSmall",C&&"inputHiddenLabel",v&&"inputAdornedStart",d&&"inputAdornedEnd",N&&"readOnly"]};return O.composeClasses(F,Ve,n)},xe=O.styled("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Pe})(({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%"})),we=O.styled("input",{name:"MuiInputBase",slot:"Input",overridesResolver:ge})(({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})}),i={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":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&: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"})}),Ue=T.jsx(Te,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),ve=a.forwardRef(function(n,t){var r;const i=e.useThemeProps({props:n,name:"MuiInputBase"}),{"aria-describedby":d,autoComplete:E,autoFocus:z,className:I,components:C={},componentsProps:m={},defaultValue:N,disabled:h,disableInjectingGlobalStyles:v,endAdornment:b,fullWidth:F=!1,id:u,inputComponent:P="input",inputProps:p={},inputRef:c,maxRows:S,minRows:R,multiline:g=!1,name:j,onBlur:x,onChange:y,onClick:M,onFocus:W,onKeyDown:Ce,onKeyUp:Se,placeholder:Re,readOnly:$,renderSuffix:oe,rows:H,slotProps:ne={},slots:te={},startAdornment:_,type:re="text",value:Oe}=i,Ee=e._objectWithoutPropertiesLoose(i,Le),D=p.value!=null?p.value:Oe,{current:K}=a.useRef(D!=null),A=a.useRef(),ze=a.useCallback(s=>{process.env.NODE_ENV!=="production"&&s&&s.nodeName!=="INPUT"&&!s.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(`
|
|
3
|
+
`))},[]),Ne=B.useForkRef(A,c,p.ref,ze),[G,Y]=a.useState(!1),l=ye();process.env.NODE_ENV!=="production"&&a.useEffect(()=>{if(l)return l.registerEffect()},[l]);const f=he({props:i,muiFormControl:l,states:["color","disabled","error","hiddenLabel","size","required","filled"]});f.focused=l?l.focused:G,a.useEffect(()=>{!l&&h&&G&&(Y(!1),x&&x())},[l,h,G,x]);const Z=l&&l.onFilled,J=l&&l.onEmpty,k=a.useCallback(s=>{be(s)?Z&&Z():J&&J()},[Z,J]);B.useEnhancedEffect(()=>{K&&k({value:D})},[D,k,K]);const Ae=s=>{if(f.disabled){s.stopPropagation();return}W&&W(s),p.onFocus&&p.onFocus(s),l&&l.onFocus?l.onFocus(s):Y(!0)},Ie=s=>{x&&x(s),p.onBlur&&p.onBlur(s),l&&l.onBlur?l.onBlur(s):Y(!1)},Fe=(s,...pe)=>{if(!K){const ae=s.target||A.current;if(ae==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));k({value:ae.value})}p.onChange&&p.onChange(s,...pe),y&&y(s,...pe)};a.useEffect(()=>{k(A.current)},[]);const _e=s=>{A.current&&s.currentTarget===s.target&&A.current.focus(),M&&M(s)};let Q=P,w=p;g&&Q==="input"&&(H?(process.env.NODE_ENV!=="production"&&(R||S)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),w=e._extends({type:void 0,minRows:H,maxRows:H},w)):w=e._extends({type:void 0,maxRows:S,minRows:R},w),Q=me);const ke=s=>{k(s.animationName==="mui-auto-fill-cancel"?A.current:{value:"x"})};a.useEffect(()=>{l&&l.setAdornedStart(!!_)},[l,_]);const V=e._extends({},i,{color:f.color||"primary",disabled:f.disabled,endAdornment:b,error:f.error,focused:f.focused,formControl:l,fullWidth:F,hiddenLabel:f.hiddenLabel,multiline:g,size:f.size,startAdornment:_,type:re}),se=qe(V),ie=te.root||C.Root||xe,X=ne.root||m.root||{},le=te.input||C.Input||we;return w=e._extends({},w,(r=ne.input)!=null?r:m.input),T.jsxs(a.Fragment,{children:[!v&&Ue,T.jsxs(ie,e._extends({},X,!ue.isHostComponent(ie)&&{ownerState:e._extends({},V,X.ownerState)},{ref:t,onClick:_e},Ee,{className:O.clsx(se.root,X.className,I,$&&"MuiInputBase-readOnly"),children:[_,T.jsx(U.Provider,{value:null,children:T.jsx(le,e._extends({ownerState:V,"aria-invalid":f.error,"aria-describedby":d,autoComplete:E,autoFocus:z,defaultValue:N,disabled:f.disabled,id:u,onAnimationStart:ke,name:j,placeholder:Re,readOnly:$,required:f.required,rows:H,value:D,onKeyDown:Ce,onKeyUp:Se,type:re},w,!ue.isHostComponent(le)&&{as:Q,ownerState:e._extends({},V,w.ownerState)},{ref:Ne,className:O.clsx(se.input,w.className,$&&"MuiInputBase-readOnly"),onBlur:Ie,onChange:Fe,onFocus:Ae}))}),b,oe?oe(e._extends({},f,{startAdornment:_})):null]}))]})});process.env.NODE_ENV!=="production"&&(ve.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:de.elementTypeAcceptingRef,inputProps:e.PropTypes.object,inputRef:de.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});exports.FormControlContext=U;exports.InputBase=ve;exports.InputBaseComponent=we;exports.InputBaseRoot=xe;exports.formControlState=he;exports.inputBaseClasses=q;exports.inputOverridesResolver=ge;exports.isAdornedStart=De;exports.isFilled=be;exports.rootOverridesResolver=Pe;exports.useFormControl=ye;
|