@nypl/design-system-react-components 1.0.7 → 1.1.0-rc2

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.
Files changed (59) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +5 -0
  2. package/dist/components/Footer/Footer.d.ts +14 -0
  3. package/dist/components/Footer/footerLinks.d.ts +12 -0
  4. package/dist/components/Form/Form.d.ts +2 -2
  5. package/dist/components/Header/Header.d.ts +20 -0
  6. package/dist/components/Header/components/HeaderLogin.d.ts +13 -0
  7. package/dist/components/Header/components/HeaderLoginButton.d.ts +11 -0
  8. package/dist/components/Header/components/HeaderLowerNav.d.ts +7 -0
  9. package/dist/components/Header/components/HeaderMobileIconNav.d.ts +7 -0
  10. package/dist/components/Header/components/HeaderMobileNav.d.ts +7 -0
  11. package/dist/components/Header/components/HeaderMobileNavButton.d.ts +7 -0
  12. package/dist/components/Header/components/HeaderSearchButton.d.ts +10 -0
  13. package/dist/components/Header/components/HeaderSearchForm.d.ts +10 -0
  14. package/dist/components/Header/components/HeaderSitewideAlerts.d.ts +8 -0
  15. package/dist/components/Header/components/HeaderUpperNav.d.ts +8 -0
  16. package/dist/components/Header/context/headerContext.d.ts +13 -0
  17. package/dist/components/Header/utils/authApiMockResponse.d.ts +49 -0
  18. package/dist/components/Header/utils/encoreCatalogLogOutTimer.d.ts +4 -0
  19. package/dist/components/Header/utils/encoreCatalogLogOutTimer.test.d.ts +1 -0
  20. package/dist/components/Header/utils/googleAnalyticsUtils.d.ts +16 -0
  21. package/dist/components/Header/utils/googleAnalyticsUtils.test.d.ts +1 -0
  22. package/dist/components/Header/utils/headerUtils.d.ts +90 -0
  23. package/dist/components/Header/utils/headerUtils.test.d.ts +1 -0
  24. package/dist/components/Header/utils/sitewideAlertsMocks.d.ts +98 -0
  25. package/dist/components/Image/Image.d.ts +3 -3
  26. package/dist/components/Link/Link.d.ts +1 -0
  27. package/dist/components/StyleGuide/ColorCard.d.ts +22 -18
  28. package/dist/components/Template/Template.d.ts +14 -4
  29. package/dist/components/Tooltip/Tooltip.d.ts +17 -0
  30. package/dist/design-system-react-components.cjs.development.js +4433 -1669
  31. package/dist/design-system-react-components.cjs.development.js.map +1 -1
  32. package/dist/design-system-react-components.cjs.production.min.js +1 -1
  33. package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
  34. package/dist/design-system-react-components.esm.js +4431 -1670
  35. package/dist/design-system-react-components.esm.js.map +1 -1
  36. package/dist/hooks/useCloseDropDown.d.ts +6 -0
  37. package/dist/hooks/useNYPLTheme.d.ts +1 -0
  38. package/dist/index.d.ts +3 -0
  39. package/dist/styles.css +1 -1
  40. package/dist/theme/components/footer.d.ts +223 -0
  41. package/dist/theme/components/globalMixins.d.ts +24 -4
  42. package/dist/theme/components/header/header.d.ts +66 -0
  43. package/dist/theme/components/header/headerLogin.d.ts +299 -0
  44. package/dist/theme/components/header/headerLoginButton.d.ts +54 -0
  45. package/dist/theme/components/header/headerLowerNav.d.ts +38 -0
  46. package/dist/theme/components/header/headerMobileIconNav.d.ts +23 -0
  47. package/dist/theme/components/header/headerMobileNav.d.ts +79 -0
  48. package/dist/theme/components/header/headerMobileNavButton.d.ts +28 -0
  49. package/dist/theme/components/header/headerSearchButton.d.ts +56 -0
  50. package/dist/theme/components/header/headerSearchForm.d.ts +168 -0
  51. package/dist/theme/components/header/headerSitewideAlerts.d.ts +27 -0
  52. package/dist/theme/components/header/headerUpperNav.d.ts +57 -0
  53. package/dist/theme/components/radio.d.ts +12 -3
  54. package/dist/theme/components/skipNavigation.d.ts +2 -2
  55. package/dist/theme/components/template.d.ts +32 -57
  56. package/dist/theme/components/tooltip.d.ts +13 -0
  57. package/dist/theme/foundations/radii.d.ts +1 -0
  58. package/package.json +6 -1
  59. package/CHANGELOG.md +0 -1527
