emoji-picker-react 4.22.2 → 5.0.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 (405) hide show
  1. package/README.md +335 -49
  2. package/dist/DomUtils/categoryNameFromDom.d.ts +1 -1
  3. package/dist/DomUtils/classNames.d.ts +24 -23
  4. package/dist/DomUtils/detectEmojyPartiallyBelowFold.d.ts +2 -2
  5. package/dist/DomUtils/elementPositionInRow.d.ts +5 -5
  6. package/dist/DomUtils/eventBelongsToPicker.d.ts +2 -0
  7. package/dist/DomUtils/focusElement.d.ts +5 -5
  8. package/dist/DomUtils/getActiveElement.d.ts +2 -2
  9. package/dist/DomUtils/isJsdom.d.ts +1 -0
  10. package/dist/DomUtils/isRtl.d.ts +1 -0
  11. package/dist/DomUtils/keyboardNavigation.d.ts +7 -8
  12. package/dist/DomUtils/scrollTo.d.ts +4 -5
  13. package/dist/DomUtils/selectors.d.ts +31 -35
  14. package/dist/EmojiPickerReact.d.ts +5 -5
  15. package/dist/Stylesheet/DedupedStyle.d.ts +13 -0
  16. package/dist/Stylesheet/stylesheet.d.ts +40 -37
  17. package/dist/components/ErrorBoundary.d.ts +15 -15
  18. package/dist/components/Layout/Absolute.d.ts +8 -8
  19. package/dist/components/Layout/Flex.d.ts +13 -13
  20. package/dist/components/Layout/Relative.d.ts +8 -8
  21. package/dist/components/Layout/Space.d.ts +7 -7
  22. package/dist/components/Reactions/BtnPlus.d.ts +2 -2
  23. package/dist/components/Reactions/DEFAULT_REACTIONS.d.ts +1 -1
  24. package/dist/components/Reactions/Reactions.d.ts +3 -2
  25. package/dist/components/atoms/Button.d.ts +11 -6
  26. package/dist/components/body/EmojiCategory.d.ts +13 -12
  27. package/dist/components/body/EmojiList.d.ts +7 -4
  28. package/dist/components/body/EmojiVariationPicker.d.ts +2 -2
  29. package/dist/components/body/MeasureEmoji.d.ts +2 -2
  30. package/dist/components/body/listComponents.d.ts +47 -0
  31. package/dist/components/context/ElementRefContext.d.ts +18 -16
  32. package/dist/components/context/PickerConfigContext.d.ts +14 -9
  33. package/dist/components/context/PickerContext.d.ts +57 -25
  34. package/dist/components/context/PickerDataContext.d.ts +23 -17
  35. package/dist/components/emoji/BaseEmojiProps.d.ts +14 -13
  36. package/dist/components/emoji/ClickableEmojiButton.d.ts +23 -15
  37. package/dist/components/emoji/Emoji.d.ts +18 -15
  38. package/dist/components/emoji/EmojiImg.d.ts +11 -11
  39. package/dist/components/emoji/ExportedEmoji.d.ts +11 -11
  40. package/dist/components/emoji/NativeEmoji.d.ts +6 -6
  41. package/dist/components/emoji/ViewOnlyEmoji.d.ts +3 -3
  42. package/dist/components/emoji/emojiStyles.d.ts +6 -1
  43. package/dist/components/footer/Preview.d.ts +7 -7
  44. package/dist/components/header/Header.d.ts +2 -2
  45. package/dist/components/header/Search/BtnClearSearch.d.ts +2 -2
  46. package/dist/components/header/Search/IcnSearch.d.ts +2 -2
  47. package/dist/components/header/Search/Search.d.ts +11 -3
  48. package/dist/components/header/SkinTonePicker/BtnSkinToneVariation.d.ts +12 -12
  49. package/dist/components/header/SkinTonePicker/SkinTonePicker.d.ts +11 -11
  50. package/dist/components/icons/svgIcons.d.ts +4 -0
  51. package/dist/components/main/PickerMainBehaviors.d.ts +4 -0
  52. package/dist/components/main/defaultAppearance.d.ts +12 -0
  53. package/dist/components/main/labelHeight.d.ts +1 -0
  54. package/dist/components/navigation/CategoryButton.d.ts +12 -12
  55. package/dist/components/navigation/CategoryNavIcon.d.ts +4 -4
  56. package/dist/components/navigation/CategoryNavigation.d.ts +19 -2
  57. package/dist/config/categoryConfig.d.ts +34 -34
  58. package/dist/config/cdnUrls.d.ts +2 -2
  59. package/dist/config/compareConfig.d.ts +10 -2
  60. package/dist/config/config.d.ts +166 -64
  61. package/dist/config/customEmojiConfig.d.ts +14 -14
  62. package/dist/config/defaultPickerConfiguration.d.ts +10 -0
  63. package/dist/config/mutableConfig.d.ts +32 -10
  64. package/dist/config/useConfig.d.ts +48 -36
  65. package/dist/data/defaultEmojiData.d.ts +9 -0
  66. package/dist/data/defaultEmojiData.js +40 -0
  67. package/dist/data/emojis-bn.d.mts +39 -0
  68. package/dist/data/emojis-bn.d.ts +38 -2
  69. package/dist/data/emojis-bn.js +25 -2
  70. package/dist/data/emojis-bn.mjs +2 -0
  71. package/dist/data/emojis-da.d.mts +39 -0
  72. package/dist/data/emojis-da.d.ts +38 -2
  73. package/dist/data/emojis-da.js +25 -2
  74. package/dist/data/emojis-da.mjs +2 -0
  75. package/dist/data/emojis-de.d.mts +39 -0
  76. package/dist/data/emojis-de.d.ts +38 -2
  77. package/dist/data/emojis-de.js +25 -2
  78. package/dist/data/emojis-de.mjs +2 -0
  79. package/dist/data/emojis-en-gb.d.mts +39 -0
  80. package/dist/data/emojis-en-gb.d.ts +38 -2
  81. package/dist/data/emojis-en-gb.js +25 -2
  82. package/dist/data/emojis-en-gb.mjs +2 -0
  83. package/dist/data/emojis-en.d.mts +39 -0
  84. package/dist/data/emojis-en.d.ts +38 -2
  85. package/dist/data/emojis-en.js +25 -2
  86. package/dist/data/emojis-en.mjs +2 -0
  87. package/dist/data/emojis-es-mx.d.mts +39 -0
  88. package/dist/data/emojis-es-mx.d.ts +38 -2
  89. package/dist/data/emojis-es-mx.js +25 -2
  90. package/dist/data/emojis-es-mx.mjs +2 -0
  91. package/dist/data/emojis-es.d.mts +39 -0
  92. package/dist/data/emojis-es.d.ts +38 -2
  93. package/dist/data/emojis-es.js +25 -2
  94. package/dist/data/emojis-es.mjs +2 -0
  95. package/dist/data/emojis-et.d.mts +39 -0
  96. package/dist/data/emojis-et.d.ts +38 -2
  97. package/dist/data/emojis-et.js +25 -2
  98. package/dist/data/emojis-et.mjs +2 -0
  99. package/dist/data/emojis-fi.d.mts +39 -0
  100. package/dist/data/emojis-fi.d.ts +38 -2
  101. package/dist/data/emojis-fi.js +25 -2
  102. package/dist/data/emojis-fi.mjs +2 -0
  103. package/dist/data/emojis-fr.d.mts +39 -0
  104. package/dist/data/emojis-fr.d.ts +38 -2
  105. package/dist/data/emojis-fr.js +25 -2
  106. package/dist/data/emojis-fr.mjs +2 -0
  107. package/dist/data/emojis-hi.d.mts +39 -0
  108. package/dist/data/emojis-hi.d.ts +38 -2
  109. package/dist/data/emojis-hi.js +25 -2
  110. package/dist/data/emojis-hi.mjs +2 -0
  111. package/dist/data/emojis-hu.d.mts +39 -0
  112. package/dist/data/emojis-hu.d.ts +38 -2
  113. package/dist/data/emojis-hu.js +25 -2
  114. package/dist/data/emojis-hu.mjs +2 -0
  115. package/dist/data/emojis-it.d.mts +39 -0
  116. package/dist/data/emojis-it.d.ts +38 -2
  117. package/dist/data/emojis-it.js +25 -2
  118. package/dist/data/emojis-it.mjs +2 -0
  119. package/dist/data/emojis-ja.d.mts +39 -0
  120. package/dist/data/emojis-ja.d.ts +38 -2
  121. package/dist/data/emojis-ja.js +25 -2
  122. package/dist/data/emojis-ja.mjs +2 -0
  123. package/dist/data/emojis-ko.d.mts +39 -0
  124. package/dist/data/emojis-ko.d.ts +38 -2
  125. package/dist/data/emojis-ko.js +25 -2
  126. package/dist/data/emojis-ko.mjs +2 -0
  127. package/dist/data/emojis-lt.d.mts +39 -0
  128. package/dist/data/emojis-lt.d.ts +38 -2
  129. package/dist/data/emojis-lt.js +25 -2
  130. package/dist/data/emojis-lt.mjs +2 -0
  131. package/dist/data/emojis-ms.d.mts +39 -0
  132. package/dist/data/emojis-ms.d.ts +38 -2
  133. package/dist/data/emojis-ms.js +25 -2
  134. package/dist/data/emojis-ms.mjs +2 -0
  135. package/dist/data/emojis-nb.d.mts +39 -0
  136. package/dist/data/emojis-nb.d.ts +38 -2
  137. package/dist/data/emojis-nb.js +25 -2
  138. package/dist/data/emojis-nb.mjs +2 -0
  139. package/dist/data/emojis-nl.d.mts +39 -0
  140. package/dist/data/emojis-nl.d.ts +38 -2
  141. package/dist/data/emojis-nl.js +25 -2
  142. package/dist/data/emojis-nl.mjs +2 -0
  143. package/dist/data/emojis-pl.d.mts +39 -0
  144. package/dist/data/emojis-pl.d.ts +38 -2
  145. package/dist/data/emojis-pl.js +25 -2
  146. package/dist/data/emojis-pl.mjs +2 -0
  147. package/dist/data/emojis-pt.d.mts +39 -0
  148. package/dist/data/emojis-pt.d.ts +38 -2
  149. package/dist/data/emojis-pt.js +25 -2
  150. package/dist/data/emojis-pt.mjs +2 -0
  151. package/dist/data/emojis-ru.d.mts +39 -0
  152. package/dist/data/emojis-ru.d.ts +38 -2
  153. package/dist/data/emojis-ru.js +25 -2
  154. package/dist/data/emojis-ru.mjs +2 -0
  155. package/dist/data/emojis-sv.d.mts +39 -0
  156. package/dist/data/emojis-sv.d.ts +38 -2
  157. package/dist/data/emojis-sv.js +25 -2
  158. package/dist/data/emojis-sv.mjs +2 -0
  159. package/dist/data/emojis-th.d.mts +39 -0
  160. package/dist/data/emojis-th.d.ts +38 -2
  161. package/dist/data/emojis-th.js +25 -2
  162. package/dist/data/emojis-th.mjs +2 -0
  163. package/dist/data/emojis-uk.d.mts +39 -0
  164. package/dist/data/emojis-uk.d.ts +38 -2
  165. package/dist/data/emojis-uk.js +25 -2
  166. package/dist/data/emojis-uk.mjs +2 -0
  167. package/dist/data/emojis-vi.d.mts +39 -0
  168. package/dist/data/emojis-vi.d.ts +38 -2
  169. package/dist/data/emojis-vi.js +25 -2
  170. package/dist/data/emojis-vi.mjs +2 -0
  171. package/dist/data/emojis-zh-hant.d.mts +39 -0
  172. package/dist/data/emojis-zh-hant.d.ts +38 -2
  173. package/dist/data/emojis-zh-hant.js +25 -2
  174. package/dist/data/emojis-zh-hant.mjs +2 -0
  175. package/dist/data/emojis-zh.d.mts +39 -0
  176. package/dist/data/emojis-zh.d.ts +38 -2
  177. package/dist/data/emojis-zh.js +25 -2
  178. package/dist/data/emojis-zh.mjs +2 -0
  179. package/dist/data/index.js +1 -0
  180. package/dist/data/registerDefaultEmojiData.d.ts +1 -0
  181. package/dist/data/registerDefaultEmojiData.js +3 -0
  182. package/dist/data-core/pickerData.d.ts +12 -0
  183. package/dist/data-core/prepare.d.ts +23 -0
  184. package/dist/data-core/search.d.ts +13 -0
  185. package/dist/data-core/types.d.ts +23 -0
  186. package/dist/data.d.mts +72 -0
  187. package/dist/data.d.ts +72 -0
  188. package/dist/dataUtils/DataTypes.d.ts +23 -19
  189. package/dist/dataUtils/emojiSelectors.d.ts +15 -16
  190. package/dist/dataUtils/emojiUtils.d.ts +1 -12
  191. package/dist/dataUtils/nativeEmojiSequenceSupport.d.ts +10 -0
  192. package/dist/dataUtils/nativeEmojiSupport.d.ts +40 -0
  193. package/dist/dataUtils/parseNativeEmoji.d.ts +1 -1
  194. package/dist/dataUtils/suggested.d.ts +11 -11
  195. package/dist/dataUtils/suggestedEmojis.d.ts +7 -0
  196. package/dist/esm/chunks/chunk-46BUDQLE.mjs +228 -0
  197. package/dist/esm/chunks/chunk-7ZGTUZFB.mjs +16 -0
  198. package/dist/esm/chunks/chunk-FQIJ4HBW.mjs +25 -0
  199. package/dist/esm/chunks/chunk-KQPOIRSC.mjs +9305 -0
  200. package/dist/esm/chunks/chunk-LO4TPPLH.mjs +43 -0
  201. package/dist/esm/chunks/emojis-6L3GRBAP.mjs +9 -0
  202. package/dist/esm/data.mjs +18 -0
  203. package/dist/esm/index.mjs +389 -0
  204. package/dist/esm/primitives/index.mjs +67 -0
  205. package/dist/hooks/preloadEmoji.d.ts +9 -9
  206. package/dist/hooks/useActiveCategoryScrollDetection.d.ts +11 -11
  207. package/dist/hooks/useCategoryHeight.d.ts +6 -5
  208. package/dist/hooks/useCloseAllOpenToggles.d.ts +2 -2
  209. package/dist/hooks/useDataIdentityStabilityWarning.d.ts +13 -0
  210. package/dist/hooks/useDebouncedState.d.ts +1 -1
  211. package/dist/hooks/useDisallowMouseMove.d.ts +4 -4
  212. package/dist/hooks/useDisallowedEmojis.d.ts +2 -3
  213. package/dist/hooks/useEmojiPreviewEvents.d.ts +3 -3
  214. package/dist/hooks/useEmojiVirtualization.d.ts +21 -17
  215. package/dist/hooks/useFilter.d.ts +10 -16
  216. package/dist/hooks/useFocus.d.ts +3 -3
  217. package/dist/hooks/useInitialLoad.d.ts +2 -2
  218. package/dist/hooks/useIsEmojiHidden.d.ts +8 -8
  219. package/dist/hooks/useIsMounted.d.ts +1 -1
  220. package/dist/hooks/useIsSearchMode.d.ts +1 -1
  221. package/dist/hooks/useIsomorphicLayoutEffect.d.ts +2 -2
  222. package/dist/hooks/useKeyboardNavigation.d.ts +3 -1
  223. package/dist/hooks/useMouseDownHandlers.d.ts +8 -4
  224. package/dist/hooks/useOnFocus.d.ts +1 -1
  225. package/dist/hooks/useOnScroll.d.ts +2 -2
  226. package/dist/hooks/useReactionsFocus.d.ts +1 -0
  227. package/dist/hooks/useRegisterRegion.d.ts +24 -0
  228. package/dist/hooks/useResolvedEmojiData.d.ts +37 -0
  229. package/dist/hooks/useScrollCategoryIntoView.d.ts +1 -1
  230. package/dist/hooks/useSearchController.d.ts +17 -0
  231. package/dist/hooks/useSearchResults.d.ts +8 -0
  232. package/dist/hooks/useSetVariationPicker.d.ts +2 -2
  233. package/dist/hooks/useShouldHideCustomEmojis.d.ts +1 -1
  234. package/dist/hooks/useShouldShowSkinTonePicker.d.ts +4 -4
  235. package/dist/index.d.mts +376 -0
  236. package/dist/index.d.ts +376 -9
  237. package/dist/index.js +2 -8
  238. package/dist/primitives/CategoryNav.d.ts +4 -0
  239. package/dist/primitives/Empty.d.ts +6 -0
  240. package/dist/primitives/List.d.ts +4 -0
  241. package/dist/primitives/LoadError.d.ts +8 -0
  242. package/dist/primitives/Loading.d.ts +4 -0
  243. package/dist/primitives/Panel.d.ts +3 -0
  244. package/dist/primitives/Preview.d.ts +3 -0
  245. package/dist/primitives/Reactions.d.ts +2 -0
  246. package/dist/primitives/Root.d.ts +26 -0
  247. package/dist/primitives/Search.d.ts +5 -0
  248. package/dist/primitives/SearchInput.d.ts +3 -0
  249. package/dist/primitives/SkinTone.d.ts +4 -0
  250. package/dist/primitives/Viewport.d.ts +19 -0
  251. package/dist/primitives/appearance.d.ts +3 -0
  252. package/dist/primitives/components.d.ts +27 -0
  253. package/dist/primitives/hooks.d.ts +48 -0
  254. package/dist/primitives/index.d.mts +561 -0
  255. package/dist/primitives/index.d.ts +561 -0
  256. package/dist/primitives/index.js +2 -0
  257. package/dist/primitives/nativeProps.d.ts +15 -0
  258. package/dist/primitives/scope.d.ts +13 -0
  259. package/dist/primitives/structuralStyles.d.ts +16 -0
  260. package/dist/primitives/tokens.d.ts +18 -0
  261. package/dist/primitives/types.d.ts +85 -0
  262. package/dist/state/activeEmojiStore.d.ts +7 -0
  263. package/dist/state/navigationRegistry.d.ts +61 -0
  264. package/dist/state/regionTraversal.d.ts +20 -0
  265. package/dist/typeRefinements/typeRefinements.d.ts +6 -6
  266. package/dist/types/exposedTypes.d.ts +16 -6
  267. package/dist/types/exposedTypes.js +5 -0
  268. package/dist/virtualization/virtualizationHelpers.d.ts +20 -18
  269. package/llms-full.txt +3680 -0
  270. package/llms.txt +66 -476
  271. package/package.json +204 -66
  272. package/src/DomUtils/categoryNameFromDom.ts +1 -1
  273. package/src/DomUtils/classNames.ts +1 -0
  274. package/src/DomUtils/elementPositionInRow.ts +26 -4
  275. package/src/DomUtils/eventBelongsToPicker.ts +17 -0
  276. package/src/DomUtils/getActiveElement.ts +7 -1
  277. package/src/DomUtils/isJsdom.ts +12 -0
  278. package/src/DomUtils/isRtl.ts +5 -0
  279. package/src/DomUtils/keyboardNavigation.ts +105 -149
  280. package/src/DomUtils/scrollTo.ts +18 -16
  281. package/src/DomUtils/selectors.ts +20 -111
  282. package/src/EmojiPickerReact.tsx +155 -48
  283. package/src/Stylesheet/DedupedStyle.tsx +80 -0
  284. package/src/Stylesheet/stylesheet.tsx +128 -59
  285. package/src/components/Layout/Flex.tsx +12 -11
  286. package/src/components/Reactions/BtnPlus.tsx +61 -51
  287. package/src/components/Reactions/Reactions.tsx +113 -55
  288. package/src/components/atoms/Button.tsx +18 -15
  289. package/src/components/body/EmojiCategory.tsx +77 -40
  290. package/src/components/body/EmojiList.tsx +55 -23
  291. package/src/components/body/EmojiVariationPicker.tsx +113 -66
  292. package/src/components/body/MeasureEmoji.tsx +9 -2
  293. package/src/components/body/listComponents.tsx +79 -0
  294. package/src/components/context/ElementRefContext.tsx +46 -35
  295. package/src/components/context/PickerConfigContext.tsx +55 -40
  296. package/src/components/context/PickerContext.tsx +567 -92
  297. package/src/components/context/PickerDataContext.tsx +110 -99
  298. package/src/components/emoji/BaseEmojiProps.ts +5 -4
  299. package/src/components/emoji/ClickableEmojiButton.tsx +148 -63
  300. package/src/components/emoji/Emoji.tsx +24 -2
  301. package/src/components/emoji/EmojiImg.tsx +13 -12
  302. package/src/components/emoji/ExportedEmoji.tsx +5 -4
  303. package/src/components/emoji/NativeEmoji.tsx +19 -16
  304. package/src/components/emoji/ViewOnlyEmoji.tsx +55 -30
  305. package/src/components/emoji/emojiStyles.ts +12 -11
  306. package/src/components/footer/Preview.tsx +86 -91
  307. package/src/components/header/Header.tsx +21 -6
  308. package/src/components/header/Search/BtnClearSearch.tsx +69 -55
  309. package/src/components/header/Search/IcnSearch.tsx +21 -21
  310. package/src/components/header/Search/Search.tsx +77 -137
  311. package/src/components/header/SkinTonePicker/BtnSkinToneVariation.tsx +99 -62
  312. package/src/components/header/SkinTonePicker/SkinTonePicker.tsx +84 -46
  313. package/src/components/icons/svgIcons.ts +17 -0
  314. package/src/components/main/PickerMainBehaviors.tsx +163 -0
  315. package/src/components/main/defaultAppearance.tsx +188 -0
  316. package/src/components/main/labelHeight.ts +5 -0
  317. package/src/components/navigation/CategoryButton.tsx +83 -57
  318. package/src/components/navigation/CategoryNavIcon.tsx +73 -194
  319. package/src/components/navigation/CategoryNavigation.tsx +118 -46
  320. package/src/config/categoryConfig.ts +7 -3
  321. package/src/config/cdnUrls.ts +11 -21
  322. package/src/config/compareConfig.ts +128 -30
  323. package/src/config/config.ts +228 -24
  324. package/src/config/defaultPickerConfiguration.ts +7 -0
  325. package/src/config/mutableConfig.ts +44 -20
  326. package/src/config/useConfig.ts +130 -37
  327. package/src/data/defaultEmojiData.ts +49 -0
  328. package/src/data/registerDefaultEmojiData.ts +8 -0
  329. package/src/data-core/pickerData.ts +173 -0
  330. package/src/data-core/prepare.ts +178 -0
  331. package/src/data-core/search.ts +122 -0
  332. package/src/data-core/types.ts +36 -0
  333. package/src/data.ts +10 -0
  334. package/src/dataUtils/DataTypes.ts +4 -0
  335. package/src/dataUtils/emojiSelectors.ts +58 -63
  336. package/src/dataUtils/emojiUtils.ts +17 -74
  337. package/src/dataUtils/nativeEmojiSequenceSupport.ts +116 -0
  338. package/src/dataUtils/nativeEmojiSupport.ts +160 -0
  339. package/src/dataUtils/suggested.ts +8 -4
  340. package/src/dataUtils/suggestedEmojis.ts +92 -0
  341. package/src/env.d.ts +4 -0
  342. package/src/hooks/preloadEmoji.ts +3 -3
  343. package/src/hooks/useActiveCategoryScrollDetection.ts +10 -1
  344. package/src/hooks/useCategoryHeight.ts +82 -8
  345. package/src/hooks/useDataIdentityStabilityWarning.ts +86 -0
  346. package/src/hooks/useDebouncedState.ts +13 -1
  347. package/src/hooks/useDisallowedEmojis.ts +26 -42
  348. package/src/hooks/useEmojiPreviewEvents.ts +43 -10
  349. package/src/hooks/useEmojiVirtualization.tsx +38 -4
  350. package/src/hooks/useFilter.ts +85 -127
  351. package/src/hooks/useFocus.ts +14 -24
  352. package/src/hooks/useIsEmojiHidden.ts +10 -6
  353. package/src/hooks/useKeyboardNavigation.ts +322 -429
  354. package/src/hooks/useMouseDownHandlers.ts +91 -16
  355. package/src/hooks/useOnFocus.ts +12 -3
  356. package/src/hooks/useOnScroll.ts +18 -2
  357. package/src/hooks/useReactionsFocus.ts +118 -0
  358. package/src/hooks/useRegisterRegion.ts +92 -0
  359. package/src/hooks/useResolvedEmojiData.ts +200 -0
  360. package/src/hooks/useScrollCategoryIntoView.ts +74 -12
  361. package/src/hooks/useSearchController.ts +369 -0
  362. package/src/hooks/useSearchResults.ts +51 -0
  363. package/src/hooks/useSetVariationPicker.ts +4 -1
  364. package/src/index.tsx +67 -5
  365. package/src/primitives/CategoryNav.tsx +40 -0
  366. package/src/primitives/Empty.tsx +68 -0
  367. package/src/primitives/List.tsx +61 -0
  368. package/src/primitives/LoadError.tsx +38 -0
  369. package/src/primitives/Loading.tsx +60 -0
  370. package/src/primitives/Panel.tsx +47 -0
  371. package/src/primitives/Preview.tsx +38 -0
  372. package/src/primitives/Reactions.tsx +2 -0
  373. package/src/primitives/Root.tsx +398 -0
  374. package/src/primitives/Search.tsx +41 -0
  375. package/src/primitives/SearchInput.tsx +110 -0
  376. package/src/primitives/SkinTone.tsx +76 -0
  377. package/src/primitives/Viewport.tsx +204 -0
  378. package/src/primitives/appearance.tsx +7 -0
  379. package/src/primitives/components.tsx +30 -0
  380. package/src/primitives/hooks.ts +165 -0
  381. package/src/primitives/index.ts +94 -0
  382. package/src/primitives/nativeProps.ts +90 -0
  383. package/src/primitives/scope.tsx +109 -0
  384. package/src/primitives/structuralStyles.tsx +133 -0
  385. package/src/primitives/tokens.ts +149 -0
  386. package/src/primitives/types.ts +192 -0
  387. package/src/state/activeEmojiStore.ts +39 -0
  388. package/src/state/navigationRegistry.ts +209 -0
  389. package/src/state/regionTraversal.ts +116 -0
  390. package/src/svg.d.ts +2 -2
  391. package/src/types/exposedTypes.ts +28 -1
  392. package/src/virtualization/virtualizationHelpers.ts +20 -6
  393. package/dist/components/body/Body.d.ts +0 -2
  394. package/dist/components/main/PickerMain.d.ts +0 -7
  395. package/dist/dataUtils/alphaNumericEmojiIndex.d.ts +0 -5
  396. package/dist/emoji-picker-react.cjs.development.js +0 -31413
  397. package/dist/emoji-picker-react.cjs.development.js.map +0 -1
  398. package/dist/emoji-picker-react.cjs.production.min.js +0 -2
  399. package/dist/emoji-picker-react.cjs.production.min.js.map +0 -1
  400. package/dist/emoji-picker-react.esm.js +0 -31411
  401. package/dist/emoji-picker-react.esm.js.map +0 -1
  402. package/dist/hooks/useHideEmojisByUniocode.d.ts +0 -1
  403. package/src/components/body/Body.tsx +0 -43
  404. package/src/components/main/PickerMain.tsx +0 -249
  405. package/src/dataUtils/alphaNumericEmojiIndex.ts +0 -21
