@everlywell/consumer-ui 1.23.1 → 1.25.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/index.d.mts +2 -0
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +11 -11
- package/index.mjs +1214 -606
- package/lib/components/Navbar/NavButton/NavButton.d.ts +4 -3
- package/lib/components/Navbar/NavButton/NavButton.d.ts.map +1 -1
- package/lib/components/Navbar/NavbarDrawer/NavbarDrawer.d.ts +11 -3
- package/lib/components/Navbar/NavbarDrawer/NavbarDrawer.d.ts.map +1 -1
- package/lib/components/Navbar/NavbarDrawer/NavbarDrawer.stories.d.ts +1 -0
- package/lib/components/Navbar/NavbarDrawer/NavbarDrawer.stories.d.ts.map +1 -1
- package/lib/components/Navbar/NavbarDrawerLink/NavbarDrawerLink.d.ts +21 -1
- package/lib/components/Navbar/NavbarDrawerLink/NavbarDrawerLink.d.ts.map +1 -1
- package/lib/components/Navbar/NavigationBar/NavigationBar.builder.d.ts +8 -0
- package/lib/components/Navbar/NavigationBar/NavigationBar.builder.d.ts.map +1 -0
- package/lib/components/Navbar/NavigationBar/NavigationBar.d.ts +109 -0
- package/lib/components/Navbar/NavigationBar/NavigationBar.d.ts.map +1 -0
- package/lib/components/Navbar/NavigationBar/NavigationBar.stories.d.ts +12 -0
- package/lib/components/Navbar/NavigationBar/NavigationBar.stories.d.ts.map +1 -0
- package/lib/components/Navbar/NavigationBar/index.d.ts +3 -0
- package/lib/components/Navbar/NavigationBar/index.d.ts.map +1 -0
- package/lib/components/Navbar/NavigationBar/useNavigationSearch.d.ts +14 -0
- package/lib/components/Navbar/NavigationBar/useNavigationSearch.d.ts.map +1 -0
- package/lib/components/Navbar/NavigationBar/utils.d.ts +3 -0
- package/lib/components/Navbar/NavigationBar/utils.d.ts.map +1 -0
- package/lib/components/Navbar/SpotlightCard/SpotlightCard.d.ts +14 -3
- package/lib/components/Navbar/SpotlightCard/SpotlightCard.d.ts.map +1 -1
- package/lib/components/Navbar/TopNavigation/TopNavigation.d.ts +7 -2
- package/lib/components/Navbar/TopNavigation/TopNavigation.d.ts.map +1 -1
- package/lib/components/Navbar/TopNavigation/TopNavigation.stories.d.ts +3 -2
- package/lib/components/Navbar/TopNavigation/TopNavigation.stories.d.ts.map +1 -1
- package/lib/components/Navbar/types.d.ts +19 -0
- package/lib/components/Navbar/types.d.ts.map +1 -0
- package/lib/utils/helpers.d.ts +2 -0
- package/lib/utils/helpers.d.ts.map +1 -0
- package/lib/utils/testHelpers/setupTests.d.ts +6 -0
- package/lib/utils/testHelpers/setupTests.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { ComponentWithAs } from '@chakra-ui/react';
|
|
2
|
+
import { Button, ButtonProps } from '../../../../../../ui-kit/src/index.ts';
|
|
3
|
+
export interface NavButtonProps extends ButtonProps {
|
|
3
4
|
isSelected?: boolean;
|
|
4
5
|
}
|
|
5
|
-
declare const NavButton: ComponentWithAs<
|
|
6
|
+
declare const NavButton: ComponentWithAs<typeof Button, NavButtonProps>;
|
|
6
7
|
export default NavButton;
|
|
7
8
|
//# sourceMappingURL=NavButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavButton.d.ts","sourceRoot":"","sources":["../../../../../../../libs/consumer-ui/src/lib/components/Navbar/NavButton/NavButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NavButton.d.ts","sourceRoot":"","sources":["../../../../../../../libs/consumer-ui/src/lib/components/Navbar/NavButton/NavButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAQ,MAAM,oBAAoB,CAAC;AAG/D,MAAM,WAAW,cAAe,SAAQ,WAAW;IACjD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,QAAA,MAAM,SAAS,EAkCV,eAAe,CAAC,OAAO,MAAM,EAAE,cAAc,CAAC,CAAC;AAEpD,eAAe,SAAS,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
export declare const NAV_DRAWER_HOVER_EVENT = "nav-drawer-hover";
|
|
3
|
+
export declare const dispatchDrawerHoverEvent: (isHovering: boolean) => void;
|
|
2
4
|
export type NavbarDrawerProps = {
|
|
3
5
|
/**
|
|
4
6
|
* Whether the drawer is open. Defaults to false.
|
|
@@ -7,7 +9,7 @@ export type NavbarDrawerProps = {
|
|
|
7
9
|
/**
|
|
8
10
|
* Callback for when the drawer should close
|
|
9
11
|
*/
|
|
10
|
-
onClose:
|
|
12
|
+
onClose: VoidFunction;
|
|
11
13
|
/**
|
|
12
14
|
* The title text to display in the drawer header
|
|
13
15
|
*/
|
|
@@ -21,7 +23,7 @@ export type NavbarDrawerProps = {
|
|
|
21
23
|
* Bottom section content including promo and navigation buttons.
|
|
22
24
|
* This should be a container with the promo content and NavButton components.
|
|
23
25
|
*/
|
|
24
|
-
bottomNavButtons
|
|
26
|
+
bottomNavButtons?: React.ReactNode;
|
|
25
27
|
/**
|
|
26
28
|
* Optional spotlight cards. This should be using the SpotlightCard component. If passing multiple cards, wrap them in a fragment <></>.
|
|
27
29
|
*/
|
|
@@ -39,13 +41,19 @@ export type NavbarDrawerProps = {
|
|
|
39
41
|
* Callback for when the back button is clicked.
|
|
40
42
|
* Only used when hasBackButton is true.
|
|
41
43
|
*/
|
|
42
|
-
onBackClick?:
|
|
44
|
+
onBackClick?: VoidFunction;
|
|
43
45
|
/**
|
|
44
46
|
* Whether the drawer has only spotlight cards.
|
|
45
47
|
* This is used to adjust the layout of the drawer.
|
|
46
48
|
* @default false
|
|
47
49
|
*/
|
|
48
50
|
hasOnlySpotlightCards?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* The height of the top navigation bar in pixels
|
|
53
|
+
*/
|
|
54
|
+
navHeight?: number;
|
|
55
|
+
hasSearch?: boolean;
|
|
56
|
+
onSearch?: (query: string) => void;
|
|
49
57
|
};
|
|
50
58
|
export declare const NavbarDrawer: React.FC<NavbarDrawerProps>;
|
|
51
59
|
export default NavbarDrawer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavbarDrawer.d.ts","sourceRoot":"","sources":["../../../../../../../libs/consumer-ui/src/lib/components/Navbar/NavbarDrawer/NavbarDrawer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NavbarDrawer.d.ts","sourceRoot":"","sources":["../../../../../../../libs/consumer-ui/src/lib/components/Navbar/NavbarDrawer/NavbarDrawer.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAOrD,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AAGzD,eAAO,MAAM,wBAAwB,eAAgB,OAAO,SAQ3D,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,OAAO,EAAE,YAAY,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAmPpD,CAAC;AACF,eAAe,YAAY,CAAC"}
|
|
@@ -5,5 +5,6 @@ export default meta;
|
|
|
5
5
|
type Story = StoryObj<typeof NavbarDrawer>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const MobileMenu: Story;
|
|
8
|
+
export declare const WithSearch: Story;
|
|
8
9
|
export declare const WithOnlySpotlightCards: Story;
|
|
9
10
|
//# sourceMappingURL=NavbarDrawer.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavbarDrawer.stories.d.ts","sourceRoot":"","sources":["../../../../../../../libs/consumer-ui/src/lib/components/Navbar/NavbarDrawer/NavbarDrawer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAY9C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAkBnC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"NavbarDrawer.stories.d.ts","sourceRoot":"","sources":["../../../../../../../libs/consumer-ui/src/lib/components/Navbar/NavbarDrawer/NavbarDrawer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAY9C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAkBnC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AA6H3C,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAOxB,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAmCpC,CAAC"}
|
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
import { LinkProps } from '../../../../../../ui-kit/src/index.ts';
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
|
+
import { ComponentWithAs } from '@chakra-ui/react';
|
|
4
|
+
import { CustomLinkComponent } from '../types';
|
|
3
5
|
export interface NavbarDrawerLinkProps extends LinkProps {
|
|
6
|
+
/**
|
|
7
|
+
* The label text for the link
|
|
8
|
+
* */
|
|
4
9
|
label: string;
|
|
10
|
+
/**
|
|
11
|
+
* The font size for the main text
|
|
12
|
+
* */
|
|
13
|
+
mainTextFontSize?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Additional content to display next to the main text
|
|
16
|
+
* */
|
|
5
17
|
additionalContent?: string | ReactElement;
|
|
18
|
+
/**
|
|
19
|
+
* Custom link component to use in place of the default Link component
|
|
20
|
+
* */
|
|
21
|
+
linkComponent?: CustomLinkComponent;
|
|
22
|
+
/**
|
|
23
|
+
* The href for the link
|
|
24
|
+
* */
|
|
25
|
+
href?: string;
|
|
6
26
|
}
|
|
7
|
-
declare const NavbarDrawerLink:
|
|
27
|
+
declare const NavbarDrawerLink: ComponentWithAs<"a", NavbarDrawerLinkProps>;
|
|
8
28
|
export default NavbarDrawerLink;
|
|
9
29
|
//# sourceMappingURL=NavbarDrawerLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavbarDrawerLink.d.ts","sourceRoot":"","sources":["../../../../../../../libs/consumer-ui/src/lib/components/Navbar/NavbarDrawerLink/NavbarDrawerLink.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,SAAS,
|
|
1
|
+
{"version":3,"file":"NavbarDrawerLink.d.ts","sourceRoot":"","sources":["../../../../../../../libs/consumer-ui/src/lib/components/Navbar/NavbarDrawerLink/NavbarDrawerLink.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,SAAS,EAAyB,MAAM,oBAAoB,CAAC;AAE5E,OAAO,EAAE,YAAY,EAAc,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAgB,MAAM,UAAU,CAAC;AAE7D,MAAM,WAAW,qBAAsB,SAAQ,SAAS;IACtD;;SAEK;IACL,KAAK,EAAE,MAAM,CAAC;IACd;;SAEK;IACL,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;SAEK;IACL,iBAAiB,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAC1C;;SAEK;IACL,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC;;SAEK;IACL,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,QAAA,MAAM,gBAAgB,EAgFjB,eAAe,CAAC,GAAG,EAAE,qBAAqB,CAAC,CAAC;AAEjD,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NavigationBarProps, NavigationCategory } from './NavigationBar';
|
|
2
|
+
import { SpotlightCardProps } from '../SpotlightCard';
|
|
3
|
+
export declare const spotlightCardMock: SpotlightCardProps;
|
|
4
|
+
export declare const mockCategories: NavigationCategory[];
|
|
5
|
+
export declare const mockMobileBottomButtons: import("react/jsx-runtime").JSX.Element[];
|
|
6
|
+
export declare const defaultProps: NavigationBarProps;
|
|
7
|
+
export declare const buildNavigationBarProps: (props?: Partial<NavigationBarProps>) => NavigationBarProps;
|
|
8
|
+
//# sourceMappingURL=NavigationBar.builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationBar.builder.d.ts","sourceRoot":"","sources":["../../../../../../../libs/consumer-ui/src/lib/components/Navbar/NavigationBar/NavigationBar.builder.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAKzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAItD,eAAO,MAAM,iBAAiB,EAAE,kBAoB/B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,kBAAkB,EAoI9C,CAAC;AAEF,eAAO,MAAM,uBAAuB,2CAmCnC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,kBAO1B,CAAC;AAEF,eAAO,MAAM,uBAAuB,WAC3B,OAAO,CAAC,kBAAkB,CAAC,KACjC,kBAGD,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
|
+
import { CustomLinkComponent } from '../types';
|
|
3
|
+
import { NavButtonProps } from '../NavButton';
|
|
4
|
+
import { SpotlightCardProps } from '../SpotlightCard';
|
|
5
|
+
/**
|
|
6
|
+
* Represents a navigation link item in the navigation bar
|
|
7
|
+
*/
|
|
8
|
+
export type NavigationBarLink = {
|
|
9
|
+
/** The text label to display for the link */
|
|
10
|
+
label: string;
|
|
11
|
+
/** The URL that the link points to */
|
|
12
|
+
href: string;
|
|
13
|
+
/** Optional additional content to display alongside the link (e.g. badge, icon) */
|
|
14
|
+
additionalContent?: string | ReactElement;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Represents a section of navigation links with a title
|
|
18
|
+
*/
|
|
19
|
+
export type NavigationBarSection = {
|
|
20
|
+
/** The title text for this section of links */
|
|
21
|
+
title: string;
|
|
22
|
+
/** Array of navigation links contained in this section */
|
|
23
|
+
links: NavigationBarLink[];
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Represents a category in the navigation bar that can contain sections and spotlight cards
|
|
27
|
+
*/
|
|
28
|
+
export type NavigationCategory = {
|
|
29
|
+
/** The text label for this category */
|
|
30
|
+
label: string;
|
|
31
|
+
/** Optional array of navigation sections within this category */
|
|
32
|
+
sections?: NavigationBarSection[];
|
|
33
|
+
/** Optional additional content to display with the category (e.g. badge, icon) */
|
|
34
|
+
additionalContent?: string | ReactElement;
|
|
35
|
+
/** Optional array of spotlight cards to display in this category */
|
|
36
|
+
spotlightCards?: SpotlightCardProps[];
|
|
37
|
+
/** Whether this category should only display spotlight cards without sections */
|
|
38
|
+
hasOnlySpotlightCards?: boolean;
|
|
39
|
+
/** Optional button element to display at the bottom of the category drawer */
|
|
40
|
+
bottomButton?: ReactElement;
|
|
41
|
+
/** Optional props to pass to the NavButton component */
|
|
42
|
+
buttonProps?: Omit<NavButtonProps, 'children'>;
|
|
43
|
+
/**
|
|
44
|
+
* Whether or not the link is shown as one of the top links in mobile view
|
|
45
|
+
* @default true
|
|
46
|
+
*/
|
|
47
|
+
isMobileTopLink?: boolean;
|
|
48
|
+
};
|
|
49
|
+
export type NavigationBarProps = {
|
|
50
|
+
/**
|
|
51
|
+
* Array of navigation categories
|
|
52
|
+
*/
|
|
53
|
+
categories: NavigationCategory[];
|
|
54
|
+
/**
|
|
55
|
+
* Number of items in the cart
|
|
56
|
+
* @default 0
|
|
57
|
+
*/
|
|
58
|
+
numberOfCartItems: number;
|
|
59
|
+
/**
|
|
60
|
+
* Callback for when the cart button is clicked
|
|
61
|
+
*/
|
|
62
|
+
onCartClick: VoidFunction;
|
|
63
|
+
/**
|
|
64
|
+
* Optional label for the main category. Used only for mobile navigation.
|
|
65
|
+
* @default 'menu'
|
|
66
|
+
*/
|
|
67
|
+
mainCategoryLabel?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Optional custom link component to use instead of the default Link component
|
|
70
|
+
*/
|
|
71
|
+
linkComponent?: CustomLinkComponent;
|
|
72
|
+
/**
|
|
73
|
+
* URL for the logo link
|
|
74
|
+
* @default 'https://www.everlywell.com'
|
|
75
|
+
*/
|
|
76
|
+
logoLink?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Whether to show the search button
|
|
79
|
+
* @default true
|
|
80
|
+
*/
|
|
81
|
+
hasSearch?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Callback for when the search button is clicked
|
|
84
|
+
*/
|
|
85
|
+
onSearchClick?: VoidFunction;
|
|
86
|
+
/**
|
|
87
|
+
* URL for the registration link
|
|
88
|
+
* @default 'https://www.everlywell.com/register'
|
|
89
|
+
*/
|
|
90
|
+
registrationUrl: string;
|
|
91
|
+
/**
|
|
92
|
+
* URL for the login/profile link. Pass it accordingly to go to login or my everly.
|
|
93
|
+
* @default 'https://secure.everlywell.com/login'
|
|
94
|
+
*/
|
|
95
|
+
profileUrl: string;
|
|
96
|
+
/**
|
|
97
|
+
* Array of buttons to show in the mobile bottom navigation.
|
|
98
|
+
* These buttons will be displayed at the bottom of the mobile navigation drawer.
|
|
99
|
+
* It should be an array of React elements using the NavButton component.
|
|
100
|
+
*/
|
|
101
|
+
mobileBottomButtons?: React.ReactElement[];
|
|
102
|
+
/**
|
|
103
|
+
* Callback for when a search is performed
|
|
104
|
+
*/
|
|
105
|
+
onSearchCallback?: (query: string, results: NavigationBarLink[]) => void;
|
|
106
|
+
};
|
|
107
|
+
export declare const NavigationBar: React.FC<NavigationBarProps>;
|
|
108
|
+
export default NavigationBar;
|
|
109
|
+
//# sourceMappingURL=NavigationBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationBar.d.ts","sourceRoot":"","sources":["../../../../../../../libs/consumer-ui/src/lib/components/Navbar/NavigationBar/NavigationBar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAY,YAAY,EAA0B,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAK/C,OAAkB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAsB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAMrE;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,mFAAmF;IACnF,iBAAiB,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;CAC3C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,KAAK,EAAE,iBAAiB,EAAE,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,QAAQ,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAClC,kFAAkF;IAClF,iBAAiB,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAC1C,oEAAoE;IACpE,cAAc,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACtC,iFAAiF;IACjF,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,8EAA8E;IAC9E,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,wDAAwD;IACxD,WAAW,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;IAC/C;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,UAAU,EAAE,kBAAkB,EAAE,CAAC;IACjC;;;OAGG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,WAAW,EAAE,YAAY,CAAC;IAC1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC;IAC3C;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;CAC1E,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAmTtD,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").FC<import("./NavigationBar").NavigationBarProps>;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
type Story = StoryObj<typeof meta>;
|
|
11
|
+
export declare const Default: Story;
|
|
12
|
+
//# sourceMappingURL=NavigationBar.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationBar.stories.d.ts","sourceRoot":"","sources":["../../../../../../../libs/consumer-ui/src/lib/components/Navbar/NavigationBar/NavigationBar.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIvD,QAAA,MAAM,IAAI;;;;;;CAM4B,CAAC;AAEvC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../libs/consumer-ui/src/lib/components/Navbar/NavigationBar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NavigationBarLink } from ".";
|
|
2
|
+
type UseNavigationSearchArgs = {
|
|
3
|
+
source: NavigationBarLink[];
|
|
4
|
+
onSearchCallback?: (query: string, results: NavigationBarLink[]) => void;
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const useNavigationSearch: ({ source, onSearchCallback, isActive }: UseNavigationSearchArgs) => {
|
|
8
|
+
query: string;
|
|
9
|
+
results: NavigationBarLink[];
|
|
10
|
+
handleClose: () => void;
|
|
11
|
+
handleSearch: (query: string) => void;
|
|
12
|
+
};
|
|
13
|
+
export default useNavigationSearch;
|
|
14
|
+
//# sourceMappingURL=useNavigationSearch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNavigationSearch.d.ts","sourceRoot":"","sources":["../../../../../../../libs/consumer-ui/src/lib/components/Navbar/NavigationBar/useNavigationSearch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAC;AAEtC,KAAK,uBAAuB,GAAG;IAC7B,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAA;AAED,QAAA,MAAM,mBAAmB,2CAA4C,uBAAuB;;;;0BAqB7D,MAAM;CAiCpC,CAAA;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../../libs/consumer-ui/src/lib/components/Navbar/NavigationBar/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAExE,eAAO,MAAM,WAAW,eAAgB,kBAAkB,EAAE,KAAG,iBAAiB,EAQ/E,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
+
import { CustomLinkComponent } from '../types';
|
|
2
3
|
/**
|
|
3
4
|
* Base properties for the SpotlightCard component.
|
|
4
5
|
*/
|
|
@@ -26,9 +27,19 @@ interface BaseSpotlightCardProps {
|
|
|
26
27
|
backgroundColor: string;
|
|
27
28
|
/**
|
|
28
29
|
* Optional function called when the card is clicked
|
|
29
|
-
* @type {
|
|
30
|
+
* @type {VoidFunction}
|
|
30
31
|
*/
|
|
31
|
-
onClick?:
|
|
32
|
+
onClick?: VoidFunction;
|
|
33
|
+
/**
|
|
34
|
+
* The URL to navigate to when the card is clicked
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @default '#'
|
|
37
|
+
* */
|
|
38
|
+
href: string;
|
|
39
|
+
/**
|
|
40
|
+
* Custom link component to use in place of the default Link component
|
|
41
|
+
* */
|
|
42
|
+
linkComponent?: CustomLinkComponent;
|
|
32
43
|
}
|
|
33
44
|
/**
|
|
34
45
|
* Properties for the SpotlightCard component when using an image URL.
|
|
@@ -66,6 +77,6 @@ export interface SpotlightCardWithImageElement extends BaseSpotlightCardProps {
|
|
|
66
77
|
* The card has different layouts for mobile and desktop views.
|
|
67
78
|
*/
|
|
68
79
|
export type SpotlightCardProps = SpotlightCardWithImageSrc | SpotlightCardWithImageElement;
|
|
69
|
-
export declare const SpotlightCard: ({ title, description, imageSrc, imageElement, button, backgroundColor, onClick, }: SpotlightCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
80
|
+
export declare const SpotlightCard: ({ title, description, imageSrc, imageElement, button, backgroundColor, onClick, href, linkComponent, }: SpotlightCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
70
81
|
export default SpotlightCard;
|
|
71
82
|
//# sourceMappingURL=SpotlightCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpotlightCard.d.ts","sourceRoot":"","sources":["../../../../../../../libs/consumer-ui/src/lib/components/Navbar/SpotlightCard/SpotlightCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SpotlightCard.d.ts","sourceRoot":"","sources":["../../../../../../../libs/consumer-ui/src/lib/components/Navbar/SpotlightCard/SpotlightCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAgB,MAAM,UAAU,CAAC;AAE7D;;GAEG;AACH,UAAU,sBAAsB;IAC9B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,MAAM,EAAE,YAAY,CAAC;IAErB;;;;OAIG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB;;;;SAIK;IACL,IAAI,EAAE,MAAM,CAAC;IAEb;;SAEK;IACL,aAAa,CAAC,EAAE,mBAAmB,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,sBAAsB;IACvE;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,sBAAsB;IAC3E;;;OAGG;IACH,YAAY,EAAE,YAAY,CAAC;IAE3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAC1B,yBAAyB,GACzB,6BAA6B,CAAC;AAElC,eAAO,MAAM,aAAa,2GAUvB,kBAAkB,4CAgFpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -23,11 +23,11 @@ export type TopNavigationProps = {
|
|
|
23
23
|
/**
|
|
24
24
|
* Callback for when the menu button is clicked
|
|
25
25
|
* */
|
|
26
|
-
onMenuClick:
|
|
26
|
+
onMenuClick: VoidFunction;
|
|
27
27
|
/**
|
|
28
28
|
* Callback for when the search button is clicked
|
|
29
29
|
* */
|
|
30
|
-
onSearchClick?:
|
|
30
|
+
onSearchClick?: VoidFunction;
|
|
31
31
|
/**
|
|
32
32
|
* Whether the search button should be displayed. Remember to pass the onSearchClick callback if this is true.
|
|
33
33
|
* @default false
|
|
@@ -38,6 +38,11 @@ export type TopNavigationProps = {
|
|
|
38
38
|
* @default 'https://www.everlywell.com'
|
|
39
39
|
* */
|
|
40
40
|
logoLink?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Callback that returns the height of the navigation bar.
|
|
43
|
+
* Useful to know where to start the content of drawer.
|
|
44
|
+
*/
|
|
45
|
+
onHeightChange?: (height: number) => void;
|
|
41
46
|
};
|
|
42
47
|
export declare const TopNavigation: React.FC<TopNavigationProps>;
|
|
43
48
|
export default TopNavigation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopNavigation.d.ts","sourceRoot":"","sources":["../../../../../../../libs/consumer-ui/src/lib/components/Navbar/TopNavigation/TopNavigation.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"TopNavigation.d.ts","sourceRoot":"","sources":["../../../../../../../libs/consumer-ui/src/lib/components/Navbar/TopNavigation/TopNavigation.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;OAGG;IACH,iBAAiB,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC;;;SAGK;IACL,sBAAsB,EAAE,KAAK,CAAC,SAAS,CAAC;IACxC;;;SAGK;IACL,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC;;;SAGK;IACL,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B;;SAEK;IACL,WAAW,EAAE,YAAY,CAAC;IAC1B;;SAEK;IACL,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B;;;SAGK;IACL,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;SAGK;IACL,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAyGtD,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -11,10 +11,11 @@ export declare const WithItems: {
|
|
|
11
11
|
desktopTopButtons?: import("react").ReactNode;
|
|
12
12
|
kitRegistrationElement?: import("react").ReactNode;
|
|
13
13
|
profileElement?: import("react").ReactNode;
|
|
14
|
-
onMenuClick?:
|
|
15
|
-
onSearchClick?:
|
|
14
|
+
onMenuClick?: VoidFunction | undefined;
|
|
15
|
+
onSearchClick?: VoidFunction;
|
|
16
16
|
hasSearch?: boolean;
|
|
17
17
|
logoLink?: string;
|
|
18
|
+
onHeightChange?: (height: number) => void;
|
|
18
19
|
};
|
|
19
20
|
};
|
|
20
21
|
//# sourceMappingURL=TopNavigation.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopNavigation.stories.d.ts","sourceRoot":"","sources":["../../../../../../../libs/consumer-ui/src/lib/components/Navbar/TopNavigation/TopNavigation.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKvD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,aAAa,CAMpC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,CAAC;AAE5C,eAAO,MAAM,OAAO,EAAE,KAoDrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAC;AAEF,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"TopNavigation.stories.d.ts","sourceRoot":"","sources":["../../../../../../../libs/consumer-ui/src/lib/components/Navbar/TopNavigation/TopNavigation.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKvD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,aAAa,CAMpC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,CAAC;AAE5C,eAAO,MAAM,OAAO,EAAE,KAoDrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;CAKrB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definition for a custom link component that can be used in place of the default Link component
|
|
3
|
+
* This type supports both href-based links (like UI Kit Link) and to-based links (like Gatsby Link)
|
|
4
|
+
*/
|
|
5
|
+
export type CustomLinkComponent = React.ComponentType<any>;
|
|
6
|
+
/**
|
|
7
|
+
* Helper function to get the appropriate link prop (href or to) based on the component type
|
|
8
|
+
* @param path The URL path
|
|
9
|
+
* @param isExternalComponent Whether the component is an external link component (like Gatsby Link)
|
|
10
|
+
* @returns An object with either href or to prop
|
|
11
|
+
*/
|
|
12
|
+
export declare const getLinkProps: (path: string | undefined, isExternalComponent?: boolean) => {
|
|
13
|
+
to: string | undefined;
|
|
14
|
+
href?: undefined;
|
|
15
|
+
} | {
|
|
16
|
+
href: string | undefined;
|
|
17
|
+
to?: undefined;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../libs/consumer-ui/src/lib/components/Navbar/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;AAE3D;;;;;GAKG;AACH,eAAO,MAAM,YAAY,SACjB,MAAM,GAAG,SAAS,wBACF,OAAO;;;;;;CAK9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../libs/consumer-ui/src/lib/utils/helpers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,SAAU,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,SAAS,MAAM,KAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAU5F,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupTests.d.ts","sourceRoot":"","sources":["../../../../../../libs/consumer-ui/src/lib/utils/testHelpers/setupTests.ts"],"names":[],"mappings":"AACA,cAAM,kBAAkB;IACtB,OAAO;IACP,SAAS;IACT,UAAU;CACX"}
|