@atlaskit/share 4.20.6 → 4.20.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/share
2
2
 
3
+ ## 4.20.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#155914](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/155914)
8
+ [`508501922f391`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/508501922f391) -
9
+ Use heading component
10
+
3
11
  ## 4.20.6
4
12
 
5
13
  ### Patch Changes
@@ -5,8 +5,7 @@
5
5
  "target": "es5",
6
6
  "composite": true,
7
7
  "outDir": "../dist",
8
- "rootDir": "../",
9
- "baseUrl": "../"
8
+ "rootDir": "../"
10
9
  },
11
10
  "include": [
12
11
  "../src/**/*.ts",
@@ -30,6 +29,9 @@
30
29
  {
31
30
  "path": "../../../design-system/form/afm-cc/tsconfig.json"
32
31
  },
32
+ {
33
+ "path": "../../../design-system/heading/afm-cc/tsconfig.json"
34
+ },
33
35
  {
34
36
  "path": "../../../design-system/icon/afm-cc/tsconfig.json"
35
37
  },
@@ -4,46 +4,26 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.getFormHeaderTitleStyles = exports.ShareHeader = void 0;
7
+ exports.ShareHeader = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var _react2 = require("@emotion/react");
10
9
  var _reactIntlNext = require("react-intl-next");
11
- var _typography = require("@atlaskit/theme/typography");
10
+ var _heading = _interopRequireDefault(require("@atlaskit/heading"));
11
+ var _primitives = require("@atlaskit/primitives");
12
12
  var _i18n = require("../i18n");
13
- /**
14
- * @jsxRuntime classic
15
- * @jsx jsx
16
- */
17
-
18
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
19
-
20
- var headerWrapperStyles = (0, _react2.css)({
13
+ var headerWrapperStyles = (0, _primitives.xcss)({
21
14
  display: 'flex',
22
- justifyContent: 'space-between'
15
+ justifyContent: 'space-between',
16
+ marginRight: 'space.400',
17
+ overflow: 'hidden',
18
+ textOverflow: 'ellipsis',
19
+ whiteSpace: 'nowrap',
20
+ lineHeight: 'space.400'
23
21
  });
24
- var getFormHeaderTitleStyles = exports.getFormHeaderTitleStyles = function getFormHeaderTitleStyles(theme) {
25
- return (
26
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
27
- (0, _react2.css)((0, _typography.h500)(theme), {
28
- lineHeight: "var(--ds-space-400, 32px)",
29
- marginRight: "var(--ds-space-400, 32px)",
30
- marginTop: "var(--ds-space-400, 32px)",
31
- overflow: 'hidden',
32
- textOverflow: 'ellipsis',
33
- whiteSpace: 'nowrap',
34
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
35
- '> span': {
36
- fontSize: 'initial'
37
- }
38
- })
39
- );
40
- };
41
22
  var ShareHeader = exports.ShareHeader = function ShareHeader(_ref) {
42
23
  var title = _ref.title;
43
- var theme = (0, _react2.useTheme)();
44
- return (0, _react2.jsx)("div", {
45
- css: headerWrapperStyles
46
- }, (0, _react2.jsx)("h1", {
47
- css: getFormHeaderTitleStyles(theme)
48
- }, title || (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _i18n.messages.formTitle)));
24
+ return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
25
+ xcss: headerWrapperStyles
26
+ }, /*#__PURE__*/_react.default.createElement(_heading.default, {
27
+ level: "h500"
28
+ }, title || /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _i18n.messages.formTitle)));
49
29
  };
@@ -13,7 +13,7 @@ var buildAttributes = function buildAttributes() {
13
13
  var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
14
14
  return _objectSpread({
15
15
  packageName: "@atlaskit/share",
16
- packageVersion: "4.20.6"
16
+ packageVersion: "4.20.7"
17
17
  }, attributes);
18
18
  };
19
19
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
@@ -1,39 +1,23 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
1
  import React from 'react';
6
-
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
- import { css, jsx, useTheme } from '@emotion/react';
9
2
  import { FormattedMessage } from 'react-intl-next';
10
- import { h500 } from '@atlaskit/theme/typography';
3
+ import Heading from '@atlaskit/heading';
4
+ import { Box, xcss } from '@atlaskit/primitives';
11
5
  import { messages } from '../i18n';
