@hellobetterdigitalnz/selwynui 0.0.1-63 → 0.0.1-65

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hellobetterdigitalnz/selwynui",
3
- "version": "0.0.1-63",
3
+ "version": "0.0.1-65",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
@@ -1,9 +1,13 @@
1
1
  import styles from '../brandBuilder.module.scss'
2
2
  import BrandBuilderToolTemplateItemProps from "./BrandBuilderToolTemplateItemProps.tsx";
3
- const BrandBuilderToolTemplateItem = ({icon, iconName, active} : BrandBuilderToolTemplateItemProps) =>{
3
+ const BrandBuilderToolTemplateItem = ({icon, iconName, active, onClick} : BrandBuilderToolTemplateItemProps) =>{
4
4
  return <div className={styles.item}>
5
- <div className={`${styles.itemWrapper} ${active && styles.active}`} aria-description={iconName}>
5
+ <div
6
+ onClick={onClick}
7
+ className={`${styles.itemWrapper} ${active && styles.active}`} aria-description={iconName}
8
+ >
6
9
  {icon}
10
+ <p>{iconName}</p>
7
11
  </div>
8
12
  </div>
9
13
  }
@@ -72,12 +72,22 @@
72
72
 
73
73
  .itemWrapper{
74
74
  display: flex;
75
+ flex-direction: column;
75
76
  padding: 16px;
76
77
  align-items: center;
77
78
  justify-content: center;
78
79
  transition: all 0.3s ease-in-out;
79
80
  border: 2px solid transparent;
80
81
 
82
+ p{
83
+ font-size: 14px;
84
+ font-style: normal;
85
+ font-weight: 700;
86
+ line-height: 1.4;
87
+ letter-spacing: -0.14px;
88
+ margin-top: 12px;
89
+ }
90
+
81
91
  &:hover, &.active{
82
92
  background: #FFFFFF;
83
93
  border: 2px solid var(--color-block-text);
@@ -0,0 +1,92 @@
1
+ import React from 'react'
2
+ import type {Meta, StoryObj} from "@storybook/react-vite";
3
+ import CheckOutActionBlock from "./CheckOutActionBlock";
4
+ import ElementHolder from "../../Shared/ElementHolder/ElementHolder";
5
+
6
+ const meta : Meta<typeof CheckOutActionBlock> = {
7
+ title: "Form / CheckOutActionBlock",
8
+ component: CheckOutActionBlock,
9
+ }
10
+
11
+ export default meta;
12
+ type Story = StoryObj<typeof CheckOutActionBlock>
13
+
14
+ const CheckOutActionTemplate: Story = {
15
+ render : () => {
16
+ return <ElementHolder paddingTop="sm" paddingBottom="sm" pillar="visit" level="primary">
17
+ <CheckOutActionBlock
18
+ title={'Check out the action'}
19
+ cards={[
20
+ {
21
+ image: "https://images.pexels.com/photos/1854897/pexels-photo-1854897.jpeg",
22
+ link: {
23
+ title: "Beautiful Landscape",
24
+ href: "#",
25
+ target: "_self"
26
+ }
27
+ },
28
+ {
29
+ image: "https://images.pexels.com/photos/1595655/pexels-photo-1595655.jpeg",
30
+ link: {
31
+ title: "Mountain View",
32
+ href: "#",
33
+ target: "_self"
34
+ }
35
+ },
36
+ {
37
+ image: "https://images.pexels.com/photos/3184291/pexels-photo-3184291.jpeg",
38
+ link: {
39
+ title: "Ocean Scene",
40
+ href: "#",
41
+ target: "_self"
42
+ }
43
+ },
44
+ {
45
+ image: "https://images.pexels.com/photos/1181690/pexels-photo-1181690.jpeg",
46
+ link: {
47
+ title: "Forest Path",
48
+ href: "#",
49
+ target: "_self"
50
+ }
51
+ },
52
+ {
53
+ image: "https://images.pexels.com/photos/1854897/pexels-photo-1854897.jpeg",
54
+ link: {
55
+ title: "Desert Sunset",
56
+ href: "#",
57
+ target: "_self"
58
+ }
59
+ },
60
+ {
61
+ image: "https://images.pexels.com/photos/1595655/pexels-photo-1595655.jpeg",
62
+ link: {
63
+ title: "City Lights",
64
+ href: "#",
65
+ target: "_self"
66
+ }
67
+ },
68
+ {
69
+ image: "https://images.pexels.com/photos/3184291/pexels-photo-3184291.jpeg",
70
+ link: {
71
+ title: "River Valley",
72
+ href: "#",
73
+ target: "_self"
74
+ }
75
+ },
76
+ {
77
+ image: "https://images.pexels.com/photos/1181690/pexels-photo-1181690.jpeg",
78
+ link: {
79
+ title: "Mountain Peak",
80
+ href: "#",
81
+ target: "_self"
82
+ }
83
+ }
84
+ ]}
85
+ />
86
+ </ElementHolder>
87
+ }
88
+ }
89
+
90
+ export const CheckOutActionView = {
91
+ ...CheckOutActionTemplate,
92
+ }
@@ -0,0 +1,80 @@
1
+ import styles from './checkOutAction.module.scss';
2
+ import Slider from "react-slick";
3
+ import Container from "../../Shared/Container/Container.tsx";
4
+ import '../slider.scss'
5
+ import {CaretLeft, CaretRight} from "@hellobetterdigitalnz/selwynui";
6
+ import {useRef} from "react";
7
+ import CheckOutActionBlockProps from "./CheckOutActionBlockProps.tsx";
8
+
9
+ const CheckOutActionBlock = (props: CheckOutActionBlockProps) => {
10
+ const { title, cards = [] } = props;
11
+ const sliderRef = useRef<any>(null);
12
+
13
+ const settings = {
14
+ dots: false,
15
+ arrows: false,
16
+ infinite: false,
17
+ speed: 500,
18
+ touchMove: true,
19
+ variableWidth: true,
20
+ slidesToShow: 1,
21
+ slidesToScroll: 1,
22
+ };
23
+
24
+ return (
25
+ <div className={`${styles.checkOutAction} carouselBlock`}>
26
+ <Container>
27
+ <div className={styles.carouselWrapper}>
28
+ <div className={styles.carouselTitle}>
29
+ <h3>{title}</h3>
30
+ <div className={styles.actions}>
31
+ <button
32
+ className="custom-arrow prev"
33
+ onClick={() => sliderRef.current?.slickPrev()}
34
+ aria-label="Previous"
35
+ >
36
+ <CaretLeft type="thin" />
37
+ </button>
38
+
39
+ <button
40
+ className="custom-arrow next"
41
+ onClick={() => sliderRef.current?.slickNext()}
42
+ aria-label="Next"
43
+ >
44
+ <CaretRight type="thin" />
45
+ </button>
46
+ </div>
47
+ </div>
48
+ <Slider ref={sliderRef} {...settings}>
49
+ {cards.map((item, index) => (
50
+ <div key={index} className={styles.imageSlide}>
51
+ {item.link?.href ? (
52
+ <a
53
+ href={item.link.href}
54
+ target={item.link.target || '_self'}
55
+ rel={item.link.rel}
56
+ className={styles.imageLink}
57
+ >
58
+ <img
59
+ src={item.image}
60
+ alt={item.link.title || `Image ${index + 1}`}
61
+ className={styles.image}
62
+ />
63
+ </a>
64
+ ) : (
65
+ <img
66
+ src={item.image}
67
+ alt={`Image ${index + 1}`}
68
+ className={styles.image}
69
+ />
70
+ )}
71
+ </div>
72
+ ))}
73
+ </Slider>
74
+ </div>
75
+ </Container>
76
+ </div>
77
+ );
78
+ };
79
+
80
+ export default CheckOutActionBlock;
@@ -0,0 +1,18 @@
1
+
2
+ export interface ImageItem {
3
+ image?: string;
4
+ link?: {
5
+ title?: string;
6
+ href?: string;
7
+ target?: "_blank" | "_self" | "_parent" | "_top";
8
+ rel?: string;
9
+ };
10
+ }
11
+
12
+ interface CheckOutActionBlockProps {
13
+ title?: string;
14
+ cards?: ImageItem[];
15
+ pillar?: 'visit' | 'live' | 'business' | 'participate' | 'taste'
16
+ }
17
+
18
+ export default CheckOutActionBlockProps;
@@ -0,0 +1,78 @@
1
+ .checkOutAction {
2
+ padding: 76px 0;
3
+
4
+ @media (max-width: 834px) {
5
+ padding: 64px 0;
6
+ }
7
+
8
+ .carouselWrapper {
9
+ width: 100%;
10
+ }
11
+
12
+ .carouselTitle {
13
+ margin: -12px;
14
+ margin-bottom: 50px;
15
+ display: flex;
16
+ flex-wrap: wrap;
17
+ justify-content: space-between;
18
+ align-items: center;
19
+
20
+ h3{
21
+ font-size: 72px;
22
+ line-height: 1;
23
+ font-weight: 700;
24
+ padding: 12px;
25
+ letter-spacing: -3.6px;
26
+ }
27
+
28
+
29
+ .actions {
30
+ padding: 12px;
31
+ }
32
+
33
+ @media screen and (min-width: 992px) {
34
+ margin-bottom: 66px;
35
+
36
+
37
+ h3 {
38
+ font-size: var(--font-size-h3);
39
+ }
40
+ }
41
+ }
42
+
43
+ .imageSlide {
44
+ width: 312px !important;
45
+ margin-right: 16px;
46
+
47
+ @media screen and (min-width: 992px) {
48
+ width: 456px !important;
49
+ margin-right: 24px;
50
+ }
51
+ }
52
+
53
+ .imageLink {
54
+ display: block;
55
+ text-decoration: none;
56
+ position: relative;
57
+ overflow: hidden;
58
+ border-radius: 8px;
59
+
60
+ &:hover .image {
61
+ transform: scale(1.05);
62
+ }
63
+ }
64
+
65
+ .image {
66
+ width: 100%;
67
+ height: 240px;
68
+ object-fit: cover;
69
+ display: block;
70
+ border-radius: 12px;
71
+ transition: transform 0.3s ease;
72
+ border: 1px solid var(--color-text);
73
+
74
+ @media screen and (min-width: 992px) {
75
+ height: 299px;
76
+ }
77
+ }
78
+ }
@@ -41,4 +41,5 @@
41
41
  }
42
42
  }
43
43
 
44
- }
44
+ }
45
+
@@ -46,7 +46,7 @@
46
46
  width: 20px;
