emoji-picker-react 4.7.7 → 4.7.9

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.
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { Styles } from 'flairup';
2
3
  export declare const stylesheet: {
3
4
  create: <K extends string>(styles: Partial<{ [k in K]: Partial<Partial<CSSStyleDeclaration> & Partial<{
4
5
  '.'?: string | string[] | undefined;
@@ -10,3 +11,19 @@ export declare const stylesheet: {
10
11
  export declare const commonStyles: Record<never, Set<string>>;
11
12
  export declare function PickerStyleTag(): JSX.Element | null;
12
13
  export declare const commonInteractionStyles: Record<never, Set<string>>;
14
+ export declare function darkMode(key: string, value: Styles): {
15
+ '.epr-dark-theme': {
16
+ [x: string]: Partial<Partial<CSSStyleDeclaration> & Partial<{
17
+ '.'?: string | string[] | undefined;
18
+ '--'?: any;
19
+ }>>;
20
+ };
21
+ '.epr-auto-theme': {
22
+ [x: string]: {
23
+ '@media (prefers-color-scheme: dark)': Partial<Partial<CSSStyleDeclaration> & Partial<{
24
+ '.'?: string | string[] | undefined;
25
+ '--'?: any;
26
+ }>>;
27
+ };
28
+ };
29
+ };
@@ -193,6 +193,15 @@ var commonInteractionStyles = /*#__PURE__*/stylesheet.create({
193
193
  }, hidden)
194
194
  }
195
195
  });
196
+ function darkMode(key, value) {
197
+ var _eprDarkTheme, _eprAutoTheme;
198
+ return {
199
+ '.epr-dark-theme': (_eprDarkTheme = {}, _eprDarkTheme[key] = value, _eprDarkTheme),
200
+ '.epr-auto-theme': (_eprAutoTheme = {}, _eprAutoTheme[key] = {
201
+ '@media (prefers-color-scheme: dark)': value
202
+ }, _eprAutoTheme)
203
+ };
204
+ }
196
205
 
197
206
  var DEFAULT_REACTIONS = ['1f44d', '2764-fe0f', '1f603', '1f622', '1f64f', '1f44e', '1f621' // 😡
198
207
  ];
@@ -18081,10 +18090,10 @@ function BtnPlus() {
18081
18090
  }
18082
18091
  });
18083
18092
  }
