@nypl/design-system-react-components 3.3.0-rc2 → 3.3.1-rc-test-card-image
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 +46 -46
- package/dist/design-system-react-components.js +3841 -3796
- package/dist/src/components/Card/Card.d.ts +1 -1
- 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 +7 -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 +3 -1
- package/dist/src/components/Slider/Slider.d.ts +1 -1
- package/dist/src/components/TextInput/TextInput.d.ts +2 -2
- package/dist/src/components/Tooltip/Tooltip.d.ts +4 -0
- package/dist/src/theme/components/searchBar.d.ts +42 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ChakraComponent } from "@chakra-ui/react";
|
|
2
1
|
import React from "react";
|
|
2
|
+
import { ChakraComponent } from "@chakra-ui/react";
|
|
3
3
|
import { LayoutTypes } from "../../helpers/types";
|
|
4
4
|
import { ComponentImageProps } from "../Image/Image";
|
|
5
5
|
interface CardBaseProps {
|
|
@@ -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 = 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. */
|
|
@@ -22,6 +22,8 @@ export interface ComponentImageProps extends Partial<HTMLImageElement> {
|
|
|
22
22
|
credit?: string;
|
|
23
23
|
/** Fallback image path or URL. */
|
|
24
24
|
fallbackSrc?: string;
|
|
25
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
26
|
+
id?: string;
|
|
25
27
|
/** Flag to set the internal `Image` component to `isLazy` mode. */
|
|
26
28
|
isLazy?: boolean;
|
|
27
29
|
/** Additional action to perform in the `img`'s `onerror` attribute function. */
|
|
@@ -40,6 +42,8 @@ interface ImageWrapperProps {
|
|
|
40
42
|
};
|
|
41
43
|
/** ClassName you can add in addition to 'image' */
|
|
42
44
|
className?: string;
|
|
45
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
46
|
+
id?: string;
|
|
43
47
|
/** Optional value to control the aspect ratio of the card image; default
|
|
44
48
|
* value is `"original"` */
|
|
45
49
|
ratio?: ImageRatios;
|
|
@@ -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
|
}
|
|
@@ -8,6 +8,8 @@ export type LabelPositions = typeof labelPositionsArray[number];
|
|
|
8
8
|
export interface SelectProps {
|
|
9
9
|
/** A class name for the `div` parent element. */
|
|
10
10
|
className?: string;
|
|
11
|
+
/** The initial value of an uncontrolled component */
|
|
12
|
+
defaultValue?: string;
|
|
11
13
|
/** Optional string to populate the `HelperErrorText` for the standard state. */
|
|
12
14
|
helperText?: HelperErrorTextType;
|
|
13
15
|
/** ID that other components can cross reference for accessibility purposes */
|
|
@@ -43,7 +45,7 @@ export interface SelectProps {
|
|
|
43
45
|
/** Offers the ability to show the select's label onscreen or hide it. Refer
|
|
44
46
|
* to the `labelText` property for more information. */
|
|
45
47
|
showLabel?: boolean;
|
|
46
|
-
/** Whether or not to display the "(
|
|
48
|
+
/** Whether or not to display the "(required)" text in the label text.
|
|
47
49
|
* True by default. */
|
|
48
50
|
showRequiredLabel?: boolean;
|
|
49
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. */
|
|
@@ -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. */
|
|
@@ -13,6 +13,10 @@ export interface TooltipProps {
|
|
|
13
13
|
isDisabled?: boolean;
|
|
14
14
|
/** Wraps the children of the tooltip in `ComponentWrapper` with `tabIndex=0` when true. */
|
|
15
15
|
shouldWrapChildren?: boolean;
|
|
16
|
+
/** The placement of the tooltip relative to its children. */
|
|
17
|
+
placement?: "top" | "left" | "bottom" | "right" | "auto";
|
|
18
|
+
/** The main and cross-axis offset to displace the tooltip from its reference element. */
|
|
19
|
+
offset?: [number, number];
|
|
16
20
|
}
|
|
17
21
|
export declare const Tooltip: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<TooltipProps> & React.RefAttributes<HTMLDivElement>>, React.PropsWithChildren<TooltipProps>>;
|
|
18
22
|
export default Tooltip;
|
|
@@ -5,14 +5,54 @@ declare const SearchBar: {
|
|
|
5
5
|
base: string;
|
|
6
6
|
md: string;
|
|
7
7
|
};
|
|
8
|
+
".textInput": {
|
|
9
|
+
flexGrow: number;
|
|
10
|
+
"div > input": {
|
|
11
|
+
borderRightRadius: number;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
8
14
|
flexFlow: {
|
|
9
15
|
base: string;
|
|
10
16
|
md: string;
|
|
11
17
|
};
|
|
12
|
-
".
|
|
13
|
-
|
|
18
|
+
".searchButton": {
|
|
19
|
+
minWidth: string;
|
|
20
|
+
borderLeftRadius: string;
|
|
21
|
+
lineHeight: string;
|
|
22
|
+
marginBottom: string;
|
|
23
|
+
paddingTop: {
|
|
24
|
+
base: string;
|
|
25
|
+
md: string;
|
|
26
|
+
};
|
|
27
|
+
paddingLeft: {
|
|
28
|
+
base: string;
|
|
29
|
+
md: string;
|
|
30
|
+
};
|
|
31
|
+
paddingBottom: {
|
|
32
|
+
base: string;
|
|
33
|
+
md: string;
|
|
34
|
+
};
|
|
35
|
+
paddingRight: {
|
|
36
|
+
base: string;
|
|
37
|
+
md: string;
|
|
38
|
+
};
|
|
39
|
+
gap: string;
|
|
40
|
+
borderRightRadius: string;
|
|
41
|
+
" > span": {
|
|
42
|
+
display: {
|
|
43
|
+
base: string;
|
|
44
|
+
md: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
" > svg": {
|
|
48
|
+
margin: number;
|
|
49
|
+
};
|
|
14
50
|
};
|
|
15
51
|
select: {
|
|
52
|
+
paddingBottom: {
|
|
53
|
+
base: "xs";
|
|
54
|
+
md: "unset";
|
|
55
|
+
};
|
|
16
56
|
flexShrink: string;
|
|
17
57
|
marginBottom: {
|
|
18
58
|
base: "-1px";
|