@secondstaxorg/sscomp 1.8.71 → 1.8.73

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/index.js CHANGED
@@ -22159,10 +22159,15 @@ const InputLabel$5 = styled.div`
22159
22159
  flex-direction: column;
22160
22160
  gap: 4px;
22161
22161
  label{
22162
- color: ${theme.colors["neutral-900"]};
22162
+ color:${theme.colors["primary-900"]};
22163
+ font-weight: 500;
22164
+ font-family: "Circular Book Medium", sans-serif;
22163
22165
  }
22164
22166
  span{
22165
22167
  color: ${theme.colors["neutral-600"]};
22168
+ font-size: 14px;
22169
+ line-height: 17px;
22170
+ font-weight: 400;
22166
22171
  }
22167
22172
  `;
22168
22173
 
@@ -22177,7 +22182,7 @@ const InputField$2 = styled.input`
22177
22182
  right: 0;
22178
22183
  height: 100%;
22179
22184
  position: absolute;
22180
- //font-size: 16px;
22185
+ font-size: 16px;
22181
22186
  padding: 0 16px;
22182
22187
  width: 100%;
22183
22188
  &:focus,&:focus-within{
@@ -22240,25 +22245,21 @@ const _jsxFileName$v = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\compon
22240
22245
  * Component to display an input field component in a form. This mimics the behavior of a regular HTML <code>&lt;input&gt;</code> element and accepts the same props as it along with the custom ones defined.
22241
22246
  */
22242
22247
  const TextField = (props) => {
22243
- let {label,subtext,errMsg,disabled,required,width,value,readonly} = props;
22248
+ const {label,subtext,errMsg,disabled,required,width,value,onChange} = props;
22244
22249
 
22245
22250
  const [borderColor,setBorderColor] = React$1.useState('');
22246
- const [inputVal,setInputVal] = React$1.useState('');
22247
22251
  const [err,setErr] = React$1.useState(false);
22252
+ const [cursorPos,setCursorPos] = React$1.useState();
22248
22253
  const textFieldRef = React$1.useRef();
22249
22254
 
22250
- React$1.useEffect(()=>{
22251
- setInputVal(value );
22252
- },[value]);
22253
-
22254
- React$1.useEffect(()=>{
22255
- if (inputVal){
22256
- setBorderColor('success');
22257
- }
22258
- },[inputVal]);
22255
+ React$1.useEffect(() => {
22256
+ const inputRef = textFieldRef.current;
22257
+ if (inputRef) inputRef.setSelectionRange(cursorPos,cursorPos);
22258
+ if(value) validate();
22259
+ }, [cursorPos,textFieldRef,value]);
22259
22260
 
22260
22261
  function validate(){
22261
- if (inputVal){
22262
+ if (value){
22262
22263
  setBorderColor('success');
22263
22264
  setErr(false);
22264
22265
  }else {
@@ -22270,33 +22271,33 @@ const TextField = (props) => {
22270
22271
  }
22271
22272
  }
22272
22273
 
22273
- const style={
22274
+ const style = {
22274
22275
  display:'flex',
22275
22276
  flexDirection:'column',
22276
22277
  gap:'12px'
22277
- };
22278
+ };
22278
22279
 
22279
22280
  return (
22280
- React$1.createElement('div', { style: style, __self: undefined, __source: {fileName: _jsxFileName$v, lineNumber: 48}}
22281
+ React$1.createElement('div', { style: style, __self: undefined, __source: {fileName: _jsxFileName$v, lineNumber: 43}}
22281
22282
  , label &&
22282
- React$1.createElement(InputLabel$5, {__self: undefined, __source: {fileName: _jsxFileName$v, lineNumber: 50}}
22283
- , React$1.createElement('label', { className: "paragraph2Medium", __self: undefined, __source: {fileName: _jsxFileName$v, lineNumber: 51}}, label)
22284
- , subtext && React$1.createElement('span', { className: "paragraph1Regular", __self: undefined, __source: {fileName: _jsxFileName$v, lineNumber: 52}}, subtext)
22283
+ React$1.createElement(InputLabel$5, {__self: undefined, __source: {fileName: _jsxFileName$v, lineNumber: 45}}
22284
+ , React$1.createElement('label', {__self: undefined, __source: {fileName: _jsxFileName$v, lineNumber: 46}}, label)
22285
+ , subtext && React$1.createElement('span', {__self: undefined, __source: {fileName: _jsxFileName$v, lineNumber: 47}}, subtext)
22285
22286
  )
22286
22287
 
22287
- , React$1.createElement(InputContainer$3, { className: `${borderColor} ${disabled ? 'disabled' : ''}`, style: {width:width ? width : '100%',border:disabled ? `1px solid ${theme.colors["neutral-100"]}` : ''}, __self: undefined, __source: {fileName: _jsxFileName$v, lineNumber: 55}}
22288
- , React$1.createElement(InputField$2, { className: "paragraph2Book", ref: textFieldRef, onBlur: validate, onInvalid: validate, value: inputVal, onChange: (e)=>{
22289
- if (readonly) return
22290
- setInputVal(e.target.value);
22291
- }, ...props, __self: undefined, __source: {fileName: _jsxFileName$v, lineNumber: 56}})
22288
+ , React$1.createElement(InputContainer$3, { className: `${borderColor} ${disabled ? 'disabled' : ''}`, style: {width:width ? width : '100%',border:disabled ? `1px solid ${theme.colors["neutral-100"]}` : ''}, __self: undefined, __source: {fileName: _jsxFileName$v, lineNumber: 50}}
22289
+ , React$1.createElement(InputField$2, { ref: textFieldRef, onBlur: validate, onInvalid: validate, value: value, onChange: (e)=>{
22290
+ setCursorPos(e.target.selectionStart);
22291
+ if (onChange) onChange(e);
22292
+ }, __self: undefined, __source: {fileName: _jsxFileName$v, lineNumber: 51}})
22292
22293
  )
22293
- , !inputVal && required && err &&
22294
- React$1.createElement(ErrorMessage$3, {__self: undefined, __source: {fileName: _jsxFileName$v, lineNumber: 62}}
22294
+ , !value && required && err &&
22295
+ React$1.createElement(ErrorMessage$3, {__self: undefined, __source: {fileName: _jsxFileName$v, lineNumber: 57}}
22295
22296
  /*exclamation-triangle*/
22296
- , React$1.createElement('svg', { width: "16", height: "14", viewBox: "0 0 16 14" , fill: "none", xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$v, lineNumber: 64}}
22297
- , React$1.createElement('path', { d: "M8.00006 9.66669C7.86821 9.66669 7.73931 9.70578 7.62968 9.77904C7.52005 9.85229 7.4346 9.95641 7.38414 10.0782C7.33368 10.2 7.32048 10.3341 7.3462 10.4634C7.37193 10.5927 7.43542 10.7115 7.52866 10.8048C7.62189 10.898 7.74068 10.9615 7.87 10.9872C7.99932 11.0129 8.13336 10.9997 8.25518 10.9493C8.377 10.8988 8.48112 10.8134 8.55437 10.7037C8.62763 10.5941 8.66673 10.4652 8.66673 10.3334C8.66673 10.1565 8.59649 9.98697 8.47146 9.86195C8.34644 9.73692 8.17687 9.66669 8.00006 9.66669ZM15.1134 10.6467L9.74673 1.31335C9.57326 1.00236 9.31992 0.743323 9.01285 0.562997C8.70579 0.382672 8.35615 0.287598 8.00006 0.287598C7.64396 0.287598 7.29433 0.382672 6.98726 0.562997C6.6802 0.743323 6.42686 1.00236 6.25339 1.31335L0.92006 10.6467C0.74059 10.9494 0.644155 11.294 0.640489 11.6459C0.636824 11.9978 0.726058 12.3444 0.899184 12.6507C1.07231 12.9571 1.3232 13.2123 1.62652 13.3907C1.92984 13.5691 2.27485 13.6643 2.62673 13.6667H13.3734C13.7281 13.6702 14.0773 13.5793 14.3853 13.4033C14.6933 13.2273 14.949 12.9726 15.126 12.6652C15.3031 12.3579 15.3953 12.009 15.3931 11.6542C15.3908 11.2995 15.2943 10.9518 15.1134 10.6467ZM13.9601 11.98C13.9016 12.084 13.8164 12.1704 13.7132 12.2302C13.61 12.29 13.4927 12.321 13.3734 12.32H2.62673C2.50747 12.321 2.39013 12.29 2.28694 12.2302C2.18375 12.1704 2.0985 12.084 2.04006 11.98C1.98155 11.8787 1.95074 11.7637 1.95074 11.6467C1.95074 11.5297 1.98155 11.4147 2.04006 11.3134L7.37339 1.98002C7.42934 1.87082 7.51433 1.77917 7.61902 1.71518C7.72371 1.65119 7.84403 1.61733 7.96673 1.61733C8.08942 1.61733 8.20974 1.65119 8.31443 1.71518C8.41912 1.77917 8.50411 1.87082 8.56006 1.98002L13.9267 11.3134C13.9929 11.4132 14.0309 11.5291 14.0367 11.6488C14.0426 11.7684 14.0161 11.8875 13.9601 11.9934V11.98ZM8.00006 4.33335C7.82325 4.33335 7.65368 4.40359 7.52866 4.52861C7.40363 4.65364 7.33339 4.82321 7.33339 5.00002V7.66669C7.33339 7.8435 7.40363 8.01307 7.52866 8.13809C7.65368 8.26311 7.82325 8.33335 8.00006 8.33335C8.17687 8.33335 8.34644 8.26311 8.47146 8.13809C8.59649 8.01307 8.66673 7.8435 8.66673 7.66669V5.00002C8.66673 4.82321 8.59649 4.65364 8.47146 4.52861C8.34644 4.40359 8.17687 4.33335 8.00006 4.33335Z" , fill: "#F80000", __self: undefined, __source: {fileName: _jsxFileName$v, lineNumber: 65}})
22297
+ , React$1.createElement('svg', { width: "16", height: "14", viewBox: "0 0 16 14" , fill: "none", xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$v, lineNumber: 59}}
22298
+ , React$1.createElement('path', { d: "M8.00006 9.66669C7.86821 9.66669 7.73931 9.70578 7.62968 9.77904C7.52005 9.85229 7.4346 9.95641 7.38414 10.0782C7.33368 10.2 7.32048 10.3341 7.3462 10.4634C7.37193 10.5927 7.43542 10.7115 7.52866 10.8048C7.62189 10.898 7.74068 10.9615 7.87 10.9872C7.99932 11.0129 8.13336 10.9997 8.25518 10.9493C8.377 10.8988 8.48112 10.8134 8.55437 10.7037C8.62763 10.5941 8.66673 10.4652 8.66673 10.3334C8.66673 10.1565 8.59649 9.98697 8.47146 9.86195C8.34644 9.73692 8.17687 9.66669 8.00006 9.66669ZM15.1134 10.6467L9.74673 1.31335C9.57326 1.00236 9.31992 0.743323 9.01285 0.562997C8.70579 0.382672 8.35615 0.287598 8.00006 0.287598C7.64396 0.287598 7.29433 0.382672 6.98726 0.562997C6.6802 0.743323 6.42686 1.00236 6.25339 1.31335L0.92006 10.6467C0.74059 10.9494 0.644155 11.294 0.640489 11.6459C0.636824 11.9978 0.726058 12.3444 0.899184 12.6507C1.07231 12.9571 1.3232 13.2123 1.62652 13.3907C1.92984 13.5691 2.27485 13.6643 2.62673 13.6667H13.3734C13.7281 13.6702 14.0773 13.5793 14.3853 13.4033C14.6933 13.2273 14.949 12.9726 15.126 12.6652C15.3031 12.3579 15.3953 12.009 15.3931 11.6542C15.3908 11.2995 15.2943 10.9518 15.1134 10.6467ZM13.9601 11.98C13.9016 12.084 13.8164 12.1704 13.7132 12.2302C13.61 12.29 13.4927 12.321 13.3734 12.32H2.62673C2.50747 12.321 2.39013 12.29 2.28694 12.2302C2.18375 12.1704 2.0985 12.084 2.04006 11.98C1.98155 11.8787 1.95074 11.7637 1.95074 11.6467C1.95074 11.5297 1.98155 11.4147 2.04006 11.3134L7.37339 1.98002C7.42934 1.87082 7.51433 1.77917 7.61902 1.71518C7.72371 1.65119 7.84403 1.61733 7.96673 1.61733C8.08942 1.61733 8.20974 1.65119 8.31443 1.71518C8.41912 1.77917 8.50411 1.87082 8.56006 1.98002L13.9267 11.3134C13.9929 11.4132 14.0309 11.5291 14.0367 11.6488C14.0426 11.7684 14.0161 11.8875 13.9601 11.9934V11.98ZM8.00006 4.33335C7.82325 4.33335 7.65368 4.40359 7.52866 4.52861C7.40363 4.65364 7.33339 4.82321 7.33339 5.00002V7.66669C7.33339 7.8435 7.40363 8.01307 7.52866 8.13809C7.65368 8.26311 7.82325 8.33335 8.00006 8.33335C8.17687 8.33335 8.34644 8.26311 8.47146 8.13809C8.59649 8.01307 8.66673 7.8435 8.66673 7.66669V5.00002C8.66673 4.82321 8.59649 4.65364 8.47146 4.52861C8.34644 4.40359 8.17687 4.33335 8.00006 4.33335Z" , fill: "#F80000", __self: undefined, __source: {fileName: _jsxFileName$v, lineNumber: 60}})
22298
22299
  )
22299
- , errMsg ? React$1.createElement('span', { className: "paragraph1Regular", __self: undefined, __source: {fileName: _jsxFileName$v, lineNumber: 67}}, errMsg) : React$1.createElement('span', { className: "paragraph1Regular", __self: undefined, __source: {fileName: _jsxFileName$v, lineNumber: 67}}, "This field is required" )
22300
+ , errMsg ? errMsg : 'This field is required'
22300
22301
  )
22301
22302
 
22302
22303
  )
@@ -24017,62 +24018,62 @@ const TextArea = (props) => {
24017
24018
  )
24018
24019
  };
24019
24020
 
24020
- const Container$5 = styled.div`
24021
- display: flex;
24022
- flex-direction: column;
24023
- gap: 40px;
24024
- position: relative;
24025
- `;
24026
-
24027
- const FieldSection$1 = styled.div`
24028
- display: flex;
24029
- flex-direction: column;
24030
- gap: 8px;
24031
- color: ${theme.colors["neutral-900"]};
24032
- .field-dets{
24033
- padding: 16px;
24034
- border-radius: 8px;
24035
- background: ${theme.colors["neutral-50"]};
24036
- display: flex;
24037
- align-items: center;
24038
- gap: 16px;
24039
- }
24040
- .field-dets .bank-acct-info{
24041
- display: flex;
24042
- gap: 8px;
24043
- flex-direction: column;
24044
- color: ${theme.colors["neutral-600"]};
24045
- font-size: 12px;
24046
- line-height: 14px;
24047
- }
24048
- .field-dets .bank-acct-info .acct-no{
24049
- font-family: "Circular Book Medium",sans-serif;
24050
- font-size: 16px;
24051
- font-weight: 500;
24052
- line-height: 19px;
24053
- color: ${theme.colors["neutral-900"]};
24054
- }
24055
- .field-dets .bank-acct-info .bank-name{
24056
- font-weight: 500;
24057
- }
24058
- .amt-dets{
24059
- display: flex;
24060
- justify-content: space-between;
24061
- align-items: center;
24062
- }
24063
- .exch-rate{
24064
- font-family: "Circular Book",sans-serif;
24065
- font-weight: 400;
24066
- font-size: 16px;
24067
- line-height: 16px;
24068
- color: #0F1B4C;
24069
- }
24070
- .amt-dets div{
24071
- display: flex;
24072
- justify-content: space-between;
24073
- align-items: center;
24074
- gap: 8px;
24075
- }
24021
+ const Container$5 = styled.div`
24022
+ display: flex;
24023
+ flex-direction: column;
24024
+ gap: 40px;
24025
+ position: relative;
24026
+ `;
24027
+
24028
+ const FieldSection$1 = styled.div`
24029
+ display: flex;
24030
+ flex-direction: column;
24031
+ gap: 8px;
24032
+ color: ${theme.colors["neutral-900"]};
24033
+ .field-dets{
24034
+ padding: 16px;
24035
+ border-radius: 8px;
24036
+ background: ${theme.colors["neutral-50"]};
24037
+ display: flex;
24038
+ align-items: center;
24039
+ gap: 16px;
24040
+ }
24041
+ .field-dets .bank-acct-info{
24042
+ display: flex;
24043
+ gap: 8px;
24044
+ flex-direction: column;
24045
+ color: ${theme.colors["neutral-600"]};
24046
+ font-size: 12px;
24047
+ line-height: 14px;
24048
+ }
24049
+ .field-dets .bank-acct-info .acct-no{
24050
+ font-family: "Circular Book Medium",sans-serif;
24051
+ font-size: 16px;
24052
+ font-weight: 500;
24053
+ line-height: 19px;
24054
+ color: ${theme.colors["neutral-900"]};
24055
+ }
24056
+ .field-dets .bank-acct-info .bank-name{
24057
+ font-weight: 500;
24058
+ }
24059
+ .amt-dets{
24060
+ display: flex;
24061
+ justify-content: space-between;
24062
+ align-items: center;
24063
+ }
24064
+ .exch-rate{
24065
+ font-family: "Circular Book",sans-serif;
24066
+ font-weight: 400;
24067
+ font-size: 16px;
24068
+ line-height: 16px;
24069
+ color: #0F1B4C;
24070
+ }
24071
+ .amt-dets div{
24072
+ display: flex;
24073
+ justify-content: space-between;
24074
+ align-items: center;
24075
+ gap: 8px;
24076
+ }
24076
24077
  `;
24077
24078
 
24078
24079
  function moneyfy$1(number, currency){
@@ -25534,7 +25535,7 @@ const TablePrimary = (props) => {
25534
25535
  const sortedItems = [...tbody];
25535
25536
  sortedItems.sort((a,b) => a[column].localeCompare(b[column]));
25536
25537
  let revSort = sortedItems.reverse();
25537
- setTbodyItems(revSort);
25538
+ setTbodyOri(revSort);
25538
25539
  setSortedCol('');
25539
25540
  }
25540
25541
  return
@@ -25543,7 +25544,7 @@ const TablePrimary = (props) => {
25543
25544
  if (tbody && tbody.length > 0){
25544
25545
  const sortedItems = [...tbody];
25545
25546
  sortedItems.sort((a,b) => a[column].localeCompare(b[column]));
25546
- setTbodyItems(sortedItems);
25547
+ setTbodyOri(sortedItems);
25547
25548
  }
25548
25549
  return
25549
25550
  }