@momo-webplatform/mobase-next 1.0.1 → 1.0.2
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/components/blocks/BlogSection/BlogSection.d.mts +1 -1
- package/dist/components/blocks/BlogSection/BlogSection.mjs +1 -1
- package/dist/components/blocks/BlogSection/templates/BlogSectionTemplateOne.d.mts +1 -1
- package/dist/components/blocks/BlogSection/templates/BlogSectionTemplateOne.mjs +1 -1
- package/dist/components/blocks/BlogSection/templates/BlogSectionTemplateTwo.mjs +1 -1
- package/dist/components/blocks/BlogSection/utils.d.mts +1 -0
- package/dist/components/blocks/CTASection/CTASection.d.mts +1 -1
- package/dist/components/blocks/CTASection/CTASection.mjs +1 -1
- package/dist/components/blocks/CTASection/index.d.mts +1 -1
- package/dist/components/blocks/CTASection/utils.d.mts +2 -1
- package/dist/components/blocks/FAQSection/FAQSection.d.mts +1 -1
- package/dist/components/blocks/FAQSection/FAQSection.mjs +1 -1
- package/dist/components/blocks/FeatureSection/FeatureSection.d.mts +1 -1
- package/dist/components/blocks/FeatureSection/FeatureSection.mjs +1 -1
- package/dist/components/blocks/FeatureSection/FeatureTemlates.d.mts +2 -2
- package/dist/components/blocks/GiftListSection/GiftListSection.d.mts +1 -1
- package/dist/components/blocks/GiftListSection/GiftListSection.mjs +1 -1
- package/dist/components/blocks/GiftListSection/GiftListSectionTemplate.d.mts +1 -1
- package/dist/components/blocks/GiftListSection/GiftListSectionTemplate.mjs +1 -1
- package/dist/components/blocks/GuideSection/GuideSection.d.mts +18 -0
- package/dist/components/blocks/GuideSection/GuideSection.mjs +1 -0
- package/dist/components/blocks/GuideSection/GuideSectionTemplate.d.mts +18 -0
- package/dist/components/blocks/GuideSection/GuideSectionTemplate.mjs +1 -0
- package/dist/components/blocks/GuideSection/GuideUIDesktop.d.mts +28 -0
- package/dist/components/blocks/GuideSection/GuideUIDesktop.mjs +1 -0
- package/dist/components/blocks/GuideSection/GuideUIMobile.d.mts +23 -0
- package/dist/components/blocks/GuideSection/GuideUIMobile.mjs +1 -0
- package/dist/components/blocks/GuideSection/index.d.mts +15 -0
- package/dist/components/blocks/GuideSection/index.mjs +1 -0
- package/dist/components/blocks/GuideSection/utils.d.mts +78 -0
- package/dist/components/blocks/GuideSection/utils.mjs +0 -0
- package/dist/components/blocks/HeroSection/HeroSection.d.mts +1 -1
- package/dist/components/blocks/HeroSection/HeroSection.mjs +1 -1
- package/dist/components/blocks/HeroSection/HeroSectionFeatures.d.mts +3 -14
- package/dist/components/blocks/HeroSection/HeroSectionFeatures.mjs +1 -1
- package/dist/components/blocks/HeroSection/HeroSectionStats.d.mts +2 -2
- package/dist/components/blocks/HeroSection/HeroSectionStats.mjs +1 -1
- package/dist/components/blocks/HeroSection/HeroSectionTemplate.mjs +1 -1
- package/dist/components/blocks/HeroSection/index.d.mts +2 -2
- package/dist/components/blocks/HeroSection/index.mjs +1 -1
- package/dist/components/blocks/HeroSection/utils.d.mts +23 -17
- package/dist/components/blocks/HowItWorksSection/HowItWorksSection.d.mts +1 -1
- package/dist/components/blocks/HowItWorksSection/HowItWorksSection.mjs +1 -1
- package/dist/components/blocks/HowItWorksSection/HowItWorksSectionTemplate.mjs +1 -1
- package/dist/components/blocks/HowItWorksSection/utils.d.mts +9 -9
- package/dist/components/blocks/MetricsSection/MetricsSection.d.mts +1 -1
- package/dist/components/blocks/MetricsSection/MetricsSection.mjs +1 -1
- package/dist/components/blocks/NewsSection/NewsSection.d.mts +1 -1
- package/dist/components/blocks/NewsSection/NewsSection.mjs +1 -1
- package/dist/components/blocks/NewsSection/NewsSectionTemplate.mjs +1 -1
- package/dist/components/blocks/NewsSection/utils.d.mts +2 -0
- package/dist/components/blocks/SocialProofSection/SocialProofSection.d.mts +1 -1
- package/dist/components/blocks/SocialProofSection/SocialProofSection.mjs +1 -1
- package/dist/components/blocks/SocialProofSection/templates/SocialProofTemplate3.d.mts +1 -1
- package/dist/components/blocks/SocialProofSection/templates/SocialProofTemplate3.mjs +1 -1
- package/dist/components/blocks/SocialProofSection/templates/SocialProofTemplate4.d.mts +1 -1
- package/dist/components/blocks/SocialProofSection/templates/SocialProofTemplate4.mjs +2 -2
- package/dist/components/blocks/TestimonialSection/TestimonialSection.d.mts +1 -1
- package/dist/components/blocks/TestimonialSection/TestimonialSection.mjs +1 -1
- package/dist/components/blocks/TestimonialSection/templates/TestimonialTemplateOne.d.mts +1 -1
- package/dist/components/blocks/TestimonialSection/templates/TestimonialTemplateOne.mjs +1 -1
- package/dist/components/blocks/TestimonialSection/templates/TestimonialTemplateThree.d.mts +1 -1
- package/dist/components/blocks/TestimonialSection/templates/TestimonialTemplateThree.mjs +1 -1
- package/dist/components/blocks/TestimonialSection/templates/TestimonialTemplateTwo.d.mts +1 -1
- package/dist/components/blocks/TestimonialSection/templates/TestimonialTemplateTwo.mjs +2 -2
- package/dist/components/blocks/action-button/action-button.d.mts +1 -1
- package/dist/components/blocks/action-button/action-button.mjs +1 -1
- package/dist/components/blocks/action-button/utils.d.mts +26 -1
- package/dist/components/blocks/action-button/utils.mjs +1 -1
- package/dist/components/blocks/common-blocks/common-blocks.mjs +1 -1
- package/dist/components/blocks/common-blocks/utils.d.mts +6 -0
- package/dist/components/blocks/dialog-qr/DialogQr.mjs +2 -2
- package/dist/components/blocks/header-navigation/header-navigation.d.mts +1 -1
- package/dist/components/blocks/header-navigation/header-navigation.mjs +2 -2
- package/dist/components/blocks/header-navigation/index.d.mts +1 -1
- package/dist/components/blocks/header-navigation/index.mjs +1 -1
- package/dist/components/blocks/header-navigation/types.d.mts +4 -0
- package/dist/components/blocks/heading-group/HeadingGroup.mjs +1 -1
- package/dist/components/mobase/button.d.mts +5 -1
- package/dist/components/mobase/button.mjs +1 -1
- package/dist/components/mobase/carousel.mjs +1 -1
- package/dist/components/mobase/dialog-qr.d.mts +8 -0
- package/dist/components/mobase/dialog-qr.mjs +1 -0
- package/dist/components/mobase/dialog.d.mts +1 -1
- package/dist/components/mobase/dialog.mjs +1 -1
- package/dist/components/mobase/empty.d.mts +8 -13
- package/dist/components/mobase/empty.mjs +1 -1
- package/dist/components/mobase/input.mjs +1 -1
- package/dist/components/mobase/native-select.mjs +1 -1
- package/dist/components/mobase/navigation-menu.mjs +1 -1
- package/dist/components/mobase/number-field.d.mts +19 -0
- package/dist/components/mobase/number-field.mjs +1 -0
- package/dist/components/mobase/otp-field.d.mts +12 -0
- package/dist/components/mobase/otp-field.mjs +1 -0
- package/dist/components/mobase/pagination.mjs +1 -1
- package/dist/components/mobase/qr-payment.d.mts +46 -0
- package/dist/components/mobase/qr-payment.mjs +13 -0
- package/dist/components/mobase/table.mjs +1 -1
- package/dist/components/mobase/toast.mjs +1 -1
- package/dist/index.d.mts +14 -8
- package/dist/index.mjs +1 -1
- package/dist/lib/utils.d.mts +2 -1
- package/dist/lib/utils.mjs +1 -1
- package/package.json +24 -9
- package/src/styles/globals.css +28 -27
- package/dist/lib/legacy-button-variant.d.mts +0 -13
- package/dist/lib/legacy-button-variant.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../../chunk-7LRQ2WLZ.mjs";import{
|
|
1
|
+
import"../../../chunk-7LRQ2WLZ.mjs";import{jsx as r,jsxs as N}from"react/jsx-runtime";import{cn as m}from"../../../lib/utils";import{ButtonsBlock as f,HeadingBlock as y}from"../common-blocks/common-blocks";import{SectionHeroListFeature as F}from"./HeroSectionFeatures";import{SectionHeroMedia as h}from"./HeroSectionMedia";import{SectionHeroStats as S}from"./HeroSectionStats";function z({dataHeading:l,dataButtons:o,dataFeatures:u,template:p,dataStats:b,dataMedia:s,advancedComponent:c}){return N("div",{"data-slot":"hero-section-template-1",className:m("grid grid-cols-1 items-center gap-8 md:grid-cols-2 md:gap-6"),children:[N("div",{className:"col-span-1",children:[r(y,{tagline:l==null?void 0:l.tagline,title:l==null?void 0:l.title,description:l==null?void 0:l.description,tagHeading:(l==null?void 0:l.tagHeading)||"h1",align:"left",sizeHeading:l==null?void 0:l.sizeHeading,colorScheme:(l==null?void 0:l.colorScheme)||"black",className:m("mb-0 md:mb-0",l==null?void 0:l.className)}),r(F,{dataFeatures:u,template:p}),o?r(f,{align:"left",isFullInMobile:o.isFullInMobile,buttons:o.buttons}):null,r(S,{dataStats:b})]}),r("div",{className:"col-span-1 md:pl-10",children:c!=null?c:r(h,{type:(s==null?void 0:s.type)||1,src:(s==null?void 0:s.src)||"",ratio:s==null?void 0:s.ratio,youtubeId:s==null?void 0:s.youtubeId,className:s==null?void 0:s.className,classNameMedia:s==null?void 0:s.classNameMedia,onClickFC:s==null?void 0:s.onClickFC,alt:s==null?void 0:s.alt})})]})}function w({dataHeading:l,dataButtons:o,dataFeatures:u,template:p,dataStats:b,dataMedia:s,advancedComponent:c}){return N("div",{"data-slot":"hero-section-template-2",className:m("grid grid-cols-1 items-center gap-8 md:grid-cols-2 md:gap-6"),children:[r("div",{className:"order-2 col-span-1 md:order-1 md:pr-10",children:c!=null?c:r(h,{type:(s==null?void 0:s.type)||1,src:(s==null?void 0:s.src)||"",ratio:s==null?void 0:s.ratio,youtubeId:s==null?void 0:s.youtubeId,className:s==null?void 0:s.className,classNameMedia:s==null?void 0:s.classNameMedia,onClickFC:s==null?void 0:s.onClickFC,alt:s==null?void 0:s.alt})}),N("div",{className:"order-1 col-span-1 md:order-2",children:[r(y,{tagline:l==null?void 0:l.tagline,title:l==null?void 0:l.title,description:l==null?void 0:l.description,tagHeading:(l==null?void 0:l.tagHeading)||"h1",align:"left",sizeHeading:l==null?void 0:l.sizeHeading,colorScheme:(l==null?void 0:l.colorScheme)||"black",className:m("mb-0 md:mb-0",l==null?void 0:l.className)}),r(F,{dataFeatures:u,template:p}),o?r("div",{className:"flex w-full items-center justify-center md:justify-start",children:r(f,{align:"left",isFullInMobile:o.isFullInMobile,buttons:o.buttons})}):null,r(S,{dataStats:b})]})]})}function T({dataHeading:l,dataButtons:o,dataFeatures:u,template:p,dataStats:b,dataMedia:s,advancedComponent:c}){return N("div",{"data-slot":"hero-section-template-3",children:[r(y,{tagline:l==null?void 0:l.tagline,title:l==null?void 0:l.title,description:l==null?void 0:l.description,tagHeading:(l==null?void 0:l.tagHeading)||"h1",align:"center",sizeHeading:l==null?void 0:l.sizeHeading,colorScheme:(l==null?void 0:l.colorScheme)||"black",className:m("mb-0 md:mb-0",l==null?void 0:l.className)}),o?r(f,{align:"center",isFullInMobile:o.isFullInMobile,buttons:o.buttons,className:"inline-flex w-full items-center justify-center text-center text-base font-semibold md:w-full"}):null,r(F,{dataFeatures:u,template:p}),r("div",{className:"mx-auto max-w-xl [&>ul]:justify-center",children:r(S,{dataStats:b})}),c!=null?c:s!=null&&s.src?r(h,{type:s.type||1,src:s.src,ratio:s.ratio,youtubeId:s.youtubeId,className:m("mt-8 md:mt-12",s.className),classNameMedia:m("rounded-lg",s.classNameMedia),onClickFC:s.onClickFC,alt:s.alt}):null]})}export{z as HeroContentTemplateOne,T as HeroContentTemplateThree,w as HeroContentTemplateTwo};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { HeroSection } from './HeroSection.mjs';
|
|
2
|
-
export { HeroContentProps } from './utils.mjs';
|
|
1
|
+
export { HERO_SECTION_DEFAULT_BACKGROUND, HeroSection } from './HeroSection.mjs';
|
|
2
|
+
export { HeroContentListFeatureProps, HeroContentListStats, HeroContentMediaProps, HeroContentProps } from './utils.mjs';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import '../common-blocks/utils.mjs';
|
|
5
5
|
import '../action-button/utils.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../../chunk-7LRQ2WLZ.mjs";import{HeroSection as r}from"./HeroSection";export{r as HeroSection};
|
|
1
|
+
import"../../../chunk-7LRQ2WLZ.mjs";import{HeroSection as e,HERO_SECTION_DEFAULT_BACKGROUND as r}from"./HeroSection";export{r as HERO_SECTION_DEFAULT_BACKGROUND,e as HeroSection};
|
|
@@ -23,7 +23,7 @@ interface HeroContentProps extends SectionBlockProps {
|
|
|
23
23
|
*/
|
|
24
24
|
dataHeading?: HeadingBlockProps;
|
|
25
25
|
/**
|
|
26
|
-
* The array
|
|
26
|
+
* The array of feature items displayed in the hero section.
|
|
27
27
|
*/
|
|
28
28
|
dataFeatures?: HeroContentListFeatureProps[];
|
|
29
29
|
/**
|
|
@@ -31,54 +31,60 @@ interface HeroContentProps extends SectionBlockProps {
|
|
|
31
31
|
*/
|
|
32
32
|
dataButtons?: ButtonsBlockProps;
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* Key statistics displayed below the heading.
|
|
35
35
|
*/
|
|
36
36
|
dataStats?: HeroContentListStats[];
|
|
37
37
|
/**
|
|
38
|
-
* The
|
|
38
|
+
* The media (image or YouTube video) of the hero section.
|
|
39
39
|
*/
|
|
40
40
|
dataMedia?: HeroContentMediaProps;
|
|
41
|
+
/**
|
|
42
|
+
* Custom component to replace the default media slot.
|
|
43
|
+
* Useful for embedding interactive widgets, app mockups, etc.
|
|
44
|
+
*/
|
|
41
45
|
advancedComponent?: React.ReactNode;
|
|
42
46
|
}
|
|
43
|
-
interface HeroContentTitleProps {
|
|
44
|
-
title?: string;
|
|
45
|
-
className?: string;
|
|
46
|
-
}
|
|
47
|
-
interface HeroContentDescriptionProps {
|
|
48
|
-
description?: string;
|
|
49
|
-
className?: string;
|
|
50
|
-
}
|
|
51
47
|
interface HeroContentListFeatureProps {
|
|
48
|
+
/** Feature label — supports HTML string via html-react-parser. */
|
|
52
49
|
name?: string;
|
|
50
|
+
/** Optional image/icon URL replacing the default check icon. */
|
|
53
51
|
image?: string;
|
|
54
52
|
}
|
|
55
53
|
interface HeroContentListStats {
|
|
56
54
|
/**
|
|
57
|
-
*
|
|
55
|
+
* Numeric (or string) value of the stat, e.g. 30 or "30+".
|
|
58
56
|
*/
|
|
59
|
-
value?: number;
|
|
57
|
+
value?: number | string;
|
|
60
58
|
/**
|
|
61
|
-
*
|
|
59
|
+
* Short suffix appended immediately after value, e.g. "M+".
|
|
62
60
|
*/
|
|
63
61
|
suffix?: string;
|
|
64
62
|
/**
|
|
65
|
-
* Unit
|
|
63
|
+
* Unit label shown after suffix, e.g. "người dùng".
|
|
66
64
|
*/
|
|
67
65
|
unit?: string;
|
|
68
66
|
/**
|
|
69
|
-
*
|
|
67
|
+
* Supporting description below the value.
|
|
70
68
|
*/
|
|
71
69
|
description?: string;
|
|
72
70
|
}
|
|
73
71
|
interface HeroContentMediaProps {
|
|
72
|
+
/** Image or video thumbnail URL. */
|
|
74
73
|
src: string;
|
|
74
|
+
/** Aspect ratio as number (e.g. 16/9) or string (e.g. "16/9"). */
|
|
75
75
|
ratio?: string | number;
|
|
76
|
+
/** Callback when the play button is clicked. */
|
|
76
77
|
onClickFC?: () => void;
|
|
78
|
+
/** Extra class on the media wrapper div. */
|
|
77
79
|
className?: string;
|
|
80
|
+
/** Extra class on the inner img element. */
|
|
78
81
|
classNameMedia?: string;
|
|
82
|
+
/** YouTube video ID — enables the play-button overlay dialog. */
|
|
79
83
|
youtubeId?: string;
|
|
84
|
+
/** Media type constant: TYPE_MEDIA_IMAGE (1) | TYPE_MEDIA_VIDEO (2). */
|
|
80
85
|
type?: number | null;
|
|
86
|
+
/** Alt text for the image. */
|
|
81
87
|
alt?: string;
|
|
82
88
|
}
|
|
83
89
|
|
|
84
|
-
export { type
|
|
90
|
+
export { type HeroContentListFeatureProps, type HeroContentListStats, type HeroContentMediaProps, type HeroContentProps, TYPE_MEDIA_IMAGE, TYPE_MEDIA_VIDEO };
|
|
@@ -12,6 +12,6 @@ import '../../mobase/dialog.mjs';
|
|
|
12
12
|
import '@base-ui/react/dialog';
|
|
13
13
|
import '@base-ui/react/use-render';
|
|
14
14
|
|
|
15
|
-
declare function HowItWorksSection({ template, background, className, idSection, dataHeading, dataHowItWorks, dataButtons, }: HowItWorksSectionProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare function HowItWorksSection({ template, background, className, idSection, dataHeading, dataHowItWorks, dataButtons, editorMode, }: HowItWorksSectionProps): react_jsx_runtime.JSX.Element;
|
|
16
16
|
|
|
17
17
|
export { HowItWorksSection };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../../chunk-7LRQ2WLZ.mjs";import{jsx as
|
|
1
|
+
import"../../../chunk-7LRQ2WLZ.mjs";import{jsx as a}from"react/jsx-runtime";import{SectionBlock as d}from"../common-blocks/common-blocks";import{HowItWorksTemplateOne as k,HowItWorksTemplateThree as p,HowItWorksTemplateTwo as w}from"./HowItWorksSectionTemplate";function H({template:n,dataHeading:o,dataHowItWorks:t,dataButtons:e,editorMode:r}){switch(n){case 2:return a(w,{dataHeading:o,dataHowItWorks:t,dataButtons:e,editorMode:r});case 3:return a(p,{dataHeading:o,dataHowItWorks:t,dataButtons:e,editorMode:r});default:return a(k,{dataHeading:o,dataHowItWorks:t,dataButtons:e,editorMode:r})}}function m({template:n=1,background:o,className:t,idSection:e,dataHeading:r,dataHowItWorks:i,dataButtons:c,editorMode:s}){return a(d,{className:t,idSection:e,background:o,editorMode:s,children:a(H,{template:n,dataHeading:r,dataHowItWorks:i,dataButtons:c,editorMode:s})})}export{m as HowItWorksSection};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../../chunk-7LRQ2WLZ.mjs";import{jsx as
|
|
1
|
+
import"../../../chunk-7LRQ2WLZ.mjs";import{jsx as r,jsxs as s}from"react/jsx-runtime";import n from"html-react-parser";import{cn as a}from"../../../lib/utils";import{AspectRatio as p}from"../../mobase/aspect-ratio";import{ButtonsBlock as w,HeadingBlock as v}from"../common-blocks/common-blocks";function f(e){return/^https?:\/\//.test(e)}function d(e){return e?r(v,{tagline:e.tagline,title:e.title,description:e.description,tagHeading:e.tagHeading,align:"center",colorScheme:e.colorScheme||"pink",sizeHeading:e.sizeHeading,className:e.className}):null}function c(e){return e?r(w,{isFullInMobile:e.isFullInMobile,buttons:e.buttons,className:e.className,align:"center"}):null}function m(e,t){return s("div",{"data-slot":"how-it-works-step-content",className:"w-full",children:[r("div",{"data-slot":"how-it-works-step-title",className:"w-full text-xl font-semibold",children:n(e.title)}),e.description?r("div",{"data-slot":"how-it-works-step-description",className:a("mt-2 text-base text-muted-foreground",t),children:n(e.description)}):null]})}function g(e,t){return typeof e!="string"?e:f(e)?r("img",{src:e,alt:t,className:"block object-cover",loading:"lazy"}):r("span",{className:"[&_svg]:h-6 [&_svg]:w-6 [&_svg]:stroke-current [&_svg]:stroke-2",children:n(e.replace(/\n|\r/g,""))})}function b(e,t){return e?r("div",{"data-slot":"how-it-works-step-image",className:"aspect-square w-full overflow-hidden rounded-lg bg-muted",children:r(p,{ratio:1,children:typeof e=="string"?f(e)?r("img",{src:e,alt:t,className:"h-full w-full object-cover",loading:"lazy"}):r("div",{className:"flex h-full w-full items-center justify-center text-primary [&_svg]:h-12 [&_svg]:w-12 [&_svg]:stroke-current [&_svg]:stroke-2",children:n(e.replace(/\n|\r/g,""))}):r("div",{className:"flex h-full w-full items-center justify-center",children:e})})}):null}function u(e,t){return a("basis-full px-3.5",e===4?"md:basis-1/2 lg:basis-1/4":"md:basis-1/3",t)}function N({dataHeading:e,dataHowItWorks:t,dataButtons:i}){return s("div",{"data-slot":"how-it-works-template-1",children:[d(e),t&&t.length>0?r("div",{"data-slot":"how-it-works-steps",className:"-mx-3.5 flex flex-row flex-wrap justify-center gap-y-5",children:t.map((o,l)=>r("div",{"data-slot":"how-it-works-step",className:u(t.length),children:s("div",{className:"h-full rounded-lg border border-border bg-card px-6 py-8 text-center shadow-lg md:px-4 lg:px-6",children:[r("div",{"data-slot":"how-it-works-step-number",className:"mx-auto flex h-9 w-9 items-center justify-center rounded-full bg-primary text-xl font-bold text-primary-foreground",children:l+1}),r("div",{className:"mt-6",children:m(o)})]})},l))}):null,c(i)]})}function j({dataHeading:e,dataHowItWorks:t,dataButtons:i}){return s("div",{"data-slot":"how-it-works-template-2",children:[d(e),t&&t.length>0?r("div",{"data-slot":"how-it-works-steps",className:"-mx-3.5 mt-9 flex flex-row flex-wrap justify-center gap-y-9",children:t.map((o,l)=>s("div",{"data-slot":"how-it-works-step",className:u(t.length,"text-center"),children:[s("div",{className:"relative mx-auto flex h-52 w-52 items-center justify-center",children:[r("div",{"data-slot":"how-it-works-step-number",className:"absolute -left-4 -top-4 z-10 flex h-12 w-12 items-center justify-center rounded-full border-4 border-background bg-primary text-lg font-bold text-primary-foreground",children:l+1}),b(o.image,o.title)]}),r("div",{className:"mt-6",children:m(o)})]},l))}):null,c(i)]})}function S({dataHeading:e,dataHowItWorks:t,dataButtons:i}){return s("div",{"data-slot":"how-it-works-template-3",children:[d(e),t&&t.length>0?r("div",{"data-slot":"how-it-works-steps",className:"flex flex-col justify-center gap-y-14 md:flex-row md:gap-x-4",children:t.map((o,l)=>s("div",{"data-slot":"how-it-works-step",className:a("relative basis-full text-center","before:absolute before:bg-border before:content-[''] first:before:hidden","after:absolute after:bg-border after:content-[''] last:after:hidden","before:-top-10 before:start-1/2 before:h-6 before:w-[1px]","md:before:inset-auto md:before:-start-3.5 md:before:top-8 md:before:h-[1px] md:before:w-[calc(50%-2rem)]","after:-bottom-10 after:start-1/2 after:h-6 after:w-[1px]","md:after:inset-auto md:after:-end-3.5 md:after:top-8 md:after:h-[1px] md:after:w-[calc(50%-2rem)]"),children:[o.image?r("span",{"data-slot":"how-it-works-step-icon",className:"mx-auto flex size-12 items-center justify-center rounded-full bg-primary text-primary-foreground md:size-14",children:g(o.image,o.title)}):null,r("div",{className:"mt-4 md:mt-6",children:m(o)})]},l))}):null,c(i)]})}export{N as HowItWorksTemplateOne,S as HowItWorksTemplateThree,j as HowItWorksTemplateTwo};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SectionBlockProps, HeadingBlockProps, ButtonsBlockProps } from '../common-blocks/utils.mjs';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
2
3
|
import '../action-button/utils.mjs';
|
|
3
|
-
import 'react';
|
|
4
4
|
import '../../mobase/button.mjs';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'class-variance-authority/types';
|
|
@@ -13,33 +13,33 @@ import '@base-ui/react/use-render';
|
|
|
13
13
|
|
|
14
14
|
interface HowItWorksData {
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Image banner `src` or icon (`svg` string or React `svg` element) of the step.
|
|
17
17
|
*/
|
|
18
|
-
image?: string |
|
|
18
|
+
image?: string | ReactElement;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Title of the step.
|
|
21
21
|
*/
|
|
22
22
|
title: string;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Description of the step.
|
|
25
25
|
*/
|
|
26
26
|
description?: string;
|
|
27
27
|
}
|
|
28
28
|
interface HowItWorksSectionProps extends SectionBlockProps {
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* The template of the section.
|
|
31
31
|
*/
|
|
32
32
|
template?: 1 | 2 | 3;
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* The data heading of the section.
|
|
35
35
|
*/
|
|
36
36
|
dataHeading?: HeadingBlockProps;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* The array data steps of the section.
|
|
39
39
|
*/
|
|
40
40
|
dataHowItWorks?: HowItWorksData[];
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* The data buttons of the section.
|
|
43
43
|
*/
|
|
44
44
|
dataButtons?: ButtonsBlockProps;
|
|
45
45
|
}
|
|
@@ -12,6 +12,6 @@ import '../../mobase/dialog.mjs';
|
|
|
12
12
|
import '@base-ui/react/dialog';
|
|
13
13
|
import '@base-ui/react/use-render';
|
|
14
14
|
|
|
15
|
-
declare const MetricsSection: ({ idSection, dataHeading, dataMetrics, dataButtons, background, className, template, }: MetricsSectionProps) => react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare const MetricsSection: ({ idSection, dataHeading, dataMetrics, dataButtons, background, className, template, editorMode, }: MetricsSectionProps) => react_jsx_runtime.JSX.Element;
|
|
16
16
|
|
|
17
17
|
export { MetricsSection };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../../chunk-7LRQ2WLZ.mjs";import{Fragment as
|
|
1
|
+
import"../../../chunk-7LRQ2WLZ.mjs";import{Fragment as u,jsx as i}from"react/jsx-runtime";import{cn as p}from"../../../lib/utils";import{SectionBlock as M}from"../common-blocks/common-blocks";import{MetricsSectionTemplateOne as a,MetricsSectionTemplateTwo as m}from"./MetricsSectionTemplate";const S=({dataHeading:t,dataMetrics:e,template:n,dataButtons:o,editorMode:r})=>{switch(n){case 1:return i(a,{dataMetrics:e,dataButtons:o,dataHeading:t,editorMode:r});case 2:return i(m,{dataMetrics:e,dataButtons:o,dataHeading:t,editorMode:r});default:return i(a,{dataMetrics:e,dataButtons:o,dataHeading:t,editorMode:r})}},l=({dataHeading:t,dataMetrics:e,template:n,dataButtons:o,editorMode:r})=>i(u,{children:S({dataHeading:t,dataMetrics:e,template:n,dataButtons:o,editorMode:r})}),g=({idSection:t,dataHeading:e,dataMetrics:n=[],dataButtons:o,background:r,className:s,template:d,editorMode:c})=>i(M,{className:p(s),background:r,idSection:t,editorMode:c,children:i(l,{dataHeading:e,dataMetrics:n,dataButtons:o,template:d,editorMode:c})});export{g as MetricsSection};
|
|
@@ -12,6 +12,6 @@ import '../../mobase/dialog.mjs';
|
|
|
12
12
|
import '@base-ui/react/dialog';
|
|
13
13
|
import '@base-ui/react/use-render';
|
|
14
14
|
|
|
15
|
-
declare function NewsSection({ idSection, dataHeading, dataHorizontalScroll, dataNews, className, background, template, onClickModal, onClickLoadMore, }: NewsSectionProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare function NewsSection({ idSection, dataHeading, dataHorizontalScroll, dataNews, className, background, template, onClickModal, onClickLoadMore, editorMode, }: NewsSectionProps): react_jsx_runtime.JSX.Element;
|
|
16
16
|
|
|
17
17
|
export { NewsSection };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../../chunk-7LRQ2WLZ.mjs";import{Fragment as
|
|
1
|
+
import"../../../chunk-7LRQ2WLZ.mjs";import{Fragment as f,jsx as c}from"react/jsx-runtime";import{cn as S}from"../../../lib/utils";import{SectionBlock as m}from"../common-blocks/common-blocks";import{NewsSectionTemplateOne as d}from"./NewsSectionTemplate";function w({template:a,dataNews:o,dataHeading:e,dataHorizontalScroll:t,onClickModal:n,onClickLoadMore:r,editorMode:i}){switch(a){case 1:return c(d,{dataNews:o,dataHeading:e,dataHorizontalScroll:t,onClickModal:n,onClickLoadMore:r,editorMode:i});default:return c(d,{dataNews:o,dataHeading:e,dataHorizontalScroll:t,onClickModal:n,onClickLoadMore:r,editorMode:i})}}function N({dataHeading:a,dataHorizontalScroll:o,dataNews:e,template:t,onClickModal:n,onClickLoadMore:r,editorMode:i}){return c(f,{children:w({dataHeading:a,dataHorizontalScroll:o,dataNews:e,template:t,onClickModal:n,onClickLoadMore:r,editorMode:i})})}function u({idSection:a,dataHeading:o,dataHorizontalScroll:e,dataNews:t=[],className:n,background:r,template:i=1,onClickModal:l,onClickLoadMore:s,editorMode:p}){return c(m,{className:S(n),background:r,idSection:a,children:c(N,{dataHeading:o,dataHorizontalScroll:e,dataNews:t,template:i,onClickModal:l,onClickLoadMore:s,editorMode:p})})}export{u as NewsSection};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import"../../../chunk-7LRQ2WLZ.mjs";import{Fragment as
|
|
1
|
+
"use client";import"../../../chunk-7LRQ2WLZ.mjs";import{Fragment as S,jsx as m,jsxs as v}from"react/jsx-runtime";import{memo as U}from"react";import{ArrowDownIcon as L,Loader2Icon as j}from"lucide-react";import A from"html-react-parser";import{cn as b,stripHtml as C}from"../../../lib/utils";import{Button as R}from"../../mobase/button";import{HorizontalContent as X,HorizontalNext as _,HorizontalPrevious as q,HorizontalScroll as V}from"../../mobase/horizontal-scroll";import{Tabs as d,TabsContent as F,TabsList as T,TabsTrigger as k}from"../../mobase/tabs";import{ActionButton as J}from"../action-button/action-button";import{HeadingBlock as K}from"../common-blocks/common-blocks";const Q=({news:l})=>{const i=(r,c)=>{r==null||r.preventDefault(),r==null||r.stopPropagation(),window.open(c,"_blank")};return v(S,{children:[m("div",{className:"relative block aspect-square overflow-hidden rounded-md bg-muted md:aspect-[77/37] md:rounded-none",children:v("picture",{children:[m("source",{media:"(min-width: 640px)",srcSet:l==null?void 0:l.thumbnailDesktop}),m("img",{className:"h-full w-full object-cover",src:l==null?void 0:l.thumbnailMobile,alt:l==null?void 0:l.title})]})}),v("div",{className:"mt-3 flex flex-1 flex-col md:mt-0 md:p-3",children:[m("div",{className:"line-clamp-2 flex-1 text-sm font-medium text-foreground group-hover:text-primary md:line-clamp-none",children:l==null?void 0:l.title}),v("div",{className:"mt-2 flex items-center space-x-1",children:[(l==null?void 0:l.category)&&(l==null?void 0:l.categoryUrl)&&v(S,{children:[m(R,{type:"button",variant:"link",className:"h-auto shrink-0 justify-start whitespace-normal p-0 text-left text-xs font-normal text-primary line-clamp-1",title:l==null?void 0:l.category,onClick:r=>i(r,(l==null?void 0:l.categoryUrl)||""),children:l==null?void 0:l.category}),(l==null?void 0:l.category)&&(l==null?void 0:l.dateTime)&&m("span",{className:"flex-none leading-none",children:"\xB7"})]}),m("div",{className:"flex-none text-xs text-muted-foreground",children:l==null?void 0:l.dateTime})]})]})]})},W=U(function({dataHeading:i,dataHorizontalScroll:r,dataNews:c,onClickModal:x,onClickLoadMore:f,editorMode:g}){var y;const{showGradientOverlay:z=!0,gradientOverlayColor:P,className:O}=r||{},B=(t,o,a)=>{t==null||t.preventDefault(),t==null||t.stopPropagation(),x?x(o):window.open(a,"_blank")},h=(t,o)=>{var a,N;return v("div",{children:[m("div",{className:b("-mx-2 flex flex-row flex-wrap gap-y-5",((a=t==null?void 0:t.newsList)==null?void 0:a.length)!==void 0&&t.newsList.length<4?"md:justify-center":""),children:(N=t==null?void 0:t.newsList)==null?void 0:N.map((e,D)=>m("div",{className:"min-w-0 basis-1/2 px-2 lg:basis-1/4",children:m("div",{onClick:E=>B(E,e==null?void 0:e.id,e==null?void 0:e.url),className:b("group flex cursor-pointer flex-col overflow-hidden md:h-full md:rounded-md md:bg-card md:shadow-md",t==null?void 0:t.classNameItem),children:m(Q,{news:e})},e==null?void 0:e.id)},D))}),(t==null?void 0:t.isShowBtn)&&m("div",{className:"mt-8 flex w-full items-center justify-center",children:v(J,{action:(t==null?void 0:t.btnUrl)||f&&(()=>f==null?void 0:f(o)),newTab:t==null?void 0:t.isNewTab,variant:"outline",disabled:t==null?void 0:t.isLoading,dataUmamiEvent:t==null?void 0:t.dataUmamiEvent,dataUmamiEventText:C(t==null?void 0:t.btnName)||"Xem th\xEAm",children:[A(t.btnName||"Xem th\xEAm"),t!=null&&t.isLoading?m(j,{className:"ml-2 size-5 animate-spin","aria-hidden":!0}):f&&!(t!=null&&t.btnUrl)&&m(L,{className:"-mb-1 ml-2 size-5 animate-bounce","aria-hidden":!0})]})})]},(t==null?void 0:t.title)||o)};return v("div",{"data-slot":"news-section-template-1",children:[i&&m(K,{tagline:i==null?void 0:i.tagline,title:i==null?void 0:i.title,description:i==null?void 0:i.description,tagHeading:i==null?void 0:i.tagHeading,align:"center",colorScheme:(i==null?void 0:i.colorScheme)||"pink",sizeHeading:i==null?void 0:i.sizeHeading,className:b(i==null?void 0:i.className)}),(c==null?void 0:c.length)>1?v(d,{defaultValue:(y=c[0])==null?void 0:y.title,children:[g?m("div",{className:"mb-6 text-center",children:m(T,{className:"mx-auto mb-0 inline-flex w-auto items-center overflow-visible flex-wrap justify-center gap-2",children:c.map((t,o)=>m(k,{value:t.title,children:t.title},t.title+o))})}):v(V,{showGradientOverlay:z,gradientOverlayColor:P,className:O,children:[m(X,{className:"mb-6 text-center",children:m(T,{className:"mx-auto mb-0 inline-flex w-auto items-center overflow-visible",children:c.map((t,o)=>m(k,{value:t.title,children:t.title},t.title+o))})}),m(q,{}),m(_,{})]}),c.map((t,o)=>m(F,{value:t.title,children:h(t,o)},t.title+o))]}):(c==null?void 0:c.length)===1&&c[0]&&h(c[0],0)]})});export{W as NewsSectionTemplateOne};
|
|
@@ -46,6 +46,8 @@ interface DataNewsProps {
|
|
|
46
46
|
isNewTab?: boolean;
|
|
47
47
|
/** Loading state for load-more. Default false. */
|
|
48
48
|
isLoading?: boolean;
|
|
49
|
+
/** Umami tracking event name for the load more button. */
|
|
50
|
+
dataUmamiEvent?: string;
|
|
49
51
|
}
|
|
50
52
|
interface DataHorizontalScrollProps {
|
|
51
53
|
showGradientOverlay?: boolean;
|
|
@@ -12,6 +12,6 @@ import '../../mobase/dialog.mjs';
|
|
|
12
12
|
import '@base-ui/react/dialog';
|
|
13
13
|
import '@base-ui/react/use-render';
|
|
14
14
|
|
|
15
|
-
declare function SocialProofSection({ template, background, className, idSection, dataHeading, dataBrands, dataButtons, spaceX, isScrollSnap, }: SocialProofSectionProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare function SocialProofSection({ template, background, className, idSection, dataHeading, dataBrands, dataButtons, spaceX, isScrollSnap, editorMode, }: SocialProofSectionProps): react_jsx_runtime.JSX.Element;
|
|
16
16
|
|
|
17
17
|
export { SocialProofSection };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as r}from"../../../chunk-7LRQ2WLZ.mjs";import{jsx as e}from"react/jsx-runtime";import{cn as m}from"../../../lib/utils";import{SectionBlock as s}from"../common-blocks/common-blocks";import{SocialProofTemplate1 as d,SocialProofTemplate2 as P,SocialProofTemplate3 as u,SocialProofTemplate4 as B}from"./SocialProofTemplates";function T({template:t,dataHeading:c,dataBrands:i,dataButtons:a,spaceX:n,isScrollSnap:l,editorMode:S}){const o={dataHeading:c,dataBrands:i,dataButtons:a,spaceX:n,isScrollSnap:l,editorMode:S};switch(t){case 2:return e(P,r({},o));case 3:return e(u,r({},o));case 4:return e(B,r({},o));default:return e(d,r({},o))}}function k({template:t=1,background:c,className:i,idSection:a,dataHeading:n,dataBrands:l=[],dataButtons:S,spaceX:o="20px",isScrollSnap:f,editorMode:p}){return e(s,{className:m(t===3&&"overflow-hidden md:overflow-visible",i),idSection:a,background:c,children:e(T,{template:t,dataHeading:n,dataBrands:l,dataButtons:S,spaceX:o,isScrollSnap:f,editorMode:p})})}export{k as SocialProofSection};
|
|
@@ -12,6 +12,6 @@ import '../../../mobase/dialog.mjs';
|
|
|
12
12
|
import '@base-ui/react/dialog';
|
|
13
13
|
import '@base-ui/react/use-render';
|
|
14
14
|
|
|
15
|
-
declare const SocialProofTemplate3: React.MemoExoticComponent<({ dataHeading, dataBrands, dataButtons }: SocialProofSectionProps) => react_jsx_runtime.JSX.Element>;
|
|
15
|
+
declare const SocialProofTemplate3: React.MemoExoticComponent<({ dataHeading, dataBrands, dataButtons, editorMode }: SocialProofSectionProps) => react_jsx_runtime.JSX.Element>;
|
|
16
16
|
|
|
17
17
|
export { SocialProofTemplate3 };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{a,b as p}from"../../../../chunk-7LRQ2WLZ.mjs";import{jsx as o,jsxs as
|
|
1
|
+
"use client";import{a as u,b as p}from"../../../../chunk-7LRQ2WLZ.mjs";import{jsx as o,jsxs as a}from"react/jsx-runtime";import{memo as v}from"react";import{cn as n}from"../../../../lib/utils";import{useIsMobile as N}from"../../../../hooks/use-mobile";import{Carousel as b,CarouselContent as w,CarouselDots as y,CarouselItem as g}from"../../../mobase/carousel";import{ButtonsBlock as x,HeadingBlock as C}from"../../common-blocks/common-blocks";function m(e,l){var r;if(!e)return o("div",{className:n("h-full w-full",l)});const t=e.url?"a":"div";return o("div",{className:n("h-full w-full",l),children:o(t,p(u({},e.url&&{href:e.url,title:e.name,target:e.newTab?"_blank":"_self",rel:e.newTab?"noreferrer":void 0}),{className:n("flex h-full w-full items-center justify-center rounded-md border border-border bg-card p-3",e.url&&"duration-300 hover:border-primary"),children:o("div",{className:"flex h-full w-full items-center justify-center",children:o("img",{src:e.logo,alt:(r=e.name)!=null?r:"",className:"h-auto max-h-full w-auto max-w-full object-contain"})})}))})}const k=v(({dataHeading:e,dataBrands:l,dataButtons:t,editorMode:r})=>{const h=N(),f=[],c=[];if(l&&l.length>10){const s=Math.ceil(l.length/2);f.push(...l.slice(0,s)),c.push(...l.slice(s))}return a("div",{"data-slot":"social-proof-template-3",children:[e?o(C,{tagline:e.tagline,title:e.title,description:e.description,tagHeading:e.tagHeading,align:"center",colorScheme:e.colorScheme||"pink",sizeHeading:e.sizeHeading,className:e.className}):null,l&&l.length>0?r?o("div",{className:"flex flex-wrap justify-center gap-3 md:gap-4",children:l.map((s,i)=>o("div",{className:"flex basis-5/12 items-center justify-center md:basis-1/4 lg:basis-1/6",children:m(s)},`${s.logo}-${i}`))}):a(b,{opts:{align:h?"center":"start"},className:"w-full",children:[o(w,{className:"overflow-visible md:overflow-hidden",children:l.length>=12?f.map((s,i)=>a(g,{className:"flex shrink-0 basis-5/12 flex-col items-center justify-between gap-3 pl-3 md:basis-1/4 md:gap-4 md:pl-4 lg:basis-1/6",children:[m(s,"min-h-0 flex-1"),c[i]?m(c[i],"min-h-0 flex-1"):o("div",{className:"min-h-0 flex-1"})]},`${s.logo}-${i}`)):l.map((s,i)=>o(g,{className:"flex basis-5/12 items-center justify-center pl-3 md:basis-1/4 md:pl-4 lg:basis-1/6",children:m(s)},`${s.logo}-${i}`))}),o(y,{className:"mt-5"})]}):null,t?o(x,{isFullInMobile:t.isFullInMobile,buttons:t.buttons,className:t.className,align:"center"}):null]})});k.displayName="SocialProofTemplate3";export{k as SocialProofTemplate3};
|
|
@@ -12,6 +12,6 @@ import '../../../mobase/dialog.mjs';
|
|
|
12
12
|
import '@base-ui/react/dialog';
|
|
13
13
|
import '@base-ui/react/use-render';
|
|
14
14
|
|
|
15
|
-
declare const SocialProofTemplate4: React.MemoExoticComponent<({ dataHeading, dataBrands, dataButtons }: SocialProofSectionProps) => react_jsx_runtime.JSX.Element>;
|
|
15
|
+
declare const SocialProofTemplate4: React.MemoExoticComponent<({ dataHeading, dataBrands, dataButtons, editorMode }: SocialProofSectionProps) => react_jsx_runtime.JSX.Element>;
|
|
16
16
|
|
|
17
17
|
export { SocialProofTemplate4 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{a as
|
|
1
|
+
"use client";import{a as p,b as n}from"../../../../chunk-7LRQ2WLZ.mjs";import{Fragment as k,jsx as l,jsxs as w}from"react/jsx-runtime";import{memo as x}from"react";import{cn as f}from"../../../../lib/utils";import{InfiniteSlider as g}from"../../../mobase/infinite-slider";import{ButtonsBlock as v,HeadingBlock as h}from"../../common-blocks/common-blocks";function u(e,i){var s;const o=e!=null&&e.url?"a":"div";return l("div",{className:f("h-full w-full",i),children:l(o,n(p({},(e==null?void 0:e.url)&&{href:e.url,title:e.name,target:e.newTab?"_blank":"_self",rel:e.newTab?"noreferrer":void 0}),{className:f("flex h-full w-full items-center justify-center rounded-md border border-border bg-card p-3",(e==null?void 0:e.url)&&"duration-300 hover:border-primary"),children:l("div",{className:"flex h-full w-full items-center justify-center",children:l("img",{src:e==null?void 0:e.logo,alt:(s=e==null?void 0:e.name)!=null?s:"",className:"h-auto max-h-full w-auto max-w-full object-contain"})})}))})}const y=x(({dataHeading:e,dataBrands:i,dataButtons:o,editorMode:s})=>{var c;const r=(c=i==null?void 0:i.length)!=null?c:0,a=r>6&&!s;return w("div",{"data-slot":"social-proof-template-4",children:[e?l(h,{tagline:e.tagline,title:e.title,description:e.description,tagHeading:e.tagHeading,align:"center",colorScheme:e.colorScheme||"pink",sizeHeading:e.sizeHeading,className:e.className}):null,r>0?l(k,{children:a?l("div",{className:"mark-horizontal-slider relative overflow-hidden",children:l(g,{direction:"horizontal",speed:70,speedOnHover:.05,gap:20,className:"inline-flex flex-row",children:i==null?void 0:i.map((t,m)=>l("div",{className:"w-32 md:w-40",children:u(t)},`${t.logo}-${m}`))})}):l("div",{className:"list-brands -mx-5 flex snap-x snap-mandatory flex-nowrap space-x-3 overflow-x-auto overflow-y-hidden px-5 pb-3 md:-mx-3 md:flex-wrap md:justify-center md:gap-y-6 md:space-x-0 md:px-0",children:i==null?void 0:i.map((t,m)=>l("div",{className:"flex shrink-0 basis-5/12 snap-center items-center justify-center md:basis-1/4 md:px-3 lg:basis-1/6",children:u(t)},`${t.logo}-${m}`))})}):null,o?l(v,{isFullInMobile:o.isFullInMobile,buttons:o.buttons,className:o.className,align:"center"}):null,l("style",{children:`
|
|
2
2
|
.mark-horizontal-slider {
|
|
3
3
|
mask-image: linear-gradient(
|
|
4
4
|
to right,
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
transparent 100%
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
|
-
`})]})});
|
|
18
|
+
`})]})});y.displayName="SocialProofTemplate4";export{y as SocialProofTemplate4};
|
|
@@ -12,6 +12,6 @@ import '../../mobase/dialog.mjs';
|
|
|
12
12
|
import '@base-ui/react/dialog';
|
|
13
13
|
import '@base-ui/react/use-render';
|
|
14
14
|
|
|
15
|
-
declare function TestimonialSection({ template, background, className, idSection, dataHeading, dataTestimonials, dataButtons, }: TestimonialSectionProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare function TestimonialSection({ template, background, className, idSection, dataHeading, dataTestimonials, dataButtons, editorMode, }: TestimonialSectionProps): react_jsx_runtime.JSX.Element;
|
|
16
16
|
|
|
17
17
|
export { TestimonialSection };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as r}from"../../../chunk-7LRQ2WLZ.mjs";import{jsx as o}from"react/jsx-runtime";import{cn as T}from"../../../lib/utils";import{SectionBlock as S}from"../common-blocks/common-blocks";import{TestimonialTemplateOne as m}from"./templates/TestimonialTemplateOne";import{TestimonialTemplateThree as w}from"./templates/TestimonialTemplateThree";import{TestimonialTemplateTwo as a}from"./templates/TestimonialTemplateTwo";function h(e){switch(e.template){case 1:return o(m,r({},e));case 2:return o(a,r({},e));case 3:return o(w,r({},e));default:return o(m,r({},e))}}function k({template:e=1,background:c,className:l,idSection:f,dataHeading:p,dataTestimonials:n,dataButtons:u,editorMode:t}){var i;return o(S,{className:T(e===1&&((i=n==null?void 0:n.length)!=null?i:0)>3&&!t?"[&>.wrapper]:max-w-full [&>.wrapper]:md:px-0":"",e===3?"overflow-hidden":"",l),idSection:f,background:c,children:h({template:e,dataHeading:p,dataTestimonials:n,dataButtons:u,editorMode:t})})}export{k as TestimonialSection};
|
|
@@ -12,6 +12,6 @@ import '../../../mobase/dialog.mjs';
|
|
|
12
12
|
import '@base-ui/react/dialog';
|
|
13
13
|
import '@base-ui/react/use-render';
|
|
14
14
|
|
|
15
|
-
declare const TestimonialTemplateOne: React.MemoExoticComponent<({ dataHeading, dataTestimonials, dataButtons }: TestimonialSectionProps) => react_jsx_runtime.JSX.Element>;
|
|
15
|
+
declare const TestimonialTemplateOne: React.MemoExoticComponent<({ dataHeading, dataTestimonials, dataButtons, editorMode }: TestimonialSectionProps) => react_jsx_runtime.JSX.Element>;
|
|
16
16
|
|
|
17
17
|
export { TestimonialTemplateOne };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import"../../../../chunk-7LRQ2WLZ.mjs";import{jsx as i,jsxs as
|
|
1
|
+
"use client";import"../../../../chunk-7LRQ2WLZ.mjs";import{jsx as i,jsxs as N}from"react/jsx-runtime";import{memo as f}from"react";import{InfiniteSlider as x}from"../../../mobase/infinite-slider";import{ButtonsBlock as g,HeadingBlock as u}from"../../common-blocks/common-blocks";import{TestimonialItemCard as s}from"../shared";const v=f(({dataHeading:l,dataTestimonials:e,dataButtons:o,editorMode:c})=>{var p;const r=(p=e==null?void 0:e.length)!=null?p:0,t=r>3&&!c;return N("div",{"data-slot":"testimonial-template-1",children:[l?i(u,{tagline:l.tagline,title:l.title,description:l.description,tagHeading:l.tagHeading,align:"center",colorScheme:l.colorScheme||"pink",sizeHeading:l.sizeHeading,className:l.className}):null,r>0?t?i("div",{className:"relative -mx-5 overflow-hidden md:mx-0",children:i(x,{direction:"horizontal",speed:70,speedOnHover:.05,gap:24,className:"pb-1.5",children:e==null?void 0:e.map((n,m)=>i(s,{testimonial:n,index:m,className:"mb-2 w-64 md:w-96"},`testimonial-${m}`))})}):i("div",{className:"-mx-5 flex snap-x snap-mandatory flex-nowrap gap-y-6 gap-x-5 overflow-x-auto overflow-y-hidden px-5 pb-3 md:-mx-3 md:w-full md:flex-wrap md:justify-center md:gap-x-0",children:e==null?void 0:e.map((n,m)=>i(s,{testimonial:n,index:m,className:"shrink-0 basis-10/12 snap-center md:px-3 lg:basis-1/3"},`testimonial-${m}`))}):null,o?i(g,{isFullInMobile:o.isFullInMobile,buttons:o.buttons,className:o.className,align:"center"}):null]})});v.displayName="TestimonialTemplateOne";export{v as TestimonialTemplateOne};
|
|
@@ -12,6 +12,6 @@ import '../../../mobase/dialog.mjs';
|
|
|
12
12
|
import '@base-ui/react/dialog';
|
|
13
13
|
import '@base-ui/react/use-render';
|
|
14
14
|
|
|
15
|
-
declare const TestimonialTemplateThree: React.MemoExoticComponent<({ dataHeading, dataTestimonials, dataButtons }: TestimonialSectionProps) => react_jsx_runtime.JSX.Element>;
|
|
15
|
+
declare const TestimonialTemplateThree: React.MemoExoticComponent<({ dataHeading, dataTestimonials, dataButtons, editorMode }: TestimonialSectionProps) => react_jsx_runtime.JSX.Element>;
|
|
16
16
|
|
|
17
17
|
export { TestimonialTemplateThree };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import"../../../../chunk-7LRQ2WLZ.mjs";import{jsx as l,jsxs as a}from"react/jsx-runtime";import{memo as
|
|
1
|
+
"use client";import"../../../../chunk-7LRQ2WLZ.mjs";import{jsx as l,jsxs as a}from"react/jsx-runtime";import{memo as g}from"react";import n from"html-react-parser";import{cn as d}from"../../../../lib/utils";import{AspectRatio as u}from"../../../mobase/aspect-ratio";import{Carousel as p,CarouselContent as x,CarouselDots as N,CarouselItem as h}from"../../../mobase/carousel";import{ButtonsBlock as w,HeadingBlock as b}from"../../common-blocks/common-blocks";import{StarRating as v}from"../shared";function C({className:e}){return l("svg",{width:42,height:36,className:d("shrink-0 text-primary",e),viewBox:"0 0 42 36",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:l("path",{d:"M23.8986 36V25.1748C23.8986 18.3776 25.3972 12.8392 28.3944 8.55944C31.4704 4.1958 36.0056 1.34266 42 0V8.18182C39.3183 8.85315 37.1887 10.1119 35.6113 11.958C34.0338 13.7203 33.0084 15.8601 32.5352 18.3776H39.6338V36H23.8986ZM0 36V25.1748C0 18.3776 1.49859 12.8392 4.49577 8.55944C7.57183 4.1958 12.0676 1.34266 17.9831 0V8.18182C15.3014 8.85315 13.1718 10.1119 11.5944 11.958C10.0169 13.7203 8.99155 15.8601 8.51831 18.3776H15.6169V36H0Z",fill:"currentColor"})})}function f({testimonial:e,className:o}){var i,t,r,c;const s=Number(e.rating)||0,m=!!(e.date||s>0);return l("div",{className:d("testimonial-item shadow-small relative h-full w-full cursor-grab select-none overflow-hidden rounded-xl bg-card p-5 md:p-10",o),"data-slot":"testimonial-slide-item",children:a("div",{className:"flex h-full md:gap-x-10",children:[(i=e.avatar)!=null&&i.trim()?l("div",{className:"relative hidden w-52 shrink-0 grow-0 items-start md:flex",children:l(u,{ratio:2/3,className:"w-full",children:l("img",{src:e.avatar,alt:(t=e.name)!=null?t:"",loading:"lazy",className:"size-full object-contain"})})}):null,a("div",{className:"flex grow flex-col justify-between gap-y-5 md:gap-y-6",children:[a("div",{className:"flex shrink-0 items-end gap-2 md:order-2 lg:gap-x-6",children:[a("div",{className:"min-w-0 grow",children:[e.name?l("div",{className:"text-sm font-bold md:text-base",children:e.name}):null,e.position?l("div",{className:"mt-1 text-xs font-normal text-muted-foreground",children:n(e.position)}):null]}),m?a("div",{className:"hidden shrink-0 grow-0 text-end md:grid md:grid-cols-1 md:gap-1",children:[e.date?l("div",{className:"text-xs text-muted-foreground",children:e.date}):null,s>0?l(v,{rating:s}):null]}):null,(r=e.avatar)!=null&&r.trim()?l("div",{className:"relative w-28 shrink-0 grow-0 md:hidden",children:l(u,{ratio:2/3,className:"w-full",children:l("img",{src:e.avatar,alt:(c=e.name)!=null?c:"",loading:"lazy",className:"size-full object-contain"})})}):null]}),a("div",{className:"flex min-h-0 flex-1 flex-col md:flex-none",children:[a("div",{className:"min-h-0 flex-1",children:[a("div",{className:"mb-1.5 flex shrink-0 gap-3",children:[l(C,{className:"size-5 md:size-6"}),e.shortTitle?l("div",{className:"shrink-0 text-base font-medium md:text-lg",children:n(e.shortTitle)}):null]}),e.description?l("blockquote",{className:"relative text-justify text-base text-foreground",children:n(e.description)}):null]}),m?a("div",{className:d("mt-2 flex shrink-0 items-center gap-2 md:hidden",e.date&&s>0?"justify-between":"justify-end"),children:[e.date?l("div",{className:"text-xs text-muted-foreground",children:e.date}):null,s>0?l(v,{rating:s}):null]}):null]})]})]})})}const k=g(({dataHeading:e,dataTestimonials:o,dataButtons:s,editorMode:m})=>{const i=o!=null?o:[];return a("div",{"data-slot":"testimonial-template-3",children:[e?l(b,{tagline:e.tagline,title:e.title,description:e.description,tagHeading:e.tagHeading,align:"center",colorScheme:e.colorScheme||"pink",sizeHeading:e.sizeHeading,className:e.className}):null,i.length>0?m?l("div",{className:"flex flex-col gap-6",children:i.map((t,r)=>l(f,{testimonial:t},r))}):a(p,{className:"w-full",children:[l(x,{classNameContent:"!overflow-visible",className:"-ml-5 md:-ml-6",children:i.map((t,r)=>l(h,{className:"basis-full pl-5 md:pl-6 lg:basis-10/12 xl:basis-9/12",children:l(f,{testimonial:t})},r))}),i.length>1?l(N,{className:"mt-8"}):null]}):null,s?l(w,{isFullInMobile:s.isFullInMobile,buttons:s.buttons,className:s.className,align:"center"}):null]})});k.displayName="TestimonialTemplateThree";export{k as TestimonialTemplateThree};
|
|
@@ -12,6 +12,6 @@ import '../../../mobase/dialog.mjs';
|
|
|
12
12
|
import '@base-ui/react/dialog';
|
|
13
13
|
import '@base-ui/react/use-render';
|
|
14
14
|
|
|
15
|
-
declare const TestimonialTemplateTwo: React.MemoExoticComponent<({ dataHeading, dataTestimonials, dataButtons }: TestimonialSectionProps) => react_jsx_runtime.JSX.Element>;
|
|
15
|
+
declare const TestimonialTemplateTwo: React.MemoExoticComponent<({ dataHeading, dataTestimonials, dataButtons, editorMode }: TestimonialSectionProps) => react_jsx_runtime.JSX.Element>;
|
|
16
16
|
|
|
17
17
|
export { TestimonialTemplateTwo };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use client";import"../../../../chunk-7LRQ2WLZ.mjs";import{Fragment as
|
|
1
|
+
"use client";import"../../../../chunk-7LRQ2WLZ.mjs";import{Fragment as w,jsx as e,jsxs as a}from"react/jsx-runtime";import{memo as N}from"react";import{InfiniteSlider as b}from"../../../mobase/infinite-slider";import{ButtonsBlock as k,HeadingBlock as h}from"../../common-blocks/common-blocks";import{TestimonialItemCard as v}from"../shared";const p={lg:[{reverse:!1,speed:40},{reverse:!0,speed:50},{reverse:!1,speed:30}],md:[{reverse:!1,speed:30},{reverse:!0,speed:40}],sm:[{reverse:!1,speed:30}]},y=N(({dataHeading:s,dataTestimonials:l,dataButtons:i,editorMode:g})=>{var c;const o=(c=l==null?void 0:l.length)!=null?c:0,f=o>3&&!g,m=n=>e(w,{children:n.map((r,t)=>e(b,{direction:"vertical",reverse:r.reverse,speed:r.speed,speedOnHover:.05,gap:24,className:"px-0.5",classNameMotion:"w-full",children:l==null?void 0:l.map((u,d)=>e(v,{testimonial:u,index:d,className:"px-0 first:ps-0 last:pe-0"},`testimonial-${t}-${d}`))},`slider-${t}`))});return a("div",{"data-slot":"testimonial-template-2",children:[s?e(h,{tagline:s.tagline,title:s.title,description:s.description,tagHeading:s.tagHeading,align:"center",colorScheme:s.colorScheme||"pink",sizeHeading:s.sizeHeading,className:s.className}):null,o>0?f?a("div",{className:"mark-vertical-marquee relative h-[600px] overflow-hidden",children:[e("div",{className:"hidden w-full grid-cols-3 gap-6 lg:grid",children:m(p.lg)}),e("div",{className:"hidden w-full grid-cols-2 gap-6 md:grid lg:hidden",children:m(p.md)}),e("div",{className:"grid w-full grid-cols-1 gap-6 md:hidden",children:m(p.sm)})]}):e("div",{className:"flex w-full flex-wrap justify-center gap-y-6 md:-mx-3",children:l==null?void 0:l.map((n,r)=>e(v,{testimonial:n,index:r,className:"basis-full md:basis-1/2 md:px-3 lg:basis-1/3"},`testimonial-${r}`))}):null,i?e(k,{isFullInMobile:i.isFullInMobile,buttons:i.buttons,className:i.className,align:"center"}):null,e("style",{children:`
|
|
2
2
|
.mark-vertical-marquee {
|
|
3
3
|
mask: linear-gradient(transparent, black 16px, black calc(100% - 16px), transparent);
|
|
4
4
|
}
|
|
5
|
-
`})]})});
|
|
5
|
+
`})]})});y.displayName="TestimonialTemplateTwo";export{y as TestimonialTemplateTwo};
|
|
@@ -10,6 +10,6 @@ import '../../mobase/dialog.mjs';
|
|
|
10
10
|
import '@base-ui/react/dialog';
|
|
11
11
|
import '@base-ui/react/use-render';
|
|
12
12
|
|
|
13
|
-
declare function ActionButton({ action, newTab, offset, dialogQrProps, className, children, ...props }: ActionButtonProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
declare function ActionButton({ action, newTab, offset, dialogQrProps, className, children, variant, loading, disabled, isLoading, isDisabled, onPushTrackingEvent, ...props }: ActionButtonProps): react_jsx_runtime.JSX.Element;
|
|
14
14
|
|
|
15
15
|
export { ActionButton };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{a as
|
|
1
|
+
"use client";import{a as u,b as c,c as L}from"../../../chunk-7LRQ2WLZ.mjs";import{Fragment as J,jsx as f,jsxs as K}from"react/jsx-runtime";import{cn as V}from"../../../lib/utils";import{Button as l}from"../../mobase/button";import{DialogQr as Y}from"../dialog-qr";import{useState as h}from"react";import{useIsMobile as x}from"./utils";function z(e){switch(e){case"primary":return"default";case"tonal":return"secondary";case"danger":return"destructive";case"transparent":return"ghost";default:return e!=null?e:"default"}}function H(U){var b=U,{action:e,newTab:C,offset:a,dialogQrProps:t,className:r,children:i,variant:O,loading:m,disabled:s,isLoading:W,isDisabled:D,onPushTrackingEvent:o}=b,R=L(b,["action","newTab","offset","dialogQrProps","className","children","variant","loading","disabled","isLoading","isDisabled","onPushTrackingEvent"]);const[S,p]=h(!1),M=x(),w=!!(t!=null&&t.qrLink),B=c(u({},R),{variant:z(O),loading:m!=null?m:W,disabled:s!=null?s:D}),_=()=>{const n=w?t==null?void 0:t.qrLink:e;return typeof n=="string"?n.trim():""},y=()=>{const n=_();!n&&typeof e!="function"||(typeof e=="function"?e():window.open(n,C?"_blank":"_self"))},F=(n,I=0)=>{const A=document.querySelector(n);if(!A)return;const N=A.getBoundingClientRect().top+window.scrollY-I;window.scrollTo({top:N,behavior:"smooth"})},G=()=>{typeof e=="string"&&e.startsWith("#")?F(e,a):y()},q=()=>K(J,{children:[f(l,c(u({},B),{className:r,onClick:()=>{p(!0),o==null||o()},"data-slot":"action-button","data-name":"button-action-with-qr",children:i})),f(Y,c(u({},t),{open:S,onOpenChange:()=>{p(!1)},qrLink:(t==null?void 0:t.qrLink)||""}))]});return w?M?t!=null&&t.isQrForAll?q():f(l,c(u({},B),{className:r,onClick:()=>{o==null||o(),y()},"data-slot":"action-button","data-name":"button-action-with-qr",children:i})):q():f(l,c(u({},B),{onClick:()=>{o==null||o(),G()},className:V("cursor-pointer",r),"data-slot":"action-button","data-name":"button-action-without-qr",rel:"noreferrer",children:i}))}export{H as ActionButton};
|
|
@@ -9,7 +9,8 @@ import '../../mobase/dialog.mjs';
|
|
|
9
9
|
import '@base-ui/react/dialog';
|
|
10
10
|
import '@base-ui/react/use-render';
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
type LegacyActionButtonVariant = "primary" | "secondary" | "outline" | "tonal" | "danger" | "transparent";
|
|
13
|
+
interface ActionButtonProps extends Omit<ButtonProps, "disabled" | "loading" | "variant"> {
|
|
13
14
|
/**
|
|
14
15
|
* Action to be performed when the button is clicked.
|
|
15
16
|
*/
|
|
@@ -26,6 +27,26 @@ interface ActionButtonProps extends ButtonProps {
|
|
|
26
27
|
* Props to pass to the DialogQr component. If this prop is provided, the button will open a dialog with a QR code. qrLink in DialogQrProps is required.
|
|
27
28
|
*/
|
|
28
29
|
dialogQrProps?: Partial<DialogQrProps>;
|
|
30
|
+
/**
|
|
31
|
+
* Button variant. Supports both legacy block variants and current Mobase button variants.
|
|
32
|
+
*/
|
|
33
|
+
variant?: LegacyActionButtonVariant | ButtonProps["variant"];
|
|
34
|
+
/**
|
|
35
|
+
* Legacy loading prop from Mobase website blocks.
|
|
36
|
+
*/
|
|
37
|
+
isLoading?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Legacy disabled prop from Mobase website blocks.
|
|
40
|
+
*/
|
|
41
|
+
isDisabled?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Current Mobase button loading prop.
|
|
44
|
+
*/
|
|
45
|
+
loading?: ButtonProps["loading"];
|
|
46
|
+
/**
|
|
47
|
+
* Current Mobase button disabled prop.
|
|
48
|
+
*/
|
|
49
|
+
disabled?: ButtonProps["disabled"];
|
|
29
50
|
/**
|
|
30
51
|
* CSS class to be appended to the root element.
|
|
31
52
|
*/
|
|
@@ -34,6 +55,10 @@ interface ActionButtonProps extends ButtonProps {
|
|
|
34
55
|
* The content for button.
|
|
35
56
|
*/
|
|
36
57
|
children?: ReactNode;
|
|
58
|
+
/**
|
|
59
|
+
* Callback fired when tracking event is pushed.
|
|
60
|
+
*/
|
|
61
|
+
onPushTrackingEvent?: () => void;
|
|
37
62
|
}
|
|
38
63
|
declare const useIsMobile: () => boolean | undefined;
|
|
39
64
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import"../../../chunk-7LRQ2WLZ.mjs";import{useEffect as
|
|
1
|
+
"use client";import"../../../chunk-7LRQ2WLZ.mjs";import{useEffect as e,useLayoutEffect as n,useState as i}from"react";import{UAParser as a}from"ua-parser-js";const r=()=>a().device.type==="mobile",s=typeof window!="undefined"?n:e,c=()=>{const[o,t]=i(!1);return s(()=>{t(r())},[]),o};export{c as useIsMobile};
|