@atlaskit/onboarding 10.6.7 → 10.6.8

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 (61) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/components/animation.js +2 -13
  3. package/dist/cjs/components/clone.js +10 -16
  4. package/dist/cjs/components/index.js +0 -9
  5. package/dist/cjs/components/modal.js +11 -45
  6. package/dist/cjs/components/spotlight-card.js +26 -46
  7. package/dist/cjs/components/spotlight-dialog.js +19 -52
  8. package/dist/cjs/components/spotlight-inner.js +9 -44
  9. package/dist/cjs/components/spotlight-manager.js +8 -41
  10. package/dist/cjs/components/spotlight-target.js +1 -7
  11. package/dist/cjs/components/spotlight-transition.js +3 -27
  12. package/dist/cjs/components/spotlight.js +10 -19
  13. package/dist/cjs/components/theme.js +9 -32
  14. package/dist/cjs/components/use-spotlight.js +1 -5
  15. package/dist/cjs/components/value-changed.js +0 -14
  16. package/dist/cjs/index.js +0 -4
  17. package/dist/cjs/styled/blanket.js +3 -13
  18. package/dist/cjs/styled/dialog.js +6 -17
  19. package/dist/cjs/styled/modal.js +19 -33
  20. package/dist/cjs/styled/target.js +27 -41
  21. package/dist/cjs/utils/use-element-box.js +14 -26
  22. package/dist/cjs/version.json +1 -1
  23. package/dist/es2019/components/animation.js +2 -2
  24. package/dist/es2019/components/clone.js +3 -6
  25. package/dist/es2019/components/modal.js +3 -10
  26. package/dist/es2019/components/spotlight-card.js +7 -11
  27. package/dist/es2019/components/spotlight-dialog.js +6 -11
  28. package/dist/es2019/components/spotlight-inner.js +2 -12
  29. package/dist/es2019/components/spotlight-manager.js +3 -13
  30. package/dist/es2019/components/spotlight-target.js +0 -2
  31. package/dist/es2019/components/spotlight-transition.js +4 -10
  32. package/dist/es2019/components/spotlight.js +0 -2
  33. package/dist/es2019/components/theme.js +6 -9
  34. package/dist/es2019/components/use-spotlight.js +1 -1
  35. package/dist/es2019/components/value-changed.js +0 -2
  36. package/dist/es2019/styled/blanket.js +5 -5
  37. package/dist/es2019/styled/dialog.js +5 -7
  38. package/dist/es2019/styled/modal.js +15 -14
  39. package/dist/es2019/styled/target.js +16 -15
  40. package/dist/es2019/utils/use-element-box.js +2 -5
  41. package/dist/es2019/version.json +1 -1
  42. package/dist/esm/components/animation.js +2 -8
  43. package/dist/esm/components/clone.js +10 -13
  44. package/dist/esm/components/modal.js +13 -32
  45. package/dist/esm/components/spotlight-card.js +26 -32
  46. package/dist/esm/components/spotlight-dialog.js +19 -35
  47. package/dist/esm/components/spotlight-inner.js +9 -29
  48. package/dist/esm/components/spotlight-manager.js +8 -32
  49. package/dist/esm/components/spotlight-target.js +1 -3
  50. package/dist/esm/components/spotlight-transition.js +3 -18
  51. package/dist/esm/components/spotlight.js +10 -13
  52. package/dist/esm/components/theme.js +9 -20
  53. package/dist/esm/components/use-spotlight.js +2 -3
  54. package/dist/esm/components/value-changed.js +0 -10
  55. package/dist/esm/styled/blanket.js +3 -7
  56. package/dist/esm/styled/dialog.js +6 -9
  57. package/dist/esm/styled/modal.js +18 -19
  58. package/dist/esm/styled/target.js +27 -32
  59. package/dist/esm/utils/use-element-box.js +14 -19
  60. package/dist/esm/version.json +1 -1
  61. package/package.json +1 -1
@@ -10,37 +10,31 @@ import { DialogActionItem, DialogActionItemContainer } from '../styled/dialog';
10
10
  import { spotlightButtonTheme } from './theme';
