@atlaskit/smart-card 33.3.0 → 33.4.0
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 +8 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +8 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +8 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +8 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/HoverCard/components/HoverCardComponent.d.ts +1 -1
- package/dist/types/view/HoverCard/types.d.ts +15 -0
- package/dist/types-ts4.5/view/HoverCard/components/HoverCardComponent.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/types.d.ts +15 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 33.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#99264](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99264)
|
|
8
|
+
[`a5f4221df30a0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a5f4221df30a0) -
|
|
9
|
+
Introduce role, label and titleId props to the Hover Card component
|
|
10
|
+
|
|
3
11
|
## 33.3.0
|
|
4
12
|
|
|
5
13
|
### 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: "33.
|
|
14
|
+
packageVersion: "33.4.0"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -49,7 +49,10 @@ var HoverCardComponent = exports.HoverCardComponent = function HoverCardComponen
|
|
|
49
49
|
zIndex = _ref$zIndex === void 0 ? _styled.HOVER_CARD_Z_INDEX : _ref$zIndex,
|
|
50
50
|
_ref$noFadeDelay = _ref.noFadeDelay,
|
|
51
51
|
noFadeDelay = _ref$noFadeDelay === void 0 ? false : _ref$noFadeDelay,
|
|
52
|
-
hoverPreviewOptions = _ref.hoverPreviewOptions
|
|
52
|
+
hoverPreviewOptions = _ref.hoverPreviewOptions,
|
|
53
|
+
role = _ref.role,
|
|
54
|
+
label = _ref.label,
|
|
55
|
+
titleId = _ref.titleId;
|
|
53
56
|
var fadeInDelay = (_hoverPreviewOptions$ = hoverPreviewOptions === null || hoverPreviewOptions === void 0 ? void 0 : hoverPreviewOptions.fadeInDelay) !== null && _hoverPreviewOptions$ !== void 0 ? _hoverPreviewOptions$ : FADE_IN_DELAY;
|
|
54
57
|
var _React$useState = _react.default.useState(false),
|
|
55
58
|
_React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
|
|
@@ -228,7 +231,10 @@ var HoverCardComponent = exports.HoverCardComponent = function HoverCardComponen
|
|
|
228
231
|
autoFocus: false,
|
|
229
232
|
content: content,
|
|
230
233
|
trigger: trigger,
|
|
231
|
-
zIndex: zIndex
|
|
234
|
+
zIndex: zIndex,
|
|
235
|
+
role: role,
|
|
236
|
+
titleId: titleId,
|
|
237
|
+
label: label
|
|
232
238
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
233
239
|
,
|
|
234
240
|
popupComponent: _CustomPopupContainer.default
|
|
@@ -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: "33.
|
|
23
|
+
packageVersion: "33.4.0",
|
|
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: "33.
|
|
5
|
+
packageVersion: "33.4.0"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -30,7 +30,10 @@ export const HoverCardComponent = ({
|
|
|
30
30
|
allowEventPropagation = false,
|
|
31
31
|
zIndex = HOVER_CARD_Z_INDEX,
|
|
32
32
|
noFadeDelay = false,
|
|
33
|
-
hoverPreviewOptions
|
|
33
|
+
hoverPreviewOptions,
|
|
34
|
+
role,
|
|
35
|
+
label,
|
|
36
|
+
titleId
|
|
34
37
|
}) => {
|
|
35
38
|
var _hoverPreviewOptions$;
|
|
36
39
|
const fadeInDelay = (_hoverPreviewOptions$ = hoverPreviewOptions === null || hoverPreviewOptions === void 0 ? void 0 : hoverPreviewOptions.fadeInDelay) !== null && _hoverPreviewOptions$ !== void 0 ? _hoverPreviewOptions$ : FADE_IN_DELAY;
|
|
@@ -204,7 +207,10 @@ export const HoverCardComponent = ({
|
|
|
204
207
|
autoFocus: false,
|
|
205
208
|
content: content,
|
|
206
209
|
trigger: trigger,
|
|
207
|
-
zIndex: zIndex
|
|
210
|
+
zIndex: zIndex,
|
|
211
|
+
role: role,
|
|
212
|
+
titleId: titleId,
|
|
213
|
+
label: label
|
|
208
214
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
209
215
|
,
|
|
210
216
|
popupComponent: CustomPopupContainer
|
|
@@ -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: "33.
|
|
13
|
+
packageVersion: "33.4.0",
|
|
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: "33.
|
|
7
|
+
packageVersion: "33.4.0"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -40,7 +40,10 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
|
40
40
|
zIndex = _ref$zIndex === void 0 ? HOVER_CARD_Z_INDEX : _ref$zIndex,
|
|
41
41
|
_ref$noFadeDelay = _ref.noFadeDelay,
|
|
42
42
|
noFadeDelay = _ref$noFadeDelay === void 0 ? false : _ref$noFadeDelay,
|
|
43
|
-
hoverPreviewOptions = _ref.hoverPreviewOptions
|
|
43
|
+
hoverPreviewOptions = _ref.hoverPreviewOptions,
|
|
44
|
+
role = _ref.role,
|
|
45
|
+
label = _ref.label,
|
|
46
|
+
titleId = _ref.titleId;
|
|
44
47
|
var fadeInDelay = (_hoverPreviewOptions$ = hoverPreviewOptions === null || hoverPreviewOptions === void 0 ? void 0 : hoverPreviewOptions.fadeInDelay) !== null && _hoverPreviewOptions$ !== void 0 ? _hoverPreviewOptions$ : FADE_IN_DELAY;
|
|
45
48
|
var _React$useState = React.useState(false),
|
|
46
49
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -219,7 +222,10 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
|
219
222
|
autoFocus: false,
|
|
220
223
|
content: content,
|
|
221
224
|
trigger: trigger,
|
|
222
|
-
zIndex: zIndex
|
|
225
|
+
zIndex: zIndex,
|
|
226
|
+
role: role,
|
|
227
|
+
titleId: titleId,
|
|
228
|
+
label: label
|
|
223
229
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
224
230
|
,
|
|
225
231
|
popupComponent: CustomPopupContainer
|
|
@@ -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: "33.
|
|
16
|
+
packageVersion: "33.4.0",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import { type HoverCardComponentProps } from '../types';
|
|
3
3
|
export declare const HOVER_CARD_SOURCE = "smartLinkPreviewHoverCard";
|
|
4
|
-
export declare const HoverCardComponent: ({ children, url, id, canOpen, closeOnChildClick, actionOptions, allowEventPropagation, zIndex, noFadeDelay, hoverPreviewOptions, }: HoverCardComponentProps) => jsx.JSX.Element;
|
|
4
|
+
export declare const HoverCardComponent: ({ children, url, id, canOpen, closeOnChildClick, actionOptions, allowEventPropagation, zIndex, noFadeDelay, hoverPreviewOptions, role, label, titleId }: HoverCardComponentProps) => jsx.JSX.Element;
|
|
@@ -42,6 +42,21 @@ export interface HoverCardProps extends WithAnalyticsEventsProps {
|
|
|
42
42
|
* Additional configurations for hover card.
|
|
43
43
|
*/
|
|
44
44
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
45
|
+
/**
|
|
46
|
+
* Use this to set the accessibility role for the hover card.
|
|
47
|
+
* Should be used along with `label` or `titleId` for supported roles.
|
|
48
|
+
*/
|
|
49
|
+
role?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Refers to an `aria-label` attribute. Sets an accessible name for the hover card to announce it to users of assistive technology.
|
|
52
|
+
* Usage of either this, or the `titleId` attribute is strongly recommended.
|
|
53
|
+
*/
|
|
54
|
+
label?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Id referenced by the hover card `aria-labelledby` attribute.
|
|
57
|
+
* Usage of either this, or the `label` attribute is strongly recommended.
|
|
58
|
+
*/
|
|
59
|
+
titleId?: string;
|
|
45
60
|
}
|
|
46
61
|
/**
|
|
47
62
|
* An internal props that internal smart-card components can use to configure
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import { type HoverCardComponentProps } from '../types';
|
|
3
3
|
export declare const HOVER_CARD_SOURCE = "smartLinkPreviewHoverCard";
|
|
4
|
-
export declare const HoverCardComponent: ({ children, url, id, canOpen, closeOnChildClick, actionOptions, allowEventPropagation, zIndex, noFadeDelay, hoverPreviewOptions, }: HoverCardComponentProps) => jsx.JSX.Element;
|
|
4
|
+
export declare const HoverCardComponent: ({ children, url, id, canOpen, closeOnChildClick, actionOptions, allowEventPropagation, zIndex, noFadeDelay, hoverPreviewOptions, role, label, titleId }: HoverCardComponentProps) => jsx.JSX.Element;
|
|
@@ -42,6 +42,21 @@ export interface HoverCardProps extends WithAnalyticsEventsProps {
|
|
|
42
42
|
* Additional configurations for hover card.
|
|
43
43
|
*/
|
|
44
44
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
45
|
+
/**
|
|
46
|
+
* Use this to set the accessibility role for the hover card.
|
|
47
|
+
* Should be used along with `label` or `titleId` for supported roles.
|
|
48
|
+
*/
|
|
49
|
+
role?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Refers to an `aria-label` attribute. Sets an accessible name for the hover card to announce it to users of assistive technology.
|
|
52
|
+
* Usage of either this, or the `titleId` attribute is strongly recommended.
|
|
53
|
+
*/
|
|
54
|
+
label?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Id referenced by the hover card `aria-labelledby` attribute.
|
|
57
|
+
* Usage of either this, or the `label` attribute is strongly recommended.
|
|
58
|
+
*/
|
|
59
|
+
titleId?: string;
|
|
45
60
|
}
|
|
46
61
|
/**
|
|
47
62
|
* An internal props that internal smart-card components can use to configure
|