@zydon/common 2.0.0 → 2.0.1
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/{chunk-Y6ER5LXD.mjs → chunk-CLXZIOVZ.mjs} +1 -1
- package/dist/{chunk-MYKAMLAI.mjs → chunk-EPIVCFTK.mjs} +1 -1
- package/dist/chunk-FXUKC2TO.mjs +3 -0
- package/dist/{chunk-ZN4LYG7I.mjs → chunk-GLPNPJIJ.mjs} +1 -1
- package/dist/{chunk-GNT763UQ.mjs → chunk-LWMTG62I.mjs} +2 -2
- package/dist/components/Incrementer/index.mjs +2 -2
- package/dist/components/StyledTab/index.d.ts +9 -0
- package/dist/components/StyledTab/index.mjs +10 -0
- package/dist/components/StyledTab/props.d.ts +10 -0
- package/dist/components/StyledTab/props.mjs +1 -0
- package/dist/components/StyledTabs/index.d.ts +11 -0
- package/dist/components/StyledTabs/index.mjs +7 -0
- package/dist/components/StyledTabs/props.d.ts +8 -0
- package/dist/components/StyledTabs/props.mjs +1 -0
- package/dist/components/form/Address/index.mjs +1 -1
- package/dist/components/form/Incrementer/index.mjs +2 -2
- package/dist/components/form/UploadAvatarWithCrop/index.mjs +3 -3
- package/dist/components/form/UploadWithCrop/index.mjs +3 -3
- package/dist/components/upload/index.mjs +4 -4
- package/dist/types/datagrid.d.ts +5 -0
- package/dist/types/datagrid.mjs +1 -0
- package/dist/utils/date.d.ts +4 -0
- package/dist/utils/date.mjs +6 -0
- package/dist/utils/formatNumber.d.ts +2 -1
- package/dist/utils/formatNumber.mjs +1 -1
- package/dist/utils/loadable.d.ts +6 -0
- package/dist/utils/loadable.mjs +7 -0
- package/dist/utils/mask.d.ts +8 -0
- package/dist/utils/mask.mjs +3 -0
- package/dist/utils/sort.d.ts +4 -0
- package/dist/utils/sort.mjs +3 -0
- package/dist/utils/uuidv4.d.ts +3 -0
- package/dist/utils/uuidv4.mjs +3 -0
- package/package.json +1 -1
- package/dist/chunk-HLTCIAAR.mjs +0 -3
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var c={code:"pt-BR",currency:"BRL"};function o(n){return n==null||Number.isNaN(n)?null:Number(n)}function l(n,r){let e=c,t=o(n);return t===null?"":new Intl.NumberFormat(e.code,{minimumFractionDigits:0,maximumFractionDigits:2,...r}).format(t)}function s(n,r){let e=c,t=o(n);return t===null?"":new Intl.NumberFormat(e.code,{style:"currency",currency:e.currency,minimumFractionDigits:0,maximumFractionDigits:2,...r}).format(t)}function a(n,r){let e=c,t=o(n);return t===null?"":new Intl.NumberFormat(e.code,{style:"percent",minimumFractionDigits:0,maximumFractionDigits:1,...r}).format(t/100)}function b(n,r){let e=c,t=o(n);return t===null?"":new Intl.NumberFormat(e.code,{notation:"compact",maximumFractionDigits:2,...r}).format(t).replace(/[A-Z]/g,m=>m.toLowerCase())}function f(n){let r=o(n);if(r===null||r===0)return "0 bytes";let e=["bytes","Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"],t=2,u=1024,m=Math.floor(Math.log(r)/Math.log(u));return `${parseFloat((r/u**m).toFixed(t))} ${e[m]}`}var p=n=>+Number(n).toFixed(12),N=n=>new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(n||0);
|
|
2
|
+
|
|
3
|
+
export { l as a, s as b, a as c, b as d, f as e, p as f, N as g };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a, b, c } from './chunk-
|
|
2
|
-
import { e } from './chunk-
|
|
1
|
+
import { a, b, c } from './chunk-CLXZIOVZ.mjs';
|
|
2
|
+
import { e } from './chunk-FXUKC2TO.mjs';
|
|
3
3
|
import { i } from './chunk-S6AXG7VS.mjs';
|
|
4
4
|
import { a as a$1 } from './chunk-QHCGLZFD.mjs';
|
|
5
5
|
import v1 from '@mui/material/Badge';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
1
|
+
export { a as default } from '../../chunk-GLPNPJIJ.mjs';
|
|
2
2
|
import '../../chunk-JZ3KAZMQ.mjs';
|
|
3
|
-
import '../../chunk-
|
|
3
|
+
import '../../chunk-FXUKC2TO.mjs';
|
|
4
4
|
import '../../chunk-DSQPMRZS.mjs';
|
|
5
5
|
import '../../chunk-QHCGLZFD.mjs';
|
|
6
6
|
import '../../chunk-KLIYANST.mjs';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as _emotion_styled from '@emotion/styled';
|
|
2
|
+
import * as _mui_system from '@mui/system';
|
|
3
|
+
import * as _mui_material_styles from '@mui/material/styles';
|
|
4
|
+
import { StyledTabProps } from './props.js';
|
|
5
|
+
import 'react';
|
|
6
|
+
|
|
7
|
+
declare const StyledTab: _emotion_styled.StyledComponent<StyledTabProps & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme>, {}, {}>;
|
|
8
|
+
|
|
9
|
+
export { StyledTab as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { a } from '../../chunk-QHCGLZFD.mjs';
|
|
2
|
+
import '../../chunk-KLIYANST.mjs';
|
|
3
|
+
import n from '@mui/material/Stack';
|
|
4
|
+
import { styled, alpha } from '@mui/material/styles';
|
|
5
|
+
import b from '@mui/material/Tab';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var g=styled(({label:o,onClose:i,icon:p,hasChanges:e,...l})=>jsx(b,{disableRipple:!0,...l,label:jsxs(n,{position:"relative",direction:"row",alignItems:"center",gap:1.5,sx:t=>({"> span":{position:"absolute",top:-14,right:-10,span:{position:"fixed",width:10,height:10,backgroundColor:t.palette.warning.main,border:"1px solid #fff",borderRadius:"50%",zIndex:999}}}),children:[p,o,jsx(a,{icon:"CLOSE_MARK_BUTTON",width:16,onClick:t=>{i(),t.stopPropagation();}}),e&&jsx("span",{children:jsx("span",{})})]})}))(({theme:o})=>({textTransform:"none",fontSize:o.typography.pxToRem(14),margin:"0 !important",color:`${o.palette.primary.lighter} !important`,minHeight:"initial",padding:"10px 16px",backgroundColor:o.palette.primary.dark,border:`1px solid ${alpha(o.palette.primary.darker,.25)}`,borderBottom:0,borderRadius:"8px 8px 0 0",fontWeight:600,overflow:"initial !important",lineHeight:1,"&.Mui-selected":{color:`${o.palette.text.primary} !important`,backgroundColor:o.palette.background.paper,borderColor:o.palette.primary.dark,svg:{color:o.palette.text.disabled}},"&.Mui-focusVisible":{backgroundColor:"rgba(100, 95, 228, 0.32)"},"svg:hover":{opacity:.85}})),y=g;
|
|
9
|
+
|
|
10
|
+
export { y as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as _emotion_styled from '@emotion/styled';
|
|
2
|
+
import * as _mui_system from '@mui/system';
|
|
3
|
+
import * as _mui_material_styles from '@mui/material/styles';
|
|
4
|
+
import * as react from 'react';
|
|
5
|
+
import { StyledTabsProps } from './props.js';
|
|
6
|
+
|
|
7
|
+
declare const StyledTabs: _emotion_styled.StyledComponent<StyledTabsProps & {
|
|
8
|
+
children?: react.ReactNode;
|
|
9
|
+
} & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme>, {}, {}>;
|
|
10
|
+
|
|
11
|
+
export { StyledTabs as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { styled } from '@mui/material/styles';
|
|
2
|
+
import r from '@mui/material/Tabs';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var a=styled(o=>jsx(r,{...o,variant:"scrollable",scrollButtons:"auto"}))({height:"100%",alignItems:"flex-end",gap:8,"& .MuiTabs-indicator":{display:"none",justifyContent:"center",backgroundColor:"transparent"},"& > .MuiButtonBase-root":{height:32,width:32,color:"#fff",marginBottom:2},"& .MuiTabs-flexContainer":{gap:4}}),s=a;
|
|
6
|
+
|
|
7
|
+
export { s as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as a$1 } from '../../../chunk-HQYCK4C3.mjs';
|
|
2
1
|
import { a as a$2 } from '../../../chunk-ZREC5BF3.mjs';
|
|
2
|
+
import { a as a$1 } from '../../../chunk-HQYCK4C3.mjs';
|
|
3
3
|
import { a as a$3 } from '../../../chunk-POP3P3YE.mjs';
|
|
4
4
|
import '../../../chunk-6UGYYTYE.mjs';
|
|
5
5
|
import '../../../chunk-D6NU2WRK.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a } from '../../../chunk-
|
|
1
|
+
import { a } from '../../../chunk-GLPNPJIJ.mjs';
|
|
2
2
|
import '../../../chunk-JZ3KAZMQ.mjs';
|
|
3
|
-
import '../../../chunk-
|
|
3
|
+
import '../../../chunk-FXUKC2TO.mjs';
|
|
4
4
|
import '../../../chunk-DSQPMRZS.mjs';
|
|
5
5
|
import '../../../chunk-QHCGLZFD.mjs';
|
|
6
6
|
import '../../../chunk-KLIYANST.mjs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { b } from '../../../chunk-
|
|
2
|
-
import '../../../chunk-
|
|
1
|
+
import { b } from '../../../chunk-EPIVCFTK.mjs';
|
|
2
|
+
import '../../../chunk-CLXZIOVZ.mjs';
|
|
3
3
|
import '../../../chunk-PABYPOVH.mjs';
|
|
4
4
|
import '../../../chunk-NNSTFVSV.mjs';
|
|
5
5
|
import '../../../chunk-EVHG7UNX.mjs';
|
|
6
|
-
import '../../../chunk-
|
|
6
|
+
import '../../../chunk-FXUKC2TO.mjs';
|
|
7
7
|
import '../../../chunk-S6AXG7VS.mjs';
|
|
8
8
|
import { a } from '../../../chunk-R2LSQJYW.mjs';
|
|
9
9
|
import '../../../chunk-OKHG4T22.mjs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { d as d$1 } from '../../../chunk-
|
|
2
|
-
import { d, e } from '../../../chunk-
|
|
1
|
+
import { d as d$1 } from '../../../chunk-LWMTG62I.mjs';
|
|
2
|
+
import { d, e } from '../../../chunk-CLXZIOVZ.mjs';
|
|
3
3
|
import { a as a$4 } from '../../../chunk-PABYPOVH.mjs';
|
|
4
4
|
import '../../../chunk-NNSTFVSV.mjs';
|
|
5
5
|
import '../../../chunk-EVHG7UNX.mjs';
|
|
6
|
-
import '../../../chunk-
|
|
6
|
+
import '../../../chunk-FXUKC2TO.mjs';
|
|
7
7
|
import { a as a$2 } from '../../../chunk-WMRVP7HJ.mjs';
|
|
8
8
|
import '../../../chunk-S6AXG7VS.mjs';
|
|
9
9
|
import { a } from '../../../chunk-R2LSQJYW.mjs';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { a as UploadAvatar, b as UploadAvatarWithCrop, b as UploadWithCrop } from '../../chunk-
|
|
2
|
-
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload } from '../../chunk-
|
|
3
|
-
export { c as RejectionFiles } from '../../chunk-
|
|
1
|
+
export { a as UploadAvatar, b as UploadAvatarWithCrop, b as UploadWithCrop } from '../../chunk-EPIVCFTK.mjs';
|
|
2
|
+
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload } from '../../chunk-LWMTG62I.mjs';
|
|
3
|
+
export { c as RejectionFiles } from '../../chunk-CLXZIOVZ.mjs';
|
|
4
4
|
import '../../chunk-PABYPOVH.mjs';
|
|
5
5
|
import '../../chunk-NNSTFVSV.mjs';
|
|
6
6
|
import '../../chunk-EVHG7UNX.mjs';
|
|
7
|
-
import '../../chunk-
|
|
7
|
+
import '../../chunk-FXUKC2TO.mjs';
|
|
8
8
|
import { i } from '../../chunk-S6AXG7VS.mjs';
|
|
9
9
|
import '../../chunk-OKHG4T22.mjs';
|
|
10
10
|
import '../../chunk-BQ3PJ47P.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -6,5 +6,6 @@ declare function fPercent(inputValue: InputNumberValue, options?: Options): stri
|
|
|
6
6
|
declare function fShortenNumber(inputValue: InputNumberValue, options?: Options): string;
|
|
7
7
|
declare function fData(inputValue: InputNumberValue): string;
|
|
8
8
|
declare const fWithDecimalPlacesOrNot: (value: string | number) => number;
|
|
9
|
+
declare const fCurrencyBRL: (value?: number | null) => string;
|
|
9
10
|
|
|
10
|
-
export { InputNumberValue, fCurrency, fData, fNumber, fPercent, fShortenNumber, fWithDecimalPlacesOrNot };
|
|
11
|
+
export { InputNumberValue, fCurrency, fCurrencyBRL, fData, fNumber, fPercent, fShortenNumber, fWithDecimalPlacesOrNot };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { b as fCurrency, e as fData, a as fNumber, c as fPercent, d as fShortenNumber, f as fWithDecimalPlacesOrNot } from '../chunk-
|
|
1
|
+
export { b as fCurrency, g as fCurrencyBRL, e as fData, a as fNumber, c as fPercent, d as fShortenNumber, f as fWithDecimalPlacesOrNot } from '../chunk-FXUKC2TO.mjs';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const applyMask: (value: string | undefined, mask: string) => string;
|
|
2
|
+
declare const cpfMask: (v: string) => string;
|
|
3
|
+
declare const cnpjMask: (v: string) => string;
|
|
4
|
+
declare const cepMask: (v: string) => string;
|
|
5
|
+
declare const phoneMask: (v: string) => string;
|
|
6
|
+
declare const cpfMaskOrCnpjMask: (v: string) => string | null;
|
|
7
|
+
|
|
8
|
+
export { applyMask, cepMask, cnpjMask, cpfMask, cpfMaskOrCnpjMask, phoneMask };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var r=(e="",n)=>{let t="",s=0;return [...n].forEach(a=>{t+=a==="#"?e[s++]||"_":a;}),t},l=e=>r((e||"").replace(/\D/g,""),"###.###.###-##"),c=e=>r((e||"").replace(/\D/g,""),"##.###.###/####-##"),o=e=>r((e||"").replace(/\D/g,""),"#####-###"),u=e=>{let t=(e||"").replace(/\D/g,""),s=t.length===11?"(##) #####-####":"(##) ####-####";return r(t,s)},p=e=>{let t=(e||""||"").replace(/\D/g,"");return t.length===11?l(t):t.length===14?c(t):null};
|
|
2
|
+
|
|
3
|
+
export { r as applyMask, o as cepMask, c as cnpjMask, l as cpfMask, p as cpfMaskOrCnpjMask, u as phoneMask };
|
package/package.json
CHANGED
package/dist/chunk-HLTCIAAR.mjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var c={code:"pt-BR",currency:"BRL"};function o(t){return t==null||Number.isNaN(t)?null:Number(t)}function l(t,e){let r=c,n=o(t);return n===null?"":new Intl.NumberFormat(r.code,{minimumFractionDigits:0,maximumFractionDigits:2,...e}).format(n)}function s(t,e){let r=c,n=o(t);return n===null?"":new Intl.NumberFormat(r.code,{style:"currency",currency:r.currency,minimumFractionDigits:0,maximumFractionDigits:2,...e}).format(n)}function a(t,e){let r=c,n=o(t);return n===null?"":new Intl.NumberFormat(r.code,{style:"percent",minimumFractionDigits:0,maximumFractionDigits:1,...e}).format(n/100)}function b(t,e){let r=c,n=o(t);return n===null?"":new Intl.NumberFormat(r.code,{notation:"compact",maximumFractionDigits:2,...e}).format(n).replace(/[A-Z]/g,m=>m.toLowerCase())}function f(t){let e=o(t);if(e===null||e===0)return "0 bytes";let r=["bytes","Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"],n=2,u=1024,m=Math.floor(Math.log(e)/Math.log(u));return `${parseFloat((e/u**m).toFixed(n))} ${r[m]}`}var p=t=>+Number(t).toFixed(12);
|
|
2
|
-
|
|
3
|
-
export { l as a, s as b, a as c, b as d, f as e, p as f };
|