@windstream/react-shared-components 0.0.52 → 0.0.54

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": "@windstream/react-shared-components",
3
- "version": "0.0.52",
3
+ "version": "0.0.54",
4
4
  "type": "module",
5
5
  "description": "Shared React components for Kinetic applications",
6
6
  "main": "dist/index.js",
@@ -1,39 +1,53 @@
1
- import React from "react";
2
-
3
- import { ChecklistProps } from "@shared/components/checklist/types";
4
- import { List, ListItem } from "@shared/components/list";
5
- import { MaterialIcon } from "@shared/components/material-icon";
6
- import { Text } from "@shared/components/text";
7
- import { cx } from "@shared/utils";
8
-
9
- export const Checklist: React.FC<ChecklistProps> = props => {
10
- const { items, listIconName = "check", listItemClassName } = props;
11
-
12
- if (!items?.length) return null;
13
-
14
- return (
15
- <List className="mt-2 space-y-1">
16
- {items.map((text, idx) => (
17
- <ListItem
18
- key={idx}
19
- className={cx(
20
- "flex items-center gap-2 text-text-secondary",
21
- listItemClassName
22
- )}
23
- >
24
- <MaterialIcon
25
- name={listIconName}
26
- size={20}
27
- weight="600"
28
- className="text-icon-brand"
29
- />
30
- <Text as="span">{text}</Text>
31
- </ListItem>
32
- ))}
33
- </List>
34
- );
35
- };
36
-
37
- Checklist.displayName = "Checklist";
38
-
39
- export type { ChecklistProps };
1
+ import React from "react";
2
+
3
+ import { ChecklistProps } from "@shared/components/checklist/types";
4
+ import { List, ListItem } from "@shared/components/list";
5
+ import { MaterialIcon } from "@shared/components/material-icon";
6
+ import { Text } from "@shared/components/text";
7
+ import { cx } from "@shared/utils";
8
+
9
+ export const Checklist: React.FC<ChecklistProps> = props => {
10
+ const {
11
+ items,
12
+ listIconName = "check",
13
+ listItemClassName,
14
+ iconSize = 20,
15
+ iconPosition = "center",
16
+ } = props;
17
+ const showIcons = listIconName !== "disc";
18
+ if (!items?.length) return null;
19
+
20
+ return (
21
+ <List
22
+ className="mt-2 space-y-1"
23
+ variant={showIcons ? "default" : "unstyled"}
24
+ >
25
+ {items.map((text, idx) => (
26
+ <ListItem
27
+ variant={showIcons ? "default" : "unstyled"}
28
+ key={idx}
29
+ className={cx(
30
+ `flex ${iconPosition === "top" ? "items-start" : "items-center"} gap-2 text-text-secondary`,
31
+ listItemClassName
32
+ )}
33
+ >
34
+ {showIcons && (
35
+ <div>
36
+ <MaterialIcon
37
+ name={listIconName}
38
+ size={iconSize}
39
+ weight="600"
40
+ className={`text-icon-brand ${iconPosition === "top" ? "mt-2" : ""}`}
41
+ />
42
+ </div>
43
+ )}
44
+ <Text as="div">{text}</Text>
45
+ </ListItem>
46
+ ))}
47
+ </List>
48
+ );
49
+ };
50
+
51
+ Checklist.displayName = "Checklist";
52
+
53
+ export type { ChecklistProps };
@@ -1,6 +1,8 @@
1
1
  export type ChecklistProps = {
2
2
  items: React.ReactNode[];
3
3
  // TODO: add icon names as needed
4
- listIconName?: "check";
4
+ listIconName?: "check" | "disc";
5
5
  listItemClassName?: string;
6
+ iconSize?: 20 | 24 | 32 | 40 | 48 | 52 | undefined;
7
+ iconPosition?: "top" | "center";
6
8
  };
@@ -71,7 +71,9 @@ export const ImagePromoBar: React.FC<ImagePromoBarProps> = ({
71
71
  </Text>
72
72
  )}
73
73
  {/* Checklist Rendering */}
74
- {checklist.length > 0 && <Checklist items={checklist} />}
74
+ {checklist.length > 0 && (
75
+ <Checklist items={checklist} iconPosition="top" iconSize={24} />
76
+ )}
75
77
  {/* Image Links Collection */}
76
78
  {imageLinks?.map((link, index) => (
77
79
  <div key={index} className="image-link">
@@ -103,7 +105,7 @@ export const ImagePromoBar: React.FC<ImagePromoBarProps> = ({
103
105
  alt="section-image"
104
106
  width={imageWidth}
105
107
  height={imageHeight}
106
- className=" rounded-[40px] h-full object-cover left-0 right-0 bottom-0 top-0"
108
+ className="bottom-0 left-0 right-0 top-0 h-full rounded-[40px] object-cover"
107
109
  />
108
110
  )}
109
111
  </div>