12
- const headerWrapperStyles = css({
6
+ const headerWrapperStyles = xcss({
13
7
  display: 'flex',
14
- justifyContent: 'space-between'
15
- });
16
- export const getFormHeaderTitleStyles = theme =>
17
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
18
- css(h500(theme), {
19
- lineHeight: "var(--ds-space-400, 32px)",
20
- marginRight: "var(--ds-space-400, 32px)",
21
- marginTop: "var(--ds-space-400, 32px)",
8
+ justifyContent: 'space-between',
9
+ marginRight: 'space.400',
22
10
  overflow: 'hidden',
23
11
  textOverflow: 'ellipsis',
24
12
  whiteSpace: 'nowrap',
25
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
26
- '> span': {
27
- fontSize: 'initial'
28
- }
13
+ lineHeight: 'space.400'
29
14
  });
30
15
  export const ShareHeader = ({
31
16
  title
32
17
  }) => {
33
- const theme = useTheme();
34
- return jsx("div", {
35
- css: headerWrapperStyles
36
- }, jsx("h1", {
37
- css: getFormHeaderTitleStyles(theme)
38
- }, title || jsx(FormattedMessage, messages.formTitle)));
18
+ return /*#__PURE__*/React.createElement(Box, {
19
+ xcss: headerWrapperStyles
20
+ }, /*#__PURE__*/React.createElement(Heading, {
21
+ level: "h500"
22
+ }, title || /*#__PURE__*/React.createElement(FormattedMessage, messages.formTitle)));
39
23
  };
@@ -1,7 +1,7 @@
1
1
  import { isEmail, isExternalUser, isGroup, isTeam, isUser } from '@atlaskit/smart-user-picker';
2
2
  const buildAttributes = (attributes = {}) => ({
3
3
  packageName: "@atlaskit/share",
4
- packageVersion: "4.20.6",
4
+ packageVersion: "4.20.7",
5
5
  ...attributes
6
6
  });
7
7
  const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
@@ -1,41 +1,22 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
1
  import React from 'react';
6
-
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
- import { css, jsx, useTheme } from '@emotion/react';
9
2
  import { FormattedMessage } from 'react-intl-next';
10
- import { h500 } from '@atlaskit/theme/typography';
3
+ import Heading from '@atlaskit/heading';
4
+ import { Box, xcss } from '@atlaskit/primitives';
11
5
  import { messages } from '../i18n';
12
- var headerWrapperStyles = css({
6
+ var headerWrapperStyles = xcss({
13
7
  display: 'flex',
14
- justifyContent: 'space-between'
8
+ justifyContent: 'space-between',
9
+ marginRight: 'space.400',
10
+ overflow: 'hidden',
11
+ textOverflow: 'ellipsis',
12
+ whiteSpace: 'nowrap',
13
+ lineHeight: 'space.400'
15
14
  });
16
- export var getFormHeaderTitleStyles = function getFormHeaderTitleStyles(theme) {
17
- return (
18
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
19
- css(h500(theme), {
20
- lineHeight: "var(--ds-space-400, 32px)",
21
- marginRight: "var(--ds-space-400, 32px)",
22
- marginTop: "var(--ds-space-400, 32px)",
23
- overflow: 'hidden',
24
- textOverflow: 'ellipsis',
25
- whiteSpace: 'nowrap',
26
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
27
- '> span': {
28
- fontSize: 'initial'
29
- }
30
- })
31
- );
32
- };
33
15
  export var ShareHeader = function ShareHeader(_ref) {
34
16
  var title = _ref.title;
35
- var theme = useTheme();
36
- return jsx("div", {
37
- css: headerWrapperStyles
38
- }, jsx("h1", {
39
- css: getFormHeaderTitleStyles(theme)
40
- }, title || jsx(FormattedMessage, messages.formTitle)));
17
+ return /*#__PURE__*/React.createElement(Box, {
18
+ xcss: headerWrapperStyles
19
+ }, /*#__PURE__*/React.createElement(Heading, {
20
+ level: "h500"
21
+ }, title || /*#__PURE__*/React.createElement(FormattedMessage, messages.formTitle)));
41
22
  };
@@ -6,7 +6,7 @@ var buildAttributes = function buildAttributes() {
6
6
  var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7
7
  return _objectSpread({
8
8
  packageName: "@atlaskit/share",
9
- packageVersion: "4.20.6"
9
+ packageVersion: "4.20.7"
10
10
  }, attributes);
11
11
  };
12
12
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
@@ -1,11 +1,5 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
1
  import React from 'react';
6
- import { type Theme } from '@emotion/react';
7
2
  export type Props = {
8
3
  title?: React.ReactNode;
9
4
  };
10
- export declare const getFormHeaderTitleStyles: (theme: Theme) => import("@emotion/react").SerializedStyles;
11
- export declare const ShareHeader: React.FunctionComponent<Props>;
5
+ export declare const ShareHeader: ({ title }: Props) => JSX.Element;
@@ -1,11 +1,5 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
1
  import React from 'react';
6
- import { type Theme } from '@emotion/react';
7
2
  export type Props = {
8
3
  title?: React.ReactNode;
9
4
  };
10
- export declare const getFormHeaderTitleStyles: (theme: Theme) => import("@emotion/react").SerializedStyles;
11
- export declare const ShareHeader: React.FunctionComponent<Props>;
5
+ export declare const ShareHeader: ({ title }: Props) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "4.20.6",
3
+ "version": "4.20.7",
4
4
  "description": "Fabric Share Element",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -42,6 +42,7 @@
42
42
  "@atlaskit/button": "^20.3.0",
43
43
  "@atlaskit/dropdown-menu": "^12.21.0",
44
44
  "@atlaskit/form": "^10.5.0",
45
+ "@atlaskit/heading": "^2.4.0",
45
46
  "@atlaskit/icon": "^22.24.0",
46
47
  "@atlaskit/link": "^1.2.0",
47
48
  "@atlaskit/menu": "^2.13.0",