@lanaco/lnc-react-ui 4.0.94 → 4.0.96

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.
Files changed (42) hide show
  1. package/dist/DecimalInput.cjs +1 -1
  2. package/dist/DecimalInput.js +1 -1
  3. package/dist/DecimalInputV2.cjs +1 -1
  4. package/dist/DecimalInputV2.js +20 -20
  5. package/dist/DetailedProductsSection.cjs +4 -4
  6. package/dist/DetailedProductsSection.js +16 -14
  7. package/dist/DragAndDropFile.cjs +1 -1
  8. package/dist/DragAndDropFile.js +1 -1
  9. package/dist/Dropdown.cjs +1 -1
  10. package/dist/Dropdown.js +18 -18
  11. package/dist/DropdownLookup.cjs +1 -1
  12. package/dist/DropdownLookup.js +14 -14
  13. package/dist/Icon.cjs +1 -1
  14. package/dist/Icon.js +8 -8
  15. package/dist/MultiSelectDropdown.cjs +1 -1
  16. package/dist/MultiSelectDropdown.js +6 -6
  17. package/dist/MultiSelectDropdownLookup.cjs +1 -1
  18. package/dist/MultiSelectDropdownLookup.js +6 -6
  19. package/dist/NumberInput.cjs +4 -4
  20. package/dist/NumberInput.js +80 -80
  21. package/dist/PasswordInput.cjs +1 -1
  22. package/dist/PasswordInput.js +1 -1
  23. package/dist/ProgressBar.cjs +1 -1
  24. package/dist/ProgressBar.js +1 -1
  25. package/dist/RadioGroup.cjs +3 -3
  26. package/dist/RadioGroup.js +22 -22
  27. package/dist/RadioInput.cjs +1 -1
  28. package/dist/RadioInput.js +13 -13
  29. package/dist/Table.cjs +1 -1
  30. package/dist/Table.js +1 -1
  31. package/dist/TextAreaInput.cjs +1 -1
  32. package/dist/TextAreaInput.js +1 -1
  33. package/dist/TextInput.cjs +4 -4
  34. package/dist/TextInput.js +71 -71
  35. package/dist/TimeInput.cjs +1 -1
  36. package/dist/TimeInput.js +1 -1
  37. package/dist/UrgentSaleProductsSection.cjs +1 -1
  38. package/dist/UrgentSaleProductsSection.js +1 -1
  39. package/dist/{suspense-product-card-detailed-Z0emIstD.js → suspense-product-card-detailed-Bez9UFMR.js} +61 -49
  40. package/dist/suspense-product-card-detailed-Yjo62f1v.cjs +124 -0
  41. package/package.json +1 -1
  42. package/dist/suspense-product-card-detailed-EXZJLtNh.cjs +0 -114
package/dist/Table.cjs CHANGED
@@ -169,4 +169,4 @@ white-space: nowrap;
169
169
  justify-content: center;
170
170
  ${r=>a.getComponentTypographyCss(r.theme,"Table",r.size,"enabled")};
171
171
  padding: 0.5rem;
