@atlaskit/smart-card 35.2.0 → 35.2.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/utils/analytics/analytics.js +1 -1
  3. package/dist/cjs/view/BlockCard/views/utils/index.js +2 -1
  4. package/dist/cjs/view/EmbedCard/components/ExpandedFrame.compiled.css +3 -0
  5. package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +3 -3
  6. package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +9 -1
  7. package/dist/cjs/view/HoverCard/styled.js +1 -0
  8. package/dist/cjs/view/LinkUrl/index.js +1 -1
  9. package/dist/es2019/utils/analytics/analytics.js +1 -1
  10. package/dist/es2019/view/BlockCard/views/utils/index.js +2 -1
  11. package/dist/es2019/view/EmbedCard/components/ExpandedFrame.compiled.css +3 -0
  12. package/dist/es2019/view/EmbedCard/components/ExpandedFrame.js +3 -3
  13. package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +9 -1
  14. package/dist/es2019/view/HoverCard/styled.js +1 -0
  15. package/dist/es2019/view/LinkUrl/index.js +1 -1
  16. package/dist/esm/utils/analytics/analytics.js +1 -1
  17. package/dist/esm/view/BlockCard/views/utils/index.js +2 -1
  18. package/dist/esm/view/EmbedCard/components/ExpandedFrame.compiled.css +3 -0
  19. package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +3 -3
  20. package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +9 -1
  21. package/dist/esm/view/HoverCard/styled.js +1 -0
  22. package/dist/esm/view/LinkUrl/index.js +1 -1
  23. package/dist/types/state/flexible-ui-context/index.d.ts +4 -4
  24. package/dist/types/view/BlockCard/views/utils/index.d.ts +2 -2
  25. package/dist/types/view/FlexibleCard/types.d.ts +5 -2
  26. package/dist/types/view/HoverCard/styled.d.ts +2 -2
  27. package/dist/types-ts4.5/state/flexible-ui-context/index.d.ts +4 -4
  28. package/dist/types-ts4.5/view/BlockCard/views/utils/index.d.ts +2 -2
  29. package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +5 -2
  30. package/dist/types-ts4.5/view/HoverCard/styled.d.ts +2 -2
  31. package/package.json +8 -8
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 35.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#123971](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/123971)
8
+ [`eb093d08675da`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/eb093d08675da) -
9
+ [ux] Use new ADS button only on block card and hover card
10
+
11
+ ## 35.2.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [#123000](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/123000)
16
+ [`3caca201fd851`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3caca201fd851) -
17
+ [ux] Update embed card title to truncate
18
+ - Updated dependencies
19
+
3
20
  ## 35.2.0
4
21
 
5
22
  ### Minor Changes
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
11
11
  var context = exports.context = {
12
12
  componentName: 'smart-cards',
13
13
  packageName: "@atlaskit/smart-card",
14
- packageVersion: "35.2.0"
14
+ packageVersion: "35.2.2"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -140,7 +140,8 @@ var getSimulatedBetterMetadata = exports.getSimulatedBetterMetadata = function g
140
140
  }
141
141
  };
142
142
  var FlexibleCardUiOptions = exports.FlexibleCardUiOptions = {
143
- hideElevation: true
143
+ hideElevation: true,
144
+ hideLegacyButton: true
144
145
  };