@@ -12,6 +12,11 @@ export interface AccordionProps {
12
12
  id?: string;
13
13
  /** Whether the accordion is open by default only on its initial rendering */
14
14
  isDefaultOpen?: boolean;
15
+ /** Sets max height of accordion panel. This value should be entered with the
16
+ * formatting of a CSS height attribute (ex. 100px, 8rem). If height of content
17
+ * within accordion panel is greater than height set by panelMaxHeight, a
18
+ * scrollbar will appear for accordion panel. */
19
+ panelMaxHeight?: string;
15
20
  }
16
21
  /**
17
22
  * Accordion component that shows content on toggle. Can be used to display
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ interface FooterProps {
3
+ /** Additional class name to add. */
4
+ className?: string;
5
+ /** ID that other components can cross reference for accessibility purposes */
6
+ id?: string;
7
+ }
8
+ /**
9
+ * This `Footer` component renders the NYPL-branded footer elements such
10
+ * as navigational NYPL.org links, social media links, copyright, and
11
+ * NYPL building facade image.
12
+ */
13
+ export declare const Footer: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<FooterProps & React.RefAttributes<HTMLDivElement>>, {}>;
14
+ export default Footer;
@@ -0,0 +1,12 @@
1
+ declare const link: {
2
+ nyplLinks: {
3
+ text: string;
4
+ href: string;
5
+ }[][];
6
+ socialMedia: {
7
+ href: string;
8
+ iconName: string;
9
+ title: string;
10
+ }[];
11
+ };
12
+ export default link;
@@ -18,7 +18,7 @@ export interface FormProps extends FormBaseProps {
18
18
  /** Optional form `method` attribute */
19
19
  method?: "get" | "post";
20
20
  /** Function to call for the `onSubmit` form event. */
21
- onSubmit?: (e: React.FormEvent<HTMLFormElement>) => void;
21
+ onSubmit?: (e: React.FormEvent<any>) => void;
22
22
  }
23
23
  /** FormRow child-component */
24
24
  export declare const FormRow: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<FormChildProps>) => JSX.Element, {}>;