172
- `,$n={TableContainer:"TABLE_CONTAINER",TableRow:"TABLE_ROW",TableCell:"TABLE_CELL",TableSelectionCell:"TABLE_SELLECTION_CELL",TableHeadRow:"TABLE_HEAD_ROW",TableHeadCell:"TABLE_HEAD_CELL",TableHeadSelectionCell:"TABLE_HEAD_SELECTION_CELL",TableHeader:"TABLE_HEADER",TableFooter:"TABLE_FOOTER",TableSpecialLastRow:"TABLE_SPECIAL_LAST_ROW",TableRowStatusIndicatorCell:"TABLE_ROW_STATUS_INDICATOR_CELL",TableHeadRowStatusIndicatorCell:"TABLE_HEAD_ROW_STATUS_INDICATOR_CELL",TableLoader:"TABLE_LOADER",TableBody:"TABLE_BODY",TableHead:"TABLE_HEAD"},ur=R.forwardRef((r,p)=>{var{__TYPE__:i="TABLE",EnableSelection:c=!1,EnableOrdering:m=!1,EnableSelectAll:f=!1,EnableLoader:_=!1,PreRenderedTableBody:C=!1,PreRenderedTableHead:P=!1,noBorder:S=!1,EnableRowStatusIndicator:w=!1,EnableRowHighlight:A=!1,GetRowStatusIndicatorColor:y=()=>{},GetRowHighlightColor:x=()=>{},GetRowHighlightCss:L=()=>{},NoDataText:F="No data to show",NoDataComponent:E=null,Loading:g=!1,Columns:v=[],Data:D=[],SelectedData:q=[],SelectedEntirePage:fe=!1,RowIdentifier:W="id",VisibilityPattern:z=null,Ordering:me={},onColumnClick:ge=()=>{},onRowClick:be=()=>{},onSelectRow:ie=()=>{},onSelectAll:he=()=>{},tableWidth:ye="100%",className:Te="",style:ve={},color:Ie="primary",size:re="small"}=r;const _e=V.useTheme(),O={theme:_e,color:Ie,size:re};R.useImperativeHandle(p,()=>({getTableData:()=>D}),[D]);const[T,{width:Y}]=Gt();var He=a.useScreenSize();R.useEffect(()=>{c===!0&&(W===null||W==="")&&console.error("Error: Selection is enabled but the 'RowIdentifier' is empty")},[]),R.useEffect(()=>{(v==null||v.length===0)&&console.error("Error: Columns array must have at least one item.")},[v]),R.useEffect(()=>{z&&(z.hasOwnProperty(a.screenSizes.XS.type)||console.error(B(a.screenSizes.XS.type)),z.hasOwnProperty(a.screenSizes.S.type)||console.error(B(a.screenSizes.S.type)),z.hasOwnProperty(a.screenSizes.M.type)||console.error(B(a.screenSizes.M.type)),z.hasOwnProperty(a.screenSizes.L.type)||console.error(B(a.screenSizes.L.type)),z.hasOwnProperty(a.screenSizes.XL.type)||console.error(B(a.screenSizes.XL.type)))},[z]);const B=l=>`Error: 'VisibilityPattern' missing property ${l}.`,K=()=>{let l=[];if(Qt(z)){var u=0;if(l=z[He].map(b=>({...v.find(k=>String(k.id)===String(b.id)),...b})),c===!0){var u=X()/Y*100/l.length;w===!0&&(u+=3/Y*100),l=l.map(h=>({...h,width:h.width-u}))}}else if(l=v.map(b=>({...b})),c===!0){var u=X()/Y*100/l.length;w===!0&&(u+=3/Y*100),l=l.map(h=>({...h,width:h.width-u}))}return l},Ce=(l,u)=>{if(l&&l.length>0){var b=0,h=l.map(G=>G.width).reduce((G,ne)=>G+ne);c===!0&&(b=X()/Y*100);var k=h+b;Xt(k)&&(k>101||k<98)&&console.error(`Error: Row ${u} - sum of column widths is ${k}.`)}},Be=l=>{let u={},b=q.find(h=>String(h[W])===String(l[W]));return b!=null?u.IsSelected=!0:u.IsSelected=!1,u},X=()=>re==="small"?37:re==="medium"?43:re==="large"?49:37,$e=(l={},u)=>{let b={};var h=K(),k=(L==null?void 0:L(l))||"";Ce(h,u),c===!0&&(b=Be(l));var G={onRowClick:be,onSelectRow:ie,RowData:l,SelectedData:q,EnableSelection:c,Columns:v,ColumnsToRender:h,Index:u,key:u,rowCss:k,...O,...b},ne=d.jsxs(d.Fragment,{children:[w===!0&&ze(l),c===!0&&De(b.IsSelected,l),h.map((We,Ye)=>Ne(l,We,Ye,u,h))]});return a.renderCustomElement(a.getCustomRender("TABLE_ROW",r.children),G,ne)||R.createElement(nr,{...G,key:u,noBorder:S},ne)},Ne=(l,u,b,h,k)=>{var G={RowData:l,Column:u,ColumnsToRender:k,Index:b,RowIndex:h,key:b,EnableSelection:c,RowIdentifier:W,EnableRowHighlight:A,GetRowHighlightColor:x,...O};return a.renderCustomElement(a.getCustomRender("TABLE_CELL",r.children),G)||R.createElement(or,{...G,key:b})},De=(l,u,b=-1)=>{var h={SelectedData:q,RowData:u,onSelectRow:ie,Index:b,key:b,IsSelected:l,EnableRowHighlight:A,GetRowHighlightColor:x,...O};return a.renderCustomElement(a.getCustomRender("TABLE_SELLECTION_CELL",r.children),h)||R.createElement(ar,{...h,key:b,width:X()/Y*100})},Ee=()=>{var l={Columns:v,...O},u=d.jsxs(d.Fragment,{children:[w===!0&&Ge(),c===!0&&Fe(),K().map((b,h)=>ke(b,h))]});return a.renderCustomElement(a.getCustomRender("TABLE_HEAD_ROW",r.children),l,u)||R.createElement(lr,{...l,key:0},u)},ke=(l,u,b)=>{var h={Index:u,Column:l,Ordering:me,EnableOrdering:m,EnableSelectAll:f,onColumnClick:ge,ColumnsToRender:b,...O};return a.renderCustomElement(a.getCustomRender("TABLE_HEAD_CELL",r.children),h)||R.createElement(sr,{...h,key:u})},Fe=()=>{var l={Index:-1,IsSelected:fe,onSelectAll:he,EnableSelectAll:f,...O};return a.renderCustomElement(a.getCustomRender("TABLE_HEAD_SELECTION_CELL",r.children),l)||R.createElement(ir,{...l,key:-1,width:X()/Y*100})},we=()=>a.renderCustomElement(a.getCustomRender("TABLE_HEADER",r.children),{Data:D,Columns:v,...O})||d.jsx(d.Fragment,{}),Pe=()=>a.renderCustomElement(a.getCustomRender("TABLE_FOOTER",r.children),{Data:D,Columns:v,...O})||d.jsx(d.Fragment,{}),ce=()=>a.renderCustomElement(a.getCustomRender("TABLE_SPECIAL_LAST_ROW",r.children),{Data:D,Columns:v,ColumnsToRender:K(),Disabled:g,...O})||d.jsx(d.Fragment,{}),Re=()=>{if(D==null||D&&D.length===0){var l=K().length;return c===!0&&l++,w===!0&&l++,d.jsx("tr",{children:d.jsx("td",{colSpan:l,children:E?d.jsx(E,{}):d.jsx(Bn,{...O,children:F})})})}return d.jsx(d.Fragment,{})},ze=l=>{var u={...O,key:-1,RowData:l,GetRowStatusIndicatorColor:y};return w===!0?d.jsx(d.Fragment,{children:a.renderCustomElement(a.getCustomRender("TABLE_ROW_STATUS_INDICATOR_CELL",r.children),u)||d.jsx(cr,{...u,noBorder:S})}):d.jsx(d.Fragment,{})},Ge=()=>{var l={...O,key:-1};return w===!0?d.jsx(d.Fragment,{children:a.renderCustomElement(a.getCustomRender("TABLE_HEAD_ROW_STATUS_INDICATOR_CELL",r.children),l)||d.jsx(dr,{...l})}):d.jsx(d.Fragment,{})},te=()=>_===!0&&g===!0?d.jsx(d.Fragment,{children:d.jsx(In,{theme:_e,children:a.renderCustomElement(a.getCustomRender("TABLE_LOADER",r.children),{...O,Loading:g})||d.jsx(kt,{...O})})}):d.jsx(d.Fragment,{}),de=()=>{var l=Sr(r);delete l.__TYPE__;var u=d.jsxs(d.Fragment,{children:[D.map((b,h)=>$e(b,h)),Re()]});return a.renderCustomElement(a.getCustomRender("TABLE_BODY",r.children),l,C?u:void 0)||d.jsx(rr,{...O,children:u})},Se=()=>{var l=Sr(r);delete l.__TYPE__;var u=d.jsx(d.Fragment,{children:Ee()});return a.renderCustomElement(a.getCustomRender("TABLE_HEAD",r.children),l,P?u:null)||d.jsx(tr,{...O,children:u})};return(()=>{var l={className:Te,Loading:g,...O},u=d.jsxs(d.Fragment,{children:[te(),we(),d.jsxs(Hn,{...O,width:ye||"100%","data-table":!0,ref:T,noBorder:S,children:[Se(),de()]}),ce(),Pe()]});return a.renderCustomElement(a.getCustomRender("TABLE_CONTAINER",r.children),l,u)||d.jsx(vn,{...l,isLoading:_?g:!1,children:u})})()});ur.propTypes={__TYPE__:o.PropTypes.string,ID:o.PropTypes.string,noBorder:o.PropTypes.bool,EnableSelection:o.PropTypes.bool,EnableOrdering:o.PropTypes.bool,EnableLoader:o.PropTypes.bool,EnableSelectAll:o.PropTypes.bool,EnableRowStatusIndicator:o.PropTypes.bool,EnableRowHighlight:o.PropTypes.bool,GetRowStatusIndicatorColor:o.PropTypes.func,GetRowHighlightColor:o.PropTypes.func,NoDataText:o.PropTypes.string,NoDataComponet:o.PropTypes.node,Loading:o.PropTypes.bool,Columns:o.PropTypes.arrayOf(o.PropTypes.object),Data:o.PropTypes.arrayOf(o.PropTypes.object),SelectedData:o.PropTypes.arrayOf(o.PropTypes.object),SelectedEntirePage:o.PropTypes.bool,RowIdentifier:o.PropTypes.string,VisibilityPattern:o.PropTypes.object,Ordering:o.PropTypes.shape({columnId:o.PropTypes.number,ascending:o.PropTypes.bool,descending:o.PropTypes.bool}),onColumnClick:o.PropTypes.func,onRowClick:o.PropTypes.func,onSelectRow:o.PropTypes.func,onSelectAll:o.PropTypes.func,tableWidth:o.PropTypes.string,className:o.PropTypes.string,size:o.PropTypes.oneOf(["small","medium","large"]),color:o.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"])};ur.displayName="TABLE";exports.TableComponentOverrides=$n;exports.default=ur;
172
+ `,$n={TableContainer:"TABLE_CONTAINER",TableRow:"TABLE_ROW",TableCell:"TABLE_CELL",TableSelectionCell:"TABLE_SELLECTION_CELL",TableHeadRow:"TABLE_HEAD_ROW",TableHeadCell:"TABLE_HEAD_CELL",TableHeadSelectionCell:"TABLE_HEAD_SELECTION_CELL",TableHeader:"TABLE_HEADER",TableFooter:"TABLE_FOOTER",TableSpecialLastRow:"TABLE_SPECIAL_LAST_ROW",TableRowStatusIndicatorCell:"TABLE_ROW_STATUS_INDICATOR_CELL",TableHeadRowStatusIndicatorCell:"TABLE_HEAD_ROW_STATUS_INDICATOR_CELL",TableLoader:"TABLE_LOADER",TableBody:"TABLE_BODY",TableHead:"TABLE_HEAD"},ur=R.forwardRef((r,p)=>{var{__TYPE__:i="TABLE",EnableSelection:c=!1,EnableOrdering:m=!1,EnableSelectAll:f=!1,EnableLoader:_=!1,PreRenderedTableBody:C=!1,PreRenderedTableHead:P=!1,noBorder:S=!1,EnableRowStatusIndicator:w=!1,EnableRowHighlight:A=!1,GetRowStatusIndicatorColor:y=()=>{},GetRowHighlightColor:x=()=>{},GetRowHighlightCss:L=()=>{},NoDataText:F="No data to show",NoDataComponent:E=null,Loading:g=!1,Columns:v=[],Data:D=[],SelectedData:q=[],SelectedEntirePage:fe=!1,RowIdentifier:W="id",VisibilityPattern:z=null,Ordering:me={},onColumnClick:ge=()=>{},onRowClick:be=()=>{},onSelectRow:ie=()=>{},onSelectAll:he=()=>{},tableWidth:ye="100%",className:Te="",style:ve={},color:Ie="primary",size:re="small"}=r;const _e=V.useTheme(),O={theme:_e,color:Ie,size:re};R.useImperativeHandle(p,()=>({getTableData:()=>D}),[D]);const[T,{width:Y}]=Gt();var He=a.useScreenSize();R.useEffect(()=>{c===!0&&(W===null||W==="")&&console.error("Error: Selection is enabled but the 'RowIdentifier' is empty")},[]),R.useEffect(()=>{(v==null||v.length===0)&&console.error("Error: Columns array must have at least one item.")},[v]),R.useEffect(()=>{z&&(z.hasOwnProperty(a.screenSizes.XS.type)||console.error(B(a.screenSizes.XS.type)),z.hasOwnProperty(a.screenSizes.S.type)||console.error(B(a.screenSizes.S.type)),z.hasOwnProperty(a.screenSizes.M.type)||console.error(B(a.screenSizes.M.type)),z.hasOwnProperty(a.screenSizes.L.type)||console.error(B(a.screenSizes.L.type)),z.hasOwnProperty(a.screenSizes.XL.type)||console.error(B(a.screenSizes.XL.type)))},[z]);const B=l=>`Error: 'VisibilityPattern' missing property ${l}.`,K=()=>{let l=[];if(Qt(z)){var u=0;if(l=z[He].map(b=>({...v.find(k=>String(k.id)===String(b.id)),...b})),c===!0){var u=X()/Y*100/l.length;w===!0&&(u+=3/Y*100),l=l.map(h=>({...h,width:h.width-u}))}}else if(l=v.map(b=>({...b})),c===!0){var u=X()/Y*100/l.length;w===!0&&(u+=3/Y*100),l=l.map(h=>({...h,width:h.width-u}))}return l},Ce=(l,u)=>{if(l&&l.length>0){var b=0,h=l.map(G=>G.width).reduce((G,ne)=>G+ne);c===!0&&(b=X()/Y*100);var k=h+b;Xt(k)&&(k>101||k<98)&&console.error(`Error: Row ${u} - sum of column widths is ${k}.`)}},Be=l=>{let u={},b=q.find(h=>String(h[W])===String(l[W]));return b!=null?u.IsSelected=!0:u.IsSelected=!1,u},X=()=>re==="small"?37:re==="medium"?43:re==="large"?49:37,$e=(l={},u)=>{let b={};var h=K(),k=(L==null?void 0:L(l))||"";Ce(h,u),c===!0&&(b=Be(l));var G={onRowClick:be,onSelectRow:ie,RowData:l,SelectedData:q,EnableSelection:c,Columns:v,ColumnsToRender:h,Index:u,key:u,rowCss:k,...O,...b},ne=d.jsxs(d.Fragment,{children:[w===!0&&ze(l),c===!0&&De(b.IsSelected,l),h.map((We,Ye)=>Ne(l,We,Ye,u,h))]});return a.renderCustomElement(a.getCustomRender("TABLE_ROW",r.children),G,ne)||R.createElement(nr,{...G,key:u,noBorder:S},ne)},Ne=(l,u,b,h,k)=>{var G={RowData:l,Column:u,ColumnsToRender:k,Index:b,RowIndex:h,key:b,EnableSelection:c,RowIdentifier:W,EnableRowHighlight:A,GetRowHighlightColor:x,...O};return a.renderCustomElement(a.getCustomRender("TABLE_CELL",r.children),G)||R.createElement(or,{...G,key:b})},De=(l,u,b=-1)=>{var h={SelectedData:q,RowData:u,onSelectRow:ie,Index:b,key:b,IsSelected:l,EnableRowHighlight:A,GetRowHighlightColor:x,...O};return a.renderCustomElement(a.getCustomRender("TABLE_SELLECTION_CELL",r.children),h)||R.createElement(ar,{...h,key:b,width:X()/Y*100})},Ee=()=>{var l={Columns:v,...O},u=d.jsxs(d.Fragment,{children:[w===!0&&Ge(),c===!0&&Fe(),K().map((b,h)=>ke(b,h))]});return a.renderCustomElement(a.getCustomRender("TABLE_HEAD_ROW",r.children),l,u)||R.createElement(lr,{...l,key:0},u)},ke=(l,u,b)=>{var h={Index:u,Column:l,Ordering:me,EnableOrdering:m,EnableSelectAll:f,onColumnClick:ge,ColumnsToRender:b,...O};return a.renderCustomElement(a.getCustomRender("TABLE_HEAD_CELL",r.children),h)||R.createElement(sr,{...h,key:u})},Fe=()=>{var l={Index:-1,IsSelected:fe,onSelectAll:he,EnableSelectAll:f,...O};return a.renderCustomElement(a.getCustomRender("TABLE_HEAD_SELECTION_CELL",r.children),l)||R.createElement(ir,{...l,key:-1,width:X()/Y*100})},we=()=>a.renderCustomElement(a.getCustomRender("TABLE_HEADER",r.children),{Data:D,Columns:v,...O})||d.jsx(d.Fragment,{}),Pe=()=>a.renderCustomElement(a.getCustomRender("TABLE_FOOTER",r.children),{Data:D,Columns:v,...O})||d.jsx(d.Fragment,{}),ce=()=>a.renderCustomElement(a.getCustomRender("TABLE_SPECIAL_LAST_ROW",r.children),{Data:D,Columns:v,ColumnsToRender:K(),Disabled:g,...O})||d.jsx(d.Fragment,{}),Re=()=>{if(D==null||D&&D.length===0){var l=K().length;return c===!0&&l++,w===!0&&l++,d.jsx("tr",{children:d.jsx("td",{colSpan:l,children:E?d.jsx(E,{}):d.jsx(Bn,{...O,children:F})})})}return d.jsx(d.Fragment,{})},ze=l=>{var u={...O,key:-1,RowData:l,GetRowStatusIndicatorColor:y};return w===!0?d.jsx(d.Fragment,{children:a.renderCustomElement(a.getCustomRender("TABLE_ROW_STATUS_INDICATOR_CELL",r.children),u)||d.jsx(cr,{...u,noBorder:S})}):d.jsx(d.Fragment,{})},Ge=()=>{var l={...O,key:-1};return w===!0?d.jsx(d.Fragment,{children:a.renderCustomElement(a.getCustomRender("TABLE_HEAD_ROW_STATUS_INDICATOR_CELL",r.children),l)||d.jsx(dr,{...l})}):d.jsx(d.Fragment,{})},te=()=>_===!0&&g===!0?d.jsx(d.Fragment,{children:d.jsx(In,{theme:_e,children:a.renderCustomElement(a.getCustomRender("TABLE_LOADER",r.children),{...O,Loading:g})||d.jsx(kt,{...O})})}):d.jsx(d.Fragment,{}),de=()=>{var l=Sr(r);delete l.__TYPE__;var u=d.jsxs(d.Fragment,{children:[D.map((b,h)=>$e(b,h)),Re()]});return a.renderCustomElement(a.getCustomRender("TABLE_BODY",r.children),l,C?u:void 0)||d.jsx(rr,{...O,children:u})},Se=()=>{var l=Sr(r);delete l.__TYPE__;var u=d.jsx(d.Fragment,{children:Ee()});return a.renderCustomElement(a.getCustomRender("TABLE_HEAD",r.children),l,P?u:null)||d.jsx(tr,{...O,children:u})};return(()=>{var l={className:Te,Loading:g,...O},u=d.jsxs(d.Fragment,{children:[te(),we(),d.jsxs(Hn,{...O,width:ye||"100%","data-table":!0,ref:T,noBorder:S,children:[Se(),de()]}),ce(),Pe()]});return a.renderCustomElement(a.getCustomRender("TABLE_CONTAINER",r.children),l,u)||d.jsx(vn,{...l,isLoading:_?g:!1,children:u})})()});ur.propTypes={__TYPE__:o.PropTypes.string,id:o.PropTypes.any,noBorder:o.PropTypes.bool,EnableSelection:o.PropTypes.bool,EnableOrdering:o.PropTypes.bool,EnableLoader:o.PropTypes.bool,EnableSelectAll:o.PropTypes.bool,EnableRowStatusIndicator:o.PropTypes.bool,EnableRowHighlight:o.PropTypes.bool,GetRowStatusIndicatorColor:o.PropTypes.func,GetRowHighlightColor:o.PropTypes.func,NoDataText:o.PropTypes.string,NoDataComponet:o.PropTypes.node,Loading:o.PropTypes.bool,Columns:o.PropTypes.arrayOf(o.PropTypes.object),Data:o.PropTypes.arrayOf(o.PropTypes.object),SelectedData:o.PropTypes.arrayOf(o.PropTypes.object),SelectedEntirePage:o.PropTypes.bool,RowIdentifier:o.PropTypes.string,VisibilityPattern:o.PropTypes.object,Ordering:o.PropTypes.shape({columnId:o.PropTypes.number,ascending:o.PropTypes.bool,descending:o.PropTypes.bool}),onColumnClick:o.PropTypes.func,onRowClick:o.PropTypes.func,onSelectRow:o.PropTypes.func,onSelectAll:o.PropTypes.func,tableWidth:o.PropTypes.string,className:o.PropTypes.string,size:o.PropTypes.oneOf(["small","medium","large"]),color:o.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"])};ur.displayName="TABLE";exports.TableComponentOverrides=$n;exports.default=ur;
package/dist/Table.js CHANGED
@@ -1709,7 +1709,7 @@ Yt.propTypes = {
1709
1709
  /**
1710
1710
  *
1711
1711
  */
1712
- ID: o.string,
1712
+ id: o.any,
1713
1713
  //----------------------------------------
1714
1714
  noBorder: o.bool,
1715
1715
  /**
@@ -30,4 +30,4 @@
30
30
  & textarea:disabled {
31
31
  ${e=>m.getDisabledStateCss(e.theme)}
32
32
  }
33
- `;var te=function(t){var r=d.useRef(t);return K.index(function(){r.current=t}),r},$=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},re=function(t,r){var n=d.useRef();return d.useCallback(function(o){t.current=o,n.current&&$(n.current,null),n.current=r,r&&$(r,o)},[r])},W={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},ne=function(t){Object.keys(W).forEach(function(r){t.style.setProperty(r,W[r],"important")})},_=ne,s=null,j=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function oe(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),s||(s=document.createElement("textarea"),s.setAttribute("tabindex","-1"),s.setAttribute("aria-hidden","true"),_(s)),s.parentNode===null&&document.body.appendChild(s);var o=e.paddingSize,b=e.borderSize,l=e.sizingStyle,T=l.boxSizing;Object.keys(l).forEach(function(g){var v=g;s.style[v]=l[v]}),_(s),s.value=t;var i=j(s,e);s.value=t,i=j(s,e),s.value="x";var u=s.scrollHeight-o,c=u*r;T==="border-box"&&(c=c+o+b),i=Math.max(c,i);var f=u*n;return T==="border-box"&&(f=f+o+b),i=Math.min(f,i),[i,u]}var V=function(){},ae=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},ie=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],se=!!document.documentElement.currentStyle,ue=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=ae(ie,r),o=n.boxSizing;if(o==="")return null;se&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var b=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),l=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:b,borderSize:l}},de=ue;function I(e,t,r){var n=te(r);S.useLayoutEffect(function(){var o=function(l){return n.current(l)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var le=function(t,r){I(document.body,"reset",function(n){t.current.form===n.target&&r(n)})},ce=function(t){I(window,"resize",t)},fe=function(t){I(document.fonts,"loadingdone",t)},ge=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],he=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,b=t.minRows,l=t.onChange,T=l===void 0?V:l,i=t.onHeightChange,u=i===void 0?V:i,c=J._objectWithoutPropertiesLoose(t,ge),f=c.value!==void 0,g=S.useRef(null),v=re(g,r),L=S.useRef(0),w=S.useRef(),x=function(){var h=g.current,R=n&&w.current?w.current:de(h);if(R){w.current=R;var P=oe(R,h.value||h.placeholder||"x",b,o),y=P[0],E=P[1];L.current!==y&&(L.current=y,h.style.setProperty("height",y+"px","important"),u(y,{rowHeight:E}))}},H=function(h){f||x(),T(h)};return S.useLayoutEffect(x),le(g,function(){if(!f){var z=g.current.value;requestAnimationFrame(function(){var h=g.current;h&&z!==h.value&&x()})}}),ce(x),fe(x),S.createElement("textarea",k._extends({},c,{onChange:H,ref:v}))},pe=S.forwardRef(he);const B=d.forwardRef((e,t)=>{const{disabled:r,readOnly:n,value:o,defaultValue:b,debounceTime:l=0,type:T="textarea",collapseOnBlur:i=!1,minRows:u=0,maxRows:c,onChange:f,onBlur:g,onFocus:v,className:L="",style:w={},size:x="small",color:H="primary",...z}=e,[h,R]=d.useState(o||b||""),P=k.useTheme(),[y,E]=d.useState(!1),[q,M]=d.useState(u),[A,C]=d.useState(i?u:c);d.useEffect(()=>{o!=null&&R(o)},[o]),d.useEffect(()=>{M(u),i&&y===!1&&C(u)},[u,c]),d.useEffect(()=>{C(i?y===!0?c:u:c)},[i]);const N=d.useCallback(X.debounce((p,F)=>D(p,F),l),[f]),D=(p,F)=>{f&&(f==null||f(p,F))},U=p=>{R(p.target.value),N(p,p.target.value)},G=p=>{E(!0),i&&C(c),v==null||v(p)},Y=p=>{E(!1),i&&C(u),g==null||g(p)};return O.jsx(ee,{style:w,className:L,theme:P,color:H,size:x,focused:y,disabled:r,readOnly:n,collapseOnBlur:i,children:O.jsx(pe,{ref:t,disabled:r,value:h,readOnly:n,minRows:q,maxRows:A,onChange:U,onFocus:G,onBlur:Y,...z})})});B.propTypes={id:a.PropTypes.string,defaultValue:a.PropTypes.string,value:a.PropTypes.string,disabled:a.PropTypes.bool,readOnly:a.PropTypes.bool,debounceTime:a.PropTypes.number,placeholder:a.PropTypes.string,tabIndex:a.PropTypes.number,collapseOnBlur:a.PropTypes.bool,minRows:a.PropTypes.number,maxRows:a.PropTypes.number,onChange:a.PropTypes.func,onBlur:a.PropTypes.func,onFocus:a.PropTypes.func,className:a.PropTypes.string,style:a.PropTypes.object,size:a.PropTypes.oneOf(["small","medium","large"]),color:a.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};module.exports=B;
33
+ `;var te=function(t){var r=d.useRef(t);return K.index(function(){r.current=t}),r},$=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},re=function(t,r){var n=d.useRef();return d.useCallback(function(o){t.current=o,n.current&&$(n.current,null),n.current=r,r&&$(r,o)},[r])},W={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},ne=function(t){Object.keys(W).forEach(function(r){t.style.setProperty(r,W[r],"important")})},_=ne,u=null,j=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function oe(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),u||(u=document.createElement("textarea"),u.setAttribute("tabindex","-1"),u.setAttribute("aria-hidden","true"),_(u)),u.parentNode===null&&document.body.appendChild(u);var o=e.paddingSize,b=e.borderSize,l=e.sizingStyle,T=l.boxSizing;Object.keys(l).forEach(function(h){var v=h;u.style[v]=l[v]}),_(u),u.value=t;var i=j(u,e);u.value=t,i=j(u,e),u.value="x";var s=u.scrollHeight-o,c=s*r;T==="border-box"&&(c=c+o+b),i=Math.max(c,i);var f=s*n;return T==="border-box"&&(f=f+o+b),i=Math.min(f,i),[i,s]}var V=function(){},ae=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},ie=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],ue=!!document.documentElement.currentStyle,se=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=ae(ie,r),o=n.boxSizing;if(o==="")return null;ue&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var b=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),l=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:b,borderSize:l}},de=se;function I(e,t,r){var n=te(r);S.useLayoutEffect(function(){var o=function(l){return n.current(l)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var le=function(t,r){I(document.body,"reset",function(n){t.current.form===n.target&&r(n)})},ce=function(t){I(window,"resize",t)},fe=function(t){I(document.fonts,"loadingdone",t)},he=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],ge=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,b=t.minRows,l=t.onChange,T=l===void 0?V:l,i=t.onHeightChange,s=i===void 0?V:i,c=J._objectWithoutPropertiesLoose(t,he),f=c.value!==void 0,h=S.useRef(null),v=re(h,r),L=S.useRef(0),w=S.useRef(),x=function(){var g=h.current,R=n&&w.current?w.current:de(g);if(R){w.current=R;var P=oe(R,g.value||g.placeholder||"x",b,o),y=P[0],E=P[1];L.current!==y&&(L.current=y,g.style.setProperty("height",y+"px","important"),s(y,{rowHeight:E}))}},H=function(g){f||x(),T(g)};return S.useLayoutEffect(x),le(h,function(){if(!f){var z=h.current.value;requestAnimationFrame(function(){var g=h.current;g&&z!==g.value&&x()})}}),ce(x),fe(x),S.createElement("textarea",k._extends({},c,{onChange:H,ref:v}))},pe=S.forwardRef(ge);const B=d.forwardRef((e,t)=>{const{disabled:r,readOnly:n,value:o,defaultValue:b,debounceTime:l=0,type:T="textarea",collapseOnBlur:i=!1,minRows:s=0,maxRows:c,onChange:f,onBlur:h,onFocus:v,className:L="",style:w={},size:x="small",color:H="primary",...z}=e,[g,R]=d.useState(o||b||""),P=k.useTheme(),[y,E]=d.useState(!1),[q,M]=d.useState(s),[A,C]=d.useState(i?s:c);d.useEffect(()=>{o!=null&&R(o)},[o]),d.useEffect(()=>{M(s),i&&y===!1&&C(s)},[s,c]),d.useEffect(()=>{C(i?y===!0?c:s:c)},[i]);const N=d.useCallback(X.debounce((p,F)=>D(p,F),l),[f]),D=(p,F)=>{f&&(f==null||f(p,F))},U=p=>{R(p.target.value),N(p,p.target.value)},G=p=>{E(!0),i&&C(c),v==null||v(p)},Y=p=>{E(!1),i&&C(s),h==null||h(p)};return O.jsx(ee,{style:w,className:L,theme:P,color:H,size:x,focused:y,disabled:r,readOnly:n,collapseOnBlur:i,children:O.jsx(pe,{ref:t,disabled:r,value:g,readOnly:n,minRows:q,maxRows:A,onChange:U,onFocus:G,onBlur:Y,...z})})});B.propTypes={id:a.PropTypes.any,defaultValue:a.PropTypes.string,value:a.PropTypes.string,disabled:a.PropTypes.bool,readOnly:a.PropTypes.bool,debounceTime:a.PropTypes.number,placeholder:a.PropTypes.string,tabIndex:a.PropTypes.number,collapseOnBlur:a.PropTypes.bool,minRows:a.PropTypes.number,maxRows:a.PropTypes.number,onChange:a.PropTypes.func,onBlur:a.PropTypes.func,onFocus:a.PropTypes.func,className:a.PropTypes.string,style:a.PropTypes.object,size:a.PropTypes.oneOf(["small","medium","large"]),color:a.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};module.exports=B;
@@ -280,7 +280,7 @@ const Se = Y((e, t) => {
280
280
  );
281
281
  });
282
282
  Se.propTypes = {
283
- id: o.string,
283
+ id: o.any,
284
284
  defaultValue: o.string,
285
285
  value: o.string,
286
286
  disabled: o.bool,
@@ -1,4 +1,4 @@
1
- "use strict";const d=require("react/jsx-runtime"),t=require("./index-BPVoEhTF.cjs"),l=require("react"),_=require("./index-DaiUAQVF.cjs"),c=require("./emotion-styled.browser.esm-BtEseadx.cjs"),n=require("./utils-BOtq2mcF.cjs"),B=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),D=c.styled.div`
1
+ "use strict";const c=require("react/jsx-runtime"),t=require("./index-BPVoEhTF.cjs"),s=require("react"),B=require("./index-DaiUAQVF.cjs"),p=require("./emotion-styled.browser.esm-BtEseadx.cjs"),n=require("./utils-BOtq2mcF.cjs"),D=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),E=p.styled.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
 
@@ -11,10 +11,10 @@
11
11
 
12
12
  ${e=>e.focused&&e.readOnly!==!0?n.getOutlineCss(e.theme):""}
13
13
  ${e=>e.disabled===!0?n.getDisabledStateCss(e.theme):""}
14
- `,$=c.styled.span`
14
+ `,C=p.styled.span`
15
15
  padding: 0 12px;
16
16
  color: ${e=>n.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,"enabled","prefix")};
17
- `,E=c.styled($)``,A=c.styled.input`
17
+ `,A=p.styled(C)``,G=p.styled.input`
18
18
  background: none;
19
19
  border: none;
20
20
  outline: none;
@@ -42,4 +42,4 @@
42
42
  ${e=>n.getDisabledStateCss(e.theme)}
43
43
  background: none;
44
44
  }
45
- `,C=l.forwardRef((e,V)=>{const{disabled:b,readOnly:f,defaultValue:S,value:o,debounceTime:I=0,type:z="text",placeholder:O,tabIndex:R,prefix:p,suffix:g,onChange:s,onBlur:m,onFocus:y,className:q="",style:v={},size:x="small",color:a="primary",...j}=e,i=B.useTheme(),[W,T]=l.useState(o||S||""),[u,P]=l.useState(!1);l.useEffect(()=>{o!=null&&T(o)},[o]);const k=l.useCallback(_.debounce((r,h)=>w(r,h),I),[s]),w=(r,h)=>{s&&(s==null||s(r,h))},U=r=>{T(r.target.value),k(r,r.target.value)},F=r=>{P(!0),y==null||y(r)},N=r=>{P(!1),m==null||m(r)};return d.jsxs(D,{style:v,className:q,theme:i,color:a,size:x,focused:u,disabled:b,readOnly:f,children:[p&&d.jsx($,{theme:i,color:a,focused:u,className:"lnc-input-prefix",children:p}),d.jsx(A,{ref:V,type:z,theme:i,color:a,size:x,placeholder:O,prefix:p,suffix:g,disabled:b,readOnly:f,focused:u,onFocus:F,onBlur:N,onChange:U,tabIndex:R,value:W,...j}),g&&d.jsx(E,{theme:i,color:a,focused:u,className:"lnc-input-suffix",children:g})]})});C.propTypes={id:t.PropTypes.string,defaultValue:t.PropTypes.string,value:t.PropTypes.string,disabled:t.PropTypes.bool,readOnly:t.PropTypes.bool,debounceTime:t.PropTypes.number,placeholder:t.PropTypes.string,type:t.PropTypes.oneOf(["text","email"]),tabIndex:t.PropTypes.number,prefix:t.PropTypes.oneOfType([t.PropTypes.string,t.PropTypes.element]),suffix:t.PropTypes.oneOfType([t.PropTypes.string,t.PropTypes.element]),onChange:t.PropTypes.func,onBlur:t.PropTypes.func,onFocus:t.PropTypes.func,className:t.PropTypes.string,style:t.PropTypes.object,size:t.PropTypes.oneOf(["small","medium","large"]),color:t.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};module.exports=C;
45
+ `,S=s.forwardRef((e,I)=>{const{disabled:b,readOnly:x,defaultValue:T,value:o,debounceTime:R=0,type:z="text",placeholder:O,tabIndex:q,prefix:m,suffix:g,onChange:l,onBlur:y,onFocus:h,className:v="",style:j={},size:P="small",color:a="primary",...W}=e,i=D.useTheme(),u=s.useRef(o||T||""),[k,$]=s.useState(o||T||""),[d,V]=s.useState(!1);s.useEffect(()=>{o!=null&&(u.current=o,$(u.current))},[o]);const w=s.useCallback(B.debounce((r,f)=>U(r,f),R),[l]),U=(r,f)=>{l&&(l==null||l(r,f))},F=r=>{u.current=r.target.value,$(u.current),w(r,r.target.value)},N=r=>{V(!0),h==null||h(r)},_=r=>{V(!1),y==null||y(r)};return c.jsxs(E,{style:j,className:v,theme:i,color:a,size:P,focused:d,disabled:b,readOnly:x,children:[m&&c.jsx(C,{theme:i,color:a,focused:d,className:"lnc-input-prefix",children:m}),c.jsx(G,{ref:I,type:z,theme:i,color:a,size:P,placeholder:O,prefix:m,suffix:g,disabled:b,readOnly:x,focused:d,onFocus:N,onBlur:_,onChange:F,tabIndex:q,value:k,...W}),g&&c.jsx(A,{theme:i,color:a,focused:d,className:"lnc-input-suffix",children:g})]})});S.propTypes={id:t.PropTypes.any,defaultValue:t.PropTypes.string,value:t.PropTypes.string,disabled:t.PropTypes.bool,readOnly:t.PropTypes.bool,debounceTime:t.PropTypes.number,placeholder:t.PropTypes.string,type:t.PropTypes.oneOf(["text","email"]),tabIndex:t.PropTypes.number,prefix:t.PropTypes.oneOfType([t.PropTypes.string,t.PropTypes.element]),suffix:t.PropTypes.oneOfType([t.PropTypes.string,t.PropTypes.element]),onChange:t.PropTypes.func,onBlur:t.PropTypes.func,onFocus:t.PropTypes.func,className:t.PropTypes.string,style:t.PropTypes.object,size:t.PropTypes.oneOf(["small","medium","large"]),color:t.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};module.exports=S;
package/dist/TextInput.js CHANGED
@@ -1,17 +1,17 @@
1
- import { jsxs as W, jsx as b } from "react/jsx-runtime";
1
+ import { jsxs as U, jsx as y } from "react/jsx-runtime";
2
2
  import { P as t } from "./index-S5Cd7WrG.js";
3
- import { forwardRef as U, useState as C, useEffect as D, useCallback as E } from "react";
4
- import { d as q } from "./index-CkWvbrVT.js";
5
- import { s as u } from "./emotion-styled.browser.esm-BNN1dTl3.js";
6
- import { d as s, b as a, a as A, e as G, h as O, c as H } from "./utils-WHYrEnYF.js";
7
- import { u as J } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
8
- const K = u.div`
3
+ import { forwardRef as D, useRef as E, useState as V, useEffect as q, useCallback as A } from "react";
4
+ import { d as G } from "./index-CkWvbrVT.js";
5
+ import { s as c } from "./emotion-styled.browser.esm-BNN1dTl3.js";
6
+ import { d as s, b as r, a as H, e as J, h as T, c as K } from "./utils-WHYrEnYF.js";
7
+ import { u as L } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
8
+ const M = c.div`
9
9
  display: flex;
10
10
  align-items: center;
11
11
 
12
12
  min-height: ${(e) => s(e.theme, e.size)};
13
13
  max-height: ${(e) => s(e.theme, e.size)};
14
- background-color: ${(e) => a(
14
+ background-color: ${(e) => r(
15
15
  e.theme,
16
16
  "Input",
17
17
  e.color,
@@ -19,27 +19,27 @@ const K = u.div`
19
19
  "background"
20
20
  )};
21
21
  border: 1px solid
22
- ${(e) => a(
22
+ ${(e) => r(
23
23
  e.theme,
24
24
  "Input",
25
25
  e.focused === !0 ? "primary" : e.color,
26
26
  e.disabled === !0 ? "disabled" : "enabled",
27
27
  "border"
28
28
  )};
29
- border-radius: ${(e) => A(e.theme, "regular")};
29
+ border-radius: ${(e) => H(e.theme, "regular")};
30
30
 
31
- ${(e) => e.focused && e.readOnly !== !0 ? G(e.theme) : ""}
32
- ${(e) => e.disabled === !0 ? O(e.theme) : ""}
33
- `, T = u.span`
31
+ ${(e) => e.focused && e.readOnly !== !0 ? J(e.theme) : ""}
32
+ ${(e) => e.disabled === !0 ? T(e.theme) : ""}
33
+ `, z = c.span`
34
34
  padding: 0 12px;
35
- color: ${(e) => a(
35
+ color: ${(e) => r(
36
36
  e.theme,
37
37
  "Input",
38
38
  e.focused === !0 ? "primary" : e.color,
39
39
  "enabled",
40
40
  "prefix"
41
41
  )};
42
- `, L = u(T)``, M = u.input`
42
+ `, Q = c(z)``, X = c.input`
43
43
  background: none;
44
44
  border: none;
45
45
  outline: none;
@@ -47,22 +47,22 @@ const K = u.div`
47
47
  padding-bottom: 0.625rem;
48
48
  width: 100%;
49
49
 
50
- ${(e) => H(e.theme, "Input", e.size, "enabled")}
50
+ ${(e) => K(e.theme, "Input", e.size, "enabled")}
51
51
  min-height: ${(e) => s(e.theme, e.size)};
52
52
  max-height: ${(e) => s(e.theme, e.size)};
53
- color: ${(e) => a(
53
+ color: ${(e) => r(
54
54
  e.theme,
55
55
  "Input",
56
56
  e.focused === !0 ? "primary" : e.color,
57
57
  "enabled",
58
58
  "text"
59
59
  )};
60
- caret-color: ${(e) => a(e.theme, "Input", e.color, "enabled", "caret")};
60
+ caret-color: ${(e) => r(e.theme, "Input", e.color, "enabled", "caret")};
61
61
  padding-right: ${(e) => e.suffix ? "0" : "0.75rem"};
62
62
  padding-left: ${(e) => e.prefix ? "0" : "0.75rem"};
63
63
 
64
64
  &::placeholder {
65
- color: ${(e) => a(
65
+ color: ${(e) => r(
66
66
  e.theme,
67
67
  "Input",
68
68
  e.color,
@@ -76,107 +76,107 @@ const K = u.div`
76
76
  }
77
77
 
78
78
  &:disabled {
79
- ${(e) => O(e.theme)}
79
+ ${(e) => T(e.theme)}
80
80
  background: none;
81
81
  }
82
- `, Q = U((e, V) => {
82
+ `, Y = D((e, S) => {
83
83
  const {
84
- disabled: y,
84
+ disabled: p,
85
85
  readOnly: x,
86
- defaultValue: z,
87
- value: l,
88
- debounceTime: S = 0,
89
- type: v = "text",
90
- placeholder: k,
86
+ defaultValue: $,
87
+ value: a,
88
+ debounceTime: v = 0,
89
+ type: k = "text",
90
+ placeholder: R,
91
91
  tabIndex: B,
92
- prefix: c,
93
- suffix: m,
92
+ prefix: m,
93
+ suffix: f,
94
94
  //----------------
95
- onChange: r,
96
- onBlur: f,
97
- onFocus: h,
95
+ onChange: l,
96
+ onBlur: h,
97
+ onFocus: g,
98
98
  //----------------
99
99
  className: F = "",
100
100
  style: N = {},
101
- size: p = "small",
101
+ size: I = "small",
102
102
  color: o = "primary",
103
103
  ...j
104
- } = e, d = J(), [w, $] = C(l || z || ""), [i, I] = C(!1);
105
- D(() => {
106
- l != null && $(l);
107
- }, [l]);
108
- const P = E(
109
- q((n, g) => R(n, g), S),
110
- [r]
111
- ), R = (n, g) => {
112
- r && (r == null || r(n, g));
104
+ } = e, u = L(), d = E(a || $ || ""), [w, C] = V(a || $ || ""), [i, O] = V(!1);
105
+ q(() => {
106
+ a != null && (d.current = a, C(d.current));
107
+ }, [a]);
108
+ const P = A(
109
+ G((n, b) => W(n, b), v),
110
+ [l]
111
+ ), W = (n, b) => {
112
+ l && (l == null || l(n, b));
113
113
  };
114
- return /* @__PURE__ */ W(
115
- K,
114
+ return /* @__PURE__ */ U(
115
+ M,
116
116
  {
117
117
  style: N,
118
118
  className: F,
119
- theme: d,
119
+ theme: u,
120
120
  color: o,
121
- size: p,
121
+ size: I,
122
122
  focused: i,
123
- disabled: y,
123
+ disabled: p,
124
124
  readOnly: x,
125
125
  children: [
126
- c && /* @__PURE__ */ b(
127
- T,
126
+ m && /* @__PURE__ */ y(
127
+ z,
128
128
  {
129
- theme: d,
129
+ theme: u,
130
130
  color: o,
131
131
  focused: i,
132
132
  className: "lnc-input-prefix",
133
- children: c
133
+ children: m
134
134
  }
135
135
  ),
136
- /* @__PURE__ */ b(
137
- M,
136
+ /* @__PURE__ */ y(
137
+ X,
138
138
  {
139
- ref: V,
140
- type: v,
141
- theme: d,
139
+ ref: S,
140
+ type: k,
141
+ theme: u,
142
142
  color: o,
143
- size: p,
144
- placeholder: k,
145
- prefix: c,
146
- suffix: m,
147
- disabled: y,
143
+ size: I,
144
+ placeholder: R,
145
+ prefix: m,
146
+ suffix: f,
147
+ disabled: p,
148
148
  readOnly: x,
149
149
  focused: i,
150
150
  onFocus: (n) => {
151
- I(!0), h == null || h(n);
151
+ O(!0), g == null || g(n);
152
152
  },
153
153
  onBlur: (n) => {
154
- I(!1), f == null || f(n);
154
+ O(!1), h == null || h(n);
155
155
  },
156
156
  onChange: (n) => {
157
- $(n.target.value), P(n, n.target.value);
157
+ d.current = n.target.value, C(d.current), P(n, n.target.value);
158
158
  },
159
159
  tabIndex: B,
160
160
  value: w,
161
161
  ...j
162
162
  }
163
163
  ),
164
- m && /* @__PURE__ */ b(
165
- L,
164
+ f && /* @__PURE__ */ y(
165
+ Q,
166
166
  {
167
- theme: d,
167
+ theme: u,
168
168
  color: o,
169
169
  focused: i,
170
170
  className: "lnc-input-suffix",
171
- children: m
171
+ children: f
172
172
  }
173
173
  )
174
174
  ]
175
175
  }
176
176
  );
177
177
  });
178
- Q.propTypes = {
179
- id: t.string,
178
+ Y.propTypes = {
179
+ id: t.any,
180
180
  defaultValue: t.string,
181
181
  value: t.string,
182
182
  disabled: t.bool,
@@ -223,5 +223,5 @@ Q.propTypes = {
223
223
  ])
224
224
  };
225
225
  export {
226
- Q as default
226
+ Y as default
227
227
  };
@@ -28,4 +28,4 @@
28
28
  border: 1px solid
29
29
  ${e=>t.getColorRgbaValue(e.theme,"Input","primary",e.disabled===!0?"disabled":"enabled","border")};
30
30
  }
31
- `,c=l.forwardRef((e,i)=>{const{disabled:s,readOnly:m,defaultValue:g,value:o,debounceTime:p=0,onChange:a,className:y="",style:h={},size:T="small",color:C="primary",...f}=e,x=v.useTheme(),[$,b]=l.useState(o||g||"");l.useEffect(()=>{o!=null&&b(o)},[o]);const P=l.useCallback(q.debounce((n,d)=>V(n,d),p),[a]),V=(n,d)=>{a&&(a==null||a(n,d))},I=n=>{b(n.target.value),P(n,n.target.value)};return u.jsx(u.Fragment,{children:u.jsx(w,{type:"time",ref:i,onChange:I,disabled:s,readOnly:m,theme:x,color:C,size:T,className:y,style:h,value:$,...f})})});c.propTypes={id:r.PropTypes.string,defaultValue:r.PropTypes.string,value:r.PropTypes.string,disabled:r.PropTypes.bool,readOnly:r.PropTypes.bool,debounceTime:r.PropTypes.number,tabIndex:r.PropTypes.number,onChange:r.PropTypes.func,className:r.PropTypes.string,style:r.PropTypes.object,size:r.PropTypes.oneOf(["small","medium","large"]),color:r.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};module.exports=c;
31
+ `,c=l.forwardRef((e,i)=>{const{disabled:s,readOnly:m,defaultValue:g,value:o,debounceTime:p=0,onChange:a,className:y="",style:h={},size:T="small",color:C="primary",...f}=e,x=v.useTheme(),[$,b]=l.useState(o||g||"");l.useEffect(()=>{o!=null&&b(o)},[o]);const P=l.useCallback(q.debounce((n,d)=>V(n,d),p),[a]),V=(n,d)=>{a&&(a==null||a(n,d))},I=n=>{b(n.target.value),P(n,n.target.value)};return u.jsx(u.Fragment,{children:u.jsx(w,{type:"time",ref:i,onChange:I,disabled:s,readOnly:m,theme:x,color:C,size:T,className:y,style:h,value:$,...f})})});c.propTypes={id:r.PropTypes.any,defaultValue:r.PropTypes.string,value:r.PropTypes.string,disabled:r.PropTypes.bool,readOnly:r.PropTypes.bool,debounceTime:r.PropTypes.number,tabIndex:r.PropTypes.number,onChange:r.PropTypes.func,className:r.PropTypes.string,style:r.PropTypes.object,size:r.PropTypes.oneOf(["small","medium","large"]),color:r.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};module.exports=c;
package/dist/TimeInput.js CHANGED
@@ -104,7 +104,7 @@ const U = ({ theme: e, size: s }) => {
104
104
  ) });
105
105
  });
