@atlaskit/emoji 64.1.1 → 64.3.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.
Files changed (266) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +3 -0
  3. package/dist/cjs/api/EmojiResource.js +36 -1
  4. package/dist/cjs/api/media/SiteEmojiResource.js +10 -2
  5. package/dist/cjs/components/common/CachingEmoji.js +33 -5
  6. package/dist/cjs/components/common/DeleteButton.js +9 -13
  7. package/dist/cjs/components/common/Emoji.js +25 -36
  8. package/dist/cjs/components/common/EmojiActions.js +26 -31
  9. package/dist/cjs/components/common/EmojiButton.js +7 -7
  10. package/dist/cjs/components/common/EmojiDeletePreview.js +20 -26
  11. package/dist/cjs/components/common/EmojiErrorMessage.js +10 -14
  12. package/dist/cjs/components/common/EmojiPlaceholder.js +5 -12
  13. package/dist/cjs/components/common/EmojiPreview.js +20 -40
  14. package/dist/cjs/components/common/EmojiPreviewComponent.js +34 -0
  15. package/dist/cjs/components/common/EmojiUploadPicker.js +26 -24
  16. package/dist/cjs/components/common/EmojiUploadPreview.js +22 -28
  17. package/dist/cjs/components/common/ResourcedEmoji.js +25 -9
  18. package/dist/cjs/components/common/ResourcedEmojiComponent.js +17 -0
  19. package/dist/cjs/components/common/RetryableButton.js +12 -18
  20. package/dist/cjs/components/common/Scrollable.js +5 -10
  21. package/dist/cjs/components/common/UfoErrorBoundary.js +52 -0
  22. package/dist/cjs/components/common/styles.js +210 -266
  23. package/dist/cjs/components/picker/CategorySelector.js +13 -12
  24. package/dist/cjs/components/picker/EmojiPicker.js +6 -6
  25. package/dist/cjs/components/picker/EmojiPickerCategoryHeading.js +8 -14
  26. package/dist/cjs/components/picker/EmojiPickerComponent.js +9 -18
  27. package/dist/cjs/components/picker/EmojiPickerEmojiRow.js +8 -12
  28. package/dist/cjs/components/picker/EmojiPickerFooter.js +8 -14
  29. package/dist/cjs/components/picker/EmojiPickerList.js +8 -9
  30. package/dist/cjs/components/picker/EmojiPickerListSearch.js +10 -8
  31. package/dist/cjs/components/picker/EmojiPickerVirtualItems.js +9 -15
  32. package/dist/cjs/components/picker/styles.js +113 -161
  33. package/dist/cjs/components/typeahead/EmojiTypeAheadComponent.js +9 -15
  34. package/dist/cjs/components/typeahead/EmojiTypeAheadItem.js +10 -13
  35. package/dist/cjs/components/typeahead/EmojiTypeAheadList.js +17 -22
  36. package/dist/cjs/components/typeahead/styles.js +17 -19
  37. package/dist/cjs/components/uploader/EmojiUploadComponent.js +10 -16
  38. package/dist/cjs/components/uploader/styles.js +4 -4
  39. package/dist/cjs/i18n/cs.js +2 -2
  40. package/dist/cjs/i18n/da.js +2 -2
  41. package/dist/cjs/i18n/de.js +2 -2
  42. package/dist/cjs/i18n/en_ZZ.js +51 -0
  43. package/dist/cjs/i18n/es.js +2 -2
  44. package/dist/cjs/i18n/et.js +2 -2
  45. package/dist/cjs/i18n/fi.js +2 -2
  46. package/dist/cjs/i18n/fr.js +2 -2
  47. package/dist/cjs/i18n/hu.js +2 -2
  48. package/dist/cjs/i18n/it.js +2 -2
  49. package/dist/cjs/i18n/ja.js +2 -2
  50. package/dist/cjs/i18n/ko.js +2 -2
  51. package/dist/cjs/i18n/nb.js +2 -2
  52. package/dist/cjs/i18n/nl.js +2 -2
  53. package/dist/cjs/i18n/pl.js +2 -2
  54. package/dist/cjs/i18n/pt_BR.js +2 -2
  55. package/dist/cjs/i18n/pt_PT.js +2 -2
  56. package/dist/cjs/i18n/ru.js +2 -2
  57. package/dist/cjs/i18n/sk.js +2 -2
  58. package/dist/cjs/i18n/sv.js +2 -2
  59. package/dist/cjs/i18n/th.js +2 -2
  60. package/dist/cjs/i18n/tr.js +2 -2
  61. package/dist/cjs/i18n/uk.js +2 -2
  62. package/dist/cjs/i18n/vi.js +2 -2
  63. package/dist/cjs/i18n/zh.js +2 -2
  64. package/dist/cjs/i18n/zh_TW.js +2 -2
  65. package/dist/cjs/index.js +3 -3
  66. package/dist/cjs/types.js +12 -2
  67. package/dist/cjs/util/{analytics.js → analytics/analytics.js} +34 -2
  68. package/dist/cjs/util/analytics/index.js +203 -0
  69. package/dist/cjs/util/analytics/samplingUfo.js +278 -0
  70. package/dist/cjs/util/analytics/useSampledUFOComponentExperience.js +49 -0
  71. package/dist/cjs/util/constants.js +10 -3
  72. package/dist/cjs/version.json +1 -1
  73. package/dist/es2019/api/EmojiResource.js +28 -1
  74. package/dist/es2019/api/media/SiteEmojiResource.js +10 -2
  75. package/dist/es2019/components/common/CachingEmoji.js +29 -5
  76. package/dist/es2019/components/common/DeleteButton.js +8 -6
  77. package/dist/es2019/components/common/Emoji.js +27 -36
  78. package/dist/es2019/components/common/EmojiActions.js +26 -24
  79. package/dist/es2019/components/common/EmojiButton.js +6 -6
  80. package/dist/es2019/components/common/EmojiDeletePreview.js +20 -20
  81. package/dist/es2019/components/common/EmojiErrorMessage.js +9 -8
  82. package/dist/es2019/components/common/EmojiPlaceholder.js +5 -8
  83. package/dist/es2019/components/common/EmojiPreview.js +19 -35
  84. package/dist/es2019/components/common/EmojiPreviewComponent.js +21 -0
  85. package/dist/es2019/components/common/EmojiUploadPicker.js +25 -22
  86. package/dist/es2019/components/common/EmojiUploadPreview.js +22 -22
  87. package/dist/es2019/components/common/ResourcedEmoji.js +22 -5
  88. package/dist/es2019/components/common/ResourcedEmojiComponent.js +16 -0
  89. package/dist/es2019/components/common/RetryableButton.js +10 -11
  90. package/dist/es2019/components/common/Scrollable.js +6 -10
  91. package/dist/es2019/components/common/UfoErrorBoundary.js +11 -0
  92. package/dist/es2019/components/common/styles.js +195 -262
  93. package/dist/es2019/components/picker/CategorySelector.js +15 -12
  94. package/dist/es2019/components/picker/EmojiPicker.js +7 -5
  95. package/dist/es2019/components/picker/EmojiPickerCategoryHeading.js +8 -8
  96. package/dist/es2019/components/picker/EmojiPickerComponent.js +10 -10
  97. package/dist/es2019/components/picker/EmojiPickerEmojiRow.js +8 -7
  98. package/dist/es2019/components/picker/EmojiPickerFooter.js +8 -8
  99. package/dist/es2019/components/picker/EmojiPickerList.js +9 -8
  100. package/dist/es2019/components/picker/EmojiPickerListSearch.js +11 -8
  101. package/dist/es2019/components/picker/EmojiPickerVirtualItems.js +10 -8
  102. package/dist/es2019/components/picker/styles.js +112 -160
  103. package/dist/es2019/components/typeahead/EmojiTypeAheadComponent.js +9 -8
  104. package/dist/es2019/components/typeahead/EmojiTypeAheadItem.js +12 -13
  105. package/dist/es2019/components/typeahead/EmojiTypeAheadList.js +18 -19
  106. package/dist/es2019/components/typeahead/styles.js +14 -15
  107. package/dist/es2019/components/uploader/EmojiUploadComponent.js +10 -9
  108. package/dist/es2019/components/uploader/styles.js +4 -4
  109. package/dist/es2019/i18n/cs.js +2 -2
  110. package/dist/es2019/i18n/da.js +2 -2
  111. package/dist/es2019/i18n/de.js +2 -2
  112. package/dist/es2019/i18n/en_ZZ.js +43 -0
  113. package/dist/es2019/i18n/es.js +2 -2
  114. package/dist/es2019/i18n/et.js +2 -2
  115. package/dist/es2019/i18n/fi.js +2 -2
  116. package/dist/es2019/i18n/fr.js +2 -2
  117. package/dist/es2019/i18n/hu.js +2 -2
  118. package/dist/es2019/i18n/it.js +2 -2
  119. package/dist/es2019/i18n/ja.js +2 -2
  120. package/dist/es2019/i18n/ko.js +2 -2
  121. package/dist/es2019/i18n/nb.js +2 -2
  122. package/dist/es2019/i18n/nl.js +2 -2
  123. package/dist/es2019/i18n/pl.js +2 -2
  124. package/dist/es2019/i18n/pt_BR.js +2 -2
  125. package/dist/es2019/i18n/pt_PT.js +2 -2
  126. package/dist/es2019/i18n/ru.js +2 -2
  127. package/dist/es2019/i18n/sk.js +2 -2
  128. package/dist/es2019/i18n/sv.js +2 -2
  129. package/dist/es2019/i18n/th.js +2 -2
  130. package/dist/es2019/i18n/tr.js +2 -2
  131. package/dist/es2019/i18n/uk.js +2 -2
  132. package/dist/es2019/i18n/vi.js +2 -2
  133. package/dist/es2019/i18n/zh.js +2 -2
  134. package/dist/es2019/i18n/zh_TW.js +2 -2
  135. package/dist/es2019/index.js +2 -1
  136. package/dist/es2019/types.js +10 -1
  137. package/dist/es2019/util/{analytics.js → analytics/analytics.js} +28 -1
  138. package/dist/es2019/util/analytics/index.js +3 -0
  139. package/dist/es2019/util/analytics/samplingUfo.js +147 -0
  140. package/dist/es2019/util/analytics/useSampledUFOComponentExperience.js +39 -0
  141. package/dist/es2019/util/constants.js +5 -1
  142. package/dist/es2019/version.json +1 -1
  143. package/dist/esm/api/EmojiResource.js +32 -1
  144. package/dist/esm/api/media/SiteEmojiResource.js +10 -2
  145. package/dist/esm/components/common/CachingEmoji.js +31 -5
  146. package/dist/esm/components/common/DeleteButton.js +8 -6
  147. package/dist/esm/components/common/Emoji.js +26 -29
  148. package/dist/esm/components/common/EmojiActions.js +26 -25
  149. package/dist/esm/components/common/EmojiButton.js +6 -6
  150. package/dist/esm/components/common/EmojiDeletePreview.js +19 -20
  151. package/dist/esm/components/common/EmojiErrorMessage.js +9 -8
  152. package/dist/esm/components/common/EmojiPlaceholder.js +5 -8
  153. package/dist/esm/components/common/EmojiPreview.js +19 -33
  154. package/dist/esm/components/common/EmojiPreviewComponent.js +20 -0
  155. package/dist/esm/components/common/EmojiUploadPicker.js +27 -25
  156. package/dist/esm/components/common/EmojiUploadPreview.js +21 -22
  157. package/dist/esm/components/common/ResourcedEmoji.js +22 -9
  158. package/dist/esm/components/common/ResourcedEmojiComponent.js +16 -0
  159. package/dist/esm/components/common/RetryableButton.js +11 -12
  160. package/dist/esm/components/common/Scrollable.js +6 -10
  161. package/dist/esm/components/common/UfoErrorBoundary.js +38 -0
  162. package/dist/esm/components/common/styles.js +192 -242
  163. package/dist/esm/components/picker/CategorySelector.js +14 -12
  164. package/dist/esm/components/picker/EmojiPicker.js +6 -5
  165. package/dist/esm/components/picker/EmojiPickerCategoryHeading.js +8 -8
  166. package/dist/esm/components/picker/EmojiPickerComponent.js +9 -10
  167. package/dist/esm/components/picker/EmojiPickerEmojiRow.js +8 -7
  168. package/dist/esm/components/picker/EmojiPickerFooter.js +8 -8
  169. package/dist/esm/components/picker/EmojiPickerList.js +8 -8
  170. package/dist/esm/components/picker/EmojiPickerListSearch.js +10 -8
  171. package/dist/esm/components/picker/EmojiPickerVirtualItems.js +9 -8
  172. package/dist/esm/components/picker/styles.js +108 -149
  173. package/dist/esm/components/typeahead/EmojiTypeAheadComponent.js +8 -8
  174. package/dist/esm/components/typeahead/EmojiTypeAheadItem.js +11 -13
  175. package/dist/esm/components/typeahead/EmojiTypeAheadList.js +17 -19
  176. package/dist/esm/components/typeahead/styles.js +14 -14
  177. package/dist/esm/components/uploader/EmojiUploadComponent.js +9 -9
  178. package/dist/esm/components/uploader/styles.js +4 -4
  179. package/dist/esm/i18n/cs.js +2 -2
  180. package/dist/esm/i18n/da.js +2 -2
  181. package/dist/esm/i18n/de.js +2 -2
  182. package/dist/esm/i18n/en_ZZ.js +43 -0
  183. package/dist/esm/i18n/es.js +2 -2
  184. package/dist/esm/i18n/et.js +2 -2
  185. package/dist/esm/i18n/fi.js +2 -2
  186. package/dist/esm/i18n/fr.js +2 -2
  187. package/dist/esm/i18n/hu.js +2 -2
  188. package/dist/esm/i18n/it.js +2 -2
  189. package/dist/esm/i18n/ja.js +2 -2
  190. package/dist/esm/i18n/ko.js +2 -2
  191. package/dist/esm/i18n/nb.js +2 -2
  192. package/dist/esm/i18n/nl.js +2 -2
  193. package/dist/esm/i18n/pl.js +2 -2
  194. package/dist/esm/i18n/pt_BR.js +2 -2
  195. package/dist/esm/i18n/pt_PT.js +2 -2
  196. package/dist/esm/i18n/ru.js +2 -2
  197. package/dist/esm/i18n/sk.js +2 -2
  198. package/dist/esm/i18n/sv.js +2 -2
  199. package/dist/esm/i18n/th.js +2 -2
  200. package/dist/esm/i18n/tr.js +2 -2
  201. package/dist/esm/i18n/uk.js +2 -2
  202. package/dist/esm/i18n/vi.js +2 -2
  203. package/dist/esm/i18n/zh.js +2 -2
  204. package/dist/esm/i18n/zh_TW.js +2 -2
  205. package/dist/esm/index.js +2 -1
  206. package/dist/esm/types.js +10 -1
  207. package/dist/esm/util/{analytics.js → analytics/analytics.js} +28 -1
  208. package/dist/esm/util/analytics/index.js +3 -0
  209. package/dist/esm/util/analytics/samplingUfo.js +259 -0
  210. package/dist/esm/util/analytics/useSampledUFOComponentExperience.js +39 -0
  211. package/dist/esm/util/constants.js +5 -1
  212. package/dist/esm/version.json +1 -1
  213. package/dist/types/api/EmojiResource.d.ts +1 -0
  214. package/dist/types/components/common/EmojiActions.d.ts +2 -3
  215. package/dist/types/components/common/EmojiDeletePreview.d.ts +3 -3
  216. package/dist/types/components/common/EmojiErrorMessage.d.ts +2 -1
  217. package/dist/types/components/common/EmojiPreview.d.ts +2 -3
  218. package/dist/types/components/common/EmojiPreviewComponent.d.ts +7 -0
  219. package/dist/types/components/common/EmojiUploadPreview.d.ts +3 -3
  220. package/dist/types/components/common/ResourcedEmoji.d.ts +2 -0
  221. package/dist/types/components/common/RetryableButton.d.ts +0 -2
  222. package/dist/types/components/common/UfoErrorBoundary.d.ts +8 -0
  223. package/dist/types/components/common/styles.d.ts +44 -44
  224. package/dist/types/components/picker/EmojiPicker.d.ts +2 -3
  225. package/dist/types/components/picker/styles.d.ts +17 -18
  226. package/dist/types/components/typeahead/styles.d.ts +8 -7
  227. package/dist/types/components/uploader/styles.d.ts +2 -2
  228. package/dist/types/i18n/cs.d.ts +1 -1
  229. package/dist/types/i18n/da.d.ts +1 -1
  230. package/dist/types/i18n/de.d.ts +1 -1
  231. package/dist/types/i18n/en_ZZ.d.ts +43 -0
  232. package/dist/types/i18n/es.d.ts +1 -1
  233. package/dist/types/i18n/et.d.ts +1 -1
  234. package/dist/types/i18n/fi.d.ts +1 -1
  235. package/dist/types/i18n/fr.d.ts +1 -1
  236. package/dist/types/i18n/hu.d.ts +1 -1
  237. package/dist/types/i18n/it.d.ts +1 -1
  238. package/dist/types/i18n/ja.d.ts +1 -1
  239. package/dist/types/i18n/ko.d.ts +1 -1
  240. package/dist/types/i18n/nb.d.ts +1 -1
  241. package/dist/types/i18n/nl.d.ts +1 -1
  242. package/dist/types/i18n/pl.d.ts +1 -1
  243. package/dist/types/i18n/pt_BR.d.ts +1 -1
  244. package/dist/types/i18n/pt_PT.d.ts +1 -1
  245. package/dist/types/i18n/ru.d.ts +1 -1
  246. package/dist/types/i18n/sk.d.ts +1 -1
  247. package/dist/types/i18n/sv.d.ts +1 -1
  248. package/dist/types/i18n/th.d.ts +1 -1
  249. package/dist/types/i18n/tr.d.ts +1 -1
  250. package/dist/types/i18n/uk.d.ts +1 -1
  251. package/dist/types/i18n/vi.d.ts +1 -1
  252. package/dist/types/i18n/zh.d.ts +1 -1
  253. package/dist/types/i18n/zh_TW.d.ts +1 -1
  254. package/dist/types/index.d.ts +1 -1
  255. package/dist/types/types.d.ts +6 -0
  256. package/dist/types/util/{analytics.d.ts → analytics/analytics.d.ts} +9 -5
  257. package/dist/types/util/analytics/index.d.ts +5 -0
  258. package/dist/types/util/analytics/samplingUfo.d.ts +31 -0
  259. package/dist/types/util/analytics/useSampledUFOComponentExperience.d.ts +8 -0
  260. package/dist/types/util/constants.d.ts +2 -0
  261. package/local-config-example.ts +3 -3
  262. package/package.json +14 -11
  263. package/dist/cjs/components/picker/EmojiPickerPreview.js +0 -87
  264. package/dist/es2019/components/picker/EmojiPickerPreview.js +0 -43
  265. package/dist/esm/components/picker/EmojiPickerPreview.js +0 -67
  266. package/dist/types/components/picker/EmojiPickerPreview.d.ts +0 -9
