@lanaco/lnc-react-ui 4.0.39 → 4.0.40
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/BannerSectionBasic.cjs +9 -9
- package/dist/BannerSectionBasic.js +20 -20
- package/dist/BannerSectionCarousel.cjs +13 -5
- package/dist/BannerSectionCarousel.js +29 -21
- package/dist/BannerSectionGrid.cjs +1 -1
- package/dist/BannerSectionGrid.js +6 -6
- package/dist/BannerSectionSimple.cjs +4 -4
- package/dist/BannerSectionSimple.js +41 -38
- package/dist/BannerSectionWithList.cjs +4 -4
- package/dist/BannerSectionWithList.js +17 -17
- package/dist/BannerSectionWithListImage.cjs +5 -5
- package/dist/BannerSectionWithListImage.js +41 -38
- package/dist/BlogsSectionDetailed.cjs +10 -10
- package/dist/BlogsSectionDetailed.js +32 -33
- package/dist/BlogsSectionLarge.cjs +2 -2
- package/dist/BlogsSectionLarge.js +2 -2
- package/dist/BlogsSectionSimple.cjs +2 -2
- package/dist/BlogsSectionSimple.js +20 -20
- package/dist/BlogsSectionSimpleCentered.cjs +6 -6
- package/dist/BlogsSectionSimpleCentered.js +9 -9
- package/dist/BlogsSectionWithFilters.cjs +10 -10
- package/dist/BlogsSectionWithFilters.js +65 -64
- package/dist/BrandHitsSection.cjs +12 -7
- package/dist/BrandHitsSection.js +10 -5
- package/dist/CalorieCalculatorSection.cjs +7 -8
- package/dist/CalorieCalculatorSection.js +31 -32
- package/dist/CustomLoanMapSection.cjs +2 -2
- package/dist/CustomLoanMapSection.js +13 -13
- package/dist/DetailedProductsSection.cjs +1 -1
- package/dist/DetailedProductsSection.js +1 -1
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +8 -8
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +9 -8
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +14 -6
- package/dist/FieldOfInterestsWithTagsCardsSection.js +12 -4
- package/dist/GeneralWithTagsCardsSection.cjs +18 -6
- package/dist/GeneralWithTagsCardsSection.js +44 -31
- package/dist/GiftCardsSection.cjs +9 -5
- package/dist/GiftCardsSection.js +21 -17
- package/dist/LocationSearchSection.cjs +1 -1
- package/dist/LocationSearchSection.js +1 -1
- package/dist/MasonryGeneralCardsSection.cjs +21 -1
- package/dist/MasonryGeneralCardsSection.js +20 -0
- package/dist/OverlayGeneralCardsSection.cjs +52 -96
- package/dist/OverlayGeneralCardsSection.js +116 -165
- package/dist/ProductsWithBannerSection.cjs +5 -5
- package/dist/ProductsWithBannerSection.js +26 -26
- package/dist/SalesCampaignsSection.cjs +17 -17
- package/dist/SalesCampaignsSection.js +81 -81
- package/dist/ShopCardsSection.cjs +19 -9
- package/dist/ShopCardsSection.js +54 -40
- package/dist/SimpleCategoriesSection.cjs +1 -1
- package/dist/SimpleCategoriesSection.js +1 -1
- package/dist/SimpleProductsSection.cjs +1 -1
- package/dist/SimpleProductsSection.js +1 -1
- package/dist/{index-CT6_7UFb.js → index-5cttM4t7.js} +119 -124
- package/dist/{index-BN8qgFbe.js → index-BT55M3t6.js} +8 -7
- package/dist/{index-_Db92CJE.cjs → index-DHJmdMN8.cjs} +5 -4
- package/dist/index-Dn5tPLgP.cjs +95 -0
- package/dist/{style-6tSw9aqK.js → style-CiePxaJ_.js} +6 -6
- package/dist/{style-BR3tIhP1.cjs → style-DN1qT8BE.cjs} +6 -6
- package/package.json +1 -1
- package/dist/index-Q_i-aqsF.cjs +0 -95
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
max-width: 11.625rem;
|
|
7
7
|
max-height: 11.625rem;
|
|
8
8
|
${r.linearGradientAnimation("-90deg")}
|
|
9
|
-
`,
|
|
9
|
+
`,b=a.newStyled.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: column;
|
|
12
12
|
justify-content: end;
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
aspect-ratio: 1 / 1; /* defining the aspect ratio of the image */
|
|
50
50
|
object-fit: cover; /* making sure the image isn't distorted */
|
|
51
51
|
border-radius: 0.75rem;
|
|
52
|
+
mix-blend-mode: multiply;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
& .fallback-image {
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
border-radius: 62.4375rem;
|
|
71
72
|
z-index: 1;
|
|
72
73
|
background-color: var(--white, #fff);
|
|
73
|
-
color: var(--gray-950, #
|
|
74
|
+
color: var(--gray-950, #14161a);
|
|
74
75
|
}
|
|
75
76
|
& .title-simple-product-card {
|
|
76
77
|
z-index: 1;
|
|
@@ -81,7 +82,7 @@
|
|
|
81
82
|
&:hover {
|
|
82
83
|
& .title-simple-product-card {
|
|
83
84
|
z-index: 1;
|
|
84
|
-
color: var(--primary-500, #
|
|
85
|
+
color: var(--primary-500, #f59e0b);
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
|
-
`,
|
|
88
|
+
`,h=u.forwardRef((n,x)=>{const{uuid:y,title:d,price:i,currency:t,isNegotiable:l,isFree:c,image:s,sellerUuid:v,onSelectCard:m=()=>{},imageComponent:o,negotiableText:p="Negotiable",freeText:g="Free"}=n;return e.jsxs(b,{className:"simple-product-card",onClick:m,children:[r.isDefined(o)?o:e.jsx("img",{src:s}),e.jsxs("div",{className:"text-block",children:[e.jsx("div",{className:"title-simple-product-card",children:d}),e.jsxs("div",{className:"price-chip",children:[i&&t&&`${r.formatPrice(i)} ${r.GetCurrencySymbol(t)}`,l&&p,c&&g]})]})]})});exports.SimpleProductCard=h;exports.SkeletonWrapper=f;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";const l=require("react/jsx-runtime"),n=require("react"),r=require("./index-BPVoEhTF.cjs"),V=require("./FlexBox.cjs"),R=require("./IconButton.cjs"),_=require("./ThemeProvider.cjs"),z=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),E=require("./consts-CtNoHdBj.cjs"),D=require("./useDetectMobile-D6d5LpdL.cjs"),K=require("./index-Cb_AeN9A.cjs"),O=require("./Button.cjs"),F=require("./Icon.cjs"),G=require("./utils-NZLCh-J5.cjs"),X=z.newStyled.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;
|
|
@@ -20,7 +20,7 @@ const s = r.div`
|
|
|
20
20
|
|
|
21
21
|
& i {
|
|
22
22
|
font-size: 1.5rem;
|
|
23
|
-
color: var(--primary-500, #
|
|
23
|
+
color: var(--primary-500, #f59e0b);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -35,7 +35,7 @@ const s = r.div`
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
`,
|
|
38
|
+
`, d = r.div`
|
|
39
39
|
display: flex;
|
|
40
40
|
flex-direction: column;
|
|
41
41
|
gap: 0.75rem;
|
|
@@ -56,7 +56,7 @@ const s = r.div`
|
|
|
56
56
|
|
|
57
57
|
& i {
|
|
58
58
|
font-size: 1.5rem;
|
|
59
|
-
color: var(--primary-500, #
|
|
59
|
+
color: var(--primary-500, #f59e0b);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -65,7 +65,7 @@ const s = r.div`
|
|
|
65
65
|
font-size: 1.375rem;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
`, t = (e) => (e == null ? void 0 : e.toLowerCase()) == "success" ? "color: var(--success-700); border: 1px solid var(--success-600); background-color: var(--sucess-60008);" : (e == null ? void 0 : e.toLowerCase()) == "warning" ? "color: var(--warning-600); border: 1px solid var(--warning-500); background-color: var(--warning-50012);" : (e == null ? void 0 : e.toLowerCase()) == "info" ? "color: var(--info-700); border: 1px solid var(--info-600); background-color: var(--
|
|
68
|
+
`, t = (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 = r.div`
|
|
69
69
|
font-size: 0.75rem;
|
|
70
70
|
font-weight: 500;
|
|
71
71
|
padding: 0 0.5rem;
|
|
@@ -77,7 +77,7 @@ const s = r.div`
|
|
|
77
77
|
${(e) => t(e.color)}
|
|
78
78
|
`;
|
|
79
79
|
export {
|
|
80
|
-
|
|
80
|
+
o as B,
|
|
81
81
|
s as R,
|
|
82
|
-
|
|
82
|
+
d as T
|
|
83
83
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),t=require("./consts-CtNoHdBj.cjs"),
|
|
1
|
+
"use strict";const r=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),t=require("./consts-CtNoHdBj.cjs"),a=r.newStyled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 1.5rem;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
& i {
|
|
20
20
|
font-size: 1.5rem;
|
|
21
|
-
color: var(--primary-500, #
|
|
21
|
+
color: var(--primary-500, #f59e0b);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
`,
|
|
36
|
+
`,i=r.newStyled.div`
|
|
37
37
|
display: flex;
|
|
38
38
|
flex-direction: column;
|
|
39
39
|
gap: 0.75rem;
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
& i {
|
|
56
56
|
font-size: 1.5rem;
|
|
57
|
-
color: var(--primary-500, #
|
|
57
|
+
color: var(--primary-500, #f59e0b);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
font-size: 1.375rem;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
`,n=e=>(e==null?void 0:e.toLowerCase())=="success"?"color: var(--success-700); border: 1px solid var(--success-600); background-color: var(--sucess-60008);":(e==null?void 0:e.toLowerCase())=="warning"?"color: var(--warning-600); border: 1px solid var(--warning-500); background-color: var(--warning-50012);":(e==null?void 0:e.toLowerCase())=="info"?"color: var(--info-700); border: 1px solid var(--info-600); background-color: var(--
|
|
66
|
+
`,n=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);",s=r.newStyled.div`
|
|
67
67
|
font-size: 0.75rem;
|
|
68
68
|
font-weight: 500;
|
|
69
69
|
padding: 0 0.5rem;
|
|
@@ -73,4 +73,4 @@
|
|
|
73
73
|
border-radius: 0.25rem;
|
|
74
74
|
display: flex;
|
|
75
75
|
${e=>n(e.color)}
|
|
76
|
-
`;exports.BlogTag=s;exports.RegulatTitleSectionWrapper=
|
|
76
|
+
`;exports.BlogTag=s;exports.RegulatTitleSectionWrapper=a;exports.TitleWithOptionsSectionWrapper=i;
|
package/package.json
CHANGED
package/dist/index-Q_i-aqsF.cjs
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";const o=require("react/jsx-runtime"),n=require("react"),l=require("./index-BPVoEhTF.cjs"),V=require("./FlexBox.cjs"),R=require("./IconButton.cjs"),_=require("./ThemeProvider.cjs"),z=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),E=require("./consts-CtNoHdBj.cjs"),D=require("./useDetectMobile-D6d5LpdL.cjs"),K=require("./index-Cb_AeN9A.cjs"),O=require("./Button.cjs"),F=require("./Icon.cjs"),G=require("./utils-NZLCh-J5.cjs"),X=z.newStyled.div`
|
|
2
|
-
position: relative;
|
|
3
|
-
padding: ${r=>r.padding};
|
|
4
|
-
|
|
5
|
-
& button {
|
|
6
|
-
white-space: nowrap;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
& .badge-button {
|
|
10
|
-
${r=>r.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: ${r=>r.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
|
-
${r=>r.rightAlignArrows===!0&&r.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: ${r=>r.arrowsVisibleOnHover===!1&&r.hasOverflow?"visible":"hidden"};
|
|
64
|
-
z-index: 4;
|
|
65
|
-
transition: ${"0.3s"};
|
|
66
|
-
}
|
|
67
|
-
& .scroll-arrow-right {
|
|
68
|
-
${r=>r.rightAlignArrows===!0?"right: 0":"right: 0.7rem"};
|
|
69
|
-
}
|
|
70
|
-
& .scroll-arrow-left {
|
|
71
|
-
${r=>r.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: ${r=>r.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
|
-
${r=>r.noMargin!==!0&&"margin-left: 1rem"};
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
`,W=n.forwardRef(({columnGap:r="2rem",rowGap:N="1.25rem",scrollBySize:g=300,wrapForMobile:v=!1,wrap:a=!1,children:w,methodsRef:m,arrowsVisibleOnHover:x=!0,rightAlignArrows:P=!1,padding:y="0",showTimesBtn:p,noArrows:b,noGradient:T=!1,hideDisabledArrows:c=!1,noMargin:u=!1,...S},k)=>{const j=D.useDetectMobile(),{theme:e}=_.useTheme(),[t,f]=n.useState(!1),[d,h]=n.useState(!1),[H,I]=n.useState(!0),s=n.useRef(),B=()=>{var i;(i=s.current)==null||i.scrollBy(g,0)},$=()=>{var i;(i=s.current)==null||i.scrollBy(-g,0)},[q,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))},[w]),n.useImperativeHandle(m,()=>({scrollToEnd(){M()},scrollLeft(){$()},scrollRight(){B()}}));const M=()=>{s.current.scrollLeft=s.current.scrollWidth};return o.jsx(X,{ref:k,arrowsVisibleOnHover:x,hasOverflow:q,noArrows:b,padding:y,rightAlignArrows:P,showTimesBtn:p,theme:e,noMargin:u,...S,children:o.jsxs(V,{ref:s,className:"scrollable-container",columnGap:r,rowGap:N,wrap:a||v&&j?"Wrap":"NoWrap",children:[b!==!0&&o.jsxs(o.Fragment,{children:[!(c===!0&&d===!0)&&o.jsx(R,{borderRadius:"curved",btnType:"tinted",className:"scroll-arrow-left",color:"neutral",disabled:d,icon:"angle-left",onClick:$}),!(c===!0&&t===!0)&&o.jsx(R,{borderRadius:"curved",btnType:"tinted",className:"scroll-arrow-right",color:"neutral",disabled:t,icon:"angle-right",onClick:B})]}),o.jsx(K.InfiniteScrollEndElement,{isHorizontal:!0,onIsNotVisible:()=>{d===!0&&h(!1)},onIsVisible:()=>{d===!1&&h(!0)}}),w,o.jsx(K.InfiniteScrollEndElement,{className:"right-scroller",isHorizontal:!0,onIsNotVisible:()=>{t===!0&&f(!1),I(!0)},onIsVisible:()=>{t===!1&&f(!0),I(!1)}}),H&&q&&T!==!0&&o.jsx("div",{className:"gradient"})]})})});W.propTypes={title:l.PropTypes.string,rowGap:l.PropTypes.string,columnGap:l.PropTypes.string,scrollBySize:l.PropTypes.number,wrapForMobile:l.PropTypes.bool,wrap:l.PropTypes.bool,methodsRef:l.PropTypes.any,arrowsVisibleOnHover:l.PropTypes.bool,rightAlignArrows:l.PropTypes.bool,padding:l.PropTypes.string};const C=n.forwardRef((r,N)=>{const{allButton:g=!0,items:v=[],selectedIds:a=[],onSelect:w=()=>{},onRemove:m=()=>{},onSelectAll:x=()=>{},className:P,showTimesBtn:y=!1,labelKey:p="label",valueKey:b="value",codeKey:T="code",uniqueKey:c,typeKey:u,productsToolbarName:S="All",...k}=r,j=(e,t,f,d,h)=>{a!=null&&a.includes(e)?m(e,t,f,d,h):w(e,t,f,d,h)};return o.jsxs(W,{arrowsVisibleOnHover:!1,className:P,columnGap:"0.75rem",padding:"0.25rem 0",rightAlignArrows:!0,showTimesBtn:y,...k,children:[g&&o.jsx(O,{borderRadius:"curved",btnType:a.length===0?"filled":"tinted",className:"badge-button",color:"neutral",onClick:x,children:S}),v.map((e,t)=>o.jsxs(O,{borderRadius:"curved",btnType:a.includes(e.uuid)?"filled":"tinted",className:"badge-button",color:"neutral",onClick:()=>j(e[b],e[p],e[T],c?e[c]:null,u?e[u]:null),children:[G.isDefined(e==null?void 0:e.icon)&&o.jsxs(o.Fragment,{children:[o.jsx("i",{className:e==null?void 0:e.icon})," "]}),e[p],y===!0&&o.jsx(F,{className:"times-btn",icon:"times",sizeInUnits:"0.75rem",onClick:()=>m(e[b],e[p],e[T],c?e[c]:null,u?e[u]:null)})]},t))]})});C.propTypes={allButton:l.PropTypes.bool,items:l.PropTypes.array,selectedIds:l.PropTypes.array,onSelect:l.PropTypes.func,onRemove:l.PropTypes.func,onSelectAll:l.PropTypes.func,className:l.PropTypes.string,showTimesBtn:l.PropTypes.bool,valuKey:l.PropTypes.string,labelKey:l.PropTypes.string,codeKey:l.PropTypes.string};exports.SelectBar=C;
|