@atlaskit/onboarding 13.0.5 → 14.0.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 (65) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/components/modal.js +10 -14
  3. package/dist/cjs/components/node-resolver-spotlight-target.compiled.css +1 -0
  4. package/dist/cjs/components/node-resolver-spotlight-target.js +12 -13
  5. package/dist/cjs/components/spotlight-card.compiled.css +20 -0
  6. package/dist/cjs/components/spotlight-card.js +34 -55
  7. package/dist/cjs/components/spotlight-dialog.js +2 -2
  8. package/dist/cjs/components/spotlight-inner.js +1 -2
  9. package/dist/cjs/components/spotlight-manager.js +1 -2
  10. package/dist/cjs/components/theme.js +44 -48
  11. package/dist/cjs/styled/blanket.compiled.css +4 -0
  12. package/dist/cjs/styled/blanket.js +13 -17
  13. package/dist/cjs/styled/dialog.compiled.css +10 -0
  14. package/dist/cjs/styled/dialog.js +24 -30
  15. package/dist/cjs/styled/modal.compiled.css +26 -0
  16. package/dist/cjs/styled/modal.js +29 -54
  17. package/dist/cjs/styled/target.compiled.css +8 -0
  18. package/dist/cjs/styled/target.js +34 -57
  19. package/dist/es2019/components/modal.js +9 -14
  20. package/dist/es2019/components/node-resolver-spotlight-target.compiled.css +1 -0
  21. package/dist/es2019/components/node-resolver-spotlight-target.js +8 -11
  22. package/dist/es2019/components/spotlight-card.compiled.css +20 -0
  23. package/dist/es2019/components/spotlight-card.js +33 -54
  24. package/dist/es2019/components/spotlight-dialog.js +1 -1
  25. package/dist/es2019/components/spotlight-inner.js +1 -2
  26. package/dist/es2019/components/spotlight-manager.js +1 -2
  27. package/dist/es2019/components/theme.js +44 -45
  28. package/dist/es2019/styled/blanket.compiled.css +4 -0
  29. package/dist/es2019/styled/blanket.js +9 -17
  30. package/dist/es2019/styled/dialog.compiled.css +10 -0
  31. package/dist/es2019/styled/dialog.js +20 -29
  32. package/dist/es2019/styled/modal.compiled.css +26 -0
  33. package/dist/es2019/styled/modal.js +26 -54
  34. package/dist/es2019/styled/target.compiled.css +9 -0
  35. package/dist/es2019/styled/target.js +21 -49
  36. package/dist/esm/components/modal.js +9 -14
  37. package/dist/esm/components/node-resolver-spotlight-target.compiled.css +1 -0
  38. package/dist/esm/components/node-resolver-spotlight-target.js +8 -11
  39. package/dist/esm/components/spotlight-card.compiled.css +20 -0
  40. package/dist/esm/components/spotlight-card.js +33 -54
  41. package/dist/esm/components/spotlight-dialog.js +1 -1
  42. package/dist/esm/components/spotlight-inner.js +1 -2
  43. package/dist/esm/components/spotlight-manager.js +1 -2
  44. package/dist/esm/components/theme.js +44 -45
  45. package/dist/esm/styled/blanket.compiled.css +4 -0
  46. package/dist/esm/styled/blanket.js +9 -17
  47. package/dist/esm/styled/dialog.compiled.css +10 -0
  48. package/dist/esm/styled/dialog.js +21 -31
  49. package/dist/esm/styled/modal.compiled.css +26 -0
  50. package/dist/esm/styled/modal.js +26 -54
  51. package/dist/esm/styled/target.compiled.css +8 -0
  52. package/dist/esm/styled/target.js +30 -57
  53. package/dist/types/components/modal.d.ts +8 -9
  54. package/dist/types/components/node-resolver-spotlight-target.d.ts +1 -2
  55. package/dist/types/styled/blanket.d.ts +1 -6
  56. package/dist/types/styled/dialog.d.ts +3 -4
  57. package/dist/types/styled/modal.d.ts +5 -6
  58. package/dist/types/styled/target.d.ts +3 -5
  59. package/dist/types-ts4.5/components/modal.d.ts +8 -9
  60. package/dist/types-ts4.5/components/node-resolver-spotlight-target.d.ts +1 -2
  61. package/dist/types-ts4.5/styled/blanket.d.ts +1 -6
  62. package/dist/types-ts4.5/styled/dialog.d.ts +3 -4
  63. package/dist/types-ts4.5/styled/modal.d.ts +5 -6
  64. package/dist/types-ts4.5/styled/target.d.ts +3 -5
  65. package/package.json +5 -4
