@windstream/react-shared-components 0.2.25 → 0.2.27

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.2.25",
3
+ "version": "0.2.27",
4
4
  "type": "module",
5
5
  "description": "Shared React components for Kinetic applications",
6
6
  "main": "dist/index.js",
@@ -144,7 +144,15 @@ export const ImagePromoBar: React.FC<ImagePromoBarProps> = ({
144
144
  <div className="primary-cta w-full xl:w-auto xl:shrink-0">
145
145
  <Button
146
146
  {...cta}
147
- disableAnimation={!enableAnimation}
147
+ // Block-level `enableAnimation` takes precedence:
148
+ // - true -> CTA animates
149
+ // - false -> CTA animation disabled
150
+ // - undefined -> fall back to the CTA's own setting
151
+ disableAnimation={
152
+ enableAnimation === undefined
153
+ ? cta.disableAnimation
154
+ : !enableAnimation
155
+ }
148
156
  fullWidth={true}
149
157
  size={{ base: "large" }}
150
158
  renderCheckPlans={renderCheckPlans}
@@ -157,7 +165,15 @@ export const ImagePromoBar: React.FC<ImagePromoBarProps> = ({
157
165
  <div className="secondary-cta w-full xl:w-auto xl:shrink-0">
158
166
  <Button
159
167
  {...secondaryCta}
160
- disableAnimation={!enableAnimation}
168
+ // Block-level `enableAnimation` takes precedence:
169
+ // - true -> CTA animates
170
+ // - false -> CTA animation disabled
171
+ // - undefined -> fall back to the CTA's own setting
172
+ disableAnimation={
173
+ enableAnimation === undefined
174
+ ? secondaryCta.disableAnimation
175
+ : !enableAnimation
176
+ }
161
177
  fullWidth={true}
162
178
  size={{ base: "large" }}
163
179
  renderCheckPlans={renderCheckPlans}
@@ -3,12 +3,16 @@ export const PRIMARY_LINKS: any = [
3
3
  __typename: "ComponentButton",
4
4
  buttonLabel: "Home",
5
5
  href: "/",
6
+ showButtonAs: "text",
7
+ target: "_self",
6
8
  preserveQueryParameters: false,
7
9
  },
8
10
  {
9
11
  __typename: "ComponentButton",
10
12
  buttonLabel: "Products",
11
13
  href: "/products",
14
+ showButtonAs: "text",
15
+ target: "_self",
12
16
  preserveQueryParameters: false,
13
17
  },
14
18
  {
@@ -20,11 +24,15 @@ export const PRIMARY_LINKS: any = [
20
24
  __typename: "ComponentButton",
21
25
  buttonLabel: "Internet",
22
26
  href: "/internet",
27
+ showButtonAs: "text",
28
+ target: "_self",
23
29
  },
24
30
  {
25
31
  __typename: "ComponentButton",
26
32
  buttonLabel: "Phone",
27
33
  href: "/phone",
34
+ showButtonAs: "text",
35
+ target: "_self",
28
36
  },
29
37
  ],
30
38
  },
@@ -32,17 +40,20 @@ export const PRIMARY_LINKS: any = [
32
40
  ];
33
41
 
34
42
  export const UTILITY_LINKS: any = [
35
- {
43
+ {
36
44
  __typename: "ComponentButton",
37
45
  buttonLabel: "Residential",
38
46
  href: "/residential",
47
+ showButtonAs: "text",
48
+ target: "_self",
39
49
  },
40
50
  {
41
51
  __typename: "ComponentButton",
42
52
  buttonLabel: "Business",
43
53
  href: "/business",
54
+ showButtonAs: "text",
55
+ target: "_self",
44
56
  },
45
-
46
57
  ];
47
58
 
48
59
  export const ACCOUNT_LINKS: any = [
@@ -55,6 +66,8 @@ export const ACCOUNT_LINKS: any = [
55
66
  __typename: "ComponentButton",
56
67
  buttonLabel: "Profile",
57
68
  href: "/profile",
69
+ showButtonAs: "text",
70
+ target: "_self",
58
71
  },
59
72
  ],
60
73
  },
@@ -71,6 +84,8 @@ export const SUPPORT_LINKS: any = [
71
84
  __typename: "ComponentButton",
72
85
  buttonLabel: "Help",
73
86
  href: "/help",
87
+ showButtonAs: "text",
88
+ target: "_self",
74
89
  },
75
90
  ],
76
91
  },
@@ -9,10 +9,43 @@ import {
9
9
  SUPPORT_LINKS,
10
10
  } from "./Navigation.stories.mocks";
11
11
 
12
+ const searchFormStyle = `
13
+ form[name="searchForm"] {
14
+ border-radius: 9999px !important;
15
+ background: #ffffff;
16
+ border-color: #d1d5db;
17
+ padding-left: 12px;
18
+ padding-right: 12px;
19
+ overflow: hidden;
20
+ }
21
+ [aria-label="Cart"] .material-symbols-rounded,
22
+ [aria-label="cart"] .material-symbols-rounded {
23
+ font-size: 0 !important;
24
+ width: 24px;
25
+ height: 24px;
26
+ display: inline-flex !important;
27
+ align-items: center;
28
+ justify-content: center;
29
+ }
30
+ [aria-label="Cart"] .material-symbols-rounded::before,
31
+ [aria-label="cart"] .material-symbols-rounded::before {
32
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 -960 960 960' width='24'%3E%3Cpath d='M280-80q-33 0-56.5-23.5T200-160q0-33 23.5-56.5T280-240q33 0 56.5 23.5T360-160q0 33-23.5 56.5T280-80Zm400 0q-33 0-56.5-23.5T600-160q0-33 23.5-56.5T680-240q33 0 56.5 23.5T760-160q0 33-23.5 56.5T680-80ZM246-720l96 200h280l110-200H246Zm-38-80h590q23 0 35 20.5t1 41.5L692-482q-11 20-29.5 31T622-440H324l-44 80h480v80H280q-45 0-68-39.5t-3-79.5l54-98-144-304H40v-80h130l38 80Zm134 280h280-280Z' fill='%2300002d'/%3E%3C/svg%3E");
33
+ display: block;
34
+ }
35
+ `;
36
+
12
37
  const meta: Meta<typeof Navigation> = {
13
38
  title: "Contentful Blocks/Navigation",
14
39
  component: Navigation,
15
40
  tags: ["autodocs"],
41
+ decorators: [
42
+ (Story) => (
43
+ <>
44
+ <style>{searchFormStyle}</style>
45
+ <Story />
46
+ </>
47
+ ),
48
+ ],
16
49
 
17
50
  parameters: {
18
51
  docs: {
@@ -42,8 +75,13 @@ const meta: Meta<typeof Navigation> = {
42
75
  cartHref: "#",
43
76
  displayCartIcon: true,
44
77
 
78
+ searchBarIcon: {
79
+ url: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 -960 960 960' width='24' fill='%239CA3AF'%3E%3Cpath d='M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z'/%3E%3C/svg%3E",
80
+ },
81
+
45
82
  invocaPhoneNumberDisplayText: "1-855-654-0841",
46
83
  callNowCtaText: "Call now:",
84
+ utilityNavActiveIndex: 0,
47
85
 
48
86
  },
49
87
 
@@ -18,7 +18,7 @@ import { toDocument } from "@shared/utils/contentful/to-document";
18
18
 
19
19
  const defaultOptions: Options = {
20
20
  renderMark: {
21
- [MARKS.BOLD]: text => <strong>{text}</strong>,
21
+ [MARKS.BOLD]: text => <strong className="font-black">{text}</strong>,
22
22
  [MARKS.ITALIC]: text => <em>{text}</em>,
23
23
  [MARKS.UNDERLINE]: text => <u>{text}</u>,
24
24
  [MARKS.CODE]: text => <code>{text}</code>,