@nypl/design-system-react-components 3.3.2 → 3.4.0-rc

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.
@@ -4,9 +4,9 @@ import { DimensionTypes } from "../../helpers/types";
4
4
  export declare const imageRatiosArray: readonly ["fourByThree", "oneByTwo", "original", "sixteenByNine", "square", "threeByFour", "threeByTwo", "twoByOne"];
5
5
  export declare const imageSizesArray: readonly ["default", "xxxsmall", "xxsmall", "xsmall", "small", "medium", "large"];
6
6
  export declare const imageTypesArray: readonly ["default", "circle"];
7
- export type ImageRatios = (typeof imageRatiosArray)[number];
8
- export type ImageSizes = (typeof imageSizesArray)[number];
9
- export type ImageTypes = (typeof imageTypesArray)[number];
7
+ export type ImageRatios = typeof imageRatiosArray[number];
8
+ export type ImageSizes = typeof imageSizesArray[number];
9
+ export type ImageTypes = typeof imageTypesArray[number];
10
10
  export interface ComponentImageProps extends Partial<HTMLImageElement> {
11
11
  /** String value used to populate the `alt` attribute of the internal `Image`
12
12
  * component's `img` element. @NOTE if an image is used, this value must be passed. */
@@ -1,5 +1,7 @@
1
1
  import { ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
+ export declare const tableBodyTextSizesArray: readonly ["body1", "body2"];
4
+ export type TableBodyTextSizes = typeof tableBodyTextSizesArray[number];
3
5
  export interface TableProps {
4
6
  /** Additional class name for the `Table` component. */
5
7
  className?: string;
@@ -10,11 +12,22 @@ export interface TableProps {
10
12
  columnHeadersBackgroundColor?: string;
11
13
  /** Hex value to set the text color of the column headers. */
12
14
  columnHeadersTextColor?: string;
15
+ /** Array of style objects used to set custom styles for the table columns.
16
+ * Any style can be passed, but the most common use would be to pass "width"
17
+ * and "maxWidth" to set custom column widths. */
18
+ columnStyles?: object[];
19
+ /** The size of the table body text. */
20
+ tableTextSize?: TableBodyTextSizes;
13
21
  /** ID that other components can cross reference for accessibility purposes. */
14
22
  id?: string;
23
+ /** If true, horizontal scrolling will be enabled for the table content. */
24
+ isScrollable?: boolean;
15
25
  /** If true, a border will be displayed between each row in the `Table`
16
26
  * component. The default value is false. */
17
27
  showRowDividers?: boolean;
28
+ /** If true, the heading text will be rendered above the table. The default
29
+ * value is true. */
30
+ showTitleText?: boolean;
18
31
  /** Two-dimensional array used to populate the table rows. */
19
32
  tableData: (string | JSX.Element)[][];
20
33
  /** Displays `Table` title element. */
@@ -98,7 +98,7 @@ export type { StructuredContentImagePosition, StructuredContentProps, } from "./
98
98
  export { default as StyledList } from "./components/StyledList/StyledList";
99
99
  export type { StyledListProps, StyledListTextSizes, } from "./components/StyledList/StyledList";
100
100
  export { default as Table } from "./components/Table/Table";
101
- export type { TableProps } from "./components/Table/Table";
101
+ export type { TableBodyTextSizes, TableProps } from "./components/Table/Table";
102
102
  export { default as Tabs, TabList, Tab, TabPanels, TabPanel, } from "./components/Tabs/Tabs";
103
103
  export type { TabsDataProps, TabsProps } from "./components/Tabs/Tabs";
104
104
  export { default as TagSet } from "./components/TagSet/TagSet";