@lanaco/lnc-react-ui 4.0.160 → 4.0.162

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 (43) hide show
  1. package/dist/BlogCardsSponsoredSection.cjs +4 -2
  2. package/dist/BlogCardsSponsoredSection.js +4 -2
  3. package/dist/BlogListSection.cjs +1 -1
  4. package/dist/BlogListSection.js +1 -1
  5. package/dist/BlogsSectionDetailed.cjs +1 -1
  6. package/dist/BlogsSectionDetailed.js +1 -1
  7. package/dist/BlogsSectionSimple.cjs +1 -1
  8. package/dist/BlogsSectionSimple.js +1 -1
  9. package/dist/BlogsSectionWithFilters.cjs +1 -1
  10. package/dist/BlogsSectionWithFilters.js +2 -2
  11. package/dist/DetailedProductsInfinitiveSection.cjs +2 -0
  12. package/dist/DetailedProductsInfinitiveSection.js +2 -0
  13. package/dist/DetailedProductsSection.cjs +1 -1
  14. package/dist/DetailedProductsSection.js +2 -2
  15. package/dist/FieldOfInterestsMasonrySection.cjs +20 -12
  16. package/dist/FieldOfInterestsMasonrySection.js +35 -27
  17. package/dist/FieldOfInterestsWithTagsCardsSection.cjs +2 -0
  18. package/dist/FieldOfInterestsWithTagsCardsSection.js +5 -3
  19. package/dist/GiftCardsSection.cjs +1 -1
  20. package/dist/GiftCardsSection.js +1 -1
  21. package/dist/LocationSearchSection.cjs +1 -1
  22. package/dist/LocationSearchSection.js +1 -1
  23. package/dist/MasonryGeneralCardsSection.cjs +1 -3
  24. package/dist/MasonryGeneralCardsSection.js +9 -11
  25. package/dist/ProductsWithBannerSection.cjs +17 -24
  26. package/dist/ProductsWithBannerSection.js +60 -67
  27. package/dist/QuattroCardsSection.cjs +2 -0
  28. package/dist/QuattroCardsSection.js +2 -0
  29. package/dist/SalesCampaignsSection.cjs +35 -33
  30. package/dist/SalesCampaignsSection.js +272 -249
  31. package/dist/ShopCardsSection.cjs +3 -1
  32. package/dist/ShopCardsSection.js +2 -0
  33. package/dist/SimpleCategoriesSection.cjs +1 -1
  34. package/dist/SimpleCategoriesSection.js +1 -1
  35. package/dist/index-Be-_NM9Q.cjs +4 -0
  36. package/dist/index-BvQx3xAm.cjs +95 -0
  37. package/dist/index-C0LcDEqa.js +47 -0
  38. package/dist/index-dXWRbvgi.js +345 -0
  39. package/dist/{style-BLuyU97E.js → style-DKAOBWn3.js} +1 -0
  40. package/dist/{style-lSjkOR95.cjs → style-Db3VFbfP.cjs} +1 -0
  41. package/package.json +1 -1
  42. package/dist/index-D0xXo7W6.cjs +0 -98
  43. package/dist/index-Dweo-G3H.js +0 -384
@@ -84,6 +84,8 @@
84
84
  }
85
85
 