11
11
  const bodyStyles = css({
12
12
  display: 'flex',
13
- padding: `${"var(--ds-scale-200, 16px)"} ${"var(--ds-scale-250, 20px)"}`,
13
+ padding: `${"var(--ds-space-200, 16px)"} ${"var(--ds-space-250, 20px)"}`,
14
14
  flexDirection: 'column'
15
15
  });
16
16
  const defaultHeaderStyles = css({
17
17
  display: 'flex',
18
- // TODO Delete this comment after verifying spacing token -> previous value ``${gridSize}px``
19
- paddingBottom: "var(--ds-scale-100, 8px)",
18
+ paddingBottom: "var(--ds-space-100, 8px)",
20
19
  alignItems: 'baseline',
21
20
  justifyContent: 'space-between'
22
21
  });
23
-
24
22
  const DefaultHeader = ({
25
23
  children
26
24
  }) => jsx("div", {
27
25
  css: defaultHeaderStyles
28
26
  }, children);
29
-
30
27
  const defaultFooterStyles = css({
31
28
  display: 'flex',
32
- // TODO Delete this comment after verifying spacing token -> previous value ``${gridSize}px``
33
- paddingTop: "var(--ds-scale-100, 8px)",
29
+ paddingTop: "var(--ds-space-100, 8px)",
34
30
  alignItems: 'center',
35
31
  justifyContent: 'space-between'
36
32
  });
37
-
38
33
  const DefaultFooter = ({
39
34
  children
40
35
  }) => jsx("div", {
41
36
  css: defaultFooterStyles
42
37
  }, children);