47
47
  height: 20px;
48
48
  border-radius: 4px;
49
- background-color: var(--color-white);
49
+ background-color: white;
50
50
  border: 1px solid var(--form-field-border);
51
51
  outline: 2px solid transparent;
52
52
  outline-offset: 2px;
@@ -14,7 +14,7 @@ import ArrowRight from "../../Icons/Arrows/ArrowRight/ArrowRight";
14
14
  import Path from "../../Icons/MapAndTravel/Path/Path";
15
15
  import Mountains from "../../Icons/WeatherAndNature/Mountains/Mountains"
16
16
  import Clock from "../../Icons/Time/Clock/Clock"
17
-
17
+ import Media from "../../DataDisplay/Media/Media"
18
18
 
19
19
  const meta: Meta = {
20
20
  title: "Form / LandingPageForm",
@@ -32,46 +32,45 @@ type Story = StoryObj<typeof meta>
32
32
  const LandingPageFormTemplate: Story = {
33
33
  render: () => {
34
34
  return (
35
- <ElementHolder paddingTop="sm" paddingBottom="md" pillar="visit" level="light">
35
+ <ElementHolder paddingTop="md" paddingBottom="md" pillar="visit" level="light">
36
36
  <LandingPageForm landingPageFormLeft={
37
37
  <LandingPageFormLeft
38
- actions={[
38
+ extraClass={"customHeadingStyle"}
39
+ callToActions={[
39
40
  {
40
41
  title: "Lorem ipsum dolor sit",
41
42
  text: "Lorem ipsum dolor sit amet, consectetur adipiscing.",
42
- icon: <Path type="fill"/>
43
+ icon: <Path type="fill" />
43
44
  },
44
45
  {
45
46
  title: "Lorem ipsum dolor sit",
46
47
  text: "Lorem ipsum dolor sit amet, consectetur adipiscing.",
47
- icon: <Mountains type="fill"/>
48
+ icon: <Mountains type="fill" />
48
49
  },
49
50
  {
50
51
  title: "Lorem ipsum dolor sit",
51
52
  text: "Lorem ipsum dolor sit amet, consectetur adipiscing.",
52
- icon: <Clock type="fill"/>
53
+ icon: <Clock type="fill" />
53
54
  },
54
55
  ]}
55
56
  >
56
57
  <h4>
57
58
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore.
58
59
  </h4>
59
-
60
+
60
61
  <p>
61
62
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
62
63
  </p>
63
- {/*
64
- <div>
65
- <img src="/img/landing-form-video.png" alt="" />
66
- </div> */}
67
-
68
- <h6>
64
+
65
+ <Media/>
66
+
67
+ <h5>
69
68
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.
70
- </h6>
71
-
72
- <p>
69
+ </h5>
70
+
71
+ <h6>
73
72
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.
74
- </p>
73
+ </h6>
75
74
  </LandingPageFormLeft>
76
75
  } landingPageFormRight={
77
76
  <LandingPageFormRight
@@ -89,7 +88,7 @@ const LandingPageFormTemplate: Story = {
89
88
  <Checkbox label={"I’d love to receive updates about events and happenings in Selwyn."} />
90
89
  </>
91
90
  }
92
- action={<Button label="ENTER NOW" secondaryIcon={<ArrowRight />} />}
91
+ callToAction={<Button label="ENTER NOW" secondaryIcon={<ArrowRight />} pillar="visit" level="primary"/>}
93
92
  />
94
93
  }>
95
94
  </LandingPageForm>
@@ -4,34 +4,35 @@ import styles from "./landingPageForm.module.scss";
4
4
  const LandingPageFormLeft = (props: LandingPageFormLeftProps) => {
5
5
  const {
6
6
  children,
7
- actions
7
+ callToActions,
8
+ extraClass
8
9
  } = props;
9
10
 
10
11
  return (
11
- <div className={styles.landingPageFormLeftWrapper}>
12
+ <div className={`${styles.landingPageFormLeftWrapper} ${extraClass}`}>
12
13
  <div className={`${styles.landingPageFormLeftTop} typography`}>
13
14
  {children}
14
15
  </div>
15
16
 
16
17
  <div className={styles.landingPageFormLeftBottom}>
17
18
 
18
- {actions && actions.length > 0 && (
19
+ {callToActions && callToActions.length > 0 && (
19
20
  <div className={styles.contentItemWrapper}>
20
21
  <ul>
21
22
  {
22
- actions?.map((action, index) => (
23
+ callToActions?.map((callToAction, index) => (
23
24
  <li key={index}>
24
25
  <div className={styles.contentItemWrapperIcon}>
25
- {action.icon}
26
+ {callToAction.icon}
26
27
  </div>
27
28
 
28
- <div>
29
+ <div className={styles.contentListWrapper}>
29
30
  <h1>
30
- {action.title}
31
+ {callToAction.title}
31
32
  </h1>
32
33
 
33
34
  <h2>
34
- {action.text}
35
+ {callToAction.text}
35
36
  </h2>
36
37
  </div>
37
38
  </li>
@@ -6,7 +6,8 @@ export interface LandingFormContentItem {
6
6
  }
7
7
  interface LandingPageFormLeftProps {
8
8
  children?: ReactNode
9
- actions?: LandingFormContentItem[];
9
+ callToActions?: LandingFormContentItem[];
10
+ extraClass?: string;
10
11
  }
11
12
 
12
13
  export default LandingPageFormLeftProps
@@ -10,7 +10,7 @@ const LandingPageFormRight = (props: LandingPageFormRightProps) => {
10
10
  formImage,
11
11
  extraClass,
12
12
  children,
13
- action
13
+ callToAction
14
14
  } = props
15
15
 
16
16
  const classes = [
@@ -35,7 +35,7 @@ const LandingPageFormRight = (props: LandingPageFormRightProps) => {
35
35
  "button",
36
36
  "checkbox"
37
37
  )}>
38
- {action}
38
+ {callToAction}
39
39
  </div>
40
40
  </div>
41
41
  </ElementHolder>
@@ -5,7 +5,7 @@ interface LandingPageFormRightProps {
5
5
  formTitle?: string
6
6
  formText?: string
7
7
  children?: ReactNode
8
- action?: ReactNode
8
+ callToAction?: ReactNode
9
9
  extraClass?: string
10
10
  }
11
11
 
@@ -1,9 +1,9 @@
1
1
  .landingPageFormBlock {
2
+
2
3
  .landingPageFormBlockWrapper {
3
- margin: 0 -24px;
4
+
4
5
  .landingPageFormLeftWrapper {
5
6
  width: 100%;
6
- margin: 0 24px;
7
7
 
8
8
  .landingPageFormLeftTop {
9
9
  p {
@@ -22,38 +22,45 @@
22
22
  }
23
23
 
24
24
  .landingPageFormLeftBottom {
25
- margin-top: 32px;
26
-
27
25
  .contentItemWrapper {
28
26
  ul {
29
27
  list-style: none;
30
- padding: 0;
28
+
31
29
 
32
30
  li {
33
31
  display: flex;
34
- gap: 16px;
35
- margin-bottom: 72px;
32
+ margin: 30px 0px;
36
33
  align-items: center;
37
34
 
38
35
  .contentItemWrapperIcon {
39
36
  color: var(--color-taste);
37
+
38
+ svg {
39
+ width: 48px;
40
+ height: 48px;
41
+ color: var(--pathway-card-text);
42
+ }
40
43
  }
41
44
 
42
- div {
45
+ .contentListWrapper {
43
46
  display: block;
47
+ padding-left: 16px;
44
48
 
45
49
  h1 {
46
50
  font-size: var(--font-size-h6);
47
51
  font-weight: var(--font-weight-h6);
48
52
  line-height: var(--line-height-label);
53
+ letter-spacing: var(--letter-spacing-body-regular);
49
54
  }
50
55
 
51
56
  h2 {
52
57
  font-size: var(--font-size-h6);
53
58
  font-weight: var(--font-weight-body-regular);
54
59
  line-height: var(--line-height-label);
60
+ letter-spacing: var(--letter-spacing-body-regular);
55
61
  }
56
62
  }
63
+
57
64
  }
58
65
  }
59
66
  }
@@ -66,7 +73,6 @@
66
73
  border-radius: 2px 2px 96px 2px;
67
74
  position: relative;
68
75
  overflow: hidden;
69
- margin: 0 24px;
70
76
 
71
77
  img {
72
78
  border-radius: 2px 2px 250px 2px;
@@ -82,19 +88,21 @@
82
88
  font-size: var(--font-size-h4);
83
89
  font-weight: var(--font-weight-bold);
84
90
  line-height: var(--line-height-h4);
91
+ letter-spacing: var(--letter-spacing-h4);
85
92
  }
86
93
 
87
94
  h2 {
88
95
  font-size: 28px;
89
96
  font-weight: var(--font-weight-body-regular);
90
97
  line-height: var(--line-height-h6);
91
- padding: 32px 0;
98
+ letter-spacing: var(--letter-spacing-h6);
99
+ padding: 32px 0px 30px;
92
100
  }
93
101
 
94
102
  button {
95
- background-color: var(--color-taste);
103
+ background-color: var( --color-text);
96
104
  color: var(--color-sand);
97
- margin-top: 72px;
105
+ margin-top: 65px;
98
106
  }
99
107
 
100
108
  checkbox {
@@ -104,14 +112,14 @@
104
112
  }
105
113
  }
106
114
 
107
- @media screen and (min-width: 992px) {
115
+ @media screen and (min-width: 1648px) {
108
116
  .landingPageFormBlockWrapper {
109
117
  display: flex;
110
118
  flex-grow: 1;
111
119
  margin: 0 -36px;
112
120
 
113
121
  .landingPageFormLeftWrapper {
114
- width: 50%;
122
+ width: 45%;
115
123
  margin: 0 36px;
116
124
 
117
125
  .landingPageFormVideo {
@@ -119,23 +127,60 @@
119
127
  }
120
128
 
121
129
  .landingPageFormLeftBottom {
122
- margin-top: 72px;
130
+ margin-top: 60px;
131
+
132
+ .contentItemWrapper {
133
+ ul {
134
+ li {
135
+ margin: 60px 0px;
136
+ }
137
+ }
138
+ }
123
139
  }
124
140
  }
125
141
 
126
142
  .landingPageFormRightWrapper {
127
- width: 50%;
128
- margin: 0 36px;
143
+ width: 51%;
144
+ margin: 5px 36px;
129
145
 
130
146
  .landingPageFormRightContent {
131
- padding: 72px;
147
+ padding: 66px 72px;
132
148
 
133
149
  h2 {
134
- padding-block: 72px;
150
+ padding: 62px 0px 60px;
135
151
  }
136
152
 
137
153
  }
138
154
  }
139
155
  }
140
156
  }
157
+ }
158
+
159
+ :global {
160
+ .customHeadingStyle {
161
+ h4 {
162
+ margin-bottom: 55px;
163
+ }
164
+
165
+ p {
166
+ letter-spacing: var(--letter-spacing-body-regular);
167
+ line-height: 1.3;
168
+ margin-bottom: 66px;
169
+ }
170
+
171
+ h5 {
172
+ font-size: 28px;
173
+ margin-top: 67px;
174
+ margin-bottom: 19px;
175
+ line-height: var(--line-height-h6);
176
+ letter-spacing: var(--letter-spacing-h5);
177
+ }
178
+
179
+ h6 {
180
+ font-size: var(--font-size-h6);
181
+ font-weight: var(--font-weight-body-regular);
182
+ letter-spacing: var(--letter-spacing-h6);
183
+ line-height: 1.3;
184
+ }
185
+ }
141
186
  }