@nypl/design-system-react-components 3.3.1 → 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.
- package/dist/design-system-react-components.cjs +45 -45
- package/dist/design-system-react-components.js +6864 -6750
- package/dist/src/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/dist/src/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/src/components/Fieldset/Fieldset.d.ts +2 -2
- package/dist/src/components/Image/Image.d.ts +3 -3
- package/dist/src/components/Label/Label.d.ts +2 -2
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/src/components/Select/Select.d.ts +1 -1
- package/dist/src/components/Slider/Slider.d.ts +1 -1
- package/dist/src/components/Table/Table.d.ts +13 -0
- package/dist/src/components/TextInput/TextInput.d.ts +2 -2
- package/dist/src/index.d.ts +1 -1
- package/dist/src/theme/components/customTable.d.ts +402 -383
- package/dist/src/theme/components/feedbackBox.d.ts +1 -0
- package/dist/src/theme/components/structuredContent.d.ts +34 -50
- package/dist/src/theme/components/text.d.ts +1 -1
- package/dist/src/theme/foundations/global.d.ts +6 -0
- package/package.json +1 -1
|
@@ -36,7 +36,7 @@ export interface CheckboxGroupProps {
|
|
|
36
36
|
/** Offers the ability to show the group's legend onscreen or hide it. Refer
|
|
37
37
|
* to the `labelText` property for more information. */
|
|
38
38
|
showLabel?: boolean;
|
|
39
|
-
/** Whether or not to display the "(
|
|
39
|
+
/** Whether or not to display the "(required)" text in the label text.
|
|
40
40
|
* True by default. */
|
|
41
41
|
showRequiredLabel?: boolean;
|
|
42
42
|
/** The values to programmatically update the selected `Checkbox`es. */
|
|
@@ -26,7 +26,7 @@ interface DatePickerWrapperProps extends DateRangeRowProps {
|
|
|
26
26
|
labelText: string;
|
|
27
27
|
/** Offers the ability to show the label onscreen or hide it. */
|
|
28
28
|
showLabel?: boolean;
|
|
29
|
-
/** Whether or not to display the "(
|
|
29
|
+
/** Whether or not to display the "(required)" text in the label text.
|
|
30
30
|
* True by default. */
|
|
31
31
|
showRequiredLabel?: boolean;
|
|
32
32
|
}
|
|
@@ -7,11 +7,11 @@ export interface FieldsetProps {
|
|
|
7
7
|
id: string;
|
|
8
8
|
/** Flag to show or hide the text in the `legend` element. False by default. */
|
|
9
9
|
isLegendHidden?: boolean;
|
|
10
|
-
/** Flag to render "
|
|
10
|
+
/** Flag to render "required" in the `legend`. True by default. */
|
|
11
11
|
isRequired?: boolean;
|
|
12
12
|
/** Text to display in the `legend` element. */
|
|
13
13
|
legendText?: string;
|
|
14
|
-
/** Whether or not to display the "(
|
|
14
|
+
/** Whether or not to display the "(required)" text in the `legend` text.
|
|
15
15
|
* True by default. */
|
|
16
16
|
showRequiredLabel?: boolean;
|
|
17
17
|
}
|
|
@@ -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 =
|
|
8
|
-
export type ImageSizes =
|
|
9
|
-
export type ImageTypes =
|
|
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. */
|
|
@@ -10,10 +10,10 @@ export interface LabelProps {
|
|
|
10
10
|
/** Controls whether the label should be inline with the input it goes with.
|
|
11
11
|
* This prop should only be used internally. */
|
|
12
12
|
isInlined?: boolean;
|
|
13
|
-
/** Controls whether the "(
|
|
13
|
+
/** Controls whether the "(required)" text should be displayed alongside the
|
|
14
14
|
* label's text. False by default. */
|
|
15
15
|
isRequired?: boolean;
|
|
16
|
-
/** Allows the '(
|
|
16
|
+
/** Allows the '(required)' text to be changed for language purposes
|
|
17
17
|
* Note: Parenthesis will be added automatically by the component */
|
|
18
18
|
requiredLabelText?: string;
|
|
19
19
|
}
|
|
@@ -36,7 +36,7 @@ export interface RadioGroupProps {
|
|
|
36
36
|
/** Offers the ability to show the group's legend onscreen or hide it. Refer
|
|
37
37
|
* to the `labelText` property for more information. */
|
|
38
38
|
showLabel?: boolean;
|
|
39
|
-
/** Whether or not to display the "(
|
|
39
|
+
/** Whether or not to display the "(required)" text in the label text.
|
|
40
40
|
* True by default. */
|
|
41
41
|
showRequiredLabel?: boolean;
|
|
42
42
|
}
|
|
@@ -45,7 +45,7 @@ export interface SelectProps {
|
|
|
45
45
|
/** Offers the ability to show the select's label onscreen or hide it. Refer
|
|
46
46
|
* to the `labelText` property for more information. */
|
|
47
47
|
showLabel?: boolean;
|
|
48
|
-
/** Whether or not to display the "(
|
|
48
|
+
/** Whether or not to display the "(required)" text in the label text.
|
|
49
49
|
* True by default. */
|
|
50
50
|
showRequiredLabel?: boolean;
|
|
51
51
|
/** The value of the selected option.
|
|
@@ -45,7 +45,7 @@ export interface SliderProps {
|
|
|
45
45
|
/** Offers the ability to show the label onscreen or hide it. Refer
|
|
46
46
|
* to the `labelText` property for more information. */
|
|
47
47
|
showLabel?: boolean;
|
|
48
|
-
/** Whether or not to display the "(
|
|
48
|
+
/** Whether or not to display the "(required)" text in the label text.
|
|
49
49
|
* True by default. */
|
|
50
50
|
showRequiredLabel?: boolean;
|
|
51
51
|
/** Offers the ability to hide the static min/max values. */
|
|
@@ -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. */
|
|
@@ -65,7 +65,7 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
65
65
|
pattern?: string;
|
|
66
66
|
/** Populates the placeholder for the input/textarea elements */
|
|
67
67
|
placeholder?: string;
|
|
68
|
-
/** Allows the '(
|
|
68
|
+
/** Allows the '(required)' text to be changed for language purposes
|
|
69
69
|
* Note: Parenthesis will be added automatically by the component */
|
|
70
70
|
requiredLabelText?: string;
|
|
71
71
|
/** Offers the ability to hide the helper/invalid text. */
|
|
@@ -73,7 +73,7 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
73
73
|
/** Offers the ability to show the label onscreen or hide it. Refer to the
|
|
74
74
|
* `labelText` property for more information. */
|
|
75
75
|
showLabel?: boolean;
|
|
76
|
-
/** Whether or not to display the "(
|
|
76
|
+
/** Whether or not to display the "(required)" text in the label text.
|
|
77
77
|
* True by default. */
|
|
78
78
|
showRequiredLabel?: boolean;
|
|
79
79
|
/** The amount to increase or decrease when using the number type. */
|
package/dist/src/index.d.ts
CHANGED
|
@@ -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";
|