@loja-integrada/admin-components 1.3.12 → 1.3.13
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.
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { a } from './chunk-4WHAFSRB.js';
|
|
2
|
+
import { b } from './chunk-AGCI6C3Z.js';
|
|
3
|
+
import K, { useCallback, useState, useMemo, useEffect } from 'react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function C(u,r){let a=r.format,o=new globalThis.Intl.NumberFormat(r.locale,a).resolvedOptions();return u.toLocaleString(r.locale,{...o,style:"decimal"})}var I=1e15,m={BRL:{locale:"pt-BR",format:{style:"currency",currency:"BRL",minimumFractionDigits:2,maximumFractionDigits:2}},USD:{locale:"en-US",format:{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}}};var H=({value:u=0,defaultValue:r,currency:a$1="BRL",max:o=I,autoFocus:f=!1,autoSelect:V=!1,autoReset:x=!1,onChange:F=()=>null,onBlur:k=()=>null,onFocus:v=()=>null,onKeyPress:R=()=>null,...D},h)=>{let s=m[a$1],M=useCallback(e=>{let t=e===document.activeElement;e&&f&&!t&&e.focus();},[f]),[B,i]=useState("0"),g=useMemo(()=>()=>{let{format:{maximumFractionDigits:e}}=s,t={...m[a$1],...s};return t.format.minimumFractionDigits=e,t},[a$1,s]),p=e=>typeof e=="number"?e:Number(e.toString().replace(/[^0-9-]/g,"")),E=e=>{let{format:{maximumFractionDigits:t}}=g(),n=e;return typeof e=="string"?(n=p(e),n%1!==0&&(n=n.toFixed(t))):n=Number.isInteger(e)?Number(e)*10**t:e.toFixed(t),p(n)/10**t},l=e=>{let t=E(e),n=C(t,g());return [t,n]},c=e=>{let[t,n]=l(e);if(!o&&o!==0||t<=o)return i(n),[t,n];{let[U,d]=l(o);return i(d),[U,d]}},S=e=>{e.preventDefault();let[t,n]=c(e.target.value);n&&F(e,t,n);},L=e=>{let[t,n]=c(e.target.value);x&&l(0),n&&k(e,t,n);},P=e=>{V&&e.target.select();let[t,n]=c(e.target.value);n&&v(e,t,n);},N=e=>R(e,e.key,e.keyCode);return useEffect(()=>{let e=u||r||0;Array.isArray(e)&&(e=e[0]??0);let[,t]=l(e.toString());i(t);},[a$1,u,r,s]),jsx(a,{...D,ref:b(M,h),value:B,onChange:S,onBlur:L,onFocus:P,onKeyUp:N,inputMode:"decimal"})},Y=K.forwardRef(H);
|
|
7
|
+
|
|
8
|
+
export { H as a, Y as b };
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";export { b as InputCurrency, a as InputCurrencyComponent } from '../../chunk-FGWYMPW3.js';
|
|
2
|
+
import '../../chunk-4WHAFSRB.js';
|
|
2
3
|
import '../../chunk-2VQ6QMMA.js';
|
|
3
4
|
import '../../chunk-BW4TJLAD.js';
|
|
4
|
-
import
|
|
5
|
-
import K, { useCallback, useState, useMemo, useEffect } from 'react';
|
|
6
|
-
import { jsx } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
function C(u,r){let a=r.format,o=new globalThis.Intl.NumberFormat(r.locale,a).resolvedOptions();return u.toLocaleString(r.locale,{...o,style:"decimal"})}var I=1e15,m={BRL:{locale:"pt-BR",format:{style:"currency",currency:"BRL",minimumFractionDigits:2,maximumFractionDigits:2}},USD:{locale:"en-US",format:{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}}};var H=({value:u=0,defaultValue:r,currency:a$1="BRL",max:o=I,autoFocus:f=!1,autoSelect:V=!1,autoReset:x=!1,onChange:F=()=>null,onBlur:k=()=>null,onFocus:v=()=>null,onKeyPress:R=()=>null,...D},h)=>{let s=m[a$1],M=useCallback(e=>{let t=e===document.activeElement;e&&f&&!t&&e.focus();},[f]),[B,i]=useState("0"),g=useMemo(()=>()=>{let{format:{maximumFractionDigits:e}}=s,t={...m[a$1],...s};return t.format.minimumFractionDigits=e,t},[a$1,s]),p=e=>typeof e=="number"?e:Number(e.toString().replace(/[^0-9-]/g,"")),E=e=>{let{format:{maximumFractionDigits:t}}=g(),n=e;return typeof e=="string"?(n=p(e),n%1!==0&&(n=n.toFixed(t))):n=Number.isInteger(e)?Number(e)*10**t:e.toFixed(t),p(n)/10**t},l=e=>{let t=E(e),n=C(t,g());return [t,n]},c=e=>{let[t,n]=l(e);if(!o&&o!==0||t<=o)return i(n),[t,n];{let[U,d]=l(o);return i(d),[U,d]}},S=e=>{e.preventDefault();let[t,n]=c(e.target.value);n&&F(e,t,n);},L=e=>{let[t,n]=c(e.target.value);x&&l(0),n&&k(e,t,n);},P=e=>{V&&e.target.select();let[t,n]=c(e.target.value);n&&v(e,t,n);},N=e=>R(e,e.key,e.keyCode);return useEffect(()=>{let e=u||r||0;Array.isArray(e)&&(e=e[0]??0);let[,t]=l(e.toString());i(t);},[a$1,u,r,s]),jsx(a,{...D,ref:b(M,h),value:B,onChange:S,onBlur:L,onFocus:P,onKeyUp:N,inputMode:"decimal"})},Y=K.forwardRef(H);
|
|
9
|
-
|
|
10
|
-
export { Y as InputCurrency, H as InputCurrencyComponent };
|
|
5
|
+
import '../../chunk-AGCI6C3Z.js';
|
package/dist/forms/index.d.ts
CHANGED
package/dist/forms/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../chunk-
|
|
1
|
+
import '../chunk-PO2FGDAP.js';
|
|
2
2
|
export { a as TextArea } from '../chunk-FSAQLD3H.js';
|
|
3
3
|
export { b as Select, a as SelectComponent } from '../chunk-RMHFUFTQ.js';
|
|
4
4
|
export { a as Calendar } from '../chunk-XJGUMBPQ.js';
|
|
@@ -10,6 +10,7 @@ import '../chunk-ZWW7VJFD.js';
|
|
|
10
10
|
import '../chunk-B3V3TXJU.js';
|
|
11
11
|
import '../chunk-NXRYURC6.js';
|
|
12
12
|
import '../chunk-L6H2NDVS.js';
|
|
13
|
+
export { b as InputCurrency, a as InputCurrencyComponent } from '../chunk-FGWYMPW3.js';
|
|
13
14
|
export { a as DEFAULT_UNITS, b as InputWithUnit } from '../chunk-PLY7AVVE.js';
|
|
14
15
|
export { a as Dropdown } from '../chunk-XH5SAPCB.js';
|
|
15
16
|
export { a as InputMask } from '../chunk-ACI4XQMS.js';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './chunk-
|
|
1
|
+
import './chunk-PO2FGDAP.js';
|
|
2
2
|
export { a as TextArea } from './chunk-FSAQLD3H.js';
|
|
3
3
|
import './chunk-7RP4L6ZM.js';
|
|
4
4
|
import './chunk-4PUGMMDC.js';
|
|
@@ -19,6 +19,7 @@ export { a as Button } from './chunk-ZWW7VJFD.js';
|
|
|
19
19
|
export { b as Box, d as BoxContent, c as BoxHeader, a as BoxSeparator } from './chunk-B3V3TXJU.js';
|
|
20
20
|
export { a as Container, b as ContainerHeader } from './chunk-NXRYURC6.js';
|
|
21
21
|
import './chunk-L6H2NDVS.js';
|
|
22
|
+
export { b as InputCurrency, a as InputCurrencyComponent } from './chunk-FGWYMPW3.js';
|
|
22
23
|
export { a as DEFAULT_UNITS, b as InputWithUnit } from './chunk-PLY7AVVE.js';
|
|
23
24
|
export { a as Dropdown } from './chunk-XH5SAPCB.js';
|
|
24
25
|
export { a as InputMask } from './chunk-ACI4XQMS.js';
|
package/package.json
CHANGED
|
File without changes
|