@tap-payments/os-micro-frontend-shared 0.3.226 → 0.3.227
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/build/_chunks/chunk-LQOS3MF6.js +1 -0
- package/build/_chunks/chunk-MFFVCCTZ.js +1 -0
- package/build/_chunks/chunk-W4I7CKBI.js +2 -0
- package/build/components/AppServices/index.js +1 -1
- package/build/components/AppServicesBar/index.js +1 -1
- package/build/components/BrandLogo/index.js +1 -1
- package/build/components/ColumnViews/index.js +1 -1
- package/build/components/CurrencyAmount/CurrencyAmount.d.ts +3 -7
- package/build/components/CurrencyAmount/constants.d.ts +8 -0
- package/build/components/CurrencyAmount/index.d.ts +4 -4
- package/build/components/CurrencyAmount/index.js +1 -1
- package/build/components/CurrencyAmount/style.d.ts +3 -0
- package/build/components/CurrencyAmount/type.d.ts +11 -0
- package/build/components/CurrencyAmountInput/CurrencyAmountInput.d.ts +4 -0
- package/build/components/CurrencyAmountInput/constants.d.ts +10 -0
- package/build/components/CurrencyAmountInput/index.d.ts +4 -0
- package/build/components/CurrencyAmountInput/index.js +1 -0
- package/build/components/CurrencyAmountInput/style.d.ts +11 -0
- package/build/components/CurrencyAmountInput/type.d.ts +16 -0
- package/build/components/Customer/index.js +1 -1
- package/build/components/DateFilter/index.js +1 -1
- package/build/components/FileInputPreview/index.js +1 -1
- package/build/components/FilterDropdown/index.js +1 -1
- package/build/components/ListColumnFilter/index.js +1 -1
- package/build/components/ListHeader/index.js +1 -1
- package/build/components/MerchantLogo/index.js +1 -1
- package/build/components/PaymentSourceFilter/index.js +1 -1
- package/build/components/PhoneFilter/index.js +1 -1
- package/build/components/ReferenceTypeFilter/index.js +1 -1
- package/build/components/StatusFilter/index.js +1 -1
- package/build/components/StatusIcons/index.js +1 -1
- package/build/components/TableCells/CustomCells/AmountCell/style.d.ts +0 -1
- package/build/components/TableCells/index.js +1 -1
- package/build/components/TableReports/index.js +1 -1
- package/build/components/VerificationIcon/index.js +1 -1
- package/build/components/ViewColumnRadioFilter/index.js +1 -1
- package/build/components/WindowSideBar/index.js +1 -1
- package/build/components/index.d.ts +2 -3
- package/build/components/index.js +1 -1
- package/build/index.js +1 -1
- package/package.json +2 -2
- package/build/_chunks/chunk-6YAD5SCS.js +0 -2
- package/build/_chunks/chunk-BL45EG5I.js +0 -1
- package/build/_chunks/chunk-ND2SYD7Y.js +0 -1
- package/build/components/AmountInput/AmountInput.d.ts +0 -14
- package/build/components/AmountInput/index.d.ts +0 -2
- package/build/components/AmountInput/index.js +0 -1
- package/build/components/AmountInput/style.d.ts +0 -7
- package/build/components/DisplayAmount/DisplayAmount.d.ts +0 -12
- package/build/components/DisplayAmount/index.d.ts +0 -2
- package/build/components/DisplayAmount/index.js +0 -1
- package/build/components/DisplayAmount/style.d.ts +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {L,K,j}from'./chunk-TIO3V7XA.js';import {xa,Ia,l,lc}from'./chunk-4XXNGLS6.js';import {forwardRef,useState,useMemo,memo}from'react';import V from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var r="os-shared-CurrencyAmountInput",t={root:`${r}-root`,field:`${r}-field`,display:`${r}-display`,integer:`${r}-integer`,separator:`${r}-separator`,decimal:`${r}-decimal`};var N=styled(V)(({theme:e})=>({color:e.v2.palette.foreground.primary,border:`1px solid ${e.v2.palette.border.default}`,padding:e.v2.spacing(8),borderRadius:e.v2.radius(4),display:"flex",alignItems:"center",justifyContent:"flex-end",width:93,height:32,textAlign:"right",input:{fontSize:"11px",border:"none",color:e.v2.palette.foreground.primary,height:30,padding:0,textAlign:"right"}})),I=styled(L)(({theme:e})=>({flexGrow:1,maxWidth:"100%",padding:0,border:"none",backgroundColor:"transparent",borderRadius:"none",height:24,[`& .${K.input}`]:{padding:0},input:{textAlign:"right",width:"100%",fontWeight:e.v2.typography.fontWeightRegular}})),b=styled(j)(({theme:e})=>({...e.v2.typography.textVariants.body.small.bold,display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",overflow:"auto"})),v=styled("span")(({theme:e})=>({fontWeight:e.v2.typography.fontWeightRegular}));var q=xa(),D=forwardRef(({amount:e,setAmount:u,maxAmount:l$1,isError:R,placeholder:E,selectedCurrency:p,id:o,className:k,sx:P,...B},M)=>{let[W,m]=useState(false),[c,S]=useState(e||""),{integerAmount:F,decimalAmount:d}=Ia(e,p?.code?.english),K=useMemo(()=>l(p?.decimals),[p]),T=n=>{let i=Number(n.target.value)||0;if(l$1&&i>l$1)return false;S(i),u(i);},H=()=>{m(false),u(Number(c));},L=n=>{q&&isNaN(Number(n.key))&&n.key!=="Backspace"&&n.key!=="."&&n.preventDefault();};return jsx(N,{id:o,"data-testid":o??"CurrencyAmountInput",className:lc(t.root,k),sx:P,...B,children:W?jsx(I,{ref:M,id:o,className:t.field,type:"number",placeholder:E??K,value:c,onChange:T,onBlur:H,onKeyDown:L,error:!!R,inputProps:{step:"0.01"},hideArrows:true,autoFocus:true,disableFocusRing:true}):jsxs(b,{id:o?`${o}-display`:void 0,"data-testid":o?`${o}-display`:"CurrencyAmount",className:t.display,component:"span",onClick:()=>{m(true);},children:[jsx("span",{className:t.integer,children:F}),d?jsxs(Fragment,{children:[jsx("span",{className:t.separator,children:"."}),jsx(v,{className:t.decimal,children:d})]}):null]})})});D.displayName="CurrencyAmountInput";var J=memo(D);export{t as a,J as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {j}from'./chunk-TIO3V7XA.js';import {Ia,lc}from'./chunk-4XXNGLS6.js';import {forwardRef,memo}from'react';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var r="os-shared-CurrencyAmount",o={root:`${r}-root`,integer:`${r}-integer`,separator:`${r}-separator`,decimal:`${r}-decimal`};var u=styled(j)(({theme:e})=>({...e.v2.typography.textVariants.body.small.bold,display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",overflow:"auto"})),l=styled("span")(({theme:e})=>({fontWeight:e.v2.typography.fontWeightRegular}));var i=forwardRef(({amount:e,currency:f,id:a,className:C,sx:A,...d},N)=>{let{integerAmount:x,decimalAmount:n}=Ia(e,f??"");return jsxs(u,{ref:N,component:"span",id:a,"data-testid":a??"CurrencyAmount",className:lc(o.root,C),sx:A,...d,children:[jsx("span",{className:o.integer,children:x}),n?jsxs(Fragment,{children:[jsx("span",{className:o.separator,children:"."}),jsx(l,{className:o.decimal,children:n})]}):null]})});i.displayName="CurrencyAmount";var R=memo(i);export{o as a,R as b};
|