43
-
44
38
  const containerStyles = css({
45
39
  height: 'fit-content',
46
40
  zIndex: layers.spotlight() + 1,
@@ -52,13 +46,14 @@ const containerStyles = css({
52
46
  const containerShadowStyles = css({
53
47
  boxShadow: `var(--ds-shadow-raised, ${`0 4px 8px -2px ${N50A}, 0 0 1px ${N60A}`})`
54
48
  });
49
+
55
50
  /**
56
51
  * @deprecated
57
52
  */
58
-
59
53
  const Theme = createTheme(() => ({
60
54
  container: {}
61
55
  }));
56
+
62
57
  /**
63
58
  * @deprecated
64
59
  */
@@ -99,7 +94,8 @@ const SpotlightCard = /*#__PURE__*/forwardRef((props, ref) => {
99
94
  container
100
95
  }) => {
101
96
  return jsx("div", {
102
- css: [containerStyles, !isFlat && containerShadowStyles, // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
97
+ css: [containerStyles, !isFlat && containerShadowStyles,
98
+ // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
103
99
  container],
104
100
  style: {
105
101
  width: `${Math.min(Math.max(width, 160), 600)}px`
@@ -7,17 +7,14 @@ import { DialogImage } from '../styled/dialog';
7
7
  import SpotlightCard from './spotlight-card';
8
8
  import ValueChanged from './value-changed';
9
9
  const packageName = "@atlaskit/onboarding";
10
- const packageVersion = "10.6.7";
11
-
10
+ const packageVersion = "10.6.8";
12
11
  class SpotlightDialog extends Component {
13
12
  constructor(...args) {
14
13
  super(...args);
15
-
16
14
  _defineProperty(this, "state", {
17
15
  focusLockDisabled: true
18
16
  });
19
17
  }
20
-
21
18
  componentDidMount() {
22
19
  this.focusLockTimeoutId = window.setTimeout(() => {
23
20
  // we delay the enabling of the focus lock to avoid the scroll position
@@ -27,11 +24,9 @@ class SpotlightDialog extends Component {
27
24
  });
28
25
  }, 200);
29
26
  }
30
-
31
27
  componentWillUnmount() {
32
28
  window.clearTimeout(this.focusLockTimeoutId);
33
29
  }
34
-
35
30
  render() {
36
31
  const {
37
32
  actions,
@@ -64,10 +59,11 @@ class SpotlightDialog extends Component {
64
59
  'left top': 'left-start',
65
60
  'left middle': 'left',
66
61
  'left bottom': 'left-end'
67
- }[dialogPlacement] : undefined; // If there's no room on either side of the popper, it will extend off-screen.
62
+ }[dialogPlacement] : undefined;
63
+
64
+ // If there's no room on either side of the popper, it will extend off-screen.
68
65
  // This looks buggy when scroll-lock and focus is placed on the dialog, so we
69
66
  // customise popper so it overflows the spotlight instead with altAxis=true.
70
-
71
67
  const modifiers = [{
72
68
  name: 'preventOverflow',
73
69
  options: {
@@ -94,7 +90,8 @@ class SpotlightDialog extends Component {
94
90
  autoFocus: true
95
91
  }, /*#__PURE__*/React.createElement("div", {
96
92
  ref: ref,
97
- style: { ...style,
93
+ style: {
94
+ ...style,
98
95
  ...animationStyles
99
96
  }
100
97
  }, /*#__PURE__*/React.createElement(SpotlightCard, {
@@ -114,9 +111,7 @@ class SpotlightDialog extends Component {
114
111
  headingAfterElement: headingAfterElement
115
112
  }, children)))));
116
113
  }
117
-
118
114
  }
119
-
120
115
  const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
121
116
  export default withAnalyticsContext({
122
117
  componentName: 'spotlight',
@@ -12,7 +12,6 @@ import { Fade } from './animation';
12
12
  import Clone from './clone';
13
13
  import SpotlightDialog from './spotlight-dialog';
14
14
  import { SpotlightTransitionConsumer } from './spotlight-transition';
15
-
16
15
  /**
17
16
  * __Spotlight inner__
18
17
  *
@@ -23,7 +22,6 @@ import { SpotlightTransitionConsumer } from './spotlight-transition';
23
22
  class SpotlightInner extends React.Component {
24
23
  constructor(...args) {
25
24
  super(...args);
26
-
27
25
  _defineProperty(this, "state", {
28
26
  // This is only used when targetReplacement is specified.
29
27
  // In this case, we have to render the targetReplacement component,
@@ -31,18 +29,16 @@ class SpotlightInner extends React.Component {
31
29
  // that reference into SpotlightDialog (Popper).
32
30
  replacementElement: null
33
31
  });
34
-
35
32
  _defineProperty(this, "getTargetNodeStyle", box => {
36
33
  if (!canUseDOM) {
37
34
  return {};
38
35
  }
39
-
40
- return { ...box,
36
+ return {
37
+ ...box,
41
38
  position: 'fixed'
42
39
  };
43
40
  });
44
41
  }
45
-
46
42
  componentDidUpdate(prevProps) {
47
43
  if (prevProps.targetNode !== this.props.targetNode) {
48
44
  scrollIntoView(this.props.targetNode, {
@@ -50,18 +46,15 @@ class SpotlightInner extends React.Component {
50
46
  });
51
47
  }
52
48
  }
53
-
54
49
  componentDidMount() {
55
50
  scrollIntoView(this.props.targetNode, {
56
51
  scrollMode: 'if-needed'
57
52
  });
58
53
  this.props.onOpened();
59
54
  }
60
-
61
55
  componentWillUnmount() {
62
56
  this.props.onClosed();
63
57
  }
64
-
65
58
  render() {
66
59
  const {
67
60
  pulse,
@@ -119,12 +112,9 @@ class SpotlightInner extends React.Component {
119
112
  animationStyles: animationStyles
120
113
  })), /*#__PURE__*/React.createElement(ScrollLock, null)));
121
114
  }
122
-
123
115
  }
124
-
125
116
  _defineProperty(SpotlightInner, "defaultProps", {
126
117
  dialogWidth: 400,
127
118
  pulse: true
128
119
  });
129
-
130
120
  export default SpotlightInner;
@@ -21,11 +21,11 @@ const {
21
21
  } = SpotlightContext;
22
22
  export { TargetConsumer };
23
23
  export { SpotlightContext, SpotlightStateConsumer as SpotlightConsumer };
24
-
25
24
  const Container = ({
26
25
  component: Wrapper,
27
26
  children
28
27
  }) => /*#__PURE__*/React.createElement(Wrapper, null, children);
28
+
29
29
  /**
30
30
  * __Spotlight manager__
31
31
  *
@@ -35,44 +35,37 @@ const Container = ({
35
35
  * - [Code](https://atlassian.design/components/onboarding/code)
36
36
  * - [Usage](https://atlassian.design/components/onboarding/usage)
37
37
  */
38
-
39
-
40
38
  export default class SpotlightManager extends PureComponent {
41
39
  constructor(...args) {
42
40
  super(...args);
43
-
44
41
  _defineProperty(this, "state", {
45
42
  spotlightCount: 0,
46
43
  targets: {}
47
44
  });
48
-
49
45
  _defineProperty(this, "targetRef", name => element => {
50
46
  this.setState(state => ({
51
- targets: { ...state.targets,
47
+ targets: {
48
+ ...state.targets,
52
49
  [name]: element || undefined
53
50
  }
54
51
  }));
55
52
  });
56
-
57
53
  _defineProperty(this, "spotlightOpen", () => {
58
54
  this.setState(state => ({
59
55
  spotlightCount: state.spotlightCount + 1
60
56
  }));
61
57
  });
62
-
63
58
  _defineProperty(this, "spotlightClose", () => {
64
59
  this.setState(state => ({
65
60
  spotlightCount: state.spotlightCount - 1
66
61
  }));
67
62
  });
68
-
69
63
  _defineProperty(this, "getStateProviderValue", memoizeOne(targets => ({
70
64
  opened: this.spotlightOpen,
71
65
  closed: this.spotlightClose,
72
66
  targets
73
67
  })));
74
68
  }
75
-
76
69
  componentDidMount() {
77
70
  if (process.env.NODE_ENV !== 'production' && !process.env.CI) {
78
71
  if (this.props.component) {
@@ -81,7 +74,6 @@ export default class SpotlightManager extends PureComponent {
81
74
  }
82
75
  }
83
76
  }
84
-
85
77
  render() {
86
78
  const {
87
79
  blanketIsTinted,
@@ -103,9 +95,7 @@ export default class SpotlightManager extends PureComponent {
103
95
  isTinted: blanketIsTinted
104
96
  }))), children)));
105
97
  }
106
-
107
98
  }
108
-
109
99
  _defineProperty(SpotlightManager, "defaultProps", {
110
100
  blanketIsTinted: true
111
101
  });
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import NodeResolver from 'react-node-resolver';
3
3
  import { TargetConsumer } from './spotlight-manager';
4
-
5
4
  /**
6
5
  * __Spotlight target__
7
6
  *
@@ -17,5 +16,4 @@ const SpotlightTarget = ({
17
16
  }) => /*#__PURE__*/React.createElement(TargetConsumer, null, targetRef => targetRef ? /*#__PURE__*/React.createElement(NodeResolver, {
18
17
  innerRef: targetRef(name)
19
18
  }, children) : children);
20
-
21
19
  export default SpotlightTarget;
@@ -4,9 +4,11 @@ import noop from '@atlaskit/ds-lib/noop';
4
4
  const SpotlightTransitionContext = /*#__PURE__*/createContext({
5
5
  isOpen: true,
6
6
  onExited: noop
7
- }); // checks if children exist and are truthy
7
+ });
8
8
 
9
+ // checks if children exist and are truthy
9
10
  const hasChildren = children => React.Children.count(children) > 0 && React.Children.map(children, child => !!child).filter(Boolean).length > 0;
11
+
10
12
  /**
11
13
  * __Spotlight transition__
12
14
  *
@@ -16,23 +18,18 @@ const hasChildren = children => React.Children.count(children) > 0 && React.Chil
16
18
  * - [Code](https://atlassian.design/components/onboarding/code)
17
19
  * - [Usage](https://atlassian.design/components/onboarding/usage)
18
20
  */
19
-
20
-
21
21
  class SpotlightTransition extends React.Component {
22
22
  constructor(...args) {
23
23
  super(...args);
24
-
25
24
  _defineProperty(this, "state", {
26
25
  currentChildren: undefined
27
26
  });
28
-
29
27
  _defineProperty(this, "onExited", () => {
30
28
  this.setState({
31
29
  currentChildren: this.props.children
32
30
  });
33
31
  });
34
32
  }
35
-
36
33
  static getDerivedStateFromProps(props, state) {
37
34
  const {
38
35
  currentChildren: previousChildren
@@ -42,7 +39,6 @@ class SpotlightTransition extends React.Component {
42
39
  currentChildren: exiting ? previousChildren : props.children
43
40
  };
44
41
  }
45
-
46
42
  render() {
47
43
  return /*#__PURE__*/React.createElement(SpotlightTransitionContext.Provider, {
48
44
  value: {
@@ -51,8 +47,8 @@ class SpotlightTransition extends React.Component {
51
47
  }
52
48
  }, this.state.currentChildren);
53
49
  }
54
-
55
50
  }
51
+
56
52
  /**
57
53
  * __Spotlight transition consumer__
58
54
  *
@@ -60,7 +56,5 @@ class SpotlightTransition extends React.Component {
60
56
  *
61
57
  * @internal
62
58
  */
63
-
64
-
65
59
  export const SpotlightTransitionConsumer = SpotlightTransitionContext.Consumer;
66
60
  export default SpotlightTransition;
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
3
  import SpotlightInner from './spotlight-inner';
4
4
  import { SpotlightConsumer } from './spotlight-manager';
5
-
6
5
  /**
7
6
  * __Spotlight__
8
7
  *
@@ -36,5 +35,4 @@ const Spotlight = ({
36
35
  pulse: pulse
37
36
  })) : null;
38
37
  });
39
-
40
38
  export default Spotlight;
@@ -107,7 +107,6 @@ const modalTheme = {
107
107
  }
108
108
  }
109
109
  };
110
-
111
110
  function extract(newTheme, {
112
111
  mode,
113
112
  appearance,
@@ -116,7 +115,6 @@ function extract(newTheme, {
116
115
  if (!newTheme[appearance]) {
117
116
  return undefined;
118
117
  }
119
-
120
118
  const root = newTheme[appearance];
121
119
  return Object.keys(root).reduce((acc, val) => {
122
120
  let node = root;
@@ -124,48 +122,47 @@ function extract(newTheme, {
124
122
  if (!node[item]) {
125
123
  return undefined;
126
124
  }
127
-
128
125
  if (typeof node[item] !== 'object') {
129
126
  acc[val] = node[item];
130
127
  return undefined;
131
128
  }
132
-
133
129
  node = node[item];
134
130
  return undefined;
135
131
  });
136
132
  return acc;
137
133
  }, {});
138
134
  }
135
+
139
136
  /**
140
137
  * @deprecated
141
138
  * Custom button themes are deprecated and will be removed in the future.
142
139
  */
143
-
144
-
145
140
  export const spotlightButtonTheme = (current, themeProps) => {
146
141
  const {
147
142
  buttonStyles,
148
143
  ...rest
149
144
  } = current(themeProps);
150
145
  return {
151
- buttonStyles: { ...buttonStyles,
146
+ buttonStyles: {
147
+ ...buttonStyles,
152
148
  ...extract(spotlightTheme, themeProps)
153
149
  },
154
150
  ...rest
155
151
  };
156
152
  };
153
+
157
154
  /**
158
155
  * @deprecated
159
156
  * Custom button themes are deprecated and will be removed in the future.
160
157
  */
161
-
162
158
  export const modalButtonTheme = (current, themeProps) => {
163
159
  const {
164
160
  buttonStyles,
165
161
  ...rest
166
162
  } = current(themeProps);
167
163
  return {
168
- buttonStyles: { ...buttonStyles,
164
+ buttonStyles: {
165
+ ...buttonStyles,
169
166
  ...extract(modalTheme, themeProps)
170
167
  },
171
168
  ...rest
@@ -1,9 +1,9 @@
1
1
  import { useCallback, useContext, useEffect, useMemo, useRef } from 'react';
2
2
  import { SpotlightContext } from './spotlight-manager';
3
+
3
4
  /**
4
5
  * Use spotlight hook returns information about available spotlight targets.
5
6
  */
6
-
7
7
  export default function useSpotlight() {
8
8
  const {
9
9
  targets
@@ -9,9 +9,7 @@ export default class ValueChanged extends React.Component {
9
9
  this.props.onChange();
10
10
  }
11
11
  }
12
-
13
12
  render() {
14
13
  return this.props.children;
15
14
  }
16
-
17
15
  }
@@ -6,9 +6,10 @@ import { layers } from '@atlaskit/theme/constants';
6
6
  const backgroundColor = themed({
7
7
  light: `var(--ds-blanket, ${N100A})`,
8
8
  dark: `var(--ds-blanket, ${DN90A})`
9
- }); // IE11 and Edge: z-index needed because fixed position calculates z-index relative
10
- // to body instead of nearest stacking context (Portal in our case).
9
+ });
11
10
 
11
+ // IE11 and Edge: z-index needed because fixed position calculates z-index relative
12
+ // to body instead of nearest stacking context (Portal in our case).
12
13
  const blanketStyles = css({
13
14
  position: 'fixed',
14
15
  zIndex: layers.spotlight(),
@@ -18,7 +19,6 @@ const blanketStyles = css({
18
19
  left: 0,
19
20
  transition: 'opacity 220ms'
20
21
  });
21
-
22
22
  /**
23
23
  * __Blanket__
24
24
  *
@@ -34,12 +34,12 @@ const Blanket = props => {
34
34
  const theme = useGlobalTheme();
35
35
  return jsx("div", {
36
36
  css: blanketStyles,
37
- style: { ...props.style,
37
+ style: {
38
+ ...props.style,
38
39
  backgroundColor: props.isTinted ? backgroundColor({
39
40
  theme
40
41
  }) : 'transparent'
41
42
  }
42
43
  });
43
44
  };
44
-
45
45
  export default Blanket;
@@ -1,5 +1,4 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
-
3
2
  /** @jsx jsx */
4
3
  import { css, jsx } from '@emotion/react';
5
4
  const imageStyles = css({
@@ -8,15 +7,15 @@ const imageStyles = css({
8
7
  });
9
8
  const actionItemContainerStyles = css({
10
9
  display: 'flex',
11
- margin: `${"var(--ds-scale-0, 0px)"} -4px`,
12
-
10
+ margin: `${"var(--ds-space-0, 0px)"} -4px`,
13
11
  /* When there is more than one action, place primary action visually on the
14
12
  right, but keep it's position as the first focusable element in the DOM */
15
13
  flexDirection: 'row-reverse'
16
14
  });
17
15
  const actionItemStyles = css({
18
- margin: `${"var(--ds-scale-0, 0px)"} ${"var(--ds-scale-050, 4px)"}`
16
+ margin: `${"var(--ds-space-0, 0px)"} ${"var(--ds-space-050, 4px)"}`
19
17
  });
18
+
20
19
  /**
21
20
  * __Dialog image__
22
21
  *
@@ -24,7 +23,6 @@ const actionItemStyles = css({
24
23
  *
25
24
  * @internal
26
25
  */
27
-
28
26
  export const DialogImage = ({
29
27
  alt,
30
28
  ...props
@@ -32,6 +30,7 @@ export const DialogImage = ({
32
30
  css: imageStyles,
33
31
  alt: alt
34
32
  }, props));
33
+
35
34
  /**
36
35
  * __Dialog action item container__
37
36
  *
@@ -39,12 +38,12 @@ export const DialogImage = ({
39
38
  *
40
39
  * @internal
41
40
  */
42
-
43
41
  export const DialogActionItemContainer = ({
44
42
  children
45
43
  }) => jsx("div", {
46
44
  css: actionItemContainerStyles
47
45
  }, children);
46
+
48
47
  /**
49
48
  * __Dialog action item__
50
49
  *
@@ -52,7 +51,6 @@ export const DialogActionItemContainer = ({
52
51
  *
53
52
  * @internal
54
53
  */
55
-
56
54
  export const DialogActionItem = ({
57
55
  children
58
56
  }) => jsx("div", {
@@ -3,27 +3,28 @@ import { css, jsx } from '@emotion/react';
3
3
  import { useGlobalTheme } from '@atlaskit/theme/components';
4
4
  import { borderRadius as getBorderRadius } from '@atlaskit/theme/constants';
5
5
  import { h600 } from '@atlaskit/theme/typography';
6
- const borderRadius = getBorderRadius(); // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
6
+ const borderRadius = getBorderRadius();
7
7
 
8
+ // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
8
9
  const lightH600Styles = css(h600({
9
10
  theme: {
10
11
  mode: 'light'
11
12
  }
12
- })); // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
13
-
13
+ }));
14
+ // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
14
15
  const darkH600Styles = css(h600({
15
16
  theme: {
16
17
  mode: 'dark'
17
18
  }
18
19
  }));
19
20
  const modalBodyStyles = css({
20
- padding: `${"var(--ds-scale-500, 40px)"} ${"var(--ds-scale-250, 20px)"}`,
21
+ padding: `${"var(--ds-space-500, 40px)"} ${"var(--ds-space-250, 20px)"}`,
21
22
  textAlign: 'center'
22
- }); // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
23
+ });
23
24
 
25
+ // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
24
26
  const modalHeadingStyles = css({
25
- // TODO Delete this comment after verifying spacing token -> previous value ``${gridSize}px``
26
- marginBottom: "var(--ds-scale-100, 8px)",
27
+ marginBottom: "var(--ds-space-100, 8px)",
27
28
  color: 'inherit'
28
29
  });
29
30
  const modalImageStyles = css({
@@ -37,7 +38,7 @@ const modalImageStyles = css({
37
38
  });
38
39
  const modalActionContainerStyles = css({
39
40
  display: 'flex',
40
- padding: `${"var(--ds-scale-0, 0px)"} ${"var(--ds-scale-500, 40px)"} 36px`,
41
+ padding: `${"var(--ds-space-0, 0px)"} ${"var(--ds-space-500, 40px)"} 36px`,
41
42
  justifyContent: 'center',
42
43
  flexDirection: 'row',
43
44
  flexFlow: 'wrap'
@@ -46,25 +47,25 @@ const modalActionContainerReversedStyles = css({
46
47
  flexDirection: 'row-reverse'
47
48
  });
48
49
  const modalActionItemStyles = css({
49
- margin: `${"var(--ds-scale-0, 0px)"} ${"var(--ds-scale-050, 4px)"} ${"var(--ds-scale-050, 4px)"}`
50
+ margin: `${"var(--ds-space-0, 0px)"} ${"var(--ds-space-050, 4px)"} ${"var(--ds-space-050, 4px)"}`
50
51
  });
52
+
51
53
  /**
52
54
  * __Modal body__
53
55
  *
54
56
  * @internal
55
57
  */
56
-
57
58
  export const ModalBody = ({
58
59
  children
59
60
  }) => jsx("div", {
60
61
  css: modalBodyStyles
61
62
  }, children);
63
+
62
64
  /**
63
65
  * __Modal heading__
64
66
  *
65
67
  * @internal
66
68
  */
67
-
68
69
  export const ModalHeading = ({
69
70
  children
70
71
  }) => {
@@ -75,12 +76,12 @@ export const ModalHeading = ({
75
76
  css: [mode === 'light' ? lightH600Styles : darkH600Styles, modalHeadingStyles]
76
77
  }, children);
77
78
  };
79
+
78
80
  /**
79
81
  * __Modal image__
80
82
  *
81
83
  * @internal
82
84
  */
83
-
84
85
  export const ModalImage = ({
85
86
  alt,
86
87
  src
@@ -89,24 +90,24 @@ export const ModalImage = ({
89
90
  alt: alt,
90
91
  src: src
91
92
  });
93
+
92
94
  /**
93
95
  * __Modal action container__
94
96
  *
95
97
  * @internal
96
98
  */
97
-
98
99
  export const ModalActionContainer = ({
99
100
  children,
100
101
  shouldReverseButtonOrder
101
102
  }) => jsx("div", {
102
103
  css: [modalActionContainerStyles, shouldReverseButtonOrder && modalActionContainerReversedStyles]
103
104
  }, children);
105
+
104
106
  /**
105
107
  * __Modal action item__
106
108
  *
107
109
  * @internal
108
110
  */
109
-
110
111
  export const ModalActionItem = ({
111
112
  children
112
113
  }) => jsx("div", {