orcs-design-system 3.2.4 → 3.2.6

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 (96) hide show
  1. package/es/GlobalStyles.js +1 -31
  2. package/es/SystemThemeProvider.js +11 -5
  3. package/es/assets/Colour/Colour.stories.js +211 -0
  4. package/es/assets/Colour/index.js +3 -3
  5. package/es/components/ActionsMenu/ActionsMenu.stories.js +260 -233
  6. package/es/components/ActionsMenu/index.js +144 -229
  7. package/es/components/Avatar/Avatar.stories.js +212 -196
  8. package/es/components/Avatar/index.js +280 -307
  9. package/es/components/Badge/Badge.stories.js +71 -46
  10. package/es/components/Badge/index.js +71 -74
  11. package/es/components/Box/Box.stories.js +51 -35
  12. package/es/components/Box/index.js +33 -34
  13. package/es/components/Button/Button.stories.js +161 -145
  14. package/es/components/Button/ButtonLink.stories.js +152 -139
  15. package/es/components/Button/index.js +79 -99
  16. package/es/components/ButtonGroup/ButtonGroup.stories.js +43 -42
  17. package/es/components/ButtonGroup/ButtonGroupItem.stories.js +11 -13
  18. package/es/components/ButtonGroup/index.js +103 -99
  19. package/es/components/Card/Card.stories.js +94 -62
  20. package/es/components/Card/index.js +50 -71
  21. package/es/components/Checkbox/Checkbox.stories.js +37 -43
  22. package/es/components/Checkbox/index.js +61 -76
  23. package/es/components/DatePicker/DatePicker.stories.js +86 -118
  24. package/es/components/DatePicker/index.js +71 -187
  25. package/es/components/Divider/Divider.stories.js +39 -42
  26. package/es/components/Divider/index.js +21 -27
  27. package/es/components/Expandable/Expandable.stories.js +46 -36
  28. package/es/components/Expandable/index.js +55 -82
  29. package/es/components/Flex/Flex.stories.js +19 -5
  30. package/es/components/Flex/FlexItem.stories.js +10 -9
  31. package/es/components/Flex/index.js +34 -27
  32. package/es/components/Grid/Grid.stories.js +129 -55
  33. package/es/components/Grid/index.js +25 -24
  34. package/es/components/Header/Header.stories.js +101 -92
  35. package/es/components/Header/index.js +433 -436
  36. package/es/components/HeaderSimple/HeaderSimple.stories.js +23 -27
  37. package/es/components/HeaderSimple/index.js +73 -68
  38. package/es/components/Icon/Icon.stories.js +58 -57
  39. package/es/components/Icon/index.js +48 -46
  40. package/es/components/Loading/Loading.stories.js +32 -39
  41. package/es/components/Loading/index.js +44 -51
  42. package/es/components/Modal/Modal.stories.js +172 -153
  43. package/es/components/Modal/index.js +126 -134
  44. package/es/components/Notification/Notification.stories.js +59 -58
  45. package/es/components/Notification/index.js +123 -133
  46. package/es/components/Popover/Popover.stories.js +134 -102
  47. package/es/components/Popover/index.js +65 -111
  48. package/es/components/ProgressBar/ProgressBar.stories.js +36 -39
  49. package/es/components/ProgressBar/index.js +29 -34
  50. package/es/components/RadioButton/RadioButton.stories.js +32 -37
  51. package/es/components/RadioButton/index.js +170 -184
  52. package/es/components/Range/Range.stories.js +19 -19
  53. package/es/components/Range/index.js +35 -45
  54. package/es/components/Select/Select.stories.js +107 -128
  55. package/es/components/Select/index.js +324 -336
  56. package/es/components/SideNav/NavItem.js +112 -122
  57. package/es/components/SideNav/SideNav.stories.js +84 -57
  58. package/es/components/SideNav/index.js +161 -185
  59. package/es/components/Sidebar/Sidebar.stories.js +50 -33
  60. package/es/components/Sidebar/index.js +152 -155
  61. package/es/components/Spacer/Spacer.stories.js +35 -32
  62. package/es/components/Spacer/index.js +20 -20
  63. package/es/components/StatusDot/StatusDot.stories.js +103 -90
  64. package/es/components/StatusDot/index.js +36 -38
  65. package/es/components/StyledLink/StyledLink.stories.js +68 -69
  66. package/es/components/StyledLink/index.js +47 -48
  67. package/es/components/Table/Table.stories.js +118 -112
  68. package/es/components/Table/getExpandColumnConfig.js +67 -62
  69. package/es/components/Table/index.js +24 -27
  70. package/es/components/Table/muiStyleOverrides.js +10 -8
  71. package/es/components/Tabs/Tab.stories.js +55 -38
  72. package/es/components/Tabs/TabsContainer.stories.js +30 -22
  73. package/es/components/Tabs/index.js +95 -92
  74. package/es/components/Tag/Tag.stories.js +250 -220
  75. package/es/components/Tag/index.js +118 -190
  76. package/es/components/TextArea/TextArea.stories.js +76 -89
  77. package/es/components/TextArea/index.js +117 -115
  78. package/es/components/TextInput/TextInput.stories.js +41 -61
  79. package/es/components/TextInput/index.js +127 -171
  80. package/es/components/Toggle/Toggle.stories.js +63 -62
  81. package/es/components/Toggle/index.js +43 -77
  82. package/es/components/TreeNav/TreeNav.stories.js +7 -8
  83. package/es/components/TreeNav/index.js +72 -69
  84. package/es/components/Typography/Typography.stories.js +174 -0
  85. package/es/components/Typography/index.js +252 -308
  86. package/es/components.test.js +1 -1
  87. package/es/hooks/isVisible.js +6 -10
  88. package/es/hooks/keepInView.js +27 -32
  89. package/es/hooks/keypress.js +14 -14
  90. package/es/hooks/useInputFocus.js +5 -5
  91. package/es/hooks/usePrevious.js +3 -3
  92. package/es/systemThemeCollapsed.js +53 -53
  93. package/es/systemtheme.js +53 -53
  94. package/es/utils/selectUtil.js +1 -1
  95. package/es/utils/selectUtil.test.js +6 -6
  96. package/package.json +29 -38
