@lanaco/lnc-react-ui 4.0.35 → 4.0.38
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 +2 -2
- package/dist/QuizSection.js +27 -27
- 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 +6 -3
- 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;
|
|
@@ -384,4 +384,4 @@
|
|
|
384
384
|
display: none;
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
|
-
`,te=i.forwardRef(({welcomeTitle:d,welcomeDescription:s,endTitle:m,endDescription:f,image:c,imageComponent:_,questions:r,secondsPerQuestion:E,numOfCredits:C,startQuizText:T="Start quiz",nextText:Q="Next",giveUpText:U="Give up",questionNoText:Z="Question",continueText:W="Continue",endQuizText:g="End quiz",onStartQuiz:N=()=>{},onSelectAnswer:x=()=>{},onGiveUp:I=()=>{},onNext:u=()=>{},onContinue:b=()=>{},onEndQuiz:w=()=>{}},a)=>{const[v,h]=i.useState(l.START_QUIZ),[o,y]=i.useState(1),[t,L]=i.useState(null),[j,R]=i.useState(null),O=i.useRef([]),D=i.useRef(0),M=()=>{h(l.QUIZ),L(r==null?void 0:r.find(n=>(n==null?void 0:n.questionNo)===o)),N==null||N()},P=n=>{R(n),x==null||x()},B=()=>{h(l.START_QUIZ),y(1),R(null),I==null||I()},X=()=>{let n=(j==null?void 0:j.uuid)===(t==null?void 0:t.correctAnswer);n?(h(l.CORRECT_ANSWER),D.current+=C||(t==null?void 0:t.numOfCredits)):o===(r==null?void 0:r.length)?(h(l.START_QUIZ),y(1),R(null)):(y(o+1),L(r==null?void 0:r.find($=>($==null?void 0:$.questionNo)===o+1)),R(null)),O.current=[...O.current,{question:t,selectedAnswer:j,isCorrect:n}],u==null||u()},F=()=>{o===(r==null?void 0:r.length)?(h(l.START_QUIZ),y(1)):(h(l.QUIZ),y(o+1),L(r==null?void 0:r.find(n=>(n==null?void 0:n.questionNo)===o+1))),R(null),b==null||b()},G=()=>{h(l.START_QUIZ),y(1),R(null),w==null||w()};return e.jsxs(re,{children:[e.jsxs("div",{className:"wrapper__outlet",children:[v===l.START_QUIZ&&e.jsx(Y,{title:d,description:s,startQuizText:T,onStartQuiz:M}),v===l.QUIZ&&t&&e.jsx(q,{questionNoText:Z,questionNo:o,totalQuestions:(r==null?void 0:r.length)||0,text:t==null?void 0:t.text,answers:t==null?void 0:t.answers,secondsPerQuestion:E||(t==null?void 0:t.secondsPerQuestion),selectedAnswer:j,nextText:Q,giveUpText:U,nextDisabled:!z.isDefined(j),onSelectAnswer:P,onGiveUp:B,onNext:X},`quiz-question__${o}`),v===l.CORRECT_ANSWER&&e.jsx(ee,{title:m,description:z.formatString(f,C||(t==null?void 0:t.numOfCredits)),continueText:W,endQuizText:g,onContinue:F,onEndQuiz:G})]}),z.isDefined(_)?_:e.jsx("img",{src:c,className:"wrapper__image"})]})});module.exports=te;
|
|
387
|
+
`,te=i.forwardRef(({welcomeTitle:d,welcomeDescription:s,endTitle:m,endDescription:f,image:c,imageComponent:_,questions:r,secondsPerQuestion:E,numOfCredits:C,startQuizText:T="Start quiz",nextText:Q="Next",giveUpText:U="Give up",questionNoText:Z="Question",continueText:W="Continue",endQuizText:g="End quiz",onStartQuiz:N=()=>{},onSelectAnswer:x=()=>{},onGiveUp:I=()=>{},onNext:u=()=>{},onContinue:b=()=>{},onEndQuiz:w=()=>{}},a)=>{const[v,h]=i.useState(l.START_QUIZ),[o,y]=i.useState(1),[t,L]=i.useState(null),[j,R]=i.useState(null),O=i.useRef([]),D=i.useRef(0),M=()=>{h(l.QUIZ),L(r==null?void 0:r.find(n=>(n==null?void 0:n.questionNo)===o)),N==null||N()},P=n=>{R(n),x==null||x()},B=()=>{h(l.START_QUIZ),y(1),R(null),I==null||I()},X=()=>{let n=(j==null?void 0:j.uuid)===(t==null?void 0:t.correctAnswer);n?(h(l.CORRECT_ANSWER),D.current+=C||(t==null?void 0:t.numOfCredits)):o===(r==null?void 0:r.length)?(h(l.START_QUIZ),y(1),R(null)):(y(o+1),L(r==null?void 0:r.find($=>($==null?void 0:$.questionNo)===o+1)),R(null)),O.current=[...O.current,{question:t,selectedAnswer:j,isCorrect:n}],u==null||u()},F=()=>{o===(r==null?void 0:r.length)?(h(l.START_QUIZ),y(1)):(h(l.QUIZ),y(o+1),L(r==null?void 0:r.find(n=>(n==null?void 0:n.questionNo)===o+1))),R(null),b==null||b()},G=()=>{h(l.START_QUIZ),y(1),R(null),w==null||w()};return e.jsxs(re,{ref:a,children:[e.jsxs("div",{className:"wrapper__outlet",children:[v===l.START_QUIZ&&e.jsx(Y,{title:d,description:s,startQuizText:T,onStartQuiz:M}),v===l.QUIZ&&t&&e.jsx(q,{questionNoText:Z,questionNo:o,totalQuestions:(r==null?void 0:r.length)||0,text:t==null?void 0:t.text,answers:t==null?void 0:t.answers,secondsPerQuestion:E||(t==null?void 0:t.secondsPerQuestion),selectedAnswer:j,nextText:Q,giveUpText:U,nextDisabled:!z.isDefined(j),onSelectAnswer:P,onGiveUp:B,onNext:X},`quiz-question__${o}`),v===l.CORRECT_ANSWER&&e.jsx(ee,{title:m,description:z.formatString(f,C||(t==null?void 0:t.numOfCredits)),continueText:W,endQuizText:g,onContinue:F,onEndQuiz:G})]}),z.isDefined(_)?_:e.jsx("img",{src:c,className:"wrapper__image"})]})});module.exports=te;
|
package/dist/QuizSection.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, 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";
|
|
@@ -367,8 +367,8 @@ const ae = Q.div`
|
|
|
367
367
|
startQuizText: d = "Start quiz",
|
|
368
368
|
onStartQuiz: _ = () => {
|
|
369
369
|
}
|
|
370
|
-
}, o) => /* @__PURE__ */
|
|
371
|
-
/* @__PURE__ */
|
|
370
|
+
}, o) => /* @__PURE__ */ i(ae, { children: [
|
|
371
|
+
/* @__PURE__ */ i("div", { className: "wrapper__content", children: [
|
|
372
372
|
/* @__PURE__ */ e("div", { className: "wrapper__title", children: s }),
|
|
373
373
|
/* @__PURE__ */ e("div", { className: "wrapper__description", children: c })
|
|
374
374
|
] }),
|
|
@@ -403,12 +403,12 @@ const ae = Q.div`
|
|
|
403
403
|
}, O) => {
|
|
404
404
|
const [f, k] = b(r), [h, I] = b(!0), u = D(null);
|
|
405
405
|
q(() => (h && f > 0 && (u.current = setInterval(() => {
|
|
406
|
-
k((
|
|
406
|
+
k((a) => a > 0 ? a - 1 : 0);
|
|
407
407
|
}, 1e3)), () => clearInterval(u.current)), [h, f]);
|
|
408
|
-
const z = f > 0 ? f / r * L : 0, w = (
|
|
409
|
-
return /* @__PURE__ */
|
|
410
|
-
/* @__PURE__ */
|
|
411
|
-
/* @__PURE__ */
|
|
408
|
+
const z = f > 0 ? f / r * L : 0, w = (a) => (m == null ? void 0 : m.uuid) === a;
|
|
409
|
+
return /* @__PURE__ */ i(ie, { children: [
|
|
410
|
+
/* @__PURE__ */ i("div", { className: "wrapper__headline", children: [
|
|
411
|
+
/* @__PURE__ */ i("div", { className: "wrapper__question-no", children: [
|
|
412
412
|
/* @__PURE__ */ e("div", { className: "question-no__text", children: `${s} ${c} / ${d}` }),
|
|
413
413
|
/* @__PURE__ */ e(
|
|
414
414
|
te,
|
|
@@ -418,8 +418,8 @@ const ae = Q.div`
|
|
|
418
418
|
}
|
|
419
419
|
)
|
|
420
420
|
] }),
|
|
421
|
-
/* @__PURE__ */
|
|
422
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ i("div", { className: "wrapper__timer", children: [
|
|
422
|
+
/* @__PURE__ */ i("svg", { className: "timer__ring", width: "60", height: "60", children: [
|
|
423
423
|
/* @__PURE__ */ e(
|
|
424
424
|
"circle",
|
|
425
425
|
{
|
|
@@ -452,17 +452,17 @@ const ae = Q.div`
|
|
|
452
452
|
/* @__PURE__ */ e("div", { className: "timer__display", children: /* @__PURE__ */ e("span", { className: "timer__text", children: ee(f) }) })
|
|
453
453
|
] })
|
|
454
454
|
] }),
|
|
455
|
-
/* @__PURE__ */
|
|
456
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ i("div", { className: "wrapper__content", children: [
|
|
456
|
+
/* @__PURE__ */ i("div", { className: "wrapper__item", children: [
|
|
457
457
|
/* @__PURE__ */ e("div", { className: "wrapper__text", children: _ }),
|
|
458
|
-
/* @__PURE__ */ e("div", { className: "wrapper__answers", children: o && (o == null ? void 0 : o.map((
|
|
458
|
+
/* @__PURE__ */ e("div", { className: "wrapper__answers", children: o && (o == null ? void 0 : o.map((a, x) => /* @__PURE__ */ i(
|
|
459
459
|
"div",
|
|
460
460
|
{
|
|
461
|
-
className: `wrapper__answer ${w(
|
|
462
|
-
onClick: () => Z(
|
|
461
|
+
className: `wrapper__answer ${w(a == null ? void 0 : a.uuid) ? "active" : ""}`,
|
|
462
|
+
onClick: () => Z(a),
|
|
463
463
|
children: [
|
|
464
|
-
`${String.fromCharCode(65 + x)}: ${
|
|
465
|
-
w(
|
|
464
|
+
`${String.fromCharCode(65 + x)}: ${a == null ? void 0 : a.label}`,
|
|
465
|
+
w(a == null ? void 0 : a.uuid) && /* @__PURE__ */ e(
|
|
466
466
|
F,
|
|
467
467
|
{
|
|
468
468
|
icon: " mng-lnc-checkmark--filled",
|
|
@@ -475,7 +475,7 @@ const ae = Q.div`
|
|
|
475
475
|
`quiz-answer__${x + 1}`
|
|
476
476
|
))) })
|
|
477
477
|
] }),
|
|
478
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ i("div", { className: "wrapper__actions", children: [
|
|
479
479
|
/* @__PURE__ */ e(
|
|
480
480
|
R,
|
|
481
481
|
{
|
|
@@ -511,8 +511,8 @@ const ae = Q.div`
|
|
|
511
511
|
},
|
|
512
512
|
onEndQuiz: m = () => {
|
|
513
513
|
}
|
|
514
|
-
}, r) => /* @__PURE__ */
|
|
515
|
-
/* @__PURE__ */
|
|
514
|
+
}, r) => /* @__PURE__ */ i(ne, { children: [
|
|
515
|
+
/* @__PURE__ */ i("div", { className: "wrapper__content", children: [
|
|
516
516
|
/* @__PURE__ */ e(
|
|
517
517
|
F,
|
|
518
518
|
{
|
|
@@ -522,12 +522,12 @@ const ae = Q.div`
|
|
|
522
522
|
className: "wrapper__icon"
|
|
523
523
|
}
|
|
524
524
|
),
|
|
525
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ i("div", { className: "wrapper__info", children: [
|
|
526
526
|
s && /* @__PURE__ */ e("div", { className: "wrapper__title", children: s }),
|
|
527
527
|
c && /* @__PURE__ */ e("div", { className: "wrapper__description", children: c })
|
|
528
528
|
] })
|
|
529
529
|
] }),
|
|
530
|
-
/* @__PURE__ */
|
|
530
|
+
/* @__PURE__ */ i("div", { className: "wrapper__actions", children: [
|
|
531
531
|
/* @__PURE__ */ e(
|
|
532
532
|
R,
|
|
533
533
|
{
|
|
@@ -615,7 +615,7 @@ const ae = Q.div`
|
|
|
615
615
|
},
|
|
616
616
|
onEndQuiz: w = () => {
|
|
617
617
|
}
|
|
618
|
-
},
|
|
618
|
+
}, a) => {
|
|
619
619
|
const [x, g] = b(l.START_QUIZ), [p, v] = b(1), [t, j] = b(null), [y, N] = b(null), P = D([]), X = D(0), G = () => {
|
|
620
620
|
g(l.QUIZ), j(
|
|
621
621
|
r == null ? void 0 : r.find((n) => (n == null ? void 0 : n.questionNo) === p)
|
|
@@ -643,8 +643,8 @@ const ae = Q.div`
|
|
|
643
643
|
}, Y = () => {
|
|
644
644
|
g(l.START_QUIZ), v(1), N(null), w == null || w();
|
|
645
645
|
};
|
|
646
|
-
return /* @__PURE__ */
|
|
647
|
-
/* @__PURE__ */
|
|
646
|
+
return /* @__PURE__ */ i(pe, { ref: a, children: [
|
|
647
|
+
/* @__PURE__ */ i("div", { className: "wrapper__outlet", children: [
|
|
648
648
|
x === l.START_QUIZ && /* @__PURE__ */ e(
|
|
649
649
|
le,
|
|
650
650
|
{
|
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);
|