86
86
  @media (max-width: ${S.MOBILE_SIZE_PX+"px"}) {
87
+ gap: 1.25rem;
88
+
87
89
  & .wrapper__view-all {
88
90
  display: unset;
89
91
  }
@@ -126,4 +128,4 @@
126
128
  }`}
127
129
  }
128
130
  }
129
- `,q=d.forwardRef(({title:i,subtitle:o,items:n,limit:g=4,limitForMobile:w=2,buttonText:a="Show More",onSelectCard:f=()=>{},onButtonAction:l=()=>{},icon:p,getImage:h=()=>{},getProductImage:x=()=>{},hideProducts:y=!1,showRating:c=!0,gridView:r=!1,componentName:v},b)=>{var m;return t.jsxs(N,{ref:b,limitCards:g,limitCardsForMobile:w,gridView:r,children:[t.jsxs("div",{className:"wrapper__heading",children:[t.jsxs("div",{className:"wrapper__title",children:[i&&t.jsxs("div",{className:"title__text",children:[C.isDefinedNotEmptyString(p)&&t.jsx("i",{className:p}),t.jsx("span",{children:i})]}),l&&t.jsx(u,{text:a,color:"neutral",borderRadius:"curved",btnType:"tinted",className:`title__action ${r?"grid":""}`,onClick:l})]}),o&&t.jsx("div",{className:"wrapper__subtitle",children:o})]}),t.jsx("div",{className:"wrapper__cards",children:n&&(n==null?void 0:n.length)>0?n==null?void 0:n.map((e,s)=>t.jsx(_.ShopCard,{showRating:c,uuid:e==null?void 0:e.uuid,title:e==null?void 0:e.name,subtitle:e==null?void 0:e.shortDescription,rating:e==null?void 0:e.ratingArithmeticMean,reviewCount:e==null?void 0:e.reviewCount,products:e==null?void 0:e.products,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:($,j)=>f(e==null?void 0:e.uuid,j),image:h(e==null?void 0:e.profileImage,e==null?void 0:e.uuid)||null,getProductImage:x,canAcceptPayments:e==null?void 0:e.canAcceptPayments,hideProducts:y,metadata:{name:v,accessor:e==null?void 0:e.accessor}},`shop-card__${s+1}`)):(m=Array.from("1234"))==null?void 0:m.map((e,s)=>t.jsx(_.ShopCardSkeleton,{},`shop-card-skeleton__${s+1}`))}),r&&l&&t.jsx(u,{text:a,borderRadius:"curved",btnType:"basic",color:"neutral",className:"wrapper__view-all",onClick:l})]})});module.exports=q;
131
+ `,q=d.forwardRef(({title:i,subtitle:o,items:n,limit:g=4,limitForMobile:w=2,buttonText:a="Show More",onSelectCard:f=()=>{},onButtonAction:r=()=>{},icon:p,getImage:h=()=>{},getProductImage:x=()=>{},hideProducts:y=!1,showRating:c=!0,gridView:l=!1,componentName:v},b)=>{var m;return t.jsxs(N,{ref:b,limitCards:g,limitCardsForMobile:w,gridView:l,children:[t.jsxs("div",{className:"wrapper__heading",children:[t.jsxs("div",{className:"wrapper__title",children:[i&&t.jsxs("div",{className:"title__text",children:[C.isDefinedNotEmptyString(p)&&t.jsx("i",{className:p}),t.jsx("span",{children:i})]}),r&&t.jsx(u,{text:a,color:"neutral",borderRadius:"curved",btnType:"tinted",className:`title__action ${l?"grid":""}`,onClick:r})]}),o&&t.jsx("div",{className:"wrapper__subtitle",children:o})]}),t.jsx("div",{className:"wrapper__cards",children:n&&(n==null?void 0:n.length)>0?n==null?void 0:n.map((e,s)=>t.jsx(_.ShopCard,{showRating:c,uuid:e==null?void 0:e.uuid,title:e==null?void 0:e.name,subtitle:e==null?void 0:e.shortDescription,rating:e==null?void 0:e.ratingArithmeticMean,reviewCount:e==null?void 0:e.reviewCount,products:e==null?void 0:e.products,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:($,j)=>f(e==null?void 0:e.uuid,j),image:h(e==null?void 0:e.profileImage,e==null?void 0:e.uuid)||null,getProductImage:x,canAcceptPayments:e==null?void 0:e.canAcceptPayments,hideProducts:y,metadata:{name:v,accessor:e==null?void 0:e.accessor}},`shop-card__${s+1}`)):(m=Array.from("1234"))==null?void 0:m.map((e,s)=>t.jsx(_.ShopCardSkeleton,{},`shop-card-skeleton__${s+1}`))}),l&&r&&t.jsx(u,{text:a,borderRadius:"curved",btnType:"basic",color:"neutral",className:"wrapper__view-all",onClick:r})]})});module.exports=q;
@@ -91,6 +91,8 @@ const j = $.div`
91
91
  }
92
92
 
93
93
  @media (max-width: ${M + "px"}) {
94
+ gap: 1.25rem;
95
+
94
96
  & .wrapper__view-all {
95
97
  display: unset;
96
98
  }
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("react/jsx-runtime"),s=require("react"),w=require("./emotion-styled.browser.esm-BtEseadx.cjs"),C=require("./consts-goSZX3xP.cjs"),q=require("./useDetectMobile-zkbzoOGV.cjs"),d=require("./utils-Dl9xPH4c.cjs"),k=require("./style-lSjkOR95.cjs"),v=require("./Button.cjs"),p=require("./suspense-categories-card-simple-CjGtzfzp.cjs"),M=w.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),s=require("react"),w=require("./emotion-styled.browser.esm-BtEseadx.cjs"),C=require("./consts-goSZX3xP.cjs"),q=require("./useDetectMobile-zkbzoOGV.cjs"),d=require("./utils-Dl9xPH4c.cjs"),k=require("./style-Db3VFbfP.cjs"),v=require("./Button.cjs"),p=require("./suspense-categories-card-simple-CjGtzfzp.cjs"),M=w.styled.div`
2
2
  display: grid;
3
3
  grid-template-columns: ${a=>"repeat(6, minmax(0, 1fr))"};
4
4
  gap: 2rem;
@@ -4,7 +4,7 @@ import { s as M } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
4
  import { M as N } from "./consts-BuFChS64.js";
5
5
  import { u as E } from "./useDetectMobile-Bkvj0VMa.js";
6
6
  import { k as p } from "./utils-BdsZgOUE.js";
7
- import { R as I } from "./style-BLuyU97E.js";
7
+ import { R as I } from "./style-DKAOBWn3.js";
8
8
  import R from "./Button.js";
9
9
  import { C as B, S as L } from "./suspense-categories-card-simple-BGj475Ca.js";
10
10
  const P = M.div`
