@sheetxl/utils-mui 0.3.2 → 0.3.4

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/LICENSE.md CHANGED
@@ -1,11 +1,11 @@
1
- # Repository Licensing
2
-
3
- SheetXL contains a mix of open-source and commercially licensed packages. Each package is individually licensed and contains its own license file.
4
-
5
- For the specific terms and conditions applicable to a package, please see the `LICENSE.md` file located in that package's root directory.
6
-
7
- Generally, packages intended for public distribution (such as CLIs, adapters, and vanilla wrappers) are licensed under the MIT license. All other core packages are proprietary and require a commercial license for use.
8
-
9
- For more details on commercial licensing, please visit our website:
10
-
11
- https://www.sheetxl.com/licensing-pricing
1
+ # Repository Licensing
2
+
3
+ SheetXL contains a mix of open-source and commercially licensed packages. Each package is individually licensed and contains its own license file.
4
+
5
+ For the specific terms and conditions applicable to a package, please see the `LICENSE.md` file located in that package's root directory.
6
+
7
+ Generally, packages intended for public distribution (such as CLIs, adapters, and vanilla wrappers) are licensed under the MIT license. All other core packages are proprietary and require a commercial license for use.
8
+
9
+ For more details on commercial licensing, please visit our website:
10
+
11
+ https://www.sheetxl.com/licensing-pricing
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
- # MUI Utilities
2
-
3
- ![SheetXL](https://www.sheetxl.com/logo-text.svg)
4
-
5
- Collection of [@mui/material](https://mui.com/) components available for all [SheetXL](https://www.sheetxl.com) projects.
6
-
7
- These can be using in any React project to provide additional capabilities
8
- beyond the standard `@mui/material` components.
9
-
10
- Any opinionated styles are in the `Exhibit` packages.
1
+ # MUI Utilities
2
+
3
+ ![SheetXL](https://www.sheetxl.com/logo-text.svg)
4
+
5
+ Collection of [@mui/material](https://mui.com/) components available for all [SheetXL](https://www.sheetxl.com) projects.
6
+
7
+ These can be using in any React project to provide additional capabilities
8
+ beyond the standard `@mui/material` components.
9
+
10
+ Any opinionated styles are in the `Exhibit` packages.
@@ -1,6 +1,6 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.3.2
2
+ * @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.3.4
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),n=require("react"),t=require("./Bmd7o9KK4TLeBuca.cjs"),s=require("@mui/material"),T=require("@mui/system"),L=["Input"],N=n.memo(n.forwardRef((y,$)=>{const{initialValue:v="",onOption:w,onValidateOption:u,onInputOption:c,onValidateInputOption:p,onDone:d,inputProps:g,inputLabel:F,inputType:S,inputPlaceHolder:P,options:h=L,autoFocusSel:b=".autoFocus",cancelOption:m,defaultOption:f=h?.[0],...C}=y,[I,j]=n.useState(!1),[a,q]=n.useState(v),[k,D]=n.useState(""),[V,B]=n.useState(!0),i=t.T(async(e,o)=>{if(!p)return!0;const r=await p?.(e,o);D(r?.message??"");const O=r?.valid??!0;return B(O),O},[p]),x=t.T(async e=>{c?.(a,e)},[a,c,d,w,m,f]),M=t.T(async e=>{e.keyCode===t.eo.Enter&&await i?.(a,null)},[a,x]),A=t.T(e=>{q(e.target.value),i?.(e.target.value,null)},[u]),H=t.T(async e=>{let o=await i(a,e);try{o!==!1&&(o=await i(a,e))}catch{}return o??!0},[a,u]);return l.jsx(t.OptionsDialog,{options:h,onDone:d,onOption:(e,o)=>{o||x(e)},onValidateOption:H,cancelOption:m,defaultOption:f,autoFocusSel:b,...C,children:l.jsx(s.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0)},children:l.jsx(s.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:l.jsx(s.TextField,{onFocus:e=>{I||e.target?.select(),j(!0)},type:S,label:F,helperText:k||" ",sx:{width:"100%","& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5),color:V?void 0:"error.main"}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{placeholder:P,spellCheck:!1,autoComplete:"off",...g,className:t.clsx("autoFocus",g?.className),sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${T.alpha("#fff",t.getOverlayAlpha(5))}, ${T.alpha("#fff",t.getOverlayAlpha(5))})`}}},value:a,onChange:A,onKeyDown:M,onContextMenu:e=>{e.stopPropagation()}})})})})}));exports.default=N;
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),n=require("react"),t=require("./cCxHySBMHu8aZZz5.cjs"),s=require("@mui/material"),T=require("@mui/system"),L=["Input"],N=n.memo(n.forwardRef((y,$)=>{const{initialValue:v="",onOption:w,onValidateOption:u,onInputOption:c,onValidateInputOption:p,onDone:d,inputProps:g,inputLabel:F,inputType:S,inputPlaceHolder:P,options:h=L,autoFocusSel:b=".autoFocus",cancelOption:m,defaultOption:f=h?.[0],...C}=y,[I,j]=n.useState(!1),[a,q]=n.useState(v),[k,D]=n.useState(""),[V,B]=n.useState(!0),i=t.T(async(e,o)=>{if(!p)return!0;const r=await p?.(e,o);D(r?.message??"");const O=r?.valid??!0;return B(O),O},[p]),x=t.T(async e=>{c?.(a,e)},[a,c,d,w,m,f]),M=t.T(async e=>{e.keyCode===t.eo.Enter&&await i?.(a,null)},[a,x]),A=t.T(e=>{q(e.target.value),i?.(e.target.value,null)},[u]),H=t.T(async e=>{let o=await i(a,e);try{o!==!1&&(o=await i(a,e))}catch{}return o??!0},[a,u]);return l.jsx(t.OptionsDialog,{options:h,onDone:d,onOption:(e,o)=>{o||x(e)},onValidateOption:H,cancelOption:m,defaultOption:f,autoFocusSel:b,...C,children:l.jsx(s.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0)},children:l.jsx(s.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:l.jsx(s.TextField,{onFocus:e=>{I||e.target?.select(),j(!0)},type:S,label:F,helperText:k||" ",sx:{width:"100%","& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5),color:V?void 0:"error.main"}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{placeholder:P,spellCheck:!1,autoComplete:"off",...g,className:t.clsx("autoFocus",g?.className),sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${T.alpha("#fff",t.getOverlayAlpha(5))}, ${T.alpha("#fff",t.getOverlayAlpha(5))})`}}},value:a,onChange:A,onKeyDown:M,onContextMenu:e=>{e.stopPropagation()}})})})})}));exports.default=N;