@skyscanner/backpack-web 41.7.0-beta-v2 → 41.8.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.
Files changed (37) hide show
  1. package/bpk-component-chip-group/src/BpkMultiSelectChipGroup.js +3 -2
  2. package/bpk-component-icon/src/withDescription.js +3 -5
  3. package/bpk-component-info-banner/src/BpkInfoBannerInner.js +2 -2
  4. package/bpk-component-theme-toggle/src/BpkThemeToggle.js +2 -5
  5. package/bpk-component-visually-hidden/index.d.ts +3 -0
  6. package/{bpk-component-theme-toggle/src/BpkThemeToggle.module.css → bpk-component-visually-hidden/index.js} +7 -5
  7. package/bpk-component-visually-hidden/src/BpkVisuallyHidden.d.ts +8 -0
  8. package/{bpk-component-layout/src/BpkGridItem.js → bpk-component-visually-hidden/src/BpkVisuallyHidden.js} +18 -25
  9. package/{bpk-component-icon/src/withDescription.module.css → bpk-component-visually-hidden/src/BpkVisuallyHidden.module.css} +1 -1
  10. package/package.json +1 -2
  11. package/bpk-component-layout/index.d.ts +0 -18
  12. package/bpk-component-layout/index.js +0 -29
  13. package/bpk-component-layout/src/BpkBox.d.ts +0 -3
  14. package/bpk-component-layout/src/BpkBox.js +0 -33
  15. package/bpk-component-layout/src/BpkFlex.d.ts +0 -3
  16. package/bpk-component-layout/src/BpkFlex.js +0 -51
  17. package/bpk-component-layout/src/BpkGrid.d.ts +0 -3
  18. package/bpk-component-layout/src/BpkGrid.js +0 -57
  19. package/bpk-component-layout/src/BpkGridItem.d.ts +0 -3
  20. package/bpk-component-layout/src/BpkProvider.d.ts +0 -14
  21. package/bpk-component-layout/src/BpkProvider.js +0 -42
  22. package/bpk-component-layout/src/BpkStack.constant.d.ts +0 -2
  23. package/bpk-component-layout/src/BpkStack.constant.js +0 -22
  24. package/bpk-component-layout/src/BpkStack.d.ts +0 -5
  25. package/bpk-component-layout/src/BpkStack.js +0 -57
  26. package/bpk-component-layout/src/BpkVessel.d.ts +0 -36
  27. package/bpk-component-layout/src/BpkVessel.js +0 -66
  28. package/bpk-component-layout/src/commonProps.d.ts +0 -86
  29. package/bpk-component-layout/src/commonProps.js +0 -1
  30. package/bpk-component-layout/src/theme.d.ts +0 -36
  31. package/bpk-component-layout/src/theme.js +0 -229
  32. package/bpk-component-layout/src/tokenUtils.d.ts +0 -108
  33. package/bpk-component-layout/src/tokenUtils.js +0 -323
  34. package/bpk-component-layout/src/tokens.d.ts +0 -96
  35. package/bpk-component-layout/src/tokens.js +0 -138
  36. package/bpk-component-layout/src/types.d.ts +0 -227
  37. package/bpk-component-layout/src/types.js +0 -1
@@ -21,6 +21,7 @@ import BpkBreakpoint, { BREAKPOINTS } from "../../bpk-component-breakpoint";
21
21
  import BpkSelectableChip, { BpkDismissibleChip, BpkIconChip, BpkDropdownChip, CHIP_TYPES } from "../../bpk-component-chip";
22
22
  import BpkMobileScrollContainer from "../../bpk-component-mobile-scroll-container";
23
23
  import BpkText, { TEXT_STYLES } from "../../bpk-component-text/src/BpkText";
24
+ import BpkVisuallyHidden from "../../bpk-component-visually-hidden";
24
25
  import { cssModules } from "../../bpk-react-utils";
25
26
  import BpkStickyChip from "./BpkStickyChip";
26
27
  import Nudger, { POSITION } from "./Nudger";