@@ -1,57 +1,36 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
1
+ /* spotlight-card.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./spotlight-card.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
5
  import { forwardRef } from 'react';
6
- import { css, jsx } from '@emotion/react';
7
6
  import Button, { Theme as ButtonTheme } from '@atlaskit/button/custom-theme-button';
7
+ import { cx } from '@atlaskit/css';
8
8
  import Heading from '@atlaskit/heading';
9
9
  import { useLayering } from '@atlaskit/layering';
10
- import { Box, Text, xcss } from '@atlaskit/primitives';
10
+ import { Box, Text } from '@atlaskit/primitives/compiled';
11
11
  import { DialogActionItem, DialogActionItemContainer } from '../styled/dialog';
12
12
  import { spotlightButtonTheme } from './theme';
13
- const bodyStyles = css({
14
- display: 'flex',
15
- padding: `${"var(--ds-space-200, 16px)"} ${"var(--ds-space-250, 20px)"}`,
16
- flexDirection: 'column'
17
- });
18
- const imageStyles = css({
19
- display: 'block'
20
- });
21
- const defaultHeaderStyles = css({
22
- display: 'flex',
23
- alignItems: 'baseline',
24
- justifyContent: 'space-between',
25
- paddingBlockEnd: "var(--ds-space-100, 8px)"
26
- });
13
+ const bodyStyles = null;
14
+ const imageStyles = null;
15
+ const defaultHeaderStyles = null;
27
16
  const DefaultHeader = ({
28
17
  children
29
- }) => jsx("div", {
30
- css: defaultHeaderStyles
18
+ }) => /*#__PURE__*/React.createElement("div", {
19
+ className: ax(["_1e0c1txw _4cvr1q9y _1bah1yb4 _85i5u2gc"])
31
20
  }, children);
32
- const defaultFooterStyles = css({
33
- display: 'flex',
34
- alignItems: 'center',
35
- justifyContent: 'space-between',
36
- paddingBlockStart: "var(--ds-space-100, 8px)"
37
- });
21
+ const defaultFooterStyles = null;
38
22
  const DefaultFooter = ({
39
23
  children
40
- }) => jsx("div", {
41
- css: defaultFooterStyles
24
+ }) => /*#__PURE__*/React.createElement("div", {
25
+ "data-testid": "spotlight--dialog-footer",
26
+ className: ax(["_1e0c1txw _4cvr1h6o _1bah1yb4 _1q51u2gc"])
42
27
  }, children);