@@ -27,5 +27,5 @@ export declare const FormField: import("@chakra-ui/react").ChakraComponent<(prop
27
27
  /** Main Form component */
28
28
  export declare const Form: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<FormProps & {
29
29
  children?: React.ReactNode;
30
- } & React.RefAttributes<HTMLFormElement>>, {}>;
30
+ } & React.RefAttributes<HTMLDivElement & HTMLFormElement>>, {}>;
31
31
  export default Form;
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ export interface GAOptionProps {
3
+ debug?: boolean;
4
+ standardImplementation?: boolean;
5
+ testMode?: boolean;
6
+ titleCase?: boolean;
7
+ }
8
+ export interface HeaderProps {
9
+ /** Google Analytics options to override the default settings. */
10
+ gaOptions?: GAOptionProps;
11
+ /** Whether or not the `Header` is in production mode. True by default. */
12
+ isProduction?: boolean;
13
+ }
14
+ /**
15
+ * The NYPL `Header` component is the top-level component of the site. It
16
+ * contains features for logging in, logging out, searching, and navigating
17
+ * the NYPL.org site.
18
+ */
19
+ export declare const Header: import("@chakra-ui/react").ChakraComponent<({ gaOptions, isProduction }: HeaderProps) => JSX.Element, {}>;
20
+ export default Header;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ export interface HeaderLoginProps {
3
+ catalogRef?: React.RefObject<HTMLDivElement & HTMLAnchorElement>;
4
+ greetingRef?: React.RefObject<HTMLDivElement>;
5
+ isMobile?: boolean;
6
+ }
7
+ /**
8
+ * The content of the login dropdown menu. Initially, this renders links to log
9
+ * in and log out. When the patron is logged in, it will also display the patron's
10
+ * name, links to the catalogs, and a log out link.
11
+ */
12
+ declare const HeaderLogin: import("@chakra-ui/react").ChakraComponent<({ catalogRef, greetingRef, isMobile }: HeaderLoginProps) => JSX.Element, {}>;
13
+ export default HeaderLogin;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ export interface HeaderLoginButtonProps {
3
+ isMobile?: boolean;
4
+ }
5
+ /**
6
+ * This is the button that will render the login menu when it is clicked
7
+ * and keep focus trapped within the menu. Its display text will be "Log In"
8
+ * when the user is not logged in and "My Account" when the user is logged in.
9
+ */
10
+ declare const HeaderLoginButton: import("@chakra-ui/react").ChakraComponent<({ isMobile }: HeaderLoginButtonProps) => JSX.Element, {}>;
11
+ export default HeaderLoginButton;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * This component renders the navigational list of links used to
4
+ * navigate to different landing pages on NYPL.org.
5
+ */
6
+ declare const HeaderLowerNav: import("@chakra-ui/react").ChakraComponent<() => JSX.Element, {}>;
7
+ export default HeaderLowerNav;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * This component renders the mobile list of icon buttons for
4
+ * logging in, searching, and navigating on NYPL.org.
5
+ */
6
+ declare const HeaderMobileIconNav: import("@chakra-ui/react").ChakraComponent<() => JSX.Element, {}>;
7
+ export default HeaderMobileIconNav;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * This component renders the navigational list of links used to navigate
4
+ * NYPL.org for mobile devices.
5
+ */
6
+ declare const HeaderMobileNav: import("@chakra-ui/react").ChakraComponent<() => JSX.Element, {}>;
7
+ export default HeaderMobileNav;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * This is the button that will render the navigational list of links
4
+ * when it is clicked and keep focus trapped within the menu.
5
+ */
6
+ declare const HeaderMobileNavButton: import("@chakra-ui/react").ChakraComponent<() => JSX.Element, {}>;
7
+ export default HeaderMobileNavButton;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ export interface HeaderSearchButtonProps {
3
+ isMobile?: boolean;
4
+ }
5
+ /**
6
+ * This is the button that will render the search form when it is clicked
7
+ * and keep focus trapped within the menu.
8
+ */
9
+ declare const HeaderSearchButton: import("@chakra-ui/react").ChakraComponent<({ isMobile }: HeaderSearchButtonProps) => JSX.Element, {}>;
10
+ export default HeaderSearchButton;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ export interface HeaderSearchFormProps {
3
+ isMobile?: boolean;
4
+ }
5
+ /**
6
+ * Displays the search form for the Header's search interface. On mobile, two
7
+ * buttons are displayed and on desktop, two radio inputs are displayed.
8
+ */
9
+ declare const HeaderSearchForm: import("@chakra-ui/react").ChakraComponent<({ isMobile }: HeaderSearchFormProps) => JSX.Element, {}>;
10
+ export default HeaderSearchForm;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * The HeaderSitewideAlerts component makes an API request to an NYPL API
4
+ * endpoint to fetch NYPL sitewide alerts. While this component can be used in
5
+ * isolation, it is already rendered in the DS Header component.
6
+ */
7
+ export declare const HeaderSitewideAlerts: import("@chakra-ui/react").ChakraComponent<() => JSX.Element, {}>;
8
+ export default HeaderSitewideAlerts;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * This renders the navigational list of links for logging in, subscribing
4
+ * to the email service, going to the Locations page, getting a Library card,
5
+ * donating, and shopping at NYPL.
6
+ */
7
+ declare const HeaderUpperNav: import("@chakra-ui/react").ChakraComponent<() => JSX.Element, {}>;
8
+ export default HeaderUpperNav;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ /**
3
+ * Context used for patron and production status data.
4
+ */
5
+ export declare const HeaderContext: React.Context<any>;
6
+ /**
7
+ * Context Provider used only in the Header component.
8
+ */
9
+ export declare const HeaderProvider: ({ children, isProduction, patronName, }: {
10
+ children: any;
11
+ isProduction?: boolean;
12
+ patronName?: string;
13
+ }) => JSX.Element;
@@ -0,0 +1,49 @@
1
+ export declare const patronApiUrlWithToken: string;
2
+ export declare const mockResponseData: {
3
+ data: {
4
+ decodedToken: {
5
+ iss: string;
6
+ sub: string;
7
+ aud: string;
8
+ iat: number;
9
+ exp: number;
10
+ auth_time: number;
11
+ scope: string;
12
+ };
13
+ patron: {
14
+ id: string;
15
+ updatedDate: string;
16
+ createdDate: string;
17
+ deletedDate: any;
18
+ deleted: boolean;
19
+ suppressed: boolean;
20
+ names: string[];
21
+ barCodes: string[];
22
+ expirationDate: string;
23
+ homeLibraryCode: string;
24
+ birthDate: string;
25
+ emails: string[];
26
+ };
27
+ };
28
+ count: number;
29
+ statusCode: number;
30
+ debugInfo: any[];
31
+ };
32
+ export declare const mockExpiredResponseData: {
33
+ data: {
34
+ expired: boolean;
35
+ statusCode: number;
36
+ type: string;
37
+ message: string;
38
+ };
39
+ error: {
40
+ type: string;
41
+ code: number;
42
+ message: string;
43
+ file: string;
44
+ line: number;
45
+ trace: string[];
46
+ };
47
+ debugInfo: any[];
48
+ };
49
+ export declare const mockLoginCookie = "{\"access_token\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvd3d3Lm55cGwub3JnIiwic3ViIjoiNjM2NzAyOCIsImF1ZCI6ImFwcF9sb2dpbiIsImlhdCI6MTQ4MjE3NjQ3MCwiZXhwIjoxNDgyMTgwMDcwLCJhdXRoX3RpbWUiOjE0ODIxNzY0NzAsInNjb3BlIjoib3BlbmlkIG9mZmxpbmVfYWNjZXNzIGNvb2tpZSBwYXRyb246cmVhZCJ9.JO7VbOqCC7HyjRmeyHD4zM1Gl0JBk5RdxjAkCp0h6sfVe-xs5FyY7biYqs19k4dUY2DbFYR5IG3xYt9IdhqyMkSnJxtiCY36WN7X_e0eBF2T1_IWKGaBc4JlbroMj5_aNB5W4nQvclrdlb2mV38Q_HGAMUKe8DDeCmAHctEtqGppNl8DC7IvqkekRS_6zgQwsHHW5kJR-f7zUROi4fvFpdNR-I7J4VNWdFIOijb4vXFOOWRLzdY_GHLJdWvSgxhqzwkceA5BScCicAKeHYHo04vabNp5TvPXoR0ypULqTyGYsNnXnUmh2Mu46j3bcNTACEKS97FBx1IfwttBL1ARtQ\",\"expires_in\":3600,\"token_type\":\"Bearer\",\"scope\":\"openid+offline_access+cookie+patron:read\",\"refresh_token\":\"02b49603a8a2719389a6c77416b110675067827d\"}";
@@ -0,0 +1,4 @@
1
+ export declare const encoreLogOutURL = "https://browse.nypl.org/iii/encore/logoutFilterRedirect?suite=def";
2
+ export declare const patLoggedInCookieExpiredTime = 1800000;
3
+ declare function EncoreCatalogLogOutTimer(currentTime?: number, isTestMode?: boolean): void;
4
+ export default EncoreCatalogLogOutTimer;
@@ -0,0 +1,16 @@
1
+ export declare const envConfig: {
2
+ production: string;
3
+ development: string;
4
+ };
5
+ export declare const gaConfig: {
6
+ eventCategory: string;
7
+ eventAction: string;
8
+ customDimensions: {
9
+ dimension1: string;
10
+ dimension2: string;
11
+ dimension4: string;
12
+ dimension5: string;
13
+ };
14
+ };
15
+ declare const gaUtils: any;
16
+ export default gaUtils;
@@ -0,0 +1,90 @@
1
+ export interface Alert {
2
+ id: string;
3
+ link: string;
4
+ description: string;
5
+ startDate: string;
6
+ endDate: string;
7
+ }
8
+ export declare const alertsApiUrl = "https://refinery.nypl.org/api/nypl/ndo/v0.1/content/alerts?filter%5Bscope%5D=all";
9
+ export declare const patronApiUrl = "https://platform.nypl.org/api/v0.1/auth/patron/tokens/";
10
+ export declare const tokenRefreshLink: (isProduction?: boolean) => string;
11
+ export declare const getLoginLinks: (patronName?: string, isProduction?: boolean) => {
12
+ catalogLink: string;
13
+ researchLink: string;
14
+ logOutLink: string;
15
+ };
16
+ export declare const upperNavLinks: {
17
+ locations: {
18
+ href: string;
19
+ text: string;
20
+ };
21
+ libraryCard: {
22
+ href: string;
23
+ text: string;
24
+ };
25
+ emailUpdates: {
26
+ href: string;
27
+ text: string;
28
+ };
29
+ donate: {
30
+ href: string;
31
+ text: string;
32
+ };
33
+ shop: {
34
+ href: string;
35
+ text: string;
36
+ };
37
+ };
38
+ export declare const siteNavLinks: {
39
+ href: string;
40
+ text: string;
41
+ }[];
42
+ /**
43
+ * Replaces the search string's special characters that need to be encoded
44
+ * using base64. These characters are "=","/", "\", "?".
45
+ */
46
+ export declare const encoreEncodeSearchString: (searchString: any) => any;
47
+ /**
48
+ * Returns the final URL for the NYPL Encore search.
49
+ */
50
+ export declare const getEncoreCatalogURL: (searchValue: any) => any;
51
+ /**
52
+ * Returns the final URL for the NYPL catalog search.
53
+ */
54
+ export declare const getNYPLSearchURL: (searchString: any) => string;
55
+ /**
56
+ * The `alertsApiUrl` fetches NYPL alerts from the Refinery API. This API
57
+ * returns JSONAPI-formatted data. We could use a better JSONAPI parser, but
58
+ * this is the only endpoint we will use that is JSONAPI. Eventually, this
59
+ * endpoint will be replaced. This function parses the JSONAPI data in a very
60
+ * naive and quick way to get the necessary alerts data. The data is then
61
+ * filtered to include active alerts.
62
+ */
63
+ export declare const parseAlertsData: (data: any) => Alert[];
64
+ /**
65
+ * `refreshAccessToken` attempts to refresh the "nyplIdentityPatron" cookie's
66
+ * `accessToken` by making a request to the `tokenRefreshLink`. If successful,
67
+ * it tries to fetch the patron's data again.
68
+ */
69
+ export declare const refreshAccessToken: (api: any, cb: any, fallBackCb: any) => void;
70
+ /**
71
+ * getCookieValue uses the js.cookie package to get the value
72
+ * of the "nyplIdentityPatron" cookie (if it exists) and extract
73
+ * the cookie's `access_token`.
74
+ */
75
+ export declare const getCookieValue: () => {
76
+ cookieValue: any;
77
+ accessToken: any;
78
+ };
79
+ export declare const deleteCookieValue: () => void;
80
+ /**
81
+ * getLoginData uses the `patronApiUrl` combined with the
82
+ * `accessToken` from the "nyplIdentityPatron" cookie to fetch
83
+ * the patron's information from the server.
84
+ */
85
+ export declare const getLoginData: (accessToken: any, cb: any) => void;
86
+ /**
87
+ * `extractPatronName` locates and returns the `patronName`
88
+ * from the nested object that is returned from `getLoginData`.
89
+ */
90
+ export declare const extractPatronName: (data: any) => any;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,98 @@
1
+ export declare const refineryResponse: {
2
+ data: {
3
+ attributes: {
4
+ "alert-text": {
5
+ en: {
6
+ text: string;
7
+ type: string;
8
+ };
9
+ type: string;
10
+ };
11
+ "closed-reason": {
12
+ en: {
13
+ text: string;
14
+ type: string;
15
+ };
16
+ type: string;
17
+ };
18
+ "closing-date-end": any;
19
+ "closing-date-start": any;
20
+ "date-created": any;
21
+ "date-modified": any;
22
+ "display-date-end": string;
23
+ "display-date-start": string;
24
+ extended: any;
25
+ locations: any;
26
+ scope: string;
27
+ uri: {
28
+ type: string;
29
+ "full-uri": string;
30
+ description: string;
31
+ };
32
+ uuid: any;
33
+ };
34
+ id: string;
35
+ links: {
36
+ self: string;
37
+ };
38
+ type: string;
39
+ }[];
40
+ jsonapi: {
41
+ version: string;
42
+ };
43
+ links: {
44
+ self: string;
45
+ };
46
+ meta: {
47
+ count: number;
48
+ };
49
+ };
50
+ export declare const expiredAlertsReponse: {
51
+ data: {
52
+ attributes: {
53
+ "alert-text": {
54
+ en: {
55
+ text: string;
56
+ type: string;
57
+ };
58
+ type: string;
59
+ };
60
+ "closed-reason": {
61
+ en: {
62
+ text: string;
63
+ type: string;
64
+ };
65
+ type: string;
66
+ };
67
+ "closing-date-end": any;
68
+ "closing-date-start": any;
69
+ "date-created": any;
70
+ "date-modified": any;
71
+ "display-date-end": string;
72
+ "display-date-start": string;
73
+ extended: any;
74
+ locations: any;
75
+ scope: string;
76
+ uri: {
77
+ type: string;
78
+ "full-uri": string;
79
+ description: string;
80
+ };
81
+ uuid: any;
82
+ };
83
+ id: string;
84
+ links: {
85
+ self: string;
86
+ };
87
+ type: string;
88
+ }[];
89
+ jsonapi: {
90
+ version: string;
91
+ };
92
+ links: {
93
+ self: string;
94
+ };
95
+ meta: {
96
+ count: number;
97
+ };
98
+ };
@@ -1,8 +1,8 @@
1
- import React from "react";
1
+ import React, { ImgHTMLAttributes } from "react";
2
2
  export declare type ImageRatios = "fourByThree" | "oneByTwo" | "original" | "sixteenByNine" | "square" | "threeByFour" | "threeByTwo" | "twoByOne";
