diy-template-components 5.1.4 → 5.10.0

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/build/index.es.js CHANGED
@@ -5,6 +5,7 @@ import moment from 'moment';
5
5
  import Countdown from 'react-countdown';
6
6
  import koreanLocale from 'moment/locale/ko';
7
7
  import ReactDOMServer from 'react-dom/server';
8
+ import '@storybook/theming';
8
9
  import { createTheming, createUseStyles as createUseStyles$1, useTheme as useTheme$1 } from 'react-jss';
9
10
 
10
11
  function insertStyle(css) {
@@ -11786,7 +11787,7 @@ const useCounterSectionStyles = createUseStyles(theme => {
11786
11787
  } = {}) => backgroundImage ? `url("${backgroundImage}")` : 'none',
11787
11788
  backgroundColor: ({
11788
11789
  backgroundColor
11789
- } = {}) => backgroundColor || '#f8f8fa',
11790
+ } = {}) => backgroundColor || theme?.colors?.background2,
11790
11791
  backgroundSize: 'cover',
11791
11792
  backgroundPosition: 'center',
11792
11793
  backgroundRepeat: 'no-repeat',
@@ -11807,7 +11808,8 @@ const useCounterSectionStyles = createUseStyles(theme => {
11807
11808
  },
11808
11809
  grid: {
11809
11810
  display: 'grid',
11810
- gridTemplateColumns: 'repeat(4, 1fr)',
11811
+ gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))',
11812
+ // fits 4 columns in desktop
11811
11813
  gap: ({
11812
11814
  isMobile
11813
11815
  } = {}) => isMobile ? '24px' : '32px',
