@lanaco/lnc-react-ui 4.0.95 → 4.0.97
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/DecimalInput.cjs +1 -1
- package/dist/DecimalInput.js +1 -1
- package/dist/DecimalInputV2.cjs +1 -1
- package/dist/DecimalInputV2.js +20 -20
- package/dist/DetailedProductsSection.cjs +4 -4
- package/dist/DetailedProductsSection.js +16 -14
- package/dist/DragAndDropFile.cjs +1 -1
- package/dist/DragAndDropFile.js +1 -1
- package/dist/Dropdown.cjs +1 -1
- package/dist/Dropdown.js +18 -18
- package/dist/DropdownLookup.cjs +1 -1
- package/dist/DropdownLookup.js +14 -14
- package/dist/Icon.cjs +1 -1
- package/dist/Icon.js +8 -8
- package/dist/MultiSelectDropdown.cjs +1 -1
- package/dist/MultiSelectDropdown.js +6 -6
- package/dist/MultiSelectDropdownLookup.cjs +1 -1
- package/dist/MultiSelectDropdownLookup.js +6 -6
- package/dist/NumberInput.cjs +19 -19
- package/dist/NumberInput.js +100 -95
- package/dist/PasswordInput.cjs +1 -1
- package/dist/PasswordInput.js +1 -1
- package/dist/ProgressBar.cjs +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/RadioGroup.cjs +3 -3
- package/dist/RadioGroup.js +22 -22
- package/dist/RadioInput.cjs +1 -1
- package/dist/RadioInput.js +13 -13
- package/dist/Table.cjs +1 -1
- package/dist/Table.js +1 -1
- package/dist/TextAreaInput.cjs +1 -1
- package/dist/TextAreaInput.js +1 -1
- package/dist/TextInput.cjs +17 -17
- package/dist/TextInput.js +1 -1
- package/dist/TimeInput.cjs +1 -1
- package/dist/TimeInput.js +1 -1
- package/dist/UrgentSaleProductsSection.cjs +1 -1
- package/dist/UrgentSaleProductsSection.js +1 -1
- package/dist/{suspense-product-card-detailed-Z0emIstD.js → suspense-product-card-detailed-Bez9UFMR.js} +61 -49
- package/dist/suspense-product-card-detailed-Yjo62f1v.cjs +124 -0
- package/package.json +1 -1
- package/dist/suspense-product-card-detailed-EXZJLtNh.cjs +0 -114
package/dist/RadioInput.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as b, jsx as
|
|
1
|
+
import { jsxs as b, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as P, useState as j } from "react";
|
|
3
3
|
import { s as g } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { P as i } from "./index-S5Cd7WrG.js";
|
|
@@ -246,26 +246,26 @@ const I = (e) => e == "left" ? "row-reverse" : "row", D = g.label`
|
|
|
246
246
|
tabIndex: -1,
|
|
247
247
|
readOnly: s,
|
|
248
248
|
focused: B,
|
|
249
|
-
onClick: (
|
|
249
|
+
onClick: (o) => c == null ? void 0 : c(o),
|
|
250
250
|
innerColor: v,
|
|
251
251
|
children: [
|
|
252
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ r(
|
|
253
253
|
"input",
|
|
254
254
|
{
|
|
255
255
|
ref: y,
|
|
256
256
|
disabled: d || s,
|
|
257
257
|
type: "radio",
|
|
258
|
-
onBlur: (
|
|
259
|
-
m(!1), l && (l == null || l(
|
|
258
|
+
onBlur: (o) => {
|
|
259
|
+
m(!1), l && (l == null || l(o));
|
|
260
260
|
},
|
|
261
|
-
onFocus: (
|
|
262
|
-
m(!0), n && (n == null || n(
|
|
261
|
+
onFocus: (o) => {
|
|
262
|
+
m(!0), n && (n == null || n(o));
|
|
263
263
|
},
|
|
264
|
-
onChange: (
|
|
264
|
+
onChange: (o) => a == null ? void 0 : a(o),
|
|
265
265
|
...z
|
|
266
266
|
}
|
|
267
267
|
),
|
|
268
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ r("div", { className: "checkmark", children: /* @__PURE__ */ b(
|
|
269
269
|
"svg",
|
|
270
270
|
{
|
|
271
271
|
id: "eqw1eBsfm9l1",
|
|
@@ -274,7 +274,7 @@ const I = (e) => e == "left" ? "row-reverse" : "row", D = g.label`
|
|
|
274
274
|
shapeRendering: "geometricPrecision",
|
|
275
275
|
textRendering: "geometricPrecision",
|
|
276
276
|
children: [
|
|
277
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ r(
|
|
278
278
|
"ellipse",
|
|
279
279
|
{
|
|
280
280
|
className: "outer-circle",
|
|
@@ -285,7 +285,7 @@ const I = (e) => e == "left" ? "row-reverse" : "row", D = g.label`
|
|
|
285
285
|
stroke: "red"
|
|
286
286
|
}
|
|
287
287
|
),
|
|
288
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ r(
|
|
289
289
|
"ellipse",
|
|
290
290
|
{
|
|
291
291
|
rx: "5",
|
|
@@ -298,7 +298,7 @@ const I = (e) => e == "left" ? "row-reverse" : "row", D = g.label`
|
|
|
298
298
|
]
|
|
299
299
|
}
|
|
300
300
|
) }),
|
|
301
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ r(
|
|
302
302
|
K,
|
|
303
303
|
{
|
|
304
304
|
...u,
|
|
@@ -315,7 +315,7 @@ const I = (e) => e == "left" ? "row-reverse" : "row", D = g.label`
|
|
|
315
315
|
);
|
|
316
316
|
});
|
|
317
317
|
L.propTypes = {
|
|
318
|
-
id: i.
|
|
318
|
+
id: i.any,
|
|
319
319
|
name: i.string,
|
|
320
320
|
checked: i.bool,
|
|
321
321
|
disabled: i.bool,
|
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,
|
|
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
package/dist/TextAreaInput.cjs
CHANGED
|
@@ -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,
|
|
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;
|
package/dist/TextAreaInput.js
CHANGED
package/dist/TextInput.cjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
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"),
|
|
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
|
|
|
5
|
-
min-height: ${e=>
|
|
6
|
-
max-height: ${e=>
|
|
7
|
-
background-color: ${e=>
|
|
5
|
+
min-height: ${e=>n.getSizeValueWithUnits(e.theme,e.size)};
|
|
6
|
+
max-height: ${e=>n.getSizeValueWithUnits(e.theme,e.size)};
|
|
7
|
+
background-color: ${e=>n.getColorRgbaValue(e.theme,"Input",e.color,"enabled","background")};
|
|
8
8
|
border: 1px solid
|
|
9
|
-
${e=>
|
|
10
|
-
border-radius: ${e=>
|
|
9
|
+
${e=>n.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,e.disabled===!0?"disabled":"enabled","border")};
|
|
10
|
+
border-radius: ${e=>n.getBorderRadiusValueWithUnits(e.theme,"regular")};
|
|
11
11
|
|
|
12
|
-
${e=>e.focused&&e.readOnly!==!0?
|
|
13
|
-
${e=>e.disabled===!0?
|
|
12
|
+
${e=>e.focused&&e.readOnly!==!0?n.getOutlineCss(e.theme):""}
|
|
13
|
+
${e=>e.disabled===!0?n.getDisabledStateCss(e.theme):""}
|
|
14
14
|
`,C=p.styled.span`
|
|
15
15
|
padding: 0 12px;
|
|
16
|
-
color: ${e=>
|
|
16
|
+
color: ${e=>n.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,"enabled","prefix")};
|
|
17
17
|
`,A=p.styled(C)``,G=p.styled.input`
|
|
18
18
|
background: none;
|
|
19
19
|
border: none;
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
padding-bottom: 0.625rem;
|
|
23
23
|
width: 100%;
|
|
24
24
|
|
|
25
|
-
${e=>
|
|
26
|
-
min-height: ${e=>
|
|
27
|
-
max-height: ${e=>
|
|
28
|
-
color: ${e=>
|
|
29
|
-
caret-color: ${e=>
|
|
25
|
+
${e=>n.getComponentTypographyCss(e.theme,"Input",e.size,"enabled")}
|
|
26
|
+
min-height: ${e=>n.getSizeValueWithUnits(e.theme,e.size)};
|
|
27
|
+
max-height: ${e=>n.getSizeValueWithUnits(e.theme,e.size)};
|
|
28
|
+
color: ${e=>n.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,"enabled","text")};
|
|
29
|
+
caret-color: ${e=>n.getColorRgbaValue(e.theme,"Input",e.color,"enabled","caret")};
|
|
30
30
|
padding-right: ${e=>e.suffix?"0":"0.75rem"};
|
|
31
31
|
padding-left: ${e=>e.prefix?"0":"0.75rem"};
|
|
32
32
|
|
|
33
33
|
&::placeholder {
|
|
34
|
-
color: ${e=>
|
|
34
|
+
color: ${e=>n.getColorRgbaValue(e.theme,"Input",e.color,"enabled","placeholder")};
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
&:read-only {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
&:disabled {
|
|
42
|
-
${e=>
|
|
42
|
+
${e=>n.getDisabledStateCss(e.theme)}
|
|
43
43
|
background: none;
|
|
44
44
|
}
|
|
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:
|
|
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
package/dist/TimeInput.cjs
CHANGED
|
@@ -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.
|
|
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
|
@@ -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-
|
|
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-
|
|
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
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { p as
|
|
4
|
-
import { s as
|
|
5
|
-
import { P as
|
|
6
|
-
import { M as
|
|
7
|
-
const
|
|
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
|
-
${
|
|
35
|
+
${z(2)}
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
& .price-text {
|
|
39
39
|
font-size: 1rem;
|
|
40
40
|
font-weight: 600;
|
|
41
|
-
${
|
|
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
|
-
${
|
|
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: ${
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
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
|
-
] })),
|
|
133
|
+
] })), U = p((r, a) => {
|
|
124
134
|
const {
|
|
125
135
|
uuid: o,
|
|
126
136
|
title: n,
|
|
127
|
-
price:
|
|
128
|
-
|
|
129
|
-
|
|
137
|
+
price: t = 0,
|
|
138
|
+
sellingPrice: c,
|
|
139
|
+
currency: l,
|
|
140
|
+
isNegotiable: d,
|
|
130
141
|
isFree: m,
|
|
131
|
-
imageUrl:
|
|
132
|
-
sellerUuid:
|
|
133
|
-
location:
|
|
134
|
-
isSponsored:
|
|
135
|
-
imageComponent:
|
|
136
|
-
onSelectCard:
|
|
142
|
+
imageUrl: k,
|
|
143
|
+
sellerUuid: G,
|
|
144
|
+
location: N,
|
|
145
|
+
isSponsored: $,
|
|
146
|
+
imageComponent: g,
|
|
147
|
+
onSelectCard: b = () => {
|
|
137
148
|
},
|
|
138
|
-
freeText:
|
|
139
|
-
negotiableText:
|
|
149
|
+
freeText: y = "Free",
|
|
150
|
+
negotiableText: S = "Negotiable"
|
|
140
151
|
} = r;
|
|
141
152
|
return (
|
|
142
153
|
// <LandingPageProductCardSkeleton />
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
|
|
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__ */
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
|
|
149
|
-
l &&
|
|
150
|
-
|
|
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:
|
|
164
|
+
/* @__PURE__ */ e("div", { className: "location-text", children: N })
|
|
153
165
|
] }),
|
|
154
|
-
|
|
166
|
+
$ === !0 && /* @__PURE__ */ e(I, {})
|
|
155
167
|
] })
|
|
156
168
|
);
|
|
157
|
-
}),
|
|
169
|
+
}), T = p(({}, r) => /* @__PURE__ */ i(v, { className: "product-card", children: [
|
|
158
170
|
/* @__PURE__ */ e("img", { className: "skeleton-img" }),
|
|
159
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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
|
-
] })),
|
|
168
|
-
|
|
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:
|
|
182
|
+
isLoading: a
|
|
171
183
|
},
|
|
172
|
-
`${o}-skeleton-product-card-${
|
|
173
|
-
)) }),
|
|
184
|
+
`${o}-skeleton-product-card-${t}`
|
|
185
|
+
)) }), q = ({
|
|
174
186
|
children: r,
|
|
175
|
-
fallbackComponent:
|
|
187
|
+
fallbackComponent: a = /* @__PURE__ */ e(w, {}),
|
|
176
188
|
isLoading: o = !1,
|
|
177
189
|
limit: n,
|
|
178
|
-
keyPrefix:
|
|
179
|
-
}) => /* @__PURE__ */ e(
|
|
180
|
-
|
|
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:
|
|
196
|
+
keyPrefix: t
|
|
185
197
|
}
|
|
186
198
|
) : r });
|
|
187
199
|
export {
|
|
188
|
-
|
|
189
|
-
|
|
200
|
+
U as D,
|
|
201
|
+
q as S
|
|
190
202
|
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),d=require("react"),r=require("./utils-BOtq2mcF.cjs"),g=require("./emotion-styled.browser.esm-BtEseadx.cjs"),k=require("./index-XrPpEvxt.cjs"),y=require("./consts-goSZX3xP.cjs"),u=g.styled.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 0.5rem;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
|
|
7
|
+
& .wrapper-card-1 {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: 0.38rem;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
& .wrapper-card-2 {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
& img {
|
|
20
|
+
width: 100%;
|
|
21
|
+
aspect-ratio: 1 / 1; /* defining the aspect ratio of the image */
|
|
22
|
+
object-fit: cover; /* making sure the image isn't distorted */
|
|
23
|
+
border-radius: 0.75rem;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
& .card-title {
|
|
27
|
+
font-size: 0.875rem;
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
${r.truncateTextInRows(2)}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
& .price-text {
|
|
33
|
+
font-size: 1rem;
|
|
34
|
+
font-weight: 600;
|
|
35
|
+
${r.truncateText()}
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: end;
|
|
38
|
+
gap: 0.5rem;
|
|
39
|
+
& .full-price {
|
|
40
|
+
text-decoration: line-through;
|
|
41
|
+
font-size: 0.75rem;
|
|
42
|
+
font-weight: 400;
|
|
43
|
+
padding-bottom: 0.125rem;
|
|
44
|
+
color: var(--gray-600, #676e79);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
& .location-text {
|
|
49
|
+
font-size: 0.75rem;
|
|
50
|
+
font-weight: 400;
|
|
51
|
+
color: var(--gray-600, #676e79);
|
|
52
|
+
${r.truncateText()}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
& .tags-wrapper {
|
|
56
|
+
display: flex;
|
|
57
|
+
gap: 0.5rem;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&:hover {
|
|
61
|
+
& .card-title {
|
|
62
|
+
color: var(--primary-500, #f59e0b);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
& .skeleton-img {
|
|
67
|
+
background-color: ${r.linearGradientAnimation("-90deg")};
|
|
68
|
+
border-radius: 0.75rem;
|
|
69
|
+
border: 1px solid white;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
& .skeleton-title {
|
|
73
|
+
background-color: ${r.linearGradientAnimation("-90deg")};
|
|
74
|
+
width: 100%;
|
|
75
|
+
height: 2.5rem;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
& .skeleton-tags {
|
|
79
|
+
background-color: ${r.linearGradientAnimation("-90deg")};
|
|
80
|
+
width: 80%;
|
|
81
|
+
height: 1.5rem;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
& .skeleton-price {
|
|
85
|
+
background-color: ${r.linearGradientAnimation("-90deg")};
|
|
86
|
+
width: 50%;
|
|
87
|
+
height: 2.5rem;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
& .skeleton-sponsored {
|
|
91
|
+
background-color: ${r.linearGradientAnimation("-90deg")};
|
|
92
|
+
width: 50%;
|
|
93
|
+
height: 1rem;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@media (max-width: ${y.MOBILE_SIZE_PX+"px"}) {
|
|
97
|
+
& img {
|
|
98
|
+
width: 8.875rem;
|
|
99
|
+
height: 8.875rem;
|
|
100
|
+
min-width: 8.875rem;
|
|
101
|
+
min-height: 8.875rem;
|
|
102
|
+
min-width: 8.875rem;
|
|
103
|
+
min-height: 8.875rem;
|
|
104
|
+
object-fit: cover;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
& .price-text {
|
|
108
|
+
font-size: 0.875rem;
|
|
109
|
+
font-weight: 600;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
`,N=g.styled.div`
|
|
113
|
+
display: flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
gap: 0.25rem;
|
|
116
|
+
color: var(--gray-500);
|
|
117
|
+
font-size: 0.75rem;
|
|
118
|
+
font-weight: 500;
|
|
119
|
+
|
|
120
|
+
& i {
|
|
121
|
+
font-size: 1rem;
|
|
122
|
+
color: var(--warning-500, #F59E0B);
|
|
123
|
+
}
|
|
124
|
+
`,b=d.forwardRef(({sponsoredText:t="Sponsored"},s)=>e.jsxs(N,{ref:s,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:t})]})),$=d.forwardRef((t,s)=>{const{uuid:a,title:n,price:i=0,sellingPrice:o,currency:c,isNegotiable:l,isFree:m,imageUrl:h,sellerUuid:z,location:x,isSponsored:f,imageComponent:p,onSelectCard:w=()=>{},freeText:j="Free",negotiableText:v="Negotiable"}=t;return e.jsxs(u,{className:"product-card",onClick:w,children:[r.isDefined(p)?p:e.jsx(k.ProductImageWrapper,{src:h}),e.jsx("div",{className:"wrapper-card-1",children:e.jsx("div",{className:"card-title",children:n})}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:"price-text",children:[o>0&&c&&l!==!0&&m!==!0&&e.jsx("div",{children:`${r.formatPrice(o)} ${r.GetCurrencySymbol(c)}`}),i>0&&c&&l!==!0&&m!==!0&&i!==o&&e.jsx("div",{className:`${o>0?"full-price":""}`,children:`${r.formatPrice(i)} ${r.GetCurrencySymbol(c)}`}),l&&v,m&&j]}),e.jsx("div",{className:"location-text",children:x})]}),f===!0&&e.jsx(b,{})]})}),S=d.forwardRef(({},t)=>e.jsxs(u,{className:"product-card",children:[e.jsx("img",{className:"skeleton-img"}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"skeleton-title"}),e.jsx("div",{className:"skeleton-tags"})]}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"skeleton-price"}),e.jsx("div",{className:"skeleton-sponsored"})]})]})),P=({limit:t=5,isLoading:s=!1,keyPrefix:a})=>e.jsx(e.Fragment,{children:Array.from({length:t},(n,i)=>e.jsx(S,{isLoading:s},`${a}-skeleton-product-card-${i}`))}),C=({children:t,fallbackComponent:s=e.jsx(e.Fragment,{}),isLoading:a=!1,limit:n,keyPrefix:i})=>e.jsx(d.Suspense,{fallbackComponent:s,children:a===!0?e.jsx(P,{isLoading:a,limit:n,keyPrefix:i}):t});exports.DetailedProductCard=$;exports.SuspenseDetailedProductCard=C;
|