@atlaskit/emoji 63.1.10 → 63.2.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 +6 -0
- package/dist/cjs/api/EmojiRepository.js +1 -1
- package/dist/cjs/api/EmojiResource.js +1 -1
- package/dist/cjs/api/EmojiUtils.js +1 -1
- package/dist/cjs/api/internal/Comparators.js +1 -1
- package/dist/cjs/api/internal/UsageFrequencyTracker.js +1 -1
- package/dist/cjs/api/media/SiteEmojiResource.js +1 -1
- package/dist/cjs/api/media/TokenManager.js +1 -1
- package/dist/cjs/components/common/DeleteButton.js +3 -1
- package/dist/cjs/components/common/EmojiUploadPicker.js +5 -10
- package/dist/cjs/components/common/styles.js +14 -16
- package/dist/cjs/components/picker/CategorySelector.js +1 -1
- package/dist/cjs/components/picker/EmojiPickerListSearch.js +13 -17
- package/dist/cjs/components/picker/EmojiPickerVirtualItems.js +1 -1
- package/dist/cjs/components/picker/styles.js +16 -16
- package/dist/cjs/components/typeahead/styles.js +5 -3
- package/dist/cjs/components/uploader/styles.js +4 -2
- package/dist/cjs/element.js +4 -4
- package/dist/cjs/i18n/index.js +36 -36
- package/dist/cjs/index.js +51 -51
- package/dist/cjs/resource.js +4 -4
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/cjs/util/constants.js +1 -1
- package/dist/cjs/util/filters.js +1 -1
- package/dist/cjs/util/image.js +1 -1
- package/dist/cjs/util/logger.js +1 -1
- package/dist/cjs/util/mouse.js +1 -1
- package/dist/cjs/util/shared-styles.js +9 -11
- package/dist/cjs/util/storage-available.js +2 -1
- package/dist/cjs/util/type-helpers.js +1 -1
- package/dist/cjs/utils.js +8 -8
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/common/DeleteButton.js +2 -1
- package/dist/es2019/components/common/EmojiUploadPicker.js +4 -9
- package/dist/es2019/components/common/styles.js +12 -15
- package/dist/es2019/components/picker/EmojiPickerListSearch.js +11 -16
- package/dist/es2019/components/picker/styles.js +15 -16
- package/dist/es2019/components/typeahead/styles.js +3 -2
- package/dist/es2019/components/uploader/styles.js +2 -1
- package/dist/es2019/util/shared-styles.js +7 -9
- package/dist/es2019/util/storage-available.js +2 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/common/DeleteButton.js +2 -1
- package/dist/esm/components/common/EmojiUploadPicker.js +4 -9
- package/dist/esm/components/common/styles.js +12 -15
- package/dist/esm/components/picker/EmojiPickerListSearch.js +12 -17
- package/dist/esm/components/picker/styles.js +15 -16
- package/dist/esm/components/typeahead/styles.js +3 -2
- package/dist/esm/components/uploader/styles.js +2 -1
- package/dist/esm/util/shared-styles.js +7 -9
- package/dist/esm/util/storage-available.js +2 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/util/shared-styles.d.ts +6 -7
- package/package.json +9 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
2
2
|
import * as colors from '@atlaskit/theme/colors';
|
|
3
|
+
import { token } from '@atlaskit/tokens';
|
|
3
4
|
import { defaultEmojiHeight } from '../../util/constants';
|
|
4
5
|
import { akEmojiSelectedBackgroundColor } from '../../util/shared-styles';
|
|
5
6
|
import { style } from 'typestyle';
|
|
@@ -176,7 +177,7 @@ export const emojiPreview = style({
|
|
|
176
177
|
$nest: {
|
|
177
178
|
[`.${name}`]: {
|
|
178
179
|
display: 'block',
|
|
179
|
-
color: colors.N900,
|
|
180
|
+
color: token('color.text.highEmphasis', colors.N900),
|
|
180
181
|
overflow: 'hidden',
|
|
181
182
|
textOverflow: 'ellipsis',
|
|
182
183
|
whiteSpace: 'nowrap',
|
|
@@ -188,7 +189,7 @@ export const emojiPreview = style({
|
|
|
188
189
|
},
|
|
189
190
|
[`.${shortName}`]: {
|
|
190
191
|
display: 'block',
|
|
191
|
-
color: colors.N200,
|
|
192
|
+
color: token('color.text.mediumEmphasis', colors.N200),
|
|
192
193
|
fontSize: '12px',
|
|
193
194
|
lineHeight: 1,
|
|
194
195
|
marginBottom: '-2px',
|
|
@@ -206,7 +207,7 @@ export const emojiPreview = style({
|
|
|
206
207
|
display: 'none'
|
|
207
208
|
},
|
|
208
209
|
[`.${shortName}`]: {
|
|
209
|
-
color: colors.N900,
|
|
210
|
+
color: token('color.text.highEmphasis', colors.N900),
|
|
210
211
|
fontSize: '14px'
|
|
211
212
|
}
|
|
212
213
|
}
|
|
@@ -234,7 +235,7 @@ export const emojiPreview = style({
|
|
|
234
235
|
}); // Scrollable
|
|
235
236
|
|
|
236
237
|
export const emojiScrollable = style({
|
|
237
|
-
border:
|
|
238
|
+
border: `1px solid ${token('color.border.neutral', '#fff')}`,
|
|
238
239
|
borderRadius: `${borderRadius()}px`,
|
|
239
240
|
display: 'block',
|
|
240
241
|
margin: '0',
|
|
@@ -251,7 +252,7 @@ export const emojiUpload = style({
|
|
|
251
252
|
justifyContent: 'space-around'
|
|
252
253
|
});
|
|
253
254
|
export const uploadChooseFileMessage = style({
|
|
254
|
-
color: colors.N300,
|
|
255
|
+
color: token('color.text.mediumEmphasis', colors.N300),
|
|
255
256
|
fontSize: '12px',
|
|
256
257
|
paddingBottom: '7px'
|
|
257
258
|
});
|
|
@@ -269,11 +270,7 @@ export const uploadChooseFileEmojiName = style({
|
|
|
269
270
|
input: {
|
|
270
271
|
background: 'transparent',
|
|
271
272
|
border: 0,
|
|
272
|
-
fontSize: '12px',
|
|
273
273
|
outline: 'none',
|
|
274
|
-
width: '100%',
|
|
275
|
-
height: '22px',
|
|
276
|
-
// fixed height is required to work in IE11 and other browsers in Windows
|
|
277
274
|
$nest: {
|
|
278
275
|
['&:invalid']: {
|
|
279
276
|
boxShadow: 'none'
|
|
@@ -298,14 +295,14 @@ export const uploadPreview = style({
|
|
|
298
295
|
display: 'flex',
|
|
299
296
|
justifyContent: 'space-between',
|
|
300
297
|
alignItems: 'center',
|
|
301
|
-
background: colors.N20,
|
|
298
|
+
background: token('color.background.subtleNeutral.resting', colors.N20),
|
|
302
299
|
borderRadius: `${borderRadius()}px`,
|
|
303
300
|
padding: '10px'
|
|
304
301
|
});
|
|
305
302
|
export const uploadPreviewText = style({
|
|
306
303
|
$nest: {
|
|
307
304
|
h5: {
|
|
308
|
-
color: colors.N300,
|
|
305
|
+
color: token('color.text.mediumEmphasis', colors.N300),
|
|
309
306
|
paddingBottom: '4px',
|
|
310
307
|
fontSize: '12px'
|
|
311
308
|
},
|
|
@@ -349,7 +346,7 @@ export const deleteText = style({
|
|
|
349
346
|
height: '64px',
|
|
350
347
|
$nest: {
|
|
351
348
|
':first-child': {
|
|
352
|
-
color: colors.N300,
|
|
349
|
+
color: token('color.text.mediumEmphasis', colors.N300),
|
|
353
350
|
lineHeight: '16px'
|
|
354
351
|
}
|
|
355
352
|
}
|
|
@@ -386,20 +383,20 @@ export const deleteFooter = style({
|
|
|
386
383
|
});
|
|
387
384
|
export const emojiDeleteErrorMessage = style({
|
|
388
385
|
display: 'flex',
|
|
389
|
-
color: colors.R400,
|
|
386
|
+
color: token('color.text.danger', colors.R400),
|
|
390
387
|
alignItems: 'center',
|
|
391
388
|
justifyContent: 'flex-end',
|
|
392
389
|
paddingRight: '4px'
|
|
393
390
|
});
|
|
394
391
|
export const emojiChooseFileErrorMessage = style({
|
|
395
392
|
display: 'flex',
|
|
396
|
-
color: colors.R300,
|
|
393
|
+
color: token('color.text.danger', colors.R300),
|
|
397
394
|
paddingRight: '10px',
|
|
398
395
|
justifyContent: 'flex-start'
|
|
399
396
|
});
|
|
400
397
|
export const emojiPreviewErrorMessage = style({
|
|
401
398
|
display: 'inline-flex',
|
|
402
|
-
color: colors.R400,
|
|
399
|
+
color: token('color.text.danger', colors.R400),
|
|
403
400
|
paddingRight: '10px',
|
|
404
401
|
justifyContent: 'flex-end',
|
|
405
402
|
alignItems: 'center'
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import
|
|
2
|
+
import React, { PureComponent } from 'react';
|
|
3
|
+
import TextField from '@atlaskit/textfield';
|
|
3
4
|
import SearchIcon from '@atlaskit/icon/glyph/search';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { PureComponent } from 'react';
|
|
6
5
|
import { FormattedMessage } from 'react-intl';
|
|
7
6
|
import { messages } from '../i18n';
|
|
8
7
|
import * as styles from './styles';
|
|
@@ -82,27 +81,23 @@ export default class EmojiPickerListSearch extends PureComponent {
|
|
|
82
81
|
return /*#__PURE__*/React.createElement("div", {
|
|
83
82
|
className: styles.pickerSearch,
|
|
84
83
|
style: style
|
|
85
|
-
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.searchPlaceholder, searchPlaceholder => /*#__PURE__*/React.createElement(
|
|
86
|
-
appearance: "standard",
|
|
87
|
-
isCompact: true,
|
|
88
|
-
isFitContainerWidthEnabled: true
|
|
89
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
90
|
-
className: styles.searchIcon
|
|
91
|
-
}, /*#__PURE__*/React.createElement(SearchIcon, {
|
|
92
|
-
label: ""
|
|
93
|
-
})), /*#__PURE__*/React.createElement(FormattedMessage, messages.searchLabel, searchLabel => /*#__PURE__*/React.createElement("input", {
|
|
84
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.searchPlaceholder, searchPlaceholder => /*#__PURE__*/React.createElement(FormattedMessage, messages.searchLabel, searchLabel => /*#__PURE__*/React.createElement(TextField, {
|
|
94
85
|
"aria-label": searchLabel,
|
|
95
86
|
className: styles.input,
|
|
96
87
|
autoComplete: "off",
|
|
97
|
-
disabled: false,
|
|
98
88
|
name: "search",
|
|
99
89
|
placeholder: `${searchPlaceholder}...`,
|
|
100
|
-
required: false,
|
|
101
90
|
onChange: this.onChange,
|
|
102
91
|
value: query || '',
|
|
103
92
|
ref: this.handleInputRef,
|
|
104
|
-
|
|
105
|
-
|
|
93
|
+
isCompact: true,
|
|
94
|
+
onBlur: this.onBlur,
|
|
95
|
+
elemBeforeInput: /*#__PURE__*/React.createElement("span", {
|
|
96
|
+
className: styles.searchIcon
|
|
97
|
+
}, /*#__PURE__*/React.createElement(SearchIcon, {
|
|
98
|
+
label: ""
|
|
99
|
+
}))
|
|
100
|
+
}))));
|
|
106
101
|
}
|
|
107
102
|
|
|
108
103
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { style } from 'typestyle';
|
|
2
|
+
import { token } from '@atlaskit/tokens';
|
|
2
3
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
3
4
|
import * as colors from '@atlaskit/theme/colors';
|
|
4
|
-
import { akEmojiSelectedBackgroundColor,
|
|
5
|
+
import { akEmojiSelectedBackgroundColor, emojiPickerBorderColor, emojiPickerBoxShadow } from '../../util/shared-styles';
|
|
5
6
|
import { emojiSprite, placeholder, emojiNode } from '../common/styles';
|
|
6
7
|
import { emojiPickerHeight, emojiPickerWidth } from '../../util/constants';
|
|
7
8
|
export const active = 'emoji-picker-active';
|
|
@@ -11,7 +12,7 @@ export const emojiPicker = style({
|
|
|
11
12
|
display: 'flex',
|
|
12
13
|
flexDirection: 'column',
|
|
13
14
|
justifyContent: 'space-between',
|
|
14
|
-
background: 'white',
|
|
15
|
+
background: token('color.background.overlay', 'white'),
|
|
15
16
|
border: `${emojiPickerBorderColor} 1px solid`,
|
|
16
17
|
borderRadius: `${borderRadius()}px`,
|
|
17
18
|
boxShadow: emojiPickerBoxShadow,
|
|
@@ -25,7 +26,7 @@ export const emojiPicker = style({
|
|
|
25
26
|
export const addButton = 'emoji-picker-add-button';
|
|
26
27
|
export const categorySelector = style({
|
|
27
28
|
flex: '0 0 auto',
|
|
28
|
-
backgroundColor: colors.N30,
|
|
29
|
+
backgroundColor: token('color.background.sunken', colors.N30),
|
|
29
30
|
$nest: {
|
|
30
31
|
ul: {
|
|
31
32
|
listStyle: 'none',
|
|
@@ -46,7 +47,7 @@ export const categorySelector = style({
|
|
|
46
47
|
}
|
|
47
48
|
},
|
|
48
49
|
[`.${addButton}`]: {
|
|
49
|
-
color: colors.N200,
|
|
50
|
+
color: token('color.text.lowEmphasis', colors.N200),
|
|
50
51
|
margin: '0 0 0 5px',
|
|
51
52
|
verticalAlign: 'middle'
|
|
52
53
|
}
|
|
@@ -55,7 +56,7 @@ export const categorySelector = style({
|
|
|
55
56
|
export const category = style({
|
|
56
57
|
backgroundColor: 'transparent',
|
|
57
58
|
border: 0,
|
|
58
|
-
color: colors.N100A,
|
|
59
|
+
color: token('color.text.lowEmphasis', colors.N100A),
|
|
59
60
|
cursor: 'pointer',
|
|
60
61
|
margin: '2px 0',
|
|
61
62
|
padding: 0,
|
|
@@ -67,22 +68,22 @@ export const category = style({
|
|
|
67
68
|
padding: 0
|
|
68
69
|
},
|
|
69
70
|
[`&.${active}`]: {
|
|
70
|
-
color: colors.B300,
|
|
71
|
+
color: token('color.text.selected', colors.B300),
|
|
71
72
|
$nest: {
|
|
72
73
|
['&:hover']: {
|
|
73
|
-
color: colors.B300
|
|
74
|
+
color: token('color.text.selected', colors.B300)
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
77
|
},
|
|
77
78
|
['&:hover']: {
|
|
78
|
-
color: colors.B200
|
|
79
|
+
color: token('color.text.selected', colors.B200)
|
|
79
80
|
},
|
|
80
81
|
[`&.${disable}`]: {
|
|
81
|
-
color: colors.N50,
|
|
82
|
+
color: token('color.text.lowEmphasis', colors.N50),
|
|
82
83
|
cursor: 'default',
|
|
83
84
|
$nest: {
|
|
84
85
|
['&:hover']: {
|
|
85
|
-
color: colors.N50
|
|
86
|
+
color: token('color.text.lowEmphasis', colors.N50)
|
|
86
87
|
}
|
|
87
88
|
}
|
|
88
89
|
}
|
|
@@ -116,14 +117,12 @@ export const pickerSearch = style({
|
|
|
116
117
|
opacity: 0.5
|
|
117
118
|
},
|
|
118
119
|
[`.${input}`]: {
|
|
119
|
-
background: 'transparent',
|
|
120
|
-
border: 0,
|
|
121
120
|
boxSizing: 'border-box',
|
|
122
121
|
color: 'inherit',
|
|
123
122
|
cursor: 'inherit',
|
|
124
123
|
fontSize: '14px',
|
|
125
124
|
outline: 'none',
|
|
126
|
-
padding: '1px 0 2px
|
|
125
|
+
padding: '1px 0 2px 6px',
|
|
127
126
|
width: '100%',
|
|
128
127
|
$nest: {
|
|
129
128
|
['&:invalid']: {
|
|
@@ -155,7 +154,7 @@ export const emojiPickerRow = style({
|
|
|
155
154
|
});
|
|
156
155
|
export const emojiCategoryTitle = style({
|
|
157
156
|
boxSizing: 'border-box',
|
|
158
|
-
color: colors.N900,
|
|
157
|
+
color: token('color.text.highEmphasis', colors.N900),
|
|
159
158
|
fontSize: '14px',
|
|
160
159
|
padding: '5px 8px',
|
|
161
160
|
textTransform: 'lowercase',
|
|
@@ -228,6 +227,6 @@ export const emojiPickerFooter = style({
|
|
|
228
227
|
flex: '0 0 auto'
|
|
229
228
|
});
|
|
230
229
|
export const emojiPickerFooterWithTopShadow = style({
|
|
231
|
-
borderTop: `2px solid ${colors.N30A}
|
|
232
|
-
boxShadow:
|
|
230
|
+
borderTop: token('color.border.neutral', `2px solid ${colors.N30A}`),
|
|
231
|
+
boxShadow: `0px -1px 1px 0px ${token('color.border.neutral', 'rgba(0, 0, 0, 0.1)')}`
|
|
233
232
|
});
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { style } from 'typestyle';
|
|
2
|
+
import { token } from '@atlaskit/tokens';
|
|
2
3
|
import { emojiPreviewSelectedColor, emojiTypeAheadMaxHeight, emojiTypeAheadWidth, noDialogContainerBorderColor, noDialogContainerBorderRadius, noDialogContainerBoxShadow } from '../../util/shared-styles';
|
|
3
4
|
export const selected = 'emoji-typeahead-selected';
|
|
4
5
|
export const emojiTypeAhead = 'emoji-typeahead-element';
|
|
5
6
|
export const typeAheadListContainer = 'emoji-typeahead-list-container';
|
|
6
7
|
export const typeAheadList = style({
|
|
7
|
-
background: 'white',
|
|
8
|
+
background: token('color.background.overlay', 'white'),
|
|
8
9
|
border: `1px solid ${noDialogContainerBorderColor}`,
|
|
9
10
|
borderRadius: noDialogContainerBorderRadius,
|
|
10
11
|
boxShadow: noDialogContainerBoxShadow,
|
|
11
|
-
color: '#333',
|
|
12
|
+
color: token('color.text.mediumEmphasis', '#333'),
|
|
12
13
|
width: emojiTypeAheadWidth
|
|
13
14
|
});
|
|
14
15
|
export const typeAheadEmpty = style({
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { style } from 'typestyle';
|
|
2
|
+
import { token } from '@atlaskit/tokens';
|
|
2
3
|
import { emojiPickerWidth } from '../../util/constants'; // Uploader
|
|
3
4
|
|
|
4
5
|
export const emojiUploadWidget = style({
|
|
@@ -6,7 +7,7 @@ export const emojiUploadWidget = style({
|
|
|
6
7
|
flexDirection: 'column',
|
|
7
8
|
justifyContent: 'center',
|
|
8
9
|
alignItems: 'stretch',
|
|
9
|
-
background: 'white',
|
|
10
|
+
background: token('color.background.overlay', 'white'),
|
|
10
11
|
height: `120px`,
|
|
11
12
|
width: `${emojiPickerWidth}px`,
|
|
12
13
|
marginBottom: '8px',
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
+
import { token } from '@atlaskit/tokens';
|
|
1
2
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
2
3
|
import { N40, N30 } from '@atlaskit/theme/colors';
|
|
3
4
|
import { emojiPickerWidth } from './constants';
|
|
4
5
|
export const emojiPickerListWidth = emojiPickerWidth;
|
|
5
6
|
export const emojiPickerListHeight = 205;
|
|
6
|
-
export const emojiPickerBorderColor = N40;
|
|
7
|
-
|
|
8
|
-
export const
|
|
9
|
-
export const emojiFooterBoxShadow = '0px -1px 1px 0px rgba(0, 0, 0, 0.1)';
|
|
10
|
-
export const noDialogContainerBorderColor = N40; // This has not been confirmed by the ADG yet
|
|
11
|
-
|
|
7
|
+
export const emojiPickerBorderColor = token('color.border.neutral', N40);
|
|
8
|
+
export const emojiPickerBoxShadow = token('shadow.overlay', '0 3px 6px rgba(0, 0, 0, 0.2)');
|
|
9
|
+
export const noDialogContainerBorderColor = token('color.border.neutral', N40);
|
|
12
10
|
export const noDialogContainerBorderRadius = `${borderRadius()}px`;
|
|
13
|
-
export const noDialogContainerBoxShadow = '0 3px 6px rgba(0, 0, 0, 0.2)';
|
|
14
|
-
export const akEmojiSelectedBackgroundColor = N30;
|
|
15
|
-
export const emojiPreviewSelectedColor = N30;
|
|
11
|
+
export const noDialogContainerBoxShadow = token('shadow.overlay', '0 3px 6px rgba(0, 0, 0, 0.2)');
|
|
12
|
+
export const akEmojiSelectedBackgroundColor = token('color.background.transparentNeutral.hover', N30);
|
|
13
|
+
export const emojiPreviewSelectedColor = token('color.background.subtleNeutral.resting', N30);
|
|
16
14
|
export const emojiTypeAheadMaxHeight = 350;
|
|
17
15
|
export const emojiTypeAheadWidth = 350;
|
|
@@ -10,7 +10,8 @@ export default function storageAvailable(type) {
|
|
|
10
10
|
storage.removeItem(x);
|
|
11
11
|
return true;
|
|
12
12
|
} catch (e) {
|
|
13
|
-
return e instanceof DOMException && (
|
|
13
|
+
return e instanceof DOMException && ( // everything except Firefox
|
|
14
|
+
e.code === 22 || // Firefox
|
|
14
15
|
e.code === 1014 || // test name field too, because code might not be present
|
|
15
16
|
// everything except Firefox
|
|
16
17
|
e.name === 'QuotaExceededError' || // Firefox
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
2
2
|
import CrossCircleIcon from '@atlaskit/icon/glyph/cross-circle';
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import { token } from '@atlaskit/tokens';
|
|
4
5
|
import { N500 } from '@atlaskit/theme/colors';
|
|
5
6
|
import { deleteEmojiLabel } from '../../util/constants';
|
|
6
7
|
import * as styles from './styles';
|
|
@@ -11,7 +12,7 @@ var DeleteButton = function DeleteButton(props) {
|
|
|
11
12
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
12
13
|
iconBefore: /*#__PURE__*/React.createElement(CrossCircleIcon, {
|
|
13
14
|
label: deleteEmojiLabel,
|
|
14
|
-
primaryColor: N500,
|
|
15
|
+
primaryColor: token('color.text.mediumEmphasis', N500),
|
|
15
16
|
size: "small"
|
|
16
17
|
}),
|
|
17
18
|
onClick: props.onClick,
|
|
@@ -10,10 +10,10 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
10
10
|
|
|
11
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
12
|
|
|
13
|
-
import AkFieldBase from '@atlaskit/field-base';
|
|
14
13
|
import React from 'react';
|
|
15
14
|
import { PureComponent } from 'react';
|
|
16
15
|
import { FormattedMessage } from 'react-intl';
|
|
16
|
+
import TextField from '@atlaskit/textfield';
|
|
17
17
|
import * as ImageUtil from '../../util/image';
|
|
18
18
|
import debug from '../../util/logger';
|
|
19
19
|
import { messages } from '../i18n';
|
|
@@ -89,23 +89,18 @@ var ChooseEmojiFile = /*#__PURE__*/function (_PureComponent) {
|
|
|
89
89
|
className: styles.uploadChooseFileRow
|
|
90
90
|
}, /*#__PURE__*/React.createElement("span", {
|
|
91
91
|
className: styles.uploadChooseFileEmojiName
|
|
92
|
-
}, /*#__PURE__*/React.createElement(AkFieldBase, {
|
|
93
|
-
appearance: "standard",
|
|
94
|
-
isCompact: true,
|
|
95
|
-
defaultIsFocused: true,
|
|
96
|
-
isFitContainerWidthEnabled: true
|
|
97
92
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.emojiPlaceholder, function (message) {
|
|
98
|
-
return /*#__PURE__*/React.createElement(
|
|
93
|
+
return /*#__PURE__*/React.createElement(TextField, {
|
|
99
94
|
placeholder: message,
|
|
100
95
|
"aria-label": message,
|
|
101
96
|
maxLength: maxNameLength,
|
|
102
97
|
onChange: onNameChange,
|
|
103
98
|
onKeyDown: _this2.onKeyDown,
|
|
104
99
|
value: name,
|
|
105
|
-
|
|
100
|
+
isCompact: true,
|
|
106
101
|
autoFocus: true
|
|
107
102
|
});
|
|
108
|
-
}))
|
|
103
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
109
104
|
className: styles.uploadChooseFileBrowse
|
|
110
105
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.emojiChooseFileTitle, function (message) {
|
|
111
106
|
return /*#__PURE__*/React.createElement(FormattedMessage, messages.emojiChooseFileScreenReaderDescription, function (screenReaderDescription) {
|
|
@@ -4,6 +4,7 @@ var _$nest, _$nest2, _$nest3, _$nest4, _$nest6, _$nest7, _$nest8, _$nest9, _$nes
|
|
|
4
4
|
|
|
5
5
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
6
6
|
import * as colors from '@atlaskit/theme/colors';
|
|
7
|
+
import { token } from '@atlaskit/tokens';
|
|
7
8
|
import { defaultEmojiHeight } from '../../util/constants';
|
|
8
9
|
import { akEmojiSelectedBackgroundColor } from '../../util/shared-styles';
|
|
9
10
|
import { style } from 'typestyle';
|
|
@@ -159,7 +160,7 @@ export var emojiPreview = style({
|
|
|
159
160
|
flexShrink: 1,
|
|
160
161
|
$nest: (_$nest6 = {}, _defineProperty(_$nest6, ".".concat(name), {
|
|
161
162
|
display: 'block',
|
|
162
|
-
color: colors.N900,
|
|
163
|
+
color: token('color.text.highEmphasis', colors.N900),
|
|
163
164
|
overflow: 'hidden',
|
|
164
165
|
textOverflow: 'ellipsis',
|
|
165
166
|
whiteSpace: 'nowrap',
|
|
@@ -168,7 +169,7 @@ export var emojiPreview = style({
|
|
|
168
169
|
})
|
|
169
170
|
}), _defineProperty(_$nest6, ".".concat(shortName), {
|
|
170
171
|
display: 'block',
|
|
171
|
-
color: colors.N200,
|
|
172
|
+
color: token('color.text.mediumEmphasis', colors.N200),
|
|
172
173
|
fontSize: '12px',
|
|
173
174
|
lineHeight: 1,
|
|
174
175
|
marginBottom: '-2px',
|
|
@@ -182,7 +183,7 @@ export var emojiPreview = style({
|
|
|
182
183
|
$nest: (_$nest7 = {}, _defineProperty(_$nest7, ".".concat(name), {
|
|
183
184
|
display: 'none'
|
|
184
185
|
}), _defineProperty(_$nest7, ".".concat(shortName), {
|
|
185
|
-
color: colors.N900,
|
|
186
|
+
color: token('color.text.highEmphasis', colors.N900),
|
|
186
187
|
fontSize: '14px'
|
|
187
188
|
}), _$nest7)
|
|
188
189
|
}), _$nest8)
|
|
@@ -204,7 +205,7 @@ export var emojiPreview = style({
|
|
|
204
205
|
}); // Scrollable
|
|
205
206
|
|
|
206
207
|
export var emojiScrollable = style({
|
|
207
|
-
border:
|
|
208
|
+
border: "1px solid ".concat(token('color.border.neutral', '#fff')),
|
|
208
209
|
borderRadius: "".concat(borderRadius(), "px"),
|
|
209
210
|
display: 'block',
|
|
210
211
|
margin: '0',
|
|
@@ -221,7 +222,7 @@ export var emojiUpload = style({
|
|
|
221
222
|
justifyContent: 'space-around'
|
|
222
223
|
});
|
|
223
224
|
export var uploadChooseFileMessage = style({
|
|
224
|
-
color: colors.N300,
|
|
225
|
+
color: token('color.text.mediumEmphasis', colors.N300),
|
|
225
226
|
fontSize: '12px',
|
|
226
227
|
paddingBottom: '7px'
|
|
227
228
|
});
|
|
@@ -239,11 +240,7 @@ export var uploadChooseFileEmojiName = style({
|
|
|
239
240
|
input: {
|
|
240
241
|
background: 'transparent',
|
|
241
242
|
border: 0,
|
|
242
|
-
fontSize: '12px',
|
|
243
243
|
outline: 'none',
|
|
244
|
-
width: '100%',
|
|
245
|
-
height: '22px',
|
|
246
|
-
// fixed height is required to work in IE11 and other browsers in Windows
|
|
247
244
|
$nest: (_$nest10 = {}, _defineProperty(_$nest10, '&:invalid', {
|
|
248
245
|
boxShadow: 'none'
|
|
249
246
|
}), _defineProperty(_$nest10, '&::-ms-clear', {
|
|
@@ -265,14 +262,14 @@ export var uploadPreview = style({
|
|
|
265
262
|
display: 'flex',
|
|
266
263
|
justifyContent: 'space-between',
|
|
267
264
|
alignItems: 'center',
|
|
268
|
-
background: colors.N20,
|
|
265
|
+
background: token('color.background.subtleNeutral.resting', colors.N20),
|
|
269
266
|
borderRadius: "".concat(borderRadius(), "px"),
|
|
270
267
|
padding: '10px'
|
|
271
268
|
});
|
|
272
269
|
export var uploadPreviewText = style({
|
|
273
270
|
$nest: {
|
|
274
271
|
h5: {
|
|
275
|
-
color: colors.N300,
|
|
272
|
+
color: token('color.text.mediumEmphasis', colors.N300),
|
|
276
273
|
paddingBottom: '4px',
|
|
277
274
|
fontSize: '12px'
|
|
278
275
|
},
|
|
@@ -316,7 +313,7 @@ export var deleteText = style({
|
|
|
316
313
|
height: '64px',
|
|
317
314
|
$nest: {
|
|
318
315
|
':first-child': {
|
|
319
|
-
color: colors.N300,
|
|
316
|
+
color: token('color.text.mediumEmphasis', colors.N300),
|
|
320
317
|
lineHeight: '16px'
|
|
321
318
|
}
|
|
322
319
|
}
|
|
@@ -350,20 +347,20 @@ export var deleteFooter = style({
|
|
|
350
347
|
});
|
|
351
348
|
export var emojiDeleteErrorMessage = style({
|
|
352
349
|
display: 'flex',
|
|
353
|
-
color: colors.R400,
|
|
350
|
+
color: token('color.text.danger', colors.R400),
|
|
354
351
|
alignItems: 'center',
|
|
355
352
|
justifyContent: 'flex-end',
|
|
356
353
|
paddingRight: '4px'
|
|
357
354
|
});
|
|
358
355
|
export var emojiChooseFileErrorMessage = style({
|
|
359
356
|
display: 'flex',
|
|
360
|
-
color: colors.R300,
|
|
357
|
+
color: token('color.text.danger', colors.R300),
|
|
361
358
|
paddingRight: '10px',
|
|
362
359
|
justifyContent: 'flex-start'
|
|
363
360
|
});
|
|
364
361
|
export var emojiPreviewErrorMessage = style({
|
|
365
362
|
display: 'inline-flex',
|
|
366
|
-
color: colors.R400,
|
|
363
|
+
color: token('color.text.danger', colors.R400),
|
|
367
364
|
paddingRight: '10px',
|
|
368
365
|
justifyContent: 'flex-end',
|
|
369
366
|
alignItems: 'center'
|
|
@@ -10,10 +10,9 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
10
10
|
|
|
11
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
12
|
|
|
13
|
-
import
|
|
13
|
+
import React, { PureComponent } from 'react';
|
|
14
|
+
import TextField from '@atlaskit/textfield';
|
|
14
15
|
import SearchIcon from '@atlaskit/icon/glyph/search';
|
|
15
|
-
import React from 'react';
|
|
16
|
-
import { PureComponent } from 'react';
|
|
17
16
|
import { FormattedMessage } from 'react-intl';
|
|
18
17
|
import { messages } from '../i18n';
|
|
19
18
|
import * as styles from './styles';
|
|
@@ -113,29 +112,25 @@ var EmojiPickerListSearch = /*#__PURE__*/function (_PureComponent) {
|
|
|
113
112
|
className: styles.pickerSearch,
|
|
114
113
|
style: style
|
|
115
114
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.searchPlaceholder, function (searchPlaceholder) {
|
|
116
|
-
return /*#__PURE__*/React.createElement(
|
|
117
|
-
|
|
118
|
-
isCompact: true,
|
|
119
|
-
isFitContainerWidthEnabled: true
|
|
120
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
121
|
-
className: styles.searchIcon
|
|
122
|
-
}, /*#__PURE__*/React.createElement(SearchIcon, {
|
|
123
|
-
label: ""
|
|
124
|
-
})), /*#__PURE__*/React.createElement(FormattedMessage, messages.searchLabel, function (searchLabel) {
|
|
125
|
-
return /*#__PURE__*/React.createElement("input", {
|
|
115
|
+
return /*#__PURE__*/React.createElement(FormattedMessage, messages.searchLabel, function (searchLabel) {
|
|
116
|
+
return /*#__PURE__*/React.createElement(TextField, {
|
|
126
117
|
"aria-label": searchLabel,
|
|
127
118
|
className: styles.input,
|
|
128
119
|
autoComplete: "off",
|
|
129
|
-
disabled: false,
|
|
130
120
|
name: "search",
|
|
131
121
|
placeholder: "".concat(searchPlaceholder, "..."),
|
|
132
|
-
required: false,
|
|
133
122
|
onChange: _this2.onChange,
|
|
134
123
|
value: query || '',
|
|
135
124
|
ref: _this2.handleInputRef,
|
|
136
|
-
|
|
125
|
+
isCompact: true,
|
|
126
|
+
onBlur: _this2.onBlur,
|
|
127
|
+
elemBeforeInput: /*#__PURE__*/React.createElement("span", {
|
|
128
|
+
className: styles.searchIcon
|
|
129
|
+
}, /*#__PURE__*/React.createElement(SearchIcon, {
|
|
130
|
+
label: ""
|
|
131
|
+
}))
|
|
137
132
|
});
|
|
138
|
-
})
|
|
133
|
+
});
|
|
139
134
|
}));
|
|
140
135
|
}
|
|
141
136
|
}]);
|