@@ -11826,7 +11828,7 @@ const useCounterSectionStyles = createUseStyles(theme => {
11826
11828
  fontSize: '64px',
11827
11829
  fontWeight: theme.typography?.fontWeight?.bold,
11828
11830
  lineHeight: 1.1,
11829
- color: 'rgba(247, 37, 133, 1)' ,
11831
+ color: theme?.colors?.AccentColor,
11830
11832
  wordBreak: 'break-word'
11831
11833
  },
11832
11834
  description: {
@@ -11834,7 +11836,7 @@ const useCounterSectionStyles = createUseStyles(theme => {
11834
11836
  fontSize: '20px',
11835
11837
  lineHeight: 1.4,
11836
11838
  fontWeight: '700',
11837
- color: 'rgba(51, 51, 51, 1)' ,
11839
+ color: theme?.colors?.font3,
11838
11840
  wordBreak: 'break-word'
11839
11841
  },
11840
11842
  '@media (max-width: 1024px)': {
@@ -11864,6 +11866,83 @@ const useCounterSectionStyles = createUseStyles(theme => {
11864
11866
  };
11865
11867
  });
11866
11868
 
11869
+ const DURATION_MS = 2000;
11870
+ const EASING = t => 1 - Math.pow(1 - t, 3); // easeOutCubic
11871
+
11872
+ function parseCounterValue(value) {
11873
+ if (value == null || value === '') return null;
11874
+ const match = String(value).trim().match(/^([\d.]+)(.*)$/);
11875
+ if (!match) return null;
11876
+ const num = parseFloat(match[1]);
11877
+ if (Number.isNaN(num)) return null;
11878
+ return {
11879
+ end: num,
11880
+ suffix: match[2] || ''
11881
+ };
11882
+ }
11883
+ function AnimatedCounter({
11884
+ value,
11885
+ className,
11886
+ refSetter
11887
+ }) {
11888
+ const elRef = useRef(null);
11889
+ const rafIdRef = useRef(null);
11890
+ const hasAnimatedRef = useRef(false);
11891
+ useLayoutEffect(() => {
11892
+ hasAnimatedRef.current = false; // Reset so we can re-animate when value changes (e.g. live edit)
11893
+ const parsed = parseCounterValue(value);
11894
+ if (!parsed || !elRef.current) return;
11895
+ const observer = new IntersectionObserver(entries => {
11896
+ const [entry] = entries;
11897
+ if (!entry.isIntersecting || hasAnimatedRef.current) return;
11898
+ hasAnimatedRef.current = true;
11899
+ const startTime = performance.now();
11900
+ const {
11901
+ end,
11902
+ suffix
11903
+ } = parsed;
11904
+ const tick = now => {
11905
+ const elapsed = now - startTime;
11906
+ const progress = Math.min(elapsed / DURATION_MS, 1);
11907
+ const eased = EASING(progress);
11908
+ const current = eased * end;
11909
+ if (elRef.current) {
11910
+ const displayValue = Number.isInteger(end) ? Math.round(current) : parseFloat(current.toFixed(2));
11911
+ elRef.current.textContent = displayValue + suffix;
11912
+ }
11913
+ if (progress < 1) {
11914
+ rafIdRef.current = requestAnimationFrame(tick);
11915
+ }
11916
+ };
11917
+ rafIdRef.current = requestAnimationFrame(tick);
11918
+ }, {
11919
+ threshold: 0.2
11920
+ });
11921
+ observer.observe(elRef.current);
11922
+ return () => {
11923
+ observer.disconnect();
11924
+ if (rafIdRef.current) cancelAnimationFrame(rafIdRef.current);
11925
+ };
11926
+ }, [value]);
11927
+ const parsed = parseCounterValue(value);
11928
+ const setRef = el => {
11929
+ elRef.current = el;
11930
+ refSetter?.(el);
11931
+ };
11932
+ if (parsed) {
11933
+ return /*#__PURE__*/React.createElement("h2", {
11934
+ ref: setRef,
11935
+ className: className
11936
+ }, "0", parsed.suffix);
11937
+ }
11938
+ return /*#__PURE__*/React.createElement("h2", {
11939
+ ref: refSetter,
11940
+ className: className,
11941
+ dangerouslySetInnerHTML: {
11942
+ __html: value
11943
+ }
11944
+ });
11945
+ }
11867
11946
  function CounterSection({
11868
11947
  sectionData,
11869
11948
  sectionIndex
@@ -11874,44 +11953,49 @@ function CounterSection({
11874
11953
  },
11875
11954
  isMobile
11876
11955
  } = useContext(PageContext);
11877
- console.log('llll', sectionData);
11878
- sectionData.components = sectionData.components;
11879
11956
  const metadata = sectionData.metadata || {};
11880
11957
  const backgroundImage = metadata.backgroundImage || '';
11881
- const backgroundColor = metadata.backgroundColor || '#f8f8fa';
11958
+ const backgroundColor = metadata.backgroundColor;
11882
11959
  const classes = useCounterSectionStyles({
11883
11960
  containerWidth,
11884
11961
  isMobile,
11885
11962
  backgroundImage: backgroundImage || null,
11886
11963
  backgroundColor
11887
11964
  });
11888
- const cardData = sectionData?.components[0];
11889
- const [sectionComponent] = sectionData.components || [];
11965
+ const cardData = sectionData?.components?.[0];
11966
+ const [sectionComponent] = sectionData?.components || [];
11890
11967
  const counterSection = sectionComponent?.counterSection;
11891
- counterSection?.components || [];
11968
+ const counters = counterSection?.components || [];
11969
+ const items = cardData?.contentList?.components || counters;
11892
11970
  if (!cardData) return null;
11971
+ const getValue = item => item?.contentHeading?.metadata?.value ?? item?.value?.metadata?.value;
11972
+ const getDescription = item => item?.contentPara?.metadata?.value ?? item?.description?.metadata?.value;
11973
+ const getValueRefSetter = item => item?.contentHeading?.refSetter ?? item?.value?.refSetter;
11974
+ const getDescRefSetter = item => item?.contentPara?.refSetter ?? item?.description?.refSetter;
11893
11975
  return /*#__PURE__*/React.createElement("section", {
11894
11976
  className: classes.section
11895
11977
  }, /*#__PURE__*/React.createElement("div", {
11896
11978
  className: classes.container
11897
11979
  }, /*#__PURE__*/React.createElement("div", {
11898
11980
  className: classes.grid
11899
- }, cardData?.contentList?.components?.map((item, index) => /*#__PURE__*/React.createElement("div", {
11900
- key: item._id || index,
11901
- className: classes.counterItem
11902
- }, item.contentHeading?.metadata?.value != null && item.contentHeading?.metadata?.value !== '' && /*#__PURE__*/React.createElement("h2", {
11903
- ref: item.contentHeading?.refSetter,
11904
- className: classes.value,
11905
- dangerouslySetInnerHTML: {
11906
- __html: item.contentHeading.metadata.value
11907
- }
11908
- }), item.contentPara?.metadata?.value != null && item.contentPara?.metadata?.value !== '' && /*#__PURE__*/React.createElement("p", {
11909
- ref: item.contentPara?.refSetter,
11910
- className: classes.description,
11911
- dangerouslySetInnerHTML: {
11912
- __html: item.contentPara.metadata.value
11913
- }
11914
- }))))));
11981
+ }, items?.map((item, index) => {
11982
+ const value = getValue(item);
11983
+ const description = getDescription(item);
11984
+ return /*#__PURE__*/React.createElement("div", {
11985
+ key: item._id || index,
11986
+ className: classes.counterItem
11987
+ }, value != null && value !== '' && /*#__PURE__*/React.createElement(AnimatedCounter, {
11988
+ value: value,
11989
+ className: classes.value,
11990
+ refSetter: getValueRefSetter(item)
11991
+ }), description != null && description !== '' && /*#__PURE__*/React.createElement("p", {
11992
+ ref: getDescRefSetter(item),
11993
+ className: classes.description,
11994
+ dangerouslySetInnerHTML: {
11995
+ __html: description
11996
+ }
11997
+ }));
11998
+ }))));
11915
11999
  }