@@ -1,165 +1,105 @@
1
1
  import * as React from 'react';
2
2
  import { cx } from 'shipstyles';
3
3
 
4
- import { darkMode, stylesheet } from '../../../Stylesheet/stylesheet';
5
- import {
6
- useAutoFocusSearchConfig,
7
- useSearchDisabledConfig,
8
- useSearchPlaceHolderConfig,
9
- } from '../../../config/useConfig';
10
- import { useCloseAllOpenToggles } from '../../../hooks/useCloseAllOpenToggles';
11
- import { useFilter } from '../../../hooks/useFilter';
12
- import { useIsSkinToneInSearch } from '../../../hooks/useShouldShowSkinTonePicker';
4
+ import { stylesheet } from '../../../Stylesheet/stylesheet';
5
+ import { SearchInput } from '../../../primitives/SearchInput';
6
+ import { useDefaultAppearance } from '../../../primitives/appearance';
7
+ import { filterPrimitiveProps } from '../../../primitives/nativeProps';
8
+ import type { SearchProps } from '../../../primitives/types';
13
9
  import Flex from '../../Layout/Flex';
14
10
  import Relative from '../../Layout/Relative';
15
- import { useSearchInputRef } from '../../context/ElementRefContext';
16
- import { SkinTonePicker } from '../SkinTonePicker/SkinTonePicker';
17
11
 
18
12
  import { BtnClearSearch } from './BtnClearSearch';
19
13
  import { IcnSearch } from './IcnSearch';
20
- import SVGTimes from './svg/times.svg';
21
-
22
- export function SearchContainer() {
23
- const searchDisabled = useSearchDisabledConfig();
24
-
25
- const isSkinToneInSearch = useIsSkinToneInSearch();
26
-
27
- if (searchDisabled) {
28
- return null;
29
- }
30
14
 
15
+ export function SearchContainer({
16
+ children,
17
+ inputProps,
18
+ inputRef,
19
+ }: {
20
+ inputProps?: SearchProps['inputProps'];
21
+ inputRef?: SearchProps['inputRef'];
22
+ children?: React.ReactNode;
23
+ } = {}) {
31
24
  return (
32
25
  <Flex className={cx(styles.overlay)}>
33
- <Search />
26
+ <Search inputProps={inputProps} inputRef={inputRef} />
34
27
 
35
- {isSkinToneInSearch ? <SkinTonePicker /> : null}
28
+ {children}
36
29
  </Flex>
37
30
  );
38
31
  }
39
32
 
40
- export function Search() {
41
- const closeAllOpenToggles = useCloseAllOpenToggles();
42
- const SearchInputRef = useSearchInputRef();
43
- const placeholder = useSearchPlaceHolderConfig();
44
- const autoFocus = useAutoFocusSearchConfig();
45
- const { statusSearchResults, searchTerm, onChange } = useFilter();
46
-
47
- const input = SearchInputRef?.current;
48
- const value = input?.value;
49
-
33
+ export function Search({
34
+ inputProps,
35
+ inputRef,
36
+ }: {
37
+ inputProps?: SearchProps['inputProps'];
38
+ inputRef?: SearchProps['inputRef'];
39
+ } = {}) {
40
+ const appearance = useDefaultAppearance();
41
+ // The managed region and the standalone native-input primitive share
42
+ // the same controller, registration and accessible announcements.
43
+ const safe = filterPrimitiveProps(
44
+ (inputProps ?? {}) as Record<string, unknown>,
45
+ [
46
+ 'type',
47
+ 'value',
48
+ 'defaultValue',
49
+ 'onChange',
50
+ 'autoFocus',
51
+ 'placeholder',
52
+ 'aria-controls',
53
+ ],
54
+ );
55
+ const { className, ...rest } = safe;
50
56
  return (
51
57
  <Relative className={cx(styles.searchContainer)}>
52
- <input
53
- // eslint-disable-next-line jsx-a11y/no-autofocus
54
- autoFocus={autoFocus}
55
- aria-label={'Type to search for an emoji'}
56
- onFocus={closeAllOpenToggles}
57
- className={cx(styles.search)}
58
- type="text"
59
- aria-controls="epr-search-id"
60
- placeholder={placeholder}
61
- onChange={(event) => {
62
- onChange(event?.target?.value ?? value);
63
- }}
64
- ref={SearchInputRef}
58
+ <SearchInput
59
+ {...rest}
60
+ className={cx(
61
+ styles.inputGeometry,
62
+ appearance && styles.search,
63
+ className as string | undefined,
64
+ )}
65
+ ref={inputRef}
65
66
  />
66
- {searchTerm ? (
67
- <div
68
- role="status"
69
- className={cx('epr-status-search-results', styles.visuallyHidden)}
70
- aria-live="polite"
71
- id="epr-search-id"
72
- aria-atomic="true"
73
- >
74
- {statusSearchResults}
75
- </div>
76
- ) : null}
77
- <IcnSearch />
67
+ {appearance && <IcnSearch />}
78
68
  <BtnClearSearch />
79
69
  </Relative>
80
70
  );
81
71
  }
82
72
 
83
- const styles = stylesheet.create({
84
- overlay: {
85
- padding: 'var(--epr-header-padding)',
86
- zIndex: 'var(--epr-header-overlay-z-index)',
87
- },
88
- searchContainer: {
89
- '.': 'epr-search-container',
90
- flex: '1',
91
- display: 'block',
92
- minWidth: '0',
93
- },
94
- visuallyHidden: {
95
- clip: 'rect(0 0 0 0)',
96
- clipPath: 'inset(50%)',
97
- height: '1px',
98
- overflow: 'hidden',
99
- position: 'absolute',
100
- whiteSpace: 'nowrap',
101
- width: '1px',
102
- },
103
- search: {
104
- outline: 'none',
105
- transition: 'all 0.2s ease-in-out',
106
- color: 'var(--epr-search-input-text-color)',
107
- borderRadius: 'var(--epr-search-input-border-radius)',
108
- padding: 'var(--epr-search-input-padding)',
109
- height: 'var(--epr-search-input-height)',
110
- backgroundColor: 'var(--epr-search-input-bg-color)',
111
- border: '1px solid var(--epr-search-border-color)',
112
- width: '100%',
113
- ':focus': {
114
- backgroundColor: 'var(--epr-search-input-bg-color-active)',
115
- border: '1px solid var(--epr-search-border-color-active)',
116
- },
117
- '::placeholder': {
118
- color: 'var(--epr-search-input-placeholder-color)',
119
- },
120
- },
121
-
122
- btnClearSearch: {
123
- '.': 'epr-btn-clear-search',
124
- position: 'absolute',
125
- right: 'var(--epr-search-bar-inner-padding)',
126
- height: '30px',
127
- width: '30px',
128
- display: 'flex',
129
- alignItems: 'center',
130
- justifyContent: 'center',
131
- top: '50%',
132
- transform: 'translateY(-50%)',
133
- padding: '0',
134
- borderRadius: '50%',
135
- ':hover': {
136
- background: 'var(--epr-hover-bg-color)',
137
- },
138
- ':focus': {
139
- background: 'var(--epr-hover-bg-color)',
73
+ const styles = /* @__PURE__ */ (() =>
74
+ stylesheet.create({
75
+ overlay: {
76
+ padding: 'var(--epr-header-padding)',
77
+ zIndex: 'var(--epr-header-overlay-z-index)',
140
78
  },
141
- },
142
- icnClearnSearch: {
143
- '.': 'epr-icn-clear-search',
144
- backgroundColor: 'transparent',
145
- backgroundRepeat: 'no-repeat',
146
- backgroundSize: '20px',
147
- height: '20px',
148
- width: '20px',
149
- backgroundImage: `url(${SVGTimes})`,
150
- ':hover': {
151
- backgroundPositionY: '-20px',
79
+ searchContainer: {
80
+ '.': 'epr-search-container',
81
+ flex: '1',
82
+ display: 'block',
83
+ minWidth: '0',
152
84
  },
153
- ':focus': {
154
- backgroundPositionY: '-20px',
85
+ inputGeometry: {
86
+ padding: 'var(--epr-search-input-padding)',
87
+ height: 'var(--epr-search-input-height)',
88
+ width: '100%',
155
89
  },
156
- },
157
- ...darkMode('icnClearnSearch', {
158
- backgroundPositionY: '-40px',
159
- }),
160
- ...darkMode('btnClearSearch', {
161
- ':hover > .epr-icn-clear-search': {
162
- backgroundPositionY: '-60px',
90
+ search: {
91
+ outline: 'none',
92
+ transition: 'all 0.2s ease-in-out',
93
+ color: 'var(--epr-search-input-text-color)',
94
+ borderRadius: 'var(--epr-search-input-border-radius)',
95
+ backgroundColor: 'var(--epr-search-input-bg-color)',
96
+ border: '1px solid var(--epr-search-border-color)',
97
+ ':focus': {
98
+ backgroundColor: 'var(--epr-search-input-bg-color-active)',
99
+ border: '1px solid var(--epr-search-border-color-active)',
100
+ },
101
+ '::placeholder': {
102
+ color: 'var(--epr-search-input-placeholder-color)',
103
+ },
163
104
  },
164
- }),
165
- });
105
+ }))();
@@ -2,7 +2,10 @@ import * as React from 'react';
2
2
  import { cx } from 'shipstyles';
3
3
 
4
4
  import { stylesheet } from '../../../Stylesheet/stylesheet';
5
- import { skinTonesNamed } from '../../../data/skinToneVariations';
5
+ import { PickerLabels } from '../../../config/config';
6
+ import { useLabels } from '../../../config/useConfig';
7
+ import { useDefaultAppearance } from '../../../primitives/appearance';
8
+ import { usePickerComponents } from '../../../primitives/components';
6
9
  import { SkinTones } from '../../../types/exposedTypes';
7
10
  import { Button } from '../../atoms/Button';
8
11
 
@@ -15,7 +18,6 @@ type Props = {
15
18
  tabIndex?: number;
16
19
  };
17
20
 
18
- // eslint-disable-next-line complexity
19
21
  export function BtnSkinToneVariation({
20
22
  isOpen,
21
23
  onClick,
@@ -24,70 +26,105 @@ export function BtnSkinToneVariation({
24
26
  style,
25
27
  tabIndex,
26
28
  }: Props) {
27
- return (
28
- <Button
29
- style={style}
30
- onClick={onClick}
31
- tabIndex={tabIndex}
32
- className={cx(
33
- `epr-tone-${skinToneVariation}`,
34
- styles.tone,
35
- !isOpen && styles.closedTone,
36
- isActive && styles.active,
37
- )}
38
- aria-pressed={isActive}
39
- aria-label={`Skin tone ${skinTonesNamed[skinToneVariation as SkinTones]}`}
40
- ></Button>
29
+ const labels = useLabels();
30
+ const appearance = useDefaultAppearance();
31
+ const { SkinToneButton: Custom } = usePickerComponents();
32
+ const decorated = appearance && !Custom;
33
+ const glyph =
34
+ '✋' +
35
+ (skinToneVariation === SkinTones.NEUTRAL
36
+ ? ''
37
+ : String.fromCodePoint(parseInt(skinToneVariation, 16)));
38
+ const props = {
39
+ type: 'button' as const,
40
+ style,
41
+ onClick: (event: React.MouseEvent<HTMLButtonElement>) => {
42
+ if (!event.defaultPrevented) onClick();
43
+ },
44
+ tabIndex,
45
+ className: cx(
46
+ `epr-tone-${skinToneVariation}`,
47
+ styles.geometry,
48
+ decorated && styles.tone,
49
+ !isOpen && styles.closedTone,
50
+ isActive && styles.active,
51
+ ),
52
+ 'aria-pressed': isActive,
53
+ 'aria-label': labels[SKIN_TONE_LABEL_KEYS[skinToneVariation]],
54
+ 'data-epr-part': 'skin-tone-button',
55
+ 'data-epr-active': isActive ? '' : undefined,
56
+ 'data-epr-open': isOpen ? '' : undefined,
57
+ children: decorated ? undefined : glyph,
58
+ };
59
+ return Custom ? (
60
+ <Custom
61
+ {...props}
62
+ tone={{ skinTone: skinToneVariation, isActive, isOpen }}
63
+ />
64
+ ) : (
65
+ <Button {...props} />
41
66
  );
42
67
  }
43
68
 
44
- const styles = stylesheet.create({
45
- closedTone: {
46
- opacity: '0',
47
- zIndex: '0',
48
- },
49
- active: {
50
- '.': 'epr-active',
51
- zIndex: '1',
52
- opacity: '1',
53
- },
54
- tone: {
55
- '.': 'epr-tone',
56
- width: 'var(--epr-skin-tone-size)',
57
- display: 'block',
58
- cursor: 'pointer',
59
- borderRadius: '4px',
60
- height: 'var(--epr-skin-tone-size)',
61
- position: 'absolute',
62
- right: '0',
63
- transition: 'transform 0.3s ease-in-out, opacity 0.35s ease-in-out',
64
- zIndex: '0',
65
- border: '1px solid var(--epr-skin-tone-outer-border-color)',
66
- boxShadow: 'inset 0px 0px 0 1px var(--epr-skin-tone-inner-border-color)',
67
- ':hover': {
68
- boxShadow:
69
- '0 0 0 3px var(--epr-active-skin-hover-color), inset 0px 0px 0 1px var(--epr-skin-tone-inner-border-color)',
70
- },
71
- ':focus': {
72
- boxShadow: '0 0 0 3px var(--epr-focus-bg-color)',
73
- },
74
- '&.epr-tone-neutral': {
75
- backgroundColor: '#ffd225',
76
- },
77
- '&.epr-tone-1f3fb': {
78
- backgroundColor: '#ffdfbd',
79
- },
80
- '&.epr-tone-1f3fc': {
81
- backgroundColor: '#e9c197',
69
+ const SKIN_TONE_LABEL_KEYS: Record<SkinTones, keyof PickerLabels> = {
70
+ [SkinTones.NEUTRAL]: 'skinToneNeutral',
71
+ [SkinTones.LIGHT]: 'skinToneLight',
72
+ [SkinTones.MEDIUM_LIGHT]: 'skinToneMediumLight',
73
+ [SkinTones.MEDIUM]: 'skinToneMedium',
74
+ [SkinTones.MEDIUM_DARK]: 'skinToneMediumDark',
75
+ [SkinTones.DARK]: 'skinToneDark',
76
+ };
77
+
78
+ const styles = /* @__PURE__ */ (() =>
79
+ stylesheet.create({
80
+ geometry: {
81
+ width: 'var(--epr-skin-tone-size)',
82
+ height: 'var(--epr-skin-tone-size)',
83
+ display: 'block',
84
+ position: 'absolute',
85
+ insetInlineEnd: '0',
86
+ zIndex: '0',
82
87
  },
83
- '&.epr-tone-1f3fd': {
84
- backgroundColor: '#c88e62',
88
+ closedTone: {
89
+ opacity: '0',
90
+ zIndex: '0',
85
91
  },
86
- '&.epr-tone-1f3fe': {
87
- backgroundColor: '#a86637',
92
+ active: {
93
+ '.': 'epr-active',
94
+ zIndex: '1',
95
+ opacity: '1',
88
96
  },
89
- '&.epr-tone-1f3ff': {
90
- backgroundColor: '#60463a',
97
+ tone: {
98
+ '.': 'epr-tone',
99
+ cursor: 'pointer',
100
+ borderRadius: '4px',
101
+ transition: 'transform 0.3s ease-in-out, opacity 0.35s ease-in-out',
102
+ border: '1px solid var(--epr-skin-tone-outer-border-color)',
103
+ boxShadow: 'inset 0px 0px 0 1px var(--epr-skin-tone-inner-border-color)',
104
+ ':hover': {
105
+ boxShadow:
106
+ '0 0 0 3px var(--epr-active-skin-hover-color), inset 0px 0px 0 1px var(--epr-skin-tone-inner-border-color)',
107
+ },
108
+ ':focus': {
109
+ boxShadow: '0 0 0 3px var(--epr-focus-bg-color)',
110
+ },
111
+ '&.epr-tone-neutral': {
112
+ backgroundColor: '#ffd225',
113
+ },
114
+ '&.epr-tone-1f3fb': {
115
+ backgroundColor: '#ffdfbd',
116
+ },
117
+ '&.epr-tone-1f3fc': {
118
+ backgroundColor: '#e9c197',
119
+ },
120
+ '&.epr-tone-1f3fd': {
121
+ backgroundColor: '#c88e62',
122
+ },
123
+ '&.epr-tone-1f3fe': {
124
+ backgroundColor: '#a86637',
125
+ },
126
+ '&.epr-tone-1f3ff': {
127
+ backgroundColor: '#60463a',
128
+ },
91
129
  },
92
- },
93
- });
130
+ }))();
@@ -1,8 +1,8 @@
1
- /* eslint-disable complexity */
2
1
  import * as React from 'react';
3
2
  import { cx } from 'shipstyles';
4
3
 
5
4
  import { ClassNames } from '../../../DomUtils/classNames';
5
+ import { isRtl } from '../../../DomUtils/isRtl';
6
6
  import { stylesheet } from '../../../Stylesheet/stylesheet';
7
7
  import {
8
8
  useOnSkinToneChangeConfig,
@@ -11,6 +11,8 @@ import {
11
11
  import skinToneVariations from '../../../data/skinToneVariations';
12
12
  import { useCloseAllOpenToggles } from '../../../hooks/useCloseAllOpenToggles';
13
13
  import { useFocusSearchInput } from '../../../hooks/useFocus';
14
+ import { useRegisterRegion } from '../../../hooks/useRegisterRegion';
15
+ import { useDefaultAppearance } from '../../../primitives/appearance';
14
16
  import Absolute from '../../Layout/Absolute';
15
17
  import Relative from '../../Layout/Relative';
16
18
  import { useSkinTonePickerRef } from '../../context/ElementRefContext';
@@ -28,6 +30,10 @@ type Props = {
28
30
  };
29
31
 
30
32
  export function SkinTonePickerMenu() {
33
+ const SkinTonePickerRef = useSkinTonePickerRef();
34
+ // Preview-located skin-tone control is its own focus region; the
35
+ // search-located fan stays covered by local Search behavior.
36
+ useRegisterRegion('preview-skin-tone', SkinTonePickerRef);
31
37
  return (
32
38
  <Relative style={{ height: ITEM_SIZE }}>
33
39
  <Absolute style={{ bottom: 0, right: 0 }}>
@@ -40,6 +46,7 @@ export function SkinTonePickerMenu() {
40
46
  export function SkinTonePicker({
41
47
  direction = SkinTonePickerDirection.HORIZONTAL,
42
48
  }: Props) {
49
+ const appearance = useDefaultAppearance();
43
50
  const SkinTonePickerRef = useSkinTonePickerRef();
44
51
  const isDisabled = useSkinTonesDisabledConfig();
45
52
  const [isOpen, setIsOpen] = useSkinToneFanOpenState();
@@ -57,22 +64,31 @@ export function SkinTonePicker({
57
64
  const expandedSize = isOpen ? fullWidth : ITEM_SIZE + 'px';
58
65
 
59
66
  const vertical = direction === SkinTonePickerDirection.VERTICAL;
67
+ // The fan opens toward the inline start: leftward, or rightward under
68
+ // dir="rtl". The control is mounted before it can open, so the ref is set.
69
+ const inlineSign =
70
+ isOpen && !vertical && isRtl(SkinTonePickerRef.current) ? 1 : -1;
60
71
 
61
72
  return (
62
73
  <Relative
63
- className={cx(
64
- styles.skinTones,
65
- vertical && styles.vertical,
66
- isOpen && styles.open,
67
- vertical && isOpen && styles.verticalShadow,
68
- )}
74
+ className={skinToneClassName(appearance, vertical, isOpen)}
69
75
  style={
70
76
  vertical
71
77
  ? { flexBasis: expandedSize, height: expandedSize }
72
- : { flexBasis: expandedSize }
78
+ // SkinTone wraps this flex item in a layout host. An explicit
79
+ // width lets that host reserve the fan's full horizontal span,
80
+ // so a neighboring Search input shrinks instead of overlapping.
81
+ : { flexBasis: expandedSize, width: expandedSize }
73
82
  }
74
83
  >
75
- <div className={cx(styles.select)} ref={SkinTonePickerRef}>
84
+ <div
85
+ className={cx(styles.select)}
86
+ ref={SkinTonePickerRef}
87
+ data-epr-part="skin-tone"
88
+ // Read by the keyboard handler: arrow keys follow the fan axis
89
+ // wherever the control is placed.
90
+ data-epr-direction={vertical ? 'vertical' : 'horizontal'}
91
+ >
76
92
  {skinToneVariations.map((skinToneVariation, i) => {
77
93
  const active = skinToneVariation === activeSkinTone;
78
94
 
@@ -91,8 +107,8 @@ export function SkinTonePicker({
91
107
  transform: cx(
92
108
  vertical
93
109
  ? `translateY(-${i * (isOpen ? ITEM_SIZE : 0)}px)`
94
- : `translateX(-${i * (isOpen ? ITEM_SIZE : 0)}px)`,
95
- isOpen && active && 'scale(1.3)',
110
+ : `translateX(${inlineSign * i * (isOpen ? ITEM_SIZE : 0)}px)`,
111
+ appearance && isOpen && active && 'scale(1.3)',
96
112
  ),
97
113
  }}
98
114
  isActive={active}
@@ -114,45 +130,67 @@ export function SkinTonePicker({
114
130
  );
115
131
  }
116
132
 
133
+ function skinToneClassName(
134
+ appearance: boolean,
135
+ vertical: boolean,
136
+ open: boolean,
137
+ ) {
138
+ return cx(
139
+ styles.geometry,
140
+ appearance && styles.skinTones,
141
+ vertical && styles.verticalGeometry,
142
+ appearance && vertical && styles.vertical,
143
+ appearance && open && styles.open,
144
+ appearance && vertical && open && styles.verticalShadow,
145
+ );
146
+ }
147
+
117
148
  export enum SkinTonePickerDirection {
118
149
  VERTICAL = ClassNames.vertical,
119
150
  HORIZONTAL = ClassNames.horizontal,
120
151
  }
121
152
 
122
- const styles = stylesheet.create({
123
- skinTones: {
124
- '.': 'epr-skin-tones',
125
- '--': {
126
- '--epr-skin-tone-size': '15px',
153
+ const styles = /* @__PURE__ */ (() =>
154
+ stylesheet.create({
155
+ geometry: {
156
+ '--': { '--epr-skin-tone-size': '15px' },
157
+ display: 'flex',
158
+ alignItems: 'center',
159
+ justifyContent: 'flex-end',
160
+ padding: '10px 0',
161
+ },
162
+ verticalGeometry: {
163
+ padding: '9px',
164
+ alignItems: 'flex-end',
165
+ flexDirection: 'column',
166
+ },
167
+ skinTones: {
168
+ '.': 'epr-skin-tones',
169
+ transition: 'all 0.3s ease-in-out',
170
+ padding: '10px 0',
171
+ },
172
+ vertical: {
173
+ padding: '9px',
174
+ alignItems: 'flex-end',
175
+ flexDirection: 'column',
176
+ borderRadius: '6px',
177
+ border: '1px solid var(--epr-bg-color)',
178
+ },
179
+ verticalShadow: {
180
+ boxShadow: '0px 0 7px var(--epr-picker-border-color)',
181
+ },
182
+ open: {
183
+ // @ts-ignore - backdropFilter is not recognized.
184
+ backdropFilter: 'blur(5px)',
185
+ background: 'var(--epr-skin-tone-picker-menu-color)',
186
+ '.epr-active': {
187
+ border: '1px solid var(--epr-active-skin-tone-indicator-border-color)',
188
+ },
127
189
  },
128
- display: 'flex',
129
- alignItems: 'center',
130
- justifyContent: 'flex-end',
131
- transition: 'all 0.3s ease-in-out',
132
- padding: '10px 0',
133
- },
134
- vertical: {
135
- padding: '9px',
136
- alignItems: 'flex-end',
137
- flexDirection: 'column',
138
- borderRadius: '6px',
139
- border: '1px solid var(--epr-bg-color)',
140
- },
141
- verticalShadow: {
142
- boxShadow: '0px 0 7px var(--epr-picker-border-color)',
143
- },
144
- open: {
145
- // @ts-ignore - backdropFilter is not recognized.
146
- backdropFilter: 'blur(5px)',
147
- background: 'var(--epr-skin-tone-picker-menu-color)',
148
- '.epr-active': {
149
- border: '1px solid var(--epr-active-skin-tone-indicator-border-color)',
190
+ select: {
191
+ '.': 'epr-skin-tone-select',
192
+ position: 'relative',
193
+ width: 'var(--epr-skin-tone-size)',
194
+ height: 'var(--epr-skin-tone-size)',
150
195
  },
151
- },
152
- select: {
153
- '.': 'epr-skin-tone-select',
154
- position: 'relative',
155
- width: 'var(--epr-skin-tone-size)',
156
- height: 'var(--epr-skin-tone-size)',
157
- },
158
- });
196
+ }))();
@@ -0,0 +1,17 @@
1
+ // Generated by scripts/buildIcons.ts — do not edit.
2
+
3
+ // Reactions/svg/plus.svg
4
+ export const PLUS_ICON =
5
+ "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20px' height='80px' viewBox='0 0 20 80'%3E%3Cpath fill='%23868686' d='M5.7,10.4c0,.1,.1,.3,.2,.4C6,10.9,6.1,11,6.3,11h3.4v3.4c0,.1,.1,.3,.2,.4c.1,.1,.2,.2,.4,.2c.3,0,.5-.2,.5-.5v-3.4h3.4c.3,0,.5-.2,.5-.5s-.2-.5-.5-.5h-3.4V6.7c0-.3-.2-.5-.5-.5C9.8,6,9.6,6.2,9.6,6.5v3.4H6.2C5.9,9.9,5.7,10.1,5.7,10.4L5.7,10.4z'/%3E%3Cpath fill='%233371B7' d='M5.7,30.4c0,.1,.1,.3,.2,.4S6.1,31,6.3,31h3.4v3.4c0,.1,.1,.3,.2,.4c.1,.1,.2,.2,.4,.2c.3,0,.5-.2,.5-.5v-3.4h3.4c.3,0,.5-.2,.5-.5s-.2-.5-.5-.5h-3.4v-3.4c0-.3-.2-.5-.5-.5s-.5,.2-.5,.5v3.4H6.2C5.9,29.9,5.7,30.1,5.7,30.4L5.7,30.4z'/%3E%3Cpath fill='%23C0C0BF' d='M5.7,50.4c0,.1,.1,.3,.2,.4C6,50.9,6.1,51,6.3,51h3.4v3.4c0,.1,.1,.3,.2,.4c.1,.1,.2,.2,.4,.2c.3,0,.5-.2,.5-.5v-3.4h3.4c.3,0,.5-.2,.5-.5s-.2-.5-.5-.5h-3.4v-3.4c0-.3-.2-.5-.5-.5s-.5,.2-.5,.5v3.4H6.2C5.9,49.9,5.7,50.1,5.7,50.4L5.7,50.4z'/%3E%3Cpath fill='%236AA9DD' d='M5.7,70.4c0,.1,.1,.3,.2,.4S6.1,71,6.3,71h3.4v3.4c0,.1,.1,.3,.2,.4c.1,.1,.2,.2,.4,.2c.3,0,.5-.2,.5-.5v-3.4h3.4c.3,0,.5-.2,.5-.5s-.2-.5-.5-.5h-3.4v-3.4c0-.3-.2-.5-.5-.5s-.5,.2-.5,.5v3.4H6.4C5.9,69.9,5.7,70.1,5.7,70.4L5.7,70.4z'/%3E%3C/svg%3E";
6
+
7
+ // body/svg/triangle.svg
8
+ export const TRIANGLE_ICON =
9
+ "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50px' height='15px' viewBox='0 0 50 15'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' stroke='%23E8E7E7' stroke-miterlimit='10' d='M1.86-.43l9.83,11.53c.59,.69,1.56,.69,2.14,0l9.83-11.53'/%3E%3Cpath fill='%23010202' stroke='%23151617' stroke-miterlimit='10' d='M26.86-.43l9.83,11.53c.59,.69,1.56,.69,2.14,0l9.83-11.53'/%3E%3C/g%3E%3C/svg%3E";
10
+
11
+ // header/Search/svg/magnifier.svg
12
+ export const MAGNIFIER_ICON =
13
+ "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20px' height='40px' viewBox='0 0 20 40'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' fill='%23868686' d='M12,8.81c0,2.08-1.68,3.76-3.76,3.76c-2.08,0-3.76-1.68-3.76-3.76c0-2.08,1.68-3.76,3.76-3.76C10.32,5.05,12,6.73,12,8.81zM11.23,12.72c-.83,.64-1.87,1.01-2.99,1.01c-2.72,0-4.92-2.2-4.92-4.92c0-2.72,2.2-4.92,4.92-4.92c2.72,0,4.92,2.2,4.92,4.92c0,1.13-.38,2.16-1.01,2.99l3.94,3.93c.25,.25,.25,.66,0,.92c-.25,.25-.66,.25-.92,0L11.23,12.72z'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' fill='%23C0C0BF' d='M12,28.81c0,2.08-1.68,3.76-3.76,3.76c-2.08,0-3.76-1.68-3.76-3.76c0-2.08,1.68-3.76,3.76-3.76C10.32,25.05,12,26.73,12,28.81zM11.23,32.72c-.83,.64-1.87,1.01-2.99,1.01c-2.72,0-4.92-2.2-4.92-4.92c0-2.72,2.2-4.92,4.92-4.92c2.72,0,4.92,2.2,4.92,4.92c0,1.13-.38,2.16-1.01,2.99l3.94,3.93c.25,.25,.25,.66,0,.92c-.25,.25-.66,.25-.92,0L11.23,32.72z'/%3E%3C/svg%3E";
14
+
15
+ // header/Search/svg/times.svg
16
+ export const TIMES_ICON =
17
+ "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20px' height='80px' viewBox='0 0 20 80'%3E%3Cpath fill='%23868686' d='M6.98,13.59c.1,.1,.24,.15,.37,.15s.27-.05,.37-.15l2.42-2.42l2.43,2.43c.1,.1,.24,.15,.37,.15c.14,0,.27-.05,.37-.15c.21-.21,.21-.54,0-.75l-2.43-2.43L13.32,8c.21-.21,.21-.54,0-.75c-.21-.21-.54-.21-.75,0l-2.42,2.42L7.74,7.27c-.21-.21-.54-.21-.75,0c-.21,.21-.21,.54,0,.75l2.41,2.41l-2.42,2.42C6.77,13.05,6.77,13.39,6.98,13.59L6.98,13.59z'/%3E%3Cpath fill='%23868686' d='M10.15,18.43c4.41,0,8-3.59,8-8c0-4.41-3.59-8-8-8c-4.41,0-8,3.59-8,8C2.15,14.84,5.74,18.43,10.15,18.43zM10.15,3.49c3.83,0,6.94,3.11,6.94,6.94c0,3.83-3.11,6.94-6.94,6.94c-3.83,0-6.94-3.11-6.94-6.94C3.21,6.6,6.33,3.49,10.15,3.49L10.15,3.49z'/%3E%3Cpath fill='%233371B7' d='M6.98,33.59c.1,.1,.24,.15,.37,.15s.27-.05,.37-.15l2.42-2.42l2.43,2.43c.1,.1,.24,.15,.37,.15c.14,0,.27-.05,.37-.15c.21-.21,.21-.54,0-.75l-2.43-2.43L13.32,28c.21-.21,.21-.54,0-.75c-.21-.21-.54-.21-.75,0l-2.42,2.42l-2.41-2.41c-.21-.21-.54-.21-.75,0c-.21,.21-.21,.54,0,.75l2.41,2.41l-2.42,2.42C6.77,33.05,6.77,33.39,6.98,33.59L6.98,33.59z'/%3E%3Cpath fill='%233371B7' d='M10.15,38.43c4.41,0,8-3.59,8-8c0-4.41-3.59-8-8-8c-4.41,0-8,3.59-8,8C2.15,34.84,5.74,38.43,10.15,38.43zM10.15,23.49c3.83,0,6.94,3.11,6.94,6.94c0,3.83-3.11,6.94-6.94,6.94c-3.83,0-6.94-3.11-6.94-6.94C3.21,26.6,6.33,23.49,10.15,23.49L10.15,23.49z'/%3E%3Cpath fill='%23C0C0BF' d='M6.98,53.59c.1,.1,.24,.15,.37,.15s.27-.05,.37-.15l2.42-2.42l2.43,2.43c.1,.1,.24,.15,.37,.15c.14,0,.27-.05,.37-.15c.21-.21,.21-.54,0-.75l-2.43-2.43L13.32,48c.21-.21,.21-.54,0-.75c-.21-.21-.54-.21-.75,0l-2.42,2.42l-2.41-2.41c-.21-.21-.54-.21-.75,0c-.21,.21-.21,.54,0,.75l2.41,2.41l-2.42,2.42C6.77,53.05,6.77,53.39,6.98,53.59L6.98,53.59z'/%3E%3Cpath fill='%23C0C0BF' d='M10.15,58.43c4.41,0,8-3.59,8-8c0-4.41-3.59-8-8-8c-4.41,0-8,3.59-8,8C2.15,54.84,5.74,58.43,10.15,58.43zM10.15,43.49c3.83,0,6.94,3.11,6.94,6.94c0,3.83-3.11,6.94-6.94,6.94c-3.83,0-6.94-3.11-6.94-6.94C3.21,46.6,6.33,43.49,10.15,43.49L10.15,43.49z'/%3E%3Cpath fill='%236AA9DD' d='M6.98,73.59c.1,.1,.24,.15,.37,.15s.27-.05,.37-.15l2.42-2.42l2.43,2.43c.1,.1,.24,.15,.37,.15c.14,0,.27-.05,.37-.15c.21-.21,.21-.54,0-.75l-2.43-2.43L13.32,68c.21-.21,.21-.54,0-.75c-.21-.21-.54-.21-.75,0l-2.42,2.42l-2.41-2.41c-.21-.21-.54-.21-.75,0c-.21,.21-.21,.54,0,.75l2.41,2.41l-2.42,2.42C6.77,73.05,6.77,73.39,6.98,73.59L6.98,73.59z'/%3E%3Cpath fill='%236AA9DD' d='M10.15,78.43c4.41,0,8-3.59,8-8c0-4.41-3.59-8-8-8c-4.41,0-8,3.59-8,8C2.15,74.84,5.74,78.43,10.15,78.43zM10.15,63.49c3.83,0,6.94,3.11,6.94,6.94c0,3.83-3.11,6.94-6.94,6.94c-3.83,0-6.94-3.11-6.94-6.94C3.21,66.6,6.33,63.49,10.15,63.49L10.15,63.49z'/%3E%3C/svg%3E";