@lanaco/lnc-react-ui 4.0.32 → 4.0.34
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/BannerSectionBasic.cjs +1 -1
- package/dist/BannerSectionBasic.js +1 -1
- package/dist/BannerSectionCarousel.cjs +1 -1
- package/dist/BannerSectionCarousel.js +2 -2
- package/dist/BannerSectionGrid.cjs +1 -1
- package/dist/BannerSectionGrid.js +3 -3
- package/dist/BannerSectionSimple.cjs +1 -1
- package/dist/BannerSectionSimple.js +2 -2
- package/dist/BannerSectionWithList.cjs +1 -1
- package/dist/BannerSectionWithList.js +2 -2
- package/dist/BannerSectionWithListImage.cjs +1 -1
- package/dist/BannerSectionWithListImage.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 +10 -6
- 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-BWOJ2IOk.js} +1 -1
- package/dist/{CustomStyles-CBON9fD-.cjs → CustomStyles-DyqGX2oY.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 +5 -5
- 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 +24 -24
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +11 -7
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +62 -58
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +37 -17
- package/dist/FieldOfInterestsWithTagsCardsSection.js +69 -49
- 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 +4 -4
- package/dist/ProgressBar.cjs +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/QuizSection.cjs +387 -0
- package/dist/QuizSection.js +697 -0
- 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 +50 -50
- 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 +4 -4
- 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 +25 -25
- 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 +3 -3
- package/dist/consts-C1uHV4xc.js +6 -0
- package/dist/consts-CtNoHdBj.cjs +1 -0
- package/dist/{index-jVpIwR2G.js → index-7XMd1kAv.js} +2 -2
- package/dist/{index-C2M7QHPq.cjs → index-B67WqHGh.cjs} +1 -1
- package/dist/{index-BlV3tdJ8.cjs → index-B6kVbS_M.cjs} +1 -1
- package/dist/{index-DcYg32le.js → index-CTJZaJ_S.js} +1 -1
- package/dist/{index-DGl-lSfF.js → index-HV_Ku4ub.js} +1 -1
- package/dist/{index-LdP7U1Yl.cjs → index-mIxT8eNX.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +51 -47
- package/dist/{style-C3OB0uad.cjs → style-BEUISPP7.cjs} +5 -5
- package/dist/{style-Ch-xOasu.js → style-BGQ1B_dp.js} +7 -8
- package/dist/{useDetectMobile-BookNOsk.js → useDetectMobile-BC6EGaBc.js} +1 -1
- package/dist/{useDetectMobile-rBe0FiP2.cjs → useDetectMobile-D6d5LpdL.cjs} +1 -1
- package/dist/{utils-CE6bljYe.cjs → utils-C0YSTwcn.cjs} +7 -7
- package/dist/{utils-DtEdJZWa.js → utils-CqvISfv9.js} +43 -36
- package/package.json +12 -1
- package/vite.config.js +40 -0
- package/dist/consts-DNVz1x1I.js +0 -4
- package/dist/consts-dNz9tpt4.cjs +0 -1
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as s } from "react";
|
|
3
|
+
import { n as p } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
4
|
+
import { M as f } from "./consts-C1uHV4xc.js";
|
|
5
|
+
import { u as S } from "./useDetectMobile-BC6EGaBc.js";
|
|
6
|
+
import { m as C, t as N, k as u } from "./utils-CqvISfv9.js";
|
|
7
|
+
import { R } from "./style-BGQ1B_dp.js";
|
|
8
|
+
import T from "./Button.js";
|
|
9
|
+
import $ from "./Link.js";
|
|
10
|
+
const B = p.div`
|
|
11
|
+
display: grid;
|
|
12
|
+
grid-template-columns: ${(r) => `repeat(${r.limit}, minmax(0, 1fr))`};
|
|
13
|
+
gap: 1.25rem;
|
|
14
|
+
|
|
15
|
+
@media (max-width: ${f + "px"}) {
|
|
16
|
+
grid-template-columns: repeat(1, 1fr);
|
|
17
|
+
}
|
|
18
|
+
`, v = p.div`
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
width: 100%;
|
|
22
|
+
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1),
|
|
23
|
+
0px 1px 2px 0px rgba(0, 0, 0, 0.06);
|
|
24
|
+
background-color: var(--white);
|
|
25
|
+
border-radius: 0.75rem;
|
|
26
|
+
border: 1px solid var(--gray-95008);
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
max-height: 21.5625rem;
|
|
29
|
+
min-height: 21.5625rem;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
|
|
32
|
+
&:hover {
|
|
33
|
+
& .text-wr-title {
|
|
34
|
+
color: var(--primary-500, #f59e0b);
|
|
35
|
+
transition: var(--transition);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
& img {
|
|
40
|
+
max-height: 12.5625rem;
|
|
41
|
+
min-height: 12.5625rem;
|
|
42
|
+
object-fit: cover;
|
|
43
|
+
width: 100%;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
& .skeleton-img {
|
|
47
|
+
width: 100%;
|
|
48
|
+
max-height: 12.5625rem;
|
|
49
|
+
min-height: 12.5625rem;
|
|
50
|
+
background-color: ${C("-90deg")};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
& .action {
|
|
54
|
+
padding: 0 1rem 1rem 1rem;
|
|
55
|
+
margin-top: auto;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@media (max-width: ${f + "px"}) {
|
|
59
|
+
}
|
|
60
|
+
`, b = p.div`
|
|
61
|
+
padding: 1rem 1rem 0 1rem;
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
gap: 0.25rem;
|
|
65
|
+
color: var(--gray-950, #14161a);
|
|
66
|
+
border-top: 1px solid var(--gray-95008);
|
|
67
|
+
|
|
68
|
+
& .text-wr-title {
|
|
69
|
+
font-weight: 600;
|
|
70
|
+
font-size: 1rem;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
& .text-wr {
|
|
74
|
+
font-weight: 400;
|
|
75
|
+
font-size: 0.875rem;
|
|
76
|
+
flex: 1;
|
|
77
|
+
color: var(--gray-700, #4e555f);
|
|
78
|
+
${N(3)}
|
|
79
|
+
}
|
|
80
|
+
`;
|
|
81
|
+
s(({}, r) => (
|
|
82
|
+
// <LandingPageClearProductCardSkeleton />
|
|
83
|
+
/* @__PURE__ */ a(v, { className: "product-card", children: [
|
|
84
|
+
/* @__PURE__ */ t("div", { className: "skeleton-img" }),
|
|
85
|
+
/* @__PURE__ */ t("div", { className: "card-title" }),
|
|
86
|
+
/* @__PURE__ */ t(b, {})
|
|
87
|
+
] })
|
|
88
|
+
));
|
|
89
|
+
const h = s((r, w) => {
|
|
90
|
+
const { title: l, image: m, text: d, onCardClick: o, readMoreText: n = "Read more" } = r;
|
|
91
|
+
return (
|
|
92
|
+
// <SimpleBlogCardSkeleton />
|
|
93
|
+
/* @__PURE__ */ a(v, { className: "blog-card", onClick: o, children: [
|
|
94
|
+
/* @__PURE__ */ t("img", { src: m }),
|
|
95
|
+
/* @__PURE__ */ a(b, { children: [
|
|
96
|
+
/* @__PURE__ */ t("div", { className: "text-wr-title", children: l }),
|
|
97
|
+
/* @__PURE__ */ t("div", { className: "text-wr", children: d })
|
|
98
|
+
] }),
|
|
99
|
+
/* @__PURE__ */ t($, { className: "action", color: "gray", onClick: o, children: n })
|
|
100
|
+
] })
|
|
101
|
+
);
|
|
102
|
+
}), G = s((r, w) => {
|
|
103
|
+
const {
|
|
104
|
+
icon: l,
|
|
105
|
+
title: m,
|
|
106
|
+
onButtonAction: d = () => {
|
|
107
|
+
},
|
|
108
|
+
onSelectCard: o = () => {
|
|
109
|
+
},
|
|
110
|
+
buttonLink: n,
|
|
111
|
+
items: i,
|
|
112
|
+
buttonText: y,
|
|
113
|
+
limit: g = 3
|
|
114
|
+
} = r, k = S();
|
|
115
|
+
return /* @__PURE__ */ a(R, { children: [
|
|
116
|
+
/* @__PURE__ */ a("div", { className: "regular-title", children: [
|
|
117
|
+
/* @__PURE__ */ a("div", { className: "regular-title-text", children: [
|
|
118
|
+
u(l) && /* @__PURE__ */ t("i", { className: l }),
|
|
119
|
+
/* @__PURE__ */ t("span", { children: m })
|
|
120
|
+
] }),
|
|
121
|
+
u(n) && /* @__PURE__ */ t(
|
|
122
|
+
T,
|
|
123
|
+
{
|
|
124
|
+
type: "button",
|
|
125
|
+
btnType: "tinted",
|
|
126
|
+
color: "gray",
|
|
127
|
+
onClick: () => d(n),
|
|
128
|
+
borderRadius: "curved",
|
|
129
|
+
children: y
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
] }),
|
|
133
|
+
/* @__PURE__ */ t(B, { limit: g, children: k === !0 ? i == null ? void 0 : i.map((e, c) => /* @__PURE__ */ t(
|
|
134
|
+
h,
|
|
135
|
+
{
|
|
136
|
+
title: e == null ? void 0 : e.title,
|
|
137
|
+
image: e == null ? void 0 : e.image,
|
|
138
|
+
text: e == null ? void 0 : e.text,
|
|
139
|
+
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
140
|
+
onCardClick: () => o(e == null ? void 0 : e.uuid)
|
|
141
|
+
},
|
|
142
|
+
c
|
|
143
|
+
)) : i == null ? void 0 : i.slice(0, g).map((e, c) => /* @__PURE__ */ t(
|
|
144
|
+
h,
|
|
145
|
+
{
|
|
146
|
+
title: e == null ? void 0 : e.title,
|
|
147
|
+
image: e == null ? void 0 : e.image,
|
|
148
|
+
text: e == null ? void 0 : e.text,
|
|
149
|
+
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
150
|
+
onCardClick: () => o(e == null ? void 0 : e.uuid)
|
|
151
|
+
},
|
|
152
|
+
c
|
|
153
|
+
)) })
|
|
154
|
+
] });
|
|
155
|
+
});
|
|
156
|
+
export {
|
|
157
|
+
G as default
|
|
158
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),s=require("react"),m=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),g=require("./consts-CtNoHdBj.cjs"),w=require("./useDetectMobile-D6d5LpdL.cjs"),d=require("./utils-C0YSTwcn.cjs"),b=require("./Button.cjs"),f=m.newStyled.div`
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: ${i=>`repeat(${i.limit}, minmax(0, 1fr))`};
|
|
4
|
+
gap: 1.25rem;
|
|
5
|
+
margin: auto;
|
|
6
|
+
|
|
7
|
+
@media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
|
|
8
|
+
grid-template-columns: repeat(1, 1fr);
|
|
9
|
+
}
|
|
10
|
+
`,h=m.newStyled.div`
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
width: 100%;
|
|
14
|
+
max-width: 18.125rem;
|
|
15
|
+
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1),
|
|
16
|
+
0px 1px 2px 0px rgba(0, 0, 0, 0.06);
|
|
17
|
+
background-color: var(--white);
|
|
18
|
+
border-radius: 0.75rem;
|
|
19
|
+
border: 1px solid var(--gray-95008);
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
gap: 1.5rem;
|
|
22
|
+
padding: 2rem 1.25rem;
|
|
23
|
+
min-height: 22.5rem;
|
|
24
|
+
max-height: 22.5rem;
|
|
25
|
+
align-items: center;
|
|
26
|
+
|
|
27
|
+
& button {
|
|
28
|
+
width: fit-content;
|
|
29
|
+
margin-top: auto;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
& img {
|
|
33
|
+
max-width: 6rem;
|
|
34
|
+
min-width: 6rem;
|
|
35
|
+
min-height: 6rem;
|
|
36
|
+
max-height: 6rem;
|
|
37
|
+
border-radius: 0.75rem;
|
|
38
|
+
object-fit: cover;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
& .skeleton-img {
|
|
42
|
+
max-width: 6rem;
|
|
43
|
+
min-width: 6rem;
|
|
44
|
+
min-height: 6rem;
|
|
45
|
+
max-height: 6rem;
|
|
46
|
+
border-radius: 0.75rem;
|
|
47
|
+
background-color: ${d.linearGradientAnimation("-90deg")};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
|
|
51
|
+
max-width: unset;
|
|
52
|
+
}
|
|
53
|
+
`,p=m.newStyled.div`
|
|
54
|
+
text-align: center;
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
gap: 0.5rem;
|
|
58
|
+
color: var(--gray-950, #14161a);
|
|
59
|
+
|
|
60
|
+
& .text-wr-title {
|
|
61
|
+
font-weight: 600;
|
|
62
|
+
font-size: 1.375rem;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
& .skeleton-title {
|
|
66
|
+
height: 1.75rem;
|
|
67
|
+
width: 80%;
|
|
68
|
+
background-color: ${d.linearGradientAnimation("-90deg")};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
& .text-wr {
|
|
72
|
+
font-weight: 400;
|
|
73
|
+
font-size: 0.875rem;
|
|
74
|
+
flex: 1;
|
|
75
|
+
color: var(--gray-700, #4e555f);
|
|
76
|
+
${d.truncateTextInRows(3)}
|
|
77
|
+
}
|
|
78
|
+
`;s.forwardRef((i,c)=>{const{onCardClick:r}=i;return t.jsxs(h,{className:"product-card",onClick:r,children:[t.jsx("div",{"skeleton-img":!0}),t.jsx(p,{children:t.jsx("div",{className:"skeleton-title"})})]})});const u=s.forwardRef((i,c)=>{const{title:r,image:n,text:o,buttonText:a,onCardClick:e}=i;return t.jsxs(h,{className:"blog-card",onClick:e,children:[t.jsx("img",{src:n}),t.jsxs(p,{children:[t.jsx("div",{className:"text-wr-title",children:r}),t.jsx("div",{className:"text-wr",children:o})]}),t.jsx(b,{borderRadius:"curved",color:"gray",type:"button",btnType:"outline",onClick:e,size:"medium",children:a})]})}),j=s.forwardRef((i,c)=>{const{items:r,limit:n=3,onSelectCard:o=()=>{}}=i,a=w.useDetectMobile();return t.jsx(f,{limit:n,children:a===!0?r==null?void 0:r.map((e,l)=>t.jsx(u,{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:()=>o(e==null?void 0:e.uuid)},l)):r==null?void 0:r.slice(0,n).map((e,l)=>t.jsx(u,{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:()=>o(e==null?void 0:e.uuid)},l))})});module.exports=j;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as d } from "react";
|
|
3
|
+
import { n as c } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
4
|
+
import { M as p } from "./consts-C1uHV4xc.js";
|
|
5
|
+
import { u as b } from "./useDetectMobile-BC6EGaBc.js";
|
|
6
|
+
import { m as u, t as w } from "./utils-CqvISfv9.js";
|
|
7
|
+
import C from "./Button.js";
|
|
8
|
+
const k = c.div`
|
|
9
|
+
display: grid;
|
|
10
|
+
grid-template-columns: ${(i) => `repeat(${i.limit}, minmax(0, 1fr))`};
|
|
11
|
+
gap: 1.25rem;
|
|
12
|
+
margin: auto;
|
|
13
|
+
|
|
14
|
+
@media (max-width: ${p + "px"}) {
|
|
15
|
+
grid-template-columns: repeat(1, 1fr);
|
|
16
|
+
}
|
|
17
|
+
`, h = c.div`
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
width: 100%;
|
|
21
|
+
max-width: 18.125rem;
|
|
22
|
+
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1),
|
|
23
|
+
0px 1px 2px 0px rgba(0, 0, 0, 0.06);
|
|
24
|
+
background-color: var(--white);
|
|
25
|
+
border-radius: 0.75rem;
|
|
26
|
+
border: 1px solid var(--gray-95008);
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
gap: 1.5rem;
|
|
29
|
+
padding: 2rem 1.25rem;
|
|
30
|
+
min-height: 22.5rem;
|
|
31
|
+
max-height: 22.5rem;
|
|
32
|
+
align-items: center;
|
|
33
|
+
|
|
34
|
+
& button {
|
|
35
|
+
width: fit-content;
|
|
36
|
+
margin-top: auto;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
& img {
|
|
40
|
+
max-width: 6rem;
|
|
41
|
+
min-width: 6rem;
|
|
42
|
+
min-height: 6rem;
|
|
43
|
+
max-height: 6rem;
|
|
44
|
+
border-radius: 0.75rem;
|
|
45
|
+
object-fit: cover;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
& .skeleton-img {
|
|
49
|
+
max-width: 6rem;
|
|
50
|
+
min-width: 6rem;
|
|
51
|
+
min-height: 6rem;
|
|
52
|
+
max-height: 6rem;
|
|
53
|
+
border-radius: 0.75rem;
|
|
54
|
+
background-color: ${u("-90deg")};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@media (max-width: ${p + "px"}) {
|
|
58
|
+
max-width: unset;
|
|
59
|
+
}
|
|
60
|
+
`, f = c.div`
|
|
61
|
+
text-align: center;
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
gap: 0.5rem;
|
|
65
|
+
color: var(--gray-950, #14161a);
|
|
66
|
+
|
|
67
|
+
& .text-wr-title {
|
|
68
|
+
font-weight: 600;
|
|
69
|
+
font-size: 1.375rem;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
& .skeleton-title {
|
|
73
|
+
height: 1.75rem;
|
|
74
|
+
width: 80%;
|
|
75
|
+
background-color: ${u("-90deg")};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
& .text-wr {
|
|
79
|
+
font-weight: 400;
|
|
80
|
+
font-size: 0.875rem;
|
|
81
|
+
flex: 1;
|
|
82
|
+
color: var(--gray-700, #4e555f);
|
|
83
|
+
${w(3)}
|
|
84
|
+
}
|
|
85
|
+
`;
|
|
86
|
+
d((i, s) => {
|
|
87
|
+
const { onCardClick: t } = i;
|
|
88
|
+
return (
|
|
89
|
+
// <SimpleBlogCardSkeleton />
|
|
90
|
+
/* @__PURE__ */ l(h, { className: "product-card", onClick: t, children: [
|
|
91
|
+
/* @__PURE__ */ r("div", { "skeleton-img": !0 }),
|
|
92
|
+
/* @__PURE__ */ r(f, { children: /* @__PURE__ */ r("div", { className: "skeleton-title" }) })
|
|
93
|
+
] })
|
|
94
|
+
);
|
|
95
|
+
});
|
|
96
|
+
const g = d((i, s) => {
|
|
97
|
+
const { title: t, image: o, text: a, buttonText: m, onCardClick: e } = i;
|
|
98
|
+
return (
|
|
99
|
+
// <SimpleBlogCardCenteredSkeleton />
|
|
100
|
+
/* @__PURE__ */ l(h, { className: "blog-card", onClick: e, children: [
|
|
101
|
+
/* @__PURE__ */ r("img", { src: o }),
|
|
102
|
+
/* @__PURE__ */ l(f, { children: [
|
|
103
|
+
/* @__PURE__ */ r("div", { className: "text-wr-title", children: t }),
|
|
104
|
+
/* @__PURE__ */ r("div", { className: "text-wr", children: a })
|
|
105
|
+
] }),
|
|
106
|
+
/* @__PURE__ */ r(
|
|
107
|
+
C,
|
|
108
|
+
{
|
|
109
|
+
borderRadius: "curved",
|
|
110
|
+
color: "gray",
|
|
111
|
+
type: "button",
|
|
112
|
+
btnType: "outline",
|
|
113
|
+
onClick: e,
|
|
114
|
+
size: "medium",
|
|
115
|
+
children: m
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
] })
|
|
119
|
+
);
|
|
120
|
+
}), M = d((i, s) => {
|
|
121
|
+
const { items: t, limit: o = 3, onSelectCard: a = () => {
|
|
122
|
+
} } = i, m = b();
|
|
123
|
+
return /* @__PURE__ */ r(k, { limit: o, children: m === !0 ? t == null ? void 0 : t.map((e, n) => /* @__PURE__ */ r(
|
|
124
|
+
g,
|
|
125
|
+
{
|
|
126
|
+
title: e == null ? void 0 : e.title,
|
|
127
|
+
image: e == null ? void 0 : e.image,
|
|
128
|
+
text: e == null ? void 0 : e.text,
|
|
129
|
+
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
130
|
+
buttonText: e == null ? void 0 : e.buttonText,
|
|
131
|
+
onCardClick: () => a(e == null ? void 0 : e.uuid)
|
|
132
|
+
},
|
|
133
|
+
n
|
|
134
|
+
)) : t == null ? void 0 : t.slice(0, o).map((e, n) => /* @__PURE__ */ r(
|
|
135
|
+
g,
|
|
136
|
+
{
|
|
137
|
+
title: e == null ? void 0 : e.title,
|
|
138
|
+
image: e == null ? void 0 : e.image,
|
|
139
|
+
text: e == null ? void 0 : e.text,
|
|
140
|
+
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
141
|
+
buttonText: e == null ? void 0 : e.buttonText,
|
|
142
|
+
onCardClick: () => a(e == null ? void 0 : e.uuid)
|
|
143
|
+
},
|
|
144
|
+
n
|
|
145
|
+
)) });
|
|
146
|
+
});
|
|
147
|
+
export {
|
|
148
|
+
M as default
|
|
149
|
+
};
|
|
@@ -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-CtNoHdBj.cjs"),H=require("./useDetectMobile-D6d5LpdL.cjs"),T=require("./utils-C0YSTwcn.cjs"),X=require("./style-BEUISPP7.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;
|