@skyscanner/backpack-web 38.11.0 → 38.12.0
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/bpk-component-button/src/BpkButton.d.ts +1 -20
- package/bpk-component-button/src/BpkButton.js +12 -24
- package/bpk-component-button/src/BpkButtonBase.d.ts +1 -12
- package/bpk-component-button/src/BpkButtonBase.js +16 -20
- package/bpk-component-button/src/common-types.d.ts +5 -16
- package/bpk-component-button/src/common-types.js +0 -11
- package/bpk-component-checkbox/src/BpkCheckbox.js +13 -25
- package/bpk-component-fieldset/src/BpkFieldset.js +13 -28
- package/bpk-component-flare/src/BpkContentBubble.js +9 -19
- package/bpk-component-flare/src/BpkFlareBar.js +6 -14
- package/bpk-component-form-validation/src/BpkFormValidation.js +8 -14
- package/bpk-component-info-banner/src/BpkInfoBannerInner.js +1 -0
- package/bpk-component-label/src/BpkLabel.js +9 -17
- package/bpk-component-link/src/BpkButtonLink.js +8 -14
- package/bpk-component-link/src/BpkLink.js +11 -20
- package/bpk-component-list/src/BpkList.js +8 -16
- package/bpk-component-list/src/BpkListItem.js +4 -8
- package/bpk-component-price/src/BpkPrice.js +13 -24
- package/bpk-component-radio/src/BpkRadio.js +10 -19
- package/bpk-component-select/src/BpkSelect.js +13 -27
- package/bpk-component-star-rating/src/BpkInteractiveStar.js +10 -14
- package/bpk-component-star-rating/src/BpkInteractiveStarRating.js +15 -26
- package/bpk-component-star-rating/src/BpkStar.js +7 -13
- package/bpk-component-star-rating/src/BpkStarRating.js +10 -19
- package/bpk-component-table/src/BpkTable.js +5 -9
- package/bpk-component-table/src/BpkTableCell.js +6 -9
- package/bpk-component-table/src/BpkTableHeadCell.js +7 -9
- package/bpk-component-textarea/src/BpkTextarea.js +6 -13
- package/package.json +1 -1
|
@@ -11,26 +11,7 @@ export type Props = CommonProps & {
|
|
|
11
11
|
linkOnDark?: boolean;
|
|
12
12
|
};
|
|
13
13
|
declare const BpkButton: {
|
|
14
|
-
(
|
|
15
|
-
defaultProps: {
|
|
16
|
-
primaryOnDark: boolean;
|
|
17
|
-
primaryOnLight: boolean;
|
|
18
|
-
secondary: boolean;
|
|
19
|
-
secondaryOnDark: boolean;
|
|
20
|
-
destructive: boolean;
|
|
21
|
-
featured: boolean;
|
|
22
|
-
link: boolean;
|
|
23
|
-
linkOnDark: boolean;
|
|
24
|
-
href: null;
|
|
25
|
-
className: null;
|
|
26
|
-
disabled: boolean;
|
|
27
|
-
onClick: null;
|
|
28
|
-
submit: boolean;
|
|
29
|
-
large: boolean;
|
|
30
|
-
iconOnly: boolean;
|
|
31
|
-
blank: boolean;
|
|
32
|
-
rel: null;
|
|
33
|
-
};
|
|
14
|
+
({ destructive, featured, link, linkOnDark, primaryOnDark, primaryOnLight, secondary, secondaryOnDark, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
34
15
|
propTypes: {
|
|
35
16
|
primaryOnDark: PropTypes.Requireable<boolean>;
|
|
36
17
|
primaryOnLight: PropTypes.Requireable<boolean>;
|
|
@@ -17,20 +17,19 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import PropTypes from 'prop-types';
|
|
19
19
|
import BpkButtonBase, { BUTTON_TYPES } from "./BpkButtonBase";
|
|
20
|
-
import { propTypes
|
|
20
|
+
import { propTypes } from "./common-types";
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
-
const BpkButton =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} = props;
|
|
22
|
+
const BpkButton = ({
|
|
23
|
+
destructive = false,
|
|
24
|
+
featured = false,
|
|
25
|
+
link = false,
|
|
26
|
+
linkOnDark = false,
|
|
27
|
+
primaryOnDark = false,
|
|
28
|
+
primaryOnLight = false,
|
|
29
|
+
secondary = false,
|
|
30
|
+
secondaryOnDark = false,
|
|
31
|
+
...rest
|
|
32
|
+
}) => {
|
|
34
33
|
if (primaryOnDark) {
|
|
35
34
|
return /*#__PURE__*/_jsx(BpkButtonBase, {
|
|
36
35
|
type: BUTTON_TYPES.primaryOnDark,
|
|
@@ -83,17 +82,6 @@ const BpkButton = props => {
|
|
|
83
82
|
...rest
|
|
84
83
|
});
|
|
85
84
|
};
|
|
86
|
-
BpkButton.defaultProps = {
|
|
87
|
-
...defaultProps,
|
|
88
|
-
primaryOnDark: false,
|
|
89
|
-
primaryOnLight: false,
|
|
90
|
-
secondary: false,
|
|
91
|
-
secondaryOnDark: false,
|
|
92
|
-
destructive: false,
|
|
93
|
-
featured: false,
|
|
94
|
-
link: false,
|
|
95
|
-
linkOnDark: false
|
|
96
|
-
};
|
|
97
85
|
BpkButton.propTypes = {
|
|
98
86
|
...propTypes,
|
|
99
87
|
primaryOnDark: PropTypes.bool,
|
|
@@ -12,7 +12,7 @@ export declare const BUTTON_TYPES: {
|
|
|
12
12
|
};
|
|
13
13
|
type ValueOf<T> = T[keyof T];
|
|
14
14
|
declare const BpkButtonBase: {
|
|
15
|
-
(
|
|
15
|
+
({ blank, children, className, disabled, href, iconOnly, large, onClick, rel: propRel, submit, type, ...rest }: Props & {
|
|
16
16
|
type?: ValueOf<typeof BUTTON_TYPES>;
|
|
17
17
|
}): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
propTypes: {
|
|
@@ -27,16 +27,5 @@ declare const BpkButtonBase: {
|
|
|
27
27
|
blank: import("prop-types").Requireable<boolean>;
|
|
28
28
|
rel: import("prop-types").Requireable<string>;
|
|
29
29
|
};
|
|
30
|
-
defaultProps: {
|
|
31
|
-
href: null;
|
|
32
|
-
className: null;
|
|
33
|
-
disabled: boolean;
|
|
34
|
-
onClick: null;
|
|
35
|
-
submit: boolean;
|
|
36
|
-
large: boolean;
|
|
37
|
-
iconOnly: boolean;
|
|
38
|
-
blank: boolean;
|
|
39
|
-
rel: null;
|
|
40
|
-
};
|
|
41
30
|
};
|
|
42
31
|
export default BpkButtonBase;
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
import { cssModules } from "../../bpk-react-utils";
|
|
19
|
-
import { propTypes
|
|
19
|
+
import { propTypes } from "./common-types";
|
|
20
20
|
import COMMON_STYLES from "./BpkButtonBase.module.css";
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
const getClassName = cssModules(COMMON_STYLES);
|
|
23
|
-
|
|
23
|
+
const noop = () => null;
|
|
24
24
|
// This is a duplicate of BpkButtonV2
|
|
25
25
|
// Better to duplicate rather than prematurely align the abstraction between Button and ButtonV2
|
|
26
26
|
export const BUTTON_TYPES = {
|
|
@@ -34,21 +34,20 @@ export const BUTTON_TYPES = {
|
|
|
34
34
|
link: 'link',
|
|
35
35
|
linkOnDark: 'link-on-dark'
|
|
36
36
|
};
|
|
37
|
-
const BpkButtonBase =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
} = props;
|
|
37
|
+
const BpkButtonBase = ({
|
|
38
|
+
blank = false,
|
|
39
|
+
children,
|
|
40
|
+
className = '',
|
|
41
|
+
disabled = false,
|
|
42
|
+
href = '',
|
|
43
|
+
iconOnly = false,
|
|
44
|
+
large = false,
|
|
45
|
+
onClick = noop,
|
|
46
|
+
rel: propRel = undefined,
|
|
47
|
+
submit = false,
|
|
48
|
+
type,
|
|
49
|
+
...rest
|
|
50
|
+
}) => {
|
|
52
51
|
const classNames = [];
|
|
53
52
|
if (type === undefined) {
|
|
54
53
|
classNames.push('bpk-button');
|
|
@@ -114,7 +113,4 @@ const BpkButtonBase = props => {
|
|
|
114
113
|
BpkButtonBase.propTypes = {
|
|
115
114
|
...propTypes
|
|
116
115
|
};
|
|
117
|
-
BpkButtonBase.defaultProps = {
|
|
118
|
-
...defaultProps
|
|
119
|
-
};
|
|
120
116
|
export default BpkButtonBase;
|
|
@@ -4,25 +4,14 @@ export type Props = {
|
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
href?: string;
|
|
6
6
|
className?: string;
|
|
7
|
-
disabled
|
|
7
|
+
disabled?: boolean;
|
|
8
8
|
onClick?: (event: SyntheticEvent) => unknown;
|
|
9
|
-
submit
|
|
10
|
-
large
|
|
11
|
-
iconOnly
|
|
12
|
-
blank
|
|
9
|
+
submit?: boolean;
|
|
10
|
+
large?: boolean;
|
|
11
|
+
iconOnly?: boolean;
|
|
12
|
+
blank?: boolean;
|
|
13
13
|
rel?: string;
|
|
14
14
|
};
|
|
15
|
-
export declare const defaultProps: {
|
|
16
|
-
href: null;
|
|
17
|
-
className: null;
|
|
18
|
-
disabled: boolean;
|
|
19
|
-
onClick: null;
|
|
20
|
-
submit: boolean;
|
|
21
|
-
large: boolean;
|
|
22
|
-
iconOnly: boolean;
|
|
23
|
-
blank: boolean;
|
|
24
|
-
rel: null;
|
|
25
|
-
};
|
|
26
15
|
export declare const propTypes: {
|
|
27
16
|
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
28
17
|
href: PropTypes.Requireable<string>;
|
|
@@ -17,17 +17,6 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import PropTypes from 'prop-types';
|
|
20
|
-
export const defaultProps = {
|
|
21
|
-
href: null,
|
|
22
|
-
className: null,
|
|
23
|
-
disabled: false,
|
|
24
|
-
onClick: null,
|
|
25
|
-
submit: false,
|
|
26
|
-
large: false,
|
|
27
|
-
iconOnly: false,
|
|
28
|
-
blank: false,
|
|
29
|
-
rel: null
|
|
30
|
-
};
|
|
31
20
|
export const propTypes = {
|
|
32
21
|
children: PropTypes.node.isRequired,
|
|
33
22
|
href: PropTypes.string,
|
|
@@ -19,21 +19,19 @@ import { cssModules } from "../../bpk-react-utils";
|
|
|
19
19
|
import STYLES from "./BpkCheckbox.module.css";
|
|
20
20
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
21
|
const getClassName = cssModules(STYLES);
|
|
22
|
-
const BpkCheckbox =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
} = props;
|
|
36
|
-
|
|
22
|
+
const BpkCheckbox = ({
|
|
23
|
+
checked = false,
|
|
24
|
+
className = null,
|
|
25
|
+
disabled = false,
|
|
26
|
+
indeterminate = false,
|
|
27
|
+
label,
|
|
28
|
+
name,
|
|
29
|
+
required = false,
|
|
30
|
+
smallLabel = false,
|
|
31
|
+
valid = null,
|
|
32
|
+
white = false,
|
|
33
|
+
...rest
|
|
34
|
+
}) => {
|
|
37
35
|
// Explicit check for false primitive value as undefined is
|
|
38
36
|
// treated as neither valid nor invalid
|
|
39
37
|
const isInvalid = valid === false;
|
|
@@ -79,14 +77,4 @@ BpkCheckbox.propTypes = {
|
|
|
79
77
|
checked: PropTypes.bool,
|
|
80
78
|
indeterminate: PropTypes.bool
|
|
81
79
|
};
|
|
82
|
-
BpkCheckbox.defaultProps = {
|
|
83
|
-
required: false,
|
|
84
|
-
disabled: false,
|
|
85
|
-
white: false,
|
|
86
|
-
className: null,
|
|
87
|
-
smallLabel: false,
|
|
88
|
-
valid: null,
|
|
89
|
-
checked: false,
|
|
90
|
-
indeterminate: false
|
|
91
|
-
};
|
|
92
80
|
export default BpkCheckbox;
|
|
@@ -22,20 +22,19 @@ import { cssModules } from "../../bpk-react-utils";
|
|
|
22
22
|
import STYLES from "./BpkFieldset.module.css";
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
const getClassName = cssModules(STYLES);
|
|
25
|
-
const BpkFieldset =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
} = props;
|
|
25
|
+
const BpkFieldset = ({
|
|
26
|
+
children,
|
|
27
|
+
className = null,
|
|
28
|
+
description = null,
|
|
29
|
+
disabled = false,
|
|
30
|
+
isCheckbox = false,
|
|
31
|
+
label = null,
|
|
32
|
+
required = false,
|
|
33
|
+
valid = null,
|
|
34
|
+
validationMessage = null,
|
|
35
|
+
validationProps = {},
|
|
36
|
+
...rest
|
|
37
|
+
}) => {
|
|
39
38
|
if (!children) {
|
|
40
39
|
return null;
|
|
41
40
|
}
|
|
@@ -133,21 +132,7 @@ export const propTypes = {
|
|
|
133
132
|
validationProps: PropTypes.object,
|
|
134
133
|
description: PropTypes.string
|
|
135
134
|
};
|
|
136
|
-
export const defaultProps = {
|
|
137
|
-
label: null,
|
|
138
|
-
disabled: false,
|
|
139
|
-
valid: null,
|
|
140
|
-
required: false,
|
|
141
|
-
className: null,
|
|
142
|
-
validationMessage: null,
|
|
143
|
-
isCheckbox: false,
|
|
144
|
-
validationProps: {},
|
|
145
|
-
description: null
|
|
146
|
-
};
|
|
147
135
|
BpkFieldset.propTypes = {
|
|
148
136
|
...propTypes
|
|
149
137
|
};
|
|
150
|
-
BpkFieldset.defaultProps = {
|
|
151
|
-
...defaultProps
|
|
152
|
-
};
|
|
153
138
|
export default BpkFieldset;
|
|
@@ -23,16 +23,15 @@ import CornerRadius from "./__generated__/js/corner-radius";
|
|
|
23
23
|
import STYLES from "./bpk-content-bubble.module.css";
|
|
24
24
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
25
|
const getClassName = cssModules(STYLES);
|
|
26
|
-
const BpkContentBubble =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
} = props;
|
|
26
|
+
const BpkContentBubble = ({
|
|
27
|
+
className = null,
|
|
28
|
+
content = null,
|
|
29
|
+
contentClassName = null,
|
|
30
|
+
flareProps = null,
|
|
31
|
+
rounded = true,
|
|
32
|
+
showPointer = true,
|
|
33
|
+
...rest
|
|
34
|
+
}) => {
|
|
36
35
|
const wrapperClassNames = [getClassName('bpk-content-bubble__wrapper')];
|
|
37
36
|
const contentClassNames = [getClassName('bpk-content-bubble__content-wrapper')];
|
|
38
37
|
if (showPointer) {
|
|
@@ -73,7 +72,6 @@ const BpkContentBubble = props => {
|
|
|
73
72
|
}), showPointer && /*#__PURE__*/_jsx("div", {
|
|
74
73
|
className: getClassName('bpk-content-bubble__pointer'),
|
|
75
74
|
children: /*#__PURE__*/_jsx(BpkFlareBar, {
|
|
76
|
-
rounded: rounded,
|
|
77
75
|
...flareProps
|
|
78
76
|
})
|
|
79
77
|
})]
|
|
@@ -89,12 +87,4 @@ BpkContentBubble.propTypes = {
|
|
|
89
87
|
className: PropTypes.string,
|
|
90
88
|
contentClassName: PropTypes.string
|
|
91
89
|
};
|
|
92
|
-
BpkContentBubble.defaultProps = {
|
|
93
|
-
flareProps: null,
|
|
94
|
-
rounded: true,
|
|
95
|
-
content: null,
|
|
96
|
-
showPointer: true,
|
|
97
|
-
className: null,
|
|
98
|
-
contentClassName: null
|
|
99
|
-
};
|
|
100
90
|
export default BpkContentBubble;
|
|
@@ -22,13 +22,11 @@ import Pointer from "./__generated__/js/pointer";
|
|
|
22
22
|
import STYLES from "./bpk-flare-bar.module.css";
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
const getClassName = cssModules(STYLES);
|
|
25
|
-
const BpkFlareBar =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
...rest
|
|
31
|
-
} = props;
|
|
25
|
+
const BpkFlareBar = ({
|
|
26
|
+
className = null,
|
|
27
|
+
svgClassName = null,
|
|
28
|
+
...rest
|
|
29
|
+
}) => {
|
|
32
30
|
const classNames = [getClassName('bpk-flare-bar__container')];
|
|
33
31
|
if (className) {
|
|
34
32
|
classNames.push(className);
|
|
@@ -47,12 +45,6 @@ const BpkFlareBar = props => {
|
|
|
47
45
|
};
|
|
48
46
|
BpkFlareBar.propTypes = {
|
|
49
47
|
className: PropTypes.string,
|
|
50
|
-
svgClassName: PropTypes.string
|
|
51
|
-
rounded: PropTypes.bool
|
|
52
|
-
};
|
|
53
|
-
BpkFlareBar.defaultProps = {
|
|
54
|
-
className: null,
|
|
55
|
-
svgClassName: null,
|
|
56
|
-
rounded: false
|
|
48
|
+
svgClassName: PropTypes.string
|
|
57
49
|
};
|
|
58
50
|
export default BpkFlareBar;
|
|
@@ -26,15 +26,14 @@ import STYLES from "./BpkFormValidation.module.css";
|
|
|
26
26
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
27
|
const getClassName = cssModules(STYLES);
|
|
28
28
|
const AlignedExclamationIcon = withAlignment(BpkSmallExclamationIcon, lineHeightSm, iconSizeSm);
|
|
29
|
-
const BpkFormValidation =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
} = props;
|
|
29
|
+
const BpkFormValidation = ({
|
|
30
|
+
children,
|
|
31
|
+
className = null,
|
|
32
|
+
containerProps = {},
|
|
33
|
+
expanded,
|
|
34
|
+
isCheckbox = false,
|
|
35
|
+
...rest
|
|
36
|
+
}) => {
|
|
38
37
|
const classNames = getClassName('bpk-form-validation', expanded && 'bpk-form-validation--appear', isCheckbox && 'bpk-form-validation--is-checkbox', className);
|
|
39
38
|
return /*#__PURE__*/_jsx(AnimateHeight, {
|
|
40
39
|
duration: 200,
|
|
@@ -62,9 +61,4 @@ BpkFormValidation.propTypes = {
|
|
|
62
61
|
className: PropTypes.string,
|
|
63
62
|
containerProps: PropTypes.object // eslint-disable-line react/forbid-prop-types
|
|
64
63
|
};
|
|
65
|
-
BpkFormValidation.defaultProps = {
|
|
66
|
-
isCheckbox: false,
|
|
67
|
-
className: null,
|
|
68
|
-
containerProps: {}
|
|
69
|
-
};
|
|
70
64
|
export default BpkFormValidation;
|
|
@@ -19,16 +19,15 @@ import { cssModules } from "../../bpk-react-utils";
|
|
|
19
19
|
import STYLES from "./BpkLabel.module.css";
|
|
20
20
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
21
|
const getClassName = cssModules(STYLES);
|
|
22
|
-
const BpkLabel =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} = props;
|
|
22
|
+
const BpkLabel = ({
|
|
23
|
+
children,
|
|
24
|
+
className = null,
|
|
25
|
+
disabled = false,
|
|
26
|
+
required = false,
|
|
27
|
+
valid = null,
|
|
28
|
+
white = false,
|
|
29
|
+
...rest
|
|
30
|
+
}) => {
|
|
32
31
|
const invalid = valid === false;
|
|
33
32
|
const classNames = getClassName('bpk-label', white && 'bpk-label--white', invalid && 'bpk-label--invalid', disabled && 'bpk-label--disabled', white && disabled && 'bpk-label--disabled--white', className);
|
|
34
33
|
return (
|
|
@@ -52,11 +51,4 @@ BpkLabel.propTypes = {
|
|
|
52
51
|
required: PropTypes.bool,
|
|
53
52
|
white: PropTypes.bool
|
|
54
53
|
};
|
|
55
|
-
BpkLabel.defaultProps = {
|
|
56
|
-
className: null,
|
|
57
|
-
disabled: false,
|
|
58
|
-
valid: null,
|
|
59
|
-
required: false,
|
|
60
|
-
white: false
|
|
61
|
-
};
|
|
62
54
|
export default BpkLabel;
|
|
@@ -20,15 +20,14 @@ import themeAttributes from "./themeAttributes";
|
|
|
20
20
|
import STYLES from "./BpkLink.module.css";
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
const getClassName = cssModules(STYLES);
|
|
23
|
-
const BpkButtonLink =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} = props;
|
|
23
|
+
const BpkButtonLink = ({
|
|
24
|
+
alternate = false,
|
|
25
|
+
children,
|
|
26
|
+
className = null,
|
|
27
|
+
implicit = false,
|
|
28
|
+
onClick,
|
|
29
|
+
...rest
|
|
30
|
+
}) => {
|
|
32
31
|
const classNames = [getClassName('bpk-link')];
|
|
33
32
|
const underlinedClassNames = [getClassName('bpk-link-underlined')];
|
|
34
33
|
if (className) {
|
|
@@ -69,10 +68,5 @@ BpkButtonLink.propTypes = {
|
|
|
69
68
|
alternate: PropTypes.bool,
|
|
70
69
|
implicit: PropTypes.bool
|
|
71
70
|
};
|
|
72
|
-
BpkButtonLink.defaultProps = {
|
|
73
|
-
className: null,
|
|
74
|
-
alternate: false,
|
|
75
|
-
implicit: false
|
|
76
|
-
};
|
|
77
71
|
export { themeAttributes };
|
|
78
72
|
export default BpkButtonLink;
|
|
@@ -21,18 +21,17 @@ import themeAttributes, { linkAlternateThemeAttributes } from "./themeAttributes
|
|
|
21
21
|
import STYLES from "./BpkLink.module.css";
|
|
22
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
23
|
const getClassName = cssModules(STYLES);
|
|
24
|
-
const BpkLink = /*#__PURE__*/forwardRef((
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
} = props;
|
|
24
|
+
const BpkLink = /*#__PURE__*/forwardRef(({
|
|
25
|
+
alternate = false,
|
|
26
|
+
blank = false,
|
|
27
|
+
children,
|
|
28
|
+
className = null,
|
|
29
|
+
href,
|
|
30
|
+
implicit = false,
|
|
31
|
+
onClick = null,
|
|
32
|
+
rel: propRel = null,
|
|
33
|
+
...rest
|
|
34
|
+
}, ref) => {
|
|
36
35
|
const classNames = [getClassName('bpk-link')];
|
|
37
36
|
const underlinedClassNames = [getClassName('bpk-link-underlined')];
|
|
38
37
|
const target = blank ? '_blank' : null;
|
|
@@ -81,13 +80,5 @@ BpkLink.propTypes = {
|
|
|
81
80
|
alternate: PropTypes.bool,
|
|
82
81
|
implicit: PropTypes.bool
|
|
83
82
|
};
|
|
84
|
-
BpkLink.defaultProps = {
|
|
85
|
-
className: null,
|
|
86
|
-
onClick: null,
|
|
87
|
-
blank: false,
|
|
88
|
-
rel: null,
|
|
89
|
-
alternate: false,
|
|
90
|
-
implicit: false
|
|
91
|
-
};
|
|
92
83
|
export default BpkLink;
|
|
93
84
|
export { themeAttributes, linkAlternateThemeAttributes };
|
|
@@ -19,15 +19,14 @@ import { cssModules } from "../../bpk-react-utils";
|
|
|
19
19
|
import STYLES from "./BpkList.module.css";
|
|
20
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
21
|
const getClassName = cssModules(STYLES);
|
|
22
|
-
const BpkList =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
} = props;
|
|
22
|
+
const BpkList = ({
|
|
23
|
+
ariaLabel = null,
|
|
24
|
+
ariaLabelledby = null,
|
|
25
|
+
children,
|
|
26
|
+
className = null,
|
|
27
|
+
ordered = false,
|
|
28
|
+
title = null
|
|
29
|
+
}) => {
|
|
31
30
|
const ListElements = ordered ? 'ol' : 'ul';
|
|
32
31
|
const classNames = getClassName('bpk-list', className);
|
|
33
32
|
return /*#__PURE__*/_jsx(ListElements, {
|
|
@@ -46,11 +45,4 @@ BpkList.propTypes = {
|
|
|
46
45
|
ariaLabelledby: PropTypes.string,
|
|
47
46
|
title: PropTypes.string
|
|
48
47
|
};
|
|
49
|
-
BpkList.defaultProps = {
|
|
50
|
-
ordered: false,
|
|
51
|
-
className: null,
|
|
52
|
-
ariaLabel: null,
|
|
53
|
-
ariaLabelledby: null,
|
|
54
|
-
title: null
|
|
55
|
-
};
|
|
56
48
|
export default BpkList;
|
|
@@ -19,11 +19,10 @@ import { cssModules } from "../../bpk-react-utils";
|
|
|
19
19
|
import STYLES from "./BpkList.module.css";
|
|
20
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
21
|
const getClassName = cssModules(STYLES);
|
|
22
|
-
const BpkListItem =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
} = props;
|
|
22
|
+
const BpkListItem = ({
|
|
23
|
+
children,
|
|
24
|
+
className = null
|
|
25
|
+
}) => {
|
|
27
26
|
const classNames = getClassName('bpk-list__item', className);
|
|
28
27
|
return /*#__PURE__*/_jsx("li", {
|
|
29
28
|
className: classNames,
|
|
@@ -34,7 +33,4 @@ BpkListItem.propTypes = {
|
|
|
34
33
|
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,
|
|
35
34
|
className: PropTypes.string
|
|
36
35
|
};
|
|
37
|
-
BpkListItem.defaultProps = {
|
|
38
|
-
className: null
|
|
39
|
-
};
|
|
40
36
|
export default BpkListItem;
|
|
@@ -36,20 +36,19 @@ const getDefaultTextStyle = size => {
|
|
|
36
36
|
}
|
|
37
37
|
return TEXT_STYLES.xs;
|
|
38
38
|
};
|
|
39
|
-
const BpkPrice =
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
} = props;
|
|
39
|
+
const BpkPrice = ({
|
|
40
|
+
align = ALIGNS.left,
|
|
41
|
+
className = null,
|
|
42
|
+
dataAttributes = {},
|
|
43
|
+
icon,
|
|
44
|
+
leadingClassName = null,
|
|
45
|
+
leadingText = null,
|
|
46
|
+
previousPrice = null,
|
|
47
|
+
price,
|
|
48
|
+
size = SIZES.small,
|
|
49
|
+
trailingText = null,
|
|
50
|
+
...rest
|
|
51
|
+
}) => {
|
|
53
52
|
const defaultTextStyle = getDefaultTextStyle(size);
|
|
54
53
|
const priceTextStyle = getPriceTextStyle(size);
|
|
55
54
|
const isAlignRight = align === ALIGNS.right;
|
|
@@ -129,14 +128,4 @@ BpkPrice.propTypes = {
|
|
|
129
128
|
leadingClassName: PropTypes.string,
|
|
130
129
|
dataAttributes: PropTypes.objectOf(PropTypes.string)
|
|
131
130
|
};
|
|
132
|
-
BpkPrice.defaultProps = {
|
|
133
|
-
size: SIZES.small,
|
|
134
|
-
align: ALIGNS.left,
|
|
135
|
-
className: null,
|
|
136
|
-
leadingText: null,
|
|
137
|
-
trailingText: null,
|
|
138
|
-
previousPrice: null,
|
|
139
|
-
leadingClassName: null,
|
|
140
|
-
dataAttributes: {}
|
|
141
|
-
};
|
|
142
131
|
export default BpkPrice;
|
|
@@ -19,18 +19,16 @@ import { cssModules } from "../../bpk-react-utils";
|
|
|
19
19
|
import STYLES from "./BpkRadio.module.css";
|
|
20
20
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
21
|
const getClassName = cssModules(STYLES);
|
|
22
|
-
const BpkRadio =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} = props;
|
|
33
|
-
|
|
22
|
+
const BpkRadio = ({
|
|
23
|
+
ariaLabel = null,
|
|
24
|
+
className = null,
|
|
25
|
+
disabled = false,
|
|
26
|
+
label,
|
|
27
|
+
name,
|
|
28
|
+
valid = null,
|
|
29
|
+
white = false,
|
|
30
|
+
...rest
|
|
31
|
+
}) => {
|
|
34
32
|
// Explicit check for false primitive value as undefined is
|
|
35
33
|
// treated as neither valid nor invalid
|
|
36
34
|
const isInvalid = valid === false;
|
|
@@ -62,11 +60,4 @@ BpkRadio.propTypes = {
|
|
|
62
60
|
className: PropTypes.string,
|
|
63
61
|
valid: PropTypes.bool
|
|
64
62
|
};
|
|
65
|
-
BpkRadio.defaultProps = {
|
|
66
|
-
ariaLabel: null,
|
|
67
|
-
disabled: false,
|
|
68
|
-
white: false,
|
|
69
|
-
className: null,
|
|
70
|
-
valid: null
|
|
71
|
-
};
|
|
72
63
|
export default BpkRadio;
|
|
@@ -20,21 +20,19 @@ import { cssModules } from "../../bpk-react-utils";
|
|
|
20
20
|
import STYLES from "./BpkSelect.module.css";
|
|
21
21
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
22
|
const getClassName = cssModules(STYLES);
|
|
23
|
-
const BpkSelect =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
} = props;
|
|
37
|
-
|
|
23
|
+
const BpkSelect = ({
|
|
24
|
+
className = null,
|
|
25
|
+
disabled = false,
|
|
26
|
+
docked = false,
|
|
27
|
+
dockedFirst = false,
|
|
28
|
+
dockedLast = false,
|
|
29
|
+
dockedMiddle = false,
|
|
30
|
+
image = null,
|
|
31
|
+
large = false,
|
|
32
|
+
valid = null,
|
|
33
|
+
wrapperClassName = null,
|
|
34
|
+
...rest
|
|
35
|
+
}) => {
|
|
38
36
|
// Explicit check for false primitive value as undefined is
|
|
39
37
|
// treated as neither valid nor invalid
|
|
40
38
|
const isInvalid = valid === false;
|
|
@@ -81,16 +79,4 @@ BpkSelect.propTypes = {
|
|
|
81
79
|
valid: PropTypes.bool,
|
|
82
80
|
wrapperClassName: PropTypes.string
|
|
83
81
|
};
|
|
84
|
-
BpkSelect.defaultProps = {
|
|
85
|
-
className: null,
|
|
86
|
-
docked: false,
|
|
87
|
-
dockedFirst: false,
|
|
88
|
-
dockedLast: false,
|
|
89
|
-
dockedMiddle: false,
|
|
90
|
-
disabled: false,
|
|
91
|
-
image: null,
|
|
92
|
-
large: false,
|
|
93
|
-
valid: null,
|
|
94
|
-
wrapperClassName: null
|
|
95
|
-
};
|
|
96
82
|
export default BpkSelect;
|
|
@@ -20,17 +20,16 @@ import { BpkStarNonRtl, STAR_TYPES } from "./BpkStar";
|
|
|
20
20
|
import STYLES from "./BpkInteractiveStar.module.css";
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
const getClassName = cssModules(STYLES);
|
|
23
|
-
const BpkInteractiveStar =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} = props;
|
|
23
|
+
const BpkInteractiveStar = ({
|
|
24
|
+
label,
|
|
25
|
+
name,
|
|
26
|
+
onClick,
|
|
27
|
+
onMouseEnter,
|
|
28
|
+
selected = false,
|
|
29
|
+
type,
|
|
30
|
+
value,
|
|
31
|
+
...rest
|
|
32
|
+
}) => {
|
|
34
33
|
const buttonClassNames = getClassName('bpk-interactive-star', selected && 'bpk-interactive-star--selected');
|
|
35
34
|
const iconClassNames = getClassName('bpk-interactive-star__icon', selected && 'bpk-interactive-star__icon--selected');
|
|
36
35
|
|
|
@@ -63,7 +62,4 @@ BpkInteractiveStar.propTypes = {
|
|
|
63
62
|
value: PropTypes.number.isRequired,
|
|
64
63
|
selected: PropTypes.bool
|
|
65
64
|
};
|
|
66
|
-
BpkInteractiveStar.defaultProps = {
|
|
67
|
-
selected: false
|
|
68
|
-
};
|
|
69
65
|
export default BpkInteractiveStar;
|
|
@@ -21,27 +21,27 @@ import { STAR_TYPES } from "./BpkStar";
|
|
|
21
21
|
import STYLES from "./BpkStarRating.module.css";
|
|
22
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
23
|
const getClassName = cssModules(STYLES);
|
|
24
|
+
const noop = () => null;
|
|
24
25
|
export const getTypeByRating = (starNumber, rating) => {
|
|
25
26
|
if (starNumber > rating) {
|
|
26
27
|
return STAR_TYPES.EMPTY;
|
|
27
28
|
}
|
|
28
29
|
return STAR_TYPES.FULL;
|
|
29
30
|
};
|
|
30
|
-
const BpkInteractiveStarRating =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
} = props;
|
|
31
|
+
const BpkInteractiveStarRating = ({
|
|
32
|
+
className = null,
|
|
33
|
+
extraLarge = false,
|
|
34
|
+
getStarLabel,
|
|
35
|
+
hoverRating = 0,
|
|
36
|
+
id,
|
|
37
|
+
large = false,
|
|
38
|
+
maxRating = 5,
|
|
39
|
+
onMouseLeave = noop,
|
|
40
|
+
onRatingHover = noop,
|
|
41
|
+
onRatingSelect = noop,
|
|
42
|
+
rating = 0,
|
|
43
|
+
...rest
|
|
44
|
+
}) => {
|
|
45
45
|
const stars = [];
|
|
46
46
|
const classNames = [getClassName('bpk-star-rating')];
|
|
47
47
|
const displayRating = hoverRating || rating;
|
|
@@ -83,15 +83,4 @@ BpkInteractiveStarRating.propTypes = {
|
|
|
83
83
|
onRatingSelect: PropTypes.func,
|
|
84
84
|
rating: PropTypes.number
|
|
85
85
|
};
|
|
86
|
-
BpkInteractiveStarRating.defaultProps = {
|
|
87
|
-
className: null,
|
|
88
|
-
hoverRating: 0,
|
|
89
|
-
large: false,
|
|
90
|
-
extraLarge: false,
|
|
91
|
-
maxRating: 5,
|
|
92
|
-
onMouseLeave: () => null,
|
|
93
|
-
onRatingHover: () => null,
|
|
94
|
-
onRatingSelect: () => null,
|
|
95
|
-
rating: 0
|
|
96
|
-
};
|
|
97
86
|
export default BpkInteractiveStarRating;
|
|
@@ -36,14 +36,13 @@ export const STAR_TYPES = {
|
|
|
36
36
|
HALF: 'half',
|
|
37
37
|
FULL: 'full'
|
|
38
38
|
};
|
|
39
|
-
const BpkStar =
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
} = props;
|
|
39
|
+
const BpkStar = ({
|
|
40
|
+
className = null,
|
|
41
|
+
extraLarge = false,
|
|
42
|
+
large = false,
|
|
43
|
+
type,
|
|
44
|
+
...rest
|
|
45
|
+
}) => {
|
|
47
46
|
const iconClassNames = getClassName('bpk-star', large && 'bpk-star--large', extraLarge && 'bpk-star--extra-large', type === STAR_TYPES.FULL && 'bpk-star--filled', className);
|
|
48
47
|
const containerClassNames = getClassName('bpk-star__container', 'bpk-star__container--half-star', large && 'bpk-star__container--large', extraLarge && 'bpk-star__container--extra-large', className);
|
|
49
48
|
const halfIconClassNames = getClassName('bpk-star', 'bpk-star--half', 'bpk-star--filled');
|
|
@@ -93,10 +92,5 @@ BpkStar.propTypes = {
|
|
|
93
92
|
large: PropTypes.bool,
|
|
94
93
|
extraLarge: PropTypes.bool
|
|
95
94
|
};
|
|
96
|
-
BpkStar.defaultProps = {
|
|
97
|
-
className: null,
|
|
98
|
-
large: false,
|
|
99
|
-
extraLarge: false
|
|
100
|
-
};
|
|
101
95
|
export const BpkStarNonRtl = BpkStar;
|
|
102
96
|
export default withRtlSupport(BpkStar);
|
|
@@ -35,17 +35,16 @@ export const ROUNDING_TYPES = {
|
|
|
35
35
|
up: n => Math.ceil(n * 2) / 2,
|
|
36
36
|
nearest: n => Math.round(n * 2) / 2
|
|
37
37
|
};
|
|
38
|
-
const BpkStarRating =
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
} = props;
|
|
38
|
+
const BpkStarRating = ({
|
|
39
|
+
className = null,
|
|
40
|
+
extraLarge = false,
|
|
41
|
+
large = false,
|
|
42
|
+
maxRating = 5,
|
|
43
|
+
rating = 0,
|
|
44
|
+
ratingLabel,
|
|
45
|
+
rounding = ROUNDING_TYPES.down,
|
|
46
|
+
...rest
|
|
47
|
+
}) => {
|
|
49
48
|
const stars = [];
|
|
50
49
|
const classNames = [getClassName('bpk-star-rating')];
|
|
51
50
|
const currentRating = rating > maxRating ? maxRating : rating;
|
|
@@ -78,12 +77,4 @@ BpkStarRating.propTypes = {
|
|
|
78
77
|
rating: PropTypes.number,
|
|
79
78
|
rounding: PropTypes.oneOf([ROUNDING_TYPES.down, ROUNDING_TYPES.up, ROUNDING_TYPES.nearest])
|
|
80
79
|
};
|
|
81
|
-
BpkStarRating.defaultProps = {
|
|
82
|
-
className: null,
|
|
83
|
-
large: false,
|
|
84
|
-
extraLarge: false,
|
|
85
|
-
maxRating: 5,
|
|
86
|
-
rating: 0,
|
|
87
|
-
rounding: ROUNDING_TYPES.down
|
|
88
|
-
};
|
|
89
80
|
export default BpkStarRating;
|
|
@@ -19,12 +19,11 @@ import { cssModules } from "../../bpk-react-utils";
|
|
|
19
19
|
import STYLES from "./BpkTable.module.css";
|
|
20
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
21
|
const getClassName = cssModules(STYLES);
|
|
22
|
-
const BpkTable =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} = props;
|
|
22
|
+
const BpkTable = ({
|
|
23
|
+
children,
|
|
24
|
+
className = null,
|
|
25
|
+
...rest
|
|
26
|
+
}) => {
|
|
28
27
|
const classNames = getClassName('bpk-table', className);
|
|
29
28
|
return (
|
|
30
29
|
/*#__PURE__*/
|
|
@@ -40,7 +39,4 @@ BpkTable.propTypes = {
|
|
|
40
39
|
children: PropTypes.node.isRequired,
|
|
41
40
|
className: PropTypes.string
|
|
42
41
|
};
|
|
43
|
-
BpkTable.defaultProps = {
|
|
44
|
-
className: null
|
|
45
|
-
};
|
|
46
42
|
export default BpkTable;
|
|
@@ -19,11 +19,11 @@ import { cssModules } from "../../bpk-react-utils";
|
|
|
19
19
|
import STYLES from "./BpkTable.module.css";
|
|
20
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
21
|
const getClassName = cssModules(STYLES);
|
|
22
|
-
const BpkTableCell =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
const BpkTableCell = ({
|
|
23
|
+
children,
|
|
24
|
+
className = null,
|
|
25
|
+
...rest
|
|
26
|
+
}) => {
|
|
27
27
|
const classNames = getClassName('bpk-table__cell', className);
|
|
28
28
|
return (
|
|
29
29
|
/*#__PURE__*/
|
|
@@ -31,7 +31,7 @@ const BpkTableCell = props => {
|
|
|
31
31
|
_jsx("td", {
|
|
32
32
|
className: classNames,
|
|
33
33
|
...rest,
|
|
34
|
-
children:
|
|
34
|
+
children: children
|
|
35
35
|
})
|
|
36
36
|
);
|
|
37
37
|
};
|
|
@@ -39,7 +39,4 @@ BpkTableCell.propTypes = {
|
|
|
39
39
|
className: PropTypes.string,
|
|
40
40
|
children: PropTypes.node.isRequired
|
|
41
41
|
};
|
|
42
|
-
BpkTableCell.defaultProps = {
|
|
43
|
-
className: null
|
|
44
|
-
};
|
|
45
42
|
export default BpkTableCell;
|
|
@@ -19,22 +19,20 @@ import { cssModules } from "../../bpk-react-utils";
|
|
|
19
19
|
import STYLES from "./BpkTable.module.css";
|
|
20
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
21
|
const getClassName = cssModules(STYLES);
|
|
22
|
-
const BpkTableHeadCell =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
const BpkTableHeadCell = ({
|
|
23
|
+
children,
|
|
24
|
+
className = null,
|
|
25
|
+
...rest
|
|
26
|
+
}) => {
|
|
27
27
|
const classNames = getClassName('bpk-table__cell', 'bpk-table__cell--head', className);
|
|
28
28
|
return /*#__PURE__*/_jsx("th", {
|
|
29
|
+
className: classNames,
|
|
29
30
|
...rest,
|
|
30
|
-
|
|
31
|
+
children: children
|
|
31
32
|
});
|
|
32
33
|
};
|
|
33
34
|
BpkTableHeadCell.propTypes = {
|
|
34
35
|
children: PropTypes.node.isRequired,
|
|
35
36
|
className: PropTypes.string
|
|
36
37
|
};
|
|
37
|
-
BpkTableHeadCell.defaultProps = {
|
|
38
|
-
className: null
|
|
39
|
-
};
|
|
40
38
|
export default BpkTableHeadCell;
|
|
@@ -19,14 +19,12 @@ import { cssModules } from "../../bpk-react-utils";
|
|
|
19
19
|
import STYLES from "./BpkTextarea.module.css";
|
|
20
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
21
|
const getClassName = cssModules(STYLES);
|
|
22
|
-
const BpkTextarea =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} = props;
|
|
29
|
-
|
|
22
|
+
const BpkTextarea = ({
|
|
23
|
+
className = null,
|
|
24
|
+
large = false,
|
|
25
|
+
valid = null,
|
|
26
|
+
...rest
|
|
27
|
+
}) => {
|
|
30
28
|
// Explicit check for false primitive value as undefined is
|
|
31
29
|
// treated as neither valid nor invalid
|
|
32
30
|
const isInvalid = valid === false;
|
|
@@ -48,9 +46,4 @@ BpkTextarea.propTypes = {
|
|
|
48
46
|
valid: PropTypes.bool,
|
|
49
47
|
large: PropTypes.bool
|
|
50
48
|
};
|
|
51
|
-
BpkTextarea.defaultProps = {
|
|
52
|
-
className: null,
|
|
53
|
-
valid: null,
|
|
54
|
-
large: false
|
|
55
|
-
};
|
|
56
49
|
export default BpkTextarea;
|