@atlaskit/smart-card 43.20.8 → 43.22.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 +29 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/action-lozenge/action-trigger--default--platform-navx-sl-lozenge-max-width-true.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flex-ui-elements/flex-ui-atlaskit-badge-view--default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-element-badge--default--navx-1895-new-logo-design-false.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-element-badge--default--navx-1895-new-logo-design-true.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode--platform-navx-sl-lozenge-max-width-false.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode--platform-navx-sl-lozenge-max-width-true.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view--default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view-renders-correctly-when-hovering-over-url-in-errored-view--default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view-with-truncation--default.png +2 -2
- package/dist/cjs/extractors/flexible/icon/extract-document-type-icon.js +8 -41
- package/dist/cjs/extractors/flexible/icon/extract-file-formatIcon.js +22 -111
- package/dist/cjs/extractors/flexible/icon/extract-jsonld-data-icon.js +6 -31
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/index.js +4 -6
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +4 -4
- package/dist/cjs/view/EmbedModal/components/link-info/link-info-button/index.js +3 -6
- package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +1 -5
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/index.js +12 -6
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/index.js +6 -2
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.compiled.css +2 -0
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.js +16 -7
- package/dist/cjs/view/FlexibleCard/external.js +5 -2
- package/dist/cjs/view/InlineCard/Frame/styled.compiled.css +1 -0
- package/dist/cjs/view/InlineCard/Frame/styled.js +4 -4
- package/dist/cjs/view/InlineCard/index.js +4 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/__tests__/vr-tests/__snapshots__/action-lozenge/action-trigger--default--platform-navx-sl-lozenge-max-width-true.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flex-ui-elements/flex-ui-atlaskit-badge-view--default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-element-badge--default--navx-1895-new-logo-design-false.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-element-badge--default--navx-1895-new-logo-design-true.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode--platform-navx-sl-lozenge-max-width-false.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode--platform-navx-sl-lozenge-max-width-true.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view--default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view-renders-correctly-when-hovering-over-url-in-errored-view--default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view-with-truncation--default.png +2 -2
- package/dist/es2019/extractors/flexible/icon/extract-document-type-icon.js +8 -41
- package/dist/es2019/extractors/flexible/icon/extract-file-formatIcon.js +22 -111
- package/dist/es2019/extractors/flexible/icon/extract-jsonld-data-icon.js +6 -31
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/index.js +3 -4
- package/dist/es2019/view/EmbedModal/components/link-info/index.js +4 -4
- package/dist/es2019/view/EmbedModal/components/link-info/link-info-button/index.js +4 -7
- package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +1 -5
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/index.js +12 -6
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/index.js +6 -2
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.compiled.css +2 -0
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.js +15 -6
- package/dist/es2019/view/FlexibleCard/external.js +4 -1
- package/dist/es2019/view/InlineCard/Frame/styled.compiled.css +1 -0
- package/dist/es2019/view/InlineCard/Frame/styled.js +3 -3
- package/dist/es2019/view/InlineCard/index.js +4 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/__tests__/vr-tests/__snapshots__/action-lozenge/action-trigger--default--platform-navx-sl-lozenge-max-width-true.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flex-ui-elements/flex-ui-atlaskit-badge-view--default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-element-badge--default--navx-1895-new-logo-design-false.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-element-badge--default--navx-1895-new-logo-design-true.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode--platform-navx-sl-lozenge-max-width-false.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode--platform-navx-sl-lozenge-max-width-true.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view--default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view-renders-correctly-when-hovering-over-url-in-errored-view--default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view-with-truncation--default.png +2 -2
- package/dist/esm/extractors/flexible/icon/extract-document-type-icon.js +8 -41
- package/dist/esm/extractors/flexible/icon/extract-file-formatIcon.js +22 -111
- package/dist/esm/extractors/flexible/icon/extract-jsonld-data-icon.js +6 -31
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/index.js +4 -6
- package/dist/esm/view/EmbedModal/components/link-info/index.js +4 -4
- package/dist/esm/view/EmbedModal/components/link-info/link-info-button/index.js +3 -6
- package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +1 -5
- package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/index.js +12 -6
- package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/index.js +6 -2
- package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.compiled.css +2 -0
- package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.js +16 -7
- package/dist/esm/view/FlexibleCard/external.js +5 -2
- package/dist/esm/view/InlineCard/Frame/styled.compiled.css +1 -0
- package/dist/esm/view/InlineCard/Frame/styled.js +4 -4
- package/dist/esm/view/InlineCard/index.js +4 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +2 -1
- package/dist/types/view/FlexibleCard/components/elements/common/base-lozenge-element/index.d.ts +2 -6
- package/dist/types/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/type.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/external.d.ts +3 -2
- package/dist/types/view/InlineCard/Frame/index.d.ts +2 -1
- package/dist/types/view/InlineCard/Frame/styled.d.ts +2 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +2 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-lozenge-element/index.d.ts +2 -6
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/type.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/types.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/external.d.ts +3 -2
- package/dist/types-ts4.5/view/InlineCard/Frame/index.d.ts +2 -1
- package/dist/types-ts4.5/view/InlineCard/Frame/styled.d.ts +2 -1
- package/package.json +9 -12
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode.png +0 -3
- /package/dist/cjs/__tests__/vr-tests/__snapshots__/action-lozenge/{action-trigger--default.png → action-trigger--default--platform-navx-sl-lozenge-max-width-false.png} +0 -0
- /package/dist/es2019/__tests__/vr-tests/__snapshots__/action-lozenge/{action-trigger--default.png → action-trigger--default--platform-navx-sl-lozenge-max-width-false.png} +0 -0
- /package/dist/esm/__tests__/vr-tests/__snapshots__/action-lozenge/{action-trigger--default.png → action-trigger--default--platform-navx-sl-lozenge-max-width-false.png} +0 -0
|
@@ -1,144 +1,83 @@
|
|
|
1
|
-
import { fg } from "@atlaskit/platform-feature-flags";
|
|
2
1
|
import { IconType } from '../../../constants';
|
|
3
2
|
var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
|
|
4
3
|
switch (fileFormat) {
|
|
5
4
|
// Generic documents
|
|
6
5
|
case 'folder':
|
|
7
|
-
return
|
|
6
|
+
return {
|
|
8
7
|
icon: IconType.Folder
|
|
9
|
-
} : {
|
|
10
|
-
icon: IconType.Folder,
|
|
11
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
12
|
-
label: 'Folder'
|
|
13
8
|
};
|
|
14
9
|
case 'text/plain':
|
|
15
10
|
case 'application/vnd.oasis.opendocument.text':
|
|
16
11
|
case 'application/vnd.apple.pages':
|
|
17
|
-
return
|
|
12
|
+
return {
|
|
18
13
|
icon: IconType.Document
|
|
19
|
-
} : {
|
|
20
|
-
icon: IconType.Document,
|
|
21
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
22
|
-
label: 'Document'
|
|
23
14
|
};
|
|
24
15
|
case 'application/pdf':
|
|
25
|
-
return
|
|
16
|
+
return {
|
|
26
17
|
icon: IconType.PDF
|
|
27
|
-
} : {
|
|
28
|
-
icon: IconType.PDF,
|
|
29
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
30
|
-
label: 'PDF document'
|
|
31
18
|
};
|
|
32
19
|
case 'application/vnd.oasis.opendocument.presentation':
|
|
33
20
|
case 'application/vnd.apple.keynote':
|
|
34
|
-
return
|
|
21
|
+
return {
|
|
35
22
|
icon: IconType.Presentation
|
|
36
|
-
} : {
|
|
37
|
-
icon: IconType.Presentation,
|
|
38
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
39
|
-
label: 'Presentation'
|
|
40
23
|
};
|
|
41
24
|
case 'application/vnd.oasis.opendocument.spreadsheet':
|
|
42
25
|
case 'application/vnd.apple.numbers':
|
|
43
|
-
return
|
|
26
|
+
return {
|
|
44
27
|
icon: IconType.Spreadsheet
|
|
45
|
-
} : {
|
|
46
|
-
icon: IconType.Spreadsheet,
|
|
47
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
48
|
-
label: 'Spreadsheet'
|
|
49
28
|
};
|
|
50
29
|
// Google Drive
|
|
51
30
|
case 'application/vnd.google-apps.document':
|
|
52
|
-
return
|
|
31
|
+
return {
|
|
53
32
|
icon: IconType.GoogleDocs
|
|
54
|
-
} : {
|
|
55
|
-
icon: IconType.GoogleDocs,
|
|
56
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
57
|
-
label: 'Google Docs'
|
|
58
33
|
};
|
|
59
34
|
case 'application/vnd.google-apps.form':
|
|
60
|
-
return
|
|
35
|
+
return {
|
|
61
36
|
icon: IconType.GoogleForms
|
|
62
|
-
} : {
|
|
63
|
-
icon: IconType.GoogleForms,
|
|
64
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
65
|
-
label: 'Google Form'
|
|
66
37
|
};
|
|
67
38
|
case 'application/vnd.google-apps.spreadsheet':
|
|
68
|
-
return
|
|
39
|
+
return {
|
|
69
40
|
icon: IconType.GoogleSheets
|
|
70
|
-
} : {
|
|
71
|
-
icon: IconType.GoogleSheets,
|
|
72
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
73
|
-
label: 'Google Sheets'
|
|
74
41
|
};
|
|
75
42
|
case 'application/vnd.google-apps.presentation':
|
|
76
|
-
return
|
|
43
|
+
return {
|
|
77
44
|
icon: IconType.GoogleSlides
|
|
78
|
-
} : {
|
|
79
|
-
icon: IconType.GoogleSlides,
|
|
80
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
81
|
-
label: 'Google Slides'
|
|
82
45
|
};
|
|
83
46
|
// Microsoft
|
|
84
47
|
case 'application/vnd.ms-excel':
|
|
85
48
|
case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
|
|
86
|
-
return
|
|
49
|
+
return {
|
|
87
50
|
icon: IconType.MSExcel
|
|
88
|
-
} : {
|
|
89
|
-
icon: IconType.MSExcel,
|
|
90
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
91
|
-
label: 'Excel spreadsheet'
|
|
92
51
|
};
|
|
93
52
|
case 'application/vnd.ms-powerpoint':
|
|
94
53
|
case 'application/vnd.openxmlformats-officedocument.presentationml.presentation':
|
|
95
|
-
return
|
|
54
|
+
return {
|
|
96
55
|
icon: IconType.MSPowerpoint
|
|
97
|
-
} : {
|
|
98
|
-
icon: IconType.MSPowerpoint,
|
|
99
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
100
|
-
label: 'PowerPoint presentation'
|
|
101
56
|
};
|
|
102
57
|
case 'application/msword':
|
|
103
58
|
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
|
|
104
|
-
return
|
|
59
|
+
return {
|
|
105
60
|
icon: IconType.MSWord
|
|
106
|
-
} : {
|
|
107
|
-
icon: IconType.MSWord,
|
|
108
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
109
|
-
label: 'Word document'
|
|
110
61
|
};
|
|
111
62
|
case 'image/png':
|
|
112
63
|
case 'image/jpeg':
|
|
113
64
|
case 'image/bmp':
|
|
114
65
|
case 'image/webp':
|
|
115
66
|
case 'image/svg+xml':
|
|
116
|
-
return
|
|
67
|
+
return {
|
|
117
68
|
icon: IconType.Image
|
|
118
|
-
} : {
|
|
119
|
-
icon: IconType.Image,
|
|
120
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
121
|
-
label: 'Image'
|
|
122
69
|
};
|
|
123
70
|
case 'image/gif':
|
|
124
|
-
return
|
|
71
|
+
return {
|
|
125
72
|
icon: IconType.GIF
|
|
126
|
-
} : {
|
|
127
|
-
icon: IconType.GIF,
|
|
128
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
129
|
-
label: 'GIF'
|
|
130
73
|
};
|
|
131
74
|
case 'audio/midi':
|
|
132
75
|
case 'audio/mpeg':
|
|
133
76
|
case 'audio/webm':
|
|
134
77
|
case 'audio/ogg':
|
|
135
78
|
case 'audio/wav':
|
|
136
|
-
return
|
|
79
|
+
return {
|
|
137
80
|
icon: IconType.Audio
|
|
138
|
-
} : {
|
|
139
|
-
icon: IconType.Audio,
|
|
140
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
141
|
-
label: 'Audio'
|
|
142
81
|
};
|
|
143
82
|
case 'video/mp4':
|
|
144
83
|
case 'video/quicktime':
|
|
@@ -147,23 +86,15 @@ var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
|
|
|
147
86
|
case 'video/ogg':
|
|
148
87
|
case 'video/x-ms-wmv':
|
|
149
88
|
case 'video/x-msvideo':
|
|
150
|
-
return
|
|
89
|
+
return {
|
|
151
90
|
icon: IconType.Video
|
|
152
|
-
} : {
|
|
153
|
-
icon: IconType.Video,
|
|
154
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
155
|
-
label: 'Video'
|
|
156
91
|
};
|
|
157
92
|
// Others
|
|
158
93
|
case 'text/css':
|
|
159
94
|
case 'text/html':
|
|
160
95
|
case 'application/javascript':
|
|
161
|
-
return
|
|
96
|
+
return {
|
|
162
97
|
icon: IconType.Code
|
|
163
|
-
} : {
|
|
164
|
-
icon: IconType.Code,
|
|
165
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
166
|
-
label: 'Source Code'
|
|
167
98
|
};
|
|
168
99
|
case 'application/zip':
|
|
169
100
|
case 'application/x-tar':
|
|
@@ -171,44 +102,24 @@ var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
|
|
|
171
102
|
case 'application/x-7z-compressed':
|
|
172
103
|
case 'application/x-apple-diskimage':
|
|
173
104
|
case 'application/vnd.rar':
|
|
174
|
-
return
|
|
105
|
+
return {
|
|
175
106
|
icon: IconType.Archive
|
|
176
|
-
} : {
|
|
177
|
-
icon: IconType.Archive,
|
|
178
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
179
|
-
label: 'Archive'
|
|
180
107
|
};
|
|
181
108
|
case 'application/dmg':
|
|
182
|
-
return
|
|
109
|
+
return {
|
|
183
110
|
icon: IconType.Executable
|
|
184
|
-
} : {
|
|
185
|
-
icon: IconType.Executable,
|
|
186
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
187
|
-
label: 'Executable'
|
|
188
111
|
};
|
|
189
112
|
case 'application/sketch':
|
|
190
|
-
return
|
|
113
|
+
return {
|
|
191
114
|
icon: IconType.Sketch
|
|
192
|
-
} : {
|
|
193
|
-
icon: IconType.Sketch,
|
|
194
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
195
|
-
label: 'Sketch'
|
|
196
115
|
};
|
|
197
116
|
case 'application/octet-stream':
|
|
198
|
-
return
|
|
117
|
+
return {
|
|
199
118
|
icon: IconType.Generic
|
|
200
|
-
} : {
|
|
201
|
-
icon: IconType.Generic,
|
|
202
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
203
|
-
label: 'Binary file'
|
|
204
119
|
};
|
|
205
120
|
case 'application/invision.prototype':
|
|
206
|
-
return
|
|
121
|
+
return {
|
|
207
122
|
icon: IconType.Generic
|
|
208
|
-
} : {
|
|
209
|
-
icon: IconType.Generic,
|
|
210
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
211
|
-
label: 'Prototype'
|
|
212
123
|
};
|
|
213
124
|
default:
|
|
214
125
|
return undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { extractTitle } from '@atlaskit/link-extractors';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
import { IconType } from '../../../constants';
|
|
4
3
|
import { prioritiseIcon } from '../../common/icon';
|
|
5
4
|
import { extractorPriorityMap as priorityMap } from '../../common/icon/priority';
|
|
@@ -63,58 +62,34 @@ function typeToIconDescriptor(_ref3) {
|
|
|
63
62
|
data = _ref3.data;
|
|
64
63
|
switch (type) {
|
|
65
64
|
case 'atlassian:Goal':
|
|
66
|
-
return
|
|
65
|
+
return {
|
|
67
66
|
icon: IconType.Task,
|
|
68
67
|
label: label
|
|
69
|
-
} : {
|
|
70
|
-
icon: IconType.Task,
|
|
71
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
72
|
-
label: label || 'Goal'
|
|
73
68
|
};
|
|
74
69
|
case 'atlassian:Project':
|
|
75
|
-
return
|
|
70
|
+
return {
|
|
76
71
|
icon: IconType.Project,
|
|
77
72
|
label: label
|
|
78
|
-
} : {
|
|
79
|
-
icon: IconType.Project,
|
|
80
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
81
|
-
label: label || 'Project'
|
|
82
73
|
};
|
|
83
74
|
case 'atlassian:SourceCodeCommit':
|
|
84
|
-
return
|
|
75
|
+
return {
|
|
85
76
|
icon: IconType.Commit,
|
|
86
77
|
label: label
|
|
87
|
-
} : {
|
|
88
|
-
icon: IconType.Commit,
|
|
89
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
90
|
-
label: label || 'Commit'
|
|
91
78
|
};
|
|
92
79
|
case 'atlassian:SourceCodePullRequest':
|
|
93
|
-
return
|
|
80
|
+
return {
|
|
94
81
|
icon: IconType.PullRequest,
|
|
95
82
|
label: label
|
|
96
|
-
} : {
|
|
97
|
-
icon: IconType.PullRequest,
|
|
98
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
99
|
-
label: label || 'Pull request'
|
|
100
83
|
};
|
|
101
84
|
case 'atlassian:SourceCodeReference':
|
|
102
|
-
return
|
|
85
|
+
return {
|
|
103
86
|
icon: IconType.Branch,
|
|
104
87
|
label: label
|
|
105
|
-
} : {
|
|
106
|
-
icon: IconType.Branch,
|
|
107
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
108
|
-
label: label || 'Reference'
|
|
109
88
|
};
|
|
110
89
|
case 'atlassian:SourceCodeRepository':
|
|
111
|
-
return
|
|
90
|
+
return {
|
|
112
91
|
icon: IconType.Repo,
|
|
113
92
|
label: label
|
|
114
|
-
} : {
|
|
115
|
-
icon: IconType.Repo,
|
|
116
|
-
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
117
|
-
label: label || 'Repository'
|
|
118
93
|
};
|
|
119
94
|
case 'atlassian:Task':
|
|
120
95
|
var taskLabel = label || 'Task';
|
|
@@ -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: "43.
|
|
7
|
+
packageVersion: "43.21.0"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -40,9 +40,8 @@ export var getIconForFileType = function getIconForFileType(fileMimeType) {
|
|
|
40
40
|
if (!icon) {
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
|
-
var _icon = _slicedToArray(icon,
|
|
44
|
-
|
|
45
|
-
importCb = _icon[1];
|
|
43
|
+
var _icon = _slicedToArray(icon, 1),
|
|
44
|
+
importCb = _icon[0];
|
|
46
45
|
if (!importCb) {
|
|
47
46
|
return;
|
|
48
47
|
}
|
|
@@ -58,7 +57,6 @@ export var getIconForFileType = function getIconForFileType(fileMimeType) {
|
|
|
58
57
|
}); // because we're using dynamic loading here, TS will not be able to infer the type
|
|
59
58
|
|
|
60
59
|
return /*#__PURE__*/React.createElement(Icon, {
|
|
61
|
-
label: label,
|
|
62
60
|
testId: "document-file-format-icon"
|
|
63
61
|
});
|
|
64
62
|
};
|
|
@@ -418,11 +416,11 @@ export var getLazyIcons = function getLazyIcons() {
|
|
|
418
416
|
var getTypeToIconMap = function getTypeToIconMap(fileFormat) {
|
|
419
417
|
var _lazyIcons$iconDescri;
|
|
420
418
|
var iconDescriptor = extractFileFormatIcon(fileFormat);
|
|
421
|
-
if (!(iconDescriptor !== null && iconDescriptor !== void 0 && iconDescriptor.icon)
|
|
419
|
+
if (!(iconDescriptor !== null && iconDescriptor !== void 0 && iconDescriptor.icon)) {
|
|
422
420
|
return null;
|
|
423
421
|
}
|
|
424
422
|
var lazyIcons = getLazyIcons();
|
|
425
|
-
return [
|
|
423
|
+
return [(_lazyIcons$iconDescri = lazyIcons[iconDescriptor.icon]) === null || _lazyIcons$iconDescri === void 0 ? void 0 : _lazyIcons$iconDescri.default];
|
|
426
424
|
};
|
|
427
425
|
export var getIframeSandboxAttribute = function getIframeSandboxAttribute(isTrusted) {
|
|
428
426
|
if (isTrusted) {
|
|
@@ -73,8 +73,8 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
73
73
|
label: messages.viewOriginal,
|
|
74
74
|
onClick: onViewButtonClick,
|
|
75
75
|
testId: "".concat(testId, "-url"),
|
|
76
|
-
role:
|
|
77
|
-
"aria-label":
|
|
76
|
+
role: 'link',
|
|
77
|
+
"aria-label": messages.viewOriginal
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
}, [onViewButtonClick, providerName, testId]);
|
|
@@ -178,8 +178,8 @@ var LinkInfoNew = function LinkInfoNew(_ref2) {
|
|
|
178
178
|
label: messages.viewOriginal,
|
|
179
179
|
onClick: onViewButtonClick,
|
|
180
180
|
testId: "".concat(testId, "-url"),
|
|
181
|
-
role:
|
|
182
|
-
"aria-label":
|
|
181
|
+
role: 'link',
|
|
182
|
+
"aria-label": messages.viewOriginal
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
185
|
}, [onViewButtonClick, providerName, testId]);
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { useIntl } from 'react-intl-next';
|
|
4
3
|
import { IconButton } from '@atlaskit/button/new';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
4
|
import Tooltip from '@atlaskit/tooltip';
|
|
7
5
|
import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
|
|
8
6
|
var LinkInfoButton = function LinkInfoButton(_ref) {
|
|
@@ -20,15 +18,14 @@ var LinkInfoButton = function LinkInfoButton(_ref) {
|
|
|
20
18
|
hideTooltipOnClick: true,
|
|
21
19
|
tag: "span",
|
|
22
20
|
testId: "".concat(testId, "-tooltip")
|
|
23
|
-
}, /*#__PURE__*/React.createElement(IconButton,
|
|
21
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
24
22
|
appearance: "subtle",
|
|
25
23
|
icon: icon,
|
|
26
24
|
label: formatMessage(label),
|
|
27
25
|
onClick: onClick,
|
|
28
26
|
onMouseDown: onMouseDown,
|
|
29
|
-
testId: "".concat(testId, "-button")
|
|
30
|
-
}, fg('navx-2185-smart-link-preview-modal-icon-role') ? {
|
|
27
|
+
testId: "".concat(testId, "-button"),
|
|
31
28
|
role: role
|
|
32
|
-
}
|
|
29
|
+
}));
|
|
33
30
|
};
|
|
34
31
|
export default LinkInfoButton;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
|
|
7
6
|
var styles = null;
|
|
8
7
|
|
|
@@ -25,10 +24,7 @@ var LayeredLink = function LayeredLink(_ref) {
|
|
|
25
24
|
href: url,
|
|
26
25
|
onClick: onClick,
|
|
27
26
|
onMouseDown: onMouseDown,
|
|
28
|
-
target: target
|
|
29
|
-
tabIndex: fg('platform-linking-smart-card-layered-link-a11y') ? undefined : -1 // Hide tab index and let the title link be the link.
|
|
30
|
-
,
|
|
31
|
-
"aria-hidden": fg('platform-linking-smart-card-layered-link-a11y') ? undefined : true // This is to avoid screen readers reading out the link twice.
|
|
27
|
+
target: target
|
|
32
28
|
}, text);
|
|
33
29
|
};
|
|
34
30
|
export default LayeredLink;
|
|
@@ -19,28 +19,34 @@ var BaseLozengeElement = function BaseLozengeElement(_ref) {
|
|
|
19
19
|
var action = _ref.action,
|
|
20
20
|
_ref$appearance = _ref.appearance,
|
|
21
21
|
appearance = _ref$appearance === void 0 ? 'default' : _ref$appearance,
|
|
22
|
-
name = _ref.name,
|
|
23
22
|
className = _ref.className,
|
|
23
|
+
maxWidth = _ref.maxWidth,
|
|
24
|
+
name = _ref.name,
|
|
25
|
+
onAfterChanged = _ref.onAfterChanged,
|
|
24
26
|
style = _ref.style,
|
|
25
27
|
text = _ref.text,
|
|
26
28
|
_ref$testId = _ref.testId,
|
|
27
|
-
testId = _ref$testId === void 0 ? 'smart-element-lozenge' : _ref$testId
|
|
28
|
-
onAfterChanged = _ref.onAfterChanged;
|
|
29
|
+
testId = _ref$testId === void 0 ? 'smart-element-lozenge' : _ref$testId;
|
|
29
30
|
var ui = useFlexibleUiOptionContext();
|
|
30
31
|
if (!text) {
|
|
31
32
|
return null;
|
|
32
33
|
}
|
|
33
|
-
var lozenge = action ? /*#__PURE__*/React.createElement(LozengeAction, {
|
|
34
|
+
var lozenge = action ? /*#__PURE__*/React.createElement(LozengeAction, _extends({
|
|
34
35
|
action: action,
|
|
35
|
-
appearance: appearance
|
|
36
|
+
appearance: appearance
|
|
37
|
+
}, fg('platform_navx_sl_lozenge_max_width') ? {
|
|
38
|
+
maxWidth: maxWidth
|
|
39
|
+
} : undefined, {
|
|
36
40
|
testId: testId,
|
|
37
41
|
text: text,
|
|
38
42
|
zIndex: ui === null || ui === void 0 ? void 0 : ui.zIndex,
|
|
39
43
|
onAfterChanged: onAfterChanged
|
|
40
|
-
}) : /*#__PURE__*/React.createElement(AtlaskitLozenge, _extends({
|
|
44
|
+
})) : /*#__PURE__*/React.createElement(AtlaskitLozenge, _extends({
|
|
41
45
|
appearance: appearance
|
|
42
46
|
}, fg('platform-component-visual-refresh') ? {
|
|
43
47
|
isBold: true
|
|
48
|
+
} : undefined, fg('platform_navx_sl_lozenge_max_width') ? {
|
|
49
|
+
maxWidth: maxWidth
|
|
44
50
|
} : undefined, {
|
|
45
51
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
46
52
|
style: style,
|
|
@@ -29,6 +29,7 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
29
29
|
var _action$update;
|
|
30
30
|
var action = _ref.action,
|
|
31
31
|
appearance = _ref.appearance,
|
|
32
|
+
maxWidth = _ref.maxWidth,
|
|
32
33
|
_ref$testId = _ref.testId,
|
|
33
34
|
testId = _ref$testId === void 0 ? 'smart-element-lozenge-action' : _ref$testId,
|
|
34
35
|
text = _ref.text,
|
|
@@ -137,11 +138,14 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
137
138
|
var trigger = useCallback(function (props) {
|
|
138
139
|
return /*#__PURE__*/React.createElement(LozengeActionTrigger, _extends({}, props, {
|
|
139
140
|
appearance: selected.appearance,
|
|
140
|
-
isOpen: isOpen
|
|
141
|
+
isOpen: isOpen
|
|
142
|
+
}, fg('platform_navx_sl_lozenge_max_width') ? {
|
|
143
|
+
maxWidth: maxWidth
|
|
144
|
+
} : undefined, {
|
|
141
145
|
testId: testId,
|
|
142
146
|
text: selected.text
|
|
143
147
|
}));
|
|
144
|
-
}, [selected.appearance, selected.text, isOpen, testId]);
|
|
148
|
+
}, [selected.appearance, selected.text, isOpen, maxWidth, testId]);
|
|
145
149
|
var handleItemClick = useCallback( /*#__PURE__*/function () {
|
|
146
150
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(id, text, appearance) {
|
|
147
151
|
var updateAction, request;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
._18u0v77o{margin-left:var(--ds-space-025,2px)}
|
|
14
14
|
._19bvidpf{padding-left:0}
|
|
15
15
|
._19pkv77o{margin-top:var(--ds-space-025,2px)}
|
|
16
|
+
._1bto1l2s{text-overflow:ellipsis}
|
|
16
17
|
._1e0c1txw{display:flex}
|
|
17
18
|
._1p1dn7od{text-transform:unset}
|
|
18
19
|
._1q2vglyw[aria-expanded=true]{outline-style:none}
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
._j8b81o36[aria-expanded=true]{outline-width:medium}
|
|
30
31
|
._k48pn7od{font-weight:unset}
|
|
31
32
|
._n3tdidpf{padding-bottom:0}
|
|
33
|
+
._o5721q9c{white-space:nowrap}
|
|
32
34
|
._otyrv77o{margin-bottom:var(--ds-space-025,2px)}
|
|
33
35
|
._p8tl1r31[aria-expanded=true]{outline-color:currentColor}
|
|
34
36
|
._syazn7od{color:unset}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["appearance", "isOpen", "testId", "text", "triggerRef"];
|
|
5
|
+
var _excluded = ["appearance", "isOpen", "maxWidth", "testId", "text", "triggerRef"];
|
|
6
6
|
import "./index.compiled.css";
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -21,11 +21,13 @@ var styles = {
|
|
|
21
21
|
lozengeContainer: "_kkk2n7od _2rko12b0 _1dqonqa1 _189ee4h9 _1h6d1j28 _bfhk1j28 _1e0c1txw _4cvr1h6o _4t3i7vkz",
|
|
22
22
|
lozengeContainerSelected: "_1reo15vq _18m915vq _1h6d1v1w"
|
|
23
23
|
};
|
|
24
|
+
var textStyles = null;
|
|
24
25
|
var triggerLozengeStyles = null;
|
|
25
26
|
var triggerButtonStyles = null;
|
|
26
27
|
var LozengeActionTrigger = function LozengeActionTrigger(_ref) {
|
|
27
28
|
var appearance = _ref.appearance,
|
|
28
29
|
isOpen = _ref.isOpen,
|
|
30
|
+
maxWidth = _ref.maxWidth,
|
|
29
31
|
testId = _ref.testId,
|
|
30
32
|
text = _ref.text,
|
|
31
33
|
triggerRef = _ref.triggerRef,
|
|
@@ -79,18 +81,22 @@ var LozengeActionTrigger = function LozengeActionTrigger(_ref) {
|
|
|
79
81
|
return /*#__PURE__*/React.createElement(Box, {
|
|
80
82
|
xcss: cx(styles.lozengeContainer, (isOpen || isPressing) && styles.lozengeContainerSelected),
|
|
81
83
|
as: "span"
|
|
82
|
-
}, /*#__PURE__*/React.createElement(Lozenge, {
|
|
84
|
+
}, /*#__PURE__*/React.createElement(Lozenge, _extends({
|
|
83
85
|
appearance: appearance,
|
|
84
86
|
isBold: fg('platform-component-visual-refresh') ? true : isHovering
|
|
87
|
+
}, fg('platform_navx_sl_lozenge_max_width') ? {
|
|
88
|
+
maxWidth: maxWidth
|
|
89
|
+
} : undefined, {
|
|
85
90
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
86
|
-
,
|
|
87
91
|
style: {
|
|
88
92
|
backgroundColor: lozengeBackgroundColor,
|
|
89
93
|
color: lozengeForegroundColor
|
|
90
94
|
}
|
|
91
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
95
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
92
96
|
className: ax(["_4cvr1h6o _1e0c1txw"])
|
|
93
|
-
}, /*#__PURE__*/React.createElement("span",
|
|
97
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
98
|
+
className: ax([fg('platform_navx_sl_lozenge_max_width') && "_1reo15vq _18m915vq _1bto1l2s _o5721q9c"])
|
|
99
|
+
}, text), /*#__PURE__*/React.createElement(Box, {
|
|
94
100
|
as: "span",
|
|
95
101
|
xcss: styles.chevronDown
|
|
96
102
|
}, /*#__PURE__*/React.createElement(ChevronDownIcon, {
|
|
@@ -99,12 +105,15 @@ var LozengeActionTrigger = function LozengeActionTrigger(_ref) {
|
|
|
99
105
|
size: "small",
|
|
100
106
|
"aria-hidden": true
|
|
101
107
|
})))));
|
|
102
|
-
}, [appearance, isHovering, isPressing, text, isOpen, lozengeBackgroundColor, lozengeForegroundColor]);
|
|
108
|
+
}, [appearance, isHovering, isPressing, text, isOpen, lozengeBackgroundColor, lozengeForegroundColor, maxWidth]);
|
|
103
109
|
return /*#__PURE__*/React.createElement("button", _extends({
|
|
104
110
|
type: "button"
|
|
105
111
|
}, props, {
|
|
106
112
|
"data-action-open": isOpen,
|
|
107
|
-
"data-testid": "".concat(testId, "--trigger")
|
|
113
|
+
"data-testid": "".concat(testId, "--trigger"),
|
|
114
|
+
style: {
|
|
115
|
+
maxWidth: fg('platform_navx_sl_lozenge_max_width') ? maxWidth : undefined
|
|
116
|
+
}
|
|
108
117
|
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
109
118
|
,
|
|
110
119
|
onMouseEnter: onMouseEnter
|
|
@@ -8,6 +8,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
8
8
|
* DO NOT add a new prop to these components until we are ready to support it externally.
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
12
|
import { SmartLinkSize } from '../../constants';
|
|
12
13
|
import { CopyLinkAction as CopyLinkActionComponent, CustomAction as CustomActionComponent, DownloadAction as DownloadActionComponent, FollowAction as FollowActionComponent, PreviewAction as PreviewActionComponent, UnresolvedAction as UnresolvedActionComponent } from './components/actions';
|
|
13
14
|
import { AssignedTo, AssignedToGroup, AttachmentCount, AuthorGroup, ChecklistProgress, CollaboratorGroup, CommentCount, CreatedBy, CreatedOn, DueOn, LatestCommit, LinkIcon, Location, ModifiedBy, ModifiedOn, OwnedBy, OwnedByGroup, Preview, Priority, ProgrammingLanguage, Provider, ReactCount, ReadTime, SentOn, Snippet, SourceBranch, State, StoryPoints, SubscriberCount, SubTasksProgress, TargetBranch, Title, ViewCount, VoteCount } from './components/elements';
|
|
@@ -118,8 +119,10 @@ export var SnippetElement = function SnippetElement(props) {
|
|
|
118
119
|
export var SourceBranchElement = function SourceBranchElement() {
|
|
119
120
|
return /*#__PURE__*/React.createElement(SourceBranch, null);
|
|
120
121
|
};
|
|
121
|
-
export var StateElement = function StateElement() {
|
|
122
|
-
return /*#__PURE__*/React.createElement(State,
|
|
122
|
+
export var StateElement = function StateElement(props) {
|
|
123
|
+
return /*#__PURE__*/React.createElement(State, fg('platform_navx_sl_lozenge_max_width') ? {
|
|
124
|
+
maxWidth: props === null || props === void 0 ? void 0 : props.maxWidth
|
|
125
|
+
} : undefined);
|
|
123
126
|
};
|
|
124
127
|
export var StoryPointsElement = function StoryPointsElement() {
|
|
125
128
|
return /*#__PURE__*/React.createElement(StoryPoints, null);
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
._1bto1l2s{text-overflow:ellipsis}
|
|
14
14
|
._1e0c1abx{display:-webkit-inline-box}
|
|
15
15
|
._1e0c1nu9{display:inline}
|
|
16
|
+
._1hms8stv{text-decoration-line:underline}
|
|
16
17
|
._1hmsglyw{text-decoration-line:none}
|
|
17
18
|
._1nmz9jpi{word-break:break-all}
|
|
18
19
|
._1qu2glyw{outline-style:none}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
/* styled.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["truncateInline", "withoutBackground", "isHovered", "
|
|
4
|
+
var _excluded = ["truncateInline", "withoutBackground", "isHovered", "isSelected", "viewType"],
|
|
5
5
|
_excluded2 = ["truncateInline", "withoutBackground", "isHovered", "isInteractive", "isSelected", "href", "viewType"];
|
|
6
6
|
import "./styled.compiled.css";
|
|
7
7
|
import { ax, ix } from "@compiled/react/runtime";
|
|
8
8
|
import React, { forwardRef } from 'react';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import { B100, B200, B400, B50, N40 } from '@atlaskit/theme/colors';
|
|
10
11
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
11
12
|
export var WrapperSpan = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
12
13
|
var truncateInline = _ref.truncateInline,
|
|
13
14
|
withoutBackground = _ref.withoutBackground,
|
|
14
15
|
isHovered = _ref.isHovered,
|
|
15
|
-
isInteractive = _ref.isInteractive,
|
|
16
16
|
isSelected = _ref.isSelected,
|
|
17
|
-
href = _ref.href,
|
|
18
17
|
viewType = _ref.viewType,
|
|
19
18
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
19
|
var experimentValue = viewType === 'unauthorised' ? expVal('platform_inline_smartcard_connect_button_exp', 'cohort', 'control') : 'control';
|
|
@@ -38,7 +37,7 @@ export var WrapperAnchor = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
38
37
|
href: href,
|
|
39
38
|
ref: ref
|
|
40
39
|
}, props, {
|
|
41
|
-
className: ax(["_1yt4x7n9 _2rko12b0 _v56415x0 _1e0c1nu9 _16d9qvcn _syaz1y58 _1rkwglyw _4cvxmr28", truncateInline && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _1e0c1abx _1yyjkb7n _sudp1e54 _nr8z1o8l _1voyv77o _3kwxidpf _jqg5v77o _6vwiidpf", truncateInline && experimentValue !== 'control' && "_syaz15cr", withoutBackground ? "_19bvidpf _18u01i6y" : "_19it1x13 _bfhkhp5a _1a3b1r31 _4fprglyw _5goinqa1 _9oik1r31 _1bnxglyw _jf4cnqa1 _1nrm1r31 _c2waglyw _1iohnqa1", isHovered && "_1h6dmr28", isHovered && !withoutBackground && "_4bfu1r31 _1hmsglyw _ajmmnqa1", isSelected ? "_12ji1r31 _1qu2glyw _12y31o36 _80omtlke _16qscw00 _uiztglyw _1a3b1r31 _4fprglyw _5goinqa1 _9oik1r31 _1bnxglyw _jf4cnqa1 _bfw71x13 _1nrm1r31 _c2waglyw _1iohnqa1" : "_uizt1kdv", isInteractive && "_nt751r31 _49pcglyw _1hvw1o36 _1372tlke _7ehicw00 _1j5pglyw _1di629zg"])
|
|
40
|
+
className: ax(["_1yt4x7n9 _2rko12b0 _v56415x0 _1e0c1nu9 _16d9qvcn _syaz1y58 _1rkwglyw _4cvxmr28", truncateInline && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _1e0c1abx _1yyjkb7n _sudp1e54 _nr8z1o8l _1voyv77o _3kwxidpf _jqg5v77o _6vwiidpf", truncateInline && experimentValue !== 'control' && "_syaz15cr", withoutBackground ? "_19bvidpf _18u01i6y" : "_19it1x13 _bfhkhp5a _1a3b1r31 _4fprglyw _5goinqa1 _9oik1r31 _1bnxglyw _jf4cnqa1 _1nrm1r31 _c2waglyw _1iohnqa1", isHovered && "_1h6dmr28", isHovered && !withoutBackground && "_4bfu1r31 _1hmsglyw _ajmmnqa1", isSelected ? "_12ji1r31 _1qu2glyw _12y31o36 _80omtlke _16qscw00 _uiztglyw _1a3b1r31 _4fprglyw _5goinqa1 _9oik1r31 _1bnxglyw _jf4cnqa1 _bfw71x13 _1nrm1r31 _c2waglyw _1iohnqa1" : "_uizt1kdv", isInteractive && "_nt751r31 _49pcglyw _1hvw1o36 _1372tlke _7ehicw00 _1j5pglyw _1di629zg", viewType === 'errored' && fg('navx-2565-inline-card-error-state-underline') && "_4bfu1r31 _1hms8stv _ajmmnqa1 _9oik1r31 _1bnxglyw _jf4cnqa1"])
|
|
42
41
|
}), props.children);
|
|
43
42
|
});
|
|
44
43
|
var baseWrapperStyles = null;
|
|
@@ -47,6 +46,7 @@ var baseWrapperStyles = null;
|
|
|
47
46
|
var interactiveStyles = null;
|
|
48
47
|
var hoveredStyles = null;
|
|
49
48
|
var hoveredWithBackgroundStyles = null;
|
|
49
|
+
var errorViewTypeStyles = null;
|
|
50
50
|
var withoutBackgroundStyles = null;
|
|
51
51
|
var withBackgroundStyles = null;
|
|
52
52
|
var truncateStyles = null;
|