@atlaskit/link-create 2.8.2 → 2.8.3

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,14 @@
1
1
  # @atlaskit/link-create
2
2
 
3
+ ## 2.8.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#121784](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/121784)
8
+ [`b729bad421ff9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b729bad421ff9) -
9
+ [ux] Default to first site in site picker, when present. Show icon only when present (previously
10
+ was a grey square).
11
+
3
12
  ## 2.8.2
4
13
 
5
14
  ### Patch Changes
@@ -13,7 +13,7 @@ var CREATE_FORM_MIN_HEIGHT_IN_PX = exports.CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
13
13
  var LINK_CREATE_FORM_POST_CREATE_FIELD = exports.LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
14
14
  var PACKAGE_DATA = exports.PACKAGE_DATA = {
15
15
  packageName: "@atlaskit/link-create" || '',
16
- packageVersion: "2.8.2" || '',
16
+ packageVersion: "2.8.3" || '',
17
17
  component: COMPONENT_NAME,
18
18
  componentName: COMPONENT_NAME
19
19
  };
@@ -95,23 +95,27 @@ var SiteSelect = exports.SiteSelect = function SiteSelect(_ref3) {
95
95
  }
96
96
  });
97
97
  };
98
- var SitePickerOption = exports.SitePickerOption = function SitePickerOption(_ref4) {
99
- var children = _ref4.children,
100
- props = (0, _objectWithoutProperties2.default)(_ref4, _excluded3);
101
- return (0, _react.jsx)(_select.components.Option, props, (0, _react.jsx)(_primitives.Inline, {
98
+ var SiteRow = function SiteRow(_ref4) {
99
+ var avatarUrl = _ref4.avatarUrl,
100
+ children = _ref4.children;
101
+ return (0, _react.jsx)(_primitives.Inline, {
102
102
  space: "space.100",
103
103
  alignBlock: "center"
104
- }, (0, _react.jsx)(_icon.UrlIcon, {
105
- url: props.data.value.avatarUrl
106
- }), children));
104
+ }, avatarUrl ? (0, _react.jsx)(_icon.UrlIcon, {
105
+ url: avatarUrl
106
+ }) : null, children);
107
107
  };
108
- var SitePickerSingleValue = exports.SitePickerSingleValue = function SitePickerSingleValue(_ref5) {
108
+ var SitePickerOption = exports.SitePickerOption = function SitePickerOption(_ref5) {
109
109
  var children = _ref5.children,
110
- props = (0, _objectWithoutProperties2.default)(_ref5, _excluded4);
111
- return (0, _react.jsx)(_select.components.SingleValue, props, (0, _react.jsx)(_primitives.Inline, {
112
- space: "space.100",
113
- alignBlock: "center"
114
- }, (0, _react.jsx)(_icon.UrlIcon, {
115
- url: props.data.value.avatarUrl
116
- }), children));
110
+ props = (0, _objectWithoutProperties2.default)(_ref5, _excluded3);
111
+ return (0, _react.jsx)(_select.components.Option, props, (0, _react.jsx)(SiteRow, {
112
+ avatarUrl: props.data.value.avatarUrl
113
+ }, children));
114
+ };
115
+ var SitePickerSingleValue = exports.SitePickerSingleValue = function SitePickerSingleValue(_ref6) {
116
+ var children = _ref6.children,
117
+ props = (0, _objectWithoutProperties2.default)(_ref6, _excluded4);
118
+ return (0, _react.jsx)(_select.components.SingleValue, props, (0, _react.jsx)(SiteRow, {
119
+ avatarUrl: props.data.value.avatarUrl
120
+ }, children));
117
121
  };
@@ -7,7 +7,7 @@ export const CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
7
7
  export const LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
8
8
  export const PACKAGE_DATA = {
9
9
  packageName: "@atlaskit/link-create" || '',
10
- packageVersion: "2.8.2" || '',
10
+ packageVersion: "2.8.3" || '',
11
11
  component: COMPONENT_NAME,
12
12
  componentName: COMPONENT_NAME
13
13
  };
@@ -77,21 +77,24 @@ export const SiteSelect = ({
77
77
  }
78
78
  });
79
79
  };
80
+ const SiteRow = ({
81
+ avatarUrl,
82
+ children
83
+ }) => jsx(Inline, {
84
+ space: "space.100",
85
+ alignBlock: "center"
86
+ }, avatarUrl ? jsx(UrlIcon, {
87
+ url: avatarUrl
88
+ }) : null, children);
80
89
  export const SitePickerOption = ({
81
90
  children,
82
91
  ...props
83
- }) => jsx(components.Option, props, jsx(Inline, {
84
- space: "space.100",
85
- alignBlock: "center"
86
- }, jsx(UrlIcon, {
87
- url: props.data.value.avatarUrl
88
- }), children));
92
+ }) => jsx(components.Option, props, jsx(SiteRow, {
93
+ avatarUrl: props.data.value.avatarUrl
94
+ }, children));
89
95
  export const SitePickerSingleValue = ({
90
96
  children,
91
97
  ...props
92
- }) => jsx(components.SingleValue, props, jsx(Inline, {
93
- space: "space.100",
94
- alignBlock: "center"
95
- }, jsx(UrlIcon, {
96
- url: props.data.value.avatarUrl
97
- }), children));
98
+ }) => jsx(components.SingleValue, props, jsx(SiteRow, {
99
+ avatarUrl: props.data.value.avatarUrl
100
+ }, children));
@@ -7,7 +7,7 @@ export var CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
7
7
  export var LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
8
8
  export var PACKAGE_DATA = {
9
9
  packageName: "@atlaskit/link-create" || '',
10
- packageVersion: "2.8.2" || '',
10
+ packageVersion: "2.8.3" || '',
11
11
  component: COMPONENT_NAME,
12
12
  componentName: COMPONENT_NAME
13
13
  };
@@ -85,23 +85,27 @@ export var SiteSelect = function SiteSelect(_ref3) {
85
85
  }
86
86
  });
87
87
  };
88
- export var SitePickerOption = function SitePickerOption(_ref4) {
89
- var children = _ref4.children,
90
- props = _objectWithoutProperties(_ref4, _excluded3);
91
- return jsx(components.Option, props, jsx(Inline, {
88
+ var SiteRow = function SiteRow(_ref4) {
89
+ var avatarUrl = _ref4.avatarUrl,
90
+ children = _ref4.children;
91
+ return jsx(Inline, {
92
92
  space: "space.100",
93
93
  alignBlock: "center"
94
- }, jsx(UrlIcon, {
95
- url: props.data.value.avatarUrl
96
- }), children));
94
+ }, avatarUrl ? jsx(UrlIcon, {
95
+ url: avatarUrl
96
+ }) : null, children);
97
97
  };
98
- export var SitePickerSingleValue = function SitePickerSingleValue(_ref5) {
98
+ export var SitePickerOption = function SitePickerOption(_ref5) {
99
99
  var children = _ref5.children,
100
- props = _objectWithoutProperties(_ref5, _excluded4);
101
- return jsx(components.SingleValue, props, jsx(Inline, {
102
- space: "space.100",
103
- alignBlock: "center"
104
- }, jsx(UrlIcon, {
105
- url: props.data.value.avatarUrl
106
- }), children));
100
+ props = _objectWithoutProperties(_ref5, _excluded3);
101
+ return jsx(components.Option, props, jsx(SiteRow, {
102
+ avatarUrl: props.data.value.avatarUrl
103
+ }, children));
104
+ };
105
+ export var SitePickerSingleValue = function SitePickerSingleValue(_ref6) {
106
+ var children = _ref6.children,
107
+ props = _objectWithoutProperties(_ref6, _excluded4);
108
+ return jsx(components.SingleValue, props, jsx(SiteRow, {
109
+ avatarUrl: props.data.value.avatarUrl
110
+ }, children));
107
111
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-create",
3
- "version": "2.8.2",
3
+ "version": "2.8.3",
4
4
  "description": "The driver component of meta creation flow",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",