@skyscanner/backpack-web 33.4.0 → 34.0.0-premajor
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-accordion/index.js +1 -1
- package/bpk-component-accordion/src/BpkAccordionItem.js +12 -12
- package/bpk-component-accordion/src/BpkAccordionItem.module.css +1 -1
- package/bpk-component-autosuggest/src/BpkAutosuggestSuggestion.js +4 -1
- package/bpk-component-banner-alert/index.js +1 -1
- package/bpk-component-banner-alert/src/AnimateAndFade.js +33 -31
- package/bpk-component-banner-alert/src/BpkBannerAlertInner.js +11 -4
- package/bpk-component-barchart/src/BpkBarchart.js +8 -8
- package/bpk-component-bottom-sheet/src/BpkBottomSheet.js +3 -3
- package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.js +17 -12
- package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.module.css +1 -1
- package/bpk-component-button/index.js +5 -5
- package/bpk-component-button/src/BpkButtonDestructive.js +10 -9
- package/bpk-component-button/src/BpkButtonFeatured.js +10 -9
- package/bpk-component-button/src/BpkButtonLink.js +11 -10
- package/bpk-component-button/src/BpkButtonLinkOnDark.js +11 -10
- package/bpk-component-button/src/BpkButtonPrimary.js +2 -2
- package/bpk-component-button/src/BpkButtonPrimaryOnDark.js +10 -9
- package/bpk-component-button/src/BpkButtonPrimaryOnLight.js +10 -9
- package/bpk-component-button/src/BpkButtonSecondary.js +10 -10
- package/bpk-component-button/src/BpkButtonSecondaryOnDark.js +10 -9
- package/bpk-component-calendar/index.js +1 -1
- package/bpk-component-calendar/src/BpkCalendarContainer.js +3 -3
- package/bpk-component-calendar/src/BpkCalendarGrid.js +2 -2
- package/bpk-component-calendar/src/BpkCalendarGrid.module.css +1 -1
- package/bpk-component-calendar/src/BpkCalendarGridHeader.js +4 -1
- package/bpk-component-calendar/src/BpkCalendarGridTransition.js +5 -2
- package/bpk-component-calendar/src/BpkCalendarNav.js +9 -3
- package/bpk-component-calendar/src/Week.js +6 -3
- package/bpk-component-calendar/src/composeCalendar.js +8 -2
- package/bpk-component-calendar/src/date-utils.js +14 -14
- package/bpk-component-card/src/BpkDividedCard.js +18 -13
- package/bpk-component-card-button/src/BpkSaveButton.js +13 -4
- package/bpk-component-chip/index.d.ts +3 -5
- package/bpk-component-chip/index.js +3 -2
- package/bpk-component-chip/src/BpkDismissibleChip.js +7 -2
- package/bpk-component-chip/src/BpkIconChip.d.ts +25 -0
- package/bpk-component-chip/src/BpkIconChip.js +31 -0
- package/bpk-component-chip/src/BpkSelectableChip.d.ts +0 -2
- package/bpk-component-chip/src/BpkSelectableChip.js +3 -3
- package/bpk-component-chip/src/BpkSelectableChip.module.css +1 -1
- package/bpk-component-chip/src/commonTypes.d.ts +1 -1
- package/bpk-component-chip/src/commonTypes.js +1 -24
- package/bpk-component-content-cards/src/BpkContentCard.js +8 -2
- package/bpk-component-datatable/src/BpkDataTable.js +1 -1
- package/bpk-component-datatable/src/BpkDataTableHeader.js +12 -8
- package/bpk-component-datatable/src/BpkDataTableHeader.module.css +1 -1
- package/bpk-component-datepicker/src/BpkDatepicker.js +2 -2
- package/bpk-component-description-list/index.js +1 -1
- package/bpk-component-description-list/src/ComponentFactory.js +10 -5
- package/bpk-component-dialog/src/BpkDialog.js +6 -4
- package/bpk-component-dialog/src/BpkDialog.module.css +1 -1
- package/bpk-component-dialog/src/BpkDialogInner.js +6 -3
- package/bpk-component-drawer/src/BpkDrawer.js +1 -4
- package/bpk-component-drawer/src/BpkDrawerContent.js +7 -5
- package/bpk-component-fieldset/src/BpkFieldset.js +9 -7
- package/bpk-component-flare/index.js +2 -2
- package/bpk-component-flare/src/BpkContentBubble.js +4 -1
- package/bpk-component-flare/src/BpkFlareBar.js +13 -4
- package/bpk-component-flare/src/__generated__/corner-radius.d.ts +6 -0
- package/bpk-component-flare/src/__generated__/pointer.d.ts +6 -0
- package/bpk-component-floating-notification/src/BpkFloatingNotification.js +8 -2
- package/bpk-component-form-validation/src/BpkFormValidation.js +5 -4
- package/bpk-component-graphic-promotion/src/BpkGraphicPromo.js +9 -11
- package/bpk-component-graphic-promotion/src/BpkGraphicPromo.module.css +1 -1
- package/bpk-component-grid-toggle/src/BpkGridToggle.js +8 -6
- package/bpk-component-horizontal-nav/src/BpkHorizontalNav.js +16 -14
- package/bpk-component-horizontal-nav/src/BpkHorizontalNav.module.css +1 -1
- package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.js +2 -2
- package/bpk-component-icon/index.js +1 -1
- package/bpk-component-icon/src/classNameModifierHOCFactory.js +3 -0
- package/bpk-component-image/index.js +2 -2
- package/bpk-component-image/src/BpkBackgroundImage.js +2 -1
- package/bpk-component-image/src/BpkImage.js +2 -1
- package/bpk-component-infinite-scroll/src/withInfiniteScroll.js +3 -3
- package/bpk-component-info-banner/src/AnimateAndFade.js +33 -31
- package/bpk-component-info-banner/src/BpkInfoBanner.module.css +1 -1
- package/bpk-component-info-banner/src/BpkInfoBannerInner.js +16 -12
- package/bpk-component-input/index.js +1 -1
- package/bpk-component-input/src/BpkClearButton.js +3 -1
- package/bpk-component-input/src/BpkInput.js +4 -1
- package/bpk-component-input/src/withOpenEvents.js +4 -1
- package/bpk-component-link/index.js +2 -2
- package/bpk-component-list/src/BpkList.js +4 -1
- package/bpk-component-loading-button/src/BpkLoadingButton.js +6 -3
- package/bpk-component-map/index.js +4 -4
- package/bpk-component-map/src/BpkIconMarker.js +1 -1
- package/bpk-component-map/src/BpkMap.js +2 -2
- package/bpk-component-map/src/BpkPriceMarker.js +7 -5
- package/bpk-component-map/src/BpkPriceMarkerV2/BpkPriceMarker.js +1 -1
- package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.js +4 -1
- package/bpk-component-modal/index.js +4 -3
- package/bpk-component-modal/src/BpkModal.d.ts +2 -1
- package/bpk-component-modal/src/BpkModal.js +8 -3
- package/bpk-component-modal/src/BpkModalInner.d.ts +2 -0
- package/bpk-component-modal/src/BpkModalInner.js +24 -8
- package/bpk-component-modal/src/BpkModalInner.module.css +1 -1
- package/bpk-component-modal/src/BpkModalV2/BpKModal.module.css +1 -1
- package/bpk-component-modal/src/BpkModalV2/BpkModal.d.ts +2 -0
- package/bpk-component-modal/src/BpkModalV2/BpkModal.js +19 -8
- package/bpk-component-navigation-bar/index.js +1 -1
- package/bpk-component-navigation-bar/src/BpkNavigationBar.js +7 -5
- package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.js +4 -1
- package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.js +4 -1
- package/bpk-component-nudger/index.js +1 -1
- package/bpk-component-nudger/src/BpkConfigurableNudger.js +16 -4
- package/bpk-component-nudger/src/BpkNudger.js +16 -5
- package/bpk-component-page-indicator/src/BpkPageIndicator.module.css +1 -1
- package/bpk-component-page-indicator/src/NavButton.js +1 -1
- package/bpk-component-pagination/src/BpkPaginationList.js +1 -1
- package/bpk-component-pagination/src/BpkPaginationNudger.js +13 -4
- package/bpk-component-pagination/src/BpkPaginationPage.js +4 -1
- package/bpk-component-phone-input/src/BpkPhoneInput.js +15 -4
- package/bpk-component-popover/src/BpkPopover.js +105 -61
- package/bpk-component-popover/src/BpkPopoverPortal.js +121 -115
- package/bpk-component-popover/src/keyboardFocusScope.js +1 -1
- package/bpk-component-price/src/BpkPrice.js +17 -5
- package/bpk-component-rating/src/BpkRating.js +17 -5
- package/bpk-component-rtl-toggle/src/BpkRtlToggle.js +4 -1
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.js +6 -3
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +6 -3
- package/bpk-component-section-header/src/BpkSectionHeader.js +9 -3
- package/bpk-component-section-list/index.js +1 -1
- package/bpk-component-section-list/src/BpkSectionListItem.js +10 -4
- package/bpk-component-section-list/src/BpkSectionListSection.js +1 -1
- package/bpk-component-slider/src/BpkSlider.js +4 -1
- package/bpk-component-spinner/index.js +3 -3
- package/bpk-component-spinner/src/BpkExtraLargeSpinner.js +7 -4
- package/bpk-component-spinner/src/BpkLargeSpinner.js +7 -4
- package/bpk-component-spinner/src/BpkSpinner.js +7 -4
- package/bpk-component-split-input/src/BpkInputField.js +2 -2
- package/bpk-component-split-input/src/BpkSplitInput.js +3 -3
- package/bpk-component-star-rating/index.js +4 -4
- package/bpk-component-star-rating/src/BpkInteractiveStar.js +6 -2
- package/bpk-component-star-rating/src/BpkInteractiveStarRating.js +1 -1
- package/bpk-component-star-rating/src/BpkStar.js +22 -15
- package/bpk-component-swap-button/src/BpkSwapButton.js +2 -1
- package/bpk-component-table/index.js +2 -2
- package/bpk-component-text/src/BpkText.js +10 -5
- package/bpk-component-theme-toggle/src/BpkThemeToggle.js +4 -1
- package/bpk-component-theme-toggle/src/updateOnThemeChange.js +1 -1
- package/bpk-component-tooltip/src/BpkTooltipPortal.js +4 -1
- package/bpk-mixins/_chips.scss +9 -0
- package/bpk-react-utils/index.js +3 -3
- package/bpk-react-utils/src/withDefaultProps.js +4 -1
- package/bpk-scrim-utils/src/withScrimmedPortal.js +1 -1
- package/bpk-theming/src/BpkThemeProvider.js +1 -1
- package/package.json +5 -3
- package/unstable__bpk-mixins/_chips.scss +9 -0
- package/bpk-component-button/src/commonButtonTests.js +0 -133
|
@@ -22,9 +22,10 @@ import { TransitionGroup, CSSTransition } from 'react-transition-group';
|
|
|
22
22
|
|
|
23
23
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
24
24
|
import { durationSm } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
27
27
|
import BpkAnimateHeight from "../../bpk-animate-height";
|
|
28
|
+
import { cssModules } from "../../bpk-react-utils";
|
|
28
29
|
import STYLES from "./BpkAnimateAndFade.module.css";
|
|
29
30
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
30
31
|
const getClassName = cssModules(STYLES);
|
|
@@ -32,8 +33,7 @@ const ANIMATION_DURATION = parseInt(durationSm, 10);
|
|
|
32
33
|
class AnimateAndFade extends Component {
|
|
33
34
|
static defaultProps = {
|
|
34
35
|
animateOnEnter: false,
|
|
35
|
-
animateOnLeave: false
|
|
36
|
-
className: null
|
|
36
|
+
animateOnLeave: false
|
|
37
37
|
};
|
|
38
38
|
constructor(props) {
|
|
39
39
|
super(props);
|
|
@@ -110,37 +110,39 @@ class AnimateAndFade extends Component {
|
|
|
110
110
|
// While the expanding animation takes place, we render the child element
|
|
111
111
|
// close to invisible. If we don't do this, the animate-height container
|
|
112
112
|
// will take on height 0, and will never expand to allow the children to fade in
|
|
113
|
-
return this.state.inDom ? /*#__PURE__*/
|
|
113
|
+
return this.state.inDom ? /*#__PURE__*/_jsx("div", {
|
|
114
114
|
className: className,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
children: children
|
|
123
|
-
}), /*#__PURE__*/_jsx(TransitionGroup, {
|
|
124
|
-
exit: animateOnLeave,
|
|
125
|
-
enter: animateOnEnter,
|
|
126
|
-
appear: animateOnEnter,
|
|
127
|
-
onTransitionEnd: this.onFadeComplete,
|
|
128
|
-
children: this.state.visible && /*#__PURE__*/_jsx(CSSTransition, {
|
|
129
|
-
classNames: {
|
|
130
|
-
exit: getClassName('bpk-animate-and-fade--leave'),
|
|
131
|
-
exitActive: getClassName('bpk-animate-and-fade--leave-active'),
|
|
132
|
-
enter: getClassName('bpk-animate-and-fade--enter'),
|
|
133
|
-
enterActive: getClassName('bpk-animate-and-fade--enter-active'),
|
|
134
|
-
appear: getClassName('bpk-animate-and-fade--appear'),
|
|
135
|
-
appearActive: getClassName('bpk-animate-and-fade--appear-active')
|
|
136
|
-
},
|
|
137
|
-
timeout: {
|
|
138
|
-
enter: ANIMATION_DURATION * 2,
|
|
139
|
-
exit: ANIMATION_DURATION * 2
|
|
115
|
+
children: /*#__PURE__*/_jsxs(BpkAnimateHeight, {
|
|
116
|
+
onAnimationComplete: this.onAnimateHeightComplete,
|
|
117
|
+
duration: ANIMATION_DURATION,
|
|
118
|
+
height: this.state.isExpanded ? 'auto' : 0,
|
|
119
|
+
children: [showPlaceholder && /*#__PURE__*/_jsx("div", {
|
|
120
|
+
style: {
|
|
121
|
+
opacity: 0.35
|
|
140
122
|
},
|
|
141
123
|
children: children
|
|
142
|
-
})
|
|
143
|
-
|
|
124
|
+
}), /*#__PURE__*/_jsx(TransitionGroup, {
|
|
125
|
+
exit: animateOnLeave,
|
|
126
|
+
enter: animateOnEnter,
|
|
127
|
+
appear: animateOnEnter,
|
|
128
|
+
onTransitionEnd: this.onFadeComplete,
|
|
129
|
+
children: this.state.visible && /*#__PURE__*/_jsx(CSSTransition, {
|
|
130
|
+
classNames: {
|
|
131
|
+
exit: getClassName('bpk-animate-and-fade--leave'),
|
|
132
|
+
exitActive: getClassName('bpk-animate-and-fade--leave-active'),
|
|
133
|
+
enter: getClassName('bpk-animate-and-fade--enter'),
|
|
134
|
+
enterActive: getClassName('bpk-animate-and-fade--enter-active'),
|
|
135
|
+
appear: getClassName('bpk-animate-and-fade--appear'),
|
|
136
|
+
appearActive: getClassName('bpk-animate-and-fade--appear-active')
|
|
137
|
+
},
|
|
138
|
+
timeout: {
|
|
139
|
+
enter: ANIMATION_DURATION * 2,
|
|
140
|
+
exit: ANIMATION_DURATION * 2
|
|
141
|
+
},
|
|
142
|
+
children: children
|
|
143
|
+
})
|
|
144
|
+
})]
|
|
145
|
+
})
|
|
144
146
|
}) : null;
|
|
145
147
|
}
|
|
146
148
|
}
|
|
@@ -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-info-banner{padding:.5rem 1rem;overflow:hidden;border-radius:.5rem;margin:0;font-size:.875rem;line-height:1.25rem;font-weight:400}.bpk-info-banner--style-default{background-color:#eff3f8}.bpk-info-banner--style-onContrast{background-color:#fff}.bpk-info-banner__header{display:flex;flex-direction:row;align-items:flex-start}.bpk-info-banner__header--expandable{cursor:pointer}.bpk-info-banner__icon,.bpk-info-banner__toggle{padding:.125rem 0}.bpk-info-banner__message{padding:.25rem .5rem;flex-grow:1}.bpk-info-banner__success-icon{fill:#0c838a}.bpk-info-banner__warning-icon{fill:#f55d42}.bpk-info-banner__error-icon{fill:#e70866}.bpk-info-banner__info-icon{fill:#626971}.bpk-info-banner__toggle-button{padding:0;border:0;background-color:rgba(0,0,0,0);cursor:pointer;appearance:none}.bpk-info-banner__expand-icon{fill:#626971}.bpk-info-
|
|
18
|
+
.bpk-info-banner{padding:.5rem 1rem;overflow:hidden;border-radius:.5rem;margin:0;font-size:.875rem;line-height:1.25rem;font-weight:400}.bpk-info-banner--style-default{background-color:#eff3f8}.bpk-info-banner--style-onContrast{background-color:#fff}.bpk-info-banner__header{display:flex;flex-direction:row;align-items:flex-start}.bpk-info-banner__header--expandable{cursor:pointer}.bpk-info-banner__icon,.bpk-info-banner__toggle{padding:.125rem 0}.bpk-info-banner__message{padding:.25rem .5rem;flex-grow:1}.bpk-info-banner__success-icon{fill:#0c838a}.bpk-info-banner__warning-icon{fill:#f55d42}.bpk-info-banner__error-icon{fill:#e70866}.bpk-info-banner__info-icon{fill:#626971}.bpk-info-banner__toggle-button{padding:0;border:0;background-color:rgba(0,0,0,0);cursor:pointer;appearance:none}.bpk-info-banner__expand-icon{fill:#626971}.bpk-info-banner__children-container{color:#161616;font-size:.875rem;line-height:1.25rem;font-weight:400}.bpk-info-banner__children-container--with-action{padding:.25rem 0 .25rem}.bpk-info-banner__children-container--no-action{padding:.25rem 0 .5rem}
|
|
@@ -22,19 +22,22 @@
|
|
|
22
22
|
|
|
23
23
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
24
24
|
import { durationSm } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
|
|
25
|
-
|
|
26
|
-
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
27
|
-
import BpkLink from "../../bpk-component-link";
|
|
25
|
+
|
|
28
26
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
29
27
|
import BpkAnimateHeight from "../../bpk-animate-height";
|
|
30
28
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
31
29
|
import BpkCloseButton from "../../bpk-component-close-button";
|
|
32
|
-
|
|
33
|
-
import TickCircleIcon from "../../bpk-component-icon/sm/tick-circle";
|
|
30
|
+
import { withButtonAlignment } from "../../bpk-component-icon";
|
|
34
31
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
35
32
|
import ChevronDownIcon from "../../bpk-component-icon/sm/chevron-down";
|
|
36
33
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
34
|
+
import ChevronUpIcon from "../../bpk-component-icon/sm/chevron-up";
|
|
35
|
+
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
37
36
|
import InfoCircleIcon from "../../bpk-component-icon/sm/information-circle";
|
|
37
|
+
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
38
|
+
import TickCircleIcon from "../../bpk-component-icon/sm/tick-circle";
|
|
39
|
+
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
40
|
+
import BpkLink from "../../bpk-component-link";
|
|
38
41
|
import { cssModules } from "../../bpk-react-utils";
|
|
39
42
|
import AnimateAndFade from "./AnimateAndFade";
|
|
40
43
|
import { ALERT_TYPES, STYLE_TYPES } from "./common-types";
|
|
@@ -42,6 +45,7 @@ import STYLES from "./BpkInfoBanner.module.css";
|
|
|
42
45
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
43
46
|
const getClassName = cssModules(STYLES);
|
|
44
47
|
const ExpandIcon = withButtonAlignment(ChevronDownIcon);
|
|
48
|
+
const CollapseIcon = withButtonAlignment(ChevronUpIcon);
|
|
45
49
|
export const CONFIGURATION = {
|
|
46
50
|
NONE: 'none',
|
|
47
51
|
DISMISSABLE: 'dismissable',
|
|
@@ -63,20 +67,22 @@ const getIconForType = (type, CustomIcon) => {
|
|
|
63
67
|
};
|
|
64
68
|
const Icon = CustomIcon || componentMap[type];
|
|
65
69
|
const AlignedIcon = withButtonAlignment(Icon);
|
|
66
|
-
return /*#__PURE__*/_jsx(
|
|
67
|
-
className: className
|
|
70
|
+
return /*#__PURE__*/_jsx("div", {
|
|
71
|
+
className: className,
|
|
72
|
+
children: /*#__PURE__*/_jsx(AlignedIcon, {})
|
|
68
73
|
});
|
|
69
74
|
};
|
|
70
75
|
const ToggleButton = props => {
|
|
71
|
-
const classNames = getClassName('bpk-info-banner__expand-icon'
|
|
76
|
+
const classNames = getClassName('bpk-info-banner__expand-icon');
|
|
72
77
|
return /*#__PURE__*/_jsx("button", {
|
|
73
78
|
type: "button",
|
|
74
79
|
className: getClassName('bpk-info-banner__toggle-button'),
|
|
75
80
|
"aria-label": props.label,
|
|
76
81
|
"aria-expanded": props.expanded,
|
|
77
82
|
title: props.label,
|
|
78
|
-
children: /*#__PURE__*/_jsx(
|
|
79
|
-
className: classNames
|
|
83
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
84
|
+
className: classNames,
|
|
85
|
+
children: props.expanded ? /*#__PURE__*/_jsx(CollapseIcon, {}) : /*#__PURE__*/_jsx(ExpandIcon, {})
|
|
80
86
|
})
|
|
81
87
|
});
|
|
82
88
|
};
|
|
@@ -149,7 +155,6 @@ const BpkInfoBannerInner = ({
|
|
|
149
155
|
}), dismissable && /*#__PURE__*/_jsx("span", {
|
|
150
156
|
className: getClassName('bpk-info-banner__toggle'),
|
|
151
157
|
children: /*#__PURE__*/_jsx(BpkCloseButton, {
|
|
152
|
-
className: getClassName('bpk-info-banner__toggle-button'),
|
|
153
158
|
onClick: onBannerDismiss,
|
|
154
159
|
"aria-label": dismissButtonLabel,
|
|
155
160
|
label: dismissButtonLabel
|
|
@@ -162,7 +167,6 @@ const BpkInfoBannerInner = ({
|
|
|
162
167
|
className: childrenContainerClassName,
|
|
163
168
|
children: children
|
|
164
169
|
}), isExpandable && action && /*#__PURE__*/_jsx(BpkLink, {
|
|
165
|
-
className: getClassName('bpk-info-banner__expandable-action'),
|
|
166
170
|
onClick: action.callback,
|
|
167
171
|
children: action.title
|
|
168
172
|
})]
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import BpkInput from "./src/BpkInput";
|
|
20
|
-
import withOpenEvents from "./src/withOpenEvents";
|
|
21
20
|
import { propTypes, defaultProps, CLEAR_BUTTON_MODES, INPUT_TYPES } from "./src/common-types";
|
|
22
21
|
import themeAttributes from "./src/themeAttributes";
|
|
22
|
+
import withOpenEvents from "./src/withOpenEvents";
|
|
23
23
|
export default BpkInput;
|
|
24
24
|
export { propTypes, defaultProps, withOpenEvents, INPUT_TYPES, CLEAR_BUTTON_MODES, themeAttributes };
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
+
import { withButtonAlignment } from "../../bpk-component-icon";
|
|
19
20
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
20
21
|
import ClearIcon from "../../bpk-component-icon/sm/close-circle";
|
|
21
|
-
import { withButtonAlignment } from "../../bpk-component-icon";
|
|
22
22
|
import { cssModules } from "../../bpk-react-utils";
|
|
23
23
|
import STYLES from "./BpkClearButton.module.css";
|
|
24
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -43,6 +43,8 @@ const BpkClearButton = ({
|
|
|
43
43
|
...rest,
|
|
44
44
|
children: /*#__PURE__*/_jsx(ClearButtonIcon, {
|
|
45
45
|
focusable: "false" // prevents focus on IE11
|
|
46
|
+
// TODO: className to be removed
|
|
47
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
46
48
|
,
|
|
47
49
|
className: getClassName('bpk-clear-button__icon')
|
|
48
50
|
})
|
|
@@ -138,7 +138,10 @@ class BpkInput extends Component {
|
|
|
138
138
|
persistClearButton: false
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
|
-
}
|
|
141
|
+
}
|
|
142
|
+
// TODO: className to be removed
|
|
143
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
144
|
+
,
|
|
142
145
|
className: clearButtonClassNames.join(' ')
|
|
143
146
|
})]
|
|
144
147
|
}) : renderedInput;
|
|
@@ -122,7 +122,10 @@ const withOpenEvents = InputComponent => {
|
|
|
122
122
|
// Needed on mobile as some Android devices do not trigger onClick or onTouch when TalkBack is active but do trigger onFocus
|
|
123
123
|
eventHandlers.onFocus = withEventHandler(this.handleFocus, onFocus);
|
|
124
124
|
eventHandlers.onBlur = withEventHandler(this.handleBlur, onBlur);
|
|
125
|
-
return /*#__PURE__*/_jsx(InputComponent
|
|
125
|
+
return /*#__PURE__*/_jsx(InputComponent
|
|
126
|
+
// TODO: className to be removed
|
|
127
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
128
|
+
, {
|
|
126
129
|
className: classNames.join(' '),
|
|
127
130
|
...eventHandlers,
|
|
128
131
|
...rest
|
|
@@ -14,8 +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
|
-
*/import
|
|
18
|
-
import
|
|
17
|
+
*/import BpkButtonLink from "./src/BpkButtonLink";
|
|
18
|
+
import BpkLink from "./src/BpkLink";
|
|
19
19
|
import themeAttributes, { linkAlternateThemeAttributes } from "./src/themeAttributes";
|
|
20
20
|
export default BpkLink;
|
|
21
21
|
export { BpkButtonLink, themeAttributes, linkAlternateThemeAttributes };
|
|
@@ -33,7 +33,10 @@ const BpkList = props => {
|
|
|
33
33
|
return /*#__PURE__*/_jsx(TagName, {
|
|
34
34
|
"aria-label": ariaLabel,
|
|
35
35
|
"aria-labelledby": ariaLabelledby,
|
|
36
|
-
title: title
|
|
36
|
+
title: title
|
|
37
|
+
// TODO: className to be removed
|
|
38
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
39
|
+
,
|
|
37
40
|
className: classNames,
|
|
38
41
|
children: children
|
|
39
42
|
});
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/import PropTypes from 'prop-types';
|
|
18
18
|
import BpkButton from "../../bpk-component-button";
|
|
19
|
-
import { BpkSpinner, BpkLargeSpinner } from "../../bpk-component-spinner";
|
|
20
19
|
import { withButtonAlignment, withLargeButtonAlignment, withRtlSupport } from "../../bpk-component-icon";
|
|
21
|
-
import ArrowIconSm from "../../bpk-component-icon/sm/long-arrow-right";
|
|
22
20
|
import ArrowIconLg from "../../bpk-component-icon/lg/long-arrow-right";
|
|
21
|
+
import ArrowIconSm from "../../bpk-component-icon/sm/long-arrow-right";
|
|
22
|
+
import { BpkSpinner, BpkLargeSpinner } from "../../bpk-component-spinner";
|
|
23
23
|
import { cssModules } from "../../bpk-react-utils";
|
|
24
24
|
import STYLES from "./BpkLoadingButton.module.css";
|
|
25
25
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -84,7 +84,10 @@ const BpkLoadingButton = props => {
|
|
|
84
84
|
_jsxs(BpkButton, {
|
|
85
85
|
iconOnly: iconOnly,
|
|
86
86
|
disabled: showBtnDisabled,
|
|
87
|
-
large: large
|
|
87
|
+
large: large
|
|
88
|
+
// TODO: className to be removed
|
|
89
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
90
|
+
,
|
|
88
91
|
className: classNames,
|
|
89
92
|
link: link,
|
|
90
93
|
linkOnDark: linkOnDark,
|
|
@@ -14,12 +14,12 @@
|
|
|
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
|
-
*/import
|
|
18
|
-
import
|
|
17
|
+
*/import BpkIconMarker from "./src/BpkIconMarker";
|
|
18
|
+
import BpkMap from "./src/BpkMap";
|
|
19
|
+
import BpkOverlayView from "./src/BpkOverlayView";
|
|
19
20
|
import BpkPriceMarker, { PRICE_MARKER_STATUSES } from "./src/BpkPriceMarker";
|
|
20
21
|
import { BpkPriceMarkerV2, MARKER_STATUSES } from "./src/BpkPriceMarkerV2/BpkPriceMarker";
|
|
21
|
-
import BpkOverlayView from "./src/BpkOverlayView";
|
|
22
|
-
import withGoogleMapsScript from "./src/withGoogleMapsScript";
|
|
23
22
|
import { defaultIconMarkerThemeAttributes, priceMarkerThemeAttributes } from "./src/themeAttributes";
|
|
23
|
+
import withGoogleMapsScript from "./src/withGoogleMapsScript";
|
|
24
24
|
export default BpkMap;
|
|
25
25
|
export { BpkIconMarker, BpkPriceMarker, BpkPriceMarkerV2, BpkOverlayView, withGoogleMapsScript, defaultIconMarkerThemeAttributes, priceMarkerThemeAttributes, PRICE_MARKER_STATUSES, MARKER_STATUSES };
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/import PropTypes from 'prop-types';
|
|
18
18
|
import { cssModules } from "../../bpk-react-utils";
|
|
19
|
+
import BpkBasicMapMarker from "./BpkBasicMapMarker";
|
|
19
20
|
import BpkIconMarkerBackground from "./BpkIconMarkerBackground";
|
|
20
21
|
import { LatLongPropType } from "./common-types";
|
|
21
|
-
import BpkBasicMapMarker from "./BpkBasicMapMarker";
|
|
22
22
|
import STYLES from "./BpkIconMarker.module.css";
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
const getClassName = cssModules(STYLES);
|
|
@@ -14,8 +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
|
-
*/import
|
|
18
|
-
import
|
|
17
|
+
*/import PropTypes from 'prop-types';
|
|
18
|
+
import { useCallback, useRef } from 'react';
|
|
19
19
|
import { GoogleMap } from '@react-google-maps/api';
|
|
20
20
|
import { cssModules } from "../../bpk-react-utils";
|
|
21
21
|
import { LatLongPropType } from "./common-types";
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/import PropTypes from 'prop-types';
|
|
18
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
19
18
|
import BpkText, { TEXT_STYLES } from "../../bpk-component-text/src/BpkText";
|
|
20
|
-
import {
|
|
19
|
+
import { cssModules } from "../../bpk-react-utils";
|
|
21
20
|
import BpkBasicMapMarker from "./BpkBasicMapMarker";
|
|
21
|
+
import { LatLongPropType } from "./common-types";
|
|
22
22
|
import STYLES from "./BpkPriceMarker.module.css";
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
const getClassName = cssModules(STYLES);
|
|
@@ -54,10 +54,12 @@ const BpkPriceMarker = props => {
|
|
|
54
54
|
onClick: onClick,
|
|
55
55
|
disabled: disabled,
|
|
56
56
|
...buttonProps,
|
|
57
|
-
children: [/*#__PURE__*/_jsx(
|
|
57
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
58
58
|
className: classNames,
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
children: /*#__PURE__*/_jsx(BpkText, {
|
|
60
|
+
textStyle: status === PRICE_MARKER_STATUSES.focused ? TEXT_STYLES.label1 : TEXT_STYLES.label2,
|
|
61
|
+
children: label
|
|
62
|
+
})
|
|
61
63
|
}), /*#__PURE__*/_jsx("div", {
|
|
62
64
|
className: arrowClassNames
|
|
63
65
|
})]
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { cssModules } from "../../../bpk-react-utils";
|
|
20
19
|
import BpkText, { TEXT_STYLES } from "../../../bpk-component-text";
|
|
20
|
+
import { cssModules } from "../../../bpk-react-utils";
|
|
21
21
|
import BpkBasicMapMarker from "../BpkBasicMapMarker";
|
|
22
22
|
import STYLES from "./BpkPriceMarker.module.css";
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -162,7 +162,10 @@ class BpkMobileScrollContainer extends Component {
|
|
|
162
162
|
"aria-label": ariaLabel,
|
|
163
163
|
ref: el => {
|
|
164
164
|
this.innerEl = el;
|
|
165
|
-
}
|
|
165
|
+
}
|
|
166
|
+
// TODO: className to be removed
|
|
167
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
168
|
+
,
|
|
166
169
|
className: getClassName('bpk-mobile-scroll-container__inner'),
|
|
167
170
|
children: children
|
|
168
171
|
})
|
|
@@ -16,10 +16,11 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { BpkModalV2 } from "./src/BpkModalV2/BpkModal";
|
|
20
|
-
import themeAttributes from "./src/themeAttributes";
|
|
21
19
|
import BpkModal from "./src/BpkModal";
|
|
20
|
+
import { MODAL_STYLING } from "./src/BpkModalInner";
|
|
21
|
+
import { BpkModalV2 } from "./src/BpkModalV2/BpkModal";
|
|
22
22
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
23
23
|
import { propTypes, defaultProps } from "./src/legacy-prop-types";
|
|
24
|
+
import themeAttributes from "./src/themeAttributes";
|
|
24
25
|
export default BpkModal;
|
|
25
|
-
export { propTypes, defaultProps, themeAttributes, BpkModalV2 };
|
|
26
|
+
export { propTypes, defaultProps, themeAttributes, BpkModalV2, MODAL_STYLING };
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import type { ReactNode } from 'react';
|
|
20
|
-
import type { Props as ModalDialogProps } from './BpkModalInner';
|
|
20
|
+
import type { Props as ModalDialogProps, ModalStyle } from './BpkModalInner';
|
|
21
21
|
export type Props = Partial<ModalDialogProps> & {
|
|
22
22
|
id: string;
|
|
23
23
|
children: ReactNode;
|
|
@@ -25,6 +25,7 @@ export type Props = Partial<ModalDialogProps> & {
|
|
|
25
25
|
isOpen: boolean;
|
|
26
26
|
closeOnScrimClick?: boolean;
|
|
27
27
|
closeOnEscPressed?: boolean;
|
|
28
|
+
modalStyle?: ModalStyle;
|
|
28
29
|
renderTarget?: null | HTMLElement | (() => null | HTMLElement);
|
|
29
30
|
onClose?: (arg0?: TouchEvent | MouseEvent | KeyboardEvent, arg1?: {
|
|
30
31
|
source: 'ESCAPE' | 'DOCUMENT_CLICK';
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { withScrim } from "../../bpk-scrim-utils";
|
|
20
19
|
import { Portal, cssModules, isDeviceIphone } from "../../bpk-react-utils";
|
|
21
|
-
import
|
|
20
|
+
import { withScrim } from "../../bpk-scrim-utils";
|
|
21
|
+
import BpkModalInner, { MODAL_STYLING } from "./BpkModalInner";
|
|
22
22
|
import STYLES from "./BpkModal.module.css";
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
const getClassName = cssModules(STYLES);
|
|
@@ -36,6 +36,7 @@ const BpkModal = ({
|
|
|
36
36
|
fullScreenOnMobile = true,
|
|
37
37
|
isIphone = isDeviceIphone(),
|
|
38
38
|
isOpen,
|
|
39
|
+
modalStyle = MODAL_STYLING.default,
|
|
39
40
|
onClose = () => null,
|
|
40
41
|
padded = true,
|
|
41
42
|
renderTarget = null,
|
|
@@ -62,7 +63,10 @@ const BpkModal = ({
|
|
|
62
63
|
closeOnScrimClick: closeOnScrimClick,
|
|
63
64
|
containerClassName: containerClass.join(' '),
|
|
64
65
|
isIphone: isIphone,
|
|
65
|
-
title: title
|
|
66
|
+
title: title
|
|
67
|
+
// TODO: className to be removed
|
|
68
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
69
|
+
,
|
|
66
70
|
className: className,
|
|
67
71
|
contentClassName: contentClassName,
|
|
68
72
|
closeLabel: closeLabel,
|
|
@@ -72,6 +76,7 @@ const BpkModal = ({
|
|
|
72
76
|
padded: padded,
|
|
73
77
|
accessoryView: accessoryView,
|
|
74
78
|
dialogRef: dialogRef,
|
|
79
|
+
modalStyle: modalStyle,
|
|
75
80
|
...rest
|
|
76
81
|
})
|
|
77
82
|
});
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import type { ReactNode } from 'react';
|
|
20
|
+
import { ModalStyle } from './BpkModalInner';
|
|
20
21
|
export type Props = {
|
|
21
22
|
id: string;
|
|
22
23
|
children: ReactNode;
|
|
@@ -33,6 +34,7 @@ export type Props = {
|
|
|
33
34
|
title?: string | null;
|
|
34
35
|
closeLabel?: string;
|
|
35
36
|
closeText?: string | null;
|
|
37
|
+
modalStyle?: ModalStyle;
|
|
36
38
|
/**
|
|
37
39
|
* The accessory view allows for icons and actions to be placed in front of the main title inside the modal header. To be used with `BpkNavigationBarButtonLink`
|
|
38
40
|
*/
|
|
@@ -16,15 +16,19 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
20
|
-
import { BpkButtonLink } from "../../bpk-component-link";
|
|
21
19
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
22
20
|
import BpkCloseButton from "../../bpk-component-close-button";
|
|
23
|
-
import
|
|
21
|
+
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
22
|
+
import { BpkButtonLink } from "../../bpk-component-link";
|
|
23
|
+
import BpkNavigationBar, { BAR_STYLES } from "../../bpk-component-navigation-bar";
|
|
24
24
|
import { TransitionInitialMount, cssModules } from "../../bpk-react-utils";
|
|
25
25
|
import STYLES from "./BpkModalInner.module.css";
|
|
26
26
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
27
|
const getClassName = cssModules(STYLES);
|
|
28
|
+
export const MODAL_STYLING = {
|
|
29
|
+
default: 'default',
|
|
30
|
+
surfaceContrast: 'surface-contrast'
|
|
31
|
+
};
|
|
28
32
|
const BpkModalInner = ({
|
|
29
33
|
accessoryView = null,
|
|
30
34
|
children,
|
|
@@ -37,6 +41,7 @@ const BpkModalInner = ({
|
|
|
37
41
|
fullScreenOnMobile = true,
|
|
38
42
|
id,
|
|
39
43
|
isIphone,
|
|
44
|
+
modalStyle = MODAL_STYLING.default,
|
|
40
45
|
onClose = () => null,
|
|
41
46
|
padded = true,
|
|
42
47
|
showHeader = true,
|
|
@@ -46,6 +51,7 @@ const BpkModalInner = ({
|
|
|
46
51
|
const classNames = [getClassName('bpk-modal')];
|
|
47
52
|
const contentClassNames = [getClassName('bpk-modal__content')];
|
|
48
53
|
const navigationStyles = [getClassName('bpk-modal__navigation')];
|
|
54
|
+
classNames.push(getClassName(`bpk-modal__modal-style--${modalStyle}`));
|
|
49
55
|
if (wide) {
|
|
50
56
|
classNames.push(getClassName('bpk-modal--wide'));
|
|
51
57
|
}
|
|
@@ -82,7 +88,11 @@ const BpkModalInner = ({
|
|
|
82
88
|
children: [showHeader && /*#__PURE__*/_jsx("header", {
|
|
83
89
|
className: getClassName('bpk-modal__header'),
|
|
84
90
|
children: /*#__PURE__*/_jsx(BpkNavigationBar, {
|
|
85
|
-
|
|
91
|
+
barStyle: modalStyle === MODAL_STYLING.surfaceContrast ? BAR_STYLES.onDark : BAR_STYLES.default,
|
|
92
|
+
id: headingId
|
|
93
|
+
// TODO: className to be removed
|
|
94
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
95
|
+
,
|
|
86
96
|
className: navigationStyles.join(' '),
|
|
87
97
|
title: /*#__PURE__*/_jsx("h2", {
|
|
88
98
|
id: headingId,
|
|
@@ -90,12 +100,18 @@ const BpkModalInner = ({
|
|
|
90
100
|
children: title
|
|
91
101
|
}),
|
|
92
102
|
leadingButton: accessoryViewFinal,
|
|
93
|
-
trailingButton: closeText ? /*#__PURE__*/_jsx(BpkButtonLink
|
|
94
|
-
|
|
103
|
+
trailingButton: closeText ? /*#__PURE__*/_jsx(BpkButtonLink
|
|
104
|
+
// TODO: className to be removed
|
|
105
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
106
|
+
, {
|
|
107
|
+
className: [getClassName('bpk-modal__close-button'), getClassName(`bpk-modal__close-button-style--${modalStyle}`)].join(' '),
|
|
95
108
|
onClick: onClose,
|
|
96
109
|
children: closeText
|
|
97
|
-
}) : /*#__PURE__*/_jsx(BpkCloseButton
|
|
98
|
-
|
|
110
|
+
}) : /*#__PURE__*/_jsx(BpkCloseButton
|
|
111
|
+
// TODO: className to be removed
|
|
112
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
113
|
+
, {
|
|
114
|
+
className: [getClassName('bpk-modal__close-button'), getClassName(`bpk-modal__close-button-style--${modalStyle}`)].join(' '),
|
|
99
115
|
label: closeLabel,
|
|
100
116
|
onClick: onClose
|
|
101
117
|
})
|
|
@@ -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-modal{z-index:1100;width:100%;max-width:32rem;margin:auto;transform:scale(1);transition:opacity 200ms ease-in-out,transform 200ms ease-in-out;outline:0;background-color:#fff;opacity:1;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);box-shadow:0px 12px 50px 0px rgba(37,32,31,.25);border-radius:.5rem}@media(max-width: 32rem){.bpk-modal--full-screen-mobile{display:flex;margin:0;flex-direction:column;border-radius:0;box-shadow:none}}.bpk-modal--full-screen{max-width:none;display:flex;margin:0;flex-direction:column;border-radius:0;box-shadow:none}@media(min-width: 32.0625rem){.bpk-modal--wide{max-width:64rem}}.bpk-modal--appear{transform:scale(0.9);opacity:0}.bpk-modal--appear-active{transform:scale(1);opacity:1}.bpk-modal__header{box-shadow:0 -1px 0 0 #c1c7cf inset}.bpk-modal__navigation{display:flex;justify-content:space-between
|
|
18
|
+
.bpk-modal{z-index:1100;width:100%;max-width:32rem;margin:auto;transform:scale(1);transition:opacity 200ms ease-in-out,transform 200ms ease-in-out;outline:0;background-color:#fff;opacity:1;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);box-shadow:0px 12px 50px 0px rgba(37,32,31,.25);border-radius:.5rem}@media(max-width: 32rem){.bpk-modal--full-screen-mobile{display:flex;margin:0;flex-direction:column;border-radius:0;box-shadow:none}}.bpk-modal--full-screen{max-width:none;display:flex;margin:0;flex-direction:column;border-radius:0;box-shadow:none}@media(min-width: 32.0625rem){.bpk-modal--wide{max-width:64rem}}.bpk-modal--appear{transform:scale(0.9);opacity:0}.bpk-modal--appear-active{transform:scale(1);opacity:1}.bpk-modal__modal-style--surface-contrast{background-color:#05203c;color:#fff}.bpk-modal__header{box-shadow:0 -1px 0 0 #c1c7cf inset}.bpk-modal__navigation{display:flex;justify-content:space-between}.bpk-modal__heading{margin:0;font-size:1rem;line-height:1.5rem;font-weight:700}.bpk-modal__close-button{position:relative;right:auto;margin-left:1rem;margin-right:0}html[dir=rtl] .bpk-modal__close-button{margin-left:0;margin-right:1rem}html[dir=rtl] .bpk-modal__close-button{left:auto}.bpk-modal__close-button-style--surface-contrast{background-color:#05203c;color:#fff}.bpk-no-touch-support .bpk-modal__close-button-style--surface-contrast:hover:not(:active):not(:disabled){color:#fff}:global(.bpk-no-touch-support) .bpk-modal__close-button-style--surface-contrast:hover:not(:active):not(:disabled){color:#fff}.bpk-modal__accessory-view{position:relative;left:auto;margin-right:1rem}html[dir=rtl] .bpk-modal__accessory-view{right:auto;margin-left:1rem}.bpk-modal__content{flex:1;overflow-y:auto}.bpk-modal__content--padded{padding:1rem}
|
|
@@ -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
|
-
@keyframes bpk-modal-scrim{0%{opacity:0}100%{opacity:1}}@keyframes bpk-modal-scale{0%{transform:scale(0.9)}100%{transform:scale(1)}}.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal-backdrop{position:fixed;z-index:0;margin:0 auto;background-color:rgba(0,0,0,.7);animation:bpk-modal-scrim 200ms ease-in-out;inset:0;inset-block-end:0;inset-inline:0;inset-inline-end:0}.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal{position:fixed;top:50%;left:50%;display:block;z-index:1;transform:translate(-50%, -50%) scale(1);transition:transform 200ms ease-in-out 200ms}.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal:not([data-open=true]),.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal-backdrop:not([data-open=true]){display:none}.bpk-modal{width:100%;max-width:none;height:100%;max-height:100%;padding:0;border:none;background:#fff;overflow-y:scroll;scrollbar-width:none;box-shadow:0px 12px 50px 0px rgba(37,32,31,.25)}@media(min-width: 32.0625rem){.bpk-modal{width:32rem;max-width:none;height:fit-content;max-height:90%;border-radius:.75rem}.bpk-modal--full-screen-desktop{width:100%;height:100%;max-height:100%;border-radius:0}.bpk-modal--wide{width:64rem;max-width:100%}}.bpk-modal[open]{animation:bpk-modal-scale 200ms ease-in-out}.bpk-modal--no-full-screen-mobile{width:90%;max-width:none;height:fit-content;max-height:90%}@media(min-width: 32.0625rem){.bpk-modal--no-full-screen-mobile{width:32rem;max-width:none}}.bpk-modal::backdrop{position:fixed;background-color:rgba(0,0,0,.7);animation:bpk-modal-scrim 200ms ease-in-out;inset:0;inset-block-end:0;inset-inline:0;inset-inline-end:0}.bpk-modal::-webkit-scrollbar{display:none}.bpk-modal__header-title{padding:1rem;display:flex;min-height:1.5rem;flex-wrap:nowrap;justify-content:flex-end;align-items:center}.bpk-modal__header-title-
|
|
18
|
+
@keyframes bpk-modal-scrim{0%{opacity:0}100%{opacity:1}}@keyframes bpk-modal-scale{0%{transform:scale(0.9)}100%{transform:scale(1)}}.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal-backdrop{position:fixed;z-index:0;margin:0 auto;background-color:rgba(0,0,0,.7);animation:bpk-modal-scrim 200ms ease-in-out;inset:0;inset-block-end:0;inset-inline:0;inset-inline-end:0}.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal{position:fixed;top:50%;left:50%;display:block;z-index:1;transform:translate(-50%, -50%) scale(1);transition:transform 200ms ease-in-out 200ms}.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal:not([data-open=true]),.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal-backdrop:not([data-open=true]){display:none}.bpk-modal{width:100%;max-width:none;height:100%;max-height:100%;padding:0;border:none;background:#fff;overflow-y:scroll;scrollbar-width:none;box-shadow:0px 12px 50px 0px rgba(37,32,31,.25)}@media(min-width: 32.0625rem){.bpk-modal{width:32rem;max-width:none;height:fit-content;max-height:90%;border-radius:.75rem}.bpk-modal--full-screen-desktop{width:100%;height:100%;max-height:100%;border-radius:0}.bpk-modal--wide{width:64rem;max-width:100%}}.bpk-modal[open]{animation:bpk-modal-scale 200ms ease-in-out}.bpk-modal--no-full-screen-mobile{width:90%;max-width:none;height:fit-content;max-height:90%}@media(min-width: 32.0625rem){.bpk-modal--no-full-screen-mobile{width:32rem;max-width:none}}.bpk-modal::backdrop{position:fixed;background-color:rgba(0,0,0,.7);animation:bpk-modal-scrim 200ms ease-in-out;inset:0;inset-block-end:0;inset-inline:0;inset-inline-end:0}.bpk-modal::-webkit-scrollbar{display:none}.bpk-modal__header-title{padding:1rem;display:flex;min-height:1.5rem;flex-wrap:nowrap;justify-content:flex-end;align-items:center}.bpk-modal__header-title-style--surface-contrast{background-color:#05203c;color:#fff}.bpk-modal__close-button-style--surface-contrast{color:#fff}.bpk-no-touch-support .bpk-modal__close-button-style--surface-contrast:hover:not(:active):not(:disabled){color:#fff}:global(.bpk-no-touch-support) .bpk-modal__close-button-style--surface-contrast:hover:not(:active):not(:disabled){color:#fff}.bpk-modal__header-title-container{display:flex;width:100%;justify-content:flex-start}.bpk-modal__button-container{padding-block-start:1rem;padding-inline-end:1rem;display:flex;min-height:1.5rem;flex-wrap:nowrap;justify-content:flex-end;align-items:center}.bpk-modal__button-container-style--surface-contrast{background-color:#05203c;color:#fff}.bpk-modal__container{min-height:100%;padding:1rem}.bpk-modal__container--padded{padding:0}.bpk-modal__container--full-screen-desktop{height:100%}.bpk-modal__container--surface-contrast{background-color:#05203c;color:#fff}
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
/// <reference types="react" />
|
|
20
20
|
import type { ReactNode } from 'react';
|
|
21
|
+
import { ModalStyle } from '../BpkModalInner';
|
|
21
22
|
|
|
22
23
|
export type Props = {
|
|
23
24
|
id: string | undefined;
|
|
@@ -32,5 +33,6 @@ export type Props = {
|
|
|
32
33
|
showHeader?: boolean;
|
|
33
34
|
title?: string | null;
|
|
34
35
|
wide?: boolean;
|
|
36
|
+
modalStyle?: ModalStyle;
|
|
35
37
|
};
|
|
36
38
|
export declare const BpkModalV2: (props: Props) => JSX.Element | null;
|