@hellobetterdigitalnz/selwynui 0.0.1-34 → 0.0.1-36

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.
Files changed (24) hide show
  1. package/dist/Components/DataDisplay/KPIBlock/KPIBlockProps.d.ts +3 -2
  2. package/dist/Components/DataDisplay/ListBlock/ListBlock.d.ts +3 -0
  3. package/dist/Components/DataDisplay/{Pathway/PathwayProps.d.ts → ListBlock/ListBlockProps.d.ts} +4 -3
  4. package/dist/Components/DataDisplay/index.d.ts +4 -2
  5. package/dist/index.cjs.js +13 -13
  6. package/dist/index.cjs.js.map +1 -1
  7. package/dist/index.es.js +1174 -1157
  8. package/dist/index.es.js.map +1 -1
  9. package/dist/selwynui.css +1 -1
  10. package/package.json +1 -1
  11. package/src/Components/DataDisplay/DetailsCard/DetailsCard.tsx +3 -3
  12. package/src/Components/DataDisplay/DetailsCard/detailsCard.module.scss +1 -0
  13. package/src/Components/DataDisplay/KPIBlock/KPIBlock.stories.tsx +1 -2
  14. package/src/Components/DataDisplay/KPIBlock/KPIBlock.tsx +20 -7
  15. package/src/Components/DataDisplay/KPIBlock/KPIBlockProps.tsx +4 -2
  16. package/src/Components/DataDisplay/KPIBlock/kpiBlock.module.scss +12 -11
  17. package/src/Components/DataDisplay/{Pathway/Pathway.stories.tsx → ListBlock/ListBlock.stories.tsx} +17 -14
  18. package/src/Components/DataDisplay/{Pathway/Pathway.tsx → ListBlock/ListBlock.tsx} +35 -35
  19. package/src/Components/DataDisplay/{Pathway/PathwayProps.tsx → ListBlock/ListBlockProps.tsx} +6 -4
  20. package/src/Components/DataDisplay/{Pathway/pathway.module.scss → ListBlock/listBlock.module.scss} +28 -6
  21. package/src/Components/DataDisplay/ListingDetailBlock/ListingDetailBlock.tsx +10 -10
  22. package/src/Components/DataDisplay/index.ts +7 -3
  23. package/src/Components/Shared/ElementHolder/elementHolder.module.scss +1 -1
  24. package/dist/Components/DataDisplay/Pathway/Pathway.d.ts +0 -3
@@ -1,19 +1,18 @@
1
- import cx from "classnames";
2
- import PathwayProps from './PathwayProps';
3
- import styles from "./pathway.module.scss";
1
+ import ListBlockProps from './ListBlockProps.tsx';
2
+ import styles from "./listBlock.module.scss";
4
3
  import cslx from "clsx";
5
4
  import Container from "../../Shared/Container/Container";
6
5
  import DetailsCard from "../DetailsCard/DetailsCard";
7
6
  import { CaretDown } from "../../Icons";
8
7
  import { useState } from "react";
9
8
 