43
- const containerStyles = xcss({
44
- height: 'fit-content',
45
- zIndex: 'spotlight',
46
- borderRadius: 'border.radius',
47
- color: 'color.text.inverse',
48
- overflow: 'auto',
49
- minWidth: '160px',
50
- maxWidth: '600px'
51
- });
52
- const containerShadowStyles = xcss({
53
- boxShadow: 'elevation.shadow.raised'
54
- });
28
+ const containerStyles = {
29
+ root: "_2rkoglpi _1reo1wug _18m91wug _4t3i1ns9 _syaz15cr _1ul91lit _p12f1ogm"
30
+ };
31
+ const containerShadowStyles = {
32
+ root: "_16qszucj"
33
+ };
55
34
  /**
56
35
  * __Spotlight card__
57
36
  *
@@ -84,11 +63,11 @@ const SpotlightCard = /*#__PURE__*/forwardRef((props, ref) => {
84
63
  const {
85
64
  currentLevel
86
65
  } = useLayering();
87
- return jsx(ButtonTheme.Provider, {
66
+ return /*#__PURE__*/React.createElement(ButtonTheme.Provider, {
88
67
  value: spotlightButtonTheme
89
- }, jsx(Box, {
68
+ }, /*#__PURE__*/React.createElement(Box, {
90
69
  backgroundColor: "color.background.discovery.bold",
91
- xcss: [containerStyles, !isFlat && containerShadowStyles],
70
+ xcss: cx(containerStyles.root, !isFlat && containerShadowStyles.root),
92
71
  style: {
93
72
  width
94
73
  },
@@ -98,25 +77,25 @@ const SpotlightCard = /*#__PURE__*/forwardRef((props, ref) => {
98
77
  // temporarily use this data attribute to prevent clicking outside won't close spotlight correctly issue
99
78
  ,
100
79
  "data-ds--close--type": "single"
101
- }, typeof image === 'string' ? jsx("img", {
102
- css: imageStyles,
80
+ }, typeof image === 'string' ? /*#__PURE__*/React.createElement("img", {
103
81
  src: image,
104
- alt: ""
105
- }) : image, jsx("div", {
106
- css: bodyStyles
107
- }, heading || headingAfterElement ? jsx(Header, null, jsx(Heading, {
82
+ alt: "",
83
+ className: ax(["_1e0c1ule"])
84
+ }) : image, /*#__PURE__*/React.createElement("div", {
85
+ className: ax(["_1e0c1txw _2lx21bp4 _85i5pxbi _1q51pxbi _y4tiv47k _bozgv47k"])
86
+ }, heading || headingAfterElement ? /*#__PURE__*/React.createElement(Header, null, /*#__PURE__*/React.createElement(Heading, {
108
87
  id: headingId,
109
88
  size: "medium",
110
89
  as: `h${headingLevel}`,
111
90
  color: "color.text.inverse"
112
- }, heading), headingAfterElement) : null, jsx(Text, null, children), actions.length > 0 || actionsBeforeElement ? jsx(Footer, null, actionsBeforeElement || jsx("span", null), jsx(DialogActionItemContainer, null, actions.map(({
91
+ }, heading), headingAfterElement) : null, /*#__PURE__*/React.createElement(Text, null, children), actions.length > 0 || actionsBeforeElement ? /*#__PURE__*/React.createElement(Footer, null, actionsBeforeElement || /*#__PURE__*/React.createElement("span", null), /*#__PURE__*/React.createElement(DialogActionItemContainer, null, actions.map(({
113
92
  text,
114
93
  key,
115
94
  ...rest
116
95
  }, idx) => {
117
- return jsx(DialogActionItem, {
96
+ return /*#__PURE__*/React.createElement(DialogActionItem, {
118
97
  key: key || (typeof text === 'string' ? text : `${idx}`)
119
- }, jsx(Button, rest, text));
98
+ }, /*#__PURE__*/React.createElement(Button, rest, text));
120
99
  }))) : null)));
121
100
  });
122
101
  SpotlightCard.displayName = 'SpotlightCard';
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React, { Component } from 'react';
3
3
  import FocusLock from 'react-focus-lock';
4
4
  import { Popper } from '@atlaskit/popper';
5
- import { Box } from '@atlaskit/primitives';
5
+ import { Box } from '@atlaskit/primitives/compiled';
6
6
  import { DialogImage } from '../styled/dialog';
7
7
  import SpotlightCard from './spotlight-card';
8
8
  import ValueChanged from './value-changed';
@@ -7,7 +7,6 @@ import scrollIntoView from 'scroll-into-view-if-needed';
7
7
  import { Layering } from '@atlaskit/layering';
8
8
  import { fg } from '@atlaskit/platform-feature-flags';
9
9
  import Portal from '@atlaskit/portal';
10
- import { layers } from '@atlaskit/theme/constants';
11
10
  import { ElementBox } from '../utils/use-element-box';
12
11
  import { Fade } from './animation';
13
12
  import Clone from './clone';
@@ -95,7 +94,7 @@ class SpotlightInner extends React.Component {
95
94
  isOpen,
96
95
  onExited
97
96
  }) => /*#__PURE__*/React.createElement(Portal, {
98
- zIndex: layers.spotlight() + 1
97
+ zIndex: 701
99
98
  }, TargetReplacement ? /*#__PURE__*/React.createElement(NodeResolverSpotlightInner, {
100
99
  hasNodeResolver: !fg('platform_design_system_team_onboarding_noderesolve'),
101
100
  innerRef: elem => this.setState({
@@ -3,7 +3,6 @@ import React, { createContext, PureComponent } from 'react';
3
3
  import memoizeOne from 'memoize-one';
4
4
  import noop from '@atlaskit/ds-lib/noop';
5
5
  import Portal from '@atlaskit/portal';
6
- import { layers } from '@atlaskit/theme/constants';
7
6
  import Blanket from '../styled/blanket';
8
7
  import { Fade } from './animation';
9
8
  const {
@@ -91,7 +90,7 @@ export default class SpotlightManager extends PureComponent {
91
90
  }, /*#__PURE__*/React.createElement(Fade, {
92
91
  hasEntered: this.state.spotlightCount > 0
93
92
  }, animationStyles => /*#__PURE__*/React.createElement(Portal, {
94
- zIndex: layers.spotlight()
93
+ zIndex: 700
95
94
  }, /*#__PURE__*/React.createElement(Blanket
96
95
  /* eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766 */, {
97
96
  style: animationStyles,
@@ -1,88 +1,87 @@
1
- import * as colors from '@atlaskit/theme/colors';
2
1
  const spotlightTheme = {
3
2
  default: {
4
3
  background: {
5
- default: `var(--ds-background-inverse-subtle, ${colors.P500})`,
6
- hover: `var(--ds-background-inverse-subtle-hovered, ${colors.P200})`,
7
- active: `var(--ds-background-inverse-subtle-pressed, ${colors.P500})`,
8
- disabled: `var(--ds-background-disabled, ${colors.P400})`,
9
- selected: `var(--ds-background-inverse-subtle-pressed, ${colors.R500})`,
10
- focus: `var(--ds-background-inverse-subtle, ${colors.P500})`
4
+ default: "var(--ds-background-inverse-subtle, #00000029)",
5
+ hover: "var(--ds-background-inverse-subtle-hovered, #0000003D)",
6
+ active: "var(--ds-background-inverse-subtle-pressed, #00000052)",
7
+ disabled: "var(--ds-background-disabled, #091E4208)",
8
+ selected: "var(--ds-background-inverse-subtle-pressed, #00000052)",
9
+ focus: "var(--ds-background-inverse-subtle, #00000029)"
11
10
  },
12
11
  color: {
13
- default: `var(--ds-text-inverse, ${colors.N0})`,
14
- hover: `var(--ds-text-inverse, ${colors.N0})`,
15
- active: `var(--ds-text-inverse, ${colors.N0})`,
12
+ default: "var(--ds-text-inverse, #FFFFFF)",
13
+ hover: "var(--ds-text-inverse, #FFFFFF)",
14
+ active: "var(--ds-text-inverse, #FFFFFF)",
16
15
  disabled: {
17
- light: `var(--ds-text-disabled, ${colors.N0})`,
18
- dark: `var(--ds-text-disabled, ${colors.DN30})`
16
+ light: "var(--ds-text-disabled, #091E424F)",
17
+ dark: "var(--ds-text-disabled, #091E424F)"
19
18
  },
20
- selected: `var(--ds-text-inverse, ${colors.N0})`,
21
- focus: `var(--ds-text-inverse, ${colors.N0})`
19
+ selected: "var(--ds-text-inverse, #FFFFFF)",
20
+ focus: "var(--ds-text-inverse, #FFFFFF)"
22
21
  }
23
22
  },
24
23
  subtle: {
25
24
  background: {
26
25
  default: 'none',
27
- hover: `var(--ds-background-inverse-subtle-hovered, ${colors.P200})`,
28
- active: `var(--ds-background-inverse-subtle-pressed, ${colors.P500})`,
26
+ hover: "var(--ds-background-inverse-subtle-hovered, #0000003D)",
27
+ active: "var(--ds-background-inverse-subtle-pressed, #00000052)",
29
28
  disabled: 'none',
30
29
  selected: {
31
- light: `var(--ds-background-selected-hovered, ${colors.N700})`,
32
- dark: `var(--ds-background-selected-hovered, ${colors.DN0})`
30
+ light: "var(--ds-background-selected-hovered, #CCE0FF)",
31
+ dark: "var(--ds-background-selected-hovered, #CCE0FF)"
33
32
  },
34
33
  focusSelected: {
35
- light: `var(--ds-background-selected-hovered, ${colors.N700})`,
36
- dark: `var(--ds-background-selected-hovered, ${colors.DN0})`
34
+ light: "var(--ds-background-selected-hovered, #CCE0FF)",
35
+ dark: "var(--ds-background-selected-hovered, #CCE0FF)"
37
36
  }
38
37
  },
39
38
  color: {
40
- default: `var(--ds-text-inverse, ${colors.N0})`,
41
- hover: `var(--ds-text-inverse, ${colors.N0})`,
42
- active: `var(--ds-text-inverse, ${colors.N0})`,
43
- disabled: `var(--ds-text-disabled, ${colors.N0})`,
44
- selected: `var(--ds-text-inverse, ${colors.N0})`,
45
- focus: `var(--ds-text-inverse, ${colors.N0})`
39
+ default: "var(--ds-text-inverse, #FFFFFF)",
40
+ hover: "var(--ds-text-inverse, #FFFFFF)",
41
+ active: "var(--ds-text-inverse, #FFFFFF)",
42
+ disabled: "var(--ds-text-disabled, #091E424F)",
43
+ selected: "var(--ds-text-inverse, #FFFFFF)",
44
+ focus: "var(--ds-text-inverse, #FFFFFF)"
46
45
  }
47
46
  },
48
47
  'subtle-link': {
49
48
  textDecoration: {
50
- hover: `underline ${`var(--ds-text-inverse, ${colors.P75})`}`
49
+ hover: `underline ${"var(--ds-text-inverse, #FFFFFF)"}`
51
50
  },
52
51
  textDecorationLine: {
53
52
  active: 'none'
54
53
  },
55
54
  color: {
56
- default: `var(--ds-text-inverse, ${colors.N0})`,
57
- hover: `var(--ds-text-inverse, ${colors.P75})`,
58
- active: `var(--ds-text-inverse, ${colors.P100})`,
59
- disabled: `var(--ds-text-discovery, ${colors.P500})`,
60
- selected: `var(--ds-text-selected, ${colors.N0})`,
61
- focus: `var(--ds-text-inverse, ${colors.N0})`
55
+ default: "var(--ds-text-inverse, #FFFFFF)",
56
+ hover: "var(--ds-text-inverse, #FFFFFF)",
57
+ active: "var(--ds-text-inverse, #FFFFFF)",
58
+ disabled: "var(--ds-text-discovery, #5E4DB2)",
59
+ selected: "var(--ds-text-selected, #0C66E4)",
60
+ focus: "var(--ds-text-inverse, #FFFFFF)"
62
61
  }
63
62
  }
64
63
  };
65
64
  const modalTheme = {
66
65
  primary: {
67
66
  background: {
68
- default: `var(--ds-background-discovery-bold, ${colors.P400})`,
69
- hover: `var(--ds-background-discovery-bold-hovered, ${colors.P200})`,
70
- active: `var(--ds-background-discovery-bold-pressed, ${colors.P500})`,
67
+ default: "var(--ds-background-discovery-bold, #6E5DC6)",
68
+ hover: "var(--ds-background-discovery-bold-hovered, #5E4DB2)",
69
+ active: "var(--ds-background-discovery-bold-pressed, #352C63)",
71
70
  disabled: {
72
- light: `var(--ds-background-disabled, ${colors.N30})`,
73
- dark: `var(--ds-background-disabled, ${colors.DN70})`
71
+ light: "var(--ds-background-disabled, #091E4208)",
72
+ dark: "var(--ds-background-disabled, #091E4208)"
74
73
  },
75
- selected: `var(--ds-background-selected-hovered, ${colors.R500})`,
76
- focus: `var(--ds-background-discovery-bold-hovered, ${colors.P400})`
74
+ selected: "var(--ds-background-selected-hovered, #CCE0FF)",
75
+ focus: "var(--ds-background-discovery-bold-hovered, #5E4DB2)"
77
76
  },
78
77
  color: {
79
- default: `var(--ds-text-inverse, ${colors.N0})`,
78
+ default: "var(--ds-text-inverse, #FFFFFF)",
80
79
  disabled: {
81
- light: `var(--ds-text-disabled, ${colors.N0})`,
82
- dark: `var(--ds-text-disabled, ${colors.DN30})`
80
+ light: "var(--ds-text-disabled, #091E424F)",
81
+ dark: "var(--ds-text-disabled, #091E424F)"
83
82
  },
84
- selected: `var(--ds-text-selected, ${colors.N0})`,
85
- focus: `var(--ds-text-inverse, ${colors.N0})`
83
+ selected: "var(--ds-text-selected, #0C66E4)",
84
+ focus: "var(--ds-text-inverse, #FFFFFF)"
86
85
  }
87
86
  }
88
87
  };
@@ -0,0 +1,4 @@
1
+
2
+ ._1r04idpf{inset:0}
3
+ ._v56414ka{transition:opacity .22s}._1pby1fw0{z-index:700}
4
+ ._kqsw1n9t{position:fixed}
@@ -1,18 +1,10 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { css, jsx } from '@emotion/react';
6
- import { N100A } from '@atlaskit/theme/colors';
7
- import { layers } from '@atlaskit/theme/constants';
1
+ /* blanket.tsx generated by @compiled/babel-plugin v0.36.1 */
8
2
  // IE11 and Edge: z-index needed because fixed position calculates z-index relative
9
3
  // to body instead of nearest stacking context (Portal in our case).
10
- const blanketStyles = css({
11
- position: 'fixed',
12
- zIndex: layers.spotlight(),
13
- inset: 0,
14
- transition: 'opacity 220ms'
15
- });
4
+ import "./blanket.compiled.css";
5
+ import * as React from 'react';
6
+ import { ax, ix } from "@compiled/react/runtime";
7
+ const blanketStyles = null;
16
8
  /**
17
9
  * __Blanket__
18
10
  *
@@ -29,15 +21,15 @@ const Blanket = ({
29
21
  onBlanketClicked,
30
22
  style
31
23
  }) => {
32
- return jsx("div", {
24
+ return /*#__PURE__*/React.createElement("div", {
33
25
  role: "presentation",
34
- css: blanketStyles,
35
26
  style: {
36
27
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Pass-through style props are not allowed
37
28
  ...style,
38
- backgroundColor: isTinted ? `var(--ds-blanket, ${N100A})` : 'transparent'
29
+ backgroundColor: isTinted ? "var(--ds-blanket, #091E427D)" : 'transparent'
39
30
  },
40
- onClick: onBlanketClicked
31
+ onClick: onBlanketClicked,
32
+ className: ax(["_1r04idpf _v56414ka _kqsw1n9t _1pby1fw0"])
41
33
  });
42
34
  };
43
35
  export default Blanket;
@@ -0,0 +1,10 @@
1
+ ._12l21b66{margin-inline-end:var(--ds-space-050,4px)}
2
+ ._12l2r5cr{margin-inline-end:var(--ds-space-negative-050,-4px)}
3
+ ._1e0c1txw{display:flex}
4
+ ._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
5
+ ._2lx21sbv{flex-direction:row-reverse}
6
+ ._4t3i1wug{height:auto}
7
+ ._6rthze3t{margin-block-end:var(--ds-space-0,0)}
8
+ ._ahbq1b66{margin-inline-start:var(--ds-space-050,4px)}
9
+ ._ahbqr5cr{margin-inline-start:var(--ds-space-negative-050,-4px)}
10
+ ._p12f1osq{max-width:100%}
@@ -1,24 +1,16 @@
1
+ /* dialog.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  import _extends from "@babel/runtime/helpers/extends";
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
6
-
7
- import { css, jsx } from '@emotion/react';
8
- const imageStyles = css({
9
- maxWidth: '100%',
10
- height: 'auto'
11
- });
12
- const actionItemContainerStyles = css({
13
- display: 'flex',
14
- margin: `${"var(--ds-space-0, 0px)"} -4px`,
15
- /* When there is more than one action, place primary action visually on the
16
- right, but keep it's position as the first focusable element in the DOM */
17
- flexDirection: 'row-reverse'
18
- });
19
- const actionItemStyles = css({
20
- margin: `${"var(--ds-space-0, 0px)"} ${"var(--ds-space-050, 4px)"}`
21
- });
3
+ import "./dialog.compiled.css";
4
+ import * as React from 'react';
5
+ import { ax, ix } from "@compiled/react/runtime";
6
+ import { Box } from '@atlaskit/primitives/compiled';
7
+ const imageStyles = null;
8
+ const actionItemContainerStyles = {
9
+ root: "_1e0c1txw _2lx21sbv _6rthze3t _1pfhze3t _12l2r5cr _ahbqr5cr"
10
+ };
11
+ const actionItemStyles = {
12
+ root: "_6rthze3t _1pfhze3t _12l21b66 _ahbq1b66"
13
+ };
22
14
 
23
15
  /**
24
16
  * __Dialog image__
@@ -30,12 +22,11 @@ const actionItemStyles = css({
30
22
  export const DialogImage = ({
31
23
  alt,
32
24
  ...props
33
- }) =>
34
- // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
35
- jsx("img", _extends({
36
- css: imageStyles,
25
+ }) => /*#__PURE__*/React.createElement("img", _extends({
37
26
  alt: alt
38
- }, props));
27
+ }, props, {
28
+ className: ax(["_p12f1osq _4t3i1wug"])
29
+ }));
39
30
 
40
31
  /**
41
32
  * __Dialog action item container__
@@ -46,8 +37,8 @@ jsx("img", _extends({
46
37
  */
47
38
  export const DialogActionItemContainer = ({
48
39
  children
49
- }) => jsx("div", {
50
- css: actionItemContainerStyles
40
+ }) => /*#__PURE__*/React.createElement(Box, {
41
+ xcss: actionItemContainerStyles.root
51
42
  }, children);
52
43
 
53
44
  /**
@@ -59,6 +50,6 @@ export const DialogActionItemContainer = ({
59
50
  */
60
51
  export const DialogActionItem = ({
61
52
  children
62
- }) => jsx("div", {
63
- css: actionItemStyles
53
+ }) => /*#__PURE__*/React.createElement(Box, {
54
+ xcss: actionItemStyles.root
64
55
  }, children);
@@ -0,0 +1,26 @@
1
+ ._11c8lodh{font:var(--ds-font-heading-medium,normal 500 20px/24px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
+ ._12l21b66{margin-inline-end:var(--ds-space-050,4px)}
3
+ ._1bah1h6o{justify-content:center}
4
+ ._1bsb1osq{width:100%}
5
+ ._1e0c1txw{display:flex}
6
+ ._1n261g80{flex-wrap:wrap}
7
+ ._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
8
+ ._1q511jfw{padding-block-start:var(--ds-space-500,40px)}
9
+ ._1q51ze3t{padding-block-start:var(--ds-space-0,0)}
10
+ ._1s1g1sit{border-start-start-radius:var(--ds-border-radius,3px)}
11
+ ._2lx21sbv{flex-direction:row-reverse}
12
+ ._2lx2vrvc{flex-direction:row}
13
+ ._4t3i1wug{height:auto}
14
+ ._5fbc1sit{border-start-end-radius:var(--ds-border-radius,3px)}
15
+ ._6rth1b66{margin-block-end:var(--ds-space-050,4px)}
16
+ ._6rthu2gc{margin-block-end:var(--ds-space-100,8px)}
17
+ ._85i514no{padding-block-end:36px}
18
+ ._85i51jfw{padding-block-end:var(--ds-space-500,40px)}
19
+ ._ahbq1b66{margin-inline-start:var(--ds-space-050,4px)}
20
+ ._bozg1jfw{padding-inline-start:var(--ds-space-500,40px)}
21
+ ._bozgpxbi{padding-inline-start:var(--ds-space-200,1pc)}
22
+ ._syaz1kw7{color:inherit}
23
+ ._y3gn1h6o{text-align:center}
24
+ ._y4ti1jfw{padding-inline-end:var(--ds-space-500,40px)}
25
+ ._y4tipxbi{padding-inline-end:var(--ds-space-200,1pc)}
26
+ @media (min-width:320px) and (max-width:480px){._j722idpf{border-radius:0}}
@@ -1,43 +1,18 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
-
6
- import { css, jsx } from '@emotion/react';
7
- const modalBodyStyles = css({
8
- padding: `${"var(--ds-space-500, 40px)"} ${"var(--ds-space-200, 16px)"}`,
9
- textAlign: 'center'
10
- });
1
+ /* modal.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./modal.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ import { Box } from '@atlaskit/primitives/compiled';
6
+ const modalBodyStyles = null;
11
7
 
12
8
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-array-arguments -- Ignored via go/DSP-18766
13
- const modalHeadingStyles = css({
14
- color: 'inherit',
15
- font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
16
- marginBlockEnd: "var(--ds-space-100, 8px)"
17
- });
18
- const modalImageStyles = css({
19
- width: '100%',
20
- height: 'auto',
21
- borderStartEndRadius: "var(--ds-border-radius, 3px)",
22
- borderStartStartRadius: "var(--ds-border-radius, 3px)",
23
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
24
- '@media (min-width: 320px) and (max-width: 480px)': {
25
- borderRadius: 0
26
- }
27
- });
28
- const modalActionContainerStyles = css({
29
- display: 'flex',
30
- padding: `${"var(--ds-space-0, 0px)"} ${"var(--ds-space-500, 40px)"} 36px`,
31
- justifyContent: 'center',
32
- flexDirection: 'row',
33
- flexFlow: 'wrap'
34
- });
35
- const modalActionContainerReversedStyles = css({
36
- flexDirection: 'row-reverse'
37
- });
38
- const modalActionItemStyles = css({
39
- margin: `${"var(--ds-space-0, 0px)"} ${"var(--ds-space-050, 4px)"} ${"var(--ds-space-050, 4px)"}`
40
- });
9
+ const modalHeadingStyles = null;
10
+ const modalImageStyles = null;
11
+ const modalActionContainerStyles = null;
12
+ const modalActionContainerReversedStyles = null;
13
+ const modalActionItemStyles = {
14
+ root: "_6rth1b66 _1pfhze3t _12l21b66 _ahbq1b66"
15
+ };
41
16
 
42
17
  /**
43
18
  * __Modal body__
@@ -46,8 +21,8 @@ const modalActionItemStyles = css({
46
21
  */
47
22
  export const ModalBody = ({
48
23
  children
49
- }) => jsx("div", {
50
- css: modalBodyStyles
24
+ }) => /*#__PURE__*/React.createElement("div", {
25
+ className: ax(["_85i51jfw _1q511jfw _y4tipxbi _bozgpxbi _y3gn1h6o"])
51
26
  }, children);
52
27
 
53
28
  /**
@@ -59,13 +34,10 @@ export const ModalHeading = ({
59
34
  children,
60
35
  id
61
36
  }) => {
62
- return (
63
- // eslint-disable-next-line @atlaskit/design-system/use-heading
64
- jsx("h1", {
65
- css: modalHeadingStyles,
66
- id: id
67
- }, children)
68
- );
37
+ return /*#__PURE__*/React.createElement("h1", {
38
+ id: id,
39
+ className: ax(["_11c8lodh _syaz1kw7 _6rthu2gc"])
40
+ }, children);
69
41
  };
70
42
 
71
43
  /**
@@ -76,10 +48,10 @@ export const ModalHeading = ({
76
48
  export const ModalImage = ({
77
49
  alt,
78
50
  src
79
- }) => jsx("img", {
80
- css: modalImageStyles,
51
+ }) => /*#__PURE__*/React.createElement("img", {
81
52
  alt: alt,
82
- src: src
53
+ src: src,
54
+ className: ax(["_1bsb1osq _4t3i1wug _5fbc1sit _1s1g1sit _j722idpf"])
83
55
  });
84
56
 
85
57
  /**
@@ -90,8 +62,8 @@ export const ModalImage = ({
90
62
  export const ModalActionContainer = ({
91
63
  children,
92
64
  shouldReverseButtonOrder
93
- }) => jsx("div", {
94
- css: [modalActionContainerStyles, shouldReverseButtonOrder && modalActionContainerReversedStyles]
65
+ }) => /*#__PURE__*/React.createElement("div", {
66
+ className: ax(["_2lx2vrvc _1n261g80 _1e0c1txw _1bah1h6o _85i514no _1q51ze3t _y4ti1jfw _bozg1jfw", shouldReverseButtonOrder && "_2lx21sbv"])
95
67
  }, children);
96
68
 
97
69
  /**
@@ -101,6 +73,6 @@ export const ModalActionContainer = ({
101
73
  */
102
74
  export const ModalActionItem = ({
103
75
  children
104
- }) => jsx("div", {
105
- css: modalActionItemStyles
76
+ }) => /*#__PURE__*/React.createElement(Box, {
77
+ xcss: modalActionItemStyles.root
106
78
  }, children);
@@ -0,0 +1,9 @@
1
+
2
+ ._y44v1si8{animation:khs8z5x 3s cubic-bezier(.55,.055,.675,.19) infinite}._152tze3t{inset-block-start:var(--ds-space-0,0)}
3
+ ._16qs1wx8{box-shadow:0 0 0 2px var(--ds-border-discovery,#8270db)}
4
+ ._1bsb1osq{width:100%}
5
+ ._1e02ze3t{inset-inline-start:var(--ds-space-0,0)}
6
+ ._4t3i1osq{height:100%}
7
+ ._kqswstnw{position:absolute}
8
+ @keyframes khs8z5x{0%,33%{box-shadow:0 0 0 2px var(--ds-border-discovery,#8270db),0 0 0 var(--ds-border-discovery,#8270db)}66%,to{box-shadow:0 0 0 2px var(--ds-border-discovery,#8270db),0 0 0 10px rgba(101,84,192,.01)}}
9
+ @media (prefers-reduced-motion:reduce){._1bumglyw{animation:none}._sedtglyw{transition:none}}