@@ -3,58 +3,83 @@ import Box from "../Box";
3
3
  import Spacer from "../Spacer";
4
4
  import Flex from "../Flex";
5
5
  import Badge from ".";
6
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
6
7
  export default {
7
8
  title: "Components/Badge",
8
9
  component: Badge
9
10
  };
10
- export var defaultBadge = function defaultBadge() {
11
- return /*#__PURE__*/React.createElement(Badge, null, "Default");
12
- };
11
+ export const defaultBadge = () => /*#__PURE__*/_jsx(Badge, {
12
+ children: "Default"
13
+ });
13
14
  defaultBadge.storyName = "Default";
14
- export var colourVariants = function colourVariants() {
15
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {
16
- p: "r"
17
- }, /*#__PURE__*/React.createElement(Flex, {
18
- flexWrap: "wrap"
19
- }, /*#__PURE__*/React.createElement(Spacer, {
20
- m: "1"
21
- }, /*#__PURE__*/React.createElement(Badge, null, "Default"), /*#__PURE__*/React.createElement(Badge, {
22
- variant: "success"
23
- }, "Success"), /*#__PURE__*/React.createElement(Badge, {
24
- variant: "warning"
25
- }, "Warning"), /*#__PURE__*/React.createElement(Badge, {
26
- variant: "danger"
27
- }, "Danger"), /*#__PURE__*/React.createElement(Badge, {
28
- variant: "primaryLight"
29
- }, "Low priority"), /*#__PURE__*/React.createElement(Badge, {
30
- variant: "primary"
31
- }, "Medium priority"), /*#__PURE__*/React.createElement(Badge, {
32
- variant: "primaryDark"
33
- }, "High priority"), /*#__PURE__*/React.createElement(Badge, {
34
- variant: "secondary"
35
- }, "Secondary")))), /*#__PURE__*/React.createElement(Box, {
15
+ export const colourVariants = () => /*#__PURE__*/_jsxs(_Fragment, {
16
+ children: [/*#__PURE__*/_jsx(Box, {
36
17
  p: "r",
37
- bg: "greyDarkest"
38
- }, /*#__PURE__*/React.createElement(Flex, {
39
- flexWrap: "wrap"
40
- }, /*#__PURE__*/React.createElement(Spacer, {
41
- m: "1"
42
- }, /*#__PURE__*/React.createElement(Badge, null, "Default"), /*#__PURE__*/React.createElement(Badge, {
43
- variant: "success"
44
- }, "Success"), /*#__PURE__*/React.createElement(Badge, {
45
- variant: "warning"
46
- }, "Warning"), /*#__PURE__*/React.createElement(Badge, {
47
- variant: "danger"
48
- }, "Danger"), /*#__PURE__*/React.createElement(Badge, {
49
- variant: "primaryLight"
50
- }, "Low priority"), /*#__PURE__*/React.createElement(Badge, {
51
- variant: "primary"
52
- }, "Medium priority"), /*#__PURE__*/React.createElement(Badge, {
53
- variant: "primaryDark"
54
- }, "High priority"), /*#__PURE__*/React.createElement(Badge, {
55
- variant: "secondary"
56
- }, "Secondary")))));
57
- };
18
+ children: /*#__PURE__*/_jsx(Flex, {
19
+ flexWrap: "wrap",
20
+ children: /*#__PURE__*/_jsxs(Spacer, {
21
+ m: "1",
22
+ children: [/*#__PURE__*/_jsx(Badge, {
23
+ children: "Default"
24
+ }), /*#__PURE__*/_jsx(Badge, {
25
+ variant: "success",
26
+ children: "Success"
27
+ }), /*#__PURE__*/_jsx(Badge, {
28
+ variant: "warning",
29
+ children: "Warning"
30
+ }), /*#__PURE__*/_jsx(Badge, {
31
+ variant: "danger",
32
+ children: "Danger"
33
+ }), /*#__PURE__*/_jsx(Badge, {
34
+ variant: "primaryLight",
35
+ children: "Low priority"
36
+ }), /*#__PURE__*/_jsx(Badge, {
37
+ variant: "primary",
38
+ children: "Medium priority"
39
+ }), /*#__PURE__*/_jsx(Badge, {
40
+ variant: "primaryDark",
41
+ children: "High priority"
42
+ }), /*#__PURE__*/_jsx(Badge, {
43
+ variant: "secondary",
44
+ children: "Secondary"
45
+ })]
46
+ })
47
+ })
48
+ }), /*#__PURE__*/_jsx(Box, {
49
+ p: "r",
50
+ bg: "greyDarkest",
51
+ children: /*#__PURE__*/_jsx(Flex, {
52
+ flexWrap: "wrap",
53
+ children: /*#__PURE__*/_jsxs(Spacer, {
54
+ m: "1",
55
+ children: [/*#__PURE__*/_jsx(Badge, {
56
+ children: "Default"
57
+ }), /*#__PURE__*/_jsx(Badge, {
58
+ variant: "success",
59
+ children: "Success"
60
+ }), /*#__PURE__*/_jsx(Badge, {
61
+ variant: "warning",
62
+ children: "Warning"
63
+ }), /*#__PURE__*/_jsx(Badge, {
64
+ variant: "danger",
65
+ children: "Danger"
66
+ }), /*#__PURE__*/_jsx(Badge, {
67
+ variant: "primaryLight",
68
+ children: "Low priority"
69
+ }), /*#__PURE__*/_jsx(Badge, {
70
+ variant: "primary",
71
+ children: "Medium priority"
72
+ }), /*#__PURE__*/_jsx(Badge, {
73
+ variant: "primaryDark",
74
+ children: "High priority"
75
+ }), /*#__PURE__*/_jsx(Badge, {
76
+ variant: "secondary",
77
+ children: "Secondary"
78
+ })]
79
+ })
80
+ })
81
+ })]
82
+ });
58
83
  colourVariants.storyName = "Colour variants";
