@lanaco/lnc-react-ui 4.0.35 → 4.0.37
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 +5 -5
- package/dist/Accordion.js +11 -11
- package/dist/AccordionDetails.cjs +1 -1
- package/dist/AccordionDetails.js +1 -1
- package/dist/AccordionSummary.cjs +1 -1
- package/dist/AccordionSummary.js +3 -3
- package/dist/ActionsToolbar.cjs +1 -1
- package/dist/ActionsToolbar.js +2 -2
- package/dist/Alert.cjs +1 -1
- package/dist/Alert.js +2 -2
- package/dist/Avatar.cjs +1 -1
- package/dist/Avatar.js +3 -3
- package/dist/Badge.cjs +2 -2
- package/dist/Badge.js +3 -3
- package/dist/BannerSectionBasic.cjs +1 -1
- package/dist/BannerSectionBasic.js +1 -1
- package/dist/BannerSectionCarousel.cjs +2 -2
- package/dist/BannerSectionCarousel.js +63 -63
- package/dist/BannerSectionGrid.cjs +3 -3
- package/dist/BannerSectionGrid.js +43 -39
- package/dist/BannerSectionSimple.cjs +1 -1
- package/dist/BannerSectionSimple.js +1 -1
- 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 +1 -1
- package/dist/BlogsSectionDetailed.js +3 -3
- package/dist/BlogsSectionLarge.cjs +1 -1
- package/dist/BlogsSectionLarge.js +2 -2
- package/dist/BlogsSectionSimple.cjs +1 -1
- package/dist/BlogsSectionSimple.js +3 -3
- package/dist/BlogsSectionSimpleCentered.cjs +1 -1
- package/dist/BlogsSectionSimpleCentered.js +2 -2
- package/dist/BlogsSectionWithFilters.cjs +11 -108
- package/dist/BlogsSectionWithFilters.js +59 -437
- package/dist/BrandHitsSection.cjs +1 -1
- package/dist/BrandHitsSection.js +2 -2
- package/dist/Breadcrumbs.cjs +3 -3
- package/dist/Breadcrumbs.js +12 -12
- package/dist/Button.cjs +1 -1
- package/dist/Button.js +4 -4
- package/dist/ButtonGroup.cjs +1 -1
- package/dist/ButtonGroup.js +3 -3
- package/dist/CalorieCalculatorSection.cjs +333 -0
- package/dist/CalorieCalculatorSection.js +851 -0
- package/dist/CheckBoxInput.cjs +1 -1
- package/dist/CheckBoxInput.js +3 -3
- package/dist/Chip.cjs +2 -2
- package/dist/Chip.js +3 -3
- package/dist/ColorInput.cjs +1 -1
- package/dist/ColorInput.js +4 -4
- package/dist/ConfirmationForm.cjs +2 -2
- package/dist/ConfirmationForm.js +3 -3
- package/dist/CustomLoanMapSection.cjs +1 -1
- package/dist/CustomLoanMapSection.js +2 -2
- package/dist/{CustomStyles-BMY2-z7P.js → CustomStyles-BwnfUVvi.js} +8 -8
- package/dist/{CustomStyles-zroEcINq.cjs → CustomStyles-DUDHRSkh.cjs} +2 -2
- package/dist/DataView.cjs +1 -1
- package/dist/DataView.js +1 -1
- package/dist/DateInput.cjs +4 -4
- package/dist/DateInput.js +76 -80
- package/dist/DecimalInput.cjs +3 -3
- package/dist/DecimalInput.js +4 -4
- package/dist/DecimalInputV2.cjs +2 -2
- package/dist/DecimalInputV2.js +3 -3
- package/dist/DetailedProductsSection.cjs +1 -1
- package/dist/DetailedProductsSection.js +4 -4
- package/dist/DetailsView.cjs +2 -2
- package/dist/DetailsView.js +3 -3
- package/dist/DoubleRangeSlider.cjs +1 -1
- package/dist/DoubleRangeSlider.js +3 -3
- package/dist/DragAndDropFile.cjs +6 -6
- package/dist/DragAndDropFile.js +4 -4
- package/dist/DragDropFiles.cjs +1 -1
- package/dist/DragDropFiles.js +3 -3
- package/dist/Drawer.cjs +1 -1
- package/dist/Drawer.js +12 -12
- package/dist/Dropdown.cjs +1 -1
- package/dist/Dropdown.js +5 -5
- package/dist/DropdownItem.cjs +1 -1
- package/dist/DropdownItem.js +10 -10
- package/dist/DropdownLookup.cjs +1 -1
- package/dist/DropdownLookup.js +5 -5
- package/dist/DropdownMenu.cjs +1 -1
- package/dist/DropdownMenu.js +6 -6
- package/dist/EditableTable.cjs +1 -1
- package/dist/EditableTable.js +3 -3
- package/dist/FieldOfInterestsMasonrySection.cjs +6 -6
- package/dist/FieldOfInterestsMasonrySection.js +43 -42
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +1 -1
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +3 -3
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +3 -3
- package/dist/FieldOfInterestsWithTagsCardsSection.js +3 -3
- package/dist/FileInput.cjs +2 -2
- package/dist/FileInput.js +3 -3
- package/dist/FlexBox.cjs +1 -1
- package/dist/FlexBox.js +1 -1
- package/dist/FlexGridItem.cjs +1 -1
- package/dist/FlexGridItem.js +2 -2
- package/dist/FormField.cjs +1 -1
- package/dist/FormField.js +7 -7
- package/dist/FormView.cjs +2 -2
- package/dist/FormView.js +15 -15
- package/dist/GeneralWithTagsCardsSection.cjs +1 -1
- package/dist/GeneralWithTagsCardsSection.js +3 -3
- package/dist/GiftCardsSection.cjs +1 -1
- package/dist/GiftCardsSection.js +2 -2
- package/dist/Grid.cjs +1 -1
- package/dist/Grid.js +1 -1
- package/dist/GridItem.cjs +1 -1
- package/dist/GridItem.js +1 -1
- package/dist/Icon.cjs +2 -2
- package/dist/Icon.js +6 -6
- package/dist/IconButton.cjs +1 -1
- package/dist/IconButton.js +3 -3
- package/dist/Kanban.cjs +7 -7
- package/dist/Kanban.js +37 -41
- package/dist/KanbanActionsToolbar.cjs +1 -1
- package/dist/KanbanActionsToolbar.js +2 -2
- package/dist/{KanbanCard-BDyFaKYd.js → KanbanCard-BDRSqfVD.js} +2 -2
- package/dist/{KanbanCard-CofqdTrO.cjs → KanbanCard-CLOKZFYP.cjs} +1 -1
- package/dist/KanbanCard.cjs +1 -1
- package/dist/KanbanCard.js +3 -3
- package/dist/KanbanFooter.cjs +1 -1
- package/dist/KanbanFooter.js +2 -2
- package/dist/KanbanHeader.cjs +2 -2
- package/dist/KanbanHeader.js +2 -2
- package/dist/KanbanView.cjs +1 -1
- package/dist/KanbanView.js +3 -3
- package/dist/Link.cjs +2 -2
- package/dist/Link.js +6 -6
- package/dist/LocationSearchSection.cjs +53 -0
- package/dist/LocationSearchSection.js +108 -0
- package/dist/MasonryGeneralCardsSection.cjs +1 -1
- package/dist/MasonryGeneralCardsSection.js +3 -3
- package/dist/MenuItem.cjs +2 -2
- package/dist/MenuItem.js +3 -3
- package/dist/Modal.cjs +1 -1
- package/dist/Modal.js +6 -6
- package/dist/MultiSelectDropdown.cjs +1 -1
- package/dist/MultiSelectDropdown.js +3 -3
- package/dist/MultiSelectDropdownLookup.cjs +1 -1
- package/dist/MultiSelectDropdownLookup.js +3 -3
- package/dist/NestedDropdownItem.cjs +1 -1
- package/dist/NestedDropdownItem.js +9 -9
- package/dist/NestedMenuItem.cjs +2 -2
- package/dist/NestedMenuItem.js +8 -8
- package/dist/Notification.cjs +1 -1
- package/dist/Notification.js +1 -1
- package/dist/NotificationContainer.cjs +1 -1
- package/dist/NotificationContainer.js +3 -3
- package/dist/NotificationMessage.cjs +1 -1
- package/dist/NotificationMessage.js +3 -3
- package/dist/NumberInput.cjs +2 -2
- package/dist/NumberInput.js +4 -4
- package/dist/OverlayGeneralCardsSection.cjs +1 -1
- package/dist/OverlayGeneralCardsSection.js +3 -3
- package/dist/PageLayout.cjs +2 -2
- package/dist/PageLayout.js +2 -2
- package/dist/Pagination.cjs +2 -2
- package/dist/Pagination.js +2 -2
- package/dist/PasswordInput.cjs +2 -2
- package/dist/PasswordInput.js +4 -4
- package/dist/PopoverContent.cjs +1 -1
- package/dist/PopoverContent.js +5 -5
- package/dist/PopoverDescription.cjs +1 -1
- package/dist/PopoverDescription.js +1 -1
- package/dist/PopoverHeading.cjs +1 -1
- package/dist/PopoverHeading.js +1 -1
- package/dist/PopoverTrigger.cjs +1 -1
- package/dist/PopoverTrigger.js +1 -1
- package/dist/ProductsWithBannerSection.cjs +1 -1
- package/dist/ProductsWithBannerSection.js +3 -3
- package/dist/ProgressBar.cjs +1 -1
- package/dist/ProgressBar.js +8 -8
- package/dist/QuizSection.cjs +1 -1
- package/dist/QuizSection.js +2 -2
- package/dist/RadioGroup.cjs +1 -1
- package/dist/RadioGroup.js +2 -2
- package/dist/RadioInput.cjs +1 -1
- package/dist/RadioInput.js +3 -3
- package/dist/RangeSlider.cjs +2 -2
- package/dist/RangeSlider.js +3 -3
- package/dist/SalesCampaignsSection.cjs +423 -0
- package/dist/SalesCampaignsSection.js +967 -0
- package/dist/SearchBar.cjs +1 -1
- package/dist/SearchBar.js +6 -6
- package/dist/Separator.cjs +1 -1
- package/dist/Separator.js +3 -3
- package/dist/ShopCardsSection.cjs +1 -1
- package/dist/ShopCardsSection.js +2 -2
- package/dist/Sidebar.cjs +1 -1
- package/dist/Sidebar.js +3 -3
- package/dist/SimpleCategoriesSection.cjs +9 -9
- package/dist/SimpleCategoriesSection.js +48 -44
- package/dist/SimpleProductsSection.cjs +1 -1
- package/dist/SimpleProductsSection.js +3 -3
- package/dist/Spinner.cjs +1 -1
- package/dist/Spinner.js +12 -12
- package/dist/Surface.cjs +2 -2
- package/dist/Surface.js +3 -3
- package/dist/SwipeableDrawer.cjs +2 -2
- package/dist/SwipeableDrawer.js +3 -3
- package/dist/TabItem.cjs +1 -1
- package/dist/TabItem.js +11 -11
- package/dist/Table.cjs +7 -7
- package/dist/Table.js +4 -4
- package/dist/TableView.cjs +1 -1
- package/dist/TableView.js +2 -2
- package/dist/Tabs.cjs +2 -2
- package/dist/Tabs.js +2 -2
- package/dist/TextAreaInput.cjs +12 -12
- package/dist/TextAreaInput.js +124 -112
- package/dist/TextInput.cjs +2 -2
- package/dist/TextInput.js +4 -4
- package/dist/ThemeProvider.cjs +10 -10
- package/dist/ThemeProvider.js +189 -187
- package/dist/TimeInput.cjs +2 -2
- package/dist/TimeInput.js +4 -4
- package/dist/Toggle.cjs +15 -15
- package/dist/Toggle.js +40 -50
- package/dist/TreeMenu.cjs +1 -1
- package/dist/TreeMenu.js +1 -1
- package/dist/TreeMenuSeparator.cjs +1 -1
- package/dist/TreeMenuSeparator.js +3 -3
- package/dist/UploadedFile.cjs +2 -2
- package/dist/UploadedFile.js +16 -16
- package/dist/UrgentSaleProductsSection.cjs +1 -1
- package/dist/UrgentSaleProductsSection.js +2 -2
- package/dist/{defineProperty-DHvxLH8G.cjs → defineProperty-CqVRDJI8.cjs} +1 -1
- package/dist/{defineProperty-B5pLF6px.js → defineProperty-DF3p0mVo.js} +5 -5
- package/dist/emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs +1 -0
- package/dist/emotion-element-f0de968e.browser.esm-CkCiQliQ.js +877 -0
- package/dist/{emotion-is-prop-valid.esm-CMrshNb7.cjs → emotion-is-prop-valid.esm-BNsx9k19.cjs} +1 -1
- package/dist/{emotion-is-prop-valid.esm-DkbeH1Xy.js → emotion-is-prop-valid.esm-CbWxtx4i.js} +1 -1
- package/dist/emotion-react.browser.esm-1R69UXoj.cjs +1 -0
- package/dist/emotion-react.browser.esm-C6iWxXPG.js +95 -0
- package/dist/{emotion-styled.browser.esm-BiK8DcgW.js → emotion-styled.browser.esm-CjCaF13H.js} +55 -53
- package/dist/emotion-styled.browser.esm-Cle7tAM9.cjs +1 -0
- package/dist/floating-ui.dom-CFbLeFcw.cjs +1 -0
- package/dist/floating-ui.dom-vNhdy5RI.js +947 -0
- package/dist/{floating-ui.react.esm-C4vrBVJU.cjs → floating-ui.react.esm-7Yt4LHw6.cjs} +1 -1
- package/dist/{floating-ui.react.esm-72DKnou_.js → floating-ui.react.esm-umB-tMXa.js} +3 -3
- package/dist/{index--Kmch3aI.js → index-64mXPFBC.js} +6724 -6724
- package/dist/{index-CvebWhtp.js → index-BlxaTV-D.js} +1 -1
- package/dist/{index-CkPex_K5.js → index-CHkb_Sj6.js} +2 -2
- package/dist/index-CT6_7UFb.js +350 -0
- package/dist/index-Cb_AeN9A.cjs +4 -0
- package/dist/{index-CNBqQrtK.js → index-CkWvbrVT.js} +1 -1
- package/dist/{index-BUChtubz.js → index-D-c5IxDk.js} +1 -1
- package/dist/{index-DKztZfzw.js → index-D6g5ZqyJ.js} +2 -2
- package/dist/{index-BP5r5zGN.cjs → index-DZoWlChs.cjs} +1 -1
- package/dist/{index-B67WqHGh.cjs → index-Dit169OA.cjs} +1 -1
- package/dist/{index-BmobrEkT.cjs → index-Dj5wZCVs.cjs} +1 -1
- package/dist/{index-CTJZaJ_S.js → index-DxdBg_r_.js} +1 -1
- package/dist/index-EeoArxOx.cjs +174 -0
- package/dist/index-Q_i-aqsF.cjs +95 -0
- package/dist/{index-C5vAqIS6.cjs → index-vXmvgZ2Y.cjs} +1 -1
- package/dist/index-wy-PXQR9.js +47 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +96 -92
- package/dist/{motion-Oud-wpUz.cjs → motion-B_VPZaJq.cjs} +1 -1
- package/dist/{motion-ecIGZGwI.js → motion-Ckekul_K.js} +1 -1
- package/dist/objectWithoutPropertiesLoose-BLga_MQA.cjs +1 -0
- package/dist/{objectWithoutPropertiesLoose-DwEN6RBQ.js → objectWithoutPropertiesLoose-DhwSMsjf.js} +1 -1
- package/dist/{react-toastify.esm-CkXGwKXL.js → react-toastify.esm--2awuizG.js} +1 -1
- package/dist/{react-toastify.esm-Dqcb4SQT.cjs → react-toastify.esm-Dq1k28O7.cjs} +1 -1
- package/dist/{style-BGQ1B_dp.js → style-6tSw9aqK.js} +1 -1
- package/dist/{style-BEUISPP7.cjs → style-BR3tIhP1.cjs} +1 -1
- package/dist/usePopover.cjs +1 -1
- package/dist/usePopover.js +6 -6
- package/dist/{utils-jiuifwtJ.js → utils-DtRLzzTZ.js} +224 -73
- package/dist/utils-NZLCh-J5.cjs +51 -0
- package/package.json +5 -2
- package/vite.config.js +12 -1
- package/dist/emotion-element-5486c51c.browser.esm-Bb4VkP8U.js +0 -886
- package/dist/emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs +0 -1
- package/dist/emotion-react.browser.esm-CN-s34fZ.js +0 -94
- package/dist/emotion-react.browser.esm-D7h2t2Bz.cjs +0 -1
- package/dist/emotion-styled.browser.esm-Cbp_XsK4.cjs +0 -1
- package/dist/floating-ui.dom-1F2mTXOe.cjs +0 -1
- package/dist/floating-ui.dom-BdUovkEr.js +0 -938
- package/dist/index-Ct1N7fF4.cjs +0 -174
- package/dist/objectWithoutPropertiesLoose-Bz3hwpmU.cjs +0 -1
- package/dist/utils-scuIeOqU.cjs +0 -51
package/dist/ProgressBar.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as m, jsx as h } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as f, isValidElement as P, cloneElement as y } from "react";
|
|
3
3
|
import { P as r } from "./index-S5Cd7WrG.js";
|
|
4
|
-
import { n as t } from "./emotion-styled.browser.esm-
|
|
5
|
-
import {
|
|
6
|
-
import { u as w } from "./emotion-element-
|
|
4
|
+
import { n as t } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
5
|
+
import { b as n, c as x } from "./utils-DtRLzzTZ.js";
|
|
6
|
+
import { u as w } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
7
7
|
const $ = t.div`
|
|
8
8
|
width: 100%;
|
|
9
9
|
position: relative;
|
|
@@ -50,7 +50,7 @@ const $ = t.div`
|
|
|
50
50
|
id: T = "",
|
|
51
51
|
showLabel: i = !1,
|
|
52
52
|
progressPercentage: s = 0,
|
|
53
|
-
className:
|
|
53
|
+
className: g = "",
|
|
54
54
|
style: d = {},
|
|
55
55
|
onChange: j = () => {
|
|
56
56
|
},
|
|
@@ -65,11 +65,11 @@ const $ = t.div`
|
|
|
65
65
|
className: `progress-icon ${(c = o == null ? void 0 : o.props) == null ? void 0 : c.className}`
|
|
66
66
|
});
|
|
67
67
|
};
|
|
68
|
-
return /* @__PURE__ */
|
|
68
|
+
return /* @__PURE__ */ m(
|
|
69
69
|
$,
|
|
70
70
|
{
|
|
71
71
|
style: d,
|
|
72
|
-
className: "lnc-ui-progress " +
|
|
72
|
+
className: "lnc-ui-progress " + g,
|
|
73
73
|
theme: a,
|
|
74
74
|
size: l,
|
|
75
75
|
showLabel: i,
|
|
@@ -85,7 +85,7 @@ const $ = t.div`
|
|
|
85
85
|
children: o !== null && u()
|
|
86
86
|
}
|
|
87
87
|
),
|
|
88
|
-
i && /* @__PURE__ */
|
|
88
|
+
i && /* @__PURE__ */ m(C, { theme: a, size: l, children: [
|
|
89
89
|
s,
|
|
90
90
|
"%"
|
|
91
91
|
] })
|
package/dist/QuizSection.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),i=require("react"),z=require("./utils-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),i=require("react"),z=require("./utils-NZLCh-J5.cjs"),k=require("./Button.cjs"),S=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),p=require("./consts-CtNoHdBj.cjs"),A=require("./Icon.cjs"),H=require("./ProgressBar.cjs"),J=S.newStyled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
justify-content: center;
|
package/dist/QuizSection.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as T, useState as b, useRef as D, useEffect as q } from "react";
|
|
3
|
-
import { p as ee, l as B, q as re } from "./utils-
|
|
3
|
+
import { p as ee, l as B, q as re } from "./utils-DtRLzzTZ.js";
|
|
4
4
|
import R from "./Button.js";
|
|
5
|
-
import { n as Q } from "./emotion-styled.browser.esm-
|
|
5
|
+
import { n as Q } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
6
6
|
import { M as S, C as M, a as L } from "./consts-C1uHV4xc.js";
|
|
7
7
|
import F from "./Icon.js";
|
|
8
8
|
import te from "./ProgressBar.js";
|
package/dist/RadioGroup.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const p=require("react/jsx-runtime"),n=require("react"),I=require("./emotion-styled.browser.esm-
|
|
1
|
+
"use strict";const p=require("react/jsx-runtime"),n=require("react"),I=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),e=require("./index-BPVoEhTF.cjs"),O=require("./RadioInput.cjs"),R=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),_=I.newStyled.div`
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
flex-direction: ${s=>s.inline===!0?"row":"column"};
|
|
4
4
|
gap: 1.5rem;
|
package/dist/RadioGroup.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as P, useState as j, useEffect as z } from "react";
|
|
3
|
-
import { n as R } from "./emotion-styled.browser.esm-
|
|
3
|
+
import { n as R } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
4
4
|
import { P as e } from "./index-S5Cd7WrG.js";
|
|
5
5
|
import T from "./RadioInput.js";
|
|
6
|
-
import { u as k } from "./emotion-element-
|
|
6
|
+
import { u as k } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
7
7
|
const N = R.div`
|
|
8
8
|
display: inline-flex;
|
|
9
9
|
flex-direction: ${(r) => r.inline === !0 ? "row" : "column"};
|
package/dist/RadioInput.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),h=require("react"),m=require("./emotion-styled.browser.esm-
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),h=require("react"),m=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),r=require("./index-BPVoEhTF.cjs"),o=require("./utils-NZLCh-J5.cjs"),O=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),j=e=>e=="left"?"row-reverse":"row",q=m.newStyled.label`
|
|
2
2
|
min-height: ${e=>o.getSizeValueWithUnits(e.theme,e.size)};
|
|
3
3
|
max-height: ${e=>o.getSizeValueWithUnits(e.theme,e.size)};
|
|
4
4
|
width: 100%;
|
package/dist/RadioInput.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as b, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as P, useState as j } from "react";
|
|
3
|
-
import { n as g } from "./emotion-styled.browser.esm-
|
|
3
|
+
import { n as g } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
4
4
|
import { P as i } from "./index-S5Cd7WrG.js";
|
|
5
|
-
import { d as f,
|
|
6
|
-
import { u as F } from "./emotion-element-
|
|
5
|
+
import { d as f, c as N, e as T, b as t } from "./utils-DtRLzzTZ.js";
|
|
6
|
+
import { u as F } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
7
7
|
const I = (e) => e == "left" ? "row-reverse" : "row", D = g.label`
|
|
8
8
|
min-height: ${(e) => f(e.theme, e.size)};
|
|
9
9
|
max-height: ${(e) => f(e.theme, e.size)};
|
package/dist/RangeSlider.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),y=require("./emotion-styled.browser.esm-
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),y=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),n=require("./index-BPVoEhTF.cjs"),o=require("react"),a=require("./utils-NZLCh-J5.cjs"),U=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),_=require("./useUpdateEffect-BtMgpgIV.cjs"),L=({theme:e,size:i})=>{var c=a.getSizeValueWithUnits(e,i);return`
|
|
2
2
|
min-height: ${c};
|
|
3
3
|
max-height: ${c};
|
|
4
4
|
`},b={small:"0.875rem",medium:"1.125rem",large:"1.375rem"},W=y.newStyled.div`
|
|
@@ -69,4 +69,4 @@
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
`,q=o.forwardRef((e,i)=>{const{defaultValue:c,value:l=null,min:g=0,max:h=100,disabled:d,tabIndex:v=0,onChange:R=()=>{},onInput:w=()=>{},color:u="primary",size:E="small",className:N="",style:O={},...$}=e,C=o.useRef(),p=
|
|
72
|
+
`,q=o.forwardRef((e,i)=>{const{defaultValue:c,value:l=null,min:g=0,max:h=100,disabled:d,tabIndex:v=0,onChange:R=()=>{},onInput:w=()=>{},color:u="primary",size:E="small",className:N="",style:O={},...$}=e,C=o.useRef(),p=U.useTheme(),m={theme:p,size:E,color:u,className:N,style:O},S=a.getColorRgbaValue(p,"Range",u,"enabled","unfilled"),[k,M]=o.useState(a.getColorRgbaValue(p,"Range",u,d?"disabled":"enabled","background")),[P,B]=o.useState(),[F,f]=o.useState(),x=o.useCallback(r=>Math.round((r-g)/(h-g)*100),[g,h]),[s,T]=o.useState(l||c);_.useUpdateEffect(()=>{T(l)},[l]),o.useEffect(()=>{z(s||0)},[s,x,d,u]),o.useEffect(()=>{M(a.getColorRgbaValue(p,"Range",u,d?"disabled":"enabled","background"))},[u,d]);const V=r=>{z(r.target.value),w&&w(r)},z=r=>{B(`linear-gradient(to right, ${k} 0%, ${k} ${x(r)}%, ${S} ${x(r)}%, ${S} 100%)`)},j=r=>{T(r.target.value),R&&R(r)};return t.jsxs(W,{...m,children:[F&&s&&t.jsx(t.Fragment,{children:t.jsxs(X,{...m,inputValue:x(s),children:[t.jsx("div",{className:"text-content",children:s}),t.jsx("div",{className:"arrow",children:t.jsx("div",{className:"outer",children:t.jsx("div",{className:"inner"})})})]})}),l==null||l=="undefined"?t.jsx(I,{ref:i||C,id:"fader",type:"range",min:g,max:h,defaultValue:c,disabled:d,tabIndex:v,onMouseEnter:()=>{f(!0)},onMouseLeave:()=>{f(!1)},rangeBackground:P,onInput:V,onChange:j,...m,...$}):t.jsx(I,{ref:i||C,id:"fader",type:"range",min:g,max:h,value:s,disabled:d,tabIndex:v,onMouseEnter:()=>{f(!0)},onMouseLeave:()=>{f(!1)},rangeBackground:P,onInput:V,onChange:j,...m,...$})]})});q.propTypes={value:n.PropTypes.number,defaultValue:n.PropTypes.number,min:n.PropTypes.number,max:n.PropTypes.number,disabled:n.PropTypes.bool,tabIndex:n.PropTypes.number,onChange:n.PropTypes.func,onInput:n.PropTypes.func,className:n.PropTypes.string,style:n.PropTypes.object,size:n.PropTypes.oneOf(["small","medium","large"]),color:n.PropTypes.oneOf(["primary","secondary","success","danger","warning","disabled","information","neutral","gray"])};module.exports=q;
|
package/dist/RangeSlider.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as O, jsx as t, Fragment as W } from "react/jsx-runtime";
|
|
2
|
-
import { n as x } from "./emotion-styled.browser.esm-
|
|
2
|
+
import { n as x } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
3
3
|
import { P as n } from "./index-S5Cd7WrG.js";
|
|
4
4
|
import { forwardRef as X, useRef as q, useState as v, useCallback as A, useEffect as M } from "react";
|
|
5
|
-
import {
|
|
6
|
-
import { u as J } from "./emotion-element-
|
|
5
|
+
import { a as D, b as o, c as G, d as H } from "./utils-DtRLzzTZ.js";
|
|
6
|
+
import { u as J } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
7
7
|
import { u as K } from "./useUpdateEffect-CuYWz7EA.js";
|
|
8
8
|
const Q = ({ theme: e, size: i }) => {
|
|
9
9
|
var u = H(e, i);
|
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),s=require("react"),u=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),j=require("./utils-NZLCh-J5.cjs"),I=require("./consts-CtNoHdBj.cjs"),K=require("./motion-B_VPZaJq.cjs"),i=require("./index-BPVoEhTF.cjs"),Q=require("./Icon.cjs"),ee=require("./Badge.cjs"),M=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),G=require("./useDetectMobile-D6d5LpdL.cjs"),re=require("./FlexBox.cjs"),q=require("./index-Cb_AeN9A.cjs"),z=require("./IconButton.cjs"),te=u.newStyled.div`
|
|
2
|
+
cursor: pointer;
|
|
3
|
+
display: flex;
|
|
4
|
+
gap: 1rem;
|
|
5
|
+
padding: 1.25rem;
|
|
6
|
+
border-radius: ${e=>j.getBorderRadiusValueWithUnits(e.theme,"slightCurve")};
|
|
7
|
+
border: 1px solid var(--gray-95080, #14161acc);
|
|
8
|
+
|
|
9
|
+
@media (max-width: ${I.MOBILE_SIZE_PX+"px"}) {
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
padding: 0;
|
|
12
|
+
gap: 0;
|
|
13
|
+
border: none;
|
|
14
|
+
border-radius: 0;
|
|
15
|
+
}
|
|
16
|
+
`,oe=u.newStyled.div`
|
|
17
|
+
border-radius: ${e=>j.getBorderRadiusValueWithUnits(e.theme,"edged")};
|
|
18
|
+
height: 15rem;
|
|
19
|
+
width: 15rem;
|
|
20
|
+
min-width: 15rem;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
|
|
23
|
+
position: relative;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
|
|
26
|
+
& img {
|
|
27
|
+
max-width: 100%;
|
|
28
|
+
min-width: 100%;
|
|
29
|
+
max-height: 100%;
|
|
30
|
+
min-height: 100%;
|
|
31
|
+
object-fit: cover;
|
|
32
|
+
|
|
33
|
+
transform: scale(1.1);
|
|
34
|
+
transition: var(--transition, all 0.3s ease);
|
|
35
|
+
&:hover {
|
|
36
|
+
transform: scale(1.25);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@media (max-width: ${I.MOBILE_SIZE_PX+"px"}) {
|
|
41
|
+
width: 100%;
|
|
42
|
+
max-width: 100dvh;
|
|
43
|
+
height: 23.438rem;
|
|
44
|
+
}
|
|
45
|
+
`,ie=u.newStyled.div`
|
|
46
|
+
flex: 1;
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
justify-content: space-between;
|
|
50
|
+
gap: 1rem;
|
|
51
|
+
color: var(--gray-950, #14161a);
|
|
52
|
+
font-weight: 400;
|
|
53
|
+
font-size: 0.875rem;
|
|
54
|
+
|
|
55
|
+
& .campaign-title {
|
|
56
|
+
font-weight: 500;
|
|
57
|
+
font-size: 0.75rem;
|
|
58
|
+
letter-spacing: 0.1rem;
|
|
59
|
+
color: var(--primary-500, #f59e0b);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
& .campaign-title-text {
|
|
63
|
+
font-weight: 600;
|
|
64
|
+
font-size: 1.375rem;
|
|
65
|
+
transition: var(--transition, all 0.3s ease);
|
|
66
|
+
&:hover {
|
|
67
|
+
color: var(--primary-500, #f59e0b);
|
|
68
|
+
font-size: 1.4rem;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
& .text-block-wrapper {
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
gap: 0.5rem;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
& .title-block-wrapper {
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
& .timestamp-text {
|
|
84
|
+
font-size: 0.875rem;
|
|
85
|
+
font-weight: 400;
|
|
86
|
+
padding-top: 0.25rem;
|
|
87
|
+
color: var(--gray-700, #4e555f);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
& .profile-item:hover {
|
|
91
|
+
background-color: transparent;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@media (max-width: ${I.MOBILE_SIZE_PX+"px"}) {
|
|
95
|
+
padding: 1.25rem;
|
|
96
|
+
|
|
97
|
+
& .campaign-title {
|
|
98
|
+
font-size: 0.875rem;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
& .text-block-wrapper {
|
|
102
|
+
gap: 0.25rem;
|
|
103
|
+
}
|
|
104
|
+
& .text-block-wrapper {
|
|
105
|
+
gap: 0.25rem;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
`,ne={"#ADE3EB":"#76D0DB","#DDD6FE":"#C4B5FD","#FDE68A":"#FCD34D","#A7F3D0":"#6EE7B7","#BADFFF":"#87C6FA","#FECDD3":"#FDA4AF","#EFE2CF":"#EAD2AF","#DDDFE4":"#C4C8CF","#E7E5E4":"#D6D3D1","#FED7AA":"#FDBA74",default:"#C4C8CF"},V=(e=!1,o=!1,c=!1)=>`
|
|
109
|
+
display: flex;
|
|
110
|
+
${o?"flex-wrap: wrap;":""}
|
|
111
|
+
${o?"":"flex-wrap: nowrap;"}
|
|
112
|
+
${e?"align-items: center;":""}
|
|
113
|
+
${c?"justify-content: center;":""}
|
|
114
|
+
`,se=u.newStyled(K.motion.div)`
|
|
115
|
+
text-decoration: none;
|
|
116
|
+
${e=>e.hasPermission===!0&&"cursor: pointer"};
|
|
117
|
+
|
|
118
|
+
&:focus,
|
|
119
|
+
&:hover,
|
|
120
|
+
&:visited,
|
|
121
|
+
&:link,
|
|
122
|
+
&:active {
|
|
123
|
+
text-decoration: none;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
& .icon,
|
|
127
|
+
.name {
|
|
128
|
+
text-decoration: none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
${V(!0)}
|
|
132
|
+
gap: 0.5rem;
|
|
133
|
+
padding: 0.5rem;
|
|
134
|
+
color: ${e=>e.isActive===!1?"var(--gray-900)":"var(--primary-600)"};
|
|
135
|
+
font-weight: 500;
|
|
136
|
+
font-size: 0.875rem;
|
|
137
|
+
line-height: 1.25rem;
|
|
138
|
+
border-radius: ${e=>j.getBorderRadiusValueWithUnits(e.theme,"slight")};
|
|
139
|
+
transition: all 0.25s ease;
|
|
140
|
+
|
|
141
|
+
& .logo-wrapper {
|
|
142
|
+
${V(!0,!1,!0)}
|
|
143
|
+
flex-shrink: 0;
|
|
144
|
+
border-radius: 999px;
|
|
145
|
+
border: 3px solid
|
|
146
|
+
${e=>e.isActive===!1?"var(--gray-300, #c4c8cf)":ne[e.themeColor]??"var(--gray-300, #c4c8cf)"};
|
|
147
|
+
|
|
148
|
+
& img,
|
|
149
|
+
.img-placeholder {
|
|
150
|
+
border-radius: 999px;
|
|
151
|
+
object-fit: cover;
|
|
152
|
+
height: 1.25rem;
|
|
153
|
+
width: 1.25rem;
|
|
154
|
+
background-color: var(--gray-200, #dddfe4);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
& .no-image {
|
|
158
|
+
background: white;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&.user-profile-item {
|
|
163
|
+
& .logo-wrapper {
|
|
164
|
+
border: 3px solid transparent;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
& .name {
|
|
169
|
+
flex-grow: 15;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
& .notifications-number .badge {
|
|
173
|
+
font-size: 0.75rem;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
& .badge {
|
|
177
|
+
max-height: 1.25rem;
|
|
178
|
+
min-height: 1.25rem;
|
|
179
|
+
padding: 0.375rem;
|
|
180
|
+
line-height: 1rem;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&:hover {
|
|
184
|
+
cursor: pointer;
|
|
185
|
+
background-color: var(--gray-95080, #14161acc);
|
|
186
|
+
color: var(--gray-600, #676e79);
|
|
187
|
+
}
|
|
188
|
+
`,ae=u.newStyled.div`
|
|
189
|
+
position: absolute;
|
|
190
|
+
top: 0.5rem;
|
|
191
|
+
${e=>e.alignToLeft===!0?"left: 0.5rem;":"right: 0.5rem;"}
|
|
192
|
+
display: flex;
|
|
193
|
+
gap: 0.25rem;
|
|
194
|
+
`,le=e=>`var(--${e}-700)`,ce=u.newStyled.div`
|
|
195
|
+
border-radius: ${e=>j.getBorderRadiusValueWithUnits(e.theme,e.borderRadius||"slight")};
|
|
196
|
+
background-color: ${e=>le(e==null?void 0:e.color)};
|
|
197
|
+
color: white;
|
|
198
|
+
height: 1.5rem;
|
|
199
|
+
min-width: 1.5rem;
|
|
200
|
+
width: ${e=>e.fitContent===!0?"fit-content":"1.5rem"};
|
|
201
|
+
${e=>e.fitContent===!0&&"padding: 0 0.1rem;"};
|
|
202
|
+
font-size: 0.75rem;
|
|
203
|
+
display: flex;
|
|
204
|
+
align-items: center;
|
|
205
|
+
justify-content: center;
|
|
206
|
+
padding: ${e=>e.padding};
|
|
207
|
+
& i {
|
|
208
|
+
font-size: 0.813rem;
|
|
209
|
+
}
|
|
210
|
+
`,X=e=>{const{uuid:o,hasPermission:c=!0,isUser:n,image:m,name:a,notifications:d=0,color:x="primary",size:w="large",style:S,disabled:l,onSelect:h=()=>{},isActive:y,className:b,themeData:f}=e,T={theme:M.useTheme(),color:x,size:w,style:S,disabled:l};return s.createElement(se,{onClick:t=>{t.stopPropagation(),c===!0&&(h==null||h())},...T,key:a,animate:{y:0,opacity:1},className:`profile-item ${b}`,exit:{opacity:0},hasPermission:c,initial:{y:-10,opacity:0},isActive:y,themeColor:(f==null?void 0:f.code)||"transparent"},r.jsx("div",{className:"logo-wrapper",children:m}),r.jsx("div",{className:"name",children:a}),d>0&&r.jsx("div",{className:"notifications-number",children:r.jsx(ee,{className:"badge",color:"danger",size:"small",children:d>99?"99+":d})}))};X.propTypes={id:i.PropTypes.any,isUserProfile:i.PropTypes.bool,themeColor:i.PropTypes.string,image:i.PropTypes.any,name:i.PropTypes.string,notifications:i.PropTypes.number,style:i.PropTypes.object,className:i.PropTypes.string,color:i.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral"]),size:i.PropTypes.oneOf(["large"]),onSelect:i.PropTypes.func,hasPermission:i.PropTypes.bool};const H=(e,o)=>{if(!e||!o)return null;let c=Math.floor((e==null?void 0:e.getTime())-(o==null?void 0:o.getTime())),n=1e3*60*60*24;return Math.ceil(c/n)},Y=e=>{const o=M.useTheme(),{uuid:c,shopUuid:n,title:m="",description:a,badges:d,coverPhoto:x,onSelect:w,status:S,startDate:l,endDate:h,salesPackages:y,shopName:b,shopImage:f,onSelectCard:g=()=>{},onSelectShop:T=()=>{},campaignSingleText:t,salesCampaignTypes:$=[],startsInPrefixTextPlural:P,startsinSuffixTextPlural:F,startsInPrefixTextSingular:C,startsinSuffixTextSingular:A,themeData:O,...R}=e,p=l?new Date(l)<=new Date:!1;H(h?new Date(h):null,l?new Date(l):null);const v=H(l?new Date(l):null,new Date);return r.jsxs(te,{theme:o,onClick:g,...R,children:[r.jsxs(oe,{theme:o,onClick:()=>w==null?void 0:w(),children:[r.jsx("img",{src:x}),r.jsx(ae,{children:y==null?void 0:y.map((k,E)=>{var N,W;return r.jsx(ce,{color:(N=$==null?void 0:$.find(B=>B.value===k))==null?void 0:N.color,theme:o,children:r.jsx(Q,{icon:(W=$==null?void 0:$.find(B=>B.value===k))==null?void 0:W.icon})},`package__${E}`)})})]}),r.jsxs(ie,{theme:o,children:[r.jsxs("div",{className:"text-block-wrapper",children:[r.jsxs("div",{className:"title-block-wrapper",children:[r.jsx("div",{className:"campaign-title",children:t}),r.jsx("div",{className:"campaign-title-text",children:m}),r.jsx("div",{className:"timestamp-text",children:p?"":v===1?`${C} ${v} ${A}`:`${P} ${v} ${F}`})]}),r.jsx("div",{children:a})]}),r.jsx(X,{hasPermission:!0,image:r.jsx("img",{src:f,className:`${f?"":"no-image"}`}),themeData:O,isActive:!0,isUser:!1,name:b,onClick:()=>T(n)})]})]})};Y.propTypes={title:i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.element]),numberOfListings:i.PropTypes.number,dropdown:i.PropTypes.any,color:i.PropTypes.string};const de=u.newStyled.div`
|
|
211
|
+
display: flex;
|
|
212
|
+
flex-direction: column;
|
|
213
|
+
gap: 1.5rem;
|
|
214
|
+
position: relative;
|
|
215
|
+
|
|
216
|
+
& .hover-left-arrow {
|
|
217
|
+
display: none;
|
|
218
|
+
position: absolute;
|
|
219
|
+
top: 50%;
|
|
220
|
+
left: 1.5rem;
|
|
221
|
+
z-index: ${e=>j.isDefined(e.arrowsZIndex)?e.arrowsZIndex:20};
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
& .hover-right-arrow {
|
|
225
|
+
display: none;
|
|
226
|
+
position: absolute;
|
|
227
|
+
top: 50%;
|
|
228
|
+
right: 1.5rem;
|
|
229
|
+
z-index: ${e=>j.isDefined(e.arrowsZIndex)?e.arrowsZIndex:20};
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
& .clip-loader-wrapper {
|
|
233
|
+
margin: auto;
|
|
234
|
+
padding: 0 1rem;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
@media (max-width: ${I.MOBILE_SIZE_PX+"px"}) {
|
|
238
|
+
gap: 1.25rem;
|
|
239
|
+
& .hover-left-arrow,
|
|
240
|
+
.hover-right-arrow {
|
|
241
|
+
display: flex;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
`,he=u.newStyled.div`
|
|
245
|
+
display: flex;
|
|
246
|
+
align-items: center;
|
|
247
|
+
|
|
248
|
+
justify-content: space-between;
|
|
249
|
+
gap: 1rem;
|
|
250
|
+
|
|
251
|
+
font-weight: 600;
|
|
252
|
+
font-size: 1.5rem;
|
|
253
|
+
|
|
254
|
+
& .btns-group {
|
|
255
|
+
display: flex;
|
|
256
|
+
gap: 0.375rem;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
@media (max-width: ${I.MOBILE_SIZE_PX+"px"}) {
|
|
260
|
+
padding: 0 1rem;
|
|
261
|
+
& .btns-group {
|
|
262
|
+
display: none;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
`,ge=u.newStyled.div`
|
|
266
|
+
position: relative;
|
|
267
|
+
padding: ${e=>e.padding};
|
|
268
|
+
|
|
269
|
+
& button {
|
|
270
|
+
white-space: nowrap;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
& .badge-button {
|
|
274
|
+
${e=>e.showTimesBtn===!0&&"padding-left: 0.5rem; padding-right: 0.5rem;"}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
& .gradient {
|
|
278
|
+
position: absolute;
|
|
279
|
+
top: 50%;
|
|
280
|
+
transform: translate(0, -50%);
|
|
281
|
+
z-index: 4;
|
|
282
|
+
transition: ${"0.3s"};
|
|
283
|
+
right: ${e=>e.noArrows!==!0?"6rem":"0"};
|
|
284
|
+
width: 2rem;
|
|
285
|
+
background: #fff;
|
|
286
|
+
height: 100%;
|
|
287
|
+
-webkit-mask-image: linear-gradient(to left, black 10%, transparent 50%);
|
|
288
|
+
mask-image: linear-gradient(to left, black 10%, transparent 50%);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
& .scrollable-container {
|
|
292
|
+
scroll-behavior: smooth;
|
|
293
|
+
overflow: hidden;
|
|
294
|
+
-webkit-overflow-scrolling: touch;
|
|
295
|
+
::-webkit-scrollbar {
|
|
296
|
+
-webkit-appearance: none;
|
|
297
|
+
}
|
|
298
|
+
-ms-overflow-style: none;
|
|
299
|
+
/* Internet Explorer 10+ */
|
|
300
|
+
scrollbar-width: none;
|
|
301
|
+
/* Firefox */
|
|
302
|
+
|
|
303
|
+
&::-webkit-scrollbar {
|
|
304
|
+
display: none;
|
|
305
|
+
/* Safari and Chrome */
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
& .scroll-arrow-right,
|
|
309
|
+
& .scroll-arrow-left {
|
|
310
|
+
position: absolute;
|
|
311
|
+
top: 50%;
|
|
312
|
+
transform: translate(0, -50%);
|
|
313
|
+
display: flex;
|
|
314
|
+
justify-content: center;
|
|
315
|
+
align-items: center;
|
|
316
|
+
cursor: pointer;
|
|
317
|
+
|
|
318
|
+
visibility: ${e=>e.arrowsVisibleOnHover===!1&&e.hasOverflow?"visible":"hidden"};
|
|
319
|
+
z-index: 4;
|
|
320
|
+
transition: ${"0.3s"};
|
|
321
|
+
}
|
|
322
|
+
& .scroll-arrow-right {
|
|
323
|
+
${e=>e.rightAlignArrows===!0?"right: 0":"right: 0.7rem"};
|
|
324
|
+
}
|
|
325
|
+
& .scroll-arrow-left {
|
|
326
|
+
${e=>e.rightAlignArrows===!0?"right: 2.625rem":"left: 0.7rem"};
|
|
327
|
+
}
|
|
328
|
+
& .scrollable-container:hover > .scroll-arrow-left,
|
|
329
|
+
& .scrollable-container:hover > .scroll-arrow-right {
|
|
330
|
+
visibility: ${e=>e.hasOverflow?"visible":"hidden"};
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
@media (max-width: ${I.MOBILE_SIZE_PX+"px"}) {
|
|
334
|
+
& .scroll-arrow-left,
|
|
335
|
+
& .scroll-arrow-right {
|
|
336
|
+
display: none;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
& .gradient {
|
|
340
|
+
right: 0;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
`,pe=(e,o)=>{const[c,n]=s.useState({trigger:null,direction:null}),m=a=>a.touches||a.originalEvent.touches;return s.useEffect(()=>{const a=typeof e=="string"||e instanceof String?document.getElementById(e):e.current;let d=null,x=null;if(a){const w=l=>{const h=m(l)[0];d=h.clientX,x=h.clientY},S=l=>{if(!d||!x)return;const h=l.touches[0].clientX,y=l.touches[0].clientY,b=d-h,f=x-y;Math.abs(b)>Math.abs(f)?b>0?n(g=>({trigger:!g.trigger,direction:_.LEFT})):n(g=>({trigger:!g.trigger,direction:_.RIGHT})):f>0?n(g=>({trigger:!g.trigger,direction:_.UP})):n(g=>({trigger:!g.trigger,direction:_.DOWN})),d=null,x=null};return a.addEventListener("touchstart",w),a.addEventListener("touchmove",S),()=>{a.removeEventListener("touchstart",w),a.addEventListener("touchmove",S)}}},[]),c},_={UP:"up",DOWN:"down",RIGHT:"right",LEFT:"left"},J=s.forwardRef(({title:e,columnGap:o="2rem",rowGap:c="1.25rem",scrollBySize:n=300,wrapForMobile:m=!1,wrap:a=!1,children:d,methodsRef:x,arrowsVisibleOnHover:w=!0,rightAlignArrows:S=!1,padding:l="0",showTimesBtn:h,noArrows:y,onShowEnd:b,arrowsZIndex:f,...g},T)=>{const t=G.useDetectMobile(),$=M.useTheme(),[P,F]=s.useState(!1),[C,A]=s.useState(!1),[O,R]=s.useState(!0),p=s.useRef(),v=pe(p);s.useEffect(()=>{(v==null?void 0:v.direction)===_.RIGHT&&C!==!0?E():(v==null?void 0:v.direction)===_.LEFT&&P!==!0&&k()},[v]);const k=()=>{var D;(D=p.current)==null||D.scrollBy(n,0)},E=()=>{var D;(D=p.current)==null||D.scrollBy(-n,0)},[N,W]=s.useState(!1);s.useEffect(()=>{var D,U;W(((D=p==null?void 0:p.current)==null?void 0:D.scrollWidth)>((U=p==null?void 0:p.current)==null?void 0:U.clientWidth))},[d]),s.useImperativeHandle(x,()=>({scrollToEnd(){B()},scrollLeft(){E()},scrollRight(){k()}}));const B=()=>{p.current.scrollLeft=p.current.scrollWidth};return r.jsxs(de,{arrowsZIndex:f,children:[r.jsxs(he,{children:[r.jsx("div",{children:e}),r.jsxs("div",{className:"btns-group",children:[r.jsx(z,{borderRadius:"curved",btnType:"tinted",className:"scroll-arrow-left",color:"neutral",disabled:C,icon:"angle-left",onClick:E}),r.jsx(z,{borderRadius:"curved",btnType:"tinted",className:"scroll-arrow-right",color:"neutral",disabled:P,icon:"angle-right",onClick:k})]})]}),r.jsx(z,{borderRadius:"curved",btnType:"tinted",className:"hover-left-arrow scroll-arrow-left",color:"neutral",disabled:C,icon:"angle-left",onClick:E}),r.jsx(z,{borderRadius:"curved",btnType:"tinted",className:"hover-right-arrow scroll-arrow-right",color:"neutral",disabled:P,icon:"angle-right",onClick:k}),r.jsx(ge,{ref:T,arrowsVisibleOnHover:w,hasOverflow:N,noArrows:y,padding:l,rightAlignArrows:S,showTimesBtn:h,theme:$,...g,children:r.jsxs(re,{ref:p,className:"scrollable-container",columnGap:o,rowGap:c,wrap:a||m&&t?"Wrap":"NoWrap",children:[r.jsx(q.InfiniteScrollEndElement,{isHorizontal:!0,onIsNotVisible:()=>{C===!0&&A(!1)},onIsVisible:()=>{C===!1&&A(!0)}}),d,r.jsx(q.InfiniteScrollEndElement,{isHorizontal:!0,onIsNotVisible:()=>{P===!0&&F(!1),R(!0)},onIsVisible:()=>{P===!1&&F(!0),R(!1),b==null||b()}}),O&&N&&r.jsx("div",{className:"gradient"})]})})]})});J.propTypes={title:i.PropTypes.string,rowGap:i.PropTypes.string,columnGap:i.PropTypes.string,scrollBySize:i.PropTypes.number,wrapForMobile:i.PropTypes.bool,wrap:i.PropTypes.bool,methodsRef:i.PropTypes.any,arrowsVisibleOnHover:i.PropTypes.bool,rightAlignArrows:i.PropTypes.bool,padding:i.PropTypes.string};const ue=u.newStyled.div`
|
|
344
|
+
display: flex;
|
|
345
|
+
flex-direction: column;
|
|
346
|
+
gap: 1.5rem;
|
|
347
|
+
|
|
348
|
+
& .arrow-icon {
|
|
349
|
+
& i {
|
|
350
|
+
transition: all 0.25s ease;
|
|
351
|
+
transform: ${e=>e.expanded===!0?"rotate(-180deg)":"rotate(0)"};
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
& .badge-button {
|
|
356
|
+
white-space: nowrap;
|
|
357
|
+
font-weight: 500;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
& .campaign-item {
|
|
361
|
+
min-width: calc(50% - 0.87rem);
|
|
362
|
+
width: calc(50% - 0.87rem);
|
|
363
|
+
margin-right: 1.25rem;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
@media (max-width: ${I.MOBILE_SIZE_PX+"px"}) {
|
|
367
|
+
& .campaign-item {
|
|
368
|
+
min-width: 100%;
|
|
369
|
+
width: 100%;
|
|
370
|
+
margin-right: 0;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
`,L=u.newStyled.div`
|
|
374
|
+
width: ${e=>e.width||"100%"};
|
|
375
|
+
height: ${e=>(e.heightCoeff||1)*1.125}rem;
|
|
376
|
+
background-color: var(--gray-200, #dddfe4);
|
|
377
|
+
|
|
378
|
+
${j.linearGradientAnimation("-90deg")}
|
|
379
|
+
`,fe=u.newStyled.div`
|
|
380
|
+
display: flex;
|
|
381
|
+
flex-direction: ${e=>e!=null&&e.row?"row":"column"};
|
|
382
|
+
gap: ${e=>(e==null?void 0:e.gap)??"0.5rem"};
|
|
383
|
+
width: ${e=>(e==null?void 0:e.width)??"100%"};
|
|
384
|
+
`,Z=u.newStyled.div`
|
|
385
|
+
border-radius: ${e=>j.getBorderRadiusValueWithUnits(e.theme,(e==null?void 0:e.borderRadius)??"regular")};
|
|
386
|
+
background: var(--gray-200, #dddfe4);
|
|
387
|
+
position: relative;
|
|
388
|
+
max-height: ${e=>(e==null?void 0:e.height)??"5rem"};
|
|
389
|
+
max-width: ${e=>(e==null?void 0:e.width)??"5rem"};
|
|
390
|
+
height: ${e=>(e==null?void 0:e.height)??"5rem"};
|
|
391
|
+
width: ${e=>(e==null?void 0:e.width)??"5rem"};
|
|
392
|
+
flex-shrink: 0;
|
|
393
|
+
|
|
394
|
+
${j.linearGradientAnimation()}
|
|
395
|
+
`,me=u.newStyled.div`
|
|
396
|
+
background: var(--white, #fff);
|
|
397
|
+
border-radius: ${e=>j.getBorderRadiusValueWithUnits(e.theme,"edged")};
|
|
398
|
+
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
|
|
399
|
+
border: 1px solid var(--gray-95012, #14161a1f);
|
|
400
|
+
|
|
401
|
+
display: flex;
|
|
402
|
+
gap: 1rem;
|
|
403
|
+
padding: 1.25rem;
|
|
404
|
+
width: 100%;
|
|
405
|
+
|
|
406
|
+
& .campaign__left-section {
|
|
407
|
+
position: relative;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
& .campaign__right-section {
|
|
411
|
+
display: flex;
|
|
412
|
+
flex-direction: column;
|
|
413
|
+
justify-content: space-between;
|
|
414
|
+
max-width: 18rem;
|
|
415
|
+
width: 100%;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
& .campaign__user {
|
|
419
|
+
display: flex;
|
|
420
|
+
align-items: center;
|
|
421
|
+
gap: 0.5rem;
|
|
422
|
+
}
|
|
423
|
+
`,xe=s.forwardRef(({},e)=>{const o=M.useTheme();return r.jsxs(me,{ref:e,theme:o,children:[r.jsx("div",{className:"campaign__left-section",children:r.jsx(Z,{theme:o,width:"15rem",height:"15rem",borderRadius:"edged"})}),r.jsxs("div",{className:"campaign__right-section",children:[r.jsxs(fe,{theme:o,children:[r.jsx(L,{heightCoeff:.75,theme:o,width:"35%"}),r.jsx(L,{heightCoeff:1.25,theme:o}),r.jsx(L,{heightCoeff:3,theme:o})]}),r.jsxs("div",{className:"campaign__user",children:[r.jsx(Z,{theme:o,width:"2.5rem",height:"2.5rem",borderRadius:"curved"}),r.jsx(L,{theme:o,width:"75%"})]})]})]})}),we=({itemsCount:e=5,keyPrefix:o})=>r.jsx(r.Fragment,{children:Array.from({length:e},(c,n)=>r.jsx(xe,{},`${o}-skeleton-campaign-card-${n}`))}),be=({children:e,fallbackComponent:o=r.jsx(r.Fragment,{}),isLoading:c=!1,itemsCount:n=5,keyPrefix:m})=>r.jsx(s.Suspense,{fallback:o,children:c===!0?r.jsx(we,{itemsCount:n,keyPrefix:m}):e}),ye=s.memo(Y),ve=s.forwardRef(({sellerType:e="Shop",items:o=[],title:c,isLoading:n,onSelectCard:m=()=>{},onSelectShop:a=()=>{},customScrollSize:d,campaignSingleText:x,salesCampaignTypes:w=[],startsInPrefixTextPlural:S,startsinSuffixTextPlural:l,startsInPrefixTextSingular:h,startsinSuffixTextSingular:y},b)=>{const f=s.useRef(),g=G.useDetectMobile(),T=s.useMemo(()=>o==null?void 0:o.map((t,$)=>r.jsx(ye,{className:"campaign-item",coverPhoto:t==null?void 0:t.coverPhoto,description:t==null?void 0:t.description,endDate:t==null?void 0:t.endDate,salesPackages:t==null?void 0:t.salesPackages,sellerType:e,shopImage:t==null?void 0:t.profileImage,shopName:t==null?void 0:t.shopName,shopUuid:t==null?void 0:t.shopUuid,startDate:t==null?void 0:t.startDate,title:t==null?void 0:t.name,uuid:t==null?void 0:t.campaignUuid,onSelectCard:()=>m(t==null?void 0:t.campaignUuid,t==null?void 0:t.shopUuid),onSelectShop:()=>a(t==null?void 0:t.shopUuid),campaignSingleText:x,salesCampaignTypes:w,startsInPrefixTextPlural:S,startsinSuffixTextPlural:l,startsInPrefixTextSingular:h,startsinSuffixTextSingular:y,themeData:t==null?void 0:t.themeData},`campaign__item__${$}__${t==null?void 0:t.startDate}___${t==null?void 0:t.endDate}`)),[o]);return r.jsx(r.Fragment,{children:(o==null?void 0:o.length)>0&&r.jsx(ue,{ref:b,className:"row-section-scroll",children:r.jsx(J,{arrowsVisibleOnHover:!1,columnGap:"0",methodsRef:f,mobileHoverScrollButtons:!0,noArrows:!0,padding:"0.25rem 0",rightAlignArrows:!0,scrollBySize:g?window.innerWidth:d>0?d:window.innerWidth,showTimesBtn:!1,title:c,onShowEnd:()=>{},arrowsZIndex:11,children:r.jsx(be,{isLoading:n,itemsCount:2,keyPrefix:"sales-camp",children:T})})})})});module.exports=ve;
|