@lanaco/lnc-react-ui 4.0.32 → 4.0.33
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/Accordion.cjs +1 -1
- package/dist/Accordion.js +1 -1
- package/dist/AccordionSummary.cjs +1 -1
- package/dist/AccordionSummary.js +1 -1
- package/dist/ActionsToolbar.cjs +1 -1
- package/dist/ActionsToolbar.js +1 -1
- package/dist/Alert.cjs +1 -1
- package/dist/Alert.js +1 -1
- package/dist/Avatar.cjs +1 -1
- package/dist/Avatar.js +1 -1
- package/dist/Badge.cjs +1 -1
- package/dist/Badge.js +1 -1
- package/dist/BannerSectionWithList.cjs +1 -1
- package/dist/BannerSectionWithList.js +1 -1
- package/dist/BlogsSectionDetailed.cjs +111 -0
- package/dist/BlogsSectionDetailed.js +224 -0
- package/dist/BlogsSectionLarge.cjs +101 -0
- package/dist/BlogsSectionLarge.js +177 -0
- package/dist/BlogsSectionSimple.cjs +71 -0
- package/dist/BlogsSectionSimple.js +158 -0
- package/dist/BlogsSectionSimpleCentered.cjs +78 -0
- package/dist/BlogsSectionSimpleCentered.js +149 -0
- package/dist/BlogsSectionWithFilters.cjs +173 -0
- package/dist/BlogsSectionWithFilters.js +559 -0
- package/dist/BrandHitsSection.cjs +11 -7
- package/dist/BrandHitsSection.js +9 -5
- package/dist/Breadcrumbs.cjs +1 -1
- package/dist/Breadcrumbs.js +1 -1
- package/dist/Button.cjs +1 -1
- package/dist/Button.js +1 -1
- package/dist/ButtonGroup.cjs +1 -1
- package/dist/ButtonGroup.js +1 -1
- package/dist/CheckBoxInput.cjs +1 -1
- package/dist/CheckBoxInput.js +1 -1
- package/dist/Chip.cjs +1 -1
- package/dist/Chip.js +1 -1
- package/dist/ColorInput.cjs +1 -1
- package/dist/ColorInput.js +1 -1
- package/dist/ConfirmationForm.cjs +1 -1
- package/dist/ConfirmationForm.js +1 -1
- package/dist/CustomLoanMapSection.cjs +240 -0
- package/dist/CustomLoanMapSection.js +410 -0
- package/dist/{CustomStyles-DuADCM-0.js → CustomStyles-C45a_Y92.js} +1 -1
- package/dist/{CustomStyles-CBON9fD-.cjs → CustomStyles-jdvxQvK1.cjs} +1 -1
- package/dist/DateInput.cjs +1 -1
- package/dist/DateInput.js +1 -1
- package/dist/DecimalInput.cjs +1 -1
- package/dist/DecimalInput.js +1 -1
- package/dist/DecimalInputV2.cjs +1 -1
- package/dist/DecimalInputV2.js +1 -1
- package/dist/DetailedProductsSection.cjs +1 -1
- package/dist/DetailedProductsSection.js +3 -3
- package/dist/DetailsView.cjs +1 -1
- package/dist/DetailsView.js +1 -1
- package/dist/DoubleRangeSlider.cjs +1 -1
- package/dist/DoubleRangeSlider.js +1 -1
- package/dist/DragAndDropFile.cjs +1 -1
- package/dist/DragAndDropFile.js +1 -1
- package/dist/DragDropFiles.cjs +1 -1
- package/dist/DragDropFiles.js +1 -1
- package/dist/Drawer.cjs +1 -1
- package/dist/Drawer.js +1 -1
- package/dist/Dropdown.cjs +1 -1
- package/dist/Dropdown.js +2 -2
- package/dist/DropdownItem.cjs +1 -1
- package/dist/DropdownItem.js +1 -1
- package/dist/DropdownLookup.cjs +1 -1
- package/dist/DropdownLookup.js +1 -1
- package/dist/DropdownMenu.cjs +1 -1
- package/dist/DropdownMenu.js +1 -1
- package/dist/EditableTable.cjs +1 -1
- package/dist/EditableTable.js +1 -1
- package/dist/FieldOfInterestsMasonrySection.cjs +7 -7
- package/dist/FieldOfInterestsMasonrySection.js +23 -23
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +11 -7
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +62 -58
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +37 -17
- package/dist/FieldOfInterestsWithTagsCardsSection.js +68 -48
- package/dist/FileInput.cjs +1 -1
- package/dist/FileInput.js +1 -1
- package/dist/FlexGridItem.cjs +1 -1
- package/dist/FlexGridItem.js +1 -1
- package/dist/FormField.cjs +1 -1
- package/dist/FormField.js +1 -1
- package/dist/FormView.cjs +1 -1
- package/dist/FormView.js +1 -1
- package/dist/GeneralWithTagsCardsSection.cjs +198 -0
- package/dist/GeneralWithTagsCardsSection.js +287 -0
- package/dist/GiftCardsSection.cjs +11 -7
- package/dist/GiftCardsSection.js +34 -30
- package/dist/Icon.cjs +1 -1
- package/dist/Icon.js +1 -1
- package/dist/IconButton.cjs +1 -1
- package/dist/IconButton.js +1 -1
- package/dist/Kanban.cjs +1 -1
- package/dist/Kanban.js +1 -1
- package/dist/KanbanActionsToolbar.cjs +1 -1
- package/dist/KanbanActionsToolbar.js +1 -1
- package/dist/KanbanView.cjs +1 -1
- package/dist/KanbanView.js +1 -1
- package/dist/Link.cjs +1 -1
- package/dist/Link.js +1 -1
- package/dist/MasonryGeneralCardsSection.cjs +6 -6
- package/dist/MasonryGeneralCardsSection.js +38 -36
- package/dist/MenuItem.cjs +1 -1
- package/dist/MenuItem.js +1 -1
- package/dist/Modal.cjs +1 -1
- package/dist/Modal.js +1 -1
- package/dist/MultiSelectDropdown.cjs +1 -1
- package/dist/MultiSelectDropdown.js +1 -1
- package/dist/MultiSelectDropdownLookup.cjs +1 -1
- package/dist/MultiSelectDropdownLookup.js +1 -1
- package/dist/NestedDropdownItem.cjs +1 -1
- package/dist/NestedDropdownItem.js +1 -1
- package/dist/NestedMenuItem.cjs +1 -1
- package/dist/NestedMenuItem.js +1 -1
- package/dist/NotificationContainer.cjs +1 -1
- package/dist/NotificationContainer.js +1 -1
- package/dist/NotificationMessage.cjs +1 -1
- package/dist/NotificationMessage.js +1 -1
- package/dist/NumberInput.cjs +1 -1
- package/dist/NumberInput.js +1 -1
- package/dist/OverlayGeneralCardsSection.cjs +127 -0
- package/dist/OverlayGeneralCardsSection.js +183 -0
- package/dist/PasswordInput.cjs +1 -1
- package/dist/PasswordInput.js +1 -1
- package/dist/PopoverContent.cjs +1 -1
- package/dist/PopoverContent.js +1 -1
- package/dist/ProductsWithBannerSection.cjs +1 -1
- package/dist/ProductsWithBannerSection.js +2 -2
- package/dist/ProgressBar.cjs +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/RadioInput.cjs +1 -1
- package/dist/RadioInput.js +1 -1
- package/dist/RangeSlider.cjs +1 -1
- package/dist/RangeSlider.js +1 -1
- package/dist/Separator.cjs +1 -1
- package/dist/Separator.js +1 -1
- package/dist/ShopCardsSection.cjs +8 -8
- package/dist/ShopCardsSection.js +49 -49
- package/dist/Sidebar.cjs +1 -1
- package/dist/Sidebar.js +1 -1
- package/dist/SimpleCategoriesSection.cjs +81 -0
- package/dist/SimpleCategoriesSection.js +153 -0
- package/dist/SimpleProductsSection.cjs +1 -1
- package/dist/SimpleProductsSection.js +1 -1
- package/dist/Spinner.cjs +1 -1
- package/dist/Spinner.js +1 -1
- package/dist/Surface.cjs +1 -1
- package/dist/Surface.js +1 -1
- package/dist/SwipeableDrawer.cjs +1 -1
- package/dist/SwipeableDrawer.js +1 -1
- package/dist/TabItem.cjs +1 -1
- package/dist/TabItem.js +1 -1
- package/dist/Table.cjs +1 -1
- package/dist/Table.js +1 -1
- package/dist/TableView.cjs +1 -1
- package/dist/TableView.js +1 -1
- package/dist/TextAreaInput.cjs +1 -1
- package/dist/TextAreaInput.js +1 -1
- package/dist/TextInput.cjs +1 -1
- package/dist/TextInput.js +1 -1
- package/dist/ThemeProvider.cjs +1 -1
- package/dist/ThemeProvider.js +1 -1
- package/dist/TimeInput.cjs +1 -1
- package/dist/TimeInput.js +1 -1
- package/dist/Toggle.cjs +1 -1
- package/dist/Toggle.js +1 -1
- package/dist/TreeMenuSeparator.cjs +1 -1
- package/dist/TreeMenuSeparator.js +1 -1
- package/dist/UploadedFile.cjs +1 -1
- package/dist/UploadedFile.js +1 -1
- package/dist/UrgentSaleProductsSection.cjs +1 -1
- package/dist/UrgentSaleProductsSection.js +1 -1
- package/dist/{index-jVpIwR2G.js → index-BfOdDcQF.js} +1 -1
- package/dist/{index-BlV3tdJ8.cjs → index-CC_hdGKn.cjs} +1 -1
- package/dist/{index-DGl-lSfF.js → index-DZxSlQJQ.js} +1 -1
- package/dist/{index-LdP7U1Yl.cjs → index-Dld_cRbm.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +25 -23
- package/dist/{style-C3OB0uad.cjs → style-CeMnBJ6v.cjs} +4 -4
- package/dist/{style-Ch-xOasu.js → style-D6sNCRwG.js} +6 -7
- package/dist/{utils-CE6bljYe.cjs → utils-UJt-R-G3.cjs} +7 -7
- package/dist/{utils-DtEdJZWa.js → utils-xpQsPsCa.js} +33 -33
- package/package.json +13 -3
- package/vite.config.js +36 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),l=require("react"),N=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),I=require("./consts-dNz9tpt4.cjs"),H=require("./useDetectMobile-rBe0FiP2.cjs"),T=require("./utils-UJt-R-G3.cjs"),X=require("./style-CeMnBJ6v.cjs"),C=require("./Button.cjs"),Z=require("./Link.cjs"),o=require("./index-BPVoEhTF.cjs"),U=require("./FlexBox.cjs"),M=require("./IconButton.cjs"),J=require("./ThemeProvider.cjs"),Q=require("./useUpdateEffect-BtMgpgIV.cjs"),Y=require("./Icon.cjs"),ee=N.newStyled.div`
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: ${t=>`repeat(${t.limit}, minmax(0, 1fr))`};
|
|
4
|
+
gap: 1.25rem;
|
|
5
|
+
|
|
6
|
+
@media (max-width: ${I.MOBILE_SIZE_PX+"px"}) {
|
|
7
|
+
grid-template-columns: repeat(1, 1fr);
|
|
8
|
+
}
|
|
9
|
+
`,K=N.newStyled.div`
|
|
10
|
+
display: flex;
|
|
11
|
+
width: 100%;
|
|
12
|
+
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1),
|
|
13
|
+
0px 1px 2px 0px rgba(0, 0, 0, 0.06);
|
|
14
|
+
background-color: var(--white);
|
|
15
|
+
border-radius: 0.75rem;
|
|
16
|
+
border: 1px solid var(--gray-95008);
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
gap: 0.75rem;
|
|
19
|
+
padding: 1rem;
|
|
20
|
+
min-height: 10.375rem;
|
|
21
|
+
max-height: 10.375rem;
|
|
22
|
+
|
|
23
|
+
& img {
|
|
24
|
+
max-width: 3.3125rem;
|
|
25
|
+
min-width: 3.3125rem;
|
|
26
|
+
min-height: 3.3125rem;
|
|
27
|
+
max-height: 3.3125rem;
|
|
28
|
+
border-radius: 0.75rem;
|
|
29
|
+
object-fit: cover;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
& .skeleton-img {
|
|
33
|
+
max-width: 3.3125rem;
|
|
34
|
+
min-width: 3.3125rem;
|
|
35
|
+
min-height: 3.3125rem;
|
|
36
|
+
max-height: 3.3125rem;
|
|
37
|
+
border-radius: 0.75rem;
|
|
38
|
+
background-color: ${T.linearGradientAnimation("-90deg")};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
& a {
|
|
42
|
+
margin-top: auto;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@media (max-width: ${I.MOBILE_SIZE_PX+"px"}) {
|
|
46
|
+
}
|
|
47
|
+
`,_=N.newStyled.div`
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
gap: 0.5rem;
|
|
51
|
+
color: var(--gray-950, #14161a);
|
|
52
|
+
|
|
53
|
+
& .text-wr-title {
|
|
54
|
+
font-weight: 600;
|
|
55
|
+
font-size: 1rem;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
& .skeleton-title {
|
|
59
|
+
height: 1.5rem;
|
|
60
|
+
width: 80%;
|
|
61
|
+
background-color: ${T.linearGradientAnimation("-90deg")};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
& .skeleton-action {
|
|
65
|
+
height: 1.25rem;
|
|
66
|
+
width: 20%;
|
|
67
|
+
background-color: ${T.linearGradientAnimation("-90deg")};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
& .text-wr {
|
|
71
|
+
font-weight: 400;
|
|
72
|
+
font-size: 0.875rem;
|
|
73
|
+
color: var(--gray-700, #4e555f);
|
|
74
|
+
${T.truncateTextInRows(3)}
|
|
75
|
+
}
|
|
76
|
+
`;l.forwardRef(({},t)=>r.jsxs(K,{className:"blog-card",children:[r.jsxs(_,{children:[r.jsx("div",{className:"skeleton-title"}),r.jsx("div",{className:"text-wr"}),r.jsx("div",{className:"skeleton-action"})]}),r.jsx("div",{className:"skeleton-img"})]}));const z=l.forwardRef((t,f)=>{const{title:a,image:n,text:i,buttonText:p,onCardClick:c}=t;return r.jsxs(K,{className:"blog-card",onClick:c,children:[r.jsxs(_,{children:[r.jsx("div",{className:"text-wr-title",children:a}),r.jsx("div",{className:"text-wr",children:i}),r.jsx(Z,{color:"gray",onClick:c,children:p})]}),r.jsx("img",{src:n})]})}),re=N.newStyled.div`
|
|
77
|
+
position: relative;
|
|
78
|
+
padding: ${t=>t.padding};
|
|
79
|
+
|
|
80
|
+
& button {
|
|
81
|
+
white-space: nowrap;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
& .badge-button {
|
|
85
|
+
${t=>t.showTimesBtn===!0&&"padding-left: 0.5rem; padding-right: 0.5rem;"}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
& .gradient {
|
|
89
|
+
position: absolute;
|
|
90
|
+
top: 50%;
|
|
91
|
+
transform: translate(0, -50%);
|
|
92
|
+
z-index: 4;
|
|
93
|
+
transition: ${"0.3s"};
|
|
94
|
+
right: ${t=>t.noArrows!==!0?"6rem":"0"};
|
|
95
|
+
width: 2rem;
|
|
96
|
+
background: #fff;
|
|
97
|
+
height: 100%;
|
|
98
|
+
-webkit-mask-image: linear-gradient(to left, black 10%, transparent 50%);
|
|
99
|
+
mask-image: linear-gradient(to left, black 10%, transparent 50%);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
& .scrollable-container {
|
|
103
|
+
max-width: -webkit-fill-available;
|
|
104
|
+
max-width: -moz-available; /* WebKit-based browsers will ignore this. */
|
|
105
|
+
max-width: fill-available;
|
|
106
|
+
|
|
107
|
+
${t=>t.rightAlignArrows===!0&&t.noArrows!==!0&&"margin-right: 6rem"};
|
|
108
|
+
scroll-behavior: smooth;
|
|
109
|
+
overflow: hidden;
|
|
110
|
+
-webkit-overflow-scrolling: touch;
|
|
111
|
+
::-webkit-scrollbar {
|
|
112
|
+
-webkit-appearance: none;
|
|
113
|
+
}
|
|
114
|
+
-ms-overflow-style: none;
|
|
115
|
+
/* Internet Explorer 10+ */
|
|
116
|
+
scrollbar-width: none;
|
|
117
|
+
/* Firefox */
|
|
118
|
+
|
|
119
|
+
&::-webkit-scrollbar {
|
|
120
|
+
display: none;
|
|
121
|
+
/* Safari and Chrome */
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@media (max-width: ${I.MOBILE_SIZE_PX+"px"}) {
|
|
125
|
+
margin-right: 0;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
& .scroll-arrow-right,
|
|
129
|
+
& .scroll-arrow-left {
|
|
130
|
+
position: absolute;
|
|
131
|
+
top: 50%;
|
|
132
|
+
transform: translate(0, -50%);
|
|
133
|
+
display: flex;
|
|
134
|
+
justify-content: center;
|
|
135
|
+
align-items: center;
|
|
136
|
+
cursor: pointer;
|
|
137
|
+
|
|
138
|
+
visibility: ${t=>t.arrowsVisibleOnHover===!1&&t.hasOverflow?"visible":"hidden"};
|
|
139
|
+
z-index: 4;
|
|
140
|
+
transition: ${"0.3s"};
|
|
141
|
+
}
|
|
142
|
+
& .scroll-arrow-right {
|
|
143
|
+
${t=>t.rightAlignArrows===!0?"right: 0":"right: 0.7rem"};
|
|
144
|
+
}
|
|
145
|
+
& .scroll-arrow-left {
|
|
146
|
+
${t=>t.rightAlignArrows===!0?"right: 2.625rem":"left: 0.7rem"};
|
|
147
|
+
}
|
|
148
|
+
& .scrollable-container:hover > .scroll-arrow-left,
|
|
149
|
+
& .scrollable-container:hover > .scroll-arrow-right {
|
|
150
|
+
visibility: ${t=>t.hasOverflow?"visible":"hidden"};
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@media (max-width: ${I.MOBILE_SIZE_PX+"px"}) {
|
|
154
|
+
& .scrollable-container {
|
|
155
|
+
overflow: auto;
|
|
156
|
+
}
|
|
157
|
+
& .scroll-arrow-left,
|
|
158
|
+
& .scroll-arrow-right {
|
|
159
|
+
display: none;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
& .gradient {
|
|
163
|
+
right: 0;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
& .scrollable-container button:nth-of-type(3) {
|
|
167
|
+
${t=>t.noMargin!==!0&&"margin-left: 1rem"};
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
`,te=t=>{const[f,a]=l.useState(!1),n=l.useMemo(()=>new IntersectionObserver(([i])=>a(i.isIntersecting)),[]);return l.useEffect(()=>(n.observe(t.current),()=>{n.disconnect()}),[t,n]),f},se=N.newStyled.div`
|
|
171
|
+
min-height: 1px;
|
|
172
|
+
${t=>t.isHorizontal===!0?"min-width: 1px; width: 1px;":"width: 100%;"}
|
|
173
|
+
`,E=l.forwardRef((t,f)=>{const{onIsVisible:a=()=>{},onIsNotVisible:n,isHorizontal:i=!1,className:p=""}=t,c=l.useRef(null),d=te(c);return Q.useUpdateEffect(()=>{d?a():n==null||n()},[d]),r.jsx(se,{ref:c,className:`scroller-element ${p}`,isHorizontal:i})});E.propTypes={onIsVisible:o.PropTypes.func,isHorizontal:o.PropTypes.bool};const D=l.forwardRef(({columnGap:t="2rem",rowGap:f="1.25rem",scrollBySize:a=300,wrapForMobile:n=!1,wrap:i=!1,children:p,methodsRef:c,arrowsVisibleOnHover:d=!0,rightAlignArrows:x=!1,padding:b="0",showTimesBtn:w,noArrows:e,noGradient:g=!1,hideDisabledArrows:y=!1,noMargin:S=!1,...P},$)=>{const R=H.useDetectMobile(),{theme:s}=J.useTheme(),[m,j]=l.useState(!1),[v,k]=l.useState(!1),[V,A]=l.useState(!0),u=l.useRef(),B=()=>{var h;(h=u.current)==null||h.scrollBy(a,0)},q=()=>{var h;(h=u.current)==null||h.scrollBy(-a,0)},[O,G]=l.useState(!1);l.useEffect(()=>{var h,W;G(((h=u==null?void 0:u.current)==null?void 0:h.scrollWidth)>((W=u==null?void 0:u.current)==null?void 0:W.clientWidth))},[p]),l.useImperativeHandle(c,()=>({scrollToEnd(){F()},scrollLeft(){q()},scrollRight(){B()}}));const F=()=>{u.current.scrollLeft=u.current.scrollWidth};return r.jsx(re,{ref:$,arrowsVisibleOnHover:d,hasOverflow:O,noArrows:e,padding:b,rightAlignArrows:x,showTimesBtn:w,theme:s,noMargin:S,...P,children:r.jsxs(U,{ref:u,className:"scrollable-container",columnGap:t,rowGap:f,wrap:i||n&&R?"Wrap":"NoWrap",children:[e!==!0&&r.jsxs(r.Fragment,{children:[!(y===!0&&v===!0)&&r.jsx(M,{borderRadius:"curved",btnType:"tinted",className:"scroll-arrow-left",color:"neutral",disabled:v,icon:"angle-left",onClick:q}),!(y===!0&&m===!0)&&r.jsx(M,{borderRadius:"curved",btnType:"tinted",className:"scroll-arrow-right",color:"neutral",disabled:m,icon:"angle-right",onClick:B})]}),r.jsx(E,{isHorizontal:!0,onIsNotVisible:()=>{v===!0&&k(!1)},onIsVisible:()=>{v===!1&&k(!0)}}),p,r.jsx(E,{className:"right-scroller",isHorizontal:!0,onIsNotVisible:()=>{m===!0&&j(!1),A(!0)},onIsVisible:()=>{m===!1&&j(!0),A(!1)}}),V&&O&&g!==!0&&r.jsx("div",{className:"gradient"})]})})});D.propTypes={title:o.PropTypes.string,rowGap:o.PropTypes.string,columnGap:o.PropTypes.string,scrollBySize:o.PropTypes.number,wrapForMobile:o.PropTypes.bool,wrap:o.PropTypes.bool,methodsRef:o.PropTypes.any,arrowsVisibleOnHover:o.PropTypes.bool,rightAlignArrows:o.PropTypes.bool,padding:o.PropTypes.string};const L=l.forwardRef((t,f)=>{const{allButton:a=!0,items:n=[],selectedIds:i=[],onSelect:p=()=>{},onRemove:c=()=>{},onSelectAll:d=()=>{},className:x,showTimesBtn:b=!1,labelKey:w="label",valueKey:e="value",codeKey:g="code",uniqueKey:y,typeKey:S,productsToolbarName:P="All",...$}=t,R=(s,m,j,v,k)=>{i!=null&&i.includes(s)?c(s,m,j,v,k):p(s,m,j,v,k)};return r.jsxs(D,{arrowsVisibleOnHover:!1,className:x,columnGap:"0.75rem",padding:"0.25rem 0",rightAlignArrows:!0,showTimesBtn:b,...$,children:[a&&r.jsx(C,{borderRadius:"curved",btnType:i.length===0?"filled":"tinted",className:"badge-button",color:"neutral",onClick:d,children:P}),n.map((s,m)=>r.jsxs(C,{borderRadius:"curved",btnType:i.includes(s.uuid)?"filled":"tinted",className:"badge-button",color:"neutral",onClick:()=>R(s[e],s[w],s[g],y?s[y]:null,S?s[S]:null),children:[T.isDefined(s==null?void 0:s.icon)&&r.jsxs(r.Fragment,{children:[r.jsx("i",{className:s==null?void 0:s.icon})," "]}),s[w],b===!0&&r.jsx(Y,{className:"times-btn",icon:"times",sizeInUnits:"0.75rem",onClick:()=>c(s[e],s[w],s[g],y?s[y]:null,S?s[S]:null)})]},m))]})});L.propTypes={allButton:o.PropTypes.bool,items:o.PropTypes.array,selectedIds:o.PropTypes.array,onSelect:o.PropTypes.func,onRemove:o.PropTypes.func,onSelectAll:o.PropTypes.func,className:o.PropTypes.string,showTimesBtn:o.PropTypes.bool,valuKey:o.PropTypes.string,labelKey:o.PropTypes.string,codeKey:o.PropTypes.string};const oe=l.forwardRef((t,f)=>{const{icon:a,title:n,items:i,buttonText:p,limit:c=3,options:d,onActionClick:x=()=>{},onSelectOption:b=()=>{}}=t,w=H.useDetectMobile();return r.jsxs(X.TitleWithOptionsSectionWrapper,{children:[r.jsxs("div",{className:"regular-title",children:[r.jsxs("div",{className:"regular-title-text",children:[T.isDefinedNotEmptyString(a)&&r.jsx("i",{className:a}),r.jsx("span",{children:n})]}),T.isDefinedNotEmptyString(onSectionClick)&&r.jsx(C,{type:"button",btnType:"tinted",color:"gray",onClick:x,borderRadius:"curved",children:p})]}),(d==null?void 0:d.length)>0&&r.jsx(L,{items:d,onRemove:e=>{b(e)},onSelect:e=>{b(e)},labelKey:"name",valueKey:"code",noMargin:!0}),r.jsx(ee,{limit:c,children:w===!0?i==null?void 0:i.map((e,g)=>r.jsx(z,{title:e==null?void 0:e.title,image:e==null?void 0:e.image,text:e==null?void 0:e.text,titleSlug:e==null?void 0:e.titleSlug,buttonText:e==null?void 0:e.buttonText,onCardClick:()=>onSelectCard(e==null?void 0:e.uuid)},g)):i==null?void 0:i.slice(0,c).map((e,g)=>r.jsx(z,{title:e==null?void 0:e.title,image:e==null?void 0:e.image,text:e==null?void 0:e.text,titleSlug:e==null?void 0:e.titleSlug,buttonText:e==null?void 0:e.buttonText,onCardClick:()=>onSelectCard(e==null?void 0:e.uuid)},g))})]})});module.exports=oe;
|