@@ -1,18 +1,16 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
 
3
- var _$nest4, _$nest5, _$nest6, _$nest8;
3
+ var _css4, _css5, _css6;
4
4
 
5
- import { style } from 'typestyle';
5
+ import { css } from '@emotion/core';
6
6
  import { token } from '@atlaskit/tokens';
7
7
  import { borderRadius } from '@atlaskit/theme/constants';
8
- import * as colors from '@atlaskit/theme/colors';
9
- import { akEmojiSelectedBackgroundColor, emojiPickerBorderColor, emojiPickerBoxShadow } from '../../util/shared-styles';
10
- import { emojiSprite, placeholder, emojiNode } from '../common/styles';
8
+ import { emojiPickerBorderColor, emojiPickerBoxShadow } from '../../util/shared-styles';
9
+ import { emojiSprite, placeholder, emojiNodeStyles } from '../common/styles';
11
10
  import { emojiPickerHeight, emojiPickerWidth } from '../../util/constants';
12
- export var active = 'emoji-picker-active';
13
- export var disable = 'emoji-picker-disable'; // Level 1 - picker
11
+ import { B200, B300, N100A, N200, N30, N30A, N50, N900 } from '@atlaskit/theme/colors'; // Level 1 - picker
14
12
 
15
- export var emojiPicker = style({
13
+ export var emojiPicker = css({
16
14
  display: 'flex',
17
15
  flexDirection: 'column',
18
16
  justifyContent: 'space-between',
@@ -28,62 +26,57 @@ export var emojiPicker = style({
28
26
  /// Category Selector
29
27
 
30
28
  export var addButton = 'emoji-picker-add-button';
31
- export var categorySelector = style({
29
+ export var categorySelector = css(_defineProperty({
32
30
  flex: '0 0 auto',
33
- backgroundColor: token('elevation.surface.sunken', colors.N30),
34
- $nest: _defineProperty({
35
- ul: {
36
- listStyle: 'none',
37
- margin: '0 4px',
38
- padding: '3px 0',
39
- display: 'flex',
40
- flexDirection: 'row',
41
- justifyContent: 'space-around'
42
- },
43
- li: {
44
- display: 'inline-block',
45
- margin: 0,
46
- padding: 0,
47
- $nest: {
48
- button: {
49
- verticalAlign: 'middle'
50
- }
51
- }
31
+ backgroundColor: token('elevation.surface.sunken', N30),
32
+ ul: {
33
+ listStyle: 'none',
34
+ margin: '0 4px',
35
+ padding: '3px 0',
36
+ display: 'flex',
37
+ flexDirection: 'row',
38
+ justifyContent: 'space-around'
39
+ },
40
+ li: {
41
+ display: 'inline-block',
42
+ margin: 0,
43
+ padding: 0,
44
+ button: {
45
+ verticalAlign: 'middle'
52
46
  }
53
- }, ".".concat(addButton), {
54
- color: token('color.text.subtlest', colors.N200),
55
- margin: '0 0 0 5px',
56
- verticalAlign: 'middle'
57
- })
58
- });
59
- export var category = style({
47
+ }
48
+ }, ".".concat(addButton), {
49
+ color: token('color.text.subtlest', N200),
50
+ margin: '0 0 0 5px',
51
+ verticalAlign: 'middle'
52
+ }));
53
+ export var active = css(_defineProperty({
54
+ color: token('color.text.selected', B300)
55
+ }, '&:hover', {
56
+ color: token('color.text.selected', B300)
57
+ }));
58
+ export var disable = css(_defineProperty({
59
+ color: token('color.text.subtlest', N50),
60
+ cursor: 'default'
61
+ }, '&:hover', {
62
+ color: token('color.text.subtlest', N50)
63
+ }));
64
+ export var categoryStyles = css((_css4 = {
60
65
  backgroundColor: 'transparent',
61
66
  border: 0,
62
- color: token('color.text.subtlest', colors.N100A),
67
+ color: token('color.text.subtlest', N100A),
63
68
  cursor: 'pointer',
64
69
  margin: '2px 0',
65
70
  padding: 0,
66
- transition: 'color 0.2s ease',
67
- $nest: (_$nest4 = {}, _defineProperty(_$nest4, '&::-moz-focus-inner', {
68
- border: '0 none',
69
- padding: 0
70
- }), _defineProperty(_$nest4, "&.".concat(active), {
71
- color: token('color.text.brand', colors.B300),
72
- $nest: _defineProperty({}, '&:hover', {
73
- color: token('color.text.brand', colors.B300)
74
- })
75
- }), _defineProperty(_$nest4, '&:hover', {
76
- color: token('color.text.brand', colors.B200)
77
- }), _defineProperty(_$nest4, "&.".concat(disable), {
78
- color: token('color.text.subtlest', colors.N50),
79
- cursor: 'default',
80
- $nest: _defineProperty({}, '&:hover', {
81
- color: token('color.text.subtlest', colors.N50)
82
- })
83
- }), _$nest4)
84
- }); /// EmojiPickerList
71
+ transition: 'color 0.2s ease'
72
+ }, _defineProperty(_css4, '&::-moz-focus-inner', {
73
+ border: '0 none',
74
+ padding: 0
75
+ }), _defineProperty(_css4, '&:hover', {
76
+ color: token('color.text.selected', B200)
77
+ }), _css4)); /// EmojiPickerList
85
78
 
86
- export var emojiPickerList = style({
79
+ export var emojiPickerList = css({
87
80
  display: 'flex',
88
81
  flexDirection: 'column',
89
82
  flex: '1 1 auto',
@@ -91,128 +84,94 @@ export var emojiPickerList = style({
91
84
  height: '0'
92
85
  }); // react-virtualized enables focus style by default - turn it off
93
86
 
94
- export var virtualList = style({
95
- $nest: {
96
- '&:focus': {
97
- outline: 'none'
98
- }
87
+ export var virtualList = css({
88
+ '&:focus': {
89
+ outline: 'none'
99
90
  }
100
91
  }); //// Search
101
92
 
102
- export var searchIcon = 'search-icon';
103
- export var input = 'input';
104
- export var pickerSearch = style({
93
+ export var searchIcon = css({
94
+ opacity: 0.5
95
+ });
96
+ export var input = css((_css5 = {
97
+ boxSizing: 'border-box',
98
+ color: 'inherit',
99
+ cursor: 'inherit',
100
+ fontSize: '14px',
101
+ outline: 'none',
102
+ padding: '1px 0 2px 6px',
103
+ width: '100%'
104
+ }, _defineProperty(_css5, '&:invalid', {
105
+ boxShadow: 'none'
106
+ }), _defineProperty(_css5, '&::-ms-clear', {
107
+ display: 'none'
108
+ }), _css5));
109
+ export var pickerSearch = css({
105
110
  boxSizing: 'border-box',
106
111
  padding: '10px 10px 11px 10px',
107
- width: '100%',
108
- $nest: (_$nest6 = {}, _defineProperty(_$nest6, ".".concat(searchIcon), {
109
- opacity: 0.5
110
- }), _defineProperty(_$nest6, ".".concat(input), {
111
- boxSizing: 'border-box',
112
- color: 'inherit',
113
- cursor: 'inherit',
114
- fontSize: '14px',
115
- outline: 'none',
116
- padding: '1px 0 2px 6px',
117
- width: '100%',
118
- $nest: (_$nest5 = {}, _defineProperty(_$nest5, '&:invalid', {
119
- boxShadow: 'none'
120
- }), _defineProperty(_$nest5, '&::-ms-clear', {
121
- display: 'none'
122
- }), _$nest5)
123
- }), _$nest6)
112
+ width: '100%'
124
113
  }); //// Loading/Spinner
125
114
 
126
- export var emojiPickerSpinner = style({
115
+ export var emojiPickerSpinner = css({
127
116
  display: 'flex',
128
117
  width: '100%',
129
118
  height: '150px',
130
119
  justifyContent: 'center',
131
120
  alignItems: 'center',
132
- $nest: {
133
- '>div': {
134
- flex: '0 0 auto'
135
- }
121
+ '>div': {
122
+ flex: '0 0 auto'
136
123
  }
137
124
  }); //// Category/Result
138
125
 
139
- export var emojiPickerRow = style({
126
+ export var emojiPickerRow = css({
140
127
  marginLeft: '8px'
141
128
  });
142
- export var emojiCategoryTitle = style({
129
+ export var emojiCategoryTitle = css({
143
130
  boxSizing: 'border-box',
144
- color: token('color.text', colors.N900),
131
+ color: token('color.text', N900),
145
132
  fontSize: '14px',
146
133
  padding: '5px 8px',
147
134
  textTransform: 'lowercase',
148
- $nest: {
149
- '&:first-letter': {
150
- textTransform: 'uppercase'
151
- }
135
+ '&:first-letter': {
136
+ textTransform: 'uppercase'
152
137
  }
153
138
  });
154
- export var emojiItem = style({
139
+ export var emojiItem = css((_css6 = {
155
140
  display: 'inline-block',
156
141
  textAlign: 'center',
157
- width: '40px',
158
- $nest: (_$nest8 = {}, _defineProperty(_$nest8, "&>.".concat(emojiNode), {
159
- cursor: 'pointer',
160
- padding: '8px',
161
- borderRadius: '5px',
162
- width: '24px',
163
- height: '24px',
164
- $nest: _defineProperty({
165
- // Fit non-square emoji to square
166
- '&>img': {
167
- position: 'relative',
168
- left: '50%',
169
- top: '50%',
170
- transform: 'translateX(-50%) translateY(-50%)',
171
- maxHeight: '24px',
172
- maxWidth: '24px',
173
- display: 'block'
174
- }
175
- }, "&>.".concat(emojiSprite), {
176
- height: '24px',
177
- width: '24px'
178
- })
179
- }), _defineProperty(_$nest8, "&>.".concat(placeholder), {
180
- padding: '0',
181
- margin: '7px',
182
- minWidth: '24px',
183
- maxWidth: '24px'
184
- }), _$nest8)
185
- });
186
- export var addEmoji = style({
187
- border: '2px dashed #ccc',
188
- borderRadius: "".concat(borderRadius(), "px"),
189
- backgroundColor: 'transparent',
190
- width: '32px',
191
- height: '32px',
192
- padding: 0,
193
- margin: '4px',
194
- verticalAlign: 'middle',
195
- $nest: {
196
- '&:hover': {
197
- backgroundColor: akEmojiSelectedBackgroundColor
198
- },
199
- '&:focus': {
200
- outline: '0'
201
- },
202
- span: {
203
- backgroundColor: 'inherit'
204
- }
205
- }
206
- }); /// Footer
142
+ width: '40px'
143
+ }, _defineProperty(_css6, "& .".concat(emojiNodeStyles), {
144
+ cursor: 'pointer',
145
+ padding: '8px',
146
+ borderRadius: '5px',
147
+ width: '24px',
148
+ height: '24px'
149
+ }), _defineProperty(_css6, "& .".concat(placeholder), {
150
+ padding: '0',
151
+ margin: '7px',
152
+ minWidth: '24px',
153
+ maxWidth: '24px'
154
+ }), _defineProperty(_css6, "& .".concat(emojiNodeStyles, " > img"), {
155
+ position: 'relative',
156
+ left: '50%',
157
+ top: '50%',
158
+ transform: 'translateX(-50%) translateY(-50%)',
159
+ maxHeight: '24px',
160
+ maxWidth: '24px',
161
+ display: 'block'
162
+ }), _defineProperty(_css6, "& .".concat(emojiNodeStyles, " > .").concat(emojiSprite), {
163
+ height: '24px',
164
+ width: '24px'
165
+ }), _css6)); /// Footer
207
166
 
208
- export var emojiPickerFooter = style({
167
+ export var emojiPickerFooter = css({
209
168
  flex: '0 0 auto'
210
169
  });
211
- export var emojiPickerFooterWithTopShadow = style({
212
- borderTop: "2px solid ".concat(token('color.border', colors.N30A)),
170
+ export var emojiPickerFooterWithTopShadow = css({
171
+ borderTop: "2px solid ".concat(token('color.border', N30A)),
213
172
  boxShadow: "0px -1px 1px 0px ".concat(token('color.border', 'rgba(0, 0, 0, 0.1)'))
214
173
  });
215
- export var emojiActionsContainerWithBottomShadow = style({
216
- borderBottom: "2px solid ".concat(token('color.border', colors.N30A)),
174
+ export var emojiActionsContainerWithBottomShadow = css({
175
+ borderBottom: "2px solid ".concat(token('color.border', N30A)),
217
176
  boxShadow: "0px 1px 1px 0px ".concat(token('color.border', 'rgba(0, 0, 0, 0.1)'))
218
177
  });
@@ -16,10 +16,10 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
16
16
 
17
17
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
18
18
 
19
- import classNames from 'classnames';
20
- import PropTypes from 'prop-types';
21
- import React from 'react';
19
+ /** @jsx jsx */
20
+ import { jsx } from '@emotion/core';
22
21
  import uuid from 'uuid';
22
+ import PropTypes from 'prop-types';
23
23
  import { PureComponent } from 'react';
24
24
  import { defaultListLimit } from '../../util/constants';
25
25
  import { toEmojiId } from '../../util/type-helpers';
@@ -28,7 +28,7 @@ import debug from '../../util/logger';
28
28
  import { typeaheadCancelledEvent, typeaheadSelectedEvent, typeaheadRenderedEvent } from '../../util/analytics';
29
29
  import { createRecordSelectionDefault } from '../common/RecordSelectionDefault';
30
30
  import EmojiList from './EmojiTypeAheadList';
31
- import * as styles from './styles';
31
+ import { emojiTypeAhead } from './styles';
32
32
 
33
33
  var isFullShortName = function isFullShortName(query) {
34
34
  return query && query.length > 1 && query.charAt(0) === ':' && query.charAt(query.length - 1) === ':';
@@ -295,11 +295,11 @@ var EmojiTypeAheadComponent = /*#__PURE__*/function (_PureComponent) {
295
295
  var style = {
296
296
  display: visible ? 'block' : 'none'
297
297
  };
298
- var classes = classNames(['ak-emoji-typeahead', styles.emojiTypeAhead]);
299
- return /*#__PURE__*/React.createElement("div", {
298
+ return jsx("div", {
300
299
  style: style,
301
- className: classes
302
- }, /*#__PURE__*/React.createElement(EmojiList, {
300
+ className: 'ak-emoji-typeahead',
301
+ css: emojiTypeAhead
302
+ }, jsx(EmojiList, {
303
303
  emojis: emojis,
304
304
  onEmojiSelected: recordUsageOnSelection,
305
305
  ref: this.onEmojiListRef,
@@ -10,13 +10,14 @@ 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 classNames from 'classnames';
13
+ /** @jsx jsx */
14
+ import { jsx } from '@emotion/core';
14
15
  import React from 'react';
15
16
  import { PureComponent } from 'react';
16
17
  import { toEmojiId } from '../../util/type-helpers';
17
18
  import { leftClick } from '../../util/mouse';
18
- import * as styles from './styles';
19
- import EmojiPickerPreview from '../picker/EmojiPickerPreview';
19
+ import { EmojiPreviewComponent } from '../common/EmojiPreviewComponent';
20
+ import { typeAheadItem, selected as selectedStyles, typeAheadItemRow, typeaheadSelected } from './styles';
20
21
 
21
22
  var EmojiTypeAheadItem = /*#__PURE__*/function (_PureComponent) {
22
23
  _inherits(EmojiTypeAheadItem, _PureComponent);
@@ -61,22 +62,19 @@ var EmojiTypeAheadItem = /*#__PURE__*/function (_PureComponent) {
61
62
  _createClass(EmojiTypeAheadItem, [{
62
63
  key: "render",
63
64
  value: function render() {
64
- var _classNames;
65
-
66
65
  var _this$props3 = this.props,
67
66
  selected = _this$props3.selected,
68
67
  emoji = _this$props3.emoji;
69
- var classes = classNames((_classNames = {
70
- 'ak-emoji-typeahead-item': true
71
- }, _defineProperty(_classNames, styles.typeAheadItem, true), _defineProperty(_classNames, styles.selected, selected), _classNames));
72
- return /*#__PURE__*/React.createElement("div", {
73
- className: classes,
68
+ var classes = [typeAheadItem, selected && selectedStyles];
69
+ return jsx("div", {
70
+ className: "ak-emoji-typeahead-item ".concat(selected ? typeaheadSelected : ''),
71
+ css: classes,
74
72
  onMouseDown: this.onEmojiSelected,
75
73
  onMouseMove: this.onEmojiMenuItemMouseMove,
76
74
  "data-emoji-id": emoji.shortName
77
- }, /*#__PURE__*/React.createElement("div", {
78
- className: styles.typeAheadItemRow
79
- }, /*#__PURE__*/React.createElement(EmojiPickerPreview, {
75
+ }, jsx("div", {
76
+ css: typeAheadItemRow
77
+ }, emoji && jsx(EmojiPreviewComponent, {
80
78
  emoji: emoji
81
79
  })));
82
80
  }
@@ -10,8 +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
+ /** @jsx jsx */
14
+ import { jsx } from '@emotion/core';
13
15
  import Spinner from '@atlaskit/spinner';
14
- import classNames from 'classnames';
15
16
  import React from 'react';
16
17
  import { PureComponent } from 'react';
17
18
  import { emojiTypeAheadMaxHeight } from '../../util/shared-styles';
@@ -20,7 +21,7 @@ import debug from '../../util/logger';
20
21
  import { actualMouseMove, mouseLocation } from '../../util/mouse';
21
22
  import Scrollable from '../common/Scrollable';
22
23
  import EmojiItem from './EmojiTypeAheadItem';
23
- import * as styles from './styles';
24
+ import { emojiTypeAheadSpinner, emojiTypeAheadSpinnerContainer, typeAheadEmpty, typeAheadList, typeAheadListContainer } from './styles';
24
25
 
25
26
  function wrapIndex(emojis, index) {
26
27
  var len = emojis.length;
@@ -209,9 +210,9 @@ var EmojiTypeAheadList = /*#__PURE__*/function (_PureComponent) {
209
210
 
210
211
  if (emojis && emojis.length) {
211
212
  this.items = {};
212
- return /*#__PURE__*/React.createElement("div", null, emojis.map(function (emoji, idx) {
213
+ return jsx("div", null, emojis.map(function (emoji, idx) {
213
214
  var key = getKey(emoji);
214
- var item = /*#__PURE__*/React.createElement(EmojiItem, {
215
+ var item = jsx(EmojiItem, {
215
216
  emoji: emoji,
216
217
  key: key,
217
218
  selected: _this2.isSelectedEmoji(emoji, idx),
@@ -240,34 +241,31 @@ var EmojiTypeAheadList = /*#__PURE__*/function (_PureComponent) {
240
241
  }, {
241
242
  key: "render",
242
243
  value: function render() {
243
- var _classNames;
244
-
245
244
  var _this$props2 = this.props,
246
245
  emojis = _this$props2.emojis,
247
246
  loading = _this$props2.loading;
248
247
  var hasEmoji = emojis && emojis.length;
249
- var classes = classNames((_classNames = {
250
- 'ak-emoji-typeahead-list': true
251
- }, _defineProperty(_classNames, styles.typeAheadList, true), _defineProperty(_classNames, styles.typeAheadEmpty, !hasEmoji && !loading), _classNames));
248
+ var classes = [typeAheadList, !hasEmoji && !loading && typeAheadEmpty];
252
249
  var listBody;
253
250
 
254
251
  if (loading) {
255
- listBody = /*#__PURE__*/React.createElement("div", {
256
- className: styles.emojiTypeAheadSpinnerContainer
257
- }, /*#__PURE__*/React.createElement("div", {
258
- className: styles.emojiTypeAheadSpinner
259
- }, /*#__PURE__*/React.createElement(Spinner, {
252
+ listBody = jsx("div", {
253
+ css: emojiTypeAheadSpinnerContainer
254
+ }, jsx("div", {
255
+ css: emojiTypeAheadSpinner
256
+ }, jsx(Spinner, {
260
257
  size: "medium"
261
258
  })));
262
259
  } else {
263
260
  listBody = this.renderItems(emojis);
264
261
  }
265
262
 
266
- return /*#__PURE__*/React.createElement("div", {
267
- className: styles.typeAheadListContainer
268
- }, /*#__PURE__*/React.createElement("div", {
269
- className: classes
270
- }, /*#__PURE__*/React.createElement(Scrollable, {
263
+ return jsx("div", {
264
+ css: typeAheadListContainer
265
+ }, jsx("div", {
266
+ className: 'ak-emoji-typeahead-list',
267
+ css: classes
268
+ }, jsx(Scrollable, {
271
269
  ref: this.handleScrollableRef,
272
270
  maxHeight: "".concat(emojiTypeAheadMaxHeight, "px")
273
271
  }, listBody)));
@@ -1,11 +1,11 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import { style } from 'typestyle';
1
+ import { css } from '@emotion/core';
3
2
  import { token } from '@atlaskit/tokens';
4
3
  import { emojiPreviewSelectedColor, emojiTypeAheadMaxHeight, emojiTypeAheadWidth, noDialogContainerBorderColor, noDialogContainerBorderRadius, noDialogContainerBoxShadow } from '../../util/shared-styles';
5
- export var selected = 'emoji-typeahead-selected';
6
4
  export var emojiTypeAhead = 'emoji-typeahead-element';
7
- export var typeAheadListContainer = 'emoji-typeahead-list-container';
8
- export var typeAheadList = style({
5
+ export var typeAheadListContainer = 'emoji-typeahead-list-container'; // editor-core is using this static class name for testing
6
+
7
+ export var typeaheadSelected = 'emoji-typeahead-selected';
8
+ export var typeAheadList = css({
9
9
  background: token('elevation.surface.overlay', 'white'),
10
10
  border: "1px solid ".concat(noDialogContainerBorderColor),
11
11
  borderRadius: noDialogContainerBorderRadius,
@@ -13,31 +13,31 @@ export var typeAheadList = style({
13
13
  color: token('color.text.subtle', '#333'),
14
14
  width: emojiTypeAheadWidth
15
15
  });
16
- export var typeAheadEmpty = style({
16
+ export var typeAheadEmpty = css({
17
17
  display: 'none'
18
18
  });
19
- export var typeAheadItem = style({
19
+ export var selected = css({
20
+ backgroundColor: emojiPreviewSelectedColor
21
+ });
22
+ export var typeAheadItem = css({
20
23
  cursor: 'pointer',
21
24
  display: 'block',
22
25
  listStyleType: 'none',
23
26
  overflow: 'hidden',
24
- width: emojiTypeAheadWidth,
25
- $nest: _defineProperty({}, "&.".concat(selected), {
26
- backgroundColor: emojiPreviewSelectedColor
27
- })
27
+ width: emojiTypeAheadWidth
28
28
  });
29
- export var typeAheadItemRow = style({
29
+ export var typeAheadItemRow = css({
30
30
  display: 'flex',
31
31
  flexDirection: 'row',
32
32
  flexWrap: 'wrap',
33
33
  verticalAlign: 'middle'
34
34
  });
35
- export var emojiTypeAheadSpinnerContainer = style({
35
+ export var emojiTypeAheadSpinnerContainer = css({
36
36
  position: 'relative',
37
37
  height: "".concat(emojiTypeAheadMaxHeight, "px"),
38
38
  paddingTop: "".concat(((emojiTypeAheadMaxHeight - 30) / 2).toFixed(), "px"),
39
39
  boxSizing: 'border-box'
40
40
  });
41
- export var emojiTypeAheadSpinner = style({
41
+ export var emojiTypeAheadSpinner = css({
42
42
  textAlign: 'center'
43
43
  });
@@ -10,15 +10,15 @@ 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 React from 'react';
13
+ /** @jsx jsx */
14
+ import { jsx } from '@emotion/core';
14
15
  import { PureComponent } from 'react';
15
16
  import { FormattedMessage } from 'react-intl-next';
16
- import classNames from 'classnames';
17
- import * as styles from './styles';
18
17
  import { supportsUploadFeature } from '../../api/EmojiResource';
19
18
  import EmojiUploadPickerWithIntl from '../common/EmojiUploadPicker';
20
19
  import { uploadEmoji } from '../common/UploadEmoji';
21
20
  import { createAndFireEventInElementsChannel, selectedFileEvent, uploadCancelButton, uploadConfirmButton } from '../../util/analytics';
21
+ import { emojiUploadFooter, emojiUploadWidget } from './styles';
22
22
 
23
23
  var EmojiUploadComponent = /*#__PURE__*/function (_PureComponent) {
24
24
  _inherits(EmojiUploadComponent, _PureComponent);
@@ -98,13 +98,13 @@ var EmojiUploadComponent = /*#__PURE__*/function (_PureComponent) {
98
98
  key: "render",
99
99
  value: function render() {
100
100
  var uploadErrorMessage = this.state.uploadErrorMessage;
101
- var errorMessage = uploadErrorMessage ? /*#__PURE__*/React.createElement(FormattedMessage, uploadErrorMessage) : null;
102
- return /*#__PURE__*/React.createElement("div", {
103
- className: classNames([styles.emojiUploadWidget]),
101
+ var errorMessage = uploadErrorMessage ? jsx(FormattedMessage, uploadErrorMessage) : null;
102
+ return jsx("div", {
103
+ css: emojiUploadWidget,
104
104
  ref: this.props.onUploaderRef
105
- }, /*#__PURE__*/React.createElement("div", {
106
- className: classNames([styles.emojiUploadFooter])
107
- }, /*#__PURE__*/React.createElement(EmojiUploadPickerWithIntl, {
105
+ }, jsx("div", {
106
+ css: emojiUploadFooter
107
+ }, jsx(EmojiUploadPickerWithIntl, {
108
108
  ref: this.onUploaderRef,
109
109
  onFileChooserClicked: this.onFileChooserClicked,
110
110
  onUploadCancelled: this.onUploadCancelled,
@@ -1,8 +1,8 @@
1
- import { style } from 'typestyle';
2
1
  import { token } from '@atlaskit/tokens';
3
- import { emojiPickerWidth } from '../../util/constants'; // Uploader
2
+ import { emojiPickerWidth } from '../../util/constants';
3
+ import { css } from '@emotion/core'; // Uploader
4
4
 
5
- export var emojiUploadWidget = style({
5
+ export var emojiUploadWidget = css({
6
6
  display: 'flex',
7
7
  flexDirection: 'column',
8
8
  justifyContent: 'center',
@@ -16,6 +16,6 @@ export var emojiUploadWidget = style({
16
16
  marginTop: '-16px'
17
17
  }); /// Footer
18
18
 
19
- export var emojiUploadFooter = style({
19
+ export var emojiUploadFooter = css({
20
20
  flex: '0 0 auto'
21
21
  });
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * NOTE:
3
3
  *
4
- * This file is automatically generated by i18n-tools.
4
+ * This file is automatically generated by Traduki 2.0.
5
5
  * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
6
  */
7
- // Czech
7
+ //Czech
8
8
  export default {
9
9
  'fabric.emoji.add.custom.emoji.label': 'Přidat své vlastní emoji',
10
10
  'fabric.emoji.add.label': 'Přidat emoji',
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * NOTE:
3
3
  *
4
- * This file is automatically generated by i18n-tools.
4
+ * This file is automatically generated by Traduki 2.0.
5
5
  * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
6
  */
7
- // Danish
7
+ //Danish (Denmark)
8
8
  export default {
9
9
  'fabric.emoji.add.custom.emoji.label': 'Tilføj din egen emoji',
10
10
  'fabric.emoji.add.label': 'Tilføj emoji',
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * NOTE:
3
3
  *
4
- * This file is automatically generated by i18n-tools.
4
+ * This file is automatically generated by Traduki 2.0.
5
5
  * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
6
  */
7
- // German
7
+ //German (Germany)
8
8
  export default {
9
9
  'fabric.emoji.add.custom.emoji.label': 'Fügen Sie Ihr eigenes Emoji hinzu',
10
10
  'fabric.emoji.add.label': 'Emoji hinzufügen',