106
106
  B.propTypes = {
107
- id: a.string,
107
+ id: a.any,
108
108
  defaultValue: a.string,
109
109
  value: a.string,
110
110
  disabled: a.bool,
@@ -1,4 +1,4 @@
1
- "use strict";const i=require("react/jsx-runtime"),n=require("react"),P=require("./emotion-styled.browser.esm-BtEseadx.cjs"),f=require("./consts-goSZX3xP.cjs"),v=require("./useDetectMobile-zkbzoOGV.cjs"),q=require("./Button.cjs"),b=require("./suspense-product-card-detailed-EXZJLtNh.cjs"),C=P.styled.div`
1
+ "use strict";const i=require("react/jsx-runtime"),n=require("react"),P=require("./emotion-styled.browser.esm-BtEseadx.cjs"),f=require("./consts-goSZX3xP.cjs"),v=require("./useDetectMobile-zkbzoOGV.cjs"),q=require("./Button.cjs"),b=require("./suspense-product-card-detailed-Yjo62f1v.cjs"),C=P.styled.div`
2
2
  padding: 1.75rem 3rem;
3
3
  display: grid;
4
4
  grid-template-columns: ${t=>`repeat(${t.limit||5}, minmax(0, 1fr))`};
@@ -4,7 +4,7 @@ import { s as C } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
4
  import { M as L, S as F } from "./consts-BuFChS64.js";
5
5
  import { u as I } from "./useDetectMobile-Bkvj0VMa.js";
6
6
  import T from "./Button.js";
7
- import { D as _, S as D } from "./suspense-product-card-detailed-Z0emIstD.js";
7
+ import { D as _, S as D } from "./suspense-product-card-detailed-Bez9UFMR.js";
8
8
  const E = C.div`
9
9
  padding: 1.75rem 3rem;
10
10
  display: grid;
@@ -1,10 +1,10 @@
1
- import { jsxs as t, jsx as e, Fragment as h } from "react/jsx-runtime";
2
- import { forwardRef as c, Suspense as $ } from "react";
3
- import { p as y, t as g, o as s, l as S, q as P, G as C } from "./utils-WHYrEnYF.js";
4
- import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
5
- import { P as z } from "./index-DQyZFR-C.js";
6
- import { M as D } from "./consts-BuFChS64.js";
7
- const u = f.div`
1
+ import { jsxs as i, jsx as e, Fragment as w } from "react/jsx-runtime";
2
+ import { forwardRef as p, Suspense as P } from "react";
3
+ import { p as z, t as h, o as s, l as C, q as f, G as u } from "./utils-WHYrEnYF.js";
4
+ import { s as x } from "./emotion-styled.browser.esm-BNN1dTl3.js";
5
+ import { P as D } from "./index-DQyZFR-C.js";
6
+ import { M as j } from "./consts-BuFChS64.js";
7
+ const v = x.div`
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  gap: 0.5rem;
@@ -32,20 +32,30 @@ const u = f.div`
32
32
  & .card-title {
33
33
  font-size: 0.875rem;
34
34
  font-weight: 600;
35
- ${y(2)}
35
+ ${z(2)}
36
36
  }
37
37
 
38
38
  & .price-text {
39
39
  font-size: 1rem;
40
40
  font-weight: 600;
41
- ${g()}
41
+ ${h()}
42
+ display: flex;
43
+ align-items: end;
44
+ gap: 0.5rem;
45
+ & .full-price {
46
+ text-decoration: line-through;
47
+ font-size: 0.75rem;
48
+ font-weight: 400;
49
+ padding-bottom: 0.125rem;
50
+ color: var(--gray-600, #676e79);
51
+ }
42
52
  }
43
53
 
44
54
  & .location-text {
45
55
  font-size: 0.75rem;
46
56
  font-weight: 400;
47
57
  color: var(--gray-600, #676e79);
48
- ${g()}
58
+ ${h()}
49
59
  }
50
60
 
51
61
  & .tags-wrapper {
@@ -89,7 +99,7 @@ const u = f.div`
89
99
  height: 1rem;
90
100
  }
91
101
 
92
- @media (max-width: ${D + "px"}) {
102
+ @media (max-width: ${j + "px"}) {
93
103
  & img {
94
104
  width: 8.875rem;
95
105
  height: 8.875rem;
@@ -105,7 +115,7 @@ const u = f.div`
105
115
  font-weight: 600;
106
116
  }
107
117
  }
108
- `, j = f.div`
118
+ `, F = x.div`
109
119
  display: flex;
110
120
  align-items: center;
111
121
  gap: 0.25rem;
@@ -117,74 +127,76 @@ const u = f.div`
117
127
  font-size: 1rem;
118
128
  color: var(--warning-500, #F59E0B);
119
129
  }
120
- `, F = c(({ sponsoredText: r = "Sponsored" }, i) => /* @__PURE__ */ t(j, { ref: i, className: "sponsored-line", children: [
130
+ `, I = p(({ sponsoredText: r = "Sponsored" }, a) => /* @__PURE__ */ i(F, { ref: a, className: "sponsored-line", children: [
121
131
  /* @__PURE__ */ e("i", { className: "mng-lnc-paw2" }),
122
132
  /* @__PURE__ */ e("span", { children: r })
123
- ] })), R = c((r, i) => {
133
+ ] })), U = p((r, a) => {
124
134
  const {
125
135
  uuid: o,
126
136
  title: n,
127
- price: a = 0,
128
- currency: d,
129
- isNegotiable: l,
137
+ price: t = 0,
138
+ sellingPrice: c,
139
+ currency: l,
140
+ isNegotiable: d,
130
141
  isFree: m,
131
- imageUrl: w,
132
- sellerUuid: E,
133
- location: x,
134
- isSponsored: k,
135
- imageComponent: p,
136
- onSelectCard: v = () => {
142
+ imageUrl: k,
143
+ sellerUuid: G,
144
+ location: N,
145
+ isSponsored: $,
146
+ imageComponent: g,
147
+ onSelectCard: b = () => {
137
148
  },
138
- freeText: N = "Free",
139
- negotiableText: b = "Negotiable"
149
+ freeText: y = "Free",
150
+ negotiableText: S = "Negotiable"
140
151
  } = r;
141
152
  return (
142
153
  // <LandingPageProductCardSkeleton />
143
- /* @__PURE__ */ t(u, { className: "product-card", onClick: v, children: [
144
- S(p) ? p : /* @__PURE__ */ e(z, { src: w }),
154
+ /* @__PURE__ */ i(v, { className: "product-card", onClick: b, children: [
155
+ C(g) ? g : /* @__PURE__ */ e(D, { src: k }),
145
156
  /* @__PURE__ */ e("div", { className: "wrapper-card-1", children: /* @__PURE__ */ e("div", { className: "card-title", children: n }) }),
146
- /* @__PURE__ */ t("div", { className: "wrapper-card-2", children: [
147
- /* @__PURE__ */ t("div", { className: "price-text", children: [
148
- a > 0 && d && l !== !0 && m !== !0 && `${P(a)} ${C(d)}`,
149
- l && b,
150
- m && N
157
+ /* @__PURE__ */ i("div", { className: "wrapper-card-2", children: [
158
+ /* @__PURE__ */ i("div", { className: "price-text", children: [
159
+ c > 0 && l && d !== !0 && m !== !0 && /* @__PURE__ */ e("div", { children: `${f(c)} ${u(l)}` }),
160
+ t > 0 && l && d !== !0 && m !== !0 && t !== c && /* @__PURE__ */ e("div", { className: `${c > 0 ? "full-price" : ""}`, children: `${f(t)} ${u(l)}` }),
161
+ d && S,
162
+ m && y
151
163
  ] }),
152
- /* @__PURE__ */ e("div", { className: "location-text", children: x })
164
+ /* @__PURE__ */ e("div", { className: "location-text", children: N })
153
165
  ] }),
154
- k === !0 && /* @__PURE__ */ e(F, {})
166
+ $ === !0 && /* @__PURE__ */ e(I, {})
155
167
  ] })
156
168
  );
157
- }), I = c(({}, r) => /* @__PURE__ */ t(u, { className: "product-card", children: [
169
+ }), T = p(({}, r) => /* @__PURE__ */ i(v, { className: "product-card", children: [
158
170
  /* @__PURE__ */ e("img", { className: "skeleton-img" }),
159
- /* @__PURE__ */ t("div", { className: "wrapper-card-1", children: [
171
+ /* @__PURE__ */ i("div", { className: "wrapper-card-1", children: [
160
172
  /* @__PURE__ */ e("div", { className: "skeleton-title" }),
161
173
  /* @__PURE__ */ e("div", { className: "skeleton-tags" })
162
174
  ] }),
163
- /* @__PURE__ */ t("div", { className: "wrapper-card-1", children: [
175
+ /* @__PURE__ */ i("div", { className: "wrapper-card-1", children: [
164
176
  /* @__PURE__ */ e("div", { className: "skeleton-price" }),
165
177
  /* @__PURE__ */ e("div", { className: "skeleton-sponsored" })
166
178
  ] })
167
- ] })), T = ({ limit: r = 5, isLoading: i = !1, keyPrefix: o }) => /* @__PURE__ */ e(h, { children: Array.from({ length: r }, (n, a) => /* @__PURE__ */ e(
168
- I,
179
+ ] })), E = ({ limit: r = 5, isLoading: a = !1, keyPrefix: o }) => /* @__PURE__ */ e(w, { children: Array.from({ length: r }, (n, t) => /* @__PURE__ */ e(
180
+ T,
169
181
  {
170
- isLoading: i
182
+ isLoading: a
171
183
  },
172
- `${o}-skeleton-product-card-${a}`
173
- )) }), U = ({
184
+ `${o}-skeleton-product-card-${t}`
185
+ )) }), q = ({
174
186
  children: r,
175
- fallbackComponent: i = /* @__PURE__ */ e(h, {}),
187
+ fallbackComponent: a = /* @__PURE__ */ e(w, {}),
176
188
  isLoading: o = !1,
177
189
  limit: n,
178
- keyPrefix: a
179
- }) => /* @__PURE__ */ e($, { fallbackComponent: i, children: o === !0 ? /* @__PURE__ */ e(
180
- T,
190
+ keyPrefix: t
191
+ }) => /* @__PURE__ */ e(P, { fallbackComponent: a, children: o === !0 ? /* @__PURE__ */ e(
192
+ E,
181
193
  {
182
194
  isLoading: o,
183
195
  limit: n,
184
- keyPrefix: a
196
+ keyPrefix: t
185
197
  }
186
198
  ) : r });
187
199
  export {
188
- R as D,
189
- U as S
200
+ U as D,
201
+ q as S
190
202
  };