@atlaskit/link-datasource 4.1.12 → 4.1.13

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-datasource
2
2
 
3
+ ## 4.1.13
4
+
5
+ ### Patch Changes
6
+
7
+ - [#132709](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/132709)
8
+ [`eb377d195f39d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/eb377d195f39d) -
9
+ [ux] Update link and icon render type for design refresh
10
+ - Updated dependencies
11
+
3
12
  ## 4.1.12
4
13
 
5
14
  ### Patch Changes
@@ -6,8 +6,10 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = exports.LINK_TYPE_TEST_ID = void 0;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
11
  var _react = _interopRequireWildcard(require("react"));
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
13
  var _smartCard = require("@atlaskit/smart-card");
12
14
  var _hoverCard = require("@atlaskit/smart-card/hover-card");
13
15
  var _linkUrl = _interopRequireDefault(require("@atlaskit/smart-card/link-url"));
@@ -37,16 +39,17 @@ var LinkRenderType = function LinkRenderType(_ref) {
37
39
  var anchor = (0, _react.useMemo)(function () {
38
40
  return /*#__PURE__*/_react.default.createElement(_hoverCard.HoverCard, {
39
41
  url: url
40
- }, /*#__PURE__*/_react.default.createElement(_linkUrl.default, {
42
+ }, /*#__PURE__*/_react.default.createElement(_linkUrl.default, (0, _extends2.default)({
41
43
  href: url
42
44
  // NOTE: This will no longer apply styles to `@atlaskit/link` when platform_editor_hyperlink_underline is enabled.
43
45
  // Wrap `@atlaskit/link` in a Text component to provide font styles to Link
44
46
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
45
- ,
46
- style: _objectSpread({}, linkStyle),
47
+ }, (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-sllv') ? {} : {
48
+ style: _objectSpread({}, linkStyle)
49
+ }, {
47
50
  "data-testid": testId,
48
51
  target: "_blank"
49
- }, text || url));
52
+ }), text || url));
50
53
  }, [linkStyle, url, text, testId]);
51
54
  var SmartCard = function SmartCard() {
52
55
  var handleClick = function handleClick(e) {
@@ -1,4 +1,6 @@
1
1
  ._18m915vq{overflow-y:hidden}
2
2
  ._1bsb1osq{width:100%}
3
3
  ._1bto1l2s{text-overflow:ellipsis}
4
- ._1reo15vq{overflow-x:hidden}
4
+ ._1reo15vq{overflow-x:hidden}
5
+ ._1ul97vkz{min-width:1pc}
6
+ ._p12f7vkz{max-width:1pc}
@@ -1,17 +1,21 @@
1
1
  /* index.tsx generated by @compiled/babel-plugin v0.36.1 */
2
2
  "use strict";
3
3
 
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.SharedIconComponent = SharedIconComponent;
9
9
  require("./index.compiled.css");
10
+ var React = _interopRequireWildcard(require("react"));
10
11
  var _runtime = require("@compiled/react/runtime");
11
- var _react = _interopRequireDefault(require("react"));
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
13
  var _compiled = require("@atlaskit/primitives/compiled");
14
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
15
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
16
  var styles = {
14
- labelStyles: "_1reo15vq _18m915vq _1bto1l2s _1bsb1osq"
17
+ labelStyles: "_1reo15vq _18m915vq _1bto1l2s _1bsb1osq",
18
+ iconStyles: "_p12f7vkz _1ul97vkz"
15
19
  };
16
20
  /**
17
21
  * Renders a icon and text label.
@@ -23,20 +27,21 @@ function SharedIconComponent(_ref) {
23
27
  label = _ref$label === void 0 ? '' : _ref$label,
24
28
  text = _ref.text,
25
29
  testId = _ref.testId;
26
- return /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
30
+ return /*#__PURE__*/React.createElement(_compiled.Flex, {
27
31
  gap: "space.100",
28
32
  alignItems: "center",
29
33
  testId: testId
30
- }, /*#__PURE__*/_react.default.createElement(_compiled.Inline, null, /*#__PURE__*/_react.default.createElement("img", {
34
+ }, /*#__PURE__*/React.createElement(_compiled.Inline, null, /*#__PURE__*/React.createElement("img", {
31
35
  src: iconUrl,
32
- alt: label
36
+ alt: label,
33
37
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
34
- ,
35
- style: {
38
+ style: (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-sllv') ? {} : {
36
39
  minWidth: '24px',
37
40
  maxWidth: '24px'
38
41
  } // having just width: '24px' shrinks it when table width is reduced
39
- })), text && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
42
+ ,
43
+ className: (0, _runtime.ax)([(0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-sllv') && styles.iconStyles])
44
+ })), text && /*#__PURE__*/React.createElement(_compiled.Box, {
40
45
  xcss: styles.labelStyles,
41
46
  testId: "".concat(testId, "-text")
42
47
  }, text));
@@ -1,4 +1,6 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  import React, { useMemo } from 'react';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
2
4
  import { Card } from '@atlaskit/smart-card';
3
5
  import { HoverCard } from '@atlaskit/smart-card/hover-card';
4
6
  import LinkUrl from '@atlaskit/smart-card/link-url';
@@ -23,18 +25,19 @@ const LinkRenderType = ({
23
25
  }, [style]);
24
26
  const anchor = useMemo(() => /*#__PURE__*/React.createElement(HoverCard, {
25
27
  url: url
26
- }, /*#__PURE__*/React.createElement(LinkUrl, {
28
+ }, /*#__PURE__*/React.createElement(LinkUrl, _extends({
27
29
  href: url
28
30
  // NOTE: This will no longer apply styles to `@atlaskit/link` when platform_editor_hyperlink_underline is enabled.
29
31
  // Wrap `@atlaskit/link` in a Text component to provide font styles to Link
30
32
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
31
- ,
33
+ }, fg('platform-linking-visual-refresh-sllv') ? {} : {
32
34
  style: {
33
35
  ...linkStyle
34
- },
36
+ }
37
+ }, {
35
38
  "data-testid": testId,
36
39
  target: "_blank"
37
- }, text || url)), [linkStyle, url, text, testId]);
40
+ }), text || url)), [linkStyle, url, text, testId]);
38
41
  const SmartCard = () => {
39
42
  const handleClick = e => {
40
43
  e.preventDefault();
@@ -1,4 +1,6 @@
1
1
  ._18m915vq{overflow-y:hidden}
2
2
  ._1bsb1osq{width:100%}
3
3
  ._1bto1l2s{text-overflow:ellipsis}
4
- ._1reo15vq{overflow-x:hidden}
4
+ ._1reo15vq{overflow-x:hidden}
5
+ ._1ul97vkz{min-width:1pc}
6
+ ._p12f7vkz{max-width:1pc}
@@ -1,10 +1,12 @@
1
1
  /* index.tsx generated by @compiled/babel-plugin v0.36.1 */
2
2
  import "./index.compiled.css";
3
+ import * as React from 'react';
3
4
  import { ax, ix } from "@compiled/react/runtime";
4
- import React from 'react';
5
+ import { fg } from '@atlaskit/platform-feature-flags';
5
6
  import { Box, Flex, Inline } from '@atlaskit/primitives/compiled';
6
7
  const styles = {
7
- labelStyles: "_1reo15vq _18m915vq _1bto1l2s _1bsb1osq"
8
+ labelStyles: "_1reo15vq _18m915vq _1bto1l2s _1bsb1osq",
9
+ iconStyles: "_p12f7vkz _1ul97vkz"
8
10
  };
9
11
  /**
10
12
  * Renders a icon and text label.
@@ -22,13 +24,14 @@ export function SharedIconComponent({
22
24
  testId: testId
23
25
  }, /*#__PURE__*/React.createElement(Inline, null, /*#__PURE__*/React.createElement("img", {
24
26
  src: iconUrl,
25
- alt: label
27
+ alt: label,
26
28
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
27
- ,
28
- style: {
29
+ style: fg('platform-linking-visual-refresh-sllv') ? {} : {
29
30
  minWidth: '24px',
30
31
  maxWidth: '24px'
31
32
  } // having just width: '24px' shrinks it when table width is reduced
33
+ ,
34
+ className: ax([fg('platform-linking-visual-refresh-sllv') && styles.iconStyles])
32
35
  })), text && /*#__PURE__*/React.createElement(Box, {
33
36
  xcss: styles.labelStyles,
34
37
  testId: `${testId}-text`
@@ -1,7 +1,9 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
5
  import React, { useMemo } from 'react';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
5
7
  import { Card } from '@atlaskit/smart-card';
6
8
  import { HoverCard } from '@atlaskit/smart-card/hover-card';
7
9
  import LinkUrl from '@atlaskit/smart-card/link-url';
@@ -27,16 +29,17 @@ var LinkRenderType = function LinkRenderType(_ref) {
27
29
  var anchor = useMemo(function () {
28
30
  return /*#__PURE__*/React.createElement(HoverCard, {
29
31
  url: url
30
- }, /*#__PURE__*/React.createElement(LinkUrl, {
32
+ }, /*#__PURE__*/React.createElement(LinkUrl, _extends({
31
33
  href: url
32
34
  // NOTE: This will no longer apply styles to `@atlaskit/link` when platform_editor_hyperlink_underline is enabled.
33
35
  // Wrap `@atlaskit/link` in a Text component to provide font styles to Link
34
36
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
35
- ,
36
- style: _objectSpread({}, linkStyle),
37
+ }, fg('platform-linking-visual-refresh-sllv') ? {} : {
38
+ style: _objectSpread({}, linkStyle)
39
+ }, {
37
40
  "data-testid": testId,
38
41
  target: "_blank"
39
- }, text || url));
42
+ }), text || url));
40
43
  }, [linkStyle, url, text, testId]);
41
44
  var SmartCard = function SmartCard() {
42
45
  var handleClick = function handleClick(e) {
@@ -1,4 +1,6 @@
1
1
  ._18m915vq{overflow-y:hidden}
2
2
  ._1bsb1osq{width:100%}
3
3
  ._1bto1l2s{text-overflow:ellipsis}
4
- ._1reo15vq{overflow-x:hidden}
4
+ ._1reo15vq{overflow-x:hidden}
5
+ ._1ul97vkz{min-width:1pc}
6
+ ._p12f7vkz{max-width:1pc}
@@ -1,10 +1,12 @@
1
1
  /* index.tsx generated by @compiled/babel-plugin v0.36.1 */
2
2
  import "./index.compiled.css";
3
+ import * as React from 'react';
3
4
  import { ax, ix } from "@compiled/react/runtime";
4
- import React from 'react';
5
+ import { fg } from '@atlaskit/platform-feature-flags';
5
6
  import { Box, Flex, Inline } from '@atlaskit/primitives/compiled';
6
7
  var styles = {
7
- labelStyles: "_1reo15vq _18m915vq _1bto1l2s _1bsb1osq"
8
+ labelStyles: "_1reo15vq _18m915vq _1bto1l2s _1bsb1osq",
9
+ iconStyles: "_p12f7vkz _1ul97vkz"
8
10
  };
9
11
  /**
10
12
  * Renders a icon and text label.
@@ -22,13 +24,14 @@ export function SharedIconComponent(_ref) {
22
24
  testId: testId
23
25
  }, /*#__PURE__*/React.createElement(Inline, null, /*#__PURE__*/React.createElement("img", {
24
26
  src: iconUrl,
25
- alt: label
27
+ alt: label,
26
28
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
27
- ,
28
- style: {
29
+ style: fg('platform-linking-visual-refresh-sllv') ? {} : {
29
30
  minWidth: '24px',
30
31
  maxWidth: '24px'
31
32
  } // having just width: '24px' shrinks it when table width is reduced
33
+ ,
34
+ className: ax([fg('platform-linking-visual-refresh-sllv') && styles.iconStyles])
32
35
  })), text && /*#__PURE__*/React.createElement(Box, {
33
36
  xcss: styles.labelStyles,
34
37
  testId: "".concat(testId, "-text")
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  interface SharedIconComponentProps {
3
3
  /**
4
4
  * URL or SVG for the priority icon
@@ -19,5 +19,5 @@ interface SharedIconComponentProps {
19
19
  * Renders a icon and text label.
20
20
  * If the text is undefined, will not render the text label.
21
21
  */
22
- export declare function SharedIconComponent({ iconUrl, label, text, testId, }: SharedIconComponentProps): React.JSX.Element;
22
+ export declare function SharedIconComponent({ iconUrl, label, text, testId, }: SharedIconComponentProps): JSX.Element;
23
23
  export {};
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  interface SharedIconComponentProps {
3
3
  /**
4
4
  * URL or SVG for the priority icon
@@ -19,5 +19,5 @@ interface SharedIconComponentProps {
19
19
  * Renders a icon and text label.
20
20
  * If the text is undefined, will not render the text label.
21
21
  */
22
- export declare function SharedIconComponent({ iconUrl, label, text, testId, }: SharedIconComponentProps): React.JSX.Element;
22
+ export declare function SharedIconComponent({ iconUrl, label, text, testId, }: SharedIconComponentProps): JSX.Element;
23
23
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "4.1.12",
3
+ "version": "4.1.13",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",