@skyscanner/backpack-web 41.8.0 → 41.10.0-beta-v1
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-badge/src/BpkBadge.js +2 -1
- package/bpk-component-banner-alert/src/BpkBannerAlert.js +2 -0
- package/bpk-component-banner-alert/src/BpkBannerAlertDismissable.js +2 -0
- package/bpk-component-banner-alert/src/BpkBannerAlertExpandable.js +2 -0
- package/bpk-component-blockquote/src/BpkBlockquote.js +2 -1
- package/bpk-component-boilerplate/src/BpkBoilerplate.js +2 -1
- package/bpk-component-bottom-sheet/src/BpkBottomSheet.js +2 -1
- package/bpk-component-breadcrumb/src/BpkBreadcrumb.js +2 -1
- package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.js +2 -1
- package/bpk-component-button/src/BpkButtonV2/BpkButton.js +3 -1
- package/bpk-component-card/src/BpkCard.js +4 -1
- package/bpk-component-card/src/BpkCardWrapper.js +2 -1
- package/bpk-component-card/src/BpkDividedCard.js +2 -1
- package/bpk-component-card-button/src/BpkSaveButton.js +2 -1
- package/bpk-component-card-list/src/BpkCardList.js +2 -1
- package/bpk-component-card-list/src/BpkCardListGridStack/BpkCardListGridStack.js +2 -1
- package/bpk-component-card-list/src/BpkCardListRowRail/BpkCardListCarousel.js +13 -8
- package/bpk-component-card-list/src/BpkCardListRowRail/BpkCardListCarousel.module.css +1 -1
- package/bpk-component-card-list/src/BpkCardListRowRail/BpkCardListRowRailContainer.js +2 -1
- package/bpk-component-carousel/src/BpkCarousel.js +2 -1
- package/bpk-component-carousel/src/BpkCarouselContainer.js +3 -1
- package/bpk-component-carousel/src/BpkCarouselImage.js +2 -1
- package/bpk-component-checkbox/src/BpkCheckbox.js +2 -1
- package/bpk-component-close-button/src/BpkCloseButton.js +2 -1
- package/bpk-component-code/src/BpkCode.js +2 -1
- package/bpk-component-code/src/BpkCodeBlock.js +2 -1
- package/bpk-component-content-cards/src/BpkContentCard.js +2 -1
- package/bpk-component-content-cards/src/BpkContentCards.js +2 -1
- package/bpk-component-datatable/src/BpkDataTable.js +2 -1
- package/bpk-component-datatable/src/BpkDataTableHeader.js +2 -1
- package/bpk-component-datepicker/src/BpkDatepicker.js +2 -1
- package/bpk-component-description-list/src/BpkDescriptionDetails.js +2 -1
- package/bpk-component-description-list/src/BpkDescriptionList.js +2 -1
- package/bpk-component-description-list/src/BpkDescriptionTerm.js +2 -1
- package/bpk-component-dialog/src/BpkDialog.js +2 -1
- package/bpk-component-drawer/src/BpkDrawer.js +2 -1
- package/bpk-component-fieldset/src/BpkFieldset.js +2 -1
- package/bpk-component-floating-notification/src/BpkFloatingNotification.js +2 -1
- package/bpk-component-graphic-promotion/src/BpkGraphicPromo.js +2 -1
- package/bpk-component-image/src/BpkBackgroundImage.js +2 -1
- package/bpk-component-image/src/BpkImage.js +2 -1
- package/bpk-component-info-banner/src/BpkInfoBanner.js +2 -0
- package/bpk-component-info-banner/src/BpkInfoBannerDismissable.js +2 -0
- package/bpk-component-info-banner/src/BpkInfoBannerExpandable.js +2 -0
- package/bpk-component-input/src/BpkInput.js +2 -1
- package/bpk-component-inset-banner/src/BpkInsetBanner.js +2 -1
- package/bpk-component-inset-banner/src/BpkInsetBannerV2/BpkInsetBannerSponsored.js +2 -1
- package/bpk-component-journey-arrow/src/BpkJourneyArrow.js +2 -1
- package/bpk-component-label/src/BpkLabel.js +2 -1
- package/bpk-component-layout/index.d.ts +18 -0
- package/bpk-component-layout/index.js +29 -0
- package/bpk-component-layout/src/BpkBox.d.ts +3 -0
- package/bpk-component-layout/src/BpkBox.js +33 -0
- package/bpk-component-layout/src/BpkFlex.d.ts +3 -0
- package/bpk-component-layout/src/BpkFlex.js +51 -0
- package/bpk-component-layout/src/BpkGrid.d.ts +3 -0
- package/bpk-component-layout/src/BpkGrid.js +57 -0
- package/bpk-component-layout/src/BpkGridItem.d.ts +3 -0
- package/bpk-component-layout/src/BpkGridItem.js +45 -0
- package/bpk-component-layout/src/BpkProvider.d.ts +14 -0
- package/bpk-component-layout/src/BpkProvider.js +42 -0
- package/bpk-component-layout/src/BpkStack.constant.d.ts +2 -0
- package/bpk-component-layout/src/BpkStack.constant.js +22 -0
- package/bpk-component-layout/src/BpkStack.d.ts +5 -0
- package/bpk-component-layout/src/BpkStack.js +57 -0
- package/bpk-component-layout/src/BpkVessel.d.ts +46 -0
- package/bpk-component-layout/src/BpkVessel.js +70 -0
- package/bpk-component-layout/src/commonProps.d.ts +86 -0
- package/bpk-component-layout/src/commonProps.js +1 -0
- package/bpk-component-layout/src/theme.d.ts +36 -0
- package/bpk-component-layout/src/theme.js +229 -0
- package/bpk-component-layout/src/tokenUtils.d.ts +108 -0
- package/bpk-component-layout/src/tokenUtils.js +323 -0
- package/bpk-component-layout/src/tokens.d.ts +96 -0
- package/bpk-component-layout/src/tokens.js +138 -0
- package/bpk-component-layout/src/types.d.ts +236 -0
- package/bpk-component-layout/src/types.js +1 -0
- package/bpk-component-link/src/BpkButtonLink.js +2 -1
- package/bpk-component-link/src/BpkLink.js +2 -1
- package/bpk-component-list/index.d.ts +5 -0
- package/bpk-component-list/index.js +3 -1
- package/bpk-component-list/src/BpkList.d.ts +11 -0
- package/bpk-component-list/src/BpkList.js +10 -15
- package/bpk-component-list/src/BpkListItem.d.ts +7 -0
- package/bpk-component-list/src/BpkListItem.js +2 -5
- package/bpk-component-loading-button/src/BpkLoadingButton.js +2 -1
- package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.js +2 -1
- package/bpk-component-modal/src/BpkModal.js +2 -1
- package/bpk-component-modal/src/BpkModalV2/BpkModal.js +2 -1
- package/bpk-component-navigation-bar/src/BpkNavigationBar.js +2 -1
- package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.js +2 -0
- package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.js +2 -0
- package/bpk-component-navigation-tab-group/src/BpkNavigationTabGroup.js +2 -1
- package/bpk-component-nudger/src/BpkNudger.js +2 -1
- package/bpk-component-overlay/src/BpkOverlay.js +2 -1
- package/bpk-component-page-indicator/src/BpkPageIndicator.js +2 -1
- package/bpk-component-panel/src/BpkPanel.js +2 -1
- package/bpk-component-popover/src/BpkPopover.js +2 -1
- package/bpk-component-price-range/index.d.ts +2 -3
- package/bpk-component-price-range/index.js +2 -2
- package/bpk-component-price-range/src/BpkPriceRange.d.ts +14 -6
- package/bpk-component-price-range/src/BpkPriceRange.js +34 -14
- package/bpk-component-price-range/src/common-types.d.ts +5 -0
- package/bpk-component-price-range/src/common-types.js +4 -0
- package/bpk-component-rating/src/BpkRating.js +2 -1
- package/bpk-component-rtl-toggle/src/BpkRtlToggle.js +2 -0
- package/bpk-component-section-header/src/BpkSectionHeader.js +2 -1
- package/bpk-component-segmented-control/src/BpkSegmentedControl.js +2 -1
- package/bpk-component-skeleton/src/BpkBaseSkeleton.js +2 -1
- package/bpk-component-slider/src/BpkSlider.js +2 -1
- package/bpk-component-snippet/src/BpkSnippet.js +2 -1
- package/bpk-component-spinner/src/BpkExtraLargeSpinner.js +2 -1
- package/bpk-component-spinner/src/BpkLargeSpinner.js +2 -1
- package/bpk-component-spinner/src/BpkSpinner.js +2 -1
- package/bpk-component-split-input/src/BpkInputField.js +2 -1
- package/bpk-component-split-input/src/BpkSplitInput.js +2 -1
- package/bpk-component-swap-button/src/BpkSwapButton.js +2 -1
- package/bpk-component-switch/src/BpkSwitch.js +2 -1
- package/bpk-component-text/src/BpkText.js +2 -1
- package/bpk-component-textarea/src/BpkTextarea.js +2 -1
- package/bpk-component-theme-toggle/src/BpkThemeToggle.js +2 -0
- package/bpk-component-visually-hidden/src/BpkVisuallyHidden.js +2 -1
- package/bpk-react-utils/index.d.ts +5 -1
- package/bpk-react-utils/index.js +4 -2
- package/bpk-react-utils/src/BpkDialogWrapper/BpkDialogWrapper.js +2 -0
- package/bpk-react-utils/src/getDataComponentAttribute.d.ts +20 -0
- package/bpk-react-utils/src/getDataComponentAttribute.js +38 -0
- package/bpk-scrim-utils/src/BpkScrim.js +2 -1
- package/package.json +2 -1
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
19
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
20
20
|
import STYLES from "./BpkBadge.module.css";
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
export const BADGE_TYPES = {
|
|
@@ -50,6 +50,7 @@ const BpkBadge = ({
|
|
|
50
50
|
const classNames = getClassName('bpk-badge', badgeTypeClassNames[type], docked === 'right' && 'bpk-badge--docked-right', docked === 'left' && 'bpk-badge--docked-left', centered && 'bpk-badge--centered', className);
|
|
51
51
|
return /*#__PURE__*/_jsx("span", {
|
|
52
52
|
className: classNames,
|
|
53
|
+
...getDataComponentAttribute('Badge'),
|
|
53
54
|
...rest
|
|
54
55
|
});
|
|
55
56
|
};
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
+
import { getDataComponentAttribute } from "../../bpk-react-utils";
|
|
19
20
|
import BpkBannerAlertInner from "./BpkBannerAlertInner";
|
|
20
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
22
|
const defaultProps = {
|
|
@@ -40,6 +41,7 @@ const BpkBannerAlert = ({
|
|
|
40
41
|
animateOnLeave: animateOnLeave,
|
|
41
42
|
show: show,
|
|
42
43
|
icon: icon,
|
|
44
|
+
...getDataComponentAttribute('BannerAlert'),
|
|
43
45
|
...rest
|
|
44
46
|
});
|
|
45
47
|
export default BpkBannerAlert;
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
+
import { getDataComponentAttribute } from "../../bpk-react-utils";
|
|
19
20
|
import BpkBannerAlertInner, { CONFIGURATION } from "./BpkBannerAlertInner";
|
|
20
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
22
|
const BpkBannerAlertDismissable = ({
|
|
@@ -24,6 +25,7 @@ const BpkBannerAlertDismissable = ({
|
|
|
24
25
|
}) => /*#__PURE__*/_jsx(BpkBannerAlertInner, {
|
|
25
26
|
configuration: CONFIGURATION.DISMISSABLE,
|
|
26
27
|
onDismiss: onDismiss,
|
|
28
|
+
...getDataComponentAttribute('BannerAlertDismissable'),
|
|
27
29
|
...rest
|
|
28
30
|
});
|
|
29
31
|
export default BpkBannerAlertDismissable;
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
+
import { getDataComponentAttribute } from "../../bpk-react-utils";
|
|
19
20
|
import BpkBannerAlertInner, { CONFIGURATION } from "./BpkBannerAlertInner";
|
|
20
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
22
|
const BpkBannerAlertExpandable = ({
|
|
@@ -27,6 +28,7 @@ const BpkBannerAlertExpandable = ({
|
|
|
27
28
|
configuration: CONFIGURATION.EXPANDABLE,
|
|
28
29
|
expanded: expanded,
|
|
29
30
|
onExpandToggle: onExpandToggle,
|
|
31
|
+
...getDataComponentAttribute('BannerAlertExpandable'),
|
|
30
32
|
...rest,
|
|
31
33
|
children: children
|
|
32
34
|
});
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
19
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
20
20
|
import STYLES from "./BpkBlockquote.module.css";
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
const getClassName = cssModules(STYLES);
|
|
@@ -30,6 +30,7 @@ const BpkBlockquote = ({
|
|
|
30
30
|
}
|
|
31
31
|
return /*#__PURE__*/_jsx("blockquote", {
|
|
32
32
|
className: classNames.join(' '),
|
|
33
|
+
...getDataComponentAttribute('Blockquote'),
|
|
33
34
|
children: children
|
|
34
35
|
});
|
|
35
36
|
};
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
19
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
20
20
|
import STYLES from "./BpkBoilerplate.module.css";
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
const getClassName = cssModules(STYLES);
|
|
@@ -27,6 +27,7 @@ const BpkBoilerplate = ({
|
|
|
27
27
|
delete rest.className;
|
|
28
28
|
return /*#__PURE__*/_jsx("div", {
|
|
29
29
|
className: getClassName('bpk-boilerplate'),
|
|
30
|
+
...getDataComponentAttribute('Boilerplate'),
|
|
30
31
|
...rest,
|
|
31
32
|
children: "I am an example component."
|
|
32
33
|
});
|
|
@@ -23,7 +23,7 @@ import BpkCloseButton from "../../bpk-component-close-button";
|
|
|
23
23
|
import BpkLink from "../../bpk-component-link";
|
|
24
24
|
import BpkNavigationBar from "../../bpk-component-navigation-bar";
|
|
25
25
|
import { TEXT_STYLES } from "../../bpk-component-text/src/BpkText";
|
|
26
|
-
import { BpkDialogWrapper, cssModules } from "../../bpk-react-utils";
|
|
26
|
+
import { BpkDialogWrapper, cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
27
27
|
import STYLES from "./BpkBottomSheet.module.css";
|
|
28
28
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
29
|
const getClassName = cssModules(STYLES);
|
|
@@ -113,6 +113,7 @@ const BpkBottomSheet = ({
|
|
|
113
113
|
appear: animationTimeout,
|
|
114
114
|
exit: isAboveMobile ? 0 : animationTimeout
|
|
115
115
|
},
|
|
116
|
+
...getDataComponentAttribute('BottomSheet'),
|
|
116
117
|
children: /*#__PURE__*/_jsxs(_Fragment, {
|
|
117
118
|
children: [/*#__PURE__*/_jsx("header", {
|
|
118
119
|
className: getClassName('bpk-bottom-sheet--header-wrapper'),
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import { Component, Fragment } from 'react';
|
|
20
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
20
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
21
21
|
import STYLES from "./BpkBreadcrumb.module.css";
|
|
22
22
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
23
|
const getClassName = cssModules(STYLES);
|
|
@@ -63,6 +63,7 @@ class BpkBreadcrumb extends Component {
|
|
|
63
63
|
}
|
|
64
64
|
}), /*#__PURE__*/_jsx("nav", {
|
|
65
65
|
"aria-label": label,
|
|
66
|
+
...getDataComponentAttribute('Breadcrumb'),
|
|
66
67
|
...rest,
|
|
67
68
|
children: /*#__PURE__*/_jsx("ol", {
|
|
68
69
|
className: getClassName('bpk-breadcrumb'),
|
|
@@ -20,7 +20,7 @@ import { withRtlSupport } from "../../bpk-component-icon";
|
|
|
20
20
|
import ArrowRight from "../../bpk-component-icon/sm/arrow-right";
|
|
21
21
|
import BpkLink from "../../bpk-component-link";
|
|
22
22
|
import BpkText from "../../bpk-component-text";
|
|
23
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
23
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
24
24
|
import STYLES from "./BpkBreadcrumbItem.module.css";
|
|
25
25
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
26
|
const getClassName = cssModules(STYLES);
|
|
@@ -36,6 +36,7 @@ const BpkBreadcrumbItem = props => {
|
|
|
36
36
|
} = props;
|
|
37
37
|
return /*#__PURE__*/_jsxs("li", {
|
|
38
38
|
className: getClassName('bpk-breadcrumb-item', className),
|
|
39
|
+
...getDataComponentAttribute('BreadcrumbItem'),
|
|
39
40
|
...rest,
|
|
40
41
|
children: [active ? /*#__PURE__*/_jsx("div", {
|
|
41
42
|
className: getClassName('bpk-breadcrumb-item__active-item'),
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { cssModules } from "../../../bpk-react-utils";
|
|
18
|
+
import { cssModules, getDataComponentAttribute } from "../../../bpk-react-utils";
|
|
19
19
|
import { BUTTON_TYPES, SIZE_TYPES } from "./common-types";
|
|
20
20
|
import COMMON_STYLES from "./BpkButton.module.css";
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -53,6 +53,7 @@ export const BpkButtonV2 = ({
|
|
|
53
53
|
return /*#__PURE__*/_jsx("a", {
|
|
54
54
|
href: href,
|
|
55
55
|
className: classNames,
|
|
56
|
+
...getDataComponentAttribute('Button'),
|
|
56
57
|
onClick: onClick,
|
|
57
58
|
target: target,
|
|
58
59
|
rel: rel,
|
|
@@ -64,6 +65,7 @@ export const BpkButtonV2 = ({
|
|
|
64
65
|
type: submit ? 'submit' : 'button',
|
|
65
66
|
disabled: disabled,
|
|
66
67
|
className: classNames,
|
|
68
|
+
...getDataComponentAttribute('Button'),
|
|
67
69
|
onClick: onClick,
|
|
68
70
|
...rest,
|
|
69
71
|
children: content
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import { useContext } from 'react';
|
|
20
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
20
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
21
21
|
import { CardContext } from "./CardContext";
|
|
22
22
|
import STYLES from "./BpkCard.module.css";
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -51,6 +51,7 @@ const BpkCard = ({
|
|
|
51
51
|
return /*#__PURE__*/_jsx("a", {
|
|
52
52
|
href: href,
|
|
53
53
|
className: classNames,
|
|
54
|
+
...getDataComponentAttribute('Card'),
|
|
54
55
|
...atomicProps,
|
|
55
56
|
...blankProps,
|
|
56
57
|
...rest,
|
|
@@ -61,12 +62,14 @@ const BpkCard = ({
|
|
|
61
62
|
return /*#__PURE__*/_jsx("button", {
|
|
62
63
|
type: "button",
|
|
63
64
|
className: classNames,
|
|
65
|
+
...getDataComponentAttribute('Card'),
|
|
64
66
|
...rest,
|
|
65
67
|
children: children
|
|
66
68
|
});
|
|
67
69
|
}
|
|
68
70
|
return /*#__PURE__*/_jsx("div", {
|
|
69
71
|
className: classNames,
|
|
72
|
+
...getDataComponentAttribute('Card'),
|
|
70
73
|
...rest,
|
|
71
74
|
children: children
|
|
72
75
|
});
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
19
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
20
20
|
import { CardContext } from "./CardContext";
|
|
21
21
|
import STYLES from "./BpkCardWrapper.module.css";
|
|
22
22
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -38,6 +38,7 @@ const BpkCardWrapper = ({
|
|
|
38
38
|
// @ts-expect-error TS is reporting this incorrectly as --background-color is valid
|
|
39
39
|
'--background-color': backgroundColor
|
|
40
40
|
},
|
|
41
|
+
...getDataComponentAttribute('CardWrapper'),
|
|
41
42
|
children: [/*#__PURE__*/_jsx("div", {
|
|
42
43
|
className: getClassName('bpk-card-wrapper--header'),
|
|
43
44
|
children: header
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
19
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
20
20
|
import BpkCard from "./BpkCard";
|
|
21
21
|
import { CardContext } from "./CardContext";
|
|
22
22
|
import STYLES from "./BpkDividedCard.module.css";
|
|
@@ -44,6 +44,7 @@ const BpkDividedCard = ({
|
|
|
44
44
|
},
|
|
45
45
|
children: /*#__PURE__*/_jsx("div", {
|
|
46
46
|
className: containerClassName,
|
|
47
|
+
...getDataComponentAttribute('DividedCard'),
|
|
47
48
|
children: /*#__PURE__*/_jsx(BpkCard, {
|
|
48
49
|
href: href,
|
|
49
50
|
padded: false,
|
|
@@ -22,7 +22,7 @@ import BpkHeartIcon from "../../bpk-component-icon/lg/heart";
|
|
|
22
22
|
import BpkHeartOutlineIcon from "../../bpk-component-icon/lg/heart--outline";
|
|
23
23
|
import BpkHeartIconSm from "../../bpk-component-icon/sm/heart";
|
|
24
24
|
import BpkHeartOutlineIconSm from "../../bpk-component-icon/sm/heart--outline";
|
|
25
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
25
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
26
26
|
import STYLES from "./BpkSaveButton.module.css";
|
|
27
27
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
28
|
export const SIZE_TYPES = {
|
|
@@ -56,6 +56,7 @@ const BpkSaveButton = ({
|
|
|
56
56
|
"aria-label": accessibilityLabel,
|
|
57
57
|
"aria-pressed": checked,
|
|
58
58
|
className: getClassName('bpk-save-button', smallSize && 'bpk-save-button__small', `bpk-save-button__${style}`),
|
|
59
|
+
...getDataComponentAttribute('SaveButton'),
|
|
59
60
|
onClick: e => {
|
|
60
61
|
onCheckedChange(e);
|
|
61
62
|
if (!checked) {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
import BpkBreakpoint, { BREAKPOINTS } from "../../bpk-component-breakpoint";
|
|
19
19
|
import BpkButton from "../../bpk-component-button";
|
|
20
20
|
import BpkSectionHeader from "../../bpk-component-section-header";
|
|
21
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
21
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
22
22
|
import BpkCardListGridStack from "./BpkCardListGridStack";
|
|
23
23
|
import BpkCardListRowRailContainer from "./BpkCardListRowRail";
|
|
24
24
|
import { ACCESSORY_DESKTOP_TYPES, ACCESSORY_MOBILE_TYPES, LAYOUTS } from "./common-types";
|
|
@@ -61,6 +61,7 @@ const BpkCardList = props => {
|
|
|
61
61
|
});
|
|
62
62
|
return /*#__PURE__*/_jsx("div", {
|
|
63
63
|
className: getClassName('bpk-card-list'),
|
|
64
|
+
...getDataComponentAttribute('CardList'),
|
|
64
65
|
"data-testid": "bpk-card-list",
|
|
65
66
|
children: /*#__PURE__*/_jsx(BpkBreakpoint, {
|
|
66
67
|
query: BREAKPOINTS.MOBILE,
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
import { Children, useState } from 'react';
|
|
20
20
|
import BpkButton from "../../../bpk-component-button";
|
|
21
|
-
import { cssModules } from "../../../bpk-react-utils";
|
|
21
|
+
import { cssModules, getDataComponentAttribute } from "../../../bpk-react-utils";
|
|
22
22
|
import ExpandAccessoryContent from "../BpkExpand/ExpandAccessoryContent";
|
|
23
23
|
import { ACCESSORY_DESKTOP_TYPES } from "../common-types";
|
|
24
24
|
import STYLES from "./BpkCardListGridStack.module.css";
|
|
@@ -67,6 +67,7 @@ const BpkCardListGridStack = props => {
|
|
|
67
67
|
});
|
|
68
68
|
return /*#__PURE__*/_jsxs("div", {
|
|
69
69
|
className: getClassName('bpk-card-list-grid-stack'),
|
|
70
|
+
...getDataComponentAttribute('CardListGridStack'),
|
|
70
71
|
"data-testid": "bpk-card-list-grid-stack",
|
|
71
72
|
children: [/*#__PURE__*/_jsx("div", {
|
|
72
73
|
className: getClassName(`bpk-card-list-grid-stack__${layout}`),
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
import { useRef, useState, useEffect, isValidElement, Children, useMemo } from 'react';
|
|
20
20
|
import throttle from 'lodash/throttle';
|
|
21
|
-
import { cssModules } from "../../../bpk-react-utils";
|
|
21
|
+
import { cssModules, getDataComponentAttribute } from "../../../bpk-react-utils";
|
|
22
22
|
import { RENDER_BUFFER_SIZE } from "./constants";
|
|
23
23
|
import { lockScroll, setA11yTabIndex, useScrollToCard, useIntersectionObserver } from "./utils";
|
|
24
24
|
import STYLES from "./BpkCardListCarousel.module.css";
|
|
@@ -131,6 +131,7 @@ const BpkCardListCarousel = props => {
|
|
|
131
131
|
}, []);
|
|
132
132
|
return /*#__PURE__*/_jsx("div", {
|
|
133
133
|
className: getClassName(`bpk-card-list-row-rail__${layout}`),
|
|
134
|
+
...getDataComponentAttribute('CardListCarousel'),
|
|
134
135
|
"data-testid": "bpk-card-list-row-rail__carousel",
|
|
135
136
|
"aria-label": carouselLabel(initiallyShownCards, childrenLength),
|
|
136
137
|
"aria-roledescription": "carousel"
|
|
@@ -150,12 +151,9 @@ const BpkCardListCarousel = props => {
|
|
|
150
151
|
}
|
|
151
152
|
const commonProps = {
|
|
152
153
|
className: getClassName(`bpk-card-list-row-rail__${layout}__card`),
|
|
153
|
-
style:
|
|
154
|
-
...shownNumberStyle,
|
|
155
|
-
...cardDimensionStyle
|
|
156
|
-
},
|
|
154
|
+
style: shownNumberStyle,
|
|
157
155
|
key: `carousel-card-${index.toString()}`,
|
|
158
|
-
role:
|
|
156
|
+
role: 'group'
|
|
159
157
|
};
|
|
160
158
|
|
|
161
159
|
// Only render cards that are within the renderList range or have been visible before
|
|
@@ -165,18 +163,25 @@ const BpkCardListCarousel = props => {
|
|
|
165
163
|
...commonProps,
|
|
166
164
|
style: {
|
|
167
165
|
...commonProps.style,
|
|
166
|
+
...cardDimensionStyle,
|
|
168
167
|
contain: 'paint'
|
|
169
168
|
},
|
|
170
169
|
"data-testid": "bpk-card-list-carousel--placeholder",
|
|
171
170
|
"aria-hidden": "true",
|
|
172
|
-
children:
|
|
171
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
172
|
+
className: getClassName('bpk-card-list-row-rail__card-slot'),
|
|
173
|
+
children: card
|
|
174
|
+
})
|
|
173
175
|
});
|
|
174
176
|
}
|
|
175
177
|
return /*#__PURE__*/_jsx("div", {
|
|
176
178
|
...commonProps,
|
|
177
179
|
ref: cardRefFns[index],
|
|
178
180
|
"aria-label": slideLabel(index, childrenLength),
|
|
179
|
-
children:
|
|
181
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
182
|
+
className: getClassName('bpk-card-list-row-rail__card-slot'),
|
|
183
|
+
children: card
|
|
184
|
+
})
|
|
180
185
|
});
|
|
181
186
|
})
|
|
182
187
|
});
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
|
-
.bpk-card-list-row-rail__row,.bpk-card-list-row-rail__rail{--spacing-offset: 0.5rem;--carousel-card-gap: 1.25rem;display:flex;overflow-x:hidden;box-sizing:border-box;gap:var(--carousel-card-gap);margin-block:-1.5rem;margin-inline:-0.5rem;padding-block:1.5rem;padding-inline:.5rem;scroll-snap-stop:always;scroll-snap-type:x mandatory;scrollbar-width:none}@media(max-width: 32rem){.bpk-card-list-row-rail__row,.bpk-card-list-row-rail__rail{--spacing-offset: 1rem;--carousel-card-gap: 1rem;overflow-x:scroll}}.bpk-card-list-row-rail__row::-webkit-scrollbar,.bpk-card-list-row-rail__rail::-webkit-scrollbar{display:none}.bpk-card-list-row-rail__row__card,.bpk-card-list-row-rail__rail__card{position:relative;flex:0 0 calc((100% - (var(--carousel-card-gap)*(var(--initially-shown-cards, 3) - 1) + var(--spacing-offset)*2/var(--initially-shown-cards, 3)))/var(--initially-shown-cards, 3));overflow:visible;box-sizing:border-box;scroll-margin-inline:var(--spacing-offset);scroll-snap-align:start}@media(max-width: 32rem){.bpk-card-list-row-rail__row__card,.bpk-card-list-row-rail__rail__card{flex:0 0 calc((100% - var(--carousel-card-gap)*(var(--initially-shown-cards, 3) - 1))/max(1,var(--initially-shown-cards, 3) - .8))}}.bpk-card-list-row-rail__rail{-webkit-overflow-scrolling:touch}@media(max-width: 32rem){.bpk-card-list-row-rail__rail{margin-inline:calc(-1*var(--spacing-offset));padding-inline:var(--spacing-offset)}}
|
|
18
|
+
.bpk-card-list-row-rail__row,.bpk-card-list-row-rail__rail{--spacing-offset: 0.5rem;--carousel-card-gap: 1.25rem;display:flex;overflow-x:hidden;box-sizing:border-box;gap:var(--carousel-card-gap);margin-block:-1.5rem;margin-inline:-0.5rem;padding-block:1.5rem;padding-inline:.5rem;scroll-snap-stop:always;scroll-snap-type:x mandatory;scrollbar-width:none}@media(max-width: 32rem){.bpk-card-list-row-rail__row,.bpk-card-list-row-rail__rail{--spacing-offset: 1rem;--carousel-card-gap: 1rem;overflow-x:scroll}}.bpk-card-list-row-rail__row::-webkit-scrollbar,.bpk-card-list-row-rail__rail::-webkit-scrollbar{display:none}.bpk-card-list-row-rail__row__card,.bpk-card-list-row-rail__rail__card{position:relative;flex:0 0 calc((100% - (var(--carousel-card-gap)*(var(--initially-shown-cards, 3) - 1) + var(--spacing-offset)*2/var(--initially-shown-cards, 3)))/var(--initially-shown-cards, 3));overflow:visible;box-sizing:border-box;scroll-margin-inline:var(--spacing-offset);scroll-snap-align:start}@media(max-width: 32rem){.bpk-card-list-row-rail__row__card,.bpk-card-list-row-rail__rail__card{flex:0 0 calc((100% - var(--carousel-card-gap)*(var(--initially-shown-cards, 3) - 1))/max(1,var(--initially-shown-cards, 3) - .8))}}.bpk-card-list-row-rail__rail{-webkit-overflow-scrolling:touch}@media(max-width: 32rem){.bpk-card-list-row-rail__rail{margin-inline:calc(-1*var(--spacing-offset));padding-inline:var(--spacing-offset)}}.bpk-card-list-row-rail__card-slot{display:grid;height:100%}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { useState, Children } from 'react';
|
|
19
19
|
import BpkPageIndicator from "../../../bpk-component-page-indicator";
|
|
20
|
-
import { cssModules } from "../../../bpk-react-utils";
|
|
20
|
+
import { cssModules, getDataComponentAttribute } from "../../../bpk-react-utils";
|
|
21
21
|
import { ACCESSORY_DESKTOP_TYPES, LAYOUTS } from "../common-types";
|
|
22
22
|
import BpkCardListCarousel from "./BpkCardListCarousel";
|
|
23
23
|
import STYLES from "./BpkCardListRowRailContainer.module.css";
|
|
@@ -47,6 +47,7 @@ const BpkCardListRowRailContainer = props => {
|
|
|
47
47
|
}) : null;
|
|
48
48
|
return /*#__PURE__*/_jsxs("div", {
|
|
49
49
|
className: getClassName('bpk-card-list-row-rail'),
|
|
50
|
+
...getDataComponentAttribute('CardListRowRailContainer'),
|
|
50
51
|
"data-testid": "bpk-card-list-row-rail",
|
|
51
52
|
children: [/*#__PURE__*/_jsx(BpkCardListCarousel, {
|
|
52
53
|
initiallyShownCards: initiallyShownCards,
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
import { useRef, useState } from 'react';
|
|
20
20
|
import { BREAKPOINTS, useMediaQuery } from "../../bpk-component-breakpoint";
|
|
21
21
|
import BpkPageIndicator, { VARIANT } from "../../bpk-component-page-indicator";
|
|
22
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
22
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
23
23
|
import BpkCarouselContainer from "./BpkCarouselContainer";
|
|
24
24
|
import { scrollToIndex, useScrollToInitialImage } from "./utils";
|
|
25
25
|
import STYLES from "./BpkCarousel.module.css";
|
|
@@ -44,6 +44,7 @@ const BpkCarousel = ({
|
|
|
44
44
|
useScrollToInitialImage(initialImageIndex, imagesRef);
|
|
45
45
|
return /*#__PURE__*/_jsxs("div", {
|
|
46
46
|
className: getClassName('bpk-carousel'),
|
|
47
|
+
...getDataComponentAttribute('Carousel'),
|
|
47
48
|
children: [/*#__PURE__*/_jsx(BpkCarouselContainer, {
|
|
48
49
|
images: images,
|
|
49
50
|
onVisible: updateShownImageIndex,
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import { memo, useState } from 'react';
|
|
20
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
20
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
21
21
|
import BpkCarouselImage from "./BpkCarouselImage";
|
|
22
22
|
import { useIntersectionObserver } from "./utils";
|
|
23
23
|
import STYLES from "./BpkCarouselContainer.module.css";
|
|
@@ -58,6 +58,7 @@ const BpkScrollContainer = /*#__PURE__*/memo(({
|
|
|
58
58
|
if (images.length === 1) {
|
|
59
59
|
return /*#__PURE__*/_jsx("div", {
|
|
60
60
|
className: getClassName('bpk-carousel-container'),
|
|
61
|
+
...getDataComponentAttribute('CarouselContainer'),
|
|
61
62
|
role: "list",
|
|
62
63
|
"data-testid": "image-gallery-scroll-container",
|
|
63
64
|
children: /*#__PURE__*/_jsx(BpkCarouselImage, {
|
|
@@ -68,6 +69,7 @@ const BpkScrollContainer = /*#__PURE__*/memo(({
|
|
|
68
69
|
}
|
|
69
70
|
return /*#__PURE__*/_jsxs("div", {
|
|
70
71
|
className: getClassName('bpk-carousel-container'),
|
|
72
|
+
...getDataComponentAttribute('CarouselContainer'),
|
|
71
73
|
ref: setRoot,
|
|
72
74
|
"data-testid": "image-gallery-scroll-container",
|
|
73
75
|
role: "list",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import { forwardRef } from "react";
|
|
20
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
20
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
21
21
|
import STYLES from "./BpkCarouselImage.module.css";
|
|
22
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
23
|
const getClassName = cssModules(STYLES);
|
|
@@ -26,6 +26,7 @@ const BpkCarouselImage = /*#__PURE__*/forwardRef(({
|
|
|
26
26
|
index
|
|
27
27
|
}, ref) => /*#__PURE__*/_jsx("div", {
|
|
28
28
|
className: getClassName('bpk-carousel-image'),
|
|
29
|
+
...getDataComponentAttribute('CarouselImage'),
|
|
29
30
|
"data-index": index,
|
|
30
31
|
ref: ref,
|
|
31
32
|
role: "listitem",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
19
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
20
20
|
import STYLES from "./BpkCheckbox.module.css";
|
|
21
21
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
22
|
const getClassName = cssModules(STYLES);
|
|
@@ -41,6 +41,7 @@ const BpkCheckbox = ({
|
|
|
41
41
|
const inputClasses = getClassName('bpk-checkbox__input', white && 'bpk-checkbox__input-white', indeterminate && 'bpk-checkbox__input-indeterminate');
|
|
42
42
|
return /*#__PURE__*/_jsxs("label", {
|
|
43
43
|
className: classNames,
|
|
44
|
+
...getDataComponentAttribute('Checkbox'),
|
|
44
45
|
children: [/*#__PURE__*/_jsx("input", {
|
|
45
46
|
type: "checkbox",
|
|
46
47
|
className: inputClasses,
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import CloseIcon from "../../bpk-component-icon/sm/close";
|
|
20
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
20
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
21
21
|
import STYLES from "./BpkCloseButton.module.css";
|
|
22
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
23
|
const getClassName = cssModules(STYLES);
|
|
@@ -40,6 +40,7 @@ const BpkCloseButton = ({
|
|
|
40
40
|
onClick: onClick,
|
|
41
41
|
"aria-label": label,
|
|
42
42
|
className: classNames.join(' '),
|
|
43
|
+
...getDataComponentAttribute('CloseButton'),
|
|
43
44
|
...rest,
|
|
44
45
|
children: /*#__PURE__*/_jsx("span", {
|
|
45
46
|
className: getClassName('bpk-close-button-icon'),
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
19
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
20
20
|
import STYLES from "./BpkCode.module.css";
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
const getClassName = cssModules(STYLES);
|
|
@@ -29,6 +29,7 @@ const BpkCode = ({
|
|
|
29
29
|
const classNames = getClassName('bpk-code', alternate && 'bpk-code--alternate', className);
|
|
30
30
|
return /*#__PURE__*/_jsx("code", {
|
|
31
31
|
className: classNames,
|
|
32
|
+
...getDataComponentAttribute('Code'),
|
|
32
33
|
...rest,
|
|
33
34
|
children: children
|
|
34
35
|
});
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
19
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
20
20
|
import STYLES from "./BpkCodeBlock.module.css";
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
const getClassName = cssModules(STYLES);
|
|
@@ -30,6 +30,7 @@ const BpkCodeBlock = ({
|
|
|
30
30
|
const codeClassNames = getClassName('bpk-code', 'bpk-code--block');
|
|
31
31
|
return /*#__PURE__*/_jsx("pre", {
|
|
32
32
|
className: preClassNames,
|
|
33
|
+
...getDataComponentAttribute('CodeBlock'),
|
|
33
34
|
...rest,
|
|
34
35
|
children: /*#__PURE__*/_jsx("code", {
|
|
35
36
|
className: codeClassNames,
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import BpkText from "../../bpk-component-text";
|
|
20
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
20
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
21
21
|
import STYLES from "./BpkContentCard.module.css";
|
|
22
22
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
23
|
const getClassName = cssModules(STYLES);
|
|
@@ -29,6 +29,7 @@ const BpkContentCard = ({
|
|
|
29
29
|
href: card.href,
|
|
30
30
|
target: "_blank",
|
|
31
31
|
rel: "noreferrer",
|
|
32
|
+
...getDataComponentAttribute('ContentCard'),
|
|
32
33
|
children: [/*#__PURE__*/_jsx("div", {
|
|
33
34
|
className: getClassName('bpk-content-card--image-container'),
|
|
34
35
|
children: /*#__PURE__*/_jsx("img", {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
/* eslint react/no-array-index-key: 0 */
|
|
19
19
|
|
|
20
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
20
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
21
21
|
import BpkContentCard from "./BpkContentCard";
|
|
22
22
|
import STYLES from "./BpkContentCards.module.css";
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -30,6 +30,7 @@ const BpkContentCards = ({
|
|
|
30
30
|
return null;
|
|
31
31
|
}
|
|
32
32
|
return /*#__PURE__*/_jsxs("div", {
|
|
33
|
+
...getDataComponentAttribute('ContentCards'),
|
|
33
34
|
children: [/*#__PURE__*/_jsx("h2", {
|
|
34
35
|
className: getClassName('bpk-content-cards--header-text'),
|
|
35
36
|
children: heading
|
|
@@ -20,7 +20,7 @@ import { useMemo, useState } from 'react';
|
|
|
20
20
|
|
|
21
21
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
22
22
|
import { useTable, useSortBy } from 'react-table';
|
|
23
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
23
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
24
24
|
import BpkDataTableHeader from "./BpkDataTableHeader";
|
|
25
25
|
import { SORT_DIRECTION_TYPES } from "./common-types";
|
|
26
26
|
import { createColumnsSchema } from "./utils";
|
|
@@ -106,6 +106,7 @@ const BpkDataTable = props => {
|
|
|
106
106
|
className: classNames
|
|
107
107
|
}),
|
|
108
108
|
...restOfProps,
|
|
109
|
+
...getDataComponentAttribute('DataTable'),
|
|
109
110
|
children: [/*#__PURE__*/_jsx("div", {
|
|
110
111
|
children: headerGroups.map(headerGroup => /*#__PURE__*/_jsx("div", {
|
|
111
112
|
...headerGroup.getHeaderGroupProps({
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
import { withRtlSupport } from "../../bpk-component-icon";
|
|
20
20
|
import BpkSmallArrowDownIcon from "../../bpk-component-icon/sm/arrow-down";
|
|
21
21
|
import BpkSmallArrowUpIcon from "../../bpk-component-icon/sm/arrow-up";
|
|
22
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
22
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
23
23
|
import { SORT_DIRECTION_TYPES } from "./common-types";
|
|
24
24
|
import STYLES from "./BpkDataTableHeader.module.css";
|
|
25
25
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -97,6 +97,7 @@ const BpkDataTableHeader = ({
|
|
|
97
97
|
},
|
|
98
98
|
className: headerClassNames
|
|
99
99
|
}),
|
|
100
|
+
...getDataComponentAttribute('DataTableHeader'),
|
|
100
101
|
children: [/*#__PURE__*/_jsx("span", {
|
|
101
102
|
onClick: onHeaderClick,
|
|
102
103
|
onKeyDown: handleKeyboardEvent,
|
|
@@ -22,7 +22,7 @@ import { composeCalendar, BpkCalendarGridHeader, BpkCalendarGrid, BpkCalendarDat
|
|
|
22
22
|
import BpkInput, { withOpenEvents } from "../../bpk-component-input";
|
|
23
23
|
import BpkModal from "../../bpk-component-modal";
|
|
24
24
|
import BpkPopover from "../../bpk-component-popover";
|
|
25
|
-
import { setNativeValue } from "../../bpk-react-utils";
|
|
25
|
+
import { setNativeValue, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
26
26
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
27
|
const Input = withOpenEvents(BpkInput);
|
|
28
28
|
const DefaultCalendar = withCalendarState(composeCalendar(BpkCalendarNav, BpkCalendarGridHeader, BpkCalendarGrid, BpkCalendarDate));
|
|
@@ -252,6 +252,7 @@ class BpkDatepicker extends Component {
|
|
|
252
252
|
isOpen: this.state.isOpen,
|
|
253
253
|
label: title,
|
|
254
254
|
closeButtonText: closeButtonText,
|
|
255
|
+
...getDataComponentAttribute('Datepicker'),
|
|
255
256
|
...rest,
|
|
256
257
|
children: /*#__PURE__*/_jsx(Calendar, {
|
|
257
258
|
...calendarProps,
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
19
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
20
20
|
import STYLES from "./BpkDescriptionList.module.css";
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
const getClassName = cssModules(STYLES);
|
|
@@ -27,6 +27,7 @@ export default ({
|
|
|
27
27
|
}) => /*#__PURE__*/_jsx("dd", {
|
|
28
28
|
className: [getClassName('bpk-description-list__details'), className].filter(x => x) // inline drops the className if undefined
|
|
29
29
|
.join(' '),
|
|
30
|
+
...getDataComponentAttribute('DescriptionDetails'),
|
|
30
31
|
...rest,
|
|
31
32
|
children: children
|
|
32
33
|
});
|