145
146
  var titleBlockOptions = exports.titleBlockOptions = {
146
147
  anchorTarget: '_self',
@@ -17,7 +17,9 @@
17
17
  ._19doidpf:after{left:0}
18
18
  ._1bqqidpf:after{z-index:0}
19
19
  ._1bsb7vkz{width:1pc}
20
+ ._1bto1l2s{text-overflow:ellipsis}
20
21
  ._1e0c1txw{display:flex}
22
+ ._1e0c1ule{display:block}
21
23
  ._1hfk1j28:after{background-color:transparent}
22
24
  ._1hfkhp5a:after{background-color:var(--ds-surface-raised,#fff)}
23
25
  ._1ifiidpf .embed-header{opacity:0}
@@ -40,6 +42,7 @@
40
42
  ._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
41
43
  ._kqswh2mm{position:relative}
42
44
  ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
45
+ ._o5721q9c{white-space:nowrap}
43
46
  ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
44
47
  ._u94kidpf:after{flex-grow:0}
45
48
  ._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
@@ -176,10 +176,10 @@ var styles = {
176
176
  linkWrapperSelected: "_8x3u92p9",
177
177
  linkWrapperBorderAndBackground: "_1tqzzgxb _1hfkhp5a _1ifikb7n",
178
178
  linkWrapperInteractiveNotHidden: "_hcgvzgxb _4tpuhp5a _x148kb7n",
179
- header: "_zulp1b66 _1e0c1txw _4cvr1h6o _4t3igktf _1pbykb7n",
179
+ header: "_11c8140y _zulp1b66 _1e0c1txw _4cvr1h6o _4t3igktf _1pbykb7n",
180
180
  tooltipWrapper: "_1reo15vq _18m915vq",
181
- headerAnchor: "_11c8140y _9oik1r31 _1bnxglyw _jf4cnqa1",
182
- headerIcon: "_1bsb7vkz _4t3i7vkz",
181
+ headerAnchor: "_11c8140y _1reo15vq _18m915vq _1e0c1ule _1bto1l2s _o5721q9c _9oik1r31 _1bnxglyw _jf4cnqa1",
182
+ headerIcon: "_11c8140y _1bsb7vkz _4t3i7vkz",
183
183
  contentStyle: "_19it1pvm _2rko1y44 _1reo15vq _18m915vq _v56414au _bfhkhp5a _16jlkb7n _4t3i1osq _1pbykb7n",
184
184
  contentInteractiveActiveBorder: "_1jhm1ips",
185
185
  contentOverflowAuto: "_1reo1wug _18m91wug"
@@ -16,6 +16,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
16
  var _compiled = require("@atlaskit/primitives/compiled");
17
17
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
18
18
  var _constants = require("../../../../../../constants");
19
+ var _flexibleUiContext = require("../../../../../../state/flexible-ui-context");
19
20
  var _withOverrideCss = require("../../../common/with-override-css");
20
21
  var _utils = require("../../../utils");
21
22
  var _ActionButtonOld = _interopRequireDefault(require("./ActionButtonOld"));
@@ -194,9 +195,16 @@ var ActionButtonNew = function ActionButtonNew(_ref2) {
194
195
  "aria-label": ariaLabel
195
196
  }, content)));
196
197
  };
