@skyscanner/backpack-web 42.0.0 → 42.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bpk-component-banner-alert/src/BpkBannerAlert.js +0 -7
- package/bpk-component-breakpoint/src/BpkBreakpoint.js +3 -1
- package/bpk-component-button/src/BpkButton.d.ts +1 -1
- package/bpk-component-button/src/BpkButton.js +17 -3
- package/bpk-component-button/src/BpkButton.module.css +1 -1
- package/bpk-component-button/src/common-types.d.ts +2 -0
- package/bpk-component-calendar/src/utils.js +1 -1
- package/bpk-component-card/index.d.ts +4 -1
- package/bpk-component-card/index.js +3 -1
- package/bpk-component-card/src/BpkCardV2/BpkCardV2.d.ts +27 -0
- package/bpk-component-card/src/BpkCardV2/BpkCardV2.js +57 -0
- package/bpk-component-card/src/BpkCardV2/BpkCardV2.module.css +18 -0
- package/bpk-component-card/src/BpkCardV2/common-types.d.ts +124 -0
- package/bpk-component-card/src/BpkCardV2/common-types.js +102 -0
- package/bpk-component-card/src/BpkCardV2/subcomponents/Body.d.ts +36 -0
- package/bpk-component-card/src/BpkCardV2/subcomponents/Body.js +65 -0
- package/bpk-component-card/src/BpkCardV2/subcomponents/Divider.d.ts +13 -0
- package/bpk-component-card/src/BpkCardV2/subcomponents/Divider.js +37 -0
- package/bpk-component-card/src/BpkCardV2/subcomponents/Footer.d.ts +24 -0
- package/bpk-component-card/src/BpkCardV2/subcomponents/Footer.js +60 -0
- package/bpk-component-card/src/BpkCardV2/subcomponents/Header.d.ts +24 -0
- package/bpk-component-card/src/BpkCardV2/subcomponents/Header.js +60 -0
- package/bpk-component-card/src/BpkCardV2/subcomponents/Root.d.ts +28 -0
- package/bpk-component-card/src/BpkCardV2/subcomponents/Root.js +68 -0
- package/bpk-component-card/src/BpkCardV2/subcomponents/Section.d.ts +22 -0
- package/bpk-component-card/src/BpkCardV2/subcomponents/Section.js +53 -0
- package/bpk-component-card/src/BpkCardV2/subcomponents/resolveDirectionalPadding.d.ts +16 -0
- package/bpk-component-card/src/BpkCardV2/subcomponents/resolveDirectionalPadding.js +32 -0
- package/bpk-component-card-list/src/BpkCardList.module.css +1 -1
- package/bpk-component-card-list/src/BpkCardListRowRail/BpkCardListCarousel.js +3 -3
- package/bpk-component-chatbot-input/index.d.ts +7 -0
- package/bpk-component-chatbot-input/index.js +23 -0
- package/bpk-component-chatbot-input/src/BpkChatbotInput.d.ts +4 -0
- package/bpk-component-chatbot-input/src/BpkChatbotInput.js +118 -0
- package/bpk-component-chatbot-input/src/BpkChatbotInput.module.css +18 -0
- package/bpk-component-chatbot-input/src/InputField/InputField.d.ts +3 -0
- package/bpk-component-chatbot-input/src/InputField/InputField.js +82 -0
- package/bpk-component-chatbot-input/src/InputField.module.css +18 -0
- package/bpk-component-chatbot-input/src/SendButton/SendButton.d.ts +9 -0
- package/bpk-component-chatbot-input/src/SendButton/SendButton.js +47 -0
- package/bpk-component-chatbot-input/src/TextAreaField/TextAreaField.d.ts +10 -0
- package/bpk-component-chatbot-input/src/TextAreaField/TextAreaField.js +93 -0
- package/bpk-component-chatbot-input/src/TextAreaField.module.css +18 -0
- package/bpk-component-chatbot-input/src/common-types.d.ts +37 -0
- package/bpk-component-chatbot-input/src/common-types.js +23 -0
- package/bpk-component-chatbot-input/src/constants.d.ts +5 -0
- package/bpk-component-chatbot-input/src/constants.js +22 -0
- package/bpk-component-chatbot-input/src/hooks/index.d.ts +4 -0
- package/bpk-component-chatbot-input/src/hooks/index.js +22 -0
- package/bpk-component-chatbot-input/src/hooks/useChatbotInput.d.ts +32 -0
- package/bpk-component-chatbot-input/src/hooks/useChatbotInput.js +111 -0
- package/bpk-component-chatbot-input/src/hooks/useChatbotInputManager.d.ts +20 -0
- package/bpk-component-chatbot-input/src/hooks/useChatbotInputManager.js +83 -0
- package/bpk-component-chatbot-input/src/hooks/useInputHandlers.d.ts +8 -0
- package/bpk-component-chatbot-input/src/hooks/useInputHandlers.js +54 -0
- package/bpk-component-chatbot-input/src/hooks/useTextAreaAutoResize.d.ts +22 -0
- package/bpk-component-chatbot-input/src/hooks/useTextAreaAutoResize.js +137 -0
- package/bpk-component-chatbot-input/src/themeAttributes.d.ts +14 -0
- package/bpk-component-chatbot-input/src/themeAttributes.js +34 -0
- package/bpk-component-checkbox/index.d.ts +7 -1
- package/bpk-component-checkbox/index.js +3 -1
- package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2.d.ts +9 -0
- package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2.js +33 -0
- package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2.module.css +18 -0
- package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2Control.d.ts +6 -0
- package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2Control.js +30 -0
- package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2Description.d.ts +6 -0
- package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2Description.js +32 -0
- package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2HiddenInput.d.ts +2 -0
- package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2HiddenInput.js +25 -0
- package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2Indicator.d.ts +2 -0
- package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2Indicator.js +23 -0
- package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2Label.d.ts +6 -0
- package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2Label.js +30 -0
- package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2Root.d.ts +16 -0
- package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2Root.js +49 -0
- package/bpk-component-checkbox/src/BpkCheckboxV2/themeAttributes.d.ts +2 -0
- package/bpk-component-checkbox/src/BpkCheckboxV2/themeAttributes.js +20 -0
- package/bpk-component-checkbox-card/index.d.ts +3 -0
- package/bpk-component-checkbox-card/index.js +20 -0
- package/bpk-component-checkbox-card/src/BpkCheckboxCard.d.ts +128 -0
- package/bpk-component-checkbox-card/src/BpkCheckboxCard.js +216 -0
- package/bpk-component-checkbox-card/src/BpkCheckboxCard.module.css +18 -0
- package/bpk-component-checkbox-card/src/BpkCheckboxCardRoot.d.ts +95 -0
- package/bpk-component-checkbox-card/src/BpkCheckboxCardRoot.js +101 -0
- package/bpk-component-checkbox-card/src/CheckboxCardContext.d.ts +27 -0
- package/bpk-component-checkbox-card/src/CheckboxCardContext.js +47 -0
- package/bpk-component-checkbox-card/src/common-types.d.ts +27 -0
- package/bpk-component-checkbox-card/src/common-types.js +43 -0
- package/bpk-component-checkbox-card/src/themeAttributes.d.ts +46 -0
- package/bpk-component-checkbox-card/src/themeAttributes.js +87 -0
- package/bpk-component-icon/scripts/generate-figma-connect.js +267 -0
- package/bpk-component-inset-banner/index.d.ts +4 -1
- package/bpk-component-inset-banner/index.js +2 -1
- package/bpk-component-inset-banner/src/BpkInsetBannerV3/BpkInsetBannerV3.d.ts +56 -0
- package/bpk-component-inset-banner/src/BpkInsetBannerV3/BpkInsetBannerV3.js +118 -0
- package/bpk-component-inset-banner/src/BpkInsetBannerV3/BpkInsetBannerV3.module.css +18 -0
- package/bpk-component-layout/src/BpkProvider.d.ts +9 -4
- package/bpk-component-layout/src/BpkProvider.js +87 -8
- package/bpk-component-layout/src/types.d.ts +2 -2
- package/bpk-component-link/src/common-types.d.ts +1 -1
- package/bpk-component-modal/index.d.ts +2 -1
- package/bpk-component-modal/index.js +2 -1
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3.d.ts +14 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3.js +43 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Body/BpkModalV3Body.d.ts +7 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Body/BpkModalV3Body.js +30 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Body.module.css +18 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3CloseTrigger/BpkModalV3CloseTrigger.d.ts +7 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3CloseTrigger/BpkModalV3CloseTrigger.js +49 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3CloseTrigger.module.css +18 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Content/BpkModalV3Content.d.ts +7 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Content/BpkModalV3Content.js +38 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Content.module.css +18 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Context.d.ts +3 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Context.js +22 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Description/BpkModalV3Description.d.ts +7 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Description/BpkModalV3Description.js +28 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Header/BpkModalV3Header.d.ts +7 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Header/BpkModalV3Header.js +34 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Header.module.css +18 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3HeroImage/BpkModalV3HeroImage.d.ts +10 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3HeroImage/BpkModalV3HeroImage.js +44 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3HeroImage.module.css +18 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Portal/BpkModalV3Portal.d.ts +7 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Portal/BpkModalV3Portal.js +26 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Root/BpkModalV3Root.d.ts +13 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Root/BpkModalV3Root.js +44 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Scrim/BpkModalV3Scrim.d.ts +2 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Scrim/BpkModalV3Scrim.js +32 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Scrim.module.css +18 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Title/BpkModalV3Title.d.ts +7 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Title/BpkModalV3Title.js +31 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Title.module.css +18 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Trigger/BpkModalV3Trigger.d.ts +8 -0
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Trigger/BpkModalV3Trigger.js +30 -0
- package/bpk-component-modal/src/BpkModalV3/common-types.d.ts +1 -0
- package/bpk-component-modal/src/BpkModalV3/common-types.js +1 -0
- package/bpk-component-page-indicator/src/NavButton.d.ts +2 -1
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +40 -22
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.module.css +1 -1
- package/bpk-component-segmented-control/src/BpkSegmentedControlV2/BpkSegmentedControlV2.js +37 -16
- package/bpk-component-skeleton/src/BpkBaseSkeleton.d.d.ts +1 -0
- package/bpk-component-skeleton/src/BpkSkeleton.d.d.ts +1 -0
- package/bpk-component-table/index.d.ts +2 -1
- package/bpk-component-table/index.js +2 -1
- package/bpk-component-table/src/BpkTable.module.css +1 -1
- package/bpk-component-table/src/BpkTableBody.d.ts +4 -1
- package/bpk-component-table/src/BpkTableBody.js +19 -4
- package/bpk-component-table/src/common-types.d.ts +5 -0
- package/bpk-component-table/src/common-types.js +22 -0
- package/bpk-react-utils/src/Portal.d.ts +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Backpack - Skyscanner's Design System
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2016 Skyscanner Ltd
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { Checkbox } from '@ark-ui/react';
|
|
20
|
+
|
|
21
|
+
// Renders Ark's visually hidden native <input type="checkbox">.
|
|
22
|
+
// Include when the checkbox is inside a <form> for native form submission.
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
const BpkCheckboxV2HiddenInput = () => /*#__PURE__*/_jsx(Checkbox.HiddenInput, {});
|
|
25
|
+
export default BpkCheckboxV2HiddenInput;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Backpack - Skyscanner's Design System
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2016 Skyscanner Ltd
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
// The checkmark and indeterminate bar are rendered via CSS on BpkCheckboxV2Control
|
|
20
|
+
// (bpk-checkbox__checkmark mixin + ::before pseudo-element), so this slot
|
|
21
|
+
// component intentionally renders nothing.
|
|
22
|
+
const BpkCheckboxV2Indicator = () => null;
|
|
23
|
+
export default BpkCheckboxV2Indicator;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Backpack - Skyscanner's Design System
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2016 Skyscanner Ltd
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { Checkbox } from '@ark-ui/react';
|
|
20
|
+
import { cssModules } from "../../../bpk-react-utils";
|
|
21
|
+
import STYLES from "./BpkCheckboxV2.module.css";
|
|
22
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
+
const getClassName = cssModules(STYLES);
|
|
24
|
+
const BpkCheckboxV2Label = ({
|
|
25
|
+
children
|
|
26
|
+
}) => /*#__PURE__*/_jsx(Checkbox.Label, {
|
|
27
|
+
className: getClassName('bpk-checkbox-v2__label'),
|
|
28
|
+
children: children
|
|
29
|
+
});
|
|
30
|
+
export default BpkCheckboxV2Label;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type BpkCheckboxV2CheckedState = boolean | 'indeterminate';
|
|
3
|
+
export type BpkCheckboxV2RootProps = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
checked?: BpkCheckboxV2CheckedState;
|
|
6
|
+
defaultChecked?: BpkCheckboxV2CheckedState;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
id?: string;
|
|
9
|
+
invalid?: boolean;
|
|
10
|
+
name?: string;
|
|
11
|
+
onCheckedChange?: (checked: BpkCheckboxV2CheckedState) => void;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
value?: string;
|
|
14
|
+
};
|
|
15
|
+
declare const BpkCheckboxV2Root: ({ checked, children, defaultChecked, disabled, id, invalid, name, onCheckedChange, required, value, }: BpkCheckboxV2RootProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default BpkCheckboxV2Root;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Backpack - Skyscanner's Design System
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2016 Skyscanner Ltd
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { Checkbox } from '@ark-ui/react';
|
|
20
|
+
import { cssModules, getDataComponentAttribute } from "../../../bpk-react-utils";
|
|
21
|
+
import STYLES from "./BpkCheckboxV2.module.css";
|
|
22
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
+
const getClassName = cssModules(STYLES);
|
|
24
|
+
const BpkCheckboxV2Root = ({
|
|
25
|
+
checked,
|
|
26
|
+
children,
|
|
27
|
+
defaultChecked,
|
|
28
|
+
disabled = false,
|
|
29
|
+
id,
|
|
30
|
+
invalid = false,
|
|
31
|
+
name,
|
|
32
|
+
onCheckedChange,
|
|
33
|
+
required = false,
|
|
34
|
+
value
|
|
35
|
+
}) => /*#__PURE__*/_jsx(Checkbox.Root, {
|
|
36
|
+
className: getClassName('bpk-checkbox-v2'),
|
|
37
|
+
checked: checked,
|
|
38
|
+
defaultChecked: defaultChecked,
|
|
39
|
+
disabled: disabled,
|
|
40
|
+
id: id,
|
|
41
|
+
invalid: invalid,
|
|
42
|
+
name: name,
|
|
43
|
+
onCheckedChange: details => onCheckedChange?.(details.checked),
|
|
44
|
+
required: required,
|
|
45
|
+
value: value,
|
|
46
|
+
...getDataComponentAttribute('CheckboxV2'),
|
|
47
|
+
children: children
|
|
48
|
+
});
|
|
49
|
+
export default BpkCheckboxV2Root;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Backpack - Skyscanner's Design System
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2016 Skyscanner Ltd
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
export const checkboxSelectedColorThemeAttributes = ['checkboxSelectedColor'];
|
|
20
|
+
export const checkboxBorderRadiusThemeAttributes = ['checkboxBorderRadius'];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { BpkCheckboxCard, default, CHECKBOX_CARD_VARIANTS, CHECKBOX_CARD_RADIUS, useCheckboxCardContext, } from './src/BpkCheckboxCard';
|
|
2
|
+
export type { BpkCheckboxCardRootProps, BpkCheckboxCardContentProps, BpkCheckboxCardLabelProps, BpkCheckboxCardDescriptionProps, CheckboxCardContextValue, CheckboxCardVariant, CheckboxCardRadius, CheckboxCardChangeHandler, } from './src/BpkCheckboxCard';
|
|
3
|
+
export { default as CHECKBOX_CARD_THEME_ATTRIBUTES, createCheckboxCardTheme, } from './src/themeAttributes';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Backpack - Skyscanner's Design System
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2016 Skyscanner Ltd
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
export { BpkCheckboxCard, default, CHECKBOX_CARD_VARIANTS, CHECKBOX_CARD_RADIUS, useCheckboxCardContext } from "./src/BpkCheckboxCard";
|
|
20
|
+
export { default as CHECKBOX_CARD_THEME_ATTRIBUTES, createCheckboxCardTheme } from "./src/themeAttributes";
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { Root } from './BpkCheckboxCardRoot';
|
|
3
|
+
import type { TextStyle } from '../../bpk-component-text/src/BpkText';
|
|
4
|
+
/**
|
|
5
|
+
* BpkCheckboxCard.HiddenInput - Accessible hidden checkbox input for form submission.
|
|
6
|
+
*
|
|
7
|
+
* Renders a visually hidden <input type="checkbox"> managed by Ark UI.
|
|
8
|
+
* Handles name, value, checked state, required, and disabled automatically.
|
|
9
|
+
* Must be placed inside BpkCheckboxCard.Root.
|
|
10
|
+
*
|
|
11
|
+
* @returns {JSX.Element} The hidden checkbox input element.
|
|
12
|
+
*/
|
|
13
|
+
declare function HiddenInput(): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export type ContentProps = {
|
|
15
|
+
/**
|
|
16
|
+
* Child components (slots, Stack layout primitives, etc.)
|
|
17
|
+
* Optional - can be empty for minimal card displays
|
|
18
|
+
*/
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* BpkCheckboxCard.Content - Main content container
|
|
23
|
+
*
|
|
24
|
+
* Provides a simple wrapper container for organising checkbox card content.
|
|
25
|
+
* Use BpkVStack / BpkHStack for layout control inside Content.
|
|
26
|
+
*/
|
|
27
|
+
declare function Content({ children }: ContentProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export type LabelProps = {
|
|
29
|
+
/** Label text content (plain string only) */
|
|
30
|
+
children: string;
|
|
31
|
+
/** Text style from Backpack typography system. @default "heading-5" */
|
|
32
|
+
textStyle?: TextStyle;
|
|
33
|
+
/** Maximum number of lines before truncation. @default 2 */
|
|
34
|
+
lineClamp?: number;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* BpkCheckboxCard.Label - Primary label slot component
|
|
38
|
+
*
|
|
39
|
+
* Displays the primary text label using BpkText.
|
|
40
|
+
* Automatically truncates with ellipsis after the specified number of lines.
|
|
41
|
+
* Accessibility is provided by the wrapping <label> element from Ark UI's CheckboxRoot.
|
|
42
|
+
*/
|
|
43
|
+
declare function Label({ children, lineClamp, textStyle }: LabelProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export type DescriptionProps = {
|
|
45
|
+
/** Description text content (plain string only) */
|
|
46
|
+
children: string;
|
|
47
|
+
/** Text style from Backpack typography system. @default "body-default" */
|
|
48
|
+
textStyle?: TextStyle;
|
|
49
|
+
/** Maximum number of lines before truncation. @default 3 */
|
|
50
|
+
lineClamp?: number;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* BpkCheckboxCard.Description - Secondary description slot component
|
|
54
|
+
*
|
|
55
|
+
* Displays secondary descriptive text using BpkText.
|
|
56
|
+
* Automatically truncates with ellipsis after the specified number of lines.
|
|
57
|
+
*/
|
|
58
|
+
declare function Description({ children, lineClamp, textStyle }: DescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
export type PriceProps = {
|
|
60
|
+
/** Price string, e.g. "£35" */
|
|
61
|
+
price: string;
|
|
62
|
+
/** Leading text before the price, e.g. "from". @default "from" */
|
|
63
|
+
leadingText?: string;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* BpkCheckboxCard.Price - Cars-specific price slot.
|
|
67
|
+
*
|
|
68
|
+
* Reads `loading` from context automatically:
|
|
69
|
+
* - loading=true → shows "{leadingText}" + spinner
|
|
70
|
+
* - loading=false → shows "{leadingText} {price}" as secondary description text
|
|
71
|
+
*
|
|
72
|
+
* Intended for use with variant="cars" only.
|
|
73
|
+
*/
|
|
74
|
+
declare function Price({ leadingText, price }: PriceProps): import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
export type IndicatorProps = Record<string, never>;
|
|
76
|
+
/**
|
|
77
|
+
* BpkCheckboxCard.Indicator - Visual corner indicator
|
|
78
|
+
*
|
|
79
|
+
* Renders a circular checkbox indicator in the top-right corner of the card.
|
|
80
|
+
* Empty circle when unchecked; filled with a checkmark when checked.
|
|
81
|
+
* The visual state is driven by Ark UI's data-state attribute on the root <label>.
|
|
82
|
+
*/
|
|
83
|
+
declare function Indicator(_props?: IndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
84
|
+
/**
|
|
85
|
+
* BpkCheckboxCard - Compound component for selectable cards.
|
|
86
|
+
*
|
|
87
|
+
* Built on Ark UI's Checkbox primitive — the Root renders as a <label> element,
|
|
88
|
+
* providing native accessibility, keyboard navigation, and form integration.
|
|
89
|
+
*
|
|
90
|
+
* @example Standard layout
|
|
91
|
+
* <BpkCheckboxCard.Root checked={selected} onCheckedChange={setSelected}>
|
|
92
|
+
* <BpkCheckboxCard.HiddenInput />
|
|
93
|
+
* <BpkCheckboxCard.Content>
|
|
94
|
+
* <BpkVStack gap="bpk-spacing-md" align="center" width="100%">
|
|
95
|
+
* <BpkCheckboxCard.Label>City Centre</BpkCheckboxCard.Label>
|
|
96
|
+
* <BpkPrice price="£85" />
|
|
97
|
+
* </BpkVStack>
|
|
98
|
+
* </BpkCheckboxCard.Content>
|
|
99
|
+
* </BpkCheckboxCard.Root>
|
|
100
|
+
*
|
|
101
|
+
* @example With corner indicator
|
|
102
|
+
* <BpkCheckboxCard.Root checked={selected} onCheckedChange={setSelected}>
|
|
103
|
+
* <BpkCheckboxCard.HiddenInput />
|
|
104
|
+
* <BpkCheckboxCard.Indicator />
|
|
105
|
+
* <BpkCheckboxCard.Content>
|
|
106
|
+
* <BpkCheckboxCard.Label>City Centre</BpkCheckboxCard.Label>
|
|
107
|
+
* </BpkCheckboxCard.Content>
|
|
108
|
+
* </BpkCheckboxCard.Root>
|
|
109
|
+
*/
|
|
110
|
+
declare const BpkCheckboxCard: typeof Root & {
|
|
111
|
+
Root: typeof Root;
|
|
112
|
+
HiddenInput: typeof HiddenInput;
|
|
113
|
+
Content: typeof Content;
|
|
114
|
+
Indicator: typeof Indicator;
|
|
115
|
+
Label: typeof Label;
|
|
116
|
+
Description: typeof Description;
|
|
117
|
+
Price: typeof Price;
|
|
118
|
+
};
|
|
119
|
+
export { BpkCheckboxCard };
|
|
120
|
+
export default BpkCheckboxCard;
|
|
121
|
+
export type { RootProps, RootProps as BpkCheckboxCardRootProps } from './BpkCheckboxCardRoot';
|
|
122
|
+
export type { ContentProps as BpkCheckboxCardContentProps };
|
|
123
|
+
export type { LabelProps as BpkCheckboxCardLabelProps };
|
|
124
|
+
export type { DescriptionProps as BpkCheckboxCardDescriptionProps };
|
|
125
|
+
export type { PriceProps as BpkCheckboxCardPriceProps };
|
|
126
|
+
export { useCheckboxCardContext } from './CheckboxCardContext';
|
|
127
|
+
export type { CheckboxCardContextValue } from './CheckboxCardContext';
|
|
128
|
+
export * from './common-types';
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Backpack - Skyscanner's Design System
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2016 Skyscanner Ltd
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { CheckboxHiddenInput } from '@ark-ui/react';
|
|
20
|
+
import { withButtonAlignment } from "../../bpk-component-icon";
|
|
21
|
+
import TickCircleIcon from "../../bpk-component-icon/sm/tick-circle";
|
|
22
|
+
import { BpkSpinner, SPINNER_TYPES } from "../../bpk-component-spinner";
|
|
23
|
+
import BpkText, { TEXT_COLORS, TEXT_STYLES } from "../../bpk-component-text";
|
|
24
|
+
import { cssModules } from "../../bpk-react-utils";
|
|
25
|
+
import { Root } from "./BpkCheckboxCardRoot";
|
|
26
|
+
import { useCheckboxCardContext } from "./CheckboxCardContext";
|
|
27
|
+
import STYLES from "./BpkCheckboxCard.module.css";
|
|
28
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
+
const getClassName = cssModules(STYLES);
|
|
30
|
+
const AlignedTickCircleIcon = withButtonAlignment(TickCircleIcon);
|
|
31
|
+
|
|
32
|
+
// ─── HiddenInput ─────────────────────────────────────────────────────────────
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* BpkCheckboxCard.HiddenInput - Accessible hidden checkbox input for form submission.
|
|
36
|
+
*
|
|
37
|
+
* Renders a visually hidden <input type="checkbox"> managed by Ark UI.
|
|
38
|
+
* Handles name, value, checked state, required, and disabled automatically.
|
|
39
|
+
* Must be placed inside BpkCheckboxCard.Root.
|
|
40
|
+
*
|
|
41
|
+
* @returns {JSX.Element} The hidden checkbox input element.
|
|
42
|
+
*/
|
|
43
|
+
function HiddenInput() {
|
|
44
|
+
return /*#__PURE__*/_jsx(CheckboxHiddenInput, {});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// ─── Content ─────────────────────────────────────────────────────────────────
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* BpkCheckboxCard.Content - Main content container
|
|
51
|
+
*
|
|
52
|
+
* Provides a simple wrapper container for organising checkbox card content.
|
|
53
|
+
* Use BpkVStack / BpkHStack for layout control inside Content.
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
function Content({
|
|
57
|
+
children
|
|
58
|
+
}) {
|
|
59
|
+
return /*#__PURE__*/_jsx("div", {
|
|
60
|
+
className: getClassName('bpk-checkbox-card-content'),
|
|
61
|
+
children: children
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// ─── Label ───────────────────────────────────────────────────────────────────
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* BpkCheckboxCard.Label - Primary label slot component
|
|
69
|
+
*
|
|
70
|
+
* Displays the primary text label using BpkText.
|
|
71
|
+
* Automatically truncates with ellipsis after the specified number of lines.
|
|
72
|
+
* Accessibility is provided by the wrapping <label> element from Ark UI's CheckboxRoot.
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
function Label({
|
|
76
|
+
children,
|
|
77
|
+
lineClamp = 2,
|
|
78
|
+
textStyle = TEXT_STYLES.heading5
|
|
79
|
+
}) {
|
|
80
|
+
return /*#__PURE__*/_jsx("div", {
|
|
81
|
+
className: getClassName('bpk-checkbox-card-label'),
|
|
82
|
+
style: {
|
|
83
|
+
'--bpk-label-line-clamp': lineClamp
|
|
84
|
+
},
|
|
85
|
+
children: /*#__PURE__*/_jsx(BpkText, {
|
|
86
|
+
textStyle: textStyle,
|
|
87
|
+
tagName: "span",
|
|
88
|
+
children: children
|
|
89
|
+
})
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// ─── Description ─────────────────────────────────────────────────────────────
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* BpkCheckboxCard.Description - Secondary description slot component
|
|
97
|
+
*
|
|
98
|
+
* Displays secondary descriptive text using BpkText.
|
|
99
|
+
* Automatically truncates with ellipsis after the specified number of lines.
|
|
100
|
+
*/
|
|
101
|
+
|
|
102
|
+
function Description({
|
|
103
|
+
children,
|
|
104
|
+
lineClamp = 3,
|
|
105
|
+
textStyle = TEXT_STYLES.bodyDefault
|
|
106
|
+
}) {
|
|
107
|
+
return /*#__PURE__*/_jsx("div", {
|
|
108
|
+
className: getClassName('bpk-checkbox-card-description'),
|
|
109
|
+
style: {
|
|
110
|
+
'--bpk-description-line-clamp': lineClamp
|
|
111
|
+
},
|
|
112
|
+
children: /*#__PURE__*/_jsx(BpkText, {
|
|
113
|
+
textStyle: textStyle,
|
|
114
|
+
tagName: "span",
|
|
115
|
+
children: children
|
|
116
|
+
})
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// ─── Price (cars variant only) ────────────────────────────────────────────────
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* BpkCheckboxCard.Price - Cars-specific price slot.
|
|
124
|
+
*
|
|
125
|
+
* Reads `loading` from context automatically:
|
|
126
|
+
* - loading=true → shows "{leadingText}" + spinner
|
|
127
|
+
* - loading=false → shows "{leadingText} {price}" as secondary description text
|
|
128
|
+
*
|
|
129
|
+
* Intended for use with variant="cars" only.
|
|
130
|
+
*/
|
|
131
|
+
|
|
132
|
+
function Price({
|
|
133
|
+
leadingText = 'from',
|
|
134
|
+
price
|
|
135
|
+
}) {
|
|
136
|
+
const {
|
|
137
|
+
loading
|
|
138
|
+
} = useCheckboxCardContext();
|
|
139
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
140
|
+
className: getClassName('bpk-checkbox-card-price'),
|
|
141
|
+
children: [/*#__PURE__*/_jsx(BpkText, {
|
|
142
|
+
textStyle: TEXT_STYLES.footnote,
|
|
143
|
+
tagName: "span",
|
|
144
|
+
color: TEXT_COLORS.textSecondary,
|
|
145
|
+
children: leadingText
|
|
146
|
+
}), loading ? /*#__PURE__*/_jsx(BpkSpinner, {
|
|
147
|
+
type: SPINNER_TYPES.primary,
|
|
148
|
+
small: true
|
|
149
|
+
}) : /*#__PURE__*/_jsx(BpkText, {
|
|
150
|
+
textStyle: TEXT_STYLES.footnote,
|
|
151
|
+
tagName: "span",
|
|
152
|
+
color: TEXT_COLORS.textSecondary,
|
|
153
|
+
children: price
|
|
154
|
+
})]
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// ─── Indicator ───────────────────────────────────────────────────────────────
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* BpkCheckboxCard.Indicator - Visual corner indicator
|
|
162
|
+
*
|
|
163
|
+
* Renders a circular checkbox indicator in the top-right corner of the card.
|
|
164
|
+
* Empty circle when unchecked; filled with a checkmark when checked.
|
|
165
|
+
* The visual state is driven by Ark UI's data-state attribute on the root <label>.
|
|
166
|
+
*/
|
|
167
|
+
|
|
168
|
+
function Indicator(_props = {}) {
|
|
169
|
+
return /*#__PURE__*/_jsx("div", {
|
|
170
|
+
className: getClassName('bpk-checkbox-card-indicator'),
|
|
171
|
+
"aria-hidden": true,
|
|
172
|
+
children: /*#__PURE__*/_jsx(AlignedTickCircleIcon, {})
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// ─── Compound Component ───────────────────────────────────────────────────────
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* BpkCheckboxCard - Compound component for selectable cards.
|
|
180
|
+
*
|
|
181
|
+
* Built on Ark UI's Checkbox primitive — the Root renders as a <label> element,
|
|
182
|
+
* providing native accessibility, keyboard navigation, and form integration.
|
|
183
|
+
*
|
|
184
|
+
* @example Standard layout
|
|
185
|
+
* <BpkCheckboxCard.Root checked={selected} onCheckedChange={setSelected}>
|
|
186
|
+
* <BpkCheckboxCard.HiddenInput />
|
|
187
|
+
* <BpkCheckboxCard.Content>
|
|
188
|
+
* <BpkVStack gap="bpk-spacing-md" align="center" width="100%">
|
|
189
|
+
* <BpkCheckboxCard.Label>City Centre</BpkCheckboxCard.Label>
|
|
190
|
+
* <BpkPrice price="£85" />
|
|
191
|
+
* </BpkVStack>
|
|
192
|
+
* </BpkCheckboxCard.Content>
|
|
193
|
+
* </BpkCheckboxCard.Root>
|
|
194
|
+
*
|
|
195
|
+
* @example With corner indicator
|
|
196
|
+
* <BpkCheckboxCard.Root checked={selected} onCheckedChange={setSelected}>
|
|
197
|
+
* <BpkCheckboxCard.HiddenInput />
|
|
198
|
+
* <BpkCheckboxCard.Indicator />
|
|
199
|
+
* <BpkCheckboxCard.Content>
|
|
200
|
+
* <BpkCheckboxCard.Label>City Centre</BpkCheckboxCard.Label>
|
|
201
|
+
* </BpkCheckboxCard.Content>
|
|
202
|
+
* </BpkCheckboxCard.Root>
|
|
203
|
+
*/
|
|
204
|
+
const BpkCheckboxCard = Object.assign(Root, {
|
|
205
|
+
Root,
|
|
206
|
+
HiddenInput,
|
|
207
|
+
Content,
|
|
208
|
+
Indicator,
|
|
209
|
+
Label,
|
|
210
|
+
Description,
|
|
211
|
+
Price
|
|
212
|
+
});
|
|
213
|
+
export { BpkCheckboxCard };
|
|
214
|
+
export default BpkCheckboxCard;
|
|
215
|
+
export { useCheckboxCardContext } from "./CheckboxCardContext";
|
|
216
|
+
export * from "./common-types";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Backpack - Skyscanner's Design System
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2016 Skyscanner Ltd
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
.bpk-checkbox-card-root{position:relative;display:block;min-width:2.75rem;height:100%;min-height:2.75rem;transition:background-color 200ms ease-in-out,border-color 200ms ease-in-out,color 200ms ease-in-out;border:1px solid var(--bpk-checkbox-card-default-border-color, rgb(193, 199, 207));background-color:var(--bpk-checkbox-card-default-background-color, rgb(255, 255, 255));color:var(--bpk-checkbox-card-default-text-color, rgb(22, 22, 22));cursor:pointer;box-sizing:border-box}.bpk-checkbox-card-root:has(:focus-visible){outline:.125rem solid #0062e3;outline-offset:.125rem}.bpk-no-touch-support .bpk-checkbox-card-root:not([data-state=checked]):not([data-disabled]):hover:not(:active):not(:disabled),.bpk-no-touch-support .bpk-checkbox-card-root:not([data-state=checked])[data-loading]:hover:not(:active):not(:disabled){border-color:var(--bpk-checkbox-card-hover-border-color, rgb(193, 199, 207));background-color:var(--bpk-checkbox-card-hover-background-color, rgb(245, 247, 250))}:global(.bpk-no-touch-support) .bpk-checkbox-card-root:not([data-state=checked]):not([data-disabled]):hover:not(:active):not(:disabled),:global(.bpk-no-touch-support) .bpk-checkbox-card-root:not([data-state=checked])[data-loading]:hover:not(:active):not(:disabled){border-color:var(--bpk-checkbox-card-hover-border-color, rgb(193, 199, 207));background-color:var(--bpk-checkbox-card-hover-background-color, rgb(245, 247, 250))}.bpk-checkbox-card-root[data-state=checked]{border-color:var(--bpk-checkbox-card-checked-border-color, transparent);background-color:var(--bpk-checkbox-card-checked-background-color, rgb(5, 32, 60));color:var(--bpk-checkbox-card-checked-text-color, rgb(255, 255, 255))}.bpk-checkbox-card-root[data-disabled]:not([data-loading]){border-color:var(--bpk-checkbox-card-disabled-border-color, rgb(193, 199, 207));background-color:var(--bpk-checkbox-card-disabled-background-color, rgb(239, 243, 248));color:var(--bpk-checkbox-card-disabled-text-color, rgba(0, 0, 0, 0.2));cursor:not-allowed}.bpk-checkbox-card-root[data-loading]{cursor:not-allowed}.bpk-checkbox-card-root--radius-square{border-radius:0}.bpk-checkbox-card-root--radius-rounded{border-radius:.75rem}.bpk-checkbox-card-root--on-canvas-default{--bpk-checkbox-card-default-background-color: rgb(255, 255, 255);--bpk-checkbox-card-default-border-color: rgb(193, 199, 207)}.bpk-checkbox-card-root--cars{--bpk-checkbox-card-default-background-color: rgb(255, 255, 255);--bpk-checkbox-card-default-border-color: rgb(193, 199, 207);--bpk-checkbox-card-disabled-border-color: transparent;--bpk-checkbox-card-hover-background-color: rgb(255, 255, 255);--bpk-checkbox-card-hover-border-color: rgb(5, 32, 60);--bpk-checkbox-card-checked-background-color: rgb(255, 255, 255);--bpk-checkbox-card-checked-text-color: rgb(22, 22, 22);--bpk-checkbox-card-checked-border-color: rgb(5, 32, 60);--bpk-checkbox-card-indicator-background-color: rgb(5, 32, 60)}.bpk-checkbox-card-root--cars.bpk-checkbox-card-root--cars--radius-rounded{border-radius:1.5rem}.bpk-checkbox-card-root--cars[data-state=checked]{box-shadow:0 0 0 1px #05203c}.bpk-checkbox-card-root--on-canvas-contrast{--bpk-checkbox-card-default-background-color: rgb(255, 255, 255);--bpk-checkbox-card-hover-background-color: rgb(255, 255, 255);--bpk-checkbox-card-default-border-color: transparent;--bpk-checkbox-card-hover-border-color: rgb(193, 199, 207);--bpk-checkbox-card-disabled-background-color: rgb(239, 243, 248)}.bpk-checkbox-card-root--on-surface-contrast{--bpk-checkbox-card-default-background-color: rgba(255, 255, 255, 0.1);--bpk-checkbox-card-default-text-color: rgb(255, 255, 255);--bpk-checkbox-card-secondary-text-color: rgb(255, 255, 255);--bpk-checkbox-card-hover-background-color: rgb(5, 32, 60);--bpk-checkbox-card-checked-background-color: rgb(0, 98, 227);--bpk-checkbox-card-default-border-color: transparent;--bpk-checkbox-card-hover-border-color: transparent;--bpk-checkbox-card-disabled-border-color: transparent}.bpk-checkbox-card-content{width:100%;padding:.5rem}.bpk-checkbox-card-label{display:-webkit-box;width:100%;color:inherit;text-align:center;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:var(--bpk-label-line-clamp, 2);line-clamp:var(--bpk-label-line-clamp, 2)}.bpk-checkbox-card-label>*{text-align:inherit}.bpk-checkbox-card-description{display:-webkit-box;width:100%;color:var(--bpk-checkbox-card-secondary-text-color, rgb(98, 105, 113));text-align:center;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:var(--bpk-description-line-clamp, 3);line-clamp:var(--bpk-description-line-clamp, 3);margin:0}.bpk-checkbox-card-root[data-state=checked] .bpk-checkbox-card-description{color:inherit}.bpk-checkbox-card-root--cars[data-state=checked] .bpk-checkbox-card-description{color:var(--bpk-checkbox-card-secondary-text-color, rgb(98, 105, 113))}.bpk-checkbox-card-description>*{text-align:inherit}.bpk-checkbox-card-price{display:flex;align-items:center;gap:.25rem}.bpk-checkbox-card-indicator{position:absolute;top:.5rem;display:none;z-index:1;width:1.25rem;height:1.25rem;inset-inline-end:.5rem;pointer-events:none}.bpk-checkbox-card-indicator svg{width:100%;height:100%;fill:var(--bpk-checkbox-card-indicator-background-color, rgb(0, 98, 227))}.bpk-checkbox-card-root[data-state=checked] .bpk-checkbox-card-indicator{display:block}.bpk-checkbox-card-root--cars .bpk-checkbox-card-indicator{width:1rem;height:1rem}
|