59
84
  defaultBadge.__docgenInfo = {
60
85
  "description": "",
@@ -1,6 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["noWrap", "children", "theme"];
4
1
  import React from "react";
5
2
  import styled, { ThemeProvider } from "styled-components";
6
3
  import PropTypes from "prop-types";
@@ -8,81 +5,81 @@ import { space, layout, color, compose, variant } from "styled-system";
8
5
  import { css } from "@styled-system/css";
9
6
  import shouldForwardProp from "@styled-system/should-forward-prop";
10
7
  import { themeGet } from "@styled-system/theme-get";
11
- var BadgeStyles = compose(space, layout, color);
12
- var Item = styled("span").withConfig({
13
- shouldForwardProp: shouldForwardProp,
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ const BadgeStyles = compose(space, layout, color);
10
+ const Item = styled("span").withConfig({
11
+ shouldForwardProp,
14
12
  displayName: "Badge__Item",
15
13
  componentId: "sc-9r75kj-0"
16
- }).attrs(function (props) {
17
- return {
18
- "data-testid": props["data-testid"] ? props["data-testid"] : null
19
- };
20
- })(function (props) {
21
- return css({
22
- fontSize: themeGet("fontSizes.0")(props),
23
- lineHeight: themeGet("fontSizes.1")(props),
24
- fontWeight: themeGet("fontWeights.2")(props),
25
- display: "inline-block",
26
- position: "relative",
27
- pt: themeGet("space.2")(props),
28
- pb: "calc(".concat(themeGet("space.2")(props), " + 1px)"),
29
- px: themeGet("space.3")(props),
30
- cursor: "default",
31
- borderRadius: 1,
32
- color: themeGet("colors.greyDarkest")(props),
33
- bg: themeGet("colors.greyLighter")(props),
34
- whiteSpace: props.noWrap ? "nowrap" : "normal"
35
- });
36
- }, function (props) {
37
- return variant({
38
- variants: {
39
- "default": {},
40
- success: {
41
- color: themeGet("colors.successDarkest")(props),
42
- bg: themeGet("colors.successLightest")(props)
43
- },
44
- successPending: {
45
- color: themeGet("colors.successDark")(props),
46
- bg: themeGet("colors.successEvenLighter")(props)
47
- },
48
- warning: {
49
- color: themeGet("colors.warningDarkest")(props),
50
- bg: themeGet("colors.warningLighter")(props)
51
- },
52
- danger: {
53
- color: themeGet("colors.dangerDarkest")(props),
54
- bg: themeGet("colors.dangerLightest")(props)
55
- },
56
- primaryLight: {
57
- color: themeGet("colors.primaryDarker")(props),
58
- bg: themeGet("colors.primaryLightest")(props)
59
- },
60
- primary: {
61
- color: themeGet("colors.primaryDarkest")(props),
62
- bg: themeGet("colors.primaryLighter")(props)
63
- },
64
- primaryDark: {
65
- color: themeGet("colors.primaryDarkest")(props),
66
- bg: themeGet("colors.primaryLight")(props)
67
- },
68
- secondary: {
69
- color: themeGet("colors.secondaryDarkest")(props),
70
- bg: themeGet("colors.secondaryEvenLighter")(props)
71
- }
14
+ }).attrs(props => ({
15
+ "data-testid": props["data-testid"] ? props["data-testid"] : null
16
+ }))(props => css({
17
+ fontSize: themeGet("fontSizes.0")(props),
18
+ lineHeight: themeGet("fontSizes.1")(props),
19
+ fontWeight: themeGet("fontWeights.2")(props),
20
+ display: "inline-block",
21
+ position: "relative",
22
+ pt: themeGet("space.2")(props),
23
+ pb: "calc(".concat(themeGet("space.2")(props), " + 1px)"),
24
+ px: themeGet("space.3")(props),
25
+ cursor: "default",
26
+ borderRadius: 1,
27
+ color: themeGet("colors.greyDarkest")(props),
28
+ bg: themeGet("colors.greyLighter")(props),
29
+ whiteSpace: props.noWrap ? "nowrap" : "normal"
30
+ }), props => variant({
31
+ variants: {
32
+ default: {},
33
+ success: {
34
+ color: themeGet("colors.successDarkest")(props),
35
+ bg: themeGet("colors.successLightest")(props)
36
+ },
37
+ successPending: {
38
+ color: themeGet("colors.successDark")(props),
39
+ bg: themeGet("colors.successEvenLighter")(props)
40
+ },
41
+ warning: {
42
+ color: themeGet("colors.warningDarkest")(props),
43
+ bg: themeGet("colors.warningLighter")(props)
44
+ },
45
+ danger: {
46
+ color: themeGet("colors.dangerDarkest")(props),
47
+ bg: themeGet("colors.dangerLightest")(props)
48
+ },
49
+ primaryLight: {
50
+ color: themeGet("colors.primaryDarker")(props),
51
+ bg: themeGet("colors.primaryLightest")(props)
52
+ },
53
+ primary: {
54
+ color: themeGet("colors.primaryDarkest")(props),
55
+ bg: themeGet("colors.primaryLighter")(props)
56
+ },
57
+ primaryDark: {
58
+ color: themeGet("colors.primaryDarkest")(props),
59
+ bg: themeGet("colors.primaryLight")(props)
60
+ },
61
+ secondary: {
62
+ color: themeGet("colors.secondaryDarkest")(props),
63
+ bg: themeGet("colors.secondaryEvenLighter")(props)
72
64
  }
73
- });
74
- }, BadgeStyles);
65
+ }
66
+ }), BadgeStyles);
75
67
  export default function Badge(_ref) {
76
- var noWrap = _ref.noWrap,
77
- children = _ref.children,
78
- theme = _ref.theme,
79
- props = _objectWithoutProperties(_ref, _excluded);
80
- var component = /*#__PURE__*/React.createElement(Item, _extends({
81
- noWrap: noWrap
82
- }, props), children);
83
- return theme ? /*#__PURE__*/React.createElement(ThemeProvider, {
84
- theme: theme
85
- }, component) : component;
68
+ let {
69
+ noWrap,
70
+ children,
71
+ theme,
72
+ ...props
73
+ } = _ref;
74
+ const component = /*#__PURE__*/_jsx(Item, {
75
+ noWrap: noWrap,
76
+ ...props,
77
+ children: children
78
+ });
79
+ return theme ? /*#__PURE__*/_jsx(ThemeProvider, {
80
+ theme: theme,
81
+ children: component
82
+ }) : component;
86
83
  }
87
84
  Badge.propTypes = {
88
85
  /** Specifies badge colour. Colours are taken from the standard design system colours. */
@@ -1,58 +1,74 @@
1
1
  import React from "react";
2
2
  import Box from "../Box";
3
3
  import { P } from "../Typography";
4
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
5
  export default {
5
6
  title: "Components/Box",
6
7
  component: Box
7
8
  };
8
- export var basicBox = function basicBox() {
9
- return /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(P, null, "This is an example of the basic Box with no properties applied to it."));
10
- };
9
+ export const basicBox = () => /*#__PURE__*/_jsx(Box, {
10
+ children: /*#__PURE__*/_jsx(P, {
11
+ children: "This is an example of the basic Box with no properties applied to it."
12
+ })
13
+ });
11
14
  basicBox.storyName = "Default Box";
12
- export var borderBox = function borderBox() {
13
- return /*#__PURE__*/React.createElement(Box, {
14
- boxBorder: "default",
15
- p: "r"
16
- }, /*#__PURE__*/React.createElement(P, null, "This is a variant of a Box with a border."));
17
- };
15
+ export const borderBox = () => /*#__PURE__*/_jsx(Box, {
16
+ boxBorder: "default",
17
+ p: "r",
18
+ children: /*#__PURE__*/_jsx(P, {
19
+ children: "This is a variant of a Box with a border."
20
+ })
21
+ });
18
22
  borderBox.story = {
19
23
  name: "Border Box"
20
24
  };
21
- export var shadow = function shadow() {
22
- return /*#__PURE__*/React.createElement(Box, {
23
- shadow: "default",
24
- p: "r"
25
- }, /*#__PURE__*/React.createElement(P, null, "This is a variant of a Box with a slight drop shadow."));
26
- };
25
+ export const shadow = () => /*#__PURE__*/_jsx(Box, {
26
+ shadow: "default",
27
+ p: "r",
28
+ children: /*#__PURE__*/_jsx(P, {
29
+ children: "This is a variant of a Box with a slight drop shadow."
30
+ })
31
+ });
27
32
  shadow.story = {
28
33
  name: "Drop shadow"
29
34
  };
30
- export var backgroundColour = function backgroundColour() {
31
- return /*#__PURE__*/React.createElement(Box, {
32
- bg: "greyLightest",
33
- p: "r"
34
- }, /*#__PURE__*/React.createElement(P, null, "This is a Box that has background colour set to ", /*#__PURE__*/React.createElement("code", null, "greyLightest"), "."));
35
- };
35
+ export const backgroundColour = () => /*#__PURE__*/_jsx(Box, {
36
+ bg: "greyLightest",
37
+ p: "r",
38
+ children: /*#__PURE__*/_jsxs(P, {
39
+ children: ["This is a Box that has background colour set to ", /*#__PURE__*/_jsx("code", {
40
+ children: "greyLightest"
41
+ }), "."]
42
+ })
43
+ });
36
44
  backgroundColour.story = {
37
45
  name: "Background colour"
38
46
  };
39
- export var padding = function padding() {
40
- return /*#__PURE__*/React.createElement(Box, {
41
- boxBorder: "default",
42
- p: 6
43
- }, /*#__PURE__*/React.createElement(P, null, "This is a bordered Box variant with specified padding that overrides the default padding value."));
44
- };
47
+ export const padding = () => /*#__PURE__*/_jsx(Box, {
48
+ boxBorder: "default",
49
+ p: 6,
50
+ children: /*#__PURE__*/_jsx(P, {
51
+ children: "This is a bordered Box variant with specified padding that overrides the default padding value."
52
+ })
53
+ });
45
54
  padding.story = {
46
55
  name: "Padding"
47
56
  };
48
- export var borderRadius = function borderRadius() {
49
- return /*#__PURE__*/React.createElement(Box, {
50
- borderRadius: 2,
51
- boxBorder: "default",
52
- shadow: "default",
53
- p: "r"
54
- }, /*#__PURE__*/React.createElement(P, null, "This is a bordered Box variant with rounded corners.", /*#__PURE__*/React.createElement("code", null, "borderRadius"), " is taken from the ", /*#__PURE__*/React.createElement("code", null, "radii"), " array in", /*#__PURE__*/React.createElement("code", null, "systemtheme.js"), "."));
55
- };
57
+ export const borderRadius = () => /*#__PURE__*/_jsx(Box, {
58
+ borderRadius: 2,
59
+ boxBorder: "default",
60
+ shadow: "default",
61
+ p: "r",
62
+ children: /*#__PURE__*/_jsxs(P, {
63
+ children: ["This is a bordered Box variant with rounded corners.", /*#__PURE__*/_jsx("code", {
64
+ children: "borderRadius"
65
+ }), " is taken from the ", /*#__PURE__*/_jsx("code", {
66
+ children: "radii"
67
+ }), " array in", /*#__PURE__*/_jsx("code", {
68
+ children: "systemtheme.js"
69
+ }), "."]
70
+ })
71
+ });
56
72
  borderRadius.story = {
57
73
  name: "Rounded corners"
58
74
  };
@@ -1,6 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["children", "theme", "dataTestId"];
4
1
  import React, { forwardRef } from "react";
5
2
  import styled, { ThemeProvider } from "styled-components";
6
3
  import { space, layout, color, border, variant, compose } from "styled-system";
@@ -8,50 +5,52 @@ import shouldForwardProp from "@styled-system/should-forward-prop";
8
5
  import { css } from "@styled-system/css";
9
6
  import PropTypes from "prop-types";
10
7
  import { themeGet } from "@styled-system/theme-get";
11
- var boxStyles = compose(space, layout, color, border);
12
- var BoxWrapper = styled("div").withConfig({
13
- shouldForwardProp: shouldForwardProp,
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ const boxStyles = compose(space, layout, color, border);
10
+ const BoxWrapper = styled("div").withConfig({
11
+ shouldForwardProp,
14
12
  displayName: "Box__BoxWrapper",
15
13
  componentId: "sc-jr1api-0"
16
- }).attrs(function (props) {
17
- return {
18
- "data-testid": props.dataTestId ? props.dataTestId : props["data-testid"] ? props["data-testid"] : null
19
- };
20
- })(css({
14
+ }).attrs(props => ({
15
+ "data-testid": props.dataTestId ? props.dataTestId : props["data-testid"] ? props["data-testid"] : null
16
+ }))(css({
21
17
  width: "auto",
22
18
  display: "block",
23
19
  overflow: "visible"
24
20
  }), variant({
25
21
  prop: "shadow",
26
22
  variants: {
27
- "default": {
23
+ default: {
28
24
  boxShadow: "boxDefault"
29
25
  }
30
26
  }
31
- }), function (props) {
32
- return variant({
33
- prop: "boxBorder",
34
- variants: {
35
- "default": {
36
- borderStyle: "solid",
37
- borderWidth: themeGet("borderWidths.1")(props),
38
- borderColor: themeGet("colors.greyLighter")(props)
39
- }
27
+ }), props => variant({
28
+ prop: "boxBorder",
29
+ variants: {
30
+ default: {
31
+ borderStyle: "solid",
32
+ borderWidth: themeGet("borderWidths.1")(props),
33
+ borderColor: themeGet("colors.greyLighter")(props)
40
34
  }
41
- });
42
- }, boxStyles);
43
- export var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
44
- var children = _ref.children,
45
- theme = _ref.theme,
46
- dataTestId = _ref.dataTestId,
47
- props = _objectWithoutProperties(_ref, _excluded);
48
- var component = /*#__PURE__*/React.createElement(BoxWrapper, _extends({
35
+ }
36
+ }), boxStyles);
37
+ export const Box = /*#__PURE__*/forwardRef((_ref, ref) => {
38
+ let {
39
+ children,
40
+ theme,
41
+ dataTestId,
42
+ ...props
43
+ } = _ref;
44
+ const component = /*#__PURE__*/_jsx(BoxWrapper, {
49
45
  ref: ref,
50
- dataTestId: dataTestId
51
- }, props), children);
52
- return theme ? /*#__PURE__*/React.createElement(ThemeProvider, {
53
- theme: theme
54
- }, component) : component;
46
+ dataTestId: dataTestId,
47
+ ...props,
48
+ children: children
49
+ });
50
+ return theme ? /*#__PURE__*/_jsx(ThemeProvider, {
51
+ theme: theme,
52
+ children: component
53
+ }) : component;
55
54
  });
56
55
  Box.__docgenInfo = {
57
56
  "description": "",