@@ -85,8 +86,8 @@ const ChipGroupContent = ({
85
86
  }) => /*#__PURE__*/_jsxs("fieldset", {
86
87
  className: chipGroupClassNames,
87
88
  role: ariaMultiselectable ? 'group' : 'radiogroup',
88
- children: [ariaLabel && /*#__PURE__*/_jsx("legend", {
89
- className: "visually-hidden",
89
+ children: [ariaLabel && /*#__PURE__*/_jsx(BpkVisuallyHidden, {
90
+ as: "legend",
90
91
  children: ariaLabel
91
92
  }), label && /*#__PURE__*/_jsx(BpkText, {
92
93
  textStyle: TEXT_STYLES.footnote,
@@ -16,16 +16,14 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import { cssModules, wrapDisplayName } from "../../bpk-react-utils";
20
- import STYLES from "./withDescription.module.css";
19
+ import BpkVisuallyHidden from "../../bpk-component-visually-hidden";
20
+ import { wrapDisplayName } from "../../bpk-react-utils";
21
21
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
- const getClassName = cssModules(STYLES);
23
22
  export default function withDescription(Component, description) {
24
23
  const WithDescription = props => /*#__PURE__*/_jsxs("span", {
25
24
  children: [/*#__PURE__*/_jsx(Component, {
26
25
  ...props
27
- }), /*#__PURE__*/_jsx("span", {
28
- className: getClassName('bpk-icon-description'),
26
+ }), /*#__PURE__*/_jsx(BpkVisuallyHidden, {
29
27
  children: description
30
28
  })]
31
29
  });
@@ -32,6 +32,7 @@ import ChevronUpIcon from "../../bpk-component-icon/sm/chevron-up";
32
32
  import InfoCircleIcon from "../../bpk-component-icon/sm/information-circle";
33
33
  import TickCircleIcon from "../../bpk-component-icon/sm/tick-circle";
34
34
  import BpkLink from "../../bpk-component-link";
35
+ import BpkVisuallyHidden from "../../bpk-component-visually-hidden";
35
36
  import { cssModules } from "../../bpk-react-utils";
36
37
  import AnimateAndFade from "./AnimateAndFade";
37
38
  import { ALERT_TYPES, STYLE_TYPES } from "./common-types";
@@ -68,8 +69,7 @@ const getIconForType = (type, CustomIcon) => {
68
69
  };
69
70
  const ToggleButton = props => /*#__PURE__*/_jsxs("div", {
70
71
  className: getClassName('bpk-info-banner__toggle-button'),
71
- children: [props.expanded ? /*#__PURE__*/_jsx(CollapseIcon, {}) : /*#__PURE__*/_jsx(ExpandIcon, {}), /*#__PURE__*/_jsx("span", {
72
- className: "visually-hidden",
72
+ children: [props.expanded ? /*#__PURE__*/_jsx(CollapseIcon, {}) : /*#__PURE__*/_jsx(ExpandIcon, {}), /*#__PURE__*/_jsx(BpkVisuallyHidden, {
73
73
  children: props.label
74
74
  })]
75
75
  });
@@ -20,13 +20,11 @@ import { Component } from 'react';
20
20
  import BpkLabel from "../../bpk-component-label";
21
21
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
22
22
  import BpkSelect from "../../bpk-component-select";
23
- import { cssModules } from "../../bpk-react-utils";
23
+ import BpkVisuallyHidden from "../../bpk-component-visually-hidden";
24
24
  import bpkCustomThemes from "./theming";
25
25
  import { getHtmlElement, THEME_CHANGE_EVENT } from "./utils";
26
- import STYLES from "./BpkThemeToggle.module.css";
27
26
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
28
27
  const inputId = 'theme-select';
29
- const getClassName = cssModules(STYLES);
30
28
  const availableThemes = Object.keys(bpkCustomThemes);
31
29
  const setTheme = theme => {
32
30
  const htmlElement = getHtmlElement();
@@ -84,8 +82,7 @@ class BpkThemeToggle extends Component {
84
82
  } = this.props;
85
83
  return /*#__PURE__*/_jsxs("div", {
86
84
  ...rest,
87
- children: [/*#__PURE__*/_jsx("span", {
88
- className: getClassName('bpk-theme-toggle__label'),
85
+ children: [/*#__PURE__*/_jsx(BpkVisuallyHidden, {
89
86
  children: /*#__PURE__*/_jsx(BpkLabel, {
90
87
  htmlFor: inputId,
91
88
  children: "Change theme"
@@ -0,0 +1,3 @@
1
+ import BpkVisuallyHidden, { type Props as BpkVisuallyHiddenProps } from './src/BpkVisuallyHidden';
2
+ export type { BpkVisuallyHiddenProps };
3
+ export default BpkVisuallyHidden;
@@ -1,18 +1,20 @@
1
1
  /*
2
2
  * Backpack - Skyscanner's Design System
3
- *
3
+ *
4
4
  * Copyright 2016 Skyscanner Ltd
5
- *
5
+ *
6
6
  * Licensed under the Apache License, Version 2.0 (the "License");
7
7
  * you may not use this file except in compliance with the License.
8
8
  * You may obtain a copy of the License at
9
- *
9
+ *
10
10
  * http://www.apache.org/licenses/LICENSE-2.0
11
- *
11
+ *
12
12
  * Unless required by applicable law or agreed to in writing, software
13
13
  * distributed under the License is distributed on an "AS IS" BASIS,
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
- .bpk-theme-toggle__label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;overflow:hidden;clip:rect(0 0 0 0)}
18
+
19
+ import BpkVisuallyHidden from "./src/BpkVisuallyHidden";
20
+ export default BpkVisuallyHidden;
@@ -0,0 +1,8 @@
1
+ import type { ReactNode } from 'react';
2
+ export type VisuallyHiddenElement = 'span' | 'div' | 'p' | 'strong' | 'em' | 'small' | 'legend' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
3
+ export type Props = {
4
+ as?: VisuallyHiddenElement;
5
+ children: ReactNode;
6
+ };
7
+ declare const BpkVisuallyHidden: ({ as: Element, children, }: Props) => import("react/jsx-runtime").JSX.Element;
8
+ export default BpkVisuallyHidden;
@@ -16,30 +16,23 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import { GridItem } from '@chakra-ui/react';
20
- import { processBpkProps } from "./tokenUtils";
19
+ import { cssModules } from "../../bpk-react-utils";
20
+ import STYLES from "./BpkVisuallyHidden.module.css";
21
21
  import { jsx as _jsx } from "react/jsx-runtime";
22
- export const BpkGridItem = ({
23
- area,
24
- children,
25
- colEnd,
26
- colSpan,
27
- colStart,
28
- rowEnd,
29
- rowSpan,
30
- rowStart,
31
- ...props
22
+ const getClassName = cssModules(STYLES);
23
+ const BpkVisuallyHidden = ({
24
+ as: Element = 'span',
25
+ children
32
26
  }) => {
33
- const processedProps = processBpkProps(props);
34
- return /*#__PURE__*/_jsx(GridItem, {
35
- ...processedProps,
36
- area: area,
37
- colEnd: colEnd,
38
- colStart: colStart,
39
- colSpan: colSpan,
40
- rowEnd: rowEnd,
41
- rowStart: rowStart,
42
- rowSpan: rowSpan,
43
- children: children
44
- });
45
- };
27
+ const classNames = getClassName('bpk-visually-hidden');
28
+ return (
29
+ /*#__PURE__*/
30
+ // Allowed, Element is always a dom element.
31
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
32
+ _jsx(Element, {
33
+ className: classNames,
34
+ children: children
35
+ })
36
+ );
37
+ };
38
+ export default BpkVisuallyHidden;
@@ -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-icon-description{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;overflow:hidden;clip:rect(0 0 0 0)}
18
+ .bpk-visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;overflow:hidden;clip:rect(0 0 0 0)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "41.7.0-beta-v2",
3
+ "version": "41.8.0",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,7 +22,6 @@
22
22
  "access": "public"
23
23
  },
24
24
  "dependencies": {
25
- "@chakra-ui/react": "^3.30.0",
26
25
  "@floating-ui/react": "^0.26.12",
27
26
  "@popperjs/core": "^2.11.8",
28
27
  "@radix-ui/react-compose-refs": "^1.1.1",
@@ -1,18 +0,0 @@
1
- export { BpkProvider } from './src/BpkProvider';
2
- export { BpkBox } from './src/BpkBox';
3
- export { BpkVessel } from './src/BpkVessel';
4
- export { BpkFlex } from './src/BpkFlex';
5
- export { BpkGrid } from './src/BpkGrid';
6
- export { BpkGridItem } from './src/BpkGridItem';
7
- export type { BpkProviderProps } from './src/BpkProvider';
8
- export type { BpkBoxProps } from './src/BpkBox';
9
- export type { BpkVesselProps } from './src/BpkVessel';
10
- export type { BpkFlexProps } from './src/BpkFlex';
11
- export type { BpkGridProps } from './src/BpkGrid';
12
- export type { BpkGridItemProps } from './src/BpkGridItem';
13
- export { BpkStack, BpkHStack, BpkVStack } from './src/BpkStack';
14
- export type { BpkStackProps } from './src/BpkStack';
15
- export type { BpkCommonLayoutProps, BpkBoxSpecificProps, BpkFlexSpecificProps, BpkGridSpecificProps, BpkGridItemSpecificProps, } from './src/types';
16
- export type { BpkStackSpecificProps } from './src/types';
17
- export type { BpkSpacingToken, BpkBreakpointToken, BpkSpacingValue, BpkBreakpointValue, } from './src/tokens';
18
- export { BpkSpacing, BpkBreakpoint, isValidSpacingValue, isPercentage, } from './src/tokens';
@@ -1,29 +0,0 @@
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 { BpkProvider } from "./src/BpkProvider";
20
- export { BpkBox } from "./src/BpkBox";
21
- export { BpkVessel } from "./src/BpkVessel";
22
- export { BpkFlex } from "./src/BpkFlex";
23
- export { BpkGrid } from "./src/BpkGrid";
24
- export { BpkGridItem } from "./src/BpkGridItem";
25
- export { BpkStack, BpkHStack, BpkVStack } from "./src/BpkStack";
26
-
27
- // Export token types and utilities
28
-
29
- export { BpkSpacing, BpkBreakpoint, isValidSpacingValue, isPercentage } from "./src/tokens";
@@ -1,3 +0,0 @@
1
- import type { BpkBoxProps } from './types';
2
- export declare const BpkBox: ({ children, ...props }: BpkBoxProps) => import("react/jsx-runtime").JSX.Element;
3
- export type { BpkBoxProps };
@@ -1,33 +0,0 @@
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 { Box } from '@chakra-ui/react';
20
- import { processBpkComponentProps } from "./tokenUtils";
21
- import { jsx as _jsx } from "react/jsx-runtime";
22
- export const BpkBox = ({
23
- children,
24
- ...props
25
- }) => {
26
- const processedProps = processBpkComponentProps(props, {
27
- component: 'BpkBox'
28
- });
29
- return /*#__PURE__*/_jsx(Box, {
30
- ...processedProps,
31
- children: children
32
- });
33
- };
@@ -1,3 +0,0 @@
1
- import type { BpkFlexProps } from './types';
2
- export declare const BpkFlex: ({ align, basis, children, direction, grow, inline, justify, shrink, wrap, ...props }: BpkFlexProps) => import("react/jsx-runtime").JSX.Element;
3
- export type { BpkFlexProps };
@@ -1,51 +0,0 @@
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 { Flex } from '@chakra-ui/react';
20
- import { processBpkComponentProps } from "./tokenUtils";
21
- import { jsx as _jsx } from "react/jsx-runtime";
22
- export const BpkFlex = ({
23
- align,
24
- basis,
25
- children,
26
- direction,
27
- grow,
28
- inline,
29
- justify,
30
- shrink,
31
- wrap,
32
- ...props
33
- }) => {
34
- const processedProps = processBpkComponentProps(props, {
35
- component: 'BpkFlex',
36
- responsiveProps: {
37
- flexDirection: direction,
38
- justifyContent: justify,
39
- alignItems: align,
40
- flexWrap: wrap,
41
- flexGrow: grow,
42
- flexShrink: shrink,
43
- flexBasis: basis
44
- }
45
- });
46
- return /*#__PURE__*/_jsx(Flex, {
47
- ...processedProps,
48
- display: inline ? 'inline-flex' : undefined,
49
- children: children
50
- });
51
- };
@@ -1,3 +0,0 @@
1
- import type { BpkGridProps } from './types';
2
- export declare const BpkGrid: ({ align, autoColumns, autoFlow, autoRows, children, column, inline, justify, row, templateAreas, templateColumns, templateRows, ...props }: BpkGridProps) => import("react/jsx-runtime").JSX.Element;
3
- export type { BpkGridProps };
@@ -1,57 +0,0 @@
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 { Grid } from '@chakra-ui/react';
20
- import { processBpkComponentProps } from "./tokenUtils";
21
- import { jsx as _jsx } from "react/jsx-runtime";
22
- export const BpkGrid = ({
23
- align,
24
- autoColumns,
25
- autoFlow,
26
- autoRows,
27
- children,
28
- column,
29
- inline,
30
- justify,
31
- row,
32
- templateAreas,
33
- templateColumns,
34
- templateRows,
35
- ...props
36
- }) => {
37
- const processedProps = processBpkComponentProps(props, {
38
- component: 'BpkGrid',
39
- responsiveProps: {
40
- justifyContent: justify,
41
- alignItems: align,
42
- gridTemplateColumns: templateColumns,
43
- gridTemplateRows: templateRows,
44
- gridTemplateAreas: templateAreas,
45
- gridAutoFlow: autoFlow,
46
- gridAutoRows: autoRows,
47
- gridAutoColumns: autoColumns,
48
- gridColumn: column,
49
- gridRow: row
50
- }
51
- });
52
- return /*#__PURE__*/_jsx(Grid, {
53
- ...processedProps,
54
- display: inline ? 'inline-grid' : undefined,
55
- children: children
56
- });
57
- };
@@ -1,3 +0,0 @@
1
- import type { BpkGridItemProps } from './types';
2
- export declare const BpkGridItem: ({ area, children, colEnd, colSpan, colStart, rowEnd, rowSpan, rowStart, ...props }: BpkGridItemProps) => import("react/jsx-runtime").JSX.Element;
3
- export type { BpkGridItemProps };
@@ -1,14 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- export interface BpkProviderProps {
3
- children: ReactNode;
4
- }
5
- /**
6
- * BpkProvider - Provides Chakra UI context for Backpack layout components
7
- *
8
- * Chakra UI 3.0 requires the `value` prop to be set to a system object.
9
- * We create a custom system with Backpack tokens using createSystem.
10
- *
11
- * @param {BpkProviderProps} props - The provider props.
12
- * @returns {JSX.Element} The provider wrapping its children with Chakra context.
13
- */
14
- export declare const BpkProvider: ({ children }: BpkProviderProps) => JSX.Element;
@@ -1,42 +0,0 @@
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 { ChakraProvider, createSystem, defaultConfig } from '@chakra-ui/react';
20
- import { createBpkConfig } from "./theme";
21
- import { jsx as _jsx } from "react/jsx-runtime";
22
- /**
23
- * Creates a Chakra UI system with Backpack token mappings
24
- * Chakra UI 3.0 uses `createSystem` with `defaultConfig` and custom config
25
- */
26
- const bpkSystem = createSystem(defaultConfig, createBpkConfig());
27
-
28
- /**
29
- * BpkProvider - Provides Chakra UI context for Backpack layout components
30
- *
31
- * Chakra UI 3.0 requires the `value` prop to be set to a system object.
32
- * We create a custom system with Backpack tokens using createSystem.
33
- *
34
- * @param {BpkProviderProps} props - The provider props.
35
- * @returns {JSX.Element} The provider wrapping its children with Chakra context.
36
- */
37
- export const BpkProvider = ({
38
- children
39
- }) => /*#__PURE__*/_jsx(ChakraProvider, {
40
- value: bpkSystem,
41
- children: children
42
- });
@@ -1,2 +0,0 @@
1
- declare const StackOptionKeys: readonly ["align", "justify", "wrap", "direction"];
2
- export default StackOptionKeys;
@@ -1,22 +0,0 @@
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
- // these options align with Chakra's StackOption excluding separator
20
- // TODO: add separator to Stack
21
- const StackOptionKeys = ['align', 'justify', 'wrap', 'direction'];
22
- export default StackOptionKeys;
@@ -1,5 +0,0 @@
1
- import type { BpkStackProps } from './types';
2
- export declare const BpkStack: ({ children, ...props }: BpkStackProps) => import("react/jsx-runtime").JSX.Element;
3
- export declare const BpkHStack: ({ children, ...props }: BpkStackProps) => import("react/jsx-runtime").JSX.Element;
4
- export declare const BpkVStack: ({ children, ...props }: BpkStackProps) => import("react/jsx-runtime").JSX.Element;
5
- export type { BpkStackProps };
@@ -1,57 +0,0 @@
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 { Stack, VStack, HStack } from '@chakra-ui/react';
20
- import { processBpkComponentProps } from "./tokenUtils";
21
- import { jsx as _jsx } from "react/jsx-runtime";
22
- export const BpkStack = ({
23
- children,
24
- ...props
25
- }) => {
26
- const processedProps = processBpkComponentProps(props, {
27
- component: 'BpkStack'
28
- });
29
- return /*#__PURE__*/_jsx(Stack, {
30
- ...processedProps,
31
- children: children
32
- });
33
- };
34
- export const BpkHStack = ({
35
- children,
36
- ...props
37
- }) => {
38
- const processedProps = processBpkComponentProps(props, {
39
- component: 'BpkStack'
40
- });
41
- return /*#__PURE__*/_jsx(HStack, {
42
- ...processedProps,
43
- children: children
44
- });
45
- };
46
- export const BpkVStack = ({
47
- children,
48
- ...props
49
- }) => {
50
- const processedProps = processBpkComponentProps(props, {
51
- component: 'BpkStack'
52
- });
53
- return /*#__PURE__*/_jsx(VStack, {
54
- ...processedProps,
55
- children: children
56
- });
57
- };
@@ -1,36 +0,0 @@
1
- import type { BpkVesselProps } from './types';
2
- /**
3
- * A "migration hatch" layout primitive designed to ease component migration.
4
- *
5
- * BpkVessel renders an HTML element (default: div) and only accepts
6
- * className and style props for legacy styling during migration.
7
- *
8
- * **When to use:**
9
- * - During component migration when you need to maintain existing className/style usage
10
- * - As a temporary solution while refactoring components
11
- *
12
- * **Important:**
13
- * - This is a temporary migration tool, not a permanent solution
14
- * - Only accepts: `as`, `className`, `style`, and `children` props
15
- *
16
- * @example
17
- * ```tsx
18
- * <BpkVessel
19
- * className="legacy-class"
20
- * style={{ padding: '16px', transition: 'opacity 0.3s' }}
21
- * >
22
- * Content
23
- * </BpkVessel>
24
- *
25
- * <BpkVessel
26
- * as="section"
27
- * className="legacy-section"
28
- * >
29
- * Section Content
30
- * </BpkVessel>
31
- * ```
32
- *
33
- * @returns {JSX.Element} An HTML element with className and style applied.
34
- */
35
- export declare const BpkVessel: ({ as: Element, children, className, style, }: BpkVesselProps) => import("react/jsx-runtime").JSX.Element;
36
- export type { BpkVesselProps };