@skyscanner/backpack-web 41.9.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-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-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 +2 -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-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-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-panel/src/BpkPanel.js +2 -1
- package/bpk-component-popover/src/BpkPopover.js +2 -1
- 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-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-textarea/src/BpkTextarea.js +2 -1
- package/bpk-component-theme-toggle/src/BpkThemeToggle.js +2 -0
- package/package.json +2 -1
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type StackOptionKeys from './BpkStack.constant';
|
|
3
|
+
import type { BpkCommonLayoutProps } from './commonProps';
|
|
4
|
+
import type { BpkSpacingValue, BpkResponsiveValue, BpkBasisValue } from './tokens';
|
|
5
|
+
import type { BoxProps, FlexProps, GridProps, GridItemProps, StackProps } from '@chakra-ui/react';
|
|
6
|
+
/**
|
|
7
|
+
* Layout-level event props that should not be exposed on layout components
|
|
8
|
+
* by default. BpkBox will reintroduce a minimal subset (onClick, onFocus,
|
|
9
|
+
* onBlur) explicitly on its own props type.
|
|
10
|
+
*/
|
|
11
|
+
type LayoutEventProps = 'onClick' | 'onMouseEnter' | 'onMouseLeave' | 'onMouseOver' | 'onMouseOut' | 'onMouseDown' | 'onMouseUp' | 'onFocus' | 'onBlur' | 'onKeyDown' | 'onKeyUp' | 'onKeyPress';
|
|
12
|
+
/**
|
|
13
|
+
* Shorthand props from the underlying layout system that we do NOT expose on
|
|
14
|
+
* Backpack layout components. These mostly mirror longer-form spacing,
|
|
15
|
+
* sizing and visual props that we already model explicitly via
|
|
16
|
+
* BpkCommonLayoutProps and BpkFlexGridProps.
|
|
17
|
+
*/
|
|
18
|
+
type DisallowedShorthandProps = 'p' | 'pt' | 'pr' | 'pb' | 'pl' | 'px' | 'py' | 'm' | 'mt' | 'mr' | 'mb' | 'ml' | 'mx' | 'my' | 'w' | 'h' | 'minW' | 'maxW' | 'minH' | 'maxH' | 'bg' | 'rounded' | 'shadow';
|
|
19
|
+
/**
|
|
20
|
+
* Flexbox & grid layout props that we explicitly support on Backpack layout
|
|
21
|
+
* components. These are a curated subset of the underlying Box flex/grid API
|
|
22
|
+
* that are useful for structural layout.
|
|
23
|
+
*/
|
|
24
|
+
export interface BpkFlexGridProps {
|
|
25
|
+
display?: BoxProps['display'];
|
|
26
|
+
flexDirection?: BoxProps['flexDirection'];
|
|
27
|
+
flexWrap?: BoxProps['flexWrap'];
|
|
28
|
+
justifyContent?: BoxProps['justifyContent'];
|
|
29
|
+
alignItems?: BoxProps['alignItems'];
|
|
30
|
+
alignContent?: BoxProps['alignContent'];
|
|
31
|
+
flex?: BoxProps['flex'];
|
|
32
|
+
flexGrow?: BoxProps['flexGrow'];
|
|
33
|
+
flexShrink?: BoxProps['flexShrink'];
|
|
34
|
+
flexBasis?: BoxProps['flexBasis'];
|
|
35
|
+
order?: BoxProps['order'];
|
|
36
|
+
alignSelf?: BoxProps['alignSelf'];
|
|
37
|
+
justifySelf?: BoxProps['justifySelf'];
|
|
38
|
+
gridTemplateColumns?: BoxProps['gridTemplateColumns'];
|
|
39
|
+
gridTemplateRows?: BoxProps['gridTemplateRows'];
|
|
40
|
+
gridTemplateAreas?: BoxProps['gridTemplateAreas'];
|
|
41
|
+
gridAutoFlow?: BoxProps['gridAutoFlow'];
|
|
42
|
+
gridAutoRows?: BoxProps['gridAutoRows'];
|
|
43
|
+
gridAutoColumns?: BoxProps['gridAutoColumns'];
|
|
44
|
+
rowGap?: BoxProps['rowGap'];
|
|
45
|
+
columnGap?: BoxProps['columnGap'];
|
|
46
|
+
}
|
|
47
|
+
export type FlexGridPropKeys = keyof BpkFlexGridProps;
|
|
48
|
+
/**
|
|
49
|
+
* Curated subset of Box layout props that support Backpack responsive values.
|
|
50
|
+
*
|
|
51
|
+
* NOTE:
|
|
52
|
+
* - These are structural layout props (flex/grid/display) that we want to allow
|
|
53
|
+
* on `BpkBox`, but using Backpack breakpoint keys rather than Chakra's
|
|
54
|
+
* array syntax or Chakra breakpoint keys.
|
|
55
|
+
* - Spacing/size/position props are handled separately via `BpkCommonLayoutProps`.
|
|
56
|
+
*/
|
|
57
|
+
type BpkBoxResponsiveLayoutProps = {
|
|
58
|
+
display?: BpkResponsiveValue<BoxProps['display']>;
|
|
59
|
+
flexDirection?: BpkResponsiveValue<BoxProps['flexDirection']>;
|
|
60
|
+
flexWrap?: BpkResponsiveValue<BoxProps['flexWrap']>;
|
|
61
|
+
justifyContent?: BpkResponsiveValue<BoxProps['justifyContent']>;
|
|
62
|
+
alignItems?: BpkResponsiveValue<BoxProps['alignItems']>;
|
|
63
|
+
alignContent?: BpkResponsiveValue<BoxProps['alignContent']>;
|
|
64
|
+
flex?: BpkResponsiveValue<BoxProps['flex']>;
|
|
65
|
+
flexGrow?: BpkResponsiveValue<BoxProps['flexGrow']>;
|
|
66
|
+
flexShrink?: BpkResponsiveValue<BoxProps['flexShrink']>;
|
|
67
|
+
flexBasis?: BpkResponsiveValue<BoxProps['flexBasis']>;
|
|
68
|
+
order?: BpkResponsiveValue<BoxProps['order']>;
|
|
69
|
+
alignSelf?: BpkResponsiveValue<BoxProps['alignSelf']>;
|
|
70
|
+
justifySelf?: BpkResponsiveValue<BoxProps['justifySelf']>;
|
|
71
|
+
gridTemplateColumns?: BpkResponsiveValue<BoxProps['gridTemplateColumns']>;
|
|
72
|
+
gridTemplateRows?: BpkResponsiveValue<BoxProps['gridTemplateRows']>;
|
|
73
|
+
gridTemplateAreas?: BpkResponsiveValue<BoxProps['gridTemplateAreas']>;
|
|
74
|
+
gridAutoFlow?: BpkResponsiveValue<BoxProps['gridAutoFlow']>;
|
|
75
|
+
gridAutoRows?: BpkResponsiveValue<BoxProps['gridAutoRows']>;
|
|
76
|
+
gridAutoColumns?: BpkResponsiveValue<BoxProps['gridAutoColumns']>;
|
|
77
|
+
gridColumn?: BpkResponsiveValue<BoxProps['gridColumn']>;
|
|
78
|
+
gridRow?: BpkResponsiveValue<BoxProps['gridRow']>;
|
|
79
|
+
};
|
|
80
|
+
type BpkBoxResponsiveLayoutPropKeys = keyof BpkBoxResponsiveLayoutProps;
|
|
81
|
+
/**
|
|
82
|
+
* Base type that removes common layout props, reserved props (className,
|
|
83
|
+
* children) and all layout-level event props from Chakra UI props.
|
|
84
|
+
*
|
|
85
|
+
* These will be replaced with Backpack-specific types.
|
|
86
|
+
*/
|
|
87
|
+
export type RemoveCommonProps<T> = Omit<T, keyof BpkCommonLayoutProps | 'className' | 'children' | LayoutEventProps | FlexGridPropKeys | DisallowedShorthandProps>;
|
|
88
|
+
/**
|
|
89
|
+
* Component-specific props for BpkBox
|
|
90
|
+
* Includes all Box props except those in BpkCommonLayoutProps
|
|
91
|
+
*/
|
|
92
|
+
export interface BpkBoxSpecificProps extends Omit<RemoveCommonProps<BoxProps>, BpkBoxResponsiveLayoutPropKeys>, BpkBoxResponsiveLayoutProps, Omit<BpkFlexGridProps, BpkBoxResponsiveLayoutPropKeys> {
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Props for BpkBox component
|
|
96
|
+
* Combines Box-specific props with Backpack common layout props
|
|
97
|
+
* and reintroduces a minimal set of interaction props.
|
|
98
|
+
*/
|
|
99
|
+
type BoxEventProps = Pick<BoxProps, 'onClick' | 'onFocus' | 'onBlur'>;
|
|
100
|
+
export interface BpkBoxProps extends BpkCommonLayoutProps, BpkBoxSpecificProps {
|
|
101
|
+
children?: ReactNode;
|
|
102
|
+
onClick?: BoxEventProps['onClick'];
|
|
103
|
+
onFocus?: BoxEventProps['onFocus'];
|
|
104
|
+
onBlur?: BoxEventProps['onBlur'];
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Valid HTML elements that can be used with BpkVessel
|
|
108
|
+
*/
|
|
109
|
+
export type VesselElement = 'div' | 'span' | 'section' | 'article' | 'nav' | 'main' | 'aside' | 'header' | 'footer';
|
|
110
|
+
/**
|
|
111
|
+
* Props for BpkVessel component.
|
|
112
|
+
*
|
|
113
|
+
* BpkVessel is a "migration hatch" that renders an HTML element
|
|
114
|
+
* and accepts all standard HTML attributes for maximum migration flexibility.
|
|
115
|
+
*
|
|
116
|
+
* Accepts all React.HTMLAttributes including:
|
|
117
|
+
* - Styling: className, style
|
|
118
|
+
* - Testing: data-testid, data-cy, data-*
|
|
119
|
+
* - Accessibility: aria-*, role, tabIndex
|
|
120
|
+
* - Basic HTML: id, title, dir, lang, hidden, etc.
|
|
121
|
+
* - All standard DOM events: onClick, onChange, onFocus, etc.
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* ```tsx
|
|
125
|
+
* <BpkVessel
|
|
126
|
+
* className="legacy-wrapper"
|
|
127
|
+
* style={{ padding: '16px', transition: 'opacity 0.3s' }}
|
|
128
|
+
* data-testid="migration-wrapper"
|
|
129
|
+
* onClick={handleClick}
|
|
130
|
+
* >
|
|
131
|
+
* Content
|
|
132
|
+
* </BpkVessel>
|
|
133
|
+
*
|
|
134
|
+
* <BpkVessel
|
|
135
|
+
* as="section"
|
|
136
|
+
* className="legacy-section"
|
|
137
|
+
* aria-label="Main content"
|
|
138
|
+
* role="region"
|
|
139
|
+
* dir="rtl"
|
|
140
|
+
* >
|
|
141
|
+
* Section Content
|
|
142
|
+
* </BpkVessel>
|
|
143
|
+
* ```
|
|
144
|
+
*/
|
|
145
|
+
export type BpkVesselProps = {
|
|
146
|
+
as?: VesselElement;
|
|
147
|
+
} & React.HTMLAttributes<HTMLElement>;
|
|
148
|
+
/**
|
|
149
|
+
* Component-specific props for BpkFlex
|
|
150
|
+
* Includes all Flex props except those in BpkCommonLayoutProps
|
|
151
|
+
*/
|
|
152
|
+
export interface BpkFlexSpecificProps extends RemoveCommonProps<FlexProps> {
|
|
153
|
+
direction?: BpkResponsiveValue<FlexProps['flexDirection']>;
|
|
154
|
+
justify?: BpkResponsiveValue<FlexProps['justifyContent']>;
|
|
155
|
+
align?: BpkResponsiveValue<FlexProps['alignItems']>;
|
|
156
|
+
wrap?: BpkResponsiveValue<FlexProps['flexWrap']>;
|
|
157
|
+
grow?: BpkResponsiveValue<FlexProps['flexGrow']>;
|
|
158
|
+
shrink?: BpkResponsiveValue<FlexProps['flexShrink']>;
|
|
159
|
+
basis?: BpkResponsiveValue<BpkBasisValue>;
|
|
160
|
+
inline?: boolean;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Props for BpkFlex component
|
|
164
|
+
* Combines Flex-specific props with Backpack common layout props
|
|
165
|
+
*/
|
|
166
|
+
export interface BpkFlexProps extends BpkCommonLayoutProps, BpkFlexSpecificProps {
|
|
167
|
+
children?: ReactNode;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Component-specific props for BpkGrid
|
|
171
|
+
* Includes all Grid props except those in BpkCommonLayoutProps
|
|
172
|
+
*/
|
|
173
|
+
export interface BpkGridSpecificProps extends RemoveCommonProps<GridProps> {
|
|
174
|
+
justify?: BpkResponsiveValue<GridProps['justifyContent']>;
|
|
175
|
+
align?: BpkResponsiveValue<GridProps['alignItems']>;
|
|
176
|
+
templateColumns?: BpkResponsiveValue<GridProps['gridTemplateColumns']>;
|
|
177
|
+
templateRows?: BpkResponsiveValue<GridProps['gridTemplateRows']>;
|
|
178
|
+
templateAreas?: BpkResponsiveValue<GridProps['gridTemplateAreas']>;
|
|
179
|
+
autoFlow?: BpkResponsiveValue<GridProps['gridAutoFlow']>;
|
|
180
|
+
autoRows?: BpkResponsiveValue<GridProps['gridAutoRows']>;
|
|
181
|
+
autoColumns?: BpkResponsiveValue<GridProps['gridAutoColumns']>;
|
|
182
|
+
rowGap?: BpkResponsiveValue<BpkSpacingValue>;
|
|
183
|
+
columnGap?: BpkResponsiveValue<BpkSpacingValue>;
|
|
184
|
+
column?: BpkResponsiveValue<GridProps['gridColumn']>;
|
|
185
|
+
row?: BpkResponsiveValue<GridProps['gridRow']>;
|
|
186
|
+
inline?: boolean;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Props for BpkGrid component
|
|
190
|
+
* Combines Grid-specific props with Backpack common layout props
|
|
191
|
+
*/
|
|
192
|
+
export interface BpkGridProps extends BpkCommonLayoutProps, BpkGridSpecificProps {
|
|
193
|
+
children?: ReactNode;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Component-specific props for BpkGridItem
|
|
197
|
+
* Includes all GridItem props except those in BpkCommonLayoutProps
|
|
198
|
+
*/
|
|
199
|
+
export interface BpkGridItemSpecificProps extends RemoveCommonProps<GridItemProps> {
|
|
200
|
+
area?: GridItemProps['area'];
|
|
201
|
+
colEnd?: GridItemProps['colEnd'];
|
|
202
|
+
colStart?: GridItemProps['colStart'];
|
|
203
|
+
colSpan?: GridItemProps['colSpan'];
|
|
204
|
+
rowEnd?: GridItemProps['rowEnd'];
|
|
205
|
+
rowStart?: GridItemProps['rowStart'];
|
|
206
|
+
rowSpan?: GridItemProps['rowSpan'];
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Props for BpkGridItem component
|
|
210
|
+
* Combines GridItem-specific props with Backpack common layout props
|
|
211
|
+
*/
|
|
212
|
+
export interface BpkGridItemProps extends BpkCommonLayoutProps, BpkGridItemSpecificProps {
|
|
213
|
+
children?: ReactNode;
|
|
214
|
+
}
|
|
215
|
+
type StackOptionKeysType = typeof StackOptionKeys[number];
|
|
216
|
+
/**
|
|
217
|
+
* Overrides StackOptions to support BpkResponsiveValue
|
|
218
|
+
*/
|
|
219
|
+
type BpkStackOptions = {
|
|
220
|
+
[K in StackOptionKeysType]?: K extends keyof StackProps ? BpkResponsiveValue<StackProps[K]> | StackProps[K] : never;
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* Component-specific props for BpkStack
|
|
224
|
+
* Includes all Stack props except those in BpkCommonLayoutProps
|
|
225
|
+
* Overrides StackOptions to support BpkResponsiveValue
|
|
226
|
+
*/
|
|
227
|
+
export interface BpkStackSpecificProps extends Omit<RemoveCommonProps<StackProps>, StackOptionKeysType>, BpkStackOptions, BpkFlexGridProps {
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Props for BpkStack component
|
|
231
|
+
* Combines Stack-specific props with Backpack common layout props
|
|
232
|
+
*/
|
|
233
|
+
export interface BpkStackProps extends BpkCommonLayoutProps, BpkStackSpecificProps {
|
|
234
|
+
children?: ReactNode;
|
|
235
|
+
}
|
|
236
|
+
export type { BpkCommonLayoutProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 themeAttributes from "./themeAttributes";
|
|
21
21
|
import STYLES from "./BpkLink.module.css";
|
|
22
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -60,6 +60,7 @@ const BpkButtonLink = ({
|
|
|
60
60
|
return /*#__PURE__*/_jsx("button", {
|
|
61
61
|
type: "button",
|
|
62
62
|
className: classNames.join(' '),
|
|
63
|
+
...getDataComponentAttribute('ButtonLink'),
|
|
63
64
|
onClick: onClick,
|
|
64
65
|
...rest,
|
|
65
66
|
children: /*#__PURE__*/_jsx("span", {
|
|
@@ -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 "./BpkLink.module.css";
|
|
22
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
23
|
const getClassName = cssModules(STYLES);
|
|
@@ -103,6 +103,7 @@ const BpkLinkInner = ({
|
|
|
103
103
|
className: linkClassName,
|
|
104
104
|
ref: ref,
|
|
105
105
|
...elementProps,
|
|
106
|
+
...getDataComponentAttribute('Link'),
|
|
106
107
|
children: /*#__PURE__*/_jsx("span", {
|
|
107
108
|
className: underlinedClassName,
|
|
108
109
|
children: children
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
|
-
*/
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import BpkList from "./src/BpkList";
|
|
18
20
|
import BpkListItem from "./src/BpkListItem";
|
|
19
21
|
export { BpkList, BpkListItem };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type Props = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
ordered?: boolean;
|
|
5
|
+
className?: string | null;
|
|
6
|
+
ariaLabel?: string;
|
|
7
|
+
ariaLabelledby?: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const BpkList: ({ ariaLabel, ariaLabelledby, children, className, ordered, title, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default BpkList;
|
|
@@ -14,35 +14,30 @@
|
|
|
14
14
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
|
-
*/
|
|
17
|
+
*/
|
|
18
|
+
|
|
18
19
|
import { cssModules } from "../../bpk-react-utils";
|
|
19
20
|
import STYLES from "./BpkList.module.css";
|
|
20
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
22
|
const getClassName = cssModules(STYLES);
|
|
22
23
|
const BpkList = ({
|
|
23
|
-
ariaLabel
|
|
24
|
-
ariaLabelledby
|
|
24
|
+
ariaLabel,
|
|
25
|
+
ariaLabelledby,
|
|
25
26
|
children,
|
|
26
27
|
className = null,
|
|
27
28
|
ordered = false,
|
|
28
|
-
title
|
|
29
|
+
title
|
|
29
30
|
}) => {
|
|
30
|
-
const
|
|
31
|
+
const ListElement = ordered ? 'ol' : 'ul';
|
|
31
32
|
const classNames = getClassName('bpk-list', className);
|
|
32
|
-
return /*#__PURE__*/_jsx(
|
|
33
|
+
return /*#__PURE__*/_jsx(ListElement, {
|
|
33
34
|
"aria-label": ariaLabel,
|
|
34
35
|
"aria-labelledby": ariaLabelledby,
|
|
35
|
-
title: title
|
|
36
|
+
title: title
|
|
37
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props -- className is required to apply Bpk list styles and allow optional consumer-supplied classes
|
|
38
|
+
,
|
|
36
39
|
className: classNames,
|
|
37
40
|
children: children
|
|
38
41
|
});
|
|
39
42
|
};
|
|
40
|
-
BpkList.propTypes = {
|
|
41
|
-
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,
|
|
42
|
-
ordered: PropTypes.bool,
|
|
43
|
-
className: PropTypes.string,
|
|
44
|
-
ariaLabel: PropTypes.string,
|
|
45
|
-
ariaLabelledby: PropTypes.string,
|
|
46
|
-
title: PropTypes.string
|
|
47
|
-
};
|
|
48
43
|
export default BpkList;
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
|
-
*/
|
|
17
|
+
*/
|
|
18
|
+
|
|
18
19
|
import { cssModules } from "../../bpk-react-utils";
|
|
19
20
|
import STYLES from "./BpkList.module.css";
|
|
20
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -29,8 +30,4 @@ const BpkListItem = ({
|
|
|
29
30
|
children: children
|
|
30
31
|
});
|
|
31
32
|
};
|
|
32
|
-
BpkListItem.propTypes = {
|
|
33
|
-
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,
|
|
34
|
-
className: PropTypes.string
|
|
35
|
-
};
|
|
36
33
|
export default BpkListItem;
|
|
@@ -21,7 +21,7 @@ import { withButtonAlignment, withLargeButtonAlignment, withRtlSupport } from ".
|
|
|
21
21
|
import ArrowIconLg from "../../bpk-component-icon/lg/long-arrow-right";
|
|
22
22
|
import ArrowIconSm from "../../bpk-component-icon/sm/long-arrow-right";
|
|
23
23
|
import { BpkSpinner, BpkLargeSpinner } from "../../bpk-component-spinner";
|
|
24
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
24
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
25
25
|
import STYLES from "./BpkLoadingButton.module.css";
|
|
26
26
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
27
|
const getClassName = cssModules(STYLES);
|
|
@@ -113,6 +113,7 @@ const BpkLoadingButton = props => {
|
|
|
113
113
|
disabled: showBtnDisabled,
|
|
114
114
|
size: large ? SIZE_TYPES.large : SIZE_TYPES.small,
|
|
115
115
|
type: type,
|
|
116
|
+
...getDataComponentAttribute('LoadingButton'),
|
|
116
117
|
...rest,
|
|
117
118
|
children: /*#__PURE__*/_jsxs("div", {
|
|
118
119
|
className: getClassName('bpk-loading-button__container'),
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
import { Component } from 'react';
|
|
20
20
|
import debounce from 'lodash/debounce';
|
|
21
|
-
import { cssModules, isRTL } from "../../bpk-react-utils";
|
|
21
|
+
import { cssModules, isRTL, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
22
22
|
import STYLES from "./BpkMobileScrollContainer.module.css";
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
const getClassName = cssModules(STYLES);
|
|
@@ -131,6 +131,7 @@ class BpkMobileScrollContainer extends Component {
|
|
|
131
131
|
...style,
|
|
132
132
|
height: this.state.computedHeight
|
|
133
133
|
},
|
|
134
|
+
...getDataComponentAttribute('MobileScrollContainer'),
|
|
134
135
|
children: /*#__PURE__*/_jsx("div", {
|
|
135
136
|
ref: el => {
|
|
136
137
|
if (scrollerRef) {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { Portal, cssModules, isDeviceIphone } from "../../bpk-react-utils";
|
|
19
|
+
import { Portal, cssModules, isDeviceIphone, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
20
20
|
import { withScrim } from "../../bpk-scrim-utils";
|
|
21
21
|
import BpkModalInner, { MODAL_STYLING } from "./BpkModalInner";
|
|
22
22
|
import STYLES from "./BpkModal.module.css";
|
|
@@ -74,6 +74,7 @@ const BpkModal = ({
|
|
|
74
74
|
accessoryView: accessoryView,
|
|
75
75
|
dialogRef: dialogRef,
|
|
76
76
|
modalStyle: modalStyle,
|
|
77
|
+
...getDataComponentAttribute('Modal'),
|
|
77
78
|
...rest
|
|
78
79
|
})
|
|
79
80
|
});
|
|
@@ -21,7 +21,7 @@ import { useEffect, useRef } from 'react';
|
|
|
21
21
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
22
22
|
import BpkCloseButton from "../../../bpk-component-close-button";
|
|
23
23
|
import BpkText, { TEXT_STYLES } from "../../../bpk-component-text";
|
|
24
|
-
import { cssModules, withDefaultProps } from "../../../bpk-react-utils";
|
|
24
|
+
import { cssModules, withDefaultProps, getDataComponentAttribute } from "../../../bpk-react-utils";
|
|
25
25
|
import { MODAL_STYLING } from "../BpkModalInner";
|
|
26
26
|
import STYLES from "./BpKModal.module.css";
|
|
27
27
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -137,6 +137,7 @@ export const BpkModalV2 = props => {
|
|
|
137
137
|
const contentClassNames = getClassName('bpk-modal__container', fullScreenOnDesktop && 'bpk-modal__container--full-screen-desktop', padded && 'bpk-modal__container--padded', modalStyle === MODAL_STYLING.surfaceContrast && 'bpk-modal__container--surface-contrast');
|
|
138
138
|
return isOpen ? /*#__PURE__*/_jsxs("div", {
|
|
139
139
|
className: getClassName('bpk-modal-wrapper', dialogSupported ? '' : 'bpk-modal-polyfill'),
|
|
140
|
+
...getDataComponentAttribute('ModalV2'),
|
|
140
141
|
children: [!dialogSupported && /*#__PURE__*/_jsx("div", {
|
|
141
142
|
id: `${id}-polyfill`,
|
|
142
143
|
className: getClassName('bpk-modal-backdrop'),
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
|
|
20
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
20
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
21
21
|
import STYLES from "./BpkNavigationBar.module.css";
|
|
22
22
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
23
|
const getClassNames = cssModules(STYLES);
|
|
@@ -45,6 +45,7 @@ const BpkNavigationBar = props => {
|
|
|
45
45
|
return /*#__PURE__*/_jsxs("nav", {
|
|
46
46
|
"aria-labelledby": titleId,
|
|
47
47
|
className: getClassNames('bpk-navigation-bar', `bpk-navigation-bar--${barStyle}`, sticky && 'bpk-navigation-bar__sticky', className),
|
|
48
|
+
...getDataComponentAttribute('NavigationBar'),
|
|
48
49
|
...rest,
|
|
49
50
|
children: [leadingButton && /*#__PURE__*/_jsx("div", {
|
|
50
51
|
className: getClassNames('bpk-navigation-bar__leading-item', `bpk-navigation-bar__leading-item--${barStyle}`),
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import BpkLink from "../../bpk-component-link";
|
|
20
|
+
import { getDataComponentAttribute } from "../../bpk-react-utils";
|
|
20
21
|
import { BAR_STYLES } from "./BpkNavigationBar";
|
|
21
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
23
|
const BpkNavigationBarButtonLink = ({
|
|
@@ -26,6 +27,7 @@ const BpkNavigationBarButtonLink = ({
|
|
|
26
27
|
...rest
|
|
27
28
|
}) => /*#__PURE__*/_jsx("span", {
|
|
28
29
|
className: className,
|
|
30
|
+
...getDataComponentAttribute('NavigationBarButtonLink'),
|
|
29
31
|
children: /*#__PURE__*/_jsx(BpkLink, {
|
|
30
32
|
as: "button",
|
|
31
33
|
alternate: barStyle === BAR_STYLES.onDark,
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
20
20
|
import BpkCloseButton from "../../bpk-component-close-button";
|
|
21
|
+
import { getDataComponentAttribute } from "../../bpk-react-utils";
|
|
21
22
|
import { BAR_STYLES } from "./BpkNavigationBar";
|
|
22
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
24
|
const BpkNavigationBarIconButton = ({
|
|
@@ -27,6 +28,7 @@ const BpkNavigationBarIconButton = ({
|
|
|
27
28
|
...rest
|
|
28
29
|
}) => /*#__PURE__*/_jsx("span", {
|
|
29
30
|
className: className,
|
|
31
|
+
...getDataComponentAttribute('NavigationBarIconButton'),
|
|
30
32
|
children: /*#__PURE__*/_jsx(BpkCloseButton, {
|
|
31
33
|
customIcon: icon,
|
|
32
34
|
onDark: barStyle === BAR_STYLES.onDark,
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
import { useState } from 'react';
|
|
20
20
|
import BpkBubble from "../../bpk-component-bubble/src/BpkBubble";
|
|
21
21
|
import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
|
|
22
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
22
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
23
23
|
import STYLES from "./BpkNavigationTabGroup.module.css";
|
|
24
24
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
25
25
|
const getClassName = cssModules(STYLES);
|
|
@@ -76,6 +76,7 @@ const BpkNavigationTabGroup = ({
|
|
|
76
76
|
className: containerStyling,
|
|
77
77
|
role: "navigation",
|
|
78
78
|
"aria-label": ariaLabel,
|
|
79
|
+
...getDataComponentAttribute('NavigationTabGroup'),
|
|
79
80
|
children: /*#__PURE__*/_jsx("div", {
|
|
80
81
|
role: "tablist",
|
|
81
82
|
className: getClassName('bpk-navigation-tab-list'),
|
|
@@ -23,7 +23,7 @@ import MinusIcon from "../../bpk-component-icon/sm/minus";
|
|
|
23
23
|
import PlusIcon from "../../bpk-component-icon/sm/plus";
|
|
24
24
|
import BpkLabel from "../../bpk-component-label";
|
|
25
25
|
import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
|
|
26
|
-
import { cssModules, setNativeValue } from "../../bpk-react-utils";
|
|
26
|
+
import { cssModules, setNativeValue, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
27
27
|
import STYLES from "./BpkNudger.module.css";
|
|
28
28
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
29
|
const getClassName = cssModules(STYLES);
|
|
@@ -133,6 +133,7 @@ const BpkNudger = ({
|
|
|
133
133
|
valueLimitter(inputElement);
|
|
134
134
|
},
|
|
135
135
|
className: inputClassNames,
|
|
136
|
+
...getDataComponentAttribute('Nudger'),
|
|
136
137
|
...rest
|
|
137
138
|
}), /*#__PURE__*/_jsx(BpkButton, {
|
|
138
139
|
type: BUTTON_TYPES[buttonType],
|
|
@@ -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 "./BpkOverlay.module.css";
|
|
21
21
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
22
|
const getClassName = cssModules(STYLES);
|
|
@@ -74,6 +74,7 @@ const BpkOverlay = props => {
|
|
|
74
74
|
const overlayClassNames = getClassName('bpk-overlay__overlay', overlayType !== undefined && overlayType !== null && overlayType !== OVERLAY_TYPES.off && `bpk-overlay__overlay--${overlayTypeClassSuffixes[overlayType]}`);
|
|
75
75
|
return /*#__PURE__*/_jsxs("div", {
|
|
76
76
|
className: wrapperClassNames,
|
|
77
|
+
...getDataComponentAttribute('Overlay'),
|
|
77
78
|
...rest,
|
|
78
79
|
children: [children, /*#__PURE__*/_jsx("div", {
|
|
79
80
|
className: overlayClassNames,
|
|
@@ -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 "./BpkPanel.module.css";
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
const getClassName = cssModules(STYLES);
|
|
@@ -47,6 +47,7 @@ const BpkPanel = ({
|
|
|
47
47
|
}
|
|
48
48
|
return /*#__PURE__*/_jsx("section", {
|
|
49
49
|
className: classNames.join(' '),
|
|
50
|
+
...getDataComponentAttribute('Panel'),
|
|
50
51
|
...rest,
|
|
51
52
|
children: children
|
|
52
53
|
});
|
|
@@ -24,7 +24,7 @@ import { surfaceHighlightDay } from '@skyscanner/bpk-foundations-web/tokens/base
|
|
|
24
24
|
import BpkCloseButton from "../../bpk-component-close-button";
|
|
25
25
|
import BpkLink from "../../bpk-component-link";
|
|
26
26
|
import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
|
|
27
|
-
import { TransitionInitialMount, cssModules } from "../../bpk-react-utils";
|
|
27
|
+
import { TransitionInitialMount, cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
28
28
|
import { ARROW_ID } from "./constants";
|
|
29
29
|
import STYLES from "./BpkPopover.module.css";
|
|
30
30
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -156,6 +156,7 @@ const BpkPopover = ({
|
|
|
156
156
|
role: "dialog",
|
|
157
157
|
"aria-labelledby": labelId,
|
|
158
158
|
className: classNames,
|
|
159
|
+
...getDataComponentAttribute('Popover'),
|
|
159
160
|
...rest,
|
|
160
161
|
children: [showArrow && /*#__PURE__*/_jsx(FloatingArrow, {
|
|
161
162
|
ref: arrowRef,
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
import clamp from 'lodash.clamp';
|
|
20
20
|
import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
|
|
21
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
21
|
+
import { cssModules, getDataComponentAttribute } from "../../bpk-react-utils";
|
|
22
22
|
import { RATING_SIZES, RATING_SCALES } from "./common-types";
|
|
23
23
|
import STYLES from "./BpkRating.module.css";
|
|
24
24
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -73,6 +73,7 @@ const BpkRating = ({
|
|
|
73
73
|
}
|
|
74
74
|
return /*#__PURE__*/_jsxs("div", {
|
|
75
75
|
className: classNames,
|
|
76
|
+
...getDataComponentAttribute('Rating'),
|
|
76
77
|
"aria-label": ariaLabel,
|
|
77
78
|
role: "figure",
|
|
78
79
|
...rest,
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
import { Component } from 'react';
|
|
20
20
|
import BpkLink from "../../bpk-component-link";
|
|
21
|
+
import { getDataComponentAttribute } from "../../bpk-react-utils";
|
|
21
22
|
import { getHtmlElement, DIRECTIONS, DIRECTION_CHANGE_EVENT } from "./utils";
|
|
22
23
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
24
|
const getDirection = () => {
|
|
@@ -63,6 +64,7 @@ class BpkRtlToggle extends Component {
|
|
|
63
64
|
as: "button",
|
|
64
65
|
title: "Keyboard Shortcut: ctrl + cmd + r",
|
|
65
66
|
onClick: this.toggleRtl,
|
|
67
|
+
...getDataComponentAttribute('RtlToggle'),
|
|
66
68
|
children: ["RTL ", onOrOff]
|
|
67
69
|
});
|
|
68
70
|
}
|
|
@@ -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 "./BpkSectionHeader.module.css";
|
|
22
22
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
23
|
const getClassName = cssModules(STYLES);
|
|
@@ -32,6 +32,7 @@ const BpkSectionHeader = ({
|
|
|
32
32
|
type = SECTION_TYPES.default
|
|
33
33
|
}) => /*#__PURE__*/_jsxs("div", {
|
|
34
34
|
className: getClassName('bpk-section-header'),
|
|
35
|
+
...getDataComponentAttribute('SectionHeader'),
|
|
35
36
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
36
37
|
className: getClassName('bpk-section-header__title-description', `bpk-section-header__title-description--${type}`),
|
|
37
38
|
children: [/*#__PURE__*/_jsx("h2", {
|