@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/contentful/index.d.ts +5 -1
- package/dist/contentful/index.esm.js +2 -2
- package/dist/contentful/index.esm.js.map +1 -1
- package/dist/contentful/index.js +2 -2
- package/dist/contentful/index.js.map +1 -1
- package/dist/core.d.ts +1 -1
- package/package.json +1 -1
- package/src/contentful/blocks/blogs-grid/index.tsx +7 -2
- package/src/contentful/blocks/cards/blog-card/index.tsx +6 -1
- package/src/contentful/blocks/cards/blog-card/types.ts +1 -0
- package/src/contentful/blocks/modal/index.tsx +6 -2
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?: "
|
|
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
|
@@ -46,7 +46,11 @@ export function BlogGrid({
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
return (
|
|
49
|
-
<section
|
|
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
|
|
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">
|
|
@@ -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
|
-
|
|
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
|