@zimyo/ui 1.6.2 → 1.6.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/dist/Form/index.esm.js +1 -1
- package/dist/Form/index.js +1 -1
- package/dist/Modal/index.d.ts +1 -1
- package/dist/Radio/index.d.ts +24 -0
- package/dist/Radio/index.esm.js +1 -0
- package/dist/Radio/index.js +1 -0
- package/dist/Select/index.d.ts +2 -1
- package/dist/Select/index.esm.js +2 -2
- package/dist/Select/index.js +2 -2
- package/dist/index.d.ts +90 -6
- package/dist/index.esm.js +3 -3
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/Modal/index.d.ts
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SxProps } from '@mui/system';
|
|
3
|
+
|
|
4
|
+
interface RadioProps {
|
|
5
|
+
label?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
checked?: boolean;
|
|
9
|
+
defaultChecked?: boolean;
|
|
10
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
error?: boolean;
|
|
14
|
+
helperText?: string;
|
|
15
|
+
size?: 'small' | 'medium';
|
|
16
|
+
color?: 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
17
|
+
sx?: SxProps;
|
|
18
|
+
radioSx?: SxProps;
|
|
19
|
+
labelSx?: SxProps;
|
|
20
|
+
}
|
|
21
|
+
declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
|
|
23
|
+
export { Radio as default };
|
|
24
|
+
export type { RadioProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import t from"react";import{useTheme as o,FormControl as l,FormLabel as i,Typography as a,FormControlLabel as n,Radio as d,Box as c,FormHelperText as p}from"@mui/material";var s=function(){return s=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var l in r=arguments[t])Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l]);return e},s.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var m=t.forwardRef(function(t,m){var f=t.label,x=t.description,u=t.name,h=t.checked,b=void 0!==h&&h,y=t.defaultChecked,v=void 0!==y&&y,g=t.onChange,O=t.disabled,S=void 0!==O&&O,j=t.required,k=void 0!==j&&j,C=t.error,z=void 0!==C&&C,w=t.helperText,P=t.size,q=void 0===P?"medium":P,E=t.color,M=void 0===E?"primary":E,R=t.sx,B=void 0===R?{}:R,H=t.radioSx,I=void 0===H?{}:H,T=t.labelSx,W=void 0===T?{}:T,D=function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(o=Object.getOwnPropertySymbols(e);l<o.length;l++)r.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(t[o[l]]=e[o[l]])}return t}(t,["label","description","name","checked","defaultChecked","onChange","disabled","required","error","helperText","size","color","sx","radioSx","labelSx"]),F=o();return e(l,s({ref:m,component:"fieldset",error:z,required:k,disabled:S,sx:s({borderRadius:"8px"},B)},D,{children:[f&&e(i,{sx:s({fontWeight:500,fontSize:"small"===q?"0.875rem":"1rem",color:S?F.palette.text.disabled:z?F.palette.error.main:F.palette.text.primary,mb:1},W),children:[f,k&&r(a,{component:"span",sx:{color:F.palette.error.main,ml:.5,fontSize:"inherit"},children:"*"})]}),r(n,{control:r(d,{name:u,checked:b,defaultChecked:v,onChange:g,size:q,color:M,sx:s({"&.Mui-checked":{color:z?F.palette.error.main:F.palette[M].main},mt:x?.25:0},I)}),label:e(c,{sx:{display:"flex",flexDirection:"column"},children:[r(a,{variant:"small"===q?"body2":"body1",sx:{fontWeight:400,color:S?F.palette.text.disabled:F.palette.text.primary,lineHeight:1.5},children:f}),x&&r(a,{variant:"caption",sx:{color:S?F.palette.text.disabled:F.palette.text.secondary,mt:.25,lineHeight:1.4},children:x})]}),sx:{alignItems:x?"flex-start":"center",margin:0,display:"flex","& .MuiFormControlLabel-label":{ml:1,flex:1},"& .MuiButtonBase-root":{p:"small"===q?.5:1}}}),w&&r(p,{sx:{mt:1,fontSize:"small"===q?"0.75rem":"0.875rem",color:z?F.palette.error.main:F.palette.text.secondary},children:w})]}))});export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("@mui/material"),o=function(){return o=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var l in r=arguments[t])Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l]);return e},o.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var l=r.forwardRef(function(r,l){var a=r.label,i=r.description,n=r.name,s=r.checked,d=void 0!==s&&s,c=r.defaultChecked,p=void 0!==c&&c,m=r.onChange,x=r.disabled,u=void 0!==x&&x,h=r.required,f=void 0!==h&&h,b=r.error,y=void 0!==b&&b,v=r.helperText,g=r.size,j=void 0===g?"medium":g,O=r.color,S=void 0===O?"primary":O,C=r.sx,k=void 0===C?{}:C,T=r.radioSx,q=void 0===T?{}:T,z=r.labelSx,w=void 0===z?{}:z,F=function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(o=Object.getOwnPropertySymbols(e);l<o.length;l++)r.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(t[o[l]]=e[o[l]])}return t}(r,["label","description","name","checked","defaultChecked","onChange","disabled","required","error","helperText","size","color","sx","radioSx","labelSx"]),P=t.useTheme();return e.jsxs(t.FormControl,o({ref:l,component:"fieldset",error:y,required:f,disabled:u,sx:o({borderRadius:"8px"},k)},F,{children:[a&&e.jsxs(t.FormLabel,{sx:o({fontWeight:500,fontSize:"small"===j?"0.875rem":"1rem",color:u?P.palette.text.disabled:y?P.palette.error.main:P.palette.text.primary,mb:1},w),children:[a,f&&e.jsx(t.Typography,{component:"span",sx:{color:P.palette.error.main,ml:.5,fontSize:"inherit"},children:"*"})]}),e.jsx(t.FormControlLabel,{control:e.jsx(t.Radio,{name:n,checked:d,defaultChecked:p,onChange:m,size:j,color:S,sx:o({"&.Mui-checked":{color:y?P.palette.error.main:P.palette[S].main},mt:i?.25:0},q)}),label:e.jsxs(t.Box,{sx:{display:"flex",flexDirection:"column"},children:[e.jsx(t.Typography,{variant:"small"===j?"body2":"body1",sx:{fontWeight:400,color:u?P.palette.text.disabled:P.palette.text.primary,lineHeight:1.5},children:a}),i&&e.jsx(t.Typography,{variant:"caption",sx:{color:u?P.palette.text.disabled:P.palette.text.secondary,mt:.25,lineHeight:1.4},children:i})]}),sx:{alignItems:i?"flex-start":"center",margin:0,display:"flex","& .MuiFormControlLabel-label":{ml:1,flex:1},"& .MuiButtonBase-root":{p:"small"===j?.5:1}}}),v&&e.jsx(t.FormHelperText,{sx:{mt:1,fontSize:"small"===j?"0.75rem":"0.875rem",color:y?P.palette.error.main:P.palette.text.secondary},children:v})]}))});module.exports=l;
|
package/dist/Select/index.d.ts
CHANGED
|
@@ -20,8 +20,9 @@ interface SelectProps<OptionType extends Option> extends Props<OptionType, boole
|
|
|
20
20
|
searchByID?: boolean;
|
|
21
21
|
value?: any;
|
|
22
22
|
floatingLabel?: boolean;
|
|
23
|
+
maxChipVisible?: number;
|
|
23
24
|
}
|
|
24
|
-
declare function Select<OptionType extends Option>({ label, error, className, size, required, valueKey, labelKey, isMulti, value, options, onChange, searchByID, floatingLabel, ...props }: SelectProps<OptionType>): react_jsx_runtime.JSX.Element;
|
|
25
|
+
declare function Select<OptionType extends Option>({ label, error, className, size, required, valueKey, labelKey, isMulti, value, options, onChange, searchByID, floatingLabel, maxChipVisible, ...props }: SelectProps<OptionType>): react_jsx_runtime.JSX.Element;
|
|
25
26
|
|
|
26
27
|
export { Select, Select as default };
|
|
27
28
|
export type { SelectProps };
|