@windstream/react-shared-components 0.1.21 → 0.1.23

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/core.d.ts CHANGED
@@ -63,7 +63,7 @@ declare const Input: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAtt
63
63
  size?: "slim" | "medium" | "large" | undefined;
64
64
  label?: string | undefined;
65
65
  errorText?: string | undefined;
66
- prefixIconName?: "search" | "location_on" | undefined;
66
+ prefixIconName?: "location_on" | "search" | undefined;
67
67
  prefixIconSize?: 20 | 24 | 40 | 48 | undefined;
68
68
  prefixIconFill?: boolean | undefined;
69
69
  suffixIconFill?: boolean | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windstream/react-shared-components",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "type": "module",
5
5
  "description": "Shared React components for Kinetic applications",
6
6
  "main": "dist/index.js",
@@ -46,7 +46,11 @@ export function BlogGrid({
46
46
  }
47
47
 
48
48
  return (
49
- <section aria-label="Blog articles">
49
+ <section
50
+ aria-label="Blog articles"
51
+ data-section-type={"blogs-grid"}
52
+ data-section-index={"0"}
53
+ >
50
54
  {/* Controls bar */}
51
55
  <div className="mx-auto flex max-w-[1200px] flex-wrap items-center justify-between gap-3 px-6 pb-6">
52
56
  <Text className="w-full text-center text-heading5 font-black lowercase text-text-secondary md:w-auto md:text-left">
@@ -80,7 +84,7 @@ export function BlogGrid({
80
84
  {/* Articles grid */}
81
85
  {paginatedArticles.length > 0 ? (
82
86
  <div className="mx-auto grid max-w-[1200px] grid-cols-1 gap-6 px-5 pb-16 sm:grid-cols-2 lg:grid-cols-3">
83
- {paginatedArticles.map(article => {
87
+ {paginatedArticles.map((article, index) => {
84
88
  const href = article.slug.startsWith("/")
85
89
  ? article.slug
86
90
  : `/${article.slug}`;
@@ -105,6 +109,7 @@ export function BlogGrid({
105
109
  date={article.blogCreationDate}
106
110
  category={article.category}
107
111
  image={coverImage}
112
+ index={index}
108
113
  />
109
114
  );
110
115
  })}
@@ -16,13 +16,18 @@ export const BlogCard: React.FC<BlogCardProps> = ({
16
16
  image,
17
17
  readMoreText = "Read more",
18
18
  asGrid = true,
19
+ index,
19
20
  }: BlogCardProps) => {
20
21
  const parentClassName = asGrid
21
22
  ? "flex h-full flex-col overflow-hidden rounded-xl bg-white shadow-[0_1px_4px_rgba(0,0,0,0.08),0_4px_16px_rgba(0,0,0,0.06)] transition-all duration-200 hover:-translate-y-0.5 hover:shadow-[0_4px_12px_rgba(0,0,0,0.12),0_8px_24px_rgba(0,0,0,0.10)]"
22
23
  : "callout-card lg:w-[calc(33.3333%-1rem)] md:w-[calc(50%-1rem)] w-full overflow-hidden rounded-xl bg-white shadow-[0_1px_4px_rgba(0,0,0,0.08),0_4px_16px_rgba(0,0,0,0.06)] transition-all duration-200 hover:-translate-y-0.5 hover:shadow-[0_4px_12px_rgba(0,0,0,0.12),0_8px_24px_rgba(0,0,0,0.10)]";
23
24
 
24
25
  return (
25
- <article className={parentClassName}>
26
+ <article
27
+ className={parentClassName}
28
+ data-section-type={"blog-card"}
29
+ data-section-index={index}
30
+ >
26
31
  {/* Image */}
27
32
  <Link href={href} tabIndex={-1} aria-hidden="true" className="block">
28
33
  <div className="aspect-video w-full flex-shrink-0 overflow-hidden bg-gray-100">
@@ -12,4 +12,5 @@ export interface BlogCardProps {
12
12
  };
13
13
  readMoreText?: string;
14
14
  asGrid?: boolean;
15
+ index?: number;
15
16
  }
@@ -14,8 +14,10 @@ import { MaterialIcon } from "@shared/components/material-icon";
14
14
  import { Text } from "@shared/components/text";
15
15
  import { Button } from "@shared/contentful/blocks/button";
16
16
  import { cx } from "@shared/utils";
17
-
18
- export const Modal: React.FC<ModalProps> = props => {
17
+ type ExtendedModalProps = ModalProps & {
18
+ containerAttributes?: React.HTMLAttributes<HTMLDivElement>;
19
+ };
20
+ export const Modal: React.FC<ExtendedModalProps> = props => {
19
21
  const {
20
22
  isOpen,
21
23
  onRequestClose,
@@ -25,6 +27,7 @@ export const Modal: React.FC<ModalProps> = props => {
25
27
  description,
26
28
  children,
27
29
  bodyClassName,
30
+ containerAttributes
28
31
  } = props;
29
32
 
30
33
  return (
@@ -50,6 +53,7 @@ export const Modal: React.FC<ModalProps> = props => {
50
53
  className="fixed left-1/2 top-1/2 z-[1001] w-auto -translate-x-1/2 -translate-y-1/2 focus:outline-none"
51
54
  >
52
55
  <Dialog.Content
56
+ {...containerAttributes}
53
57
  className={cx(
54
58
  "fixed left-[50%] top-[50%] w-[90vw] translate-x-[-50%] translate-y-[-50%] rounded-[6px] bg-bg p-[25px] shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px] focus:outline-none",
55
59
  bodyClassName