10
- const Pathway = (props:PathwayProps) => {
9
+ const ListBlock = (props:ListBlockProps) => {
11
10
  const {
12
11
  title = '',
13
- description = '',
14
- variation = 'grid',
12
+ description = '',
15
13
  cards = [],
16
- filters = ["all", "adventure", "ski", "nature"],
14
+ filters = [],
15
+ action
17
16
  } = props
18
17
 
19
18
  const [activeFilter, setActiveFilter] = useState("all");
@@ -25,31 +24,21 @@ const Pathway = (props:PathwayProps) => {
25
24
  };
26
25
 
27
26
 
28
- const classes = [styles.pathway, "pathway", variation === "carousel" && styles.pathwayCarousel];
27
+ const classes = [styles.pathway, "pathway"];
29
28
 
30
29
  return (
31
30
  <div>
32
31
  <Container>
33
- {variation === "carousel" ? (
34
- <div className={cx(classes)}>
35
- <div className={styles.contentWrapper}>
36
- <div className={styles.content}>
37
- <div className={styles.pathwayTitle}><h3>{title}</h3></div>
38
- <div className={styles.pathwayDescription}><p>{description}</p></div>
39
- </div>
40
- <div className={styles.silderNav}>
41
- </div>
42
- </div>
43
- {/*<div className={styles.}>*/}
44
-
45
- {/*</div>*/}
46
- </div>
47
- ) : (
48
32
  <div className={cslx(classes)}>
49
33
  <div className={styles.pathwayTitle}><h3>{title}</h3></div>
50
- <div className={styles.pathwayDescription}><p>{description}</p></div>
34
+ <div className={styles.pathwayDescription}>
35
+ <p>{description}</p>
36
+ {action && <div className={styles.action}>
37
+ {action}
38
+ </div>}
39
+ </div>
51
40
 
52
- <div className={`${styles.pathwayFilters} ${styles.pathwayFilterDesktop}`}>
41
+ {filters && filters.length > 0 && (<div className={`${styles.pathwayFilters} ${styles.pathwayFilterDesktop}`}>
53
42
  <ul>
54
43
  {filters.map((cat) => (
55
44
  <li
@@ -61,9 +50,9 @@ const Pathway = (props:PathwayProps) => {
61
50
  </li>
62
51
  ))}
63
52
  </ul>
64
- </div>
53
+ </div>)}
65
54
 
66
- <div className={`${styles.pathwayFilters} ${styles.pathwayFilterMobile}`}>
55
+ {filters && filters.length > 0 && (<div className={`${styles.pathwayFilters} ${styles.pathwayFilterMobile}`}>
67
56
  <select onChange={(e) => setActiveFilter(e.target.value.toLowerCase())}>
68
57
  {filters.map((cat) => (
69
58
  <option key={cat} value={cat}>
@@ -72,23 +61,34 @@ const Pathway = (props:PathwayProps) => {
72
61
  ))}
73
62
  </select>
74
63
  <CaretDown />
75
- </div>
64
+ </div>)}
76
65
 
77
66
  {/* Cards */}
78
67
  <div className={styles.pathwayCards}>
79
68
  <div className={styles.pathwayCardsWrap}>
80
- {cards.filter((c) => filterCards(c.category)).map((card, idx) => (
81
- <div key={idx} className={styles.pathwayCard}>
82
- <DetailsCard {...card} />
83
- </div>
84
- ))}
69
+ {filters && filters.length > 0 ? (
70
+ <>
71
+ {cards.filter((c) => filterCards(c.category)).map((card, idx) => (
72
+ <div key={idx} className={styles.pathwayCard}>
73
+ <DetailsCard {...card} variation={"short"} />
74
+ </div>
75
+ ))}
76
+ </>
77
+ ) : (
78
+ <>
79
+ {cards.map((card, idx) => (
80
+ <div key={idx} className={styles.pathwayCard}>
81
+ <DetailsCard {...card} variation={"short"} />
82
+ </div>
83
+ ))}
84
+ </>
85
+ )}
85
86
  </div>
86
87
  </div>
87
88
  </div>
88
- )}
89
89
  </Container>
90
90
  </div>
91
91
  );
92
92
  };
93
93
 
94
- export default Pathway;
94
+ export default ListBlock;
@@ -1,3 +1,5 @@
1
+ import {ReactNode} from "react";
2
+
1
3
  export interface Card {
2
4
  title?:string,
3
5
  description?:string,
@@ -14,13 +16,13 @@ export interface Card {
14
16
  category?: 'all' | 'adventure' | 'ski' | 'nature',
15
17
  }
16
18
 
17
- interface PathwayProps {
19
+ interface ListBlockProps {
18
20
  title?: string;
19
21
  description?: string;
20
- variation?: 'grid' | 'carousel';
21
22
  link?: string;
22
23
  cards?: Card[];
23
- filters?: string[];
24
+ filters?: string[];
25
+ action?: ReactNode;
24
26
  }
25
27
 
26
- export default PathwayProps;
28
+ export default ListBlockProps;
@@ -8,11 +8,22 @@
8
8
  }
9
9
 
10
10
  .pathwayDescription {
11
+ display: flex;
12
+ align-items: flex-end;
13
+ justify-content: space-between;
11
14
  margin-bottom: 36px;
15
+
12
16
  p {
13
- font-size: var(--font-size-h5);
14
- line-height: 1.2;
17
+ max-width: 936px;
18
+ font-size: var(--font-size-h5);
19
+ line-height: 1.2;
20
+ letter-spacing: -1.44px;
15
21
  }
22
+
23
+ .action{
24
+ display: flex;
25
+ }
26
+
16
27
  }
17
28
 
18
29
  .pathwayFilters {
@@ -25,11 +36,15 @@
25
36
  li {
26
37
  cursor: pointer;
27
38
  padding: 0 8px;
39
+ background: var(--color-bg-btn);
40
+ color: var(--color-text-btn);
41
+ transition: all 0.3s ease-in-out;
42
+
28
43
 
29
- &.active {
44
+ &.active ,&:hover {
30
45
  span {
31
- color: var(--pathway-card-hover-text);
32
- background-color: var(--pathway-card-hover-bg);
46
+ background: var(--color-text-btn);
47
+ color:var(--color-bg-btn) ;
33
48
  }
34
49
  }
35
50
 
@@ -90,6 +105,7 @@
90
105
  }
91
106
  }
92
107
 
108
+
93
109
  @media (min-width: 760px) {
94
110
  .pathwayTitle {
95
111
  margin-bottom: 72px;
@@ -110,7 +126,7 @@
110
126
  }
111
127
 
112
128
  .pathwayCard {
113
- width: 33.33%;
129
+ width: 50%;
114
130
  padding: 0 16px;
115
131
  }
116
132
 
@@ -121,4 +137,10 @@
121
137
  .pathwayFilterMobile {
122
138
  display: none;
123
139
  }
140
+ }
141
+
142
+ @media (min-width: 992px) {
143
+ .pathwayCard {
144
+ width: 33.33%;
145
+ }
124
146
  }
@@ -5,16 +5,16 @@ import {Button} from "../../Form";
5
5
  import ArrowRight from "../../Icons/Arrows/ArrowRight/ArrowRight.tsx";
6
6
 
7
7
  const ListingDetailBlock = ({
8
- title,
9
- description,
10
- facilities,
11
- distance,
12
- elevation,
13
- address,
14
- hours,
15
- phone,
16
- websiteUrl,
17
- }: ListingDetailBlockProps) => {
8
+ title,
9
+ description,
10
+ facilities,
11
+ distance,
12
+ elevation,
13
+ address,
14
+ hours,
15
+ phone,
16
+ websiteUrl,
17
+ }: ListingDetailBlockProps) => {
18
18
  return (
19
19
  <div className={styles.listingDetail}>
20
20
  {/* Main Content - Left */}
@@ -32,9 +32,9 @@ export type { default as ChatItenaryBlockProps } from './ChatItenaryBlock/ChatIt
32
32
  export { default as TestimonyCard } from './TestimonyCard/TestimonyCard';
33
33
  export type { default as TestimonyCardProps } from './TestimonyCard/TestimonyCardProps';
34
34
 
35
- // Pathway
36
- export { default as Pathway } from './Pathway/Pathway';
37
- export type { default as PathwayProps } from './Pathway/PathwayProps';
35
+ // ListBlock
36
+ export { default as Pathway } from './ListBlock/ListBlock.tsx';
37
+ export type { default as PathwayProps } from './ListBlock/ListBlockProps.tsx';
38
38
 
39
39
  // PromoBanner
40
40
  export { default as PromoBannerBlock } from './PromoBannerBlock/PromoBannerBlock';
@@ -48,3 +48,7 @@ export type { default as ContactItemProps } from './ContactsBlock/ContactItemPro
48
48
  //ImageContent
49
49
  export {default as ImageContent} from './ImageContent/ImageContent'
50
50
  export type {default as ImageContentProps} from './ImageContent/ImageContentProps'
51
+
52
+ //List Block
53
+ export { default as ListBlock } from './ListBlock/ListBlock'
54
+ export type { default as ListBlockProps } from './ListBlock/ListBlockProps'
@@ -4,7 +4,7 @@
4
4
  position: relative;
5
5
 
6
6
  &Inner {
7
- position: relative;
7
+ //position: relative;
8
8
  z-index: 1;
9
9
  }
10
10
 
@@ -1,3 +0,0 @@
1
- import { default as PathwayProps } from './PathwayProps';
2
- declare const Pathway: (props: PathwayProps) => import("react/jsx-runtime").JSX.Element;
3
- export default Pathway;