@@ -0,0 +1,4 @@
1
+ "use strict";const d=require("react/jsx-runtime"),t=require("react"),l=require("./index-BpbMKBf_.cjs"),a=require("./emotion-styled.browser.esm-BtEseadx.cjs"),p=require("./useUpdateEffect-BtMgpgIV.cjs"),m=s=>{const[i,n]=t.useState(!1),e=t.useMemo(()=>new IntersectionObserver(([r])=>n(r.isIntersecting)),[]);return t.useEffect(()=>(e.observe(s.current),()=>{e.disconnect()}),[s,e]),i},I=a.styled.div`
2
+ min-height: 1px;
3
+ ${s=>s.isHorizontal===!0?"min-width: 1px; width: 1px;":"width: 100%;"}
4
+ `,u=t.forwardRef((s,i)=>{const{onIsVisible:n=()=>{},onIsNotVisible:e,isHorizontal:r=!1,className:f=""}=s,o=t.useRef(null),c=m(o);return p.useUpdateEffect(()=>{c?n():e==null||e()},[c]),d.jsx(I,{ref:o,className:`scroller-element ${f}`,isHorizontal:r})});u.propTypes={onIsVisible:l.PropTypes.func,isHorizontal:l.PropTypes.bool};exports.InfiniteScrollEndElement=u;
@@ -0,0 +1,95 @@
1
+ "use strict";const l=require("react/jsx-runtime"),n=require("react"),r=require("./index-BpbMKBf_.cjs"),V=require("./FlexBox.cjs"),R=require("./IconButton.cjs"),_=require("./ThemeProvider.cjs"),z=require("./emotion-styled.browser.esm-BtEseadx.cjs"),E=require("./consts-goSZX3xP.cjs"),D=require("./useDetectMobile-zkbzoOGV.cjs"),K=require("./index-Be-_NM9Q.cjs"),O=require("./Button.cjs"),F=require("./Icon.cjs"),G=require("./utils-Dl9xPH4c.cjs"),X=z.styled.div`
2
+ position: relative;
3
+ padding: ${e=>e.padding};
4
+
5
+ & button {
6
+ white-space: nowrap;
7
+ }
8
+
9
+ & .badge-button {
10
+ ${e=>e.showTimesBtn===!0&&"padding-left: 0.5rem; padding-right: 0.5rem;"}
11
+ }
12
+
13
+ & .gradient {
14
+ position: absolute;
15
+ top: 50%;
16
+ transform: translate(0, -50%);
17
+ z-index: 4;
18
+ transition: ${"0.3s"};
19
+ right: ${e=>e.noArrows!==!0?"6rem":"0"};
20
+ width: 2rem;
21
+ background: #fff;
22
+ height: 100%;
23
+ -webkit-mask-image: linear-gradient(to left, black 10%, transparent 50%);
24
+ mask-image: linear-gradient(to left, black 10%, transparent 50%);
25
+ }
26
+
27
+ & .scrollable-container {
28
+ max-width: -webkit-fill-available;
29
+ max-width: -moz-available; /* WebKit-based browsers will ignore this. */
30
+ max-width: fill-available;
31
+
32
+ ${e=>e.rightAlignArrows===!0&&e.noArrows!==!0&&"margin-right: 6rem"};
33
+ scroll-behavior: smooth;
34
+ overflow: hidden;
35
+ -webkit-overflow-scrolling: touch;
36
+ ::-webkit-scrollbar {
37
+ -webkit-appearance: none;
38
+ }
39
+ -ms-overflow-style: none;
40
+ /* Internet Explorer 10+ */
41
+ scrollbar-width: none;
42
+ /* Firefox */
43
+
44
+ &::-webkit-scrollbar {
45
+ display: none;
46
+ /* Safari and Chrome */
47
+ }
48
+
49
+ @media (max-width: ${E.MOBILE_SIZE_PX+"px"}) {
50
+ margin-right: 0;
51
+ }
52
+ }
53
+ & .scroll-arrow-right,
54
+ & .scroll-arrow-left {
55
+ position: absolute;
56
+ top: 50%;
57
+ transform: translate(0, -50%);
58
+ display: flex;
59
+ justify-content: center;
60
+ align-items: center;
61
+ cursor: pointer;
62
+
63
+ visibility: ${e=>e.arrowsVisibleOnHover===!1&&e.hasOverflow?"visible":"hidden"};
64
+ z-index: 4;
65
+ transition: ${"0.3s"};
66
+ }
67
+ & .scroll-arrow-right {
68
+ ${e=>e.rightAlignArrows===!0?"right: 0":"right: 0.7rem"};
69
+ }
70
+ & .scroll-arrow-left {
71
+ ${e=>e.rightAlignArrows===!0?"right: 2.625rem":"left: 0.7rem"};
72
+ }
73
+ & .scrollable-container:hover > .scroll-arrow-left,
74
+ & .scrollable-container:hover > .scroll-arrow-right {
75
+ visibility: ${e=>e.hasOverflow?"visible":"hidden"};
76
+ }
77
+
78
+ @media (max-width: ${E.MOBILE_SIZE_PX+"px"}) {
79
+ & .scrollable-container {
80
+ overflow: auto;
81
+ }
82
+ & .scroll-arrow-left,
83
+ & .scroll-arrow-right {
84
+ display: none;
85
+ }
86
+
87
+ & .gradient {
88
+ right: 0;
89
+ }
90
+
91
+ & .scrollable-container button:nth-of-type(3) {
92
+ ${e=>e.noMargin!==!0&&"margin-left: 1rem"};
93
+ }
94
+ }
95
+ `,W=n.forwardRef(({columnGap:e="2rem",rowGap:w="1.25rem",scrollBySize:u=300,wrapForMobile:y=!1,wrap:a=!1,children:p,methodsRef:b,arrowsVisibleOnHover:T=!0,rightAlignArrows:v=!1,padding:f="0",showTimesBtn:h,noArrows:c,noGradient:x=!1,hideDisabledArrows:d=!1,noMargin:g=!1,...P},S)=>{const k=D.useDetectMobile(),{theme:o}=_.useTheme(),[t,j]=n.useState(!1),[m,N]=n.useState(!1),[H,I]=n.useState(!0),s=n.useRef(),q=()=>{var i;(i=s.current)==null||i.scrollBy(u,0)},B=()=>{var i;(i=s.current)==null||i.scrollBy(-u,0)},[$,L]=n.useState(!1);n.useEffect(()=>{var i,A;L(((i=s==null?void 0:s.current)==null?void 0:i.scrollWidth)>((A=s==null?void 0:s.current)==null?void 0:A.clientWidth))},[p]),n.useImperativeHandle(b,()=>({scrollToEnd(){M()},scrollLeft(){B()},scrollRight(){q()}}));const M=()=>{s.current.scrollLeft=s.current.scrollWidth};return l.jsx(X,{ref:S,arrowsVisibleOnHover:T,hasOverflow:$,noArrows:c,padding:f,rightAlignArrows:v,showTimesBtn:h,theme:o,noMargin:g,...P,children:l.jsxs(V,{ref:s,className:"scrollable-container",columnGap:e,rowGap:w,wrap:a||y&&k?"Wrap":"NoWrap",children:[c!==!0&&l.jsxs(l.Fragment,{children:[!(d===!0&&m===!0)&&l.jsx(R,{borderRadius:"curved",btnType:"tinted",className:"scroll-arrow-left",color:"neutral",disabled:m,icon:"angle-left",onClick:B}),!(d===!0&&t===!0)&&l.jsx(R,{borderRadius:"curved",btnType:"tinted",className:"scroll-arrow-right",color:"neutral",disabled:t,icon:"angle-right",onClick:q})]}),l.jsx(K.InfiniteScrollEndElement,{isHorizontal:!0,onIsNotVisible:()=>{m===!0&&N(!1)},onIsVisible:()=>{m===!1&&N(!0)}}),p,l.jsx(K.InfiniteScrollEndElement,{className:"right-scroller",isHorizontal:!0,onIsNotVisible:()=>{t===!0&&j(!1),I(!0)},onIsVisible:()=>{t===!1&&j(!0),I(!1)}}),H&&$&&x!==!0&&l.jsx("div",{className:"gradient"})]})})});W.propTypes={title:r.PropTypes.string,rowGap:r.PropTypes.string,columnGap:r.PropTypes.string,scrollBySize:r.PropTypes.number,wrapForMobile:r.PropTypes.bool,wrap:r.PropTypes.bool,methodsRef:r.PropTypes.any,arrowsVisibleOnHover:r.PropTypes.bool,rightAlignArrows:r.PropTypes.bool,padding:r.PropTypes.string};const C=n.forwardRef((e,w)=>{const{allButton:u=!0,items:y=[],selectedIds:a=[],onSelect:p=()=>{},onRemove:b=()=>{},onSelectAll:T=()=>{},className:v,showTimesBtn:f=!1,labelKey:h="label",valueKey:c="value",codeKey:x="code",uniqueKey:d,typeKey:g,productsToolbarName:P="All",...S}=e,k=(o,t)=>{a!=null&&a.includes(t)?b(o,t):p(o,t)};return l.jsxs(W,{ref:w,arrowsVisibleOnHover:!1,className:v,columnGap:"0.75rem",padding:"0.25rem 0",rightAlignArrows:!0,showTimesBtn:f,...S,children:[u&&l.jsx(O,{borderRadius:"curved",btnType:a.length===0?"filled":"tinted",className:"badge-button",color:"neutral",onClick:T,children:P}),y.map((o,t)=>l.jsxs(O,{borderRadius:"curved",btnType:a.includes(o.uuid)?"filled":"tinted",className:"badge-button",color:"neutral",onClick:()=>k(o,o[c]),children:[G.isDefined(o==null?void 0:o.icon)&&l.jsxs(l.Fragment,{children:[l.jsx("i",{className:o==null?void 0:o.icon})," "]}),o[h],f===!0&&l.jsx(F,{className:"times-btn",icon:"times",sizeInUnits:"0.75rem",onClick:()=>b(o[c],o[h],o[x],d?o[d]:null,g?o[g]:null)})]},t))]})});C.propTypes={allButton:r.PropTypes.bool,items:r.PropTypes.array,selectedIds:r.PropTypes.array,onSelect:r.PropTypes.func,onRemove:r.PropTypes.func,onSelectAll:r.PropTypes.func,className:r.PropTypes.string,showTimesBtn:r.PropTypes.bool,valuKey:r.PropTypes.string,labelKey:r.PropTypes.string,codeKey:r.PropTypes.string};exports.SelectBar=C;
@@ -0,0 +1,47 @@
1
+ import { jsx as f } from "react/jsx-runtime";
2
+ import { useState as m, useMemo as a, useEffect as p, forwardRef as u, useRef as d } from "react";
3
+ import { P as c } from "./index-CblbdqjE.js";
4
+ import { s as I } from "./emotion-styled.browser.esm-BNN1dTl3.js";
5
+ import { u as b } from "./useUpdateEffect-CuYWz7EA.js";
6
+ const w = (s) => {
7
+ const [n, t] = m(!1), e = a(
8
+ () => new IntersectionObserver(
9
+ ([r]) => t(r.isIntersecting)
10
+ ),
11
+ []
12
+ );
13
+ return p(() => (e.observe(s.current), () => {
14
+ e.disconnect();
15
+ }), [s, e]), n;
16
+ }, h = I.div`
17
+ min-height: 1px;
18
+ ${(s) => s.isHorizontal === !0 ? "min-width: 1px; width: 1px;" : "width: 100%;"}
19
+ `, v = u((s, n) => {
20
+ const {
21
+ onIsVisible: t = () => {
22
+ },
23
+ onIsNotVisible: e,
24
+ isHorizontal: r = !1,
25
+ className: l = ""
26
+ } = s, o = d(null), i = w(o);
27
+ return b(() => {
28
+ i ? t() : e == null || e();
29
+ }, [i]), /* @__PURE__ */ f(
30
+ h,
31
+ {
32
+ ref: o,
33
+ className: `scroller-element ${l}`,
34
+ isHorizontal: r
35
+ }
36
+ );
37
+ });
38
+ v.propTypes = {
39
+ onIsVisible: c.func,
40
+ /**
41
+ * For horizontal scroll InfiniteScrollEndElement has to have some widh otherwise it won't ever be visible and trigger onIsVisible callback
42
+ */
43
+ isHorizontal: c.bool
44
+ };
45
+ export {
46
+ v as I
47
+ };
@@ -0,0 +1,345 @@
1
+ import { jsx as i, jsxs as d, Fragment as z } from "react/jsx-runtime";
2
+ import _, { useState as w, useRef as F, useEffect as j, useImperativeHandle as P, forwardRef as q } from "react";
3
+ import { P as r } from "./index-CblbdqjE.js";
4
+ import U from "./FlexBox.js";
5
+ import W from "./IconButton.js";
6
+ import { useTheme as X } from "./ThemeProvider.js";
7
+ import { s as Z } from "./emotion-styled.browser.esm-BNN1dTl3.js";
8
+ import { M as C } from "./consts-BuFChS64.js";
9
+ import { u as J } from "./useDetectMobile-Bkvj0VMa.js";
10
+ import { I as H } from "./index-C0LcDEqa.js";
11
+ import V from "./Button.js";
12
+ import Q from "./Icon.js";
13
+ import { l as Y } from "./utils-BdsZgOUE.js";
14
+ const ee = Z.div`
15
+ position: relative;
16
+ padding: ${(e) => e.padding};
17
+
18
+ & button {
19
+ white-space: nowrap;
20
+ }
21
+
22
+ & .badge-button {
23
+ ${(e) => e.showTimesBtn === !0 && "padding-left: 0.5rem; padding-right: 0.5rem;"}
24
+ }
25
+
26
+ & .gradient {
27
+ position: absolute;
28
+ top: 50%;
29
+ transform: translate(0, -50%);
30
+ z-index: 4;
31
+ transition: ${"0.3s"};
32
+ right: ${(e) => e.noArrows !== !0 ? "6rem" : "0"};
33
+ width: 2rem;
34
+ background: #fff;
35
+ height: 100%;
36
+ -webkit-mask-image: linear-gradient(to left, black 10%, transparent 50%);
37
+ mask-image: linear-gradient(to left, black 10%, transparent 50%);
38
+ }
39
+
40
+ & .scrollable-container {
41
+ max-width: -webkit-fill-available;
42
+ max-width: -moz-available; /* WebKit-based browsers will ignore this. */
43
+ max-width: fill-available;
44
+
45
+ ${(e) => e.rightAlignArrows === !0 && e.noArrows !== !0 && "margin-right: 6rem"};
46
+ scroll-behavior: smooth;
47
+ overflow: hidden;
48
+ -webkit-overflow-scrolling: touch;
49
+ ::-webkit-scrollbar {
50
+ -webkit-appearance: none;
51
+ }
52
+ -ms-overflow-style: none;
53
+ /* Internet Explorer 10+ */
54
+ scrollbar-width: none;
55
+ /* Firefox */
56
+
57
+ &::-webkit-scrollbar {
58
+ display: none;
59
+ /* Safari and Chrome */
60
+ }
61
+
62
+ @media (max-width: ${C + "px"}) {
63
+ margin-right: 0;
64
+ }
65
+ }
66
+ & .scroll-arrow-right,
67
+ & .scroll-arrow-left {
68
+ position: absolute;
69
+ top: 50%;
70
+ transform: translate(0, -50%);
71
+ display: flex;
72
+ justify-content: center;
73
+ align-items: center;
74
+ cursor: pointer;
75
+
76
+ visibility: ${(e) => e.arrowsVisibleOnHover === !1 && e.hasOverflow ? "visible" : "hidden"};
77
+ z-index: 4;
78
+ transition: ${"0.3s"};
79
+ }
80
+ & .scroll-arrow-right {
81
+ ${(e) => e.rightAlignArrows === !0 ? "right: 0" : "right: 0.7rem"};
82
+ }
83
+ & .scroll-arrow-left {
84
+ ${(e) => e.rightAlignArrows === !0 ? "right: 2.625rem" : "left: 0.7rem"};
85
+ }
86
+ & .scrollable-container:hover > .scroll-arrow-left,
87
+ & .scrollable-container:hover > .scroll-arrow-right {
88
+ visibility: ${(e) => e.hasOverflow ? "visible" : "hidden"};
89
+ }
90
+
91
+ @media (max-width: ${C + "px"}) {
92
+ & .scrollable-container {
93
+ overflow: auto;
94
+ }
95
+ & .scroll-arrow-left,
96
+ & .scroll-arrow-right {
97
+ display: none;
98
+ }
99
+
100
+ & .gradient {
101
+ right: 0;
102
+ }
103
+
104
+ & .scrollable-container button:nth-of-type(3) {
105
+ ${(e) => e.noMargin !== !0 && "margin-left: 1rem"};
106
+ }
107
+ }
108
+ `, L = _.forwardRef(
109
+ ({
110
+ columnGap: e = "2rem",
111
+ rowGap: v = "1.25rem",
112
+ scrollBySize: f = 300,
113
+ wrapForMobile: y = !1,
114
+ wrap: a = !1,
115
+ children: u,
116
+ methodsRef: b,
117
+ arrowsVisibleOnHover: k = !0,
118
+ rightAlignArrows: x = !1,
119
+ padding: m = "0",
120
+ showTimesBtn: h,
121
+ noArrows: n,
122
+ noGradient: S = !1,
123
+ hideDisabledArrows: c = !1,
124
+ noMargin: g = !1,
125
+ ...N
126
+ }, T) => {
127
+ const $ = J(), { theme: l } = X(), [t, A] = w(!1), [p, B] = w(!1), [M, I] = w(!0), o = F(), R = () => {
128
+ var s;
129
+ (s = o.current) == null || s.scrollBy(f, 0);
130
+ }, K = () => {
131
+ var s;
132
+ (s = o.current) == null || s.scrollBy(-f, 0);
133
+ }, [E, D] = w(!1);
134
+ j(() => {
135
+ var s, O;
136
+ D(
137
+ ((s = o == null ? void 0 : o.current) == null ? void 0 : s.scrollWidth) > ((O = o == null ? void 0 : o.current) == null ? void 0 : O.clientWidth)
138
+ );
139
+ }, [u]), P(b, () => ({
140
+ scrollToEnd() {
141
+ G();
142
+ },
143
+ scrollLeft() {
144
+ K();
145
+ },
146
+ scrollRight() {
147
+ R();
148
+ }
149
+ }));
150
+ const G = () => {
151
+ o.current.scrollLeft = o.current.scrollWidth;
152
+ };
153
+ return /* @__PURE__ */ i(
154
+ ee,
155
+ {
156
+ ref: T,
157
+ arrowsVisibleOnHover: k,
158
+ hasOverflow: E,
159
+ noArrows: n,
160
+ padding: m,
161
+ rightAlignArrows: x,
162
+ showTimesBtn: h,
163
+ theme: l,
164
+ noMargin: g,
165
+ ...N,
166
+ children: /* @__PURE__ */ d(
167
+ U,
168
+ {
169
+ ref: o,
170
+ className: "scrollable-container",
171
+ columnGap: e,
172
+ rowGap: v,
173
+ wrap: a || y && $ ? "Wrap" : "NoWrap",
174
+ children: [
175
+ n !== !0 && /* @__PURE__ */ d(z, { children: [
176
+ !(c === !0 && p === !0) && /* @__PURE__ */ i(
177
+ W,
178
+ {
179
+ borderRadius: "curved",
180
+ btnType: "tinted",
181
+ className: "scroll-arrow-left",
182
+ color: "neutral",
183
+ disabled: p,
184
+ icon: "angle-left",
185
+ onClick: K
186
+ }
187
+ ),
188
+ !(c === !0 && t === !0) && /* @__PURE__ */ i(
189
+ W,
190
+ {
191
+ borderRadius: "curved",
192
+ btnType: "tinted",
193
+ className: "scroll-arrow-right",
194
+ color: "neutral",
195
+ disabled: t,
196
+ icon: "angle-right",
197
+ onClick: R
198
+ }
199
+ )
200
+ ] }),
201
+ /* @__PURE__ */ i(
202
+ H,
203
+ {
204
+ isHorizontal: !0,
205
+ onIsNotVisible: () => {
206
+ p === !0 && B(!1);
207
+ },
208
+ onIsVisible: () => {
209
+ p === !1 && B(!0);
210
+ }
211
+ }
212
+ ),
213
+ u,
214
+ /* @__PURE__ */ i(
215
+ H,
216
+ {
217
+ className: "right-scroller",
218
+ isHorizontal: !0,
219
+ onIsNotVisible: () => {
220
+ t === !0 && A(!1), I(!0);
221
+ },
222
+ onIsVisible: () => {
223
+ t === !1 && A(!0), I(!1);
224
+ }
225
+ }
226
+ ),
227
+ M && E && S !== !0 && /* @__PURE__ */ i("div", { className: "gradient" })
228
+ ]
229
+ }
230
+ )
231
+ }
232
+ );
233
+ }
234
+ );
235
+ L.propTypes = {
236
+ title: r.string,
237
+ rowGap: r.string,
238
+ columnGap: r.string,
239
+ scrollBySize: r.number,
240
+ wrapForMobile: r.bool,
241
+ wrap: r.bool,
242
+ methodsRef: r.any,
243
+ arrowsVisibleOnHover: r.bool,
244
+ rightAlignArrows: r.bool,
245
+ padding: r.string
246
+ };
247
+ const re = q((e, v) => {
248
+ const {
249
+ allButton: f = !0,
250
+ items: y = [],
251
+ selectedIds: a = [],
252
+ onSelect: u = () => {
253
+ },
254
+ onRemove: b = () => {
255
+ },
256
+ onSelectAll: k = () => {
257
+ },
258
+ className: x,
259
+ showTimesBtn: m = !1,
260
+ labelKey: h = "label",
261
+ valueKey: n = "value",
262
+ codeKey: S = "code",
263
+ uniqueKey: c,
264
+ typeKey: g,
265
+ productsToolbarName: N = "All",
266
+ ...T
267
+ } = e, $ = (l, t) => {
268
+ a != null && a.includes(t) ? b(l, t) : u(l, t);
269
+ };
270
+ return /* @__PURE__ */ d(
271
+ L,
272
+ {
273
+ ref: v,
274
+ arrowsVisibleOnHover: !1,
275
+ className: x,
276
+ columnGap: "0.75rem",
277
+ padding: "0.25rem 0",
278
+ rightAlignArrows: !0,
279
+ showTimesBtn: m,
280
+ ...T,
281
+ children: [
282
+ f && /* @__PURE__ */ i(
283
+ V,
284
+ {
285
+ borderRadius: "curved",
286
+ btnType: a.length === 0 ? "filled" : "tinted",
287
+ className: "badge-button",
288
+ color: "neutral",
289
+ onClick: k,
290
+ children: N
291
+ }
292
+ ),
293
+ y.map((l, t) => /* @__PURE__ */ d(
294
+ V,
295
+ {
296
+ borderRadius: "curved",
297
+ btnType: a.includes(l.uuid) ? "filled" : "tinted",
298
+ className: "badge-button",
299
+ color: "neutral",
300
+ onClick: () => $(l, l[n]),
301
+ children: [
302
+ Y(l == null ? void 0 : l.icon) && /* @__PURE__ */ d(z, { children: [
303
+ /* @__PURE__ */ i("i", { className: l == null ? void 0 : l.icon }),
304
+ " "
305
+ ] }),
306
+ l[h],
307
+ m === !0 && /* @__PURE__ */ i(
308
+ Q,
309
+ {
310
+ className: "times-btn",
311
+ icon: "times",
312
+ sizeInUnits: "0.75rem",
313
+ onClick: () => b(
314
+ l[n],
315
+ l[h],
316
+ l[S],
317
+ c ? l[c] : null,
318
+ g ? l[g] : null
319
+ )
320
+ }
321
+ )
322
+ ]
323
+ },
324
+ t
325
+ ))
326
+ ]
327
+ }
328
+ );
329
+ });
330
+ re.propTypes = {
331
+ allButton: r.bool,
332
+ items: r.array,
333
+ selectedIds: r.array,
334
+ onSelect: r.func,
335
+ onRemove: r.func,
336
+ onSelectAll: r.func,
337
+ className: r.string,
338
+ showTimesBtn: r.bool,
339
+ valuKey: r.string,
340
+ labelKey: r.string,
341
+ codeKey: r.string
342
+ };
343
+ export {
344
+ re as S
345
+ };
@@ -78,6 +78,7 @@ const o = a.div`
78
78
  @media (max-width: ${t + "px"}) {
79
79
  & .regular-title {
80
80
  font-size: 1.375rem;
81
+ padding-bottom: 0.5rem;
81
82
  }
82
83
  }
83
84
  `, i = (e) => (e == null ? void 0 : e.toLowerCase()) == "success" ? "color: var(--success-700, #047857); border: 1px solid var(--success-600, #059669); background-color: var(--sucess-60008, #05966914);" : (e == null ? void 0 : e.toLowerCase()) == "warning" ? "color: var(--warning-600, #d97706); border: 1px solid var(--warning-500, #f59e0b); background-color: var(--warning-50012, #f59e0b1f);" : (e == null ? void 0 : e.toLowerCase()) == "info" ? "color: var(--info-700, #6d28d9); border: 1px solid var(--info-600, #7c3aed); background-color: var(--info-60012, #7c3aed1f);" : (e == null ? void 0 : e.toLowerCase()) == "danger" ? "color: var(--danger-600, #e11d48); border: 1px solid var(--danger-500, #f43f5e); background-color: var(--danger-5008, #f43f5e14);" : (e == null ? void 0 : e.toLowerCase()) == "secondary" ? "color: var(--secondary-700, #2667a0); border: 1px solid var(--secondary-600, #3284cb); background-color: var(--secondary-60012, #3284cb1f);" : "color: var(--gray-950, #14161A); border: 1px solid var(--gray-200, #dddfe4); background-color: var(--white, #fff);", g = a.div`
@@ -75,6 +75,7 @@
75
75
  @media (max-width: ${a.MOBILE_SIZE_PX+"px"}) {
76
76
  & .regular-title {
77
77
  font-size: 1.375rem;
78
+ padding-bottom: 0.5rem;
78
79
  }
79
80
  }
80
81
  `,s=e=>(e==null?void 0:e.toLowerCase())=="success"?"color: var(--success-700, #047857); border: 1px solid var(--success-600, #059669); background-color: var(--sucess-60008, #05966914);":(e==null?void 0:e.toLowerCase())=="warning"?"color: var(--warning-600, #d97706); border: 1px solid var(--warning-500, #f59e0b); background-color: var(--warning-50012, #f59e0b1f);":(e==null?void 0:e.toLowerCase())=="info"?"color: var(--info-700, #6d28d9); border: 1px solid var(--info-600, #7c3aed); background-color: var(--info-60012, #7c3aed1f);":(e==null?void 0:e.toLowerCase())=="danger"?"color: var(--danger-600, #e11d48); border: 1px solid var(--danger-500, #f43f5e); background-color: var(--danger-5008, #f43f5e14);":(e==null?void 0:e.toLowerCase())=="secondary"?"color: var(--secondary-700, #2667a0); border: 1px solid var(--secondary-600, #3284cb); background-color: var(--secondary-60012, #3284cb1f);":"color: var(--gray-950, #14161A); border: 1px solid var(--gray-200, #dddfe4); background-color: var(--white, #fff);",o=t.styled.div`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.160",
3
+ "version": "4.0.162",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [