@nypl/design-system-react-components 1.0.5 → 1.0.8

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 (75) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/components/Accordion/Accordion.d.ts +7 -2
  3. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +2 -2
  4. package/dist/components/Button/Button.d.ts +4 -2
  5. package/dist/components/ButtonGroup/ButtonGroup.d.ts +4 -2
  6. package/dist/components/Card/Card.d.ts +7 -3
  7. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  8. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +2 -2
  9. package/dist/components/ComponentWrapper/ComponentWrapper.d.ts +4 -2
  10. package/dist/components/Fieldset/Fieldset.d.ts +3 -1
  11. package/dist/components/Form/Form.d.ts +4 -2
  12. package/dist/components/Grid/SimpleGrid.d.ts +4 -2
  13. package/dist/components/Heading/Heading.d.ts +4 -2
  14. package/dist/components/HelperErrorText/HelperErrorText.d.ts +2 -2
  15. package/dist/components/Hero/Hero.d.ts +4 -2
  16. package/dist/components/HorizontalRule/HorizontalRule.d.ts +2 -2
  17. package/dist/components/Icons/Icon.d.ts +5 -3
  18. package/dist/components/Icons/IconSvgs.d.ts +8 -0
  19. package/dist/components/Image/Image.d.ts +8 -4
  20. package/dist/components/Label/Label.d.ts +4 -2
  21. package/dist/components/Link/Link.d.ts +2 -2
  22. package/dist/components/List/List.d.ts +4 -2
  23. package/dist/components/Logo/Logo.d.ts +4 -2
  24. package/dist/components/Modal/Modal.d.ts +4 -2
  25. package/dist/components/Notification/Notification.d.ts +1 -1
  26. package/dist/components/Pagination/Pagination.d.ts +2 -2
  27. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +2 -2
  28. package/dist/components/Radio/Radio.d.ts +1 -1
  29. package/dist/components/RadioGroup/RadioGroup.d.ts +2 -2
  30. package/dist/components/SearchBar/SearchBar.d.ts +8 -3
  31. package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +4 -2
  32. package/dist/components/SkipNavigation/SkipNavigation.d.ts +4 -2
  33. package/dist/components/Slider/Slider.d.ts +4 -2
  34. package/dist/components/StatusBadge/StatusBadge.d.ts +4 -2
  35. package/dist/components/StructuredContent/StructuredContent.d.ts +4 -2
  36. package/dist/components/StyleGuide/ColorCard.d.ts +22 -18
  37. package/dist/components/Table/Table.d.ts +4 -2
  38. package/dist/components/Tabs/Tabs.d.ts +4 -2
  39. package/dist/components/Template/Template.d.ts +21 -7
  40. package/dist/components/Text/Text.d.ts +4 -2
  41. package/dist/components/TextInput/TextInput.d.ts +1 -1
  42. package/dist/components/Toggle/Toggle.d.ts +1 -1
  43. package/dist/components/VideoPlayer/VideoPlayer.d.ts +4 -2
  44. package/dist/design-system-react-components.cjs.development.js +2370 -1880
  45. package/dist/design-system-react-components.cjs.development.js.map +1 -1
  46. package/dist/design-system-react-components.cjs.production.min.js +1 -1
  47. package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
  48. package/dist/design-system-react-components.esm.js +2371 -1881
  49. package/dist/design-system-react-components.esm.js.map +1 -1
  50. package/dist/hooks/useCarouselStyles.d.ts +1 -1
  51. package/dist/hooks/useNYPLTheme.d.ts +1 -0
  52. package/dist/styles.css +1 -1
  53. package/dist/theme/components/breadcrumb.d.ts +3 -3
  54. package/dist/theme/components/card.d.ts +4 -4
  55. package/dist/theme/components/checkbox.d.ts +2 -2
  56. package/dist/theme/components/customTable.d.ts +43 -43
  57. package/dist/theme/components/global.d.ts +2 -2
  58. package/dist/theme/components/globalMixins.d.ts +1 -4
  59. package/dist/theme/components/heading.d.ts +30 -30
  60. package/dist/theme/components/hero.d.ts +163 -119
  61. package/dist/theme/components/horizontalRule.d.ts +2 -2
  62. package/dist/theme/components/icon.d.ts +4762 -4762
  63. package/dist/theme/components/image.d.ts +42 -42
  64. package/dist/theme/components/list.d.ts +13 -13
  65. package/dist/theme/components/notification.d.ts +4 -4
  66. package/dist/theme/components/radio.d.ts +2 -2
  67. package/dist/theme/components/select.d.ts +2 -2
  68. package/dist/theme/components/skeletonLoader.d.ts +1 -1
  69. package/dist/theme/components/skipNavigation.d.ts +2 -2
  70. package/dist/theme/components/slider.d.ts +6 -6
  71. package/dist/theme/components/structuredContent.d.ts +33 -33
  72. package/dist/theme/components/tabs.d.ts +9 -9
  73. package/dist/theme/components/template.d.ts +33 -58
  74. package/dist/theme/components/toggle.d.ts +2 -2
  75. package/package.json +13 -14
package/CHANGELOG.md CHANGED
@@ -8,6 +8,54 @@ Currently, this repo is in Prerelease. When it is released, this project will ad
8
8
 
9
9
  ## Prerelease
10
10
 
11
+ ## 1.0.8 (August 11, 2022)
12
+
13
+ ### Adds
14
+
15
+ - Adds new color values under ui:
16
+ - `bg.default`, `bg.hover`, `bg.active`, `border.default`, `border.hover`, `typography.heading`, and `typography.body`.
17
+ - Adds new colors values under ui.gray:
18
+ - `xxxx-dark` and `xxx-dark`.
19
+ - Adds UI fills colors for dark mode in the codebase and also exported in the `useNYPLTheme` hook.
20
+ - Adds an optional `panelMaxHeight` prop to the `Accordion` component that determines the height of the panel and displays a scrollbar if content exceeds it.
21
+
22
+ ### Updates
23
+
24
+ - Updates color value for `xx-dark`.
25
+ - Updates the style of the TOC on the `Style Guide` pages to match the style of the TOC on the component pages.
26
+ - Updates the `Template` components to use CSS grid instead of flexbox.
27
+ - Updates the `Template` documentation with the new pattern for using individual `Template` components that go above the main `TemplateContent` component.
28
+ - Updates the `Placeholder` component's CSS to better display in the `Template` components.
29
+ - Updates how HTML attributes are passed down in the `Image` component to the HTML `img` element.
30
+ - Updates the `Accordion` so that its panel content only renders when the `Accordion` is open.
31
+
32
+ ## 1.0.7 (July 29, 2022)
33
+
34
+ ### Updates
35
+
36
+ - Updates border color in the `Description` variant of the `List` component.
37
+ - Updates how options are passed to the `SearchBar` component for its internal `Select` component.
38
+ - Updates how style props are passed to the `Link` component when using with third-party libraries, such as React Router.
39
+ - Updates the layout of the `Image` in the `Hero` "secondary" and "fiftyFifty" variants for mobile and desktop.
40
+
41
+ ## 1.0.6 (July 21, 2022)
42
+
43
+ ### Adds
44
+
45
+ - Adds the `isLazy` prop to the `Image` component which is set to `false` by default.
46
+
47
+ ### Updates
48
+
49
+ - Updates the following components to use React's `forwardRef` wrapper function to pass along refs to the correct DOM element. This is for third-party packages and components such as Chakra's `Tooltip` to work correctly.
50
+ - `Accordion`, `Breadcrumbs`, `Button`, `ButtonGroup`, `Card`, `ComponentWrapper`, `FieldSet`, `Form`, `SimpleGrid`, `Heading`, `HelperErrorText`, `Hero`, `HorizontalRule`, `Icon`, `Image`, `Label`, `List`, `Logo`, `Modal`, `Notification`, `Pagination`, `ProgressIndicator`, `SearchBar`, `SkeletonLoader`, `SkipNavigation`, `Slider`, `StatusBadge`, `StructuredContent`, `Table`, `Tabs`, `Template`, `TemplateAppContainer`, `Text`, `VideoPlayer`.
51
+ - Updates `padding-left` and `padding-right` style properties to `padding-start` and `padding-end`, respectively. Updates `margin-left` and `margin-right` style properties to `margin-start` and `margin-end`, respectively. These changes apply to inline CSS, shorthand Chakra style prop syntax, and Chakra theme file syntax. Note that `margin-start/end` and `padding-start/end` get converted to `margin-inline-start/end` and `padding-inline-start/end` respectively by Chakra UI.
52
+ - Updates the `Icon` component to include variants for legacy versions of `Account` (filled and unfilled), `Facebook`, `Instagram`, `Twitter` and `YouTube`.
53
+ - Updates the `Icon` component to include variants for `Warning` (filled and oultine).
54
+
55
+ ### Removes
56
+
57
+ - Removes the packages `@mdx-js/react` and `babel-loader` since they are not needed by Storybook.
58
+
11
59
  ## 1.0.5 (July 7, 2022)
12
60
 
13
61
  ### Adds
@@ -19,6 +67,7 @@ Currently, this repo is in Prerelease. When it is released, this project will ad
19
67
  - Updates the `Icon` component to include variants for `actionCheckCircleFilled`, `actionRegistration`, `decorativeEnvelope`, `decorativeLibraryCard` and `decorativeShoppingBag`.
20
68
  - Updates the docs for the `Colors` Style Guide to include additional data related to contrast and WCAG compliance.
21
69
  - Updates the `Checkbox` and `Radio` components to use `ui.gray.dark` for the default border color.
70
+ - Updates Storybook packages.
22
71
 
23
72
  ### Fixes
24
73
 
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  export declare type AccordionTypes = "default" | "warning" | "error";
3
3
  export interface AccordionDataProps {
4
4
  accordionType?: AccordionTypes;
@@ -12,10 +12,15 @@ 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
18
23
  * multiple accordion items together.
19
24
  */
20
- export declare const Accordion: import("@chakra-ui/react").ChakraComponent<(props: AccordionProps) => JSX.Element, {}>;
25
+ export declare const Accordion: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>, {}>;
21
26
  export default Accordion;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  export declare type BreadcrumbsTypes = "blogs" | "booksAndMore" | "education" | "locations" | "research" | "whatsOn";
3
3
  export interface BreadcrumbsDataProps {
4
4
  url: string;
@@ -14,5 +14,5 @@ export interface BreadcrumbProps {
14
14
  /** ID that other components can cross reference for accessibility purposes */
15
15
  id?: string;
16
16
  }
17
- export declare const Breadcrumbs: import("@chakra-ui/react").ChakraComponent<(props: BreadcrumbProps) => JSX.Element, {}>;
17
+ export declare const Breadcrumbs: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<BreadcrumbProps & React.RefAttributes<HTMLDivElement>>, {}>;
18
18
  export default Breadcrumbs;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  export declare type ButtonElementType = "submit" | "button" | "reset";
3
3
  export declare type ButtonTypes = "primary" | "secondary" | "callout" | "pill" | "link" | "noBrand";
4
4
  interface ButtonProps {
@@ -21,5 +21,7 @@ interface ButtonProps {
21
21
  /**
22
22
  * Renders a simple `button` element with custom variant styles.
23
23
  */
24
- export declare const Button: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<ButtonProps>) => JSX.Element, {}>;
24
+ export declare const Button: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ButtonProps & {
25
+ children?: React.ReactNode;
26
+ } & React.RefAttributes<HTMLButtonElement>>, {}>;
25
27
  export default Button;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  import { LayoutTypes } from "../../helpers/types";
3
3
  export declare type ButtonGroupWidths = "default" | "full";
4
4
  interface ButtonGroupProps {
@@ -18,5 +18,7 @@ interface ButtonGroupProps {
18
18
  * to row or column and the width of internal `Button` components can be set to
19
19
  * the parent's full width or the `Button`'s content width
20
20
  */
21
- export declare const ButtonGroup: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<ButtonGroupProps>) => JSX.Element, {}>;
21
+ export declare const ButtonGroup: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ButtonGroupProps & {
22
+ children?: React.ReactNode;
23
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
22
24
  export default ButtonGroup;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  import { LayoutTypes } from "../../helpers/types";
3
3
  import { ComponentImageProps } from "../Image/Image";
4
4
  interface CardBaseProps {
@@ -44,8 +44,12 @@ export interface CardProps extends CardBaseProps, CardWrapperProps {
44
44
  * the row layout. */
45
45
  isAlignedRightActions?: boolean;
46
46
  }
47
- export declare const CardHeading: import("@chakra-ui/react").ChakraComponent<import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<import("../Heading/Heading").HeadingProps>) => JSX.Element, {}>, {}>;
47
+ export declare const CardHeading: import("@chakra-ui/react").ChakraComponent<import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<import("../Heading/Heading").HeadingProps & {
48
+ children?: React.ReactNode;
49
+ } & React.RefAttributes<HTMLHeadingElement>>, {}>, {}>;
48
50
  export declare const CardContent: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<{}>) => JSX.Element, {}>;
49
51
  export declare const CardActions: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<CardActionsProps>) => JSX.Element, {}>;
50
- export declare const Card: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<CardProps>) => JSX.Element, {}>;
52
+ export declare const Card: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<CardProps & {
53
+ children?: React.ReactNode;
54
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
51
55
  export default Card;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
3
  interface CheckboxIconProps {
4
4
  /** When using the Checkbox as a "controlled" form element, you can specify
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
3
  import { LayoutTypes } from "../../helpers/types";
4
4
  export interface CheckboxGroupProps {
@@ -45,5 +45,5 @@ export interface CheckboxGroupProps {
45
45
  * wrapping and associated text elements, but the checkbox input elements
46
46
  * _need_ to be child `Checkbox` components from the NYPL Design System.
47
47
  */
48
- export declare const CheckboxGroup: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<HTMLInputElement>>, {}>;
48
+ export declare const CheckboxGroup: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<HTMLDivElement>>, {}>;
49
49
  export default CheckboxGroup;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
3
  export interface ComponentWrapperProps {
4
4
  /** The UI elements that will be wrapped by this component */
@@ -25,5 +25,7 @@ export interface ComponentWrapperProps {
25
25
  /** Offers the ability to hide the helper/invalid text. */
26
26
  showHelperInvalidText?: boolean;
27
27
  }
28
- export declare const ComponentWrapper: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<ComponentWrapperProps>) => JSX.Element, {}>;
28
+ export declare const ComponentWrapper: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ComponentWrapperProps & {
29
+ children?: React.ReactNode;
30
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
29
31
  export default ComponentWrapper;
@@ -18,5 +18,7 @@ interface FieldsetProps {
18
18
  * A wrapper component that renders a `fieldset` element along with a `legend`
19
19
  * element as its first child. Commonly used to wrap form components.
20
20
  */
21
- export declare const Fieldset: import("@chakra-ui/react").ChakraComponent<({ children, className, id, isLegendHidden, isRequired, legendText, showRequiredLabel, ...rest }: React.PropsWithChildren<FieldsetProps>) => JSX.Element, {}>;
21
+ export declare const Fieldset: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<FieldsetProps & {
22
+ children?: React.ReactNode;
23
+ } & React.RefAttributes<HTMLDivElement & HTMLFieldSetElement>>, {}>;
22
24
  export default Fieldset;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  import { GridGaps } from "../Grid/SimpleGrid";
3
3
  interface FormBaseProps {
4
4
  /** className to be applied to FormRow, FormField, and Form */
@@ -25,5 +25,7 @@ export declare const FormRow: import("@chakra-ui/react").ChakraComponent<(props:
25
25
  /** FormField child-component */
26
26
  export declare const FormField: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<FormChildProps>) => JSX.Element, {}>;
27
27
  /** Main Form component */
28
- export declare const Form: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<FormProps>) => JSX.Element, {}>;
28
+ export declare const Form: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<FormProps & {
29
+ children?: React.ReactNode;
30
+ } & React.RefAttributes<HTMLFormElement>>, {}>;
29
31
  export default Form;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  export declare type GridGaps = "grid.xxs" | "grid.xs" | "grid.s" | "grid.m" | "grid.l" | "grid.xl" | "grid.xxl";
3
3
  export interface SimpleGridProps {
4
4
  /** Additional class name. */
@@ -13,5 +13,7 @@ export interface SimpleGridProps {
13
13
  /** ID that other components can cross reference for accessibility purposes */
14
14
  id?: string;
15
15
  }
16
- export declare const SimpleGrid: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<SimpleGridProps>) => JSX.Element, {}>;
16
+ export declare const SimpleGrid: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SimpleGridProps & {
17
+ children?: React.ReactNode;
18
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
17
19
  export default SimpleGrid;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  export declare type HeadingSizes = "primary" | "secondary" | "tertiary" | "callout";
3
3
  export declare type HeadingLevels = "one" | "two" | "three" | "four" | "five" | "six";
4
4
  export interface HeadingProps {
@@ -29,5 +29,7 @@ export interface HeadingProps {
29
29
  /** Optional className for the URL when the `url` prop is passed */
30
30
  urlClass?: string;
31
31
  }
32
- export declare const Heading: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<HeadingProps>) => JSX.Element, {}>;
32
+ export declare const Heading: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<HeadingProps & {
33
+ children?: React.ReactNode;
34
+ } & React.RefAttributes<HTMLHeadingElement>>, {}>;
33
35
  export default Heading;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  export declare type AriaLiveValues = "assertive" | "off" | "polite";
3
3
  export declare type HelperErrorTextType = string | JSX.Element;
4
4
  interface HelperErrorTextProps {
@@ -25,5 +25,5 @@ interface HelperErrorTextProps {
25
25
  /**
26
26
  * Helper or error text for forms components.
27
27
  */
28
- export declare const HelperErrorText: import("@chakra-ui/react").ChakraComponent<({ ariaAtomic, ariaLive, className, id, isInvalid, text, ...rest }: HelperErrorTextProps) => JSX.Element, {}>;
28
+ export declare const HelperErrorText: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<HelperErrorTextProps & React.RefAttributes<HTMLDivElement>>, {}>;
29
29
  export default HelperErrorText;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  import { ComponentImageProps } from "../Image/Image";
3
3
  export declare type HeroTypes = "primary" | "secondary" | "secondaryBooksAndMore" | "secondaryLocations" | "secondaryResearch" | "secondaryWhatsOn" | "tertiary" | "campaign" | "fiftyFifty";
4
4
  export declare const heroSecondaryTypes: string[];
@@ -36,5 +36,7 @@ export interface HeroProps {
36
36
  * underneath the heading element. */
37
37
  subHeaderText?: string | JSX.Element;
38
38
  }
39
- export declare const Hero: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<HeroProps>) => JSX.Element, {}>;
39
+ export declare const Hero: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<HeroProps & {
40
+ children?: React.ReactNode;
41
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
40
42
  export default Hero;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  export interface HorizontalRuleProps {
3
3
  /** Optional alignment value to align the horizontal rule to one side or the
4
4
  * other when the width is less than 100%. If omitted, the horizontal rule
@@ -7,5 +7,5 @@ export interface HorizontalRuleProps {
7
7
  /** ClassName you can add in addition to `horizontal-rule` */
8
8
  className?: string;
9
9
  }
10
- export declare const HorizontalRule: import("@chakra-ui/react").ChakraComponent<(props: HorizontalRuleProps) => JSX.Element, {}>;
10
+ export declare const HorizontalRule: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<HorizontalRuleProps & React.RefAttributes<HTMLDivElement & HTMLHRElement>>, {}>;
11
11
  export default HorizontalRule;
@@ -1,7 +1,7 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  export declare type IconAlign = "left" | "right" | "none";
3
3
  export declare type IconColors = "ui.black" | "ui.white" | "brand.primary" | "brand.secondary" | "section.blogs.primary" | "section.blogs.secondary" | "section.books-and-more.primary" | "section.books-and-more.secondary" | "section.education.primary" | "section.education.secondary" | "section.locations.primary" | "section.locations.secondary" | "section.research.primary" | "section.research.secondary" | "section.research-library.lpa" | "section.research-library.schomburg" | "section.research-library.schwartzman" | "section.whats-on.primary" | "section.whats-on.secondary";
4
- export declare type IconNames = "accessibilityFull" | "accessibilityPartial" | "actionCheckCircle" | "actionCheckCircleFilled" | "actionExit" | "actionHelpDefault" | "actionHelpOutline" | "actionLaunch" | "actionPower" | "actionRegistration" | "actionSettings" | "alertNotificationImportant" | "arrow" | "building" | "check" | "clock" | "close" | "decorativeEnvelope" | "decorativeLibraryCard" | "decorativeShoppingBag" | "download" | "errorFilled" | "errorOutline" | "fileTypeAudio" | "fileTypeDoc" | "fileTypeGenericDoc" | "fileTypeImage" | "fileTypePdf" | "fileTypeSpreadsheet" | "fileTypeVideo" | "headset" | "locator" | "minus" | "plus" | "search" | "socialFacebook" | "socialInstagram" | "socialTumblr" | "socialTwitter" | "socialYoutube" | "speakerNotes" | "utilityAccountFilled" | "utilityAccountUnfilled" | "utilityHamburger" | "utilitySearch";
4
+ export declare type IconNames = "accessibilityFull" | "accessibilityPartial" | "actionCheckCircle" | "actionCheckCircleFilled" | "actionExit" | "actionHelpDefault" | "actionHelpOutline" | "actionLaunch" | "actionPower" | "actionRegistration" | "actionSettings" | "alertNotificationImportant" | "alertWarningFilled" | "alertWarningOutline" | "arrow" | "building" | "check" | "clock" | "close" | "decorativeEnvelope" | "decorativeLibraryCard" | "decorativeShoppingBag" | "download" | "errorFilled" | "errorOutline" | "fileTypeAudio" | "fileTypeDoc" | "fileTypeGenericDoc" | "fileTypeImage" | "fileTypePdf" | "fileTypeSpreadsheet" | "fileTypeVideo" | "headset" | "legacyAccountFilled" | "legacyAccountUnfilled" | "legacySocialFacebook" | "legacySocialInstagram" | "legacySocialTwitter" | "legacySocialYoutube" | "locator" | "minus" | "plus" | "search" | "socialFacebook" | "socialInstagram" | "socialTumblr" | "socialTwitter" | "socialYoutube" | "speakerNotes" | "utilityAccountFilled" | "utilityAccountUnfilled" | "utilityHamburger" | "utilitySearch";
5
5
  export declare type IconRotationTypes = "rotate0" | "rotate90" | "rotate180" | "rotate270";
6
6
  export declare type IconSizes = "default" | "small" | "medium" | "large" | "xlarge" | "xxlarge" | "xxxlarge";
7
7
  export declare type IconTypes = "default" | "breadcrumbs";
@@ -33,5 +33,7 @@ export interface IconProps {
33
33
  /**
34
34
  * Renders SVG-based icons.
35
35
  */
36
- export declare const Icon: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<IconProps>) => JSX.Element, {}>;
36
+ export declare const Icon: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<IconProps & {
37
+ children?: React.ReactNode;
38
+ } & React.RefAttributes<HTMLDivElement & SVGSVGElement>>, {}>;
37
39
  export default Icon;
@@ -11,6 +11,8 @@ declare const _default: {
11
11
  actionRegistration: string;
12
12
  actionSettings: string;
13
13
  alertNotificationImportant: string;
14
+ alertWarningFilled: string;
15
+ alertWarningOutline: string;
14
16
  arrow: string;
15
17
  building: string;
16
18
  check: string;
@@ -30,6 +32,12 @@ declare const _default: {
30
32
  fileTypeSpreadsheet: string;
31
33
  fileTypeVideo: string;
32
34
  headset: string;
35
+ legacyAccountFilled: string;
36
+ legacyAccountUnfilled: string;
37
+ legacySocialFacebook: string;
38
+ legacySocialInstagram: string;
39
+ legacySocialTwitter: string;
40
+ legacySocialYoutube: string;
33
41
  locator: string;
34
42
  minus: string;
35
43
  plus: string;
@@ -1,8 +1,8 @@
1
- /// <reference types="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;
@@ -15,6 +15,8 @@ export interface ComponentImageProps {
15
15
  component?: JSX.Element;
16
16
  /** Optional value to render as a credit for the internal `Image` component. */
17
17
  credit?: string;
18
+ /** Flag to set the internal `Image` component to `isLazy` mode. */
19
+ isLazy?: boolean;
18
20
  /** Optional value to control the size of the internal `Image` component.
19
21
  * Defaults to `ImageSizes.Default`. */
20
22
  size?: ImageSizes;
@@ -35,7 +37,7 @@ interface ImageWrapperProps {
35
37
  /** Optional value to control the size of the image */
36
38
  size?: ImageSizes;
37
39
  }
38
- export interface ImageProps extends ImageWrapperProps {
40
+ export interface ImageProps extends ImageWrapperProps, ImgHTMLAttributes<HTMLImageElement> {
39
41
  /** Optionally pass in additional Chakra-based styles only for the figure. */
40
42
  additionalFigureStyles?: {
41
43
  [key: string]: any;
@@ -54,8 +56,10 @@ export interface ImageProps extends ImageWrapperProps {
54
56
  credit?: string;
55
57
  /** Optional value for the image type */
56
58
  imageType?: ImageTypes;
59
+ /** Flag to set the internal `Image` component to `isLazy` mode. */
60
+ isLazy?: boolean;
57
61
  /** The src attribute is required, and contains the path to the image you want to embed. */
58
62
  src?: string;
59
63
  }
60
- export declare const Image: import("@chakra-ui/react").ChakraComponent<(props: ImageProps) => JSX.Element, {}>;
64
+ export declare const Image: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ImageProps & React.RefAttributes<HTMLDivElement>>, {}>;
61
65
  export default Image;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  interface LabelProps {
3
3
  /** Additional CSS class name to render in the `label` element. */
4
4
  className?: string;
@@ -16,5 +16,7 @@ interface LabelProps {
16
16
  /**
17
17
  * A label for form inputs. It should never be used alone.
18
18
  */
19
- export declare const Label: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<LabelProps>) => JSX.Element, {}>;
19
+ export declare const Label: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<LabelProps & {
20
+ children?: React.ReactNode;
21
+ } & React.RefAttributes<HTMLDivElement & HTMLLabelElement>>, {}>;
20
22
  export default Label;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  export declare type LinkTypes = "action" | "backwards" | "button" | "default" | "external" | "forwards";
3
3
  export interface LinkProps {
4
4
  /** Any child node passed to the component. */
@@ -16,5 +16,5 @@ export interface LinkProps {
16
16
  * A component that uses an `href` prop or a child anchor element, to create
17
17
  * an anchor element with added styling and conventions.
18
18
  */
19
- export declare const Link: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>, {}>;
19
+ export declare const Link: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLDivElement & HTMLAnchorElement>>, {}>;
20
20
  export default Link;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  export declare type ListTypes = "ol" | "ul" | "dl";
3
3
  interface DescriptionProps {
4
4
  term: string;
@@ -31,5 +31,7 @@ export interface ListProps {
31
31
  * and `dd` elements based on the `type` prop. Note that the `title` prop will
32
32
  * only display for the `Description` list type.
33
33
  */
34
- export declare const List: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<ListProps>) => any, {}>;
34
+ export declare const List: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ListProps & {
35
+ children?: React.ReactNode;
36
+ } & React.RefAttributes<HTMLDivElement & HTMLUListElement & HTMLOListElement>>, {}>;
35
37
  export default List;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  export declare type LogoNames = "appleAppStoreBlack" | "appleAppStoreWhite" | "bplBlack" | "bplWhite" | "cleverBadgeColor" | "cleverColor" | "cleverWhite" | "firstbookColor" | "firstbookColorNegative" | "googlePlayBlack" | "lpaBlack" | "lpaColor" | "lpaWhite" | "mlnBlack" | "mlnColor" | "mlnWhite" | "nyplFullBlack" | "nyplFullWhite" | "nyplLionBlack" | "nyplLionWhite" | "nyplTextBlack" | "nyplTextWhite" | "openebooksColor" | "openebooksNegative" | "openebooksWithTextColor" | "openebooksWithTextNegative" | "qplAltBlack" | "qplAltWhite" | "qplBlack" | "qplColor" | "qplWhite" | "reservoirIconColor" | "reservoirVerticalColor" | "schomburgBlack" | "schomburgCircleBlack" | "schomburgCircleColor" | "schomburgCircleWhite" | "schomburgColor" | "schomburgWhite" | "simplyeBlack" | "simplyeWhite" | "simplyeColor" | "snflBlack" | "snflWhite" | "treasuresColor" | "treasuresColorNegative";
3
3
  export declare type LogoSizes = "default" | "xxsmall" | "xsmall" | "small" | "medium" | "large";
4
4
  export interface LogoProps {
@@ -22,5 +22,7 @@ export interface LogoProps {
22
22
  * The `Logo` component renders SVG-based logos and color variants that are
23
23
  * commonly used by the New York Public Library.
24
24
  */
25
- export declare const Logo: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<LogoProps>) => JSX.Element, {}>;
25
+ export declare const Logo: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<LogoProps & {
26
+ children?: React.ReactNode;
27
+ } & React.RefAttributes<HTMLDivElement & SVGSVGElement>>, {}>;
26
28
  export default Logo;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  interface BaseModalProps {
3
3
  bodyContent?: string | JSX.Element;
4
4
  closeButtonLabel?: string;
@@ -19,7 +19,9 @@ export interface ModalProps {
19
19
  * internal `Modal` component. Note that props to update the internal `Modal`
20
20
  * component are passed through to the `modalProps` prop.
21
21
  */
22
- export declare const ModalTrigger: import("@chakra-ui/react").ChakraComponent<({ buttonText, id, modalProps, ...rest }: React.PropsWithChildren<ModalProps>) => JSX.Element, {}>;
22
+ export declare const ModalTrigger: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ModalProps & {
23
+ children?: React.ReactNode;
24
+ } & React.RefAttributes<HTMLButtonElement>>, {}>;
23
25
  /**
24
26
  * This hook function can be used to render the `Modal` component with a custom
25
27
  * open button(s) and optional custom close button(s). You must render your own
@@ -46,5 +46,5 @@ export declare const NotificationContent: import("@chakra-ui/react").ChakraCompo
46
46
  * Component used to present users with three different levels of notifications:
47
47
  * standard, announcement, and warning.
48
48
  */
49
- export declare const Notification: import("@chakra-ui/react").ChakraComponent<(props: NotificationProps) => JSX.Element, {}>;
49
+ export declare const Notification: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<NotificationProps & React.RefAttributes<HTMLDivElement>>, {}>;
50
50
  export default Notification;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  export interface PaginationProps {
3
3
  /** Additional className. */
4
4
  className?: string;
@@ -23,5 +23,5 @@ export interface PaginationProps {
23
23
  /**
24
24
  * A component that provides a navigational list of page items.
25
25
  */
26
- export declare const Pagination: import("@chakra-ui/react").ChakraComponent<(props: PaginationProps) => JSX.Element, {}>;
26
+ export declare const Pagination: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLDivElement>>, {}>;
27
27
  export default Pagination;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  export declare type ProgressIndicatorSizes = "default" | "small";
3
3
  export declare type ProgressIndicatorTypes = "circular" | "linear";
4
4
  export interface ProgressIndicatorProps {
@@ -26,5 +26,5 @@ export interface ProgressIndicatorProps {
26
26
  * time to complete or consists of multiple steps. Examples include downloading,
27
27
  * uploading, or processing.
28
28
  */
29
- export declare const ProgressIndicator: import("@chakra-ui/react").ChakraComponent<(props: ProgressIndicatorProps) => JSX.Element, {}>;
29
+ export declare const ProgressIndicator: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ProgressIndicatorProps & React.RefAttributes<HTMLDivElement>>, {}>;
30
30
  export default ProgressIndicator;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
3
  export interface RadioProps {
4
4
  /** Additional class name. */
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
3
  import { LayoutTypes } from "../../helpers/types";
4
4
  export interface RadioGroupProps {
@@ -47,5 +47,5 @@ export interface RadioGroupProps {
47
47
  */
48
48
  export declare const RadioGroup: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<RadioGroupProps & {
49
49
  children?: React.ReactNode;
50
- } & React.RefAttributes<HTMLInputElement>>, {}>;
50
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
51
51
  export default RadioGroup;
@@ -1,13 +1,18 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
3
  interface BaseProps {
4
+ id?: string;
4
5
  labelText: string;
5
6
  name: string;
6
7
  onChange?: (event: React.ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement>) => void;
7
8
  value?: string;
8
9
  }
10
+ interface SelectOptionsProps {
11
+ text: string;
12
+ value: string;
13
+ }
9
14
  export interface SelectProps extends BaseProps {
10
- optionsData: string[];
15
+ optionsData: SelectOptionsProps[];
11
16
  onChange?: (event: React.FormEvent) => void;
12
17
  }
13
18
  export interface TextInputProps extends BaseProps {
@@ -57,5 +62,5 @@ export interface SearchBarProps {
57
62
  * Renders a wrapper `form` element to be used with `Select` (optional),
58
63
  * `Input`, and `Button` components together.
59
64
  */
60
- export declare const SearchBar: import("@chakra-ui/react").ChakraComponent<(props: SearchBarProps) => JSX.Element, {}>;
65
+ export declare const SearchBar: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SearchBarProps & React.RefAttributes<HTMLDivElement>>, {}>;
61
66
  export default SearchBar;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  import { LayoutTypes } from "../../helpers/types";
3
3
  export declare type SkeletonLoaderImageRatios = "landscape" | "portrait" | "square";
4
4
  export interface SkeletonLoaderProps {
@@ -35,5 +35,7 @@ export interface SkeletonLoaderProps {
35
35
  * The `SkeletonLoader` component renders a placeholder to be used while
36
36
  * dynamic content is loading.
37
37
  */
38
- export declare const SkeletonLoader: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<SkeletonLoaderProps>) => JSX.Element, {}>;
38
+ export declare const SkeletonLoader: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SkeletonLoaderProps & {
39
+ children?: React.ReactNode;
40
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
39
41
  export default SkeletonLoader;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  interface SkipNavigationProps {
3
3
  /** Additional CSS class name to render in the `nav` element. */
4
4
  className?: string;
@@ -13,5 +13,7 @@ interface SkipNavigationProps {
13
13
  * the `#mainContent` id, and the second link points to accessibility information
14
14
  * on NYPL.org. These links are visually hidden but can be read by screenreaders.
15
15
  */
16
- export declare const SkipNavigation: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<SkipNavigationProps>) => JSX.Element, {}>;
16
+ export declare const SkipNavigation: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SkipNavigationProps & {
17
+ children?: React.ReactNode;
18
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
17
19
  export default SkipNavigation;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
3
  export interface SliderProps {
4
4
  /** Additional class name for the Slider component. */
@@ -55,5 +55,7 @@ export interface SliderProps {
55
55
  * with a min and max value. The value(s) can be updated through the slider
56
56
  * thumb(s) or through the text input(s) elements.
57
57
  */
58
- export declare const Slider: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<SliderProps>) => JSX.Element, {}>;
58
+ export declare const Slider: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SliderProps & {
59
+ children?: React.ReactNode;
60
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
59
61
  export default Slider;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  export declare type StatusBadgeTypes = "low" | "medium" | "high";
3
3
  export interface StatusBadgeProps {
4
4
  /** Additional class for the component */
@@ -12,5 +12,7 @@ export interface StatusBadgeProps {
12
12
  * The `StatusBadge` component is used to display a visual badge for three
13
13
  * different status levels.
14
14
  */
15
- export declare const StatusBadge: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<StatusBadgeProps>) => JSX.Element, {}>;
15
+ export declare const StatusBadge: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<StatusBadgeProps & {
16
+ children?: React.ReactNode;
17
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
16
18
  export default StatusBadge;