@cgi-learning-hub/ui 0.0.1-dev.1708941839 → 0.0.1-dev.1708959157
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/{Button-X7eWZQfX.js → Button-C5ROgtyW.js} +12 -12
- package/dist/{Button-Tkz5NkF_.cjs → Button-wMPAZpnO.cjs} +1 -1
- package/dist/ButtonBase-C5_-KI-D.js +831 -0
- package/dist/ButtonBase-XPViWbp_.cjs +75 -0
- package/dist/DefaultButton-BD9W4fvr.cjs +28 -0
- package/dist/DefaultButton-BlGFPRC7.js +439 -0
- package/dist/{Input-CbYjsRHK.js → Input-CGU1Xw4s.js} +10 -10
- package/dist/Input-DHic6dYE.cjs +1 -0
- package/dist/{InputBase-B13Nzzhk.js → InputBase-D8YZOKOt.js} +138 -157
- package/dist/InputBase-WBNJQn8V.cjs +4 -0
- package/dist/Tab-C2Tmr8Sv.cjs +1 -0
- package/dist/Tab-Dgd9jYEq.js +237 -0
- package/dist/TransitionGroupContext-C7wWJ6l7.js +14 -0
- package/dist/TransitionGroupContext-g4tmk10h.cjs +1 -0
- package/dist/Typography-CO64FVmw.cjs +1 -0
- package/dist/Typography-Di0hlj32.js +177 -0
- package/dist/assets/index.css +1 -1
- package/dist/components/AnotherComponent/AnotherComponent.cjs.js +1 -1
- package/dist/components/AnotherComponent/AnotherComponent.es.js +3 -3
- package/dist/components/BasicButtons/BasicButtons.cjs.js +1 -1
- package/dist/components/BasicButtons/BasicButtons.es.js +10 -10
- package/dist/components/BasicButtons/BasicButtons.stories.cjs.js +1 -1
- package/dist/components/Dropzone/Dropzone.cjs.js +5 -0
- package/dist/components/Dropzone/Dropzone.d.ts +9 -0
- package/dist/components/Dropzone/Dropzone.es.js +1209 -0
- package/dist/components/Dropzone/index.cjs.js +1 -0
- package/dist/components/Dropzone/index.d.ts +2 -0
- package/dist/components/Dropzone/index.es.js +4 -0
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +1 -28
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +7 -436
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +8 -8
- 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/IconButton.cjs.js +2 -0
- package/dist/components/buttons/IconButton/IconButton.d.ts +5 -0
- package/dist/components/buttons/IconButton/IconButton.es.js +187 -0
- package/dist/components/buttons/IconButton/index.cjs.js +1 -0
- package/dist/components/buttons/IconButton/index.d.ts +2 -0
- package/dist/components/buttons/IconButton/index.es.js +4 -0
- 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.d.ts +1 -0
- package/dist/components/buttons/index.es.js +8 -6
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.es.js +22 -12
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.es.js +77 -247
- package/dist/components/inputs/TextInput/TextInput.cjs.js +11 -13
- package/dist/components/inputs/TextInput/TextInput.es.js +367 -404
- package/dist/components/lists/FileList/FileList.cjs.js +1 -0
- package/dist/components/lists/FileList/FileList.d.ts +7 -0
- package/dist/components/lists/FileList/FileList.es.js +19 -0
- package/dist/components/lists/FileList/FileListItem.cjs.js +1 -0
- package/dist/components/lists/FileList/FileListItem.d.ts +13 -0
- package/dist/components/lists/FileList/FileListItem.es.js +40 -0
- package/dist/components/lists/FileList/index.cjs.js +1 -0
- package/dist/components/lists/FileList/index.d.ts +4 -0
- package/dist/components/lists/FileList/index.es.js +6 -0
- package/dist/components/lists/index.cjs.js +1 -0
- package/dist/components/lists/index.d.ts +1 -0
- package/dist/components/lists/index.es.js +6 -0
- package/dist/createSvgIcon-B7HVs3ZC.cjs +2 -0
- package/dist/{createSvgIcon-jvI3LIfI.cjs → createSvgIcon-BivvPRyr.cjs} +1 -1
- package/dist/createSvgIcon-D3HDfwCm.js +143 -0
- package/dist/{createSvgIcon-qXNZi4k1.js → createSvgIcon-D4Mxh_r9.js} +14 -14
- package/dist/{extendSxProp-CvhhU9Vb.cjs → extendSxProp-D5gpnasP.cjs} +1 -1
- package/dist/{extendSxProp-BRHiEwyk.js → extendSxProp-DCdWqtQk.js} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +20 -10
- package/dist/ownerWindow-BoRkeomM.js +23 -0
- package/dist/ownerWindow-Dk_4aaak.cjs +1 -0
- package/dist/refType-dllUCpD8.cjs +1 -0
- package/dist/refType-hKctx4k0.js +29 -0
- package/dist/useControlled-BsLcOmhe.js +48 -0
- package/dist/useControlled-jN3fqFfv.cjs +3 -0
- package/dist/useForkRef-CGd3Nhyb.cjs +1 -0
- package/dist/useForkRef-DwN_Iz9R.js +17 -0
- package/dist/useIsFocusVisible-BF0lT08B.cjs +1 -0
- package/dist/useIsFocusVisible-D8ksiuhS.js +69 -0
- package/dist/useTheme-BZek68TX.js +9 -0
- package/dist/useTheme-C-LTLVMt.cjs +1 -0
- package/dist/{useThemeProps-CDriK9TK.cjs → useThemeProps-C6ClLEqN.cjs} +14 -14
- package/dist/{useThemeProps-B6yTTpAe.js → useThemeProps-CHytz5pp.js} +741 -714
- package/dist/useTimeout-KN97abZR.js +47 -0
- package/dist/useTimeout-qjxkiZZn.cjs +1 -0
- package/package.json +2 -1
- package/dist/ButtonBase-CKfcGhaU.js +0 -892
- package/dist/ButtonBase-Cg8cBMzO.cjs +0 -75
- package/dist/Input-CAb0EFzc.cjs +0 -1
- package/dist/InputBase-CKlCw9fj.cjs +0 -4
- package/dist/useForkRef-82uiK71d.cjs +0 -1
- package/dist/useForkRef-CLcOhrzI.js +0 -44
- package/dist/useTheme-BWRyHzdn.js +0 -65
- package/dist/useTheme-BpLcDNG1.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime");require("react");const o=require("./FileListItem.cjs.js"),c=require("../../../createSvgIcon-B7HVs3ZC.cjs"),n=({files:i=[],...s})=>r.jsx(c.Box,{sx:{display:"flex",flexDirection:"column",rowGap:"0.5rem"},children:i.map((t,e)=>r.jsx(o,{file:t,uploading:e%2===0,...s},e))});module.exports=n;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type File } from "./FileListItem";
|
|
2
|
+
export interface FileListProps<T extends File> {
|
|
3
|
+
files: T[];
|
|
4
|
+
onDelete?: (file: T) => void;
|
|
5
|
+
}
|
|
6
|
+
declare const FileList: <T extends File>({ files, ...otherProps }: FileListProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default FileList;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import e from "./FileListItem.es.js";
|
|
4
|
+
import { B as l } from "../../../createSvgIcon-D3HDfwCm.js";
|
|
5
|
+
const n = ({
|
|
6
|
+
files: i = [],
|
|
7
|
+
...t
|
|
8
|
+
}) => /* @__PURE__ */ r(l, { sx: { display: "flex", flexDirection: "column", rowGap: "0.5rem" }, children: i.map((m, o) => /* @__PURE__ */ r(
|
|
9
|
+
e,
|
|
10
|
+
{
|
|
11
|
+
file: m,
|
|
12
|
+
uploading: o % 2 === 0,
|
|
13
|
+
...t
|
|
14
|
+
},
|
|
15
|
+
o
|
|
16
|
+
)) });
|
|
17
|
+
export {
|
|
18
|
+
n as default
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),t=require("../../../createSvgIcon-B7HVs3ZC.cjs"),v=require("react"),p=require("../../../DefaultButton-BD9W4fvr.cjs"),x=require("../../buttons/IconButton/IconButton.cjs.js"),c=require("../../../Typography-CO64FVmw.cjs");var o={},_=t.interopRequireDefaultExports;Object.defineProperty(o,"__esModule",{value:!0});var n=o.default=void 0,f=_(t.requireCreateSvgIcon()),m=e;n=o.default=(0,f.default)((0,m.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");var a={},h=t.interopRequireDefaultExports;Object.defineProperty(a,"__esModule",{value:!0});var u=a.default=void 0,j=h(t.requireCreateSvgIcon()),q=e;u=a.default=(0,j.default)((0,q.jsx)("path",{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm7 7V3.5L18.5 9z"}),"InsertDriveFile");const I=({file:r,uploading:i,onDelete:s})=>{const l=`${r.size} octets`,d=()=>s==null?void 0:s(r);return e.jsxs(t.Box,{sx:{display:"flex",alignItems:"center",columnGap:"1rem"},children:[e.jsx(u,{color:"primary"}),e.jsxs("div",{className:"text-start w-full",children:[e.jsx(c.Typography,{children:r.name}),e.jsx(c.Typography,{fontSize:"0.875rem",color:"grey",children:l})]}),e.jsx(x,{onClick:d,disabled:i,children:i?e.jsx(p.CircularProgress,{size:24}):e.jsx(n,{})})]})},y=v.memo(I);module.exports=y;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface File {
|
|
3
|
+
name: string;
|
|
4
|
+
size: number;
|
|
5
|
+
uploading?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface FileListItemProps<T extends File> {
|
|
8
|
+
file: T;
|
|
9
|
+
uploading?: boolean;
|
|
10
|
+
onDelete?: (file: T) => void;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: React.MemoExoticComponent<(<T extends File>({ file, uploading, onDelete, }: FileListItemProps<T>) => import("react/jsx-runtime").JSX.Element)>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import c, { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { r as u, i as d, B as p } from "../../../createSvgIcon-D3HDfwCm.js";
|
|
3
|
+
import _ from "react";
|
|
4
|
+
import { C as h } from "../../../DefaultButton-BlGFPRC7.js";
|
|
5
|
+
import x from "../../buttons/IconButton/IconButton.es.js";
|
|
6
|
+
import { T as s } from "../../../Typography-Di0hlj32.js";
|
|
7
|
+
var a = {}, I = d;
|
|
8
|
+
Object.defineProperty(a, "__esModule", {
|
|
9
|
+
value: !0
|
|
10
|
+
});
|
|
11
|
+
var m = a.default = void 0, j = I(u()), z = c;
|
|
12
|
+
m = a.default = (0, j.default)(/* @__PURE__ */ (0, z.jsx)("path", {
|
|
13
|
+
d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"
|
|
14
|
+
}), "Delete");
|
|
15
|
+
var i = {}, $ = d;
|
|
16
|
+
Object.defineProperty(i, "__esModule", {
|
|
17
|
+
value: !0
|
|
18
|
+
});
|
|
19
|
+
var n = i.default = void 0, y = $(u()), g = c;
|
|
20
|
+
n = i.default = (0, y.default)(/* @__PURE__ */ (0, g.jsx)("path", {
|
|
21
|
+
d: "M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm7 7V3.5L18.5 9z"
|
|
22
|
+
}), "InsertDriveFile");
|
|
23
|
+
const R = ({
|
|
24
|
+
file: r,
|
|
25
|
+
uploading: o,
|
|
26
|
+
onDelete: t
|
|
27
|
+
}) => {
|
|
28
|
+
const f = `${r.size} octets`, v = () => t == null ? void 0 : t(r);
|
|
29
|
+
return /* @__PURE__ */ l(p, { sx: { display: "flex", alignItems: "center", columnGap: "1rem" }, children: [
|
|
30
|
+
/* @__PURE__ */ e(n, { color: "primary" }),
|
|
31
|
+
/* @__PURE__ */ l("div", { className: "text-start w-full", children: [
|
|
32
|
+
/* @__PURE__ */ e(s, { children: r.name }),
|
|
33
|
+
/* @__PURE__ */ e(s, { fontSize: "0.875rem", color: "grey", children: f })
|
|
34
|
+
] }),
|
|
35
|
+
/* @__PURE__ */ e(x, { onClick: v, disabled: o, children: o ? /* @__PURE__ */ e(h, { size: 24 }) : /* @__PURE__ */ e(m, {}) })
|
|
36
|
+
] });
|
|
37
|
+
}, b = _.memo(R);
|
|
38
|
+
export {
|
|
39
|
+
b as default
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./FileList.cjs.js"),t=require("./FileListItem.cjs.js");exports.FileList=e;exports.FileListItem=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./FileList/FileList.cjs.js"),t=require("./FileList/FileListItem.cjs.js");exports.FileList=e;exports.FileListItem=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./FileList";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("./useThemeProps-C6ClLEqN.cjs"),E=require("react"),N=require("react/jsx-runtime"),C=require("./extendSxProp-D5gpnasP.cjs"),q=require("./createSvgIcon-BivvPRyr.cjs"),y=require("./useControlled-jN3fqFfv.cjs"),h=require("./ownerWindow-Dk_4aaak.cjs"),x=require("./useForkRef-CGd3Nhyb.cjs"),S=require("./useId-Cw0TtD-8.cjs"),I=require("./useTimeout-qjxkiZZn.cjs"),O=require("./useIsFocusVisible-BF0lT08B.cjs");function $(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(o,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return o.default=t,Object.freeze(o)}const w=$(E);function R(t,o){return process.env.NODE_ENV==="production"?()=>null:(r,n,s,u,a)=>{const c=s||"<<anonymous>>",i=a||n;return typeof r[n]<"u"?new Error(`The ${u} \`${i}\` of \`${c}\` is deprecated. ${o}`):null}}function D(t,o){if(process.env.NODE_ENV==="production")return()=>null;const r=o?e._extends({},o.propTypes):null;return s=>(u,a,c,i,d,...l)=>{const p=d||a,f=r==null?void 0:r[p];if(f){const m=f(u,a,c,i,d,...l);if(m)return m}return typeof u[a]<"u"&&!u[s]?new Error(`The prop \`${p}\` of \`${t}\` can only be used together with the \`${s}\` prop.`):null}}function _(t,o,r,n,s){if(process.env.NODE_ENV==="production")return null;const u=s||o;return typeof t[o]<"u"?new Error(`The prop \`${u}\` is not supported. Please remove it.`):null}const F=["className","component"];function M(t={}){const{themeId:o,defaultTheme:r,defaultClassName:n="MuiBox-root",generateClassName:s}=t,u=e.styled$1("div",{shouldForwardProp:c=>c!=="theme"&&c!=="sx"&&c!=="as"})(e.styleFunctionSx);return w.forwardRef(function(i,d){const l=e.useTheme(r),p=C.extendSxProp(i),{className:f,component:m="div"}=p,P=e._objectWithoutPropertiesLoose(p,F);return N.jsx(u,e._extends({as:m,ref:d,className:e.clsx(f,s?s(n):n),theme:o&&l[o]||l},P))})}const j=e.generateUtilityClasses("MuiBox",["root"]),B=j,k=e.createTheme$1(),g=M({themeId:e.THEME_ID,defaultTheme:k,defaultClassName:B.root,generateClassName:e.ClassNameGenerator.generate});process.env.NODE_ENV!=="production"&&(g.propTypes={children:e.PropTypes.node,component:e.PropTypes.elementType,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])});const V=g;var b={exports:{}};(function(t){function o(r){return r&&r.__esModule?r:{default:r}}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports})(b);var G=b.exports,T={};const z={configure:t=>{process.env.NODE_ENV!=="production"&&console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join(`
|
|
2
|
+
`)),e.ClassNameGenerator.configure(t)}},W=Object.freeze(Object.defineProperty({__proto__:null,capitalize:e.capitalize,createChainedFunction:y.createChainedFunction,createSvgIcon:q.createSvgIcon,debounce:h.debounce,deprecatedPropType:R,isMuiElement:y.isMuiElement,ownerDocument:h.ownerDocument,ownerWindow:h.ownerWindow,requirePropFactory:D,setRef:x.setRef,unstable_ClassNameGenerator:z,unstable_useEnhancedEffect:x.useEnhancedEffect,unstable_useId:S.useId,unsupportedProp:_,useControlled:y.useControlled,useEventCallback:I.useEventCallback,useForkRef:x.useForkRef,useIsFocusVisible:O.useIsFocusVisible},Symbol.toStringTag,{value:"Module"})),U=e.getAugmentedNamespace(W);var v;function A(){return v||(v=1,function(t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.createSvgIcon}});var o=U}(T)),T}exports.Box=V;exports.interopRequireDefaultExports=G;exports.requireCreateSvgIcon=A;exports.unsupportedProp=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./useThemeProps-
|
|
1
|
+
"use strict";const e=require("./useThemeProps-C6ClLEqN.cjs"),x=require("react"),v=require("react/jsx-runtime");function _(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const r in o)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(o,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>o[r]})}}return t.default=o,Object.freeze(t)}const g=_(x);function $(o){return e.generateUtilityClass("MuiSvgIcon",o)}e.generateUtilityClasses("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const z=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],b=o=>{const{color:t,fontSize:r,classes:i}=o,n={root:["root",t!=="inherit"&&`color${e.capitalize(t)}`,`fontSize${e.capitalize(r)}`]};return e.composeClasses(n,$,i)},I=e.styled("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(o,t)=>{const{ownerState:r}=o;return[t.root,r.color!=="inherit"&&t[`color${e.capitalize(r.color)}`],t[`fontSize${e.capitalize(r.fontSize)}`]]}})(({theme:o,ownerState:t})=>{var r,i,n,u,f,a,m,d,y,l,c,p,s;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(r=o.transitions)==null||(i=r.create)==null?void 0:i.call(r,"fill",{duration:(n=o.transitions)==null||(n=n.duration)==null?void 0:n.shorter}),fontSize:{inherit:"inherit",small:((u=o.typography)==null||(f=u.pxToRem)==null?void 0:f.call(u,20))||"1.25rem",medium:((a=o.typography)==null||(m=a.pxToRem)==null?void 0:m.call(a,24))||"1.5rem",large:((d=o.typography)==null||(y=d.pxToRem)==null?void 0:y.call(d,35))||"2.1875rem"}[t.fontSize],color:(l=(c=(o.vars||o).palette)==null||(c=c[t.color])==null?void 0:c.main)!=null?l:{action:(p=(o.vars||o).palette)==null||(p=p.action)==null?void 0:p.active,disabled:(s=(o.vars||o).palette)==null||(s=s.action)==null?void 0:s.disabled,inherit:void 0}[t.color]}}),h=g.forwardRef(function(t,r){const i=e.useThemeProps({props:t,name:"MuiSvgIcon"}),{children:n,className:u,color:f="inherit",component:a="svg",fontSize:m="medium",htmlColor:d,inheritViewBox:y=!1,titleAccess:l,viewBox:c="0 0 24 24"}=i,p=e._objectWithoutPropertiesLoose(i,z),s=g.isValidElement(n)&&n.type==="svg",T=e._extends({},i,{color:f,component:a,fontSize:m,instanceFontSize:t.fontSize,inheritViewBox:y,viewBox:c,hasSvgAsChild:s}),S={};y||(S.viewBox=c);const P=b(T);return v.jsxs(I,e._extends({as:a,className:e.clsx(P.root,u),focusable:"false",color:d,"aria-hidden":l?void 0:!0,role:l?"img":void 0,ref:r},S,p,s&&n.props,{ownerState:T,children:[s?n.props.children:n,l?v.jsx("title",{children:l}):null]}))});process.env.NODE_ENV!=="production"&&(h.propTypes={children:e.PropTypes.node,classes:e.PropTypes.object,className:e.PropTypes.string,color:e.PropTypes.oneOfType([e.PropTypes.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),e.PropTypes.string]),component:e.PropTypes.elementType,fontSize:e.PropTypes.oneOfType([e.PropTypes.oneOf(["inherit","large","medium","small"]),e.PropTypes.string]),htmlColor:e.PropTypes.string,inheritViewBox:e.PropTypes.bool,shapeRendering: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]),titleAccess:e.PropTypes.string,viewBox:e.PropTypes.string});h.muiName="SvgIcon";function O(o,t){function r(i,n){return v.jsx(h,e._extends({"data-testid":`${t}Icon`,ref:n},i,{children:o}))}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=h.muiName,g.memo(g.forwardRef(r))}exports.createSvgIcon=O;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { a as _, z as E, A as T, u as b, _ as C, h as P, g as S, B as I, T as $, C as v, P as r, e as O, D as B } from "./useThemeProps-CHytz5pp.js";
|
|
2
|
+
import * as D from "react";
|
|
3
|
+
import { jsx as w } from "react/jsx-runtime";
|
|
4
|
+
import { e as R } from "./extendSxProp-DCdWqtQk.js";
|
|
5
|
+
import { c as M } from "./createSvgIcon-D4Mxh_r9.js";
|
|
6
|
+
import { c as q, i as F, u as j } from "./useControlled-BsLcOmhe.js";
|
|
7
|
+
import { d as V, a as k, o as G } from "./ownerWindow-BoRkeomM.js";
|
|
8
|
+
import { s as z, u as A, a as U } from "./useForkRef-DwN_Iz9R.js";
|
|
9
|
+
import { u as W } from "./useId-BW-oWmul.js";
|
|
10
|
+
import { a as H } from "./useTimeout-KN97abZR.js";
|
|
11
|
+
import { u as L } from "./useIsFocusVisible-D8ksiuhS.js";
|
|
12
|
+
function Y(e, t) {
|
|
13
|
+
return process.env.NODE_ENV === "production" ? () => null : (o, u, s, n, i) => {
|
|
14
|
+
const a = s || "<<anonymous>>", c = i || u;
|
|
15
|
+
return typeof o[u] < "u" ? new Error(`The ${n} \`${c}\` of \`${a}\` is deprecated. ${t}`) : null;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function J(e, t) {
|
|
19
|
+
if (process.env.NODE_ENV === "production")
|
|
20
|
+
return () => null;
|
|
21
|
+
const o = t ? _({}, t.propTypes) : null;
|
|
22
|
+
return (s) => (n, i, a, c, p, ...l) => {
|
|
23
|
+
const f = p || i, m = o == null ? void 0 : o[f];
|
|
24
|
+
if (m) {
|
|
25
|
+
const d = m(n, i, a, c, p, ...l);
|
|
26
|
+
if (d)
|
|
27
|
+
return d;
|
|
28
|
+
}
|
|
29
|
+
return typeof n[i] < "u" && !n[s] ? new Error(`The prop \`${f}\` of \`${e}\` can only be used together with the \`${s}\` prop.`) : null;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function K(e, t, o, u, s) {
|
|
33
|
+
if (process.env.NODE_ENV === "production")
|
|
34
|
+
return null;
|
|
35
|
+
const n = s || t;
|
|
36
|
+
return typeof e[t] < "u" ? new Error(`The prop \`${n}\` is not supported. Please remove it.`) : null;
|
|
37
|
+
}
|
|
38
|
+
const Q = ["className", "component"];
|
|
39
|
+
function X(e = {}) {
|
|
40
|
+
const {
|
|
41
|
+
themeId: t,
|
|
42
|
+
defaultTheme: o,
|
|
43
|
+
defaultClassName: u = "MuiBox-root",
|
|
44
|
+
generateClassName: s
|
|
45
|
+
} = e, n = E("div", {
|
|
46
|
+
shouldForwardProp: (a) => a !== "theme" && a !== "sx" && a !== "as"
|
|
47
|
+
})(T);
|
|
48
|
+
return /* @__PURE__ */ D.forwardRef(function(c, p) {
|
|
49
|
+
const l = b(o), f = R(c), {
|
|
50
|
+
className: m,
|
|
51
|
+
component: d = "div"
|
|
52
|
+
} = f, N = C(f, Q);
|
|
53
|
+
return /* @__PURE__ */ w(n, _({
|
|
54
|
+
as: d,
|
|
55
|
+
ref: p,
|
|
56
|
+
className: P(m, s ? s(u) : u),
|
|
57
|
+
theme: t && l[t] || l
|
|
58
|
+
}, N));
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
const Z = S("MuiBox", ["root"]), ee = Z, te = I(), y = X({
|
|
62
|
+
themeId: $,
|
|
63
|
+
defaultTheme: te,
|
|
64
|
+
defaultClassName: ee.root,
|
|
65
|
+
generateClassName: v.generate
|
|
66
|
+
});
|
|
67
|
+
process.env.NODE_ENV !== "production" && (y.propTypes = {
|
|
68
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
69
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
70
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
71
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
72
|
+
/**
|
|
73
|
+
* @ignore
|
|
74
|
+
*/
|
|
75
|
+
children: r.node,
|
|
76
|
+
/**
|
|
77
|
+
* The component used for the root node.
|
|
78
|
+
* Either a string to use a HTML element or a component.
|
|
79
|
+
*/
|
|
80
|
+
component: r.elementType,
|
|
81
|
+
/**
|
|
82
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
83
|
+
*/
|
|
84
|
+
sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object])
|
|
85
|
+
});
|
|
86
|
+
const he = y;
|
|
87
|
+
var g = { exports: {} };
|
|
88
|
+
(function(e) {
|
|
89
|
+
function t(o) {
|
|
90
|
+
return o && o.__esModule ? o : {
|
|
91
|
+
default: o
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
95
|
+
})(g);
|
|
96
|
+
var xe = g.exports, h = {};
|
|
97
|
+
const oe = {
|
|
98
|
+
configure: (e) => {
|
|
99
|
+
process.env.NODE_ENV !== "production" && console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.", "", "You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead", "", "The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401", "", "The updated documentation: https://mui.com/guides/classname-generator/"].join(`
|
|
100
|
+
`)), v.configure(e);
|
|
101
|
+
}
|
|
102
|
+
}, re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
103
|
+
__proto__: null,
|
|
104
|
+
capitalize: O,
|
|
105
|
+
createChainedFunction: q,
|
|
106
|
+
createSvgIcon: M,
|
|
107
|
+
debounce: V,
|
|
108
|
+
deprecatedPropType: Y,
|
|
109
|
+
isMuiElement: F,
|
|
110
|
+
ownerDocument: k,
|
|
111
|
+
ownerWindow: G,
|
|
112
|
+
requirePropFactory: J,
|
|
113
|
+
setRef: z,
|
|
114
|
+
unstable_ClassNameGenerator: oe,
|
|
115
|
+
unstable_useEnhancedEffect: A,
|
|
116
|
+
unstable_useId: W,
|
|
117
|
+
unsupportedProp: K,
|
|
118
|
+
useControlled: j,
|
|
119
|
+
useEventCallback: H,
|
|
120
|
+
useForkRef: U,
|
|
121
|
+
useIsFocusVisible: L
|
|
122
|
+
}, Symbol.toStringTag, { value: "Module" })), se = /* @__PURE__ */ B(re);
|
|
123
|
+
var x;
|
|
124
|
+
function _e() {
|
|
125
|
+
return x || (x = 1, function(e) {
|
|
126
|
+
"use client";
|
|
127
|
+
Object.defineProperty(e, "__esModule", {
|
|
128
|
+
value: !0
|
|
129
|
+
}), Object.defineProperty(e, "default", {
|
|
130
|
+
enumerable: !0,
|
|
131
|
+
get: function() {
|
|
132
|
+
return t.createSvgIcon;
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
var t = se;
|
|
136
|
+
}(h)), h;
|
|
137
|
+
}
|
|
138
|
+
export {
|
|
139
|
+
he as B,
|
|
140
|
+
xe as i,
|
|
141
|
+
_e as r,
|
|
142
|
+
K as u
|
|
143
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as I, g as b, s as w, e as g, f as C, _ as T, a as S, h as N, P as o, j as R } from "./useThemeProps-CHytz5pp.js";
|
|
2
2
|
import * as v from "react";
|
|
3
3
|
import { jsxs as O, jsx as _ } from "react/jsx-runtime";
|
|
4
|
-
function
|
|
5
|
-
return
|
|
4
|
+
function j(e) {
|
|
5
|
+
return I("MuiSvgIcon", e);
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
const
|
|
7
|
+
b("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
|
|
8
|
+
const B = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"], A = (e) => {
|
|
9
9
|
const {
|
|
10
10
|
color: n,
|
|
11
11
|
fontSize: t,
|
|
@@ -13,7 +13,7 @@ const j = ["children", "className", "color", "component", "fontSize", "htmlColor
|
|
|
13
13
|
} = e, i = {
|
|
14
14
|
root: ["root", n !== "inherit" && `color${g(n)}`, `fontSize${g(t)}`]
|
|
15
15
|
};
|
|
16
|
-
return R(i,
|
|
16
|
+
return R(i, j, r);
|
|
17
17
|
}, E = w("svg", {
|
|
18
18
|
name: "MuiSvgIcon",
|
|
19
19
|
slot: "Root",
|
|
@@ -27,7 +27,7 @@ const j = ["children", "className", "color", "component", "fontSize", "htmlColor
|
|
|
27
27
|
theme: e,
|
|
28
28
|
ownerState: n
|
|
29
29
|
}) => {
|
|
30
|
-
var t, r, i,
|
|
30
|
+
var t, r, i, d, f, c, h, u, m, s, a, p, l;
|
|
31
31
|
return {
|
|
32
32
|
userSelect: "none",
|
|
33
33
|
width: "1em",
|
|
@@ -42,9 +42,9 @@ const j = ["children", "className", "color", "component", "fontSize", "htmlColor
|
|
|
42
42
|
}),
|
|
43
43
|
fontSize: {
|
|
44
44
|
inherit: "inherit",
|
|
45
|
-
small: ((
|
|
45
|
+
small: ((d = e.typography) == null || (f = d.pxToRem) == null ? void 0 : f.call(d, 20)) || "1.25rem",
|
|
46
46
|
medium: ((c = e.typography) == null || (h = c.pxToRem) == null ? void 0 : h.call(c, 24)) || "1.5rem",
|
|
47
|
-
large: ((
|
|
47
|
+
large: ((u = e.typography) == null || (m = u.pxToRem) == null ? void 0 : m.call(u, 35)) || "2.1875rem"
|
|
48
48
|
}[n.fontSize],
|
|
49
49
|
// TODO v5 deprecate, v6 remove for sx
|
|
50
50
|
color: (s = (a = (e.vars || e).palette) == null || (a = a[n.color]) == null ? void 0 : a.main) != null ? s : {
|
|
@@ -59,15 +59,15 @@ const j = ["children", "className", "color", "component", "fontSize", "htmlColor
|
|
|
59
59
|
name: "MuiSvgIcon"
|
|
60
60
|
}), {
|
|
61
61
|
children: i,
|
|
62
|
-
className:
|
|
62
|
+
className: d,
|
|
63
63
|
color: f = "inherit",
|
|
64
64
|
component: c = "svg",
|
|
65
65
|
fontSize: h = "medium",
|
|
66
|
-
htmlColor:
|
|
66
|
+
htmlColor: u,
|
|
67
67
|
inheritViewBox: m = !1,
|
|
68
68
|
titleAccess: s,
|
|
69
69
|
viewBox: a = "0 0 24 24"
|
|
70
|
-
} = r, p = T(r,
|
|
70
|
+
} = r, p = T(r, B), l = /* @__PURE__ */ v.isValidElement(i) && i.type === "svg", x = S({}, r, {
|
|
71
71
|
color: f,
|
|
72
72
|
component: c,
|
|
73
73
|
fontSize: h,
|
|
@@ -80,9 +80,9 @@ const j = ["children", "className", "color", "component", "fontSize", "htmlColor
|
|
|
80
80
|
const z = A(x);
|
|
81
81
|
return /* @__PURE__ */ O(E, S({
|
|
82
82
|
as: c,
|
|
83
|
-
className: N(z.root,
|
|
83
|
+
className: N(z.root, d),
|
|
84
84
|
focusable: "false",
|
|
85
|
-
color:
|
|
85
|
+
color: u,
|
|
86
86
|
"aria-hidden": s ? void 0 : !0,
|
|
87
87
|
role: s ? "img" : void 0,
|
|
88
88
|
ref: t
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("./useThemeProps-
|
|
1
|
+
"use strict";const o=require("./useThemeProps-C6ClLEqN.cjs"),c=["sx"],x=t=>{var s,r;const n={systemProps:{},otherProps:{}},i=(s=t==null||(r=t.theme)==null?void 0:r.unstable_sxConfig)!=null?s:o.defaultSxConfig;return Object.keys(t).forEach(e=>{i[e]?n.systemProps[e]=t[e]:n.otherProps[e]=t[e]}),n};function f(t){const{sx:s}=t,r=o._objectWithoutPropertiesLoose(t,c),{systemProps:n,otherProps:i}=x(r);let e;return Array.isArray(s)?e=[n,...s]:typeof s=="function"?e=(...u)=>{const l=s(...u);return o.isPlainObject(l)?o._extends({},n,l):n}:e=o._extends({},n,s),o._extends({},i,{sx:e})}exports.extendSxProp=f;
|
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var m=require("./assets/index.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./components/AnotherComponent/AnotherComponent.cjs.js"),n=require("./components/BasicButtons/BasicButtons.cjs.js"),o=require("./components/Dropzone/Dropzone.cjs.js"),e=require("./DefaultButton-BD9W4fvr.cjs"),r=require("./components/buttons/IconButton/IconButton.cjs.js"),s=require("./components/buttons/PrimaryButton/PrimaryButton.cjs.js"),u=require("./components/buttons/SecondaryButton/SecondaryButton.cjs.js"),i=require("./components/inputs/SearchInput/SearchInput.cjs.js"),c=require("./components/inputs/TextInput/TextInput.cjs.js"),_=require("./components/lists/FileList/FileList.cjs.js"),p=require("./components/lists/FileList/FileListItem.cjs.js"),a=require("./Tab-C2Tmr8Sv.cjs");exports.AnotherComponent=t;exports.BasicButtons=n;exports.Dropzone=o;exports.DefaultButton=e.DefaultButton;exports.IconButton=r;exports.PrimaryButton=s;exports.SecondaryButton=u;exports.SearchInput=i;exports.TextInput=c;exports.FileList=_;exports.FileListItem=p;exports.Tab=a.Tab;
|
package/dist/index.es.js
CHANGED
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
import "./assets/index.css";
|
|
2
2
|
import { default as r } from "./components/AnotherComponent/AnotherComponent.es.js";
|
|
3
3
|
import { default as f } from "./components/BasicButtons/BasicButtons.es.js";
|
|
4
|
-
import { default as p } from "./components/
|
|
5
|
-
import {
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
4
|
+
import { default as p } from "./components/Dropzone/Dropzone.es.js";
|
|
5
|
+
import { D as s } from "./DefaultButton-BlGFPRC7.js";
|
|
6
|
+
import { default as n } from "./components/buttons/IconButton/IconButton.es.js";
|
|
7
|
+
import { default as d } from "./components/buttons/PrimaryButton/PrimaryButton.es.js";
|
|
8
|
+
import { default as B } from "./components/buttons/SecondaryButton/SecondaryButton.es.js";
|
|
9
|
+
import { default as I } from "./components/inputs/SearchInput/SearchInput.es.js";
|
|
10
|
+
import { default as T } from "./components/inputs/TextInput/TextInput.es.js";
|
|
11
|
+
import { default as y } from "./components/lists/FileList/FileList.es.js";
|
|
12
|
+
import { default as L } from "./components/lists/FileList/FileListItem.es.js";
|
|
13
|
+
import { T as b } from "./Tab-Dgd9jYEq.js";
|
|
9
14
|
export {
|
|
10
15
|
r as AnotherComponent,
|
|
11
16
|
f as BasicButtons,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
s as DefaultButton,
|
|
18
|
+
p as Dropzone,
|
|
19
|
+
y as FileList,
|
|
20
|
+
L as FileListItem,
|
|
21
|
+
n as IconButton,
|
|
22
|
+
d as PrimaryButton,
|
|
23
|
+
I as SearchInput,
|
|
24
|
+
B as SecondaryButton,
|
|
25
|
+
b as Tab,
|
|
26
|
+
T as TextInput
|
|
17
27
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
function i(e, t = 166) {
|
|
2
|
+
let o;
|
|
3
|
+
function n(...u) {
|
|
4
|
+
const c = () => {
|
|
5
|
+
e.apply(this, u);
|
|
6
|
+
};
|
|
7
|
+
clearTimeout(o), o = setTimeout(c, t);
|
|
8
|
+
}
|
|
9
|
+
return n.clear = () => {
|
|
10
|
+
clearTimeout(o);
|
|
11
|
+
}, n;
|
|
12
|
+
}
|
|
13
|
+
function r(e) {
|
|
14
|
+
return e && e.ownerDocument || document;
|
|
15
|
+
}
|
|
16
|
+
function a(e) {
|
|
17
|
+
return r(e).defaultView || window;
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
r as a,
|
|
21
|
+
i as d,
|
|
22
|
+
a as o
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function i(e,o=166){let n;function t(...c){const r=()=>{e.apply(this,c)};clearTimeout(n),n=setTimeout(r,o)}return t.clear=()=>{clearTimeout(n)},t}function u(e){return e&&e.ownerDocument||document}function d(e){return u(e).defaultView||window}exports.debounce=i;exports.ownerDocument=u;exports.ownerWindow=d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("./useThemeProps-C6ClLEqN.cjs");function c(n,e){return process.env.NODE_ENV==="production"?()=>null:function(...t){return n(...t)||e(...t)}}function f(n){const{prototype:e={}}=n;return!!e.isReactComponent}function l(n,e,i,t,u){const p=n[e],s=u||e;if(p==null||typeof window>"u")return null;let r;return typeof p=="function"&&!f(p)&&(r="Did you accidentally provide a plain function component instead?"),r!==void 0?new Error(`Invalid ${t} \`${s}\` supplied to \`${i}\`. Expected an element type that can hold a ref. ${r} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const a=c(o.PropTypes.elementType,l),y=o.PropTypes.oneOfType([o.PropTypes.func,o.PropTypes.object]),d=y;exports.chainPropTypes=c;exports.elementTypeAcceptingRef=a;exports.refType=d;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { P as o } from "./useThemeProps-CHytz5pp.js";
|
|
2
|
+
function a(n, e) {
|
|
3
|
+
return process.env.NODE_ENV === "production" ? () => null : function(...t) {
|
|
4
|
+
return n(...t) || e(...t);
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
function f(n) {
|
|
8
|
+
const {
|
|
9
|
+
prototype: e = {}
|
|
10
|
+
} = n;
|
|
11
|
+
return !!e.isReactComponent;
|
|
12
|
+
}
|
|
13
|
+
function l(n, e, p, t, c) {
|
|
14
|
+
const r = n[e], u = c || e;
|
|
15
|
+
if (r == null || // When server-side rendering React doesn't warn either.
|
|
16
|
+
// This is not an accurate check for SSR.
|
|
17
|
+
// This is only in place for emotion compat.
|
|
18
|
+
// TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
|
|
19
|
+
typeof window > "u")
|
|
20
|
+
return null;
|
|
21
|
+
let i;
|
|
22
|
+
return typeof r == "function" && !f(r) && (i = "Did you accidentally provide a plain function component instead?"), i !== void 0 ? new Error(`Invalid ${t} \`${u}\` supplied to \`${p}\`. Expected an element type that can hold a ref. ${i} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
|
|
23
|
+
}
|
|
24
|
+
const y = a(o.elementType, l), s = o.oneOfType([o.func, o.object]), m = s;
|
|
25
|
+
export {
|
|
26
|
+
a as c,
|
|
27
|
+
y as e,
|
|
28
|
+
m as r
|
|
29
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as u from "react";
|
|
2
|
+
function d(...t) {
|
|
3
|
+
return t.reduce((o, e) => e == null ? o : function(...i) {
|
|
4
|
+
o.apply(this, i), e.apply(this, i);
|
|
5
|
+
}, () => {
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
function f(t, o) {
|
|
9
|
+
var e, n;
|
|
10
|
+
return /* @__PURE__ */ u.isValidElement(t) && o.indexOf(
|
|
11
|
+
// For server components `muiName` is avaialble in element.type._payload.value.muiName
|
|
12
|
+
// relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
|
|
13
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
14
|
+
(e = t.type.muiName) != null ? e : (n = t.type) == null || (n = n._payload) == null || (n = n.value) == null ? void 0 : n.muiName
|
|
15
|
+
) !== -1;
|
|
16
|
+
}
|
|
17
|
+
function h({
|
|
18
|
+
controlled: t,
|
|
19
|
+
default: o,
|
|
20
|
+
name: e,
|
|
21
|
+
state: n = "value"
|
|
22
|
+
}) {
|
|
23
|
+
const {
|
|
24
|
+
current: i
|
|
25
|
+
} = u.useRef(t !== void 0), [r, s] = u.useState(o), c = i ? t : r;
|
|
26
|
+
if (process.env.NODE_ENV !== "production") {
|
|
27
|
+
u.useEffect(() => {
|
|
28
|
+
i !== (t !== void 0) && console.error([`MUI: A component is changing the ${i ? "" : "un"}controlled ${n} state of ${e} to be ${i ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${e} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
|
|
29
|
+
`));
|
|
30
|
+
}, [n, e, t]);
|
|
31
|
+
const {
|
|
32
|
+
current: l
|
|
33
|
+
} = u.useRef(o);
|
|
34
|
+
u.useEffect(() => {
|
|
35
|
+
!i && l !== o && console.error([`MUI: A component is changing the default ${n} state of an uncontrolled ${e} after being initialized. To suppress this warning opt to use a controlled ${e}.`].join(`
|
|
36
|
+
`));
|
|
37
|
+
}, [JSON.stringify(o)]);
|
|
38
|
+
}
|
|
39
|
+
const a = u.useCallback((l) => {
|
|
40
|
+
i || s(l);
|
|
41
|
+
}, []);
|
|
42
|
+
return [c, a];
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
d as c,
|
|
46
|
+
f as i,
|
|
47
|
+
h as u
|
|
48
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";const f=require("react");function d(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const r=d(f);function p(...e){return e.reduce((o,t)=>t==null?o:function(...i){o.apply(this,i),t.apply(this,i)},()=>{})}function h(e,o){var t,n;return r.isValidElement(e)&&o.indexOf((t=e.type.muiName)!=null?t:(n=e.type)==null||(n=n._payload)==null||(n=n.value)==null?void 0:n.muiName)!==-1}function m({controlled:e,default:o,name:t,state:n="value"}){const{current:i}=r.useRef(e!==void 0),[l,c]=r.useState(o),s=i?e:l;if(process.env.NODE_ENV!=="production"){r.useEffect(()=>{i!==(e!==void 0)&&console.error([`MUI: A component is changing the ${i?"":"un"}controlled ${n} state of ${t} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${t} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
2
|
+
`))},[n,t,e]);const{current:u}=r.useRef(o);r.useEffect(()=>{!i&&u!==o&&console.error([`MUI: A component is changing the default ${n} state of an uncontrolled ${t} after being initialized. To suppress this warning opt to use a controlled ${t}.`].join(`
|
|
3
|
+
`))},[JSON.stringify(o)])}const a=r.useCallback(u=>{i||c(u)},[]);return[s,a]}exports.createChainedFunction=p;exports.isMuiElement=h;exports.useControlled=m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("react");function r(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=r(o);function f(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const s=typeof window<"u"?c.useLayoutEffect:c.useEffect;function i(...e){return c.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{f(n,t)})},e)}exports.setRef=f;exports.useEnhancedEffect=s;exports.useForkRef=i;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
function f(e, n) {
|
|
3
|
+
typeof e == "function" ? e(n) : e && (e.current = n);
|
|
4
|
+
}
|
|
5
|
+
const o = typeof window < "u" ? t.useLayoutEffect : t.useEffect;
|
|
6
|
+
function c(...e) {
|
|
7
|
+
return t.useMemo(() => e.every((n) => n == null) ? null : (n) => {
|
|
8
|
+
e.forEach((u) => {
|
|
9
|
+
f(u, n);
|
|
10
|
+
});
|
|
11
|
+
}, e);
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
c as a,
|
|
15
|
+
f as s,
|
|
16
|
+
o as u
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("react"),c=require("./useTimeout-qjxkiZZn.cjs");function f(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const l=f(o);let i=!0,a=!1;const d=new c.Timeout,b={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 y(e){const{type:t,tagName:r}=e;return!!(r==="INPUT"&&b[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function h(e){e.metaKey||e.altKey||e.ctrlKey||(i=!0)}function s(){i=!1}function m(){this.visibilityState==="hidden"&&a&&(i=!0)}function p(e){e.addEventListener("keydown",h,!0),e.addEventListener("mousedown",s,!0),e.addEventListener("pointerdown",s,!0),e.addEventListener("touchstart",s,!0),e.addEventListener("visibilitychange",m,!0)}function g(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return i||y(t)}function w(){const e=l.useCallback(u=>{u!=null&&p(u.ownerDocument)},[]),t=l.useRef(!1);function r(){return t.current?(a=!0,d.start(100,()=>{a=!1}),t.current=!1,!0):!1}function n(u){return g(u)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:n,onBlur:r,ref:e}}exports.useIsFocusVisible=w;
|