@atlaskit/smart-card 26.48.1 → 26.48.2

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,11 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 26.48.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 26.48.1
4
10
 
5
11
  ### Patch Changes
@@ -22,7 +22,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
22
22
  var context = exports.context = {
23
23
  componentName: 'smart-cards',
24
24
  packageName: "@atlaskit/smart-card",
25
- packageVersion: "26.48.1"
25
+ packageVersion: "26.48.2"
26
26
  };
27
27
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
28
28
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -8,7 +8,6 @@ exports.default = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
12
11
  var _react = require("react");
13
12
  var _reactIntlNext = require("react-intl-next");
14
13
  var _react2 = require("@emotion/react");
@@ -25,9 +24,17 @@ var _actionGroupItem = _interopRequireDefault(require("./action-group-item"));
25
24
  var _utils2 = require("../utils");
26
25
  var _reactMagneticDi = require("react-magnetic-di");
27
26
  var _excluded = ["triggerRef"];
28
- var _templateObject;
29
27
  /** @jsx jsx */
30
- var styles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n line-height: 1rem;\n > div {\n align-items: center;\n button:focus-visible {\n // AK button removes the default browser outline on focus and apply\n // box-shadow styling to create the outline appearance.\n // Due to our container elements (Container/Block/ElementGroup) has\n // overflow hidden to prevent the metadata element from leaking outside\n // of its container, the box-shadow doesn't show properly.\n // Invert the AK box-shadow styling.\n outline-offset: -2px;\n }\n }\n"])));
28
+ var styles = (0, _react2.css)({
29
+ display: 'inline-flex',
30
+ lineHeight: '1rem',
31
+ '> div': {
32
+ alignItems: 'center',
33
+ 'button:focus-visible': {
34
+ outlineOffset: '-2px'
35
+ }
36
+ }
37
+ });
31
38
  var renderActionItems = function renderActionItems() {
32
39
  var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
33
40
  var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _constants.SmartLinkSize.Medium;
@@ -9,7 +9,6 @@ exports.default = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
11
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
12
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
12
  var _react = _interopRequireWildcard(require("react"));
14
13
  var _react2 = require("@emotion/react");
15
14
  var _useLinkClicked = require("../../../../../state/analytics/useLinkClicked");
@@ -20,12 +19,18 @@ var _resolving = _interopRequireDefault(require("./resolving"));
20
19
  var _actionGroup = _interopRequireDefault(require("../action-group"));
21
20
  var _elements = require("../../elements");
22
21
  var _excluded = ["actions", "anchorTarget", "hideTitleTooltip", "maxLines", "onActionMenuOpenChange", "onClick", "overrideCss", "status", "showActionOnHover", "testId", "text", "theme", "hideRetry", "metadataPosition", "hideIcon"];
23
- var _templateObject, _templateObject2;
24
22
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
23
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
26
24
  var getActionStyles = function getActionStyles(showOnHover, isOpen) {
27
25
  if (showOnHover && !isOpen) {
28
- return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .actions-button-group {\n opacity: 0;\n }\n\n &:hover .actions-button-group,\n .actions-button-group:focus-within {\n opacity: 1;\n }\n "])));
26
+ return (0, _react2.css)({
27
+ '.actions-button-group': {
28
+ opacity: 0
29
+ },
30
+ '&:hover .actions-button-group, .actions-button-group:focus-within': {
31
+ opacity: 1
32
+ }
33
+ });
29
34
  }
30
35
  };
31
36
  var getTitleBlockViewComponent = function getTitleBlockViewComponent(status) {
@@ -99,7 +104,7 @@ var TitleBlock = function TitleBlock(_ref) {
99
104
  onDropdownOpenChange: onDropdownOpenChange
100
105
  });
101
106
  var actionStyles = getActionStyles(showActionOnHover, actionDropdownOpen);
102
- var combinedCss = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", " ", "\n "])), actionStyles, overrideCss);
107
+ var combinedCss = (0, _react2.css)(actionStyles, overrideCss);
103
108
  var overrideText = !!text ? {
104
109
  text: text
105
110
  } : {};
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
17
17
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
18
18
  var PACKAGE_DATA = {
19
19
  packageName: "@atlaskit/smart-card",
20
- packageVersion: "26.48.1",
20
+ packageVersion: "26.48.2",
21
21
  componentName: 'linkUrl'
22
22
  };
23
23
  var Link = (0, _click.withLinkClickedEvent)('a');
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
4
4
  export const context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card",
7
- packageVersion: "26.48.1"
7
+ packageVersion: "26.48.2"
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -15,22 +15,16 @@ import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../..
15
15
  import ActionGroupItem from './action-group-item';
16
16
  import { filterActionItems } from '../utils';
17
17
  import { di } from 'react-magnetic-di';
18
- const styles = css`
19
- display: inline-flex;
20
- line-height: 1rem;
21
- > div {
22
- align-items: center;
23
- button:focus-visible {
24
- // AK button removes the default browser outline on focus and apply
25
- // box-shadow styling to create the outline appearance.
26
- // Due to our container elements (Container/Block/ElementGroup) has
27
- // overflow hidden to prevent the metadata element from leaking outside
28
- // of its container, the box-shadow doesn't show properly.
29
- // Invert the AK box-shadow styling.
30
- outline-offset: -2px;
18
+ const styles = css({
19
+ display: 'inline-flex',
20
+ lineHeight: '1rem',
21
+ '> div': {
22
+ alignItems: 'center',
23
+ 'button:focus-visible': {
24
+ outlineOffset: '-2px'
31
25
  }
32
26
  }
33
- `;
27
+ });
34
28
  const renderActionItems = (items = [], size = SmartLinkSize.Medium, appearance, asDropDownItems, onActionItemClick) => items.map((item, idx) => jsx(ActionGroupItem, {
35
29
  item: item,
36
30
  key: idx,
@@ -10,16 +10,14 @@ import ActionGroup from '../action-group';
10
10
  import { Title } from '../../elements';
11
11
  const getActionStyles = (showOnHover, isOpen) => {
12
12
  if (showOnHover && !isOpen) {
13
- return css`
14
- .actions-button-group {
15
- opacity: 0;
13
+ return css({
14
+ '.actions-button-group': {
15
+ opacity: 0
16
+ },
17
+ '&:hover .actions-button-group, .actions-button-group:focus-within': {
18
+ opacity: 1
16
19
  }
17
-
18
- &:hover .actions-button-group,
19
- .actions-button-group:focus-within {
20
- opacity: 1;
21
- }
22
- `;
20
+ });
23
21
  }
24
22
  };
25
23
  const getTitleBlockViewComponent = status => {
@@ -87,9 +85,7 @@ const TitleBlock = ({
87
85
  onDropdownOpenChange: onDropdownOpenChange
88
86
  });
89
87
  const actionStyles = getActionStyles(showActionOnHover, actionDropdownOpen);
90
- const combinedCss = css`
91
- ${actionStyles} ${overrideCss}
92
- `;
88
+ const combinedCss = css(actionStyles, overrideCss);
93
89
  const overrideText = !!text ? {
94
90
  text
95
91
  } : {};
@@ -7,7 +7,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
7
7
  import LinkWarningModal from './LinkWarningModal';
8
8
  const PACKAGE_DATA = {
9
9
  packageName: "@atlaskit/smart-card",
10
- packageVersion: "26.48.1",
10
+ packageVersion: "26.48.2",
11
11
  componentName: 'linkUrl'
12
12
  };
13
13
  const Link = withLinkClickedEvent('a');
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
15
15
  export var context = {
16
16
  componentName: 'smart-cards',
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "26.48.1"
18
+ packageVersion: "26.48.2"
19
19
  };
20
20
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
21
21
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,9 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
5
4
  var _excluded = ["triggerRef"];
6
- var _templateObject;
7
5
  /** @jsx jsx */
8
6
  import { useCallback, useMemo, useState } from 'react';
9
7
  import { FormattedMessage } from 'react-intl-next';
@@ -20,7 +18,16 @@ import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../..
20
18
  import ActionGroupItem from './action-group-item';
21
19
  import { filterActionItems } from '../utils';
22
20
  import { di } from 'react-magnetic-di';
23
- var styles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-flex;\n line-height: 1rem;\n > div {\n align-items: center;\n button:focus-visible {\n // AK button removes the default browser outline on focus and apply\n // box-shadow styling to create the outline appearance.\n // Due to our container elements (Container/Block/ElementGroup) has\n // overflow hidden to prevent the metadata element from leaking outside\n // of its container, the box-shadow doesn't show properly.\n // Invert the AK box-shadow styling.\n outline-offset: -2px;\n }\n }\n"])));
21
+ var styles = css({
22
+ display: 'inline-flex',
23
+ lineHeight: '1rem',
24
+ '> div': {
25
+ alignItems: 'center',
26
+ 'button:focus-visible': {
27
+ outlineOffset: '-2px'
28
+ }
29
+ }
30
+ });
24
31
  var renderActionItems = function renderActionItems() {
25
32
  var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
26
33
  var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : SmartLinkSize.Medium;
@@ -1,9 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
5
4
  var _excluded = ["actions", "anchorTarget", "hideTitleTooltip", "maxLines", "onActionMenuOpenChange", "onClick", "overrideCss", "status", "showActionOnHover", "testId", "text", "theme", "hideRetry", "metadataPosition", "hideIcon"];
6
- var _templateObject, _templateObject2;
7
5
  import React, { useCallback, useState } from 'react';
8
6
  import { css } from '@emotion/react';
9
7
  import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
@@ -15,7 +13,14 @@ import ActionGroup from '../action-group';
15
13
  import { Title } from '../../elements';
16
14
  var getActionStyles = function getActionStyles(showOnHover, isOpen) {
17
15
  if (showOnHover && !isOpen) {
18
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .actions-button-group {\n opacity: 0;\n }\n\n &:hover .actions-button-group,\n .actions-button-group:focus-within {\n opacity: 1;\n }\n "])));
16
+ return css({
17
+ '.actions-button-group': {
18
+ opacity: 0
19
+ },
20
+ '&:hover .actions-button-group, .actions-button-group:focus-within': {
21
+ opacity: 1
22
+ }
23
+ });
19
24
  }
20
25
  };
21
26
  var getTitleBlockViewComponent = function getTitleBlockViewComponent(status) {
@@ -89,7 +94,7 @@ var TitleBlock = function TitleBlock(_ref) {
89
94
  onDropdownOpenChange: onDropdownOpenChange
90
95
  });
91
96
  var actionStyles = getActionStyles(showActionOnHover, actionDropdownOpen);
92
- var combinedCss = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", " ", "\n "])), actionStyles, overrideCss);
97
+ var combinedCss = css(actionStyles, overrideCss);
93
98
  var overrideText = !!text ? {
94
99
  text: text
95
100
  } : {};
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
10
10
  import LinkWarningModal from './LinkWarningModal';
11
11
  var PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "26.48.1",
13
+ packageVersion: "26.48.2",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  var Link = withLinkClickedEvent('a');
@@ -2,5 +2,5 @@ import { JsonLd } from 'json-ld-types';
2
2
  export type RelatedUrlsResponse = {
3
3
  resolvedResults?: JsonLd.Response[];
4
4
  };
5
- declare const useRelatedUrls: () => (url: any) => Promise<RelatedUrlsResponse>;
5
+ declare const useRelatedUrls: () => (url: string) => Promise<RelatedUrlsResponse>;
6
6
  export default useRelatedUrls;
@@ -2,5 +2,5 @@ import { JsonLd } from 'json-ld-types';
2
2
  export type RelatedUrlsResponse = {
3
3
  resolvedResults?: JsonLd.Response[];
4
4
  };
5
- declare const useRelatedUrls: () => (url: any) => Promise<RelatedUrlsResponse>;
5
+ declare const useRelatedUrls: () => (url: string) => Promise<RelatedUrlsResponse>;
6
6
  export default useRelatedUrls;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.48.1",
3
+ "version": "26.48.2",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,7 +30,7 @@
30
30
  "@atlaskit/avatar": "^21.5.0",
31
31
  "@atlaskit/avatar-group": "^9.5.0",
32
32
  "@atlaskit/badge": "^15.2.0",
33
- "@atlaskit/button": "^17.4.0",
33
+ "@atlaskit/button": "^17.6.0",
34
34
  "@atlaskit/dropdown-menu": "^12.5.0",
35
35
  "@atlaskit/icon": "^22.1.0",
36
36
  "@atlaskit/icon-file-type": "^6.4.0",
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/outbound-auth-flow-client": "^3.4.0",
49
49
  "@atlaskit/platform-feature-flags": "^0.2.1",
50
50
  "@atlaskit/popup": "^1.12.0",
51
- "@atlaskit/primitives": "^2.1.0",
51
+ "@atlaskit/primitives": "^3.0.0",
52
52
  "@atlaskit/spinner": "^16.0.0",
53
53
  "@atlaskit/theme": "^12.6.0",
54
54
  "@atlaskit/tokens": "^1.38.0",