3
3
  export declare type ImageSizes = "default" | "xxsmall" | "xsmall" | "small" | "medium" | "large";
4
4
  export declare type ImageTypes = "default" | "circle";
5
- export interface ComponentImageProps {
5
+ export interface ComponentImageProps extends Partial<HTMLImageElement> {
6
6
  /** String value used to populate the `alt` attribute of the internal `Image`
7
7
  * component's `img` element. @NOTE if an image is used, this value must be passed. */
8
8
  alt?: string;
@@ -37,7 +37,7 @@ interface ImageWrapperProps {
37
37
  /** Optional value to control the size of the image */
38
38
  size?: ImageSizes;
39
39
  }
40
- export interface ImageProps extends ImageWrapperProps {
40
+ export interface ImageProps extends ImageWrapperProps, ImgHTMLAttributes<HTMLImageElement> {
41
41
  /** Optionally pass in additional Chakra-based styles only for the figure. */
42
42
  additionalFigureStyles?: {
43
43
  [key: string]: any;
@@ -9,6 +9,7 @@ export interface LinkProps {
9
9
  href?: string;
10
10
  /** ID used for accessibility purposes. */
11
11
  id?: string;
12
+ onClick?: (event: React.MouseEvent<HTMLDivElement | HTMLAnchorElement, MouseEvent>) => void;
12
13
  /** Controls the link visuals: action, button, backwards, forwards, or default. */
13
14
  type?: LinkTypes;
14
15
  }
@@ -1,29 +1,33 @@
1
1
  import * as React from "react";
2
- export interface ColorCardProps {
3
- /** The backgroundColor of the color card. */
4
- backgroundColor: string;
5
- /** The name of a color's javascript theme object. */
6
- colorName: string;
7
- /** The name of the color that the current color is based on. */
8
- colorSource: string;
2
+ export interface DataTableProps {
3
+ /** Contrast and WCAG compliance data related to the color gray.xxxx-dark when
4
+ * used with the current color. */
5
+ dataBgPageColor: string[];
6
+ /** Contrast and WCAG compliance data related to the color gray.xxx-dark when
7
+ * used with the current color. */
8
+ dataBgDefaultColor: string[];
9
9
  /** Contrast and WCAG compliance data related to the color black when used
10
10
  * with the current color. */
11
- dataBlack: string[];
11
+ dataBlackColor: string[];
12
+ /** Contrast and WCAG compliance data related to the default color for
13
+ * heading elements when used with the current color. */
14
+ dataHeadingColor?: string[];
15
+ /** Contrast and WCAG compliance data related to the default color for basic
16
+ * text elements when used with the current color. */
17
+ dataBodyColor?: string[];
12
18
  /** Contrast and WCAG compliance data related to the color white when used
13
19
  * with the current color. */
14
- dataWhite: string[];
20
+ dataWhiteColor: string[];
15
21
  /** The color to use for text in the color card. */
16
22
  textColor: string;
17
23
  }
18
- export interface DataTableProps {
19
- /** Contrast and WCAG compliance data related to the color black when used
20
- * with the current color. */
21
- dataBlack: string[];
22
- /** Contrast and WCAG compliance data related to the color white when used
23
- * with the current color. */
24
- dataWhite: string[];
25
- /** color to use for text in color card */
26
- textColor: string;
24
+ export interface ColorCardProps extends DataTableProps {
25
+ /** The backgroundColor of the color card. */
26
+ backgroundColor: string;
27
+ /** The name of a color's javascript theme object. */
28
+ colorName: string;
29
+ /** The name of the color that the current color is based on. */
30
+ colorSource: string;
27
31
  }
28
32
  export declare const DataTable: (props: React.PropsWithChildren<DataTableProps>) => JSX.Element;
29
33
  export declare const ColorCard: (props: React.PropsWithChildren<ColorCardProps>) => JSX.Element;
@@ -28,6 +28,8 @@ export interface TemplateAppContainerProps extends TemplateFooterProps, Template
28
28
  /** ID used for the `main` HTML element. Defaults to "mainContent". Useful
29
29
  * anchor for the application skip navigation. */
30
30
  contentId?: string;
31
+ /** DOM that will be rendered in the `TemplateContentBottom` component section. */
32
+ contentBottom?: React.ReactElement;
31
33
  /** DOM that will be rendered in the `TemplateContentPrimary` component section. */
32
34
  contentPrimary?: React.ReactElement;
33
35
  /** DOM that will be rendered in the `TemplateContentSidebar` component section. */
@@ -66,9 +68,10 @@ declare const TemplateAboveHeader: (props: React.PropsWithChildren<TemplateProps
66
68
  */
67
69
  declare const TemplateHeader: ({ children, renderHeaderElement, }: React.PropsWithChildren<TemplateHeaderProps>) => JSX.Element;
68
70
  /**
69
- * This optional component should be used inside the `TemplateHeader` component.
70
- * This is meant to render its children from edge to edge and is most useful
71
- * for the `Breadcrumbs` and `Hero` components, and other banner-like components.
71
+ * This component should be used inside the `Template` component to contain both
72
+ * the `TemplateAboveHeader` and `TemplateHeader` components. This is meant to
73
+ * render its children from edge to edge and is most useful for the headers,
74
+ * `Breadcrumbs`, and `Hero` components or other banner-like components.
72
75
  */
73
76
  declare const TemplateBreakout: (props: React.PropsWithChildren<TemplateProps>) => JSX.Element;
74
77
  /**
@@ -88,6 +91,13 @@ declare const TemplateContent: (props: React.PropsWithChildren<TemplateContentPr
88
91
  * above the primary component and the sidebar component (if any).
89
92
  */
90
93
  declare const TemplateContentTop: (props: React.PropsWithChildren<TemplateProps>) => JSX.Element;
94
+ /**
95
+ * This optional component must be used inside the `TemplateContent` component
96
+ * and after the `TemplateContentPrimary` or `TemplateContentSidebar` component.
97
+ * This renders content in the main width of the container and should always
98
+ * render below the primary component and the sidebar component (if any).
99
+ */
100
+ declare const TemplateContentBottom: (props: React.PropsWithChildren<TemplateProps>) => JSX.Element;
91
101
  /**
92
102
  * This component is used to render content in a column when there must be a
93
103
  * sidebar component on either its left or right side. It must go inside the
@@ -126,5 +136,5 @@ declare const TemplateFooter: ({ children, renderFooterElement, }: React.PropsWi
126
136
  export declare const TemplateAppContainer: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<TemplateAppContainerProps & {
127
137
  children?: React.ReactNode;
128
138
  } & React.RefAttributes<HTMLDivElement>>, {}>;
129
- export { Template, TemplateAboveHeader, TemplateHeader, TemplateBreakout, TemplateContent, TemplateContentTop, TemplateContentPrimary, TemplateContentSidebar, TemplateFooter, };
139
+ export { Template, TemplateAboveHeader, TemplateBreakout, TemplateContent, TemplateContentBottom, TemplateContentPrimary, TemplateContentSidebar, TemplateContentTop, TemplateFooter, TemplateHeader, };
130
140
  export default TemplateAppContainer;
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ export interface TooltipProps {
3
+ /** Any child node passed to the component. */
4
+ children: React.ReactNode;
5
+ /** Value used to populate the tooltip content. */
6
+ content: string | React.ReactNode;
7
+ /** A class name for the Tooltip parent div. */
8
+ className?: string;
9
+ /** ID that other components can cross reference for accessibility purposes. */
10
+ id?: string;
11
+ /** Adds the `disabled` prop to the Tooltip when true. */
12
+ isDisabled?: boolean;
13
+ /** Wraps the children of the tooltip in `ComponentWrapper` with `tabIndex=0` when true. */
14
+ shouldWrapChildren?: boolean;
15
+ }
16
+ export declare const Tooltip: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>, {}>;
17
+ export default Tooltip;