198
+ var ActionButtonHideLegacyButton = function ActionButtonHideLegacyButton(props) {
199
+ var ui = (0, _flexibleUiContext.useFlexibleUiOptionContext)();
200
+ if (ui !== null && ui !== void 0 && ui.hideLegacyButton) {
201
+ return /*#__PURE__*/_react.default.createElement(ActionButtonRefreshNewWithOverrideCss, props);
202
+ }
203
+ return /*#__PURE__*/_react.default.createElement(ActionButtonNew, props);
204
+ };
197
205
  var ActionButton = function ActionButton(props) {
198
206
  if ((0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard')) {
199
- return (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? /*#__PURE__*/_react.default.createElement(ActionButtonRefreshNewWithOverrideCss, props) : /*#__PURE__*/_react.default.createElement(ActionButtonNew, props);
207
+ return (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? /*#__PURE__*/_react.default.createElement(ActionButtonHideLegacyButton, props) : /*#__PURE__*/_react.default.createElement(ActionButtonNew, props);
200
208
  }
201
209
  return /*#__PURE__*/_react.default.createElement(_ActionButtonOld.default, props);
202
210
  };
@@ -16,6 +16,7 @@ var HOVER_CARD_Z_INDEX = exports.HOVER_CARD_Z_INDEX = _constants.layers.modal();
16
16
  var flexibleUiOptions = exports.flexibleUiOptions = {
17
17
  hideBackground: true,
18
18
  hideElevation: true,
19
+ hideLegacyButton: true,
19
20
  size: _constants2.SmartLinkSize.Medium,
20
21
  zIndex: HOVER_CARD_Z_INDEX + 1
21
22
  };
@@ -20,7 +20,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
20
20
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
21
21
  var PACKAGE_DATA = {
22
22
  packageName: "@atlaskit/smart-card",
23
- packageVersion: "35.2.0",
23
+ packageVersion: "35.2.2",
24
24
  componentName: 'linkUrl'
25
25
  };
26
26
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
2
2
  export const context = {
3
3
  componentName: 'smart-cards',
4
4
  packageName: "@atlaskit/smart-card",
5
- packageVersion: "35.2.0"
5
+ packageVersion: "35.2.2"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -134,7 +134,8 @@ export const getSimulatedBetterMetadata = cardDetails => {
134
134
  }
135
135
  };
136
136
  export const FlexibleCardUiOptions = {
137
- hideElevation: true
137
+ hideElevation: true,
138
+ hideLegacyButton: true
138
139
  };
139
140
  export const titleBlockOptions = {
140
141
  anchorTarget: '_self',
@@ -17,7 +17,9 @@
17
17
  ._19doidpf:after{left:0}
18
18
  ._1bqqidpf:after{z-index:0}
19
19
  ._1bsb7vkz{width:1pc}
20
+ ._1bto1l2s{text-overflow:ellipsis}
20
21
  ._1e0c1txw{display:flex}
22
+ ._1e0c1ule{display:block}
21
23
  ._1hfk1j28:after{background-color:transparent}
22
24
  ._1hfkhp5a:after{background-color:var(--ds-surface-raised,#fff)}
23
25
  ._1ifiidpf .embed-header{opacity:0}
@@ -40,6 +42,7 @@
40
42
  ._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
41
43
  ._kqswh2mm{position:relative}
42
44
  ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
45
+ ._o5721q9c{white-space:nowrap}
43
46
  ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
44
47
  ._u94kidpf:after{flex-grow:0}
45
48
  ._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
@@ -158,10 +158,10 @@ const styles = {
158
158
  linkWrapperSelected: "_8x3u92p9",
159
159
  linkWrapperBorderAndBackground: "_1tqzzgxb _1hfkhp5a _1ifikb7n",
160
160
  linkWrapperInteractiveNotHidden: "_hcgvzgxb _4tpuhp5a _x148kb7n",
161
- header: "_zulp1b66 _1e0c1txw _4cvr1h6o _4t3igktf _1pbykb7n",
161
+ header: "_11c8140y _zulp1b66 _1e0c1txw _4cvr1h6o _4t3igktf _1pbykb7n",
162
162
  tooltipWrapper: "_1reo15vq _18m915vq",
163
- headerAnchor: "_11c8140y _9oik1r31 _1bnxglyw _jf4cnqa1",
164
- headerIcon: "_1bsb7vkz _4t3i7vkz",
163
+ headerAnchor: "_11c8140y _1reo15vq _18m915vq _1e0c1ule _1bto1l2s _o5721q9c _9oik1r31 _1bnxglyw _jf4cnqa1",
164
+ headerIcon: "_11c8140y _1bsb7vkz _4t3i7vkz",
165
165
  contentStyle: "_19it1pvm _2rko1y44 _1reo15vq _18m915vq _v56414au _bfhkhp5a _16jlkb7n _4t3i1osq _1pbykb7n",
166
166
  contentInteractiveActiveBorder: "_1jhm1ips",
167
167
  contentOverflowAuto: "_1reo1wug _18m91wug"
@@ -8,6 +8,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
8
8
  import { Box } from '@atlaskit/primitives/compiled';
9
9
  import Tooltip from '@atlaskit/tooltip';
10
10
  import { SmartLinkSize } from '../../../../../../constants';
11
+ import { useFlexibleUiOptionContext } from '../../../../../../state/flexible-ui-context';
11
12
  import { withOverrideCss } from '../../../common/with-override-css';
12
13
  import { sizeToButtonSpacing } from '../../../utils';
13
14
  import ActionButtonOld from './ActionButtonOld';
@@ -174,9 +175,16 @@ const ActionButtonNew = ({
174
175
  "aria-label": ariaLabel
175
176
  }, content)));
176
177
  };
178
+ const ActionButtonHideLegacyButton = props => {
179
+ const ui = useFlexibleUiOptionContext();
180
+ if (ui !== null && ui !== void 0 && ui.hideLegacyButton) {
181
+ return /*#__PURE__*/React.createElement(ActionButtonRefreshNewWithOverrideCss, props);
182
+ }
183
+ return /*#__PURE__*/React.createElement(ActionButtonNew, props);
184
+ };
177
185
  const ActionButton = props => {
178
186
  if (fg('bandicoots-compiled-migration-smartcard')) {
179
- return fg('platform-linking-visual-refresh-v1') ? /*#__PURE__*/React.createElement(ActionButtonRefreshNewWithOverrideCss, props) : /*#__PURE__*/React.createElement(ActionButtonNew, props);
187
+ return fg('platform-linking-visual-refresh-v1') ? /*#__PURE__*/React.createElement(ActionButtonHideLegacyButton, props) : /*#__PURE__*/React.createElement(ActionButtonNew, props);
180
188
  }
181
189
  return /*#__PURE__*/React.createElement(ActionButtonOld, props);
182
190
  };
@@ -8,6 +8,7 @@ export const HOVER_CARD_Z_INDEX = layers.modal();
8
8
  export const flexibleUiOptions = {
9
9
  hideBackground: true,
10
10
  hideElevation: true,
11
+ hideLegacyButton: true,
11
12
  size: SmartLinkSize.Medium,
12
13
  zIndex: HOVER_CARD_Z_INDEX + 1
13
14
  };
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
10
10
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
11
11
  const PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "35.2.0",
13
+ packageVersion: "35.2.2",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  const Anchor = withLinkClickedEvent('a');
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
4
4
  export var context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card",
7
- packageVersion: "35.2.0"
7
+ packageVersion: "35.2.2"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -134,7 +134,8 @@ export var getSimulatedBetterMetadata = function getSimulatedBetterMetadata(card
134
134
  }
135
135
  };
136
136
  export var FlexibleCardUiOptions = {
137
- hideElevation: true
137
+ hideElevation: true,
138
+ hideLegacyButton: true
138
139
  };
139
140
  export var titleBlockOptions = {
140
141
  anchorTarget: '_self',
@@ -17,7 +17,9 @@
17
17
  ._19doidpf:after{left:0}
18
18
  ._1bqqidpf:after{z-index:0}
19
19
  ._1bsb7vkz{width:1pc}
20
+ ._1bto1l2s{text-overflow:ellipsis}
20
21
  ._1e0c1txw{display:flex}
22
+ ._1e0c1ule{display:block}
21
23
  ._1hfk1j28:after{background-color:transparent}
22
24
  ._1hfkhp5a:after{background-color:var(--ds-surface-raised,#fff)}
23
25
  ._1ifiidpf .embed-header{opacity:0}
@@ -40,6 +42,7 @@
40
42
  ._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
41
43
  ._kqswh2mm{position:relative}
42
44
  ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
45
+ ._o5721q9c{white-space:nowrap}
43
46
  ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
44
47
  ._u94kidpf:after{flex-grow:0}
45
48
  ._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
@@ -166,10 +166,10 @@ var styles = {
166
166
  linkWrapperSelected: "_8x3u92p9",
167
167
  linkWrapperBorderAndBackground: "_1tqzzgxb _1hfkhp5a _1ifikb7n",
168
168
  linkWrapperInteractiveNotHidden: "_hcgvzgxb _4tpuhp5a _x148kb7n",
169
- header: "_zulp1b66 _1e0c1txw _4cvr1h6o _4t3igktf _1pbykb7n",
169
+ header: "_11c8140y _zulp1b66 _1e0c1txw _4cvr1h6o _4t3igktf _1pbykb7n",
170
170
  tooltipWrapper: "_1reo15vq _18m915vq",
171
- headerAnchor: "_11c8140y _9oik1r31 _1bnxglyw _jf4cnqa1",
172
- headerIcon: "_1bsb7vkz _4t3i7vkz",
171
+ headerAnchor: "_11c8140y _1reo15vq _18m915vq _1e0c1ule _1bto1l2s _o5721q9c _9oik1r31 _1bnxglyw _jf4cnqa1",
172
+ headerIcon: "_11c8140y _1bsb7vkz _4t3i7vkz",
173
173
  contentStyle: "_19it1pvm _2rko1y44 _1reo15vq _18m915vq _v56414au _bfhkhp5a _16jlkb7n _4t3i1osq _1pbykb7n",
174
174
  contentInteractiveActiveBorder: "_1jhm1ips",
175
175
  contentOverflowAuto: "_1reo1wug _18m91wug"
@@ -8,6 +8,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
8
8
  import { Box } from '@atlaskit/primitives/compiled';
9
9
  import Tooltip from '@atlaskit/tooltip';
10
10
  import { SmartLinkSize } from '../../../../../../constants';
11
+ import { useFlexibleUiOptionContext } from '../../../../../../state/flexible-ui-context';
11
12
  import { withOverrideCss } from '../../../common/with-override-css';
12
13
  import { sizeToButtonSpacing } from '../../../utils';
13
14
  import ActionButtonOld from './ActionButtonOld';
@@ -184,9 +185,16 @@ var ActionButtonNew = function ActionButtonNew(_ref2) {
184
185
  "aria-label": ariaLabel
185
186
  }, content)));
186
187
  };
188
+ var ActionButtonHideLegacyButton = function ActionButtonHideLegacyButton(props) {
189
+ var ui = useFlexibleUiOptionContext();
190
+ if (ui !== null && ui !== void 0 && ui.hideLegacyButton) {
191
+ return /*#__PURE__*/React.createElement(ActionButtonRefreshNewWithOverrideCss, props);
192
+ }
193
+ return /*#__PURE__*/React.createElement(ActionButtonNew, props);
194
+ };
187
195
  var ActionButton = function ActionButton(props) {
188
196
  if (fg('bandicoots-compiled-migration-smartcard')) {
189
- return fg('platform-linking-visual-refresh-v1') ? /*#__PURE__*/React.createElement(ActionButtonRefreshNewWithOverrideCss, props) : /*#__PURE__*/React.createElement(ActionButtonNew, props);
197
+ return fg('platform-linking-visual-refresh-v1') ? /*#__PURE__*/React.createElement(ActionButtonHideLegacyButton, props) : /*#__PURE__*/React.createElement(ActionButtonNew, props);
190
198
  }
191
199
  return /*#__PURE__*/React.createElement(ActionButtonOld, props);
192
200
  };
@@ -10,6 +10,7 @@ export var HOVER_CARD_Z_INDEX = layers.modal();
10
10
  export var flexibleUiOptions = {
11
11
  hideBackground: true,
12
12
  hideElevation: true,
13
+ hideLegacyButton: true,
13
14
  size: SmartLinkSize.Medium,
14
15
  zIndex: HOVER_CARD_Z_INDEX + 1
15
16
  };
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
13
13
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
14
14
  var PACKAGE_DATA = {
15
15
  packageName: "@atlaskit/smart-card",
16
- packageVersion: "35.2.0",
16
+ packageVersion: "35.2.2",
17
17
  componentName: 'linkUrl'
18
18
  };
19
19
  var Anchor = withLinkClickedEvent('a');
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { type FlexibleUiOptions } from '../../view/FlexibleCard/types';
3
- import type { FlexibleUiDataContext } from './types';
2
+ import { type InternalFlexibleUiOptions } from '../../view/FlexibleCard/types';
3
+ import { type FlexibleUiDataContext } from './types';
4
4
  /**
5
5
  * This provides the data that will be used by Smart Links Flexible UI to populate it's
6
6
  * underlying elements.
@@ -11,5 +11,5 @@ export declare const useFlexibleUiContext: () => FlexibleUiDataContext | undefin
11
11
  * This provides the ui options that will be used by Smart Links Flexible UI
12
12
  * to render its underlying elements.
13
13
  */
14
- export declare const FlexibleUiOptionContext: import("react").Context<FlexibleUiOptions | undefined>;
15
- export declare const useFlexibleUiOptionContext: () => FlexibleUiOptions | undefined;
14
+ export declare const FlexibleUiOptionContext: import("react").Context<InternalFlexibleUiOptions | undefined>;
15
+ export declare const useFlexibleUiOptionContext: () => InternalFlexibleUiOptions | undefined;
@@ -3,14 +3,14 @@ import type { FooterBlockProps } from '../../../FlexibleCard/components/blocks/f
3
3
  import type { PreviewBlockProps } from '../../../FlexibleCard/components/blocks/preview-block/types';
4
4
  import type { TitleBlockProps } from '../../../FlexibleCard/components/blocks/title-block/types';
5
5
  import type { ElementItem } from '../../../FlexibleCard/components/blocks/types';
6
- import type { FlexibleUiOptions } from '../../../FlexibleCard/types';
6
+ import { type InternalFlexibleUiOptions } from '../../../FlexibleCard/types';
7
7
  export declare const getSimulatedBetterMetadata: (cardDetails?: JsonLd.Response) => SimulatedMetadata;
8
8
  type SimulatedMetadata = {
9
9
  titleMetadata: ElementItem[];
10
10
  topMetadata: ElementItem[];
11
11
  bottomMetadata?: ElementItem[];
12
12
  };
13
- export declare const FlexibleCardUiOptions: FlexibleUiOptions;
13
+ export declare const FlexibleCardUiOptions: InternalFlexibleUiOptions;
14
14
  export declare const titleBlockOptions: Partial<TitleBlockProps>;
15
15
  export declare const titleBlockOptionsOld: Partial<TitleBlockProps>;
16
16
  export declare const PreviewBlockOptions: Partial<PreviewBlockProps>;
@@ -71,9 +71,9 @@ export type FlexibleCardProps = {
71
71
  testId?: string;
72
72
  /**
73
73
  * Determines the appearance of Flexible UI.
74
- * @see FlexibleUiOptions
74
+ * @see InternalFlexibleUiOptions
75
75
  */
76
- ui?: FlexibleUiOptions;
76
+ ui?: InternalFlexibleUiOptions;
77
77
  /**
78
78
  * Determines the URL of the Smart Link.
79
79
  */
@@ -88,6 +88,9 @@ export type FlexibleCardProps = {
88
88
  */
89
89
  hoverPreviewOptions?: HoverPreviewOptions;
90
90
  };
91
+ export type InternalFlexibleUiOptions = FlexibleUiOptions & {
92
+ hideLegacyButton?: boolean;
93
+ };
91
94
  export type FlexibleUiOptions = {
92
95
  /**
93
96
  * Determines whether the entire Smart Link container should be clickable.
@@ -1,6 +1,6 @@
1
- import { type FlexibleUiOptions } from '../FlexibleCard/types';
1
+ import { type InternalFlexibleUiOptions } from '../FlexibleCard/types';
2
2
  export declare const HOVER_CARD_Z_INDEX: 510;
3
- export declare const flexibleUiOptions: FlexibleUiOptions;
3
+ export declare const flexibleUiOptions: InternalFlexibleUiOptions;
4
4
  export declare const CARD_WIDTH_REM = 24;
5
5
  export declare const NEW_CARD_WIDTH_REM = 25;
6
6
  export declare const CARD_GAP_PX = 10;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { type FlexibleUiOptions } from '../../view/FlexibleCard/types';
3
- import type { FlexibleUiDataContext } from './types';
2
+ import { type InternalFlexibleUiOptions } from '../../view/FlexibleCard/types';
3
+ import { type FlexibleUiDataContext } from './types';
4
4
  /**
5
5
  * This provides the data that will be used by Smart Links Flexible UI to populate it's
6
6
  * underlying elements.
@@ -11,5 +11,5 @@ export declare const useFlexibleUiContext: () => FlexibleUiDataContext | undefin
11
11
  * This provides the ui options that will be used by Smart Links Flexible UI
12
12
  * to render its underlying elements.
13
13
  */
14
- export declare const FlexibleUiOptionContext: import("react").Context<FlexibleUiOptions | undefined>;
15
- export declare const useFlexibleUiOptionContext: () => FlexibleUiOptions | undefined;
14
+ export declare const FlexibleUiOptionContext: import("react").Context<InternalFlexibleUiOptions | undefined>;
15
+ export declare const useFlexibleUiOptionContext: () => InternalFlexibleUiOptions | undefined;
@@ -3,14 +3,14 @@ import type { FooterBlockProps } from '../../../FlexibleCard/components/blocks/f
3
3
  import type { PreviewBlockProps } from '../../../FlexibleCard/components/blocks/preview-block/types';
4
4
  import type { TitleBlockProps } from '../../../FlexibleCard/components/blocks/title-block/types';
5
5
  import type { ElementItem } from '../../../FlexibleCard/components/blocks/types';
6
- import type { FlexibleUiOptions } from '../../../FlexibleCard/types';
6
+ import { type InternalFlexibleUiOptions } from '../../../FlexibleCard/types';
7
7
  export declare const getSimulatedBetterMetadata: (cardDetails?: JsonLd.Response) => SimulatedMetadata;
8
8
  type SimulatedMetadata = {
9
9
  titleMetadata: ElementItem[];
10
10
  topMetadata: ElementItem[];
11
11
  bottomMetadata?: ElementItem[];
12
12
  };
13
- export declare const FlexibleCardUiOptions: FlexibleUiOptions;
13
+ export declare const FlexibleCardUiOptions: InternalFlexibleUiOptions;
14
14
  export declare const titleBlockOptions: Partial<TitleBlockProps>;
15
15
  export declare const titleBlockOptionsOld: Partial<TitleBlockProps>;
16
16
  export declare const PreviewBlockOptions: Partial<PreviewBlockProps>;
@@ -71,9 +71,9 @@ export type FlexibleCardProps = {
71
71
  testId?: string;
72
72
  /**
73
73
  * Determines the appearance of Flexible UI.
74
- * @see FlexibleUiOptions
74
+ * @see InternalFlexibleUiOptions
75
75
  */
76
- ui?: FlexibleUiOptions;
76
+ ui?: InternalFlexibleUiOptions;
77
77
  /**
78
78
  * Determines the URL of the Smart Link.
79
79
  */
@@ -88,6 +88,9 @@ export type FlexibleCardProps = {
88
88
  */
89
89
  hoverPreviewOptions?: HoverPreviewOptions;
90
90
  };
91
+ export type InternalFlexibleUiOptions = FlexibleUiOptions & {
92
+ hideLegacyButton?: boolean;
93
+ };
91
94
  export type FlexibleUiOptions = {
92
95
  /**
93
96
  * Determines whether the entire Smart Link container should be clickable.
@@ -1,6 +1,6 @@
1
- import { type FlexibleUiOptions } from '../FlexibleCard/types';
1
+ import { type InternalFlexibleUiOptions } from '../FlexibleCard/types';
2
2
  export declare const HOVER_CARD_Z_INDEX: 510;
3
- export declare const flexibleUiOptions: FlexibleUiOptions;
3
+ export declare const flexibleUiOptions: InternalFlexibleUiOptions;
4
4
  export declare const CARD_WIDTH_REM = 24;
5
5
  export declare const NEW_CARD_WIDTH_REM = 25;
6
6
  export declare const CARD_GAP_PX = 10;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "35.2.0",
3
+ "version": "35.2.2",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -59,7 +59,7 @@
59
59
  "@atlaskit/platform-feature-flags": "^1.1.0",
60
60
  "@atlaskit/popup": "^2.0.0",
61
61
  "@atlaskit/primitives": "^14.1.0",
62
- "@atlaskit/section-message": "^8.0.0",
62
+ "@atlaskit/section-message": "^8.1.0",
63
63
  "@atlaskit/select": "^20.0.0",
64
64
  "@atlaskit/spinner": "^18.0.0",
65
65
  "@atlaskit/textarea": "^8.0.0",
@@ -92,18 +92,18 @@
92
92
  "react-intl-next": "npm:react-intl@^5.18.1"
93
93
  },
94
94
  "devDependencies": {
95
- "@af/integration-testing": "*",
96
- "@af/visual-regression": "*",
95
+ "@af/integration-testing": "^0.5.0",
96
+ "@af/visual-regression": "^1.3.0",
97
97
  "@atlaskit/analytics-listeners": "^9.0.0",
98
98
  "@atlaskit/css-reset": "^7.0.0",
99
99
  "@atlaskit/link-test-helpers": "^8.0.0",
100
100
  "@atlaskit/media-test-helpers": "^35.0.0",
101
101
  "@atlaskit/react-ufo": "^3.3.0",
102
- "@atlaskit/ssr": "*",
103
- "@atlaskit/visual-regression": "*",
104
- "@atlassian/analytics-tooling": "*",
102
+ "@atlaskit/ssr": "^0.4.0",
103
+ "@atlaskit/visual-regression": "^0.10.0",
104
+ "@atlassian/analytics-tooling": "^0.5.0",
105
105
  "@atlassian/feature-flags-test-utils": "^0.3.0",
106
- "@atlassian/gemini": "1.16.5",
106
+ "@atlassian/gemini": "^1.16.0",
107
107
  "@testing-library/dom": "^10.1.0",
108
108
  "@testing-library/jest-dom": "^6.4.5",
109
109
  "@testing-library/react": "^13.4.0",