@windstream/react-shared-components 0.1.98 → 0.2.0
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.esm.js +3 -3
- package/dist/contentful/index.esm.js.map +1 -1
- package/dist/contentful/index.js +3 -3
- package/dist/contentful/index.js.map +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/index.esm.js +13 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/dist/next/index.esm.js +2 -2
- package/dist/next/index.esm.js.map +1 -1
- package/dist/next/index.js +2 -2
- package/dist/next/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/utils/index.esm.js +1 -1
- package/dist/utils/index.esm.js.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/contentful/blocks/cards/floating-image-card/index.tsx +2 -2
- package/src/contentful/blocks/navigation/desktop-link-groups.tsx/index.tsx +8 -10
- package/src/contentful/blocks/navigation/index.tsx +27 -25
- package/src/contentful/blocks/navigation/mobile-link-groups.tsx/index.tsx +4 -4
|
@@ -51,16 +51,15 @@ export const DesktopLinkGroups: React.FC<LinkGroupsProps> = ({
|
|
|
51
51
|
<Button
|
|
52
52
|
key={`submenu-link-btn-${link.anchorId}`}
|
|
53
53
|
{...link}
|
|
54
|
-
showButtonAs="text"
|
|
55
54
|
linkClassName={cx(
|
|
56
|
-
"body3
|
|
55
|
+
"body3 flex items-center h-full",
|
|
57
56
|
linkColorClassName || "text-text"
|
|
58
57
|
)}
|
|
58
|
+
linkVariant="unstyled"
|
|
59
59
|
/>
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
|
|
64
63
|
// Group
|
|
65
64
|
const { anchorId, title, items } = link;
|
|
66
65
|
const subMenu = Array.isArray(items?.items) ? items!.items! : [];
|
|
@@ -80,16 +79,15 @@ export const DesktopLinkGroups: React.FC<LinkGroupsProps> = ({
|
|
|
80
79
|
linkColorClassName || "text-text"
|
|
81
80
|
)}
|
|
82
81
|
key={anchorId}
|
|
83
|
-
showButtonAs="unstyled"
|
|
82
|
+
showButtonAs="unstyled"
|
|
84
83
|
>
|
|
85
|
-
|
|
86
|
-
<Text as="span" className="group-hover:underline leading-none">
|
|
84
|
+
<Text as="span" className="group-hover:underline">
|
|
87
85
|
{title ?? null}
|
|
88
86
|
</Text>
|
|
89
87
|
<MaterialIcon
|
|
90
88
|
weight="200"
|
|
91
89
|
size={24}
|
|
92
|
-
className="
|
|
90
|
+
className="group-hover:opacity-50 text-icon-secondary"
|
|
93
91
|
name={isOpen ? "keyboard_arrow_up" : "keyboard_arrow_down"}
|
|
94
92
|
/>
|
|
95
93
|
</Button>
|
|
@@ -125,11 +123,11 @@ export const DesktopLinkGroups: React.FC<LinkGroupsProps> = ({
|
|
|
125
123
|
>
|
|
126
124
|
{subMenu.map((site, index) => {
|
|
127
125
|
return (
|
|
128
|
-
<li key={`submenu-link-${index}`} className="submenu-link">
|
|
126
|
+
<li key={`submenu-link-${index}`} className="submenu-link type1">
|
|
129
127
|
<Button
|
|
130
128
|
{...site}
|
|
131
|
-
|
|
132
|
-
linkClassName="body3 px-
|
|
129
|
+
linkVariant="unstyled"
|
|
130
|
+
linkClassName="body3 px-4 hover:bg-bg-surface-hover flex items-center w-full h-11 text-text-link"
|
|
133
131
|
/>
|
|
134
132
|
</li>
|
|
135
133
|
);
|
|
@@ -31,7 +31,7 @@ export const Navigation: React.FC<NavigationProps> = props => {
|
|
|
31
31
|
onCallClickDesktop,
|
|
32
32
|
onCallClickMobile,
|
|
33
33
|
onCartClick,
|
|
34
|
-
onSearch = () => {
|
|
34
|
+
onSearch = () => {},
|
|
35
35
|
utilityNavActiveIndex,
|
|
36
36
|
primaryNavigationLogoWidth = 76.5,
|
|
37
37
|
primaryNavigationLogoHeight = 24,
|
|
@@ -111,18 +111,17 @@ export const Navigation: React.FC<NavigationProps> = props => {
|
|
|
111
111
|
<nav className={`menu-container z-[1000]`}>
|
|
112
112
|
{displayUtilityNavigation ? (
|
|
113
113
|
<div className="utility-container hidden lg:block lg:border-b lg:px-2">
|
|
114
|
-
<div className="mx-auto flex max-w-120
|
|
114
|
+
<div className="mx-auto flex max-w-120 justify-between">
|
|
115
115
|
<ul className="flex gap-5" aria-label="Utility Navigation">
|
|
116
116
|
{utilityNavigationLinks?.map((links, index) => {
|
|
117
117
|
return (
|
|
118
118
|
<li key={`main-menu-items-${index}`}>
|
|
119
119
|
<ContentfulButton
|
|
120
|
-
showButtonAs="text"
|
|
121
120
|
linkClassName={cx(
|
|
122
|
-
"footnote
|
|
121
|
+
"footnote flex items-center text-text w-full h-11",
|
|
123
122
|
// If utilityNavActiveIndex is not provided, default to making the second link active (for existing business app). If utilityNavActiveIndex is provided, use it to determine which link is active.
|
|
124
123
|
typeof utilityNavActiveIndex !== "number"
|
|
125
|
-
? index ===
|
|
124
|
+
? index === 1 && "label4"
|
|
126
125
|
: utilityNavActiveIndex === index && "label4"
|
|
127
126
|
)}
|
|
128
127
|
linkVariant="unstyled"
|
|
@@ -142,7 +141,7 @@ export const Navigation: React.FC<NavigationProps> = props => {
|
|
|
142
141
|
prefix={callNowCtaText}
|
|
143
142
|
onClick={onCallClickDesktop}
|
|
144
143
|
>
|
|
145
|
-
<Text className="body3 text-text
|
|
144
|
+
<Text className="body3 text-text">
|
|
146
145
|
{invocaPhoneNumberDisplayText}
|
|
147
146
|
</Text>
|
|
148
147
|
</CallButton>
|
|
@@ -150,14 +149,14 @@ export const Navigation: React.FC<NavigationProps> = props => {
|
|
|
150
149
|
{displayCartIcon ? (
|
|
151
150
|
<Link
|
|
152
151
|
href={cartHref || "#"}
|
|
153
|
-
className="relative flex
|
|
152
|
+
className="relative inline-flex cursor-pointer"
|
|
154
153
|
aria-label={cartIconAriaLabel}
|
|
155
154
|
onClick={onCartClick}
|
|
156
155
|
>
|
|
157
|
-
<
|
|
156
|
+
<MaterialIcon name="shopping_cart" />
|
|
158
157
|
|
|
159
158
|
{cartHasRetention && (
|
|
160
|
-
<span className="absolute -right-
|
|
159
|
+
<span className="absolute -right-2 -top-1 h-2.5 w-2.5 rounded-full bg-icon-brand" />
|
|
161
160
|
)}
|
|
162
161
|
</Link>
|
|
163
162
|
) : null}
|
|
@@ -246,7 +245,7 @@ export const Navigation: React.FC<NavigationProps> = props => {
|
|
|
246
245
|
</Link>
|
|
247
246
|
) : null}
|
|
248
247
|
|
|
249
|
-
<div className="flex h-
|
|
248
|
+
<div className="flex h-full items-center gap-6">
|
|
250
249
|
{primaryNavigationLinks?.map((links, index) => {
|
|
251
250
|
return (
|
|
252
251
|
<DesktopLinkGroups
|
|
@@ -259,9 +258,9 @@ export const Navigation: React.FC<NavigationProps> = props => {
|
|
|
259
258
|
})}
|
|
260
259
|
</div>
|
|
261
260
|
</div>
|
|
262
|
-
<div className="flex h-full items-center gap-
|
|
261
|
+
<div className="flex h-full items-center gap-10">
|
|
263
262
|
{showCallNowCtaInMainNav &&
|
|
264
|
-
|
|
263
|
+
!(displayUtilityNavigation && displayCallNowCta)
|
|
265
264
|
? renderMainNavCallCta(onCallClickDesktop)
|
|
266
265
|
: null}
|
|
267
266
|
{displaySearchBar ? (
|
|
@@ -417,7 +416,7 @@ const MobileMenu = (props: NavigationProps) => {
|
|
|
417
416
|
? props.searchBarIcon
|
|
418
417
|
: props.searchBarIcon?.url || ""
|
|
419
418
|
}
|
|
420
|
-
onSearch={props.onSearch || (() => {
|
|
419
|
+
onSearch={props.onSearch || (() => {})}
|
|
421
420
|
/>
|
|
422
421
|
) : null}
|
|
423
422
|
<div
|
|
@@ -505,9 +504,9 @@ const MobileSearchInput = (props: {
|
|
|
505
504
|
>
|
|
506
505
|
<NextImage
|
|
507
506
|
src={searchBarIconURL}
|
|
508
|
-
width={
|
|
509
|
-
height={
|
|
510
|
-
className="
|
|
507
|
+
width={32}
|
|
508
|
+
height={32}
|
|
509
|
+
className="ml-2"
|
|
511
510
|
alt="Search icon"
|
|
512
511
|
role="button"
|
|
513
512
|
onClick={redirectToSearchResults}
|
|
@@ -544,24 +543,27 @@ const DesktopSearchInput = (props: {
|
|
|
544
543
|
return (
|
|
545
544
|
<form
|
|
546
545
|
name="searchForm"
|
|
547
|
-
className="flex
|
|
546
|
+
className="flex h-9 w-60 rounded-input-xl border px-1 transition-colors focus-within:border-border-focus"
|
|
548
547
|
onSubmit={redirectToSearchResults}
|
|
549
548
|
>
|
|
550
549
|
{/* Search Icon */}
|
|
551
|
-
<
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
550
|
+
<NextImage
|
|
551
|
+
src={searchBarIconURL}
|
|
552
|
+
width={32}
|
|
553
|
+
height={32}
|
|
554
|
+
alt="Search icon"
|
|
555
|
+
role="button"
|
|
556
|
+
onClick={redirectToSearchResults} />
|
|
556
557
|
{/* Input */}
|
|
557
|
-
<
|
|
558
|
+
<Input
|
|
558
559
|
ref={searchInputRef}
|
|
559
560
|
type="text"
|
|
560
561
|
name="search"
|
|
561
562
|
placeholder="Search..."
|
|
562
563
|
value={searchValue}
|
|
563
|
-
onChange={
|
|
564
|
-
className="
|
|
564
|
+
onChange={e => setSearchValue(e.target.value)}
|
|
565
|
+
className={"body3 rounded-full px-3 text-text"}
|
|
566
|
+
containerClassName="px-0 h-full border-none rounded-full"
|
|
565
567
|
autoComplete="off"
|
|
566
568
|
/>
|
|
567
569
|
</form>
|
|
@@ -31,7 +31,7 @@ export const MobileLinkGroups: React.FC<LinkGroupsProps> = ({ link }) => {
|
|
|
31
31
|
<Button
|
|
32
32
|
key={`submenu-link-btn-${link.anchorId}`}
|
|
33
33
|
{...link}
|
|
34
|
-
linkClassName="label3 flex items-center px-4 text-text-link"
|
|
34
|
+
linkClassName="label3 flex items-center w-full h-11 px-4 text-text-link"
|
|
35
35
|
linkVariant="unstyled"
|
|
36
36
|
/>
|
|
37
37
|
);
|
|
@@ -46,7 +46,7 @@ export const MobileLinkGroups: React.FC<LinkGroupsProps> = ({ link }) => {
|
|
|
46
46
|
<Button
|
|
47
47
|
onClick={() => setIsOpen(prev => !prev)}
|
|
48
48
|
aria-expanded={isOpen}
|
|
49
|
-
buttonClassName=" label3 flex items-center px-4"
|
|
49
|
+
buttonClassName=" label3 flex items-center w-full h-11 px-4"
|
|
50
50
|
key={anchorId}
|
|
51
51
|
showButtonAs="unstyled"
|
|
52
52
|
>
|
|
@@ -54,7 +54,7 @@ export const MobileLinkGroups: React.FC<LinkGroupsProps> = ({ link }) => {
|
|
|
54
54
|
<MaterialIcon
|
|
55
55
|
weight="200"
|
|
56
56
|
size={24}
|
|
57
|
-
className="
|
|
57
|
+
className="group-hover:opacity-50 text-icon-secondary"
|
|
58
58
|
name={isOpen ? "keyboard_arrow_up" : "keyboard_arrow_down"}
|
|
59
59
|
/>
|
|
60
60
|
</Button>
|
|
@@ -69,7 +69,7 @@ const RenderSubMenu: React.FC<{ items: ContentfulButtonProps[] }> = ({
|
|
|
69
69
|
<ul key={`submenu-${items.length}`} className="flex flex-col gap-2">
|
|
70
70
|
{items.map((site, index) => {
|
|
71
71
|
return (
|
|
72
|
-
<li key={`submenu-link-${index}`} className="submenu-link">
|
|
72
|
+
<li key={`submenu-link-${index}`} className="submenu-link type2">
|
|
73
73
|
<Button
|
|
74
74
|
{...site}
|
|
75
75
|
linkVariant="unstyled"
|