11916
12000
 
11917
12001
  var index$5 = /*#__PURE__*/Object.freeze({
@@ -11928,12 +12012,13 @@ const BREAKPOINTS = {
11928
12012
  /**
11929
12013
  * Get current breakpoint from window width
11930
12014
  */
11931
- const getBreakpoint = width => {
12015
+ const getBreakpoint = (width, isMobile) => {
12016
+ if (isMobile) return 'mobile';
11932
12017
  if (width >= BREAKPOINTS.desktop) return 'desktop';
11933
12018
  if (width >= BREAKPOINTS.tablet) return 'tablet';
11934
12019
  return 'mobile';
11935
12020
  };
11936
- const stickyBarBase = {
12021
+ const getStickyBarBase = theme => ({
11937
12022
  position: 'fixed',
11938
12023
  left: 0,
11939
12024
  right: 0,
@@ -11942,100 +12027,86 @@ const stickyBarBase = {
11942
12027
  display: 'flex',
11943
12028
  alignItems: 'center',
11944
12029
  justifyContent: 'center',
11945
- backgroundColor: '#F8F9FB',
11946
- boxShadow: '0 -2px 8px rgba(0, 0, 0, 0.06)',
11947
- borderTop: '1px solid #E5E7EB'
11948
- };
11949
- const stickyBarResponsive = {
11950
- mobile: {
11951
- ...stickyBarBase,
11952
- padding: '12px 16px',
11953
- gap: '12px',
11954
- flexDirection: 'column',
11955
- alignItems: 'stretch'
11956
- },
11957
- tablet: {
11958
- ...stickyBarBase,
11959
- padding: '14px 24px',
11960
- gap: '16px',
11961
- flexDirection: 'row',
11962
- alignItems: 'center'
11963
- },
11964
- desktop: {
11965
- ...stickyBarBase,
11966
- padding: '16px 32px',
11967
- gap: '24px',
11968
- flexDirection: 'row',
11969
- alignItems: 'center'
11970
- }
12030
+ fontFamily: theme?.typography?.fontFamily,
12031
+ backgroundColor: theme?.colors?.ctaColor || '#FFFFFF',
12032
+ boxShadow: theme?.shadows?.secondary ?? '0 -2px 8px rgba(0, 0, 0, 0.06)',
12033
+ borderTop: `1px solid ${theme?.colors?.border2}`
12034
+ });
12035
+ const getStickyBarResponsive = (theme, bgColor) => {
12036
+ const base = getStickyBarBase(theme);
12037
+ return {
12038
+ mobile: {
12039
+ ...base,
12040
+ padding: '12px 16px',
12041
+ gap: '12px',
12042
+ flexDirection: 'column',
12043
+ alignItems: 'stretch',
12044
+ background: '#FFFFFF',
12045
+ color: theme?.colors?.CtaTextColor || 'white'
12046
+ },
12047
+ tablet: {
12048
+ ...base,
12049
+ padding: '14px 24px',
12050
+ gap: '16px',
12051
+ flexDirection: 'row',
12052
+ alignItems: 'center',
12053
+ background: '#FFFFFF',
12054
+ color: theme?.colors?.CtaTextColor || 'white'
12055
+ },
12056
+ desktop: {
12057
+ ...base,
12058
+ padding: '16px 32px',
12059
+ gap: '24px',
12060
+ flexDirection: 'row',
12061
+ alignItems: 'center',
12062
+ background: '#FFFFFF',
12063
+ color: theme?.colors?.CtaTextColor || 'white'
12064
+ }
12065
+ };
11971
12066
  };
11972
- const getStickyBarStyle = breakpoint => stickyBarResponsive[breakpoint] || stickyBarResponsive.mobile;
11973
- const stickyTextBase = {
11974
- color: '#343A40',
11975
- fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
12067
+ const getStickyBarStyle = (breakpoint, theme = {}, bgColor) => getStickyBarResponsive(theme)[breakpoint] || getStickyBarResponsive(theme).mobile;
12068
+ const getStickyTextBase = theme => ({
12069
+ color: theme?.colors?.font2,
12070
+ fontFamily: theme?.typography?.fontFamily ?? 'inherit',
11976
12071
  margin: 0
12072
+ });
12073
+ const getStickyTextResponsive = (theme, bgColor) => {
12074
+ const base = getStickyTextBase(theme);
12075
+ return {
12076
+ mobile: {
12077
+ ...base,
12078
+ fontSize: '13px',
12079
+ lineHeight: 1.4,
12080
+ textAlign: 'center',
12081
+ color: '#000000' ,
12082
+ background: '#FFFFFF'
12083
+ },
12084
+ tablet: {
12085
+ ...base,
12086
+ fontSize: '14px',
12087
+ lineHeight: 1.45,
12088
+ textAlign: 'left',
12089
+ color: '#000000' ,
12090
+ background: '#FFFFFF'
12091
+ },
12092
+ desktop: {
12093
+ ...base,
12094
+ fontSize: '15px',
12095
+ lineHeight: 1.5,
12096
+ textAlign: 'left',
12097
+ color: '#000000' ,
12098
+ background: '#FFFFFF'
12099
+ }
12100
+ };
11977
12101
  };
11978
- const stickyTextResponsive = {
11979
- mobile: {
11980
- ...stickyTextBase,
11981
- fontSize: '13px',
11982
- lineHeight: 1.4,
11983
- textAlign: 'center'
11984
- },
11985
- tablet: {
11986
- ...stickyTextBase,
11987
- fontSize: '14px',
11988
- lineHeight: 1.45,
11989
- textAlign: 'left'
11990
- },
11991
- desktop: {
11992
- ...stickyTextBase,
11993
- fontSize: '15px',
11994
- lineHeight: 1.5,
11995
- textAlign: 'left'
11996
- }
11997
- };
11998
- const getStickyTextStyle = breakpoint => stickyTextResponsive[breakpoint] || stickyTextResponsive.mobile;
11999
- const stickyButtonBase = {
12000
- backgroundColor: '#3366FF',
12001
- color: '#FFFFFF',
12002
- border: 'none',
12003
- fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
12004
- fontWeight: 600,
12005
- textTransform: 'uppercase',
12006
- letterSpacing: '0.02em',
12007
- cursor: 'pointer',
12008
- whiteSpace: 'nowrap',
12009
- flexShrink: 0
12010
- };
12011
- const stickyButtonResponsive = {
12012
- mobile: {
12013
- ...stickyButtonBase,
12014
- padding: '10px 20px',
12015
- fontSize: '12px',
12016
- borderRadius: '6px'
12017
- },
12018
- tablet: {
12019
- ...stickyButtonBase,
12020
- padding: '12px 24px',
12021
- fontSize: '13px',
12022
- borderRadius: '8px'
12023
- },
12024
- desktop: {
12025
- ...stickyButtonBase,
12026
- padding: '14px 28px',
12027
- fontSize: '14px',
12028
- borderRadius: '8px'
12029
- }
12030
- };
12031
- const getStickyButtonStyle = breakpoint => stickyButtonResponsive[breakpoint] || stickyButtonResponsive.mobile;
12102
+ const getStickyTextStyle = (breakpoint, theme = {}) => getStickyTextResponsive(theme)[breakpoint] || getStickyTextResponsive(theme).mobile;
12032
12103
 
12033
12104
  // --- Floating (WhatsApp) type ---
12034
12105
 
12035
- const floatingButtonBase = {
12106
+ const getFloatingButtonBase = theme => ({
12036
12107
  position: 'fixed',
12037
12108
  bottom: 24,
12038
- right: 24,
12109
+ right: 9,
12039
12110
  width: 'fit-content',
12040
12111
  marginLeft: 'auto',
12041
12112
  zIndex: 9999,
@@ -12043,47 +12114,50 @@ const floatingButtonBase = {
12043
12114
  alignItems: 'center',
12044
12115
  gap: '10px',
12045
12116
  padding: '12px 20px',
12046
- backgroundColor: '#FFFFFF',
12047
- border: '1px solid #E5E7EB',
12117
+ backgroundColor: theme?.colors?.ctaColor || '#FFFFFF',
12118
+ border: `1px solid ${theme?.palette?.border?.secondary ?? '#E5E7EB'}`,
12048
12119
  borderRadius: '9999px',
12049
- boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)',
12120
+ boxShadow: theme?.shadows?.primary ?? '0 4px 12px rgba(0, 0, 0, 0.1)',
12050
12121
  cursor: 'pointer',
12051
12122
  textDecoration: 'none',
12052
- fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
12053
- fontWeight: 700,
12123
+ fontFamily: theme?.typography?.fontFamily ?? 'inherit',
12124
+ fontWeight: theme?.typography?.fontWeight?.bold ?? 700,
12054
12125
  fontSize: '14px',
12055
12126
  textTransform: 'uppercase',
12056
12127
  letterSpacing: '0.02em',
12057
- color: '#000000',
12128
+ color: theme?.colors?.CtaTextColor || 'white',
12058
12129
  transition: 'box-shadow 0.2s ease, transform 0.2s ease'
12130
+ });
12131
+ const getFloatingButtonResponsive = theme => {
12132
+ const base = getFloatingButtonBase(theme);
12133
+ return {
12134
+ mobile: {
12135
+ ...base,
12136
+ bottom: 142,
12137
+ left: 16,
12138
+ padding: '10px 16px',
12139
+ gap: '8px',
12140
+ fontSize: '12px'
12141
+ },
12142
+ tablet: {
12143
+ ...base,
12144
+ bottom: 20,
12145
+ left: 20,
12146
+ padding: '12px 18px',
12147
+ gap: '10px',
12148
+ fontSize: '13px'
12149
+ },
12150
+ desktop: {
12151
+ ...base,
12152
+ bottom: 24,
12153
+ left: 24,
12154
+ padding: '12px 20px',
12155
+ gap: '10px',
12156
+ fontSize: '14px'
12157
+ }
12158
+ };
12059
12159
  };
12060
- const floatingButtonResponsive = {
12061
- mobile: {
12062
- ...floatingButtonBase,
12063
- bottom: 16,
12064
- left: 16,
12065
- padding: '10px 16px',
12066
- gap: '8px',
12067
- fontSize: '12px'
12068
- },
12069
- tablet: {
12070
- ...floatingButtonBase,
12071
- bottom: 20,
12072
- left: 20,
12073
- padding: '12px 18px',
12074
- gap: '10px',
12075
- fontSize: '13px'
12076
- },
12077
- desktop: {
12078
- ...floatingButtonBase,
12079
- bottom: 24,
12080
- left: 24,
12081
- padding: '12px 20px',
12082
- gap: '10px',
12083
- fontSize: '14px'
12084
- }
12085
- };
12086
- const getFloatingButtonStyle = breakpoint => floatingButtonResponsive[breakpoint] || floatingButtonResponsive.mobile;
12160
+ const getFloatingButtonStyle = (breakpoint, theme = {}) => getFloatingButtonResponsive(theme)[breakpoint] || getFloatingButtonResponsive(theme).mobile;
12087
12161
  const whatsAppIconSvgSize = {
12088
12162
  mobile: 24,
12089
12163
  tablet: 26,
@@ -12171,12 +12245,17 @@ function StickyCta({
12171
12245
  whatsAppLabel = 'SUPPORT',
12172
12246
  whatsAppIconColor,
12173
12247
  whatsAppButtonBackgroundColor,
12174
- iconImageUrl
12248
+ iconImageUrl,
12249
+ nodeData,
12250
+ extraProps
12175
12251
  }) {
12176
- console.log('nishu03333', sectionData);
12252
+ const {
12253
+ isMobile
12254
+ } = useContext(PageContext);
12177
12255
  const node = sectionData?.components?.[0];
12178
12256
  const contentList = node?.contentList?.components || [];
12179
12257
  const showEditHint = sectionData?.isDefaultEditor ?? false;
12258
+ sectionData?.bgSection?.components?.[0]?.sectionBgData?.metadata?.value;
12180
12259
  const propsFromSection = node ? {
12181
12260
  type: node?.title?.metadata?.value ?? type,
12182
12261
  stickyMessage: contentList[1]?.contentPara?.metadata?.value ?? stickyMessage,
@@ -12199,8 +12278,9 @@ function StickyCta({
12199
12278
  whatsAppButtonBackgroundColor,
12200
12279
  iconImageUrl
12201
12280
  };
12202
- const whatsAppUrl = p?.whatsAppPhoneNumber ? p?.whatsAppPhoneNumber : buildWhatsAppUrl(p?.whatsAppPhoneNumber);
12203
- const [breakpoint, setBreakpoint] = useState(() => typeof window !== 'undefined' ? getBreakpoint(window.innerWidth) : 'mobile');
12281
+ const whatsAppUrl = buildWhatsAppUrl(p?.whatsAppPhoneNumber) ?? p?.whatsAppHref ?? '#';
12282
+ const theme = useTheme() || {};
12283
+ const [breakpoint, setBreakpoint] = useState(() => typeof window !== 'undefined' ? getBreakpoint(window.innerWidth, isMobile) : 'mobile');
12204
12284
  useEffect(() => {
12205
12285
  if (typeof window === 'undefined') return;
12206
12286
  const onResize = () => setBreakpoint(getBreakpoint(window.innerWidth));
@@ -12229,14 +12309,14 @@ function StickyCta({
12229
12309
  }, "Click on edit button to edit this section")) : null;
12230
12310
  if (p.type === 'floating') {
12231
12311
  const buttonStyle = {
12232
- ...getFloatingButtonStyle(breakpoint),
12312
+ ...getFloatingButtonStyle(breakpoint, theme),
12233
12313
  ...(p.whatsAppButtonBackgroundColor != null && {
12234
12314
  backgroundColor: p.whatsAppButtonBackgroundColor
12235
12315
  })
12236
12316
  };
12237
12317
  const iconSize = getWhatsAppIconSize(breakpoint);
12238
12318
  const iconColor = p.whatsAppIconColor ?? DEFAULT_WHATSAPP_ICON_COLOR;
12239
- return /*#__PURE__*/React.createElement(React.Fragment, null, editHintBlock, /*#__PURE__*/React.createElement("a", {
12319
+ return /*#__PURE__*/React.createElement(React.Fragment, null, isMobile ? null : editHintBlock, /*#__PURE__*/React.createElement("a", {
12240
12320
  href: whatsAppUrl,
12241
12321
  target: "_blank",
12242
12322
  rel: "noopener noreferrer",
@@ -12258,28 +12338,29 @@ function StickyCta({
12258
12338
  }), /*#__PURE__*/React.createElement("span", null, p.whatsAppLabel)));
12259
12339
  }
12260
12340
 
12261
- // type === 'sticky' – button uses mobile number from props to build URL; click redirects to WhatsApp
12262
- const barStyle = getStickyBarStyle(breakpoint);
12263
- const textStyle = getStickyTextStyle(breakpoint);
12264
- const buttonStyle = getStickyButtonStyle(breakpoint);
12265
- return /*#__PURE__*/React.createElement(React.Fragment, null, editHintBlock, /*#__PURE__*/React.createElement("div", {
12341
+ // type === 'sticky' – use primary Button (same as other sections) linking to WhatsApp
12342
+ const barStyle = getStickyBarStyle(breakpoint, theme);
12343
+ const textStyle = getStickyTextStyle(breakpoint, theme);
12344
+ return /*#__PURE__*/React.createElement(React.Fragment, null, isMobile ? null : editHintBlock, /*#__PURE__*/React.createElement("div", {
12266
12345
  style: barStyle,
12267
- role: "banner"
12346
+ role: "banner",
12347
+ "access-cta-sticky": "DIY"
12268
12348
  }, /*#__PURE__*/React.createElement("p", {
12269
12349
  style: textStyle
12270
- }, p.stickyMessage), /*#__PURE__*/React.createElement("a", {
12271
- href: whatsAppUrl,
12272
- target: "_blank",
12273
- rel: "noopener noreferrer",
12274
- "access-cta-container": "DIY",
12275
- style: {
12276
- ...buttonStyle,
12277
- textDecoration: 'none',
12278
- display: 'inline-flex',
12279
- alignItems: 'center',
12280
- justifyContent: 'center'
12281
- }
12282
- }, p.stickyButtonText)));
12350
+ }, p.stickyMessage), /*#__PURE__*/React.createElement(Button, {
12351
+ data: {
12352
+ isLink: 1,
12353
+ isExternal: 1,
12354
+ link: whatsAppUrl,
12355
+ value: p.stickyButtonText
12356
+ },
12357
+ type: "primary",
12358
+ styling: {
12359
+ background: theme?.colors?.ctaColor
12360
+ },
12361
+ size: breakpoint === 'mobile' ? 'small' : 'medium',
12362
+ "access-cta-container": "DIY"
12363
+ })));
12283
12364
  }
12284
12365
 
12285
12366
  var index$4 = /*#__PURE__*/Object.freeze({
@@ -12624,7 +12705,8 @@ const useVideoWorkshopPromotionStyles = createUseStyles(theme => {
12624
12705
  return {
12625
12706
  section: {
12626
12707
  width: '100%',
12627
- background: 'linear-gradient(135deg, #6b2d5c 0%, #4a3f6b 40%, #2d5a6b 70%, #3d6b5a 100%)',
12708
+ background: theme?.colors?.background2,
12709
+ color: theme?.colors?.font3,
12628
12710
  minHeight: '100%',
12629
12711
  '&, & *, & *:before, & *:after': {
12630
12712
  fontFamily: theme?.typography?.fontFamily,
@@ -12664,7 +12746,6 @@ const useVideoWorkshopPromotionStyles = createUseStyles(theme => {
12664
12746
  lineHeight: 1.25,
12665
12747
  letterSpacing: '3px',
12666
12748
  textTransform: 'uppercase',
12667
- color: theme.palette?.font?.invertedDefault || 'rgba(255,255,255,0.9)',
12668
12749
  wordBreak: 'break-word',
12669
12750
  fontWeight: theme.typography?.fontWeight?.regular
12670
12751
  },
@@ -12673,15 +12754,12 @@ const useVideoWorkshopPromotionStyles = createUseStyles(theme => {
12673
12754
  fontSize: theme.typography.fontSize.h2,
12674
12755
  lineHeight: 1.1,
12675
12756
  letterSpacing: '-1px',
12676
- fontWeight: theme.typography?.fontWeight?.bold,
12677
- color: theme.palette?.font?.invertedDefault || '#ffffff',
12678
12757
  wordBreak: 'break-word'
12679
12758
  },
12680
12759
  subHeading: {
12681
12760
  margin: 0,
12682
12761
  fontSize: theme.typography.fontSize.body,
12683
12762
  lineHeight: 1.5,
12684
- color: theme.palette?.font?.invertedDefault || 'rgba(255,255,255,0.95)',
12685
12763
  wordBreak: 'break-word',
12686
12764
  maxWidth: '600px'
12687
12765
  },
@@ -12727,7 +12805,6 @@ const useVideoWorkshopPromotionStyles = createUseStyles(theme => {
12727
12805
  margin: 0,
12728
12806
  fontSize: theme.typography.fontSize.body,
12729
12807
  fontWeight: theme.typography?.fontWeight?.semiBold,
12730
- color: '#ffffff',
12731
12808
  lineHeight: 1.3
12732
12809
  }
12733
12810
  },
@@ -12742,7 +12819,6 @@ const useVideoWorkshopPromotionStyles = createUseStyles(theme => {
12742
12819
  '& p': {
12743
12820
  margin: 0,
12744
12821
  fontSize: theme.typography.fontSize.body,
12745
- color: '#ffffff',
12746
12822
  lineHeight: 1.4
12747
12823
  }
12748
12824
  },