18084
- var styles$4 = /*#__PURE__*/stylesheet.create({
18093
+ var styles$4 = /*#__PURE__*/stylesheet.create( /*#__PURE__*/_extends({
18085
18094
  plusSign: {
18086
18095
  fontSize: '20px',
18087
- padding: '18px',
18096
+ padding: '17px',
18088
18097
  color: 'var(--epr-text-color)',
18089
18098
  borderRadius: '50%',
18090
18099
  textAlign: 'center',
@@ -18094,7 +18103,7 @@ var styles$4 = /*#__PURE__*/stylesheet.create({
18094
18103
  display: 'flex',
18095
18104
  justifyContent: 'center',
18096
18105
  alignItems: 'center',
18097
- transition: 'background-color 0.1s ease-in-out',
18106
+ transition: 'background-color 0.2s ease-in-out',
18098
18107
  ':after': {
18099
18108
  content: '',
18100
18109
  minWidth: '20px',
@@ -18107,45 +18116,29 @@ var styles$4 = /*#__PURE__*/stylesheet.create({
18107
18116
  },
18108
18117
  ':hover': {
18109
18118
  color: 'var(--epr-highlight-color)',
18110
- backgroundColor: 'var(--epr-hover-bg-color)',
18119
+ backgroundColor: 'var(--epr-hover-bg-color-reduced-opacity)',
18111
18120
  // @ts-ignore
18112
18121
  ':after': {
18113
- backgroundPositionY: '-20px',
18114
- transform: 'scale(1.2)'
18122
+ backgroundPositionY: '-20px'
18115
18123
  }
18116
18124
  },
18117
18125
  ':focus': {
18118
18126
  color: 'var(--epr-highlight-color)',
18119
- backgroundColor: 'var(--epr-hover-bg-color)',
18127
+ backgroundColor: 'var(--epr-hover-bg-color-reduced-opacity)',
18120
18128
  // @ts-ignore
18121
18129
  ':after': {
18122
18130
  backgroundPositionY: '-40px'
18123
18131
  }
18124
18132
  }
18133
+ }
18134
+ }, /*#__PURE__*/darkMode('plusSign', {
18135
+ ':after': {
18136
+ backgroundPositionY: '-40px'
18125
18137
  },
18126
- '.epr-dark-theme': {
18127
- plusSign: {
18128
- ':after': {
18129
- backgroundPositionY: '-40px'
18130
- },
18131
- ':hover:after': {
18132
- backgroundPositionY: '-60px'
18133
- }
18134
- }
18135
- },
18136
- '.epr-auto-theme': {
18137
- plusSign: {
18138
- '@media (prefers-color-scheme: dark)': {
18139
- ':after': {
18140
- backgroundPositionY: '-40px'
18141
- },
18142
- ':hover:after': {
18143
- backgroundPositionY: '-60px'
18144
- }
18145
- }
18146
- }
18138
+ ':hover:after': {
18139
+ backgroundPositionY: '-60px'
18147
18140
  }
18148
- });
18141
+ })));
18149
18142
 
18150
18143
  function Reactions() {
18151
18144
  var _useReactionsModeStat = useReactionsModeState(),
@@ -18851,7 +18844,7 @@ function useVariationPickerTop(VariationPickerRef) {
18851
18844
  return emojiOffsetTop - height;
18852
18845
  }
18853
18846
  }
18854
- var styles$8 = /*#__PURE__*/stylesheet.create({
18847
+ var styles$8 = /*#__PURE__*/stylesheet.create( /*#__PURE__*/_extends({
18855
18848
  variationPicker: {
18856
18849
  '.': ClassNames.variationPicker,
18857
18850
  position: 'absolute',
@@ -18903,20 +18896,10 @@ var styles$8 = /*#__PURE__*/stylesheet.create({
18903
18896
  top: '100%',
18904
18897
  transform: 'translateX(-18px)',
18905
18898
  backgroundImage: "url(" + SVGTriangle + ")"
18906
- },
18907
- '.epr-dark-theme': {
18908
- pointer: {
18909
- backgroundPosition: '-25px 0'
18910
- }
18911
- },
18912
- '.epr-auto-theme': {
18913
- pointer: {
18914
- '@media (prefers-color-scheme: dark)': {
18915
- backgroundPosition: '-25px 0'
18916
- }
18917
- }
18918
18899
  }
18919
- });
18900
+ }, /*#__PURE__*/darkMode('pointer', {
18901
+ backgroundPosition: '-25px 0'
18902
+ })));
18920
18903
 
18921
18904
  function Body() {
18922
18905
  var BodyRef = useBodyRef();
@@ -19660,7 +19643,7 @@ function IcnSearch() {
19660
19643
  className: flairup.cx(styles$h.icnSearch)
19661
19644
  });
19662
19645
  }
19663
- var styles$h = /*#__PURE__*/stylesheet.create({
19646
+ var styles$h = /*#__PURE__*/stylesheet.create( /*#__PURE__*/_extends({
19664
19647
  icnSearch: {
19665
19648
  '.': 'epr-icn-search',
19666
19649
  content: '',
@@ -19674,20 +19657,10 @@ var styles$h = /*#__PURE__*/stylesheet.create({
19674
19657
  backgroundPosition: '0 0',
19675
19658
  backgroundSize: '20px',
19676
19659
  backgroundImage: "url(" + SVGMagnifier + ")"
19677
- },
19678
- '.epr-dark-theme': {
19679
- icnSearch: {
19680
- backgroundPositionY: '-20px'
19681
- }
19682
- },
19683
- '.epr-auto-theme': {
19684
- icnSearch: {
19685
- '@media (prefers-color-scheme: dark)': {
19686
- backgroundPositionY: '-20px'
19687
- }
19688
- }
19689
19660
  }
19690
- });
19661
+ }, /*#__PURE__*/darkMode('icnSearch', {
19662
+ backgroundPositionY: '-20px'
19663
+ })));
19691
19664
 
19692
19665
  function SearchContainer() {
19693
19666
  var searchDisabled = useSearchDisabledConfig();
@@ -20281,6 +20254,7 @@ function PickerRootElement(_ref2) {
20281
20254
  }
20282
20255
  var DarkTheme = {
20283
20256
  '--epr-emoji-variation-picker-bg-color': 'var(--epr-dark-emoji-variation-picker-bg-color)',
20257
+ '--epr-hover-bg-color-reduced-opacity': 'var(--epr-dark-hover-bg-color-reduced-opacity)',
20284
20258
  '--epr-highlight-color': 'var(--epr-dark-highlight-color)',
20285
20259
  '--epr-text-color': 'var(--epr-dark-text-color)',
20286
20260
  '--epr-hover-bg-color': 'var(--epr-dark-hover-bg-color)',
@@ -20318,6 +20292,7 @@ var styles$j = /*#__PURE__*/stylesheet.create({
20318
20292
  '--': {
20319
20293
  '--epr-highlight-color': '#007aeb',
20320
20294
  '--epr-hover-bg-color': '#f1f8ff',
20295
+ '--epr-hover-bg-color-reduced-opacity': '#f1f8ff80',
20321
20296
  '--epr-focus-bg-color': '#e0f0ff',
20322
20297
  '--epr-text-color': '#858585',
20323
20298
  '--epr-search-input-bg-color': '#f6f6f6',
@@ -20379,6 +20354,7 @@ var styles$j = /*#__PURE__*/stylesheet.create({
20379
20354
  '--epr-dark-highlight-color': '#c0c0c0',
20380
20355
  '--epr-dark-text-color': 'var(--epr-highlight-color)',
20381
20356
  '--epr-dark-hover-bg-color': '#363636f6',
20357
+ '--epr-dark-hover-bg-color-reduced-opacity': '#36363680',
20382
20358
  '--epr-dark-focus-bg-color': '#474747',
20383
20359
  '--epr-dark-search-input-bg-color': '#333333',
20384
20360
  '--epr-dark-category-label-bg-color': '#222222e6',