@chayns-components/emoji-input 5.0.0-beta.76 → 5.0.0-beta.761
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -15
- package/lib/cjs/api/item-storage/get.js +36 -0
- package/lib/cjs/api/item-storage/get.js.map +1 -0
- package/lib/cjs/api/item-storage/put.js +41 -0
- package/lib/cjs/api/item-storage/put.js.map +1 -0
- package/lib/cjs/components/emoji-input/EmojiInput.js +531 -0
- package/lib/cjs/components/emoji-input/EmojiInput.js.map +1 -0
- package/lib/cjs/components/emoji-input/EmojiInput.styles.js +132 -0
- package/lib/cjs/components/emoji-input/EmojiInput.styles.js.map +1 -0
- package/lib/cjs/components/emoji-input/prefix-element/PrefixElement.js +45 -0
- package/lib/cjs/components/emoji-input/prefix-element/PrefixElement.js.map +1 -0
- package/lib/cjs/components/emoji-input/prefix-element/PrefixElement.styles.js +65 -0
- package/lib/cjs/components/emoji-input/prefix-element/PrefixElement.styles.js.map +1 -0
- package/lib/{components → cjs/components}/emoji-picker/EmojiPicker.js +11 -9
- package/lib/cjs/components/emoji-picker/EmojiPicker.js.map +1 -0
- package/lib/{components → cjs/components}/emoji-picker/EmojiPicker.styles.js +5 -5
- package/lib/cjs/components/emoji-picker/EmojiPicker.styles.js.map +1 -0
- package/lib/cjs/components/emoji-picker/emoji-picker-categories/EmojiPickerCategories.js +102 -0
- package/lib/cjs/components/emoji-picker/emoji-picker-categories/EmojiPickerCategories.js.map +1 -0
- package/lib/cjs/components/emoji-picker/emoji-picker-categories/EmojiPickerCategories.styles.js +25 -0
- package/lib/cjs/components/emoji-picker/emoji-picker-categories/EmojiPickerCategories.styles.js.map +1 -0
- package/lib/cjs/components/emoji-picker/emoji-picker-emojis/EmojiPickerEmojis.js +240 -0
- package/lib/cjs/components/emoji-picker/emoji-picker-emojis/EmojiPickerEmojis.js.map +1 -0
- package/lib/cjs/components/emoji-picker/emoji-picker-emojis/EmojiPickerEmojis.styles.js +69 -0
- package/lib/cjs/components/emoji-picker/emoji-picker-emojis/EmojiPickerEmojis.styles.js.map +1 -0
- package/lib/cjs/components/emoji-picker/emoji-picker-emojis/emoji/Emoji.js +144 -0
- package/lib/cjs/components/emoji-picker/emoji-picker-emojis/emoji/Emoji.js.map +1 -0
- package/lib/cjs/components/emoji-picker/emoji-picker-emojis/emoji/Emoji.styles.js +24 -0
- package/lib/cjs/components/emoji-picker/emoji-picker-emojis/emoji/Emoji.styles.js.map +1 -0
- package/lib/cjs/components/emoji-picker/emoji-picker-emojis/emoji/skin-tone-popup/SkinTonePopup.js +130 -0
- package/lib/cjs/components/emoji-picker/emoji-picker-emojis/emoji/skin-tone-popup/SkinTonePopup.js.map +1 -0
- package/lib/cjs/components/emoji-picker/emoji-picker-emojis/emoji/skin-tone-popup/SkinTonePopup.styles.js +99 -0
- package/lib/cjs/components/emoji-picker/emoji-picker-emojis/emoji/skin-tone-popup/SkinTonePopup.styles.js.map +1 -0
- package/lib/cjs/components/emoji-picker-popup/EmojiPickerPopup.js +52 -0
- package/lib/cjs/components/emoji-picker-popup/EmojiPickerPopup.js.map +1 -0
- package/lib/cjs/components/emoji-picker-popup/EmojiPickerPopup.styles.js +15 -0
- package/lib/cjs/components/emoji-picker-popup/EmojiPickerPopup.styles.js.map +1 -0
- package/lib/cjs/constants/alignment.js +19 -0
- package/lib/cjs/constants/alignment.js.map +1 -0
- package/lib/{constants → cjs/constants}/categories.js +2 -2
- package/lib/cjs/constants/categories.js.map +1 -0
- package/lib/cjs/constants/emoji.js +3804 -0
- package/lib/cjs/constants/emoji.js.map +1 -0
- package/lib/cjs/constants/externalServerUrl.js +8 -0
- package/lib/cjs/constants/externalServerUrl.js.map +1 -0
- package/lib/cjs/constants/regex.js +15 -0
- package/lib/cjs/constants/regex.js.map +1 -0
- package/lib/cjs/hooks/emojiHistory.js +89 -0
- package/lib/cjs/hooks/emojiHistory.js.map +1 -0
- package/lib/cjs/index.js +42 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/types/api.js +2 -0
- package/lib/cjs/types/api.js.map +1 -0
- package/lib/cjs/types/category.js +2 -0
- package/lib/cjs/types/category.js.map +1 -0
- package/lib/cjs/utils/emoji.js +104 -0
- package/lib/cjs/utils/emoji.js.map +1 -0
- package/lib/{utils → cjs/utils}/environment.js +6 -4
- package/lib/cjs/utils/environment.js.map +1 -0
- package/lib/cjs/utils/font.js +17 -0
- package/lib/cjs/utils/font.js.map +1 -0
- package/lib/cjs/utils/insert.js +110 -0
- package/lib/cjs/utils/insert.js.map +1 -0
- package/lib/cjs/utils/number.js +17 -0
- package/lib/cjs/utils/number.js.map +1 -0
- package/lib/cjs/utils/selection.js +214 -0
- package/lib/cjs/utils/selection.js.map +1 -0
- package/lib/cjs/utils/text.js +57 -0
- package/lib/cjs/utils/text.js.map +1 -0
- package/lib/esm/api/item-storage/get.js +30 -0
- package/lib/esm/api/item-storage/get.js.map +1 -0
- package/lib/esm/api/item-storage/put.js +35 -0
- package/lib/esm/api/item-storage/put.js.map +1 -0
- package/lib/esm/components/emoji-input/EmojiInput.js +518 -0
- package/lib/esm/components/emoji-input/EmojiInput.js.map +1 -0
- package/lib/esm/components/emoji-input/EmojiInput.styles.js +151 -0
- package/lib/esm/components/emoji-input/EmojiInput.styles.js.map +1 -0
- package/lib/esm/components/emoji-input/prefix-element/PrefixElement.js +38 -0
- package/lib/esm/components/emoji-input/prefix-element/PrefixElement.js.map +1 -0
- package/lib/esm/components/emoji-input/prefix-element/PrefixElement.styles.js +69 -0
- package/lib/esm/components/emoji-input/prefix-element/PrefixElement.styles.js.map +1 -0
- package/lib/esm/components/emoji-picker/EmojiPicker.js +40 -0
- package/lib/esm/components/emoji-picker/EmojiPicker.js.map +1 -0
- package/lib/esm/components/emoji-picker/EmojiPicker.styles.js +16 -0
- package/lib/esm/components/emoji-picker/EmojiPicker.styles.js.map +1 -0
- package/lib/esm/components/emoji-picker/emoji-picker-categories/EmojiPickerCategories.js +96 -0
- package/lib/esm/components/emoji-picker/emoji-picker-categories/EmojiPickerCategories.js.map +1 -0
- package/lib/esm/components/emoji-picker/emoji-picker-categories/EmojiPickerCategories.styles.js +18 -0
- package/lib/esm/components/emoji-picker/emoji-picker-categories/EmojiPickerCategories.styles.js.map +1 -0
- package/lib/esm/components/emoji-picker/emoji-picker-emojis/EmojiPickerEmojis.js +240 -0
- package/lib/esm/components/emoji-picker/emoji-picker-emojis/EmojiPickerEmojis.js.map +1 -0
- package/lib/esm/components/emoji-picker/emoji-picker-emojis/EmojiPickerEmojis.styles.js +76 -0
- package/lib/esm/components/emoji-picker/emoji-picker-emojis/EmojiPickerEmojis.styles.js.map +1 -0
- package/lib/esm/components/emoji-picker/emoji-picker-emojis/emoji/Emoji.js +136 -0
- package/lib/esm/components/emoji-picker/emoji-picker-emojis/emoji/Emoji.js.map +1 -0
- package/lib/esm/components/emoji-picker/emoji-picker-emojis/emoji/Emoji.styles.js +20 -0
- package/lib/esm/components/emoji-picker/emoji-picker-emojis/emoji/Emoji.styles.js.map +1 -0
- package/lib/esm/components/emoji-picker/emoji-picker-emojis/emoji/skin-tone-popup/SkinTonePopup.js +121 -0
- package/lib/esm/components/emoji-picker/emoji-picker-emojis/emoji/skin-tone-popup/SkinTonePopup.js.map +1 -0
- package/lib/esm/components/emoji-picker/emoji-picker-emojis/emoji/skin-tone-popup/SkinTonePopup.styles.js +98 -0
- package/lib/esm/components/emoji-picker/emoji-picker-emojis/emoji/skin-tone-popup/SkinTonePopup.styles.js.map +1 -0
- package/lib/esm/components/emoji-picker-popup/EmojiPickerPopup.js +43 -0
- package/lib/esm/components/emoji-picker-popup/EmojiPickerPopup.js.map +1 -0
- package/lib/esm/components/emoji-picker-popup/EmojiPickerPopup.styles.js +8 -0
- package/lib/esm/components/emoji-picker-popup/EmojiPickerPopup.styles.js.map +1 -0
- package/lib/esm/constants/alignment.js +13 -0
- package/lib/esm/constants/alignment.js.map +1 -0
- package/lib/esm/constants/categories.js +13 -0
- package/lib/esm/constants/categories.js.map +1 -0
- package/lib/esm/constants/emoji-de-DE.json +3827 -0
- package/lib/esm/constants/emoji.js +3798 -0
- package/lib/esm/constants/emoji.js.map +1 -0
- package/lib/esm/constants/externalServerUrl.js +2 -0
- package/lib/esm/constants/externalServerUrl.js.map +1 -0
- package/lib/esm/constants/regex.js +9 -0
- package/lib/esm/constants/regex.js.map +1 -0
- package/lib/esm/hooks/emojiHistory.js +83 -0
- package/lib/esm/hooks/emojiHistory.js.map +1 -0
- package/lib/esm/index.js +6 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/types/api.js +2 -0
- package/lib/esm/types/api.js.map +1 -0
- package/lib/esm/types/category.js +2 -0
- package/lib/esm/types/category.js.map +1 -0
- package/lib/esm/utils/emoji.js +92 -0
- package/lib/esm/utils/emoji.js.map +1 -0
- package/lib/esm/utils/environment.js +24 -0
- package/lib/esm/utils/environment.js.map +1 -0
- package/lib/esm/utils/font.js +10 -0
- package/lib/esm/utils/font.js.map +1 -0
- package/lib/esm/utils/insert.js +104 -0
- package/lib/esm/utils/insert.js.map +1 -0
- package/lib/esm/utils/number.js +10 -0
- package/lib/esm/utils/number.js.map +1 -0
- package/lib/esm/utils/selection.js +197 -0
- package/lib/esm/utils/selection.js.map +1 -0
- package/lib/esm/utils/text.js +48 -0
- package/lib/esm/utils/text.js.map +1 -0
- package/lib/types/api/item-storage/get.d.ts +8 -0
- package/lib/types/api/item-storage/put.d.ts +9 -0
- package/lib/types/components/emoji-input/EmojiInput.d.ts +94 -0
- package/lib/types/components/emoji-input/EmojiInput.styles.d.ts +547 -0
- package/lib/types/components/emoji-input/prefix-element/PrefixElement.d.ts +8 -0
- package/lib/types/components/emoji-input/prefix-element/PrefixElement.styles.d.ts +12 -0
- package/lib/{components → types/components}/emoji-picker/EmojiPicker.d.ts +8 -0
- package/lib/types/components/emoji-picker/EmojiPicker.styles.d.ts +5 -0
- package/lib/types/components/emoji-picker/emoji-picker-categories/EmojiPickerCategories.styles.d.ts +266 -0
- package/lib/{components → types/components}/emoji-picker/emoji-picker-emojis/EmojiPickerEmojis.d.ts +2 -0
- package/lib/types/components/emoji-picker/emoji-picker-emojis/EmojiPickerEmojis.styles.d.ts +10 -0
- package/lib/types/components/emoji-picker/emoji-picker-emojis/emoji/Emoji.d.ts +14 -0
- package/lib/types/components/emoji-picker/emoji-picker-emojis/emoji/Emoji.styles.d.ts +6 -0
- package/lib/types/components/emoji-picker/emoji-picker-emojis/emoji/skin-tone-popup/SkinTonePopup.d.ts +18 -0
- package/lib/types/components/emoji-picker/emoji-picker-emojis/emoji/skin-tone-popup/SkinTonePopup.styles.d.ts +282 -0
- package/lib/{components → types/components}/emoji-picker-popup/EmojiPickerPopup.d.ts +6 -11
- package/lib/types/components/emoji-picker-popup/EmojiPickerPopup.styles.d.ts +1 -0
- package/lib/{constants → types/constants}/alignment.d.ts +4 -0
- package/lib/{constants → types/constants}/categories.d.ts +1 -0
- package/lib/types/constants/emoji.d.ts +8 -0
- package/lib/types/constants/externalServerUrl.d.ts +1 -0
- package/lib/types/constants/regex.d.ts +8 -0
- package/lib/types/hooks/emojiHistory.d.ts +22 -0
- package/lib/types/index.d.ts +6 -0
- package/lib/types/types/api.d.ts +4 -0
- package/lib/types/types/category.d.ts +1 -0
- package/lib/types/utils/emoji.d.ts +4 -0
- package/lib/{utils → types/utils}/environment.d.ts +1 -0
- package/lib/types/utils/font.d.ts +1 -0
- package/lib/types/utils/insert.d.ts +26 -0
- package/lib/types/utils/number.d.ts +1 -0
- package/lib/types/utils/selection.d.ts +22 -0
- package/lib/types/utils/text.d.ts +3 -0
- package/package.json +45 -29
- package/lib/components/emoji-input/EmojiInput.d.ts +0 -37
- package/lib/components/emoji-input/EmojiInput.js +0 -158
- package/lib/components/emoji-input/EmojiInput.js.map +0 -1
- package/lib/components/emoji-input/EmojiInput.styles.d.ts +0 -13
- package/lib/components/emoji-input/EmojiInput.styles.js +0 -104
- package/lib/components/emoji-input/EmojiInput.styles.js.map +0 -1
- package/lib/components/emoji-picker/EmojiPicker.js.map +0 -1
- package/lib/components/emoji-picker/EmojiPicker.styles.d.ts +0 -5
- package/lib/components/emoji-picker/EmojiPicker.styles.js.map +0 -1
- package/lib/components/emoji-picker/emoji-picker-categories/EmojiPickerCategories.js +0 -45
- package/lib/components/emoji-picker/emoji-picker-categories/EmojiPickerCategories.js.map +0 -1
- package/lib/components/emoji-picker/emoji-picker-categories/EmojiPickerCategories.styles.d.ts +0 -2
- package/lib/components/emoji-picker/emoji-picker-categories/EmojiPickerCategories.styles.js +0 -25
- package/lib/components/emoji-picker/emoji-picker-categories/EmojiPickerCategories.styles.js.map +0 -1
- package/lib/components/emoji-picker/emoji-picker-emojis/EmojiPickerEmojis.js +0 -66
- package/lib/components/emoji-picker/emoji-picker-emojis/EmojiPickerEmojis.js.map +0 -1
- package/lib/components/emoji-picker/emoji-picker-emojis/EmojiPickerEmojis.styles.d.ts +0 -2
- package/lib/components/emoji-picker/emoji-picker-emojis/EmojiPickerEmojis.styles.js +0 -55
- package/lib/components/emoji-picker/emoji-picker-emojis/EmojiPickerEmojis.styles.js.map +0 -1
- package/lib/components/emoji-picker-popup/EmojiPickerPopup.js +0 -146
- package/lib/components/emoji-picker-popup/EmojiPickerPopup.js.map +0 -1
- package/lib/components/emoji-picker-popup/EmojiPickerPopup.styles.d.ts +0 -7
- package/lib/components/emoji-picker-popup/EmojiPickerPopup.styles.js +0 -94
- package/lib/components/emoji-picker-popup/EmojiPickerPopup.styles.js.map +0 -1
- package/lib/constants/alignment.js +0 -15
- package/lib/constants/alignment.js.map +0 -1
- package/lib/constants/categories.js.map +0 -1
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -21
- package/lib/index.js.map +0 -1
- package/lib/types/category.d.ts +0 -1
- package/lib/types/category.js +0 -6
- package/lib/types/category.js.map +0 -1
- package/lib/utils/emoji.d.ts +0 -1
- package/lib/utils/emoji.js +0 -191
- package/lib/utils/emoji.js.map +0 -1
- package/lib/utils/environment.js.map +0 -1
- package/lib/utils/selection.d.ts +0 -2
- package/lib/utils/selection.js +0 -43
- package/lib/utils/selection.js.map +0 -1
- /package/lib/{constants → cjs/constants}/emoji-de-DE.json +0 -0
- /package/lib/{components → types/components}/emoji-picker/emoji-picker-categories/EmojiPickerCategories.d.ts +0 -0
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.StyledEmojiInputRightWrapper = exports.StyledEmojiInputEditor = exports.StyledEmojiInputContent = exports.StyledEmojiInput = void 0;
|
|
7
|
-
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
|
-
var _environment = require("../../utils/environment");
|
|
9
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
|
-
const StyledEmojiInput = _styledComponents.default.div`
|
|
12
|
-
align-items: center;
|
|
13
|
-
background-color: ${_ref => {
|
|
14
|
-
let {
|
|
15
|
-
theme
|
|
16
|
-
} = _ref;
|
|
17
|
-
return theme['100'];
|
|
18
|
-
}};
|
|
19
|
-
border-radius: 3px;
|
|
20
|
-
display: flex;
|
|
21
|
-
min-height: 42px;
|
|
22
|
-
opacity: ${_ref2 => {
|
|
23
|
-
let {
|
|
24
|
-
isDisabled
|
|
25
|
-
} = _ref2;
|
|
26
|
-
return isDisabled ? 0.5 : 1;
|
|
27
|
-
}};
|
|
28
|
-
pointer-events: ${_ref3 => {
|
|
29
|
-
let {
|
|
30
|
-
isDisabled
|
|
31
|
-
} = _ref3;
|
|
32
|
-
return isDisabled ? 'none' : 'initial';
|
|
33
|
-
}};
|
|
34
|
-
position: relative;
|
|
35
|
-
transition: opacity 0.3s ease;
|
|
36
|
-
`;
|
|
37
|
-
exports.StyledEmojiInput = StyledEmojiInput;
|
|
38
|
-
const StyledEmojiInputContent = _styledComponents.default.div`
|
|
39
|
-
align-items: end;
|
|
40
|
-
border: 1px solid rgba(160, 160, 160, 0.3);
|
|
41
|
-
border-radius: 3px;
|
|
42
|
-
display: flex;
|
|
43
|
-
flex: 1 1 auto;
|
|
44
|
-
gap: 10px;
|
|
45
|
-
padding: 8px 10px;
|
|
46
|
-
|
|
47
|
-
${_ref4 => {
|
|
48
|
-
let {
|
|
49
|
-
isRightElementGiven
|
|
50
|
-
} = _ref4;
|
|
51
|
-
return isRightElementGiven && (0, _styledComponents.css)`
|
|
52
|
-
border-top-right-radius: 0;
|
|
53
|
-
border-bottom-right-radius: 0;
|
|
54
|
-
border-right-width: 0;
|
|
55
|
-
`;
|
|
56
|
-
}}
|
|
57
|
-
`;
|
|
58
|
-
exports.StyledEmojiInputContent = StyledEmojiInputContent;
|
|
59
|
-
const StyledEmojiInputEditor = _styledComponents.default.div`
|
|
60
|
-
color: ${_ref5 => {
|
|
61
|
-
let {
|
|
62
|
-
theme
|
|
63
|
-
} = _ref5;
|
|
64
|
-
return theme.text;
|
|
65
|
-
}};
|
|
66
|
-
flex: 1 1 auto;
|
|
67
|
-
word-break: break-word;
|
|
68
|
-
|
|
69
|
-
${() => {
|
|
70
|
-
if ((0, _environment.getIsMobile)()) {
|
|
71
|
-
return (0, _styledComponents.css)`
|
|
72
|
-
font-family: 'Roboto Regular', 'Tahoma', serif;
|
|
73
|
-
`;
|
|
74
|
-
}
|
|
75
|
-
return (0, _styledComponents.css)`
|
|
76
|
-
font-family: 'Noto Color Emoji', 'Roboto Regular', 'Tahoma', serif;
|
|
77
|
-
`;
|
|
78
|
-
}}
|
|
79
|
-
|
|
80
|
-
&:empty:not(:focus):before {
|
|
81
|
-
content: '${_ref6 => {
|
|
82
|
-
let {
|
|
83
|
-
placeholder
|
|
84
|
-
} = _ref6;
|
|
85
|
-
return placeholder;
|
|
86
|
-
}}';
|
|
87
|
-
color: ${_ref7 => {
|
|
88
|
-
let {
|
|
89
|
-
theme
|
|
90
|
-
} = _ref7;
|
|
91
|
-
return theme['006'];
|
|
92
|
-
}};
|
|
93
|
-
}
|
|
94
|
-
`;
|
|
95
|
-
exports.StyledEmojiInputEditor = StyledEmojiInputEditor;
|
|
96
|
-
const StyledEmojiInputRightWrapper = _styledComponents.default.div`
|
|
97
|
-
align-self: stretch;
|
|
98
|
-
border-bottom-right-radius: 3px;
|
|
99
|
-
border-top-right-radius: 3px;
|
|
100
|
-
flex: 0 0 auto;
|
|
101
|
-
overflow: hidden;
|
|
102
|
-
`;
|
|
103
|
-
exports.StyledEmojiInputRightWrapper = StyledEmojiInputRightWrapper;
|
|
104
|
-
//# sourceMappingURL=EmojiInput.styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EmojiInput.styles.js","names":["_styledComponents","_interopRequireWildcard","require","_environment","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","StyledEmojiInput","styled","div","_ref","theme","_ref2","isDisabled","_ref3","exports","StyledEmojiInputContent","_ref4","isRightElementGiven","css","StyledEmojiInputEditor","_ref5","text","getIsMobile","_ref6","placeholder","_ref7","StyledEmojiInputRightWrapper"],"sources":["../../../src/components/emoji-input/EmojiInput.styles.ts"],"sourcesContent":["import type { WithTheme } from '@chayns-components/core';\nimport styled, { css } from 'styled-components';\nimport { getIsMobile } from '../../utils/environment';\nimport type { EmojiInputProps } from './EmojiInput';\n\ntype StyledEmojiInputProps = WithTheme<Pick<EmojiInputProps, 'isDisabled'>>;\n\nexport const StyledEmojiInput = styled.div<StyledEmojiInputProps>`\n align-items: center;\n background-color: ${({ theme }: StyledEmojiInputProps) => theme['100']};\n border-radius: 3px;\n display: flex;\n min-height: 42px;\n opacity: ${({ isDisabled }) => (isDisabled ? 0.5 : 1)};\n pointer-events: ${({ isDisabled }) => (isDisabled ? 'none' : 'initial')};\n position: relative;\n transition: opacity 0.3s ease;\n`;\n\ntype StyledEmojiInputContentProps = {\n isRightElementGiven: boolean;\n};\n\nexport const StyledEmojiInputContent = styled.div<StyledEmojiInputContentProps>`\n align-items: end;\n border: 1px solid rgba(160, 160, 160, 0.3);\n border-radius: 3px;\n display: flex;\n flex: 1 1 auto;\n gap: 10px;\n padding: 8px 10px;\n\n ${({ isRightElementGiven }) =>\n isRightElementGiven &&\n css`\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-right-width: 0;\n `}\n`;\n\ntype StyledEmojiInputEditorProps = WithTheme<Pick<EmojiInputProps, 'placeholder'>>;\n\nexport const StyledEmojiInputEditor = styled.div<StyledEmojiInputEditorProps>`\n color: ${({ theme }: StyledEmojiInputEditorProps) => theme.text};\n flex: 1 1 auto;\n word-break: break-word;\n\n ${() => {\n if (getIsMobile()) {\n return css`\n font-family: 'Roboto Regular', 'Tahoma', serif;\n `;\n }\n\n return css`\n font-family: 'Noto Color Emoji', 'Roboto Regular', 'Tahoma', serif;\n `;\n }}\n\n &:empty:not(:focus):before {\n content: '${({ placeholder }) => placeholder}';\n color: ${({ theme }: StyledEmojiInputEditorProps) => theme['006']};\n }\n`;\n\nexport const StyledEmojiInputRightWrapper = styled.div`\n align-self: stretch;\n border-bottom-right-radius: 3px;\n border-top-right-radius: 3px;\n flex: 0 0 auto;\n overflow: hidden;\n`;\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAsD,SAAAE,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAJ,wBAAAQ,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF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,oBAAoBK,KAAA;EAAA,IAAC;IAAEC;EAAY,CAAC,GAAAD,KAAA;EAAA,OAAKC,WAAW;AAAA,CAAC;AACrD,iBAAiBC,KAAA;EAAA,IAAC;IAAEf;EAAmC,CAAC,GAAAe,KAAA;EAAA,OAAKf,KAAK,CAAC,KAAK,CAAC;AAAA,CAAC;AAC1E;AACA,CAAC;AAACI,OAAA,CAAAK,sBAAA,GAAAA,sBAAA;AAEK,MAAMO,4BAA4B,GAAGnB,yBAAM,CAACC,GAAI;AACvD;AACA;AACA;AACA;AACA;AACA,CAAC;AAACM,OAAA,CAAAY,4BAAA,GAAAA,4BAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EmojiPicker.js","names":["_core","require","_react","_interopRequireWildcard","_dataByGroup","_interopRequireDefault","_EmojiPickerCategories","_EmojiPickerEmojis","_EmojiPicker","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","EmojiPicker","_ref","_emojiCategories$","onSelect","searchString","setSearchString","useState","selectedCategory","setSelectedCategory","emojiCategories","slug","handleCategorySelect","useCallback","category","handleSearchChange","event","target","value","createElement","StyledEmojiPicker","Input","onChange","placeholder","displayName","_default","exports"],"sources":["../../../src/components/emoji-picker/EmojiPicker.tsx"],"sourcesContent":["import { Input } from '@chayns-components/core';\nimport React, { ChangeEvent, FC, useCallback, useState } from 'react';\nimport emojiCategories from 'unicode-emoji-json/data-by-group.json';\nimport type { Category } from '../../types/category';\nimport EmojiPickerCategories from './emoji-picker-categories/EmojiPickerCategories';\nimport EmojiPickerEmojis from './emoji-picker-emojis/EmojiPickerEmojis';\nimport { StyledEmojiPicker } from './EmojiPicker.styles';\n\nexport type EmojiPickerProps = {\n /**\n * Function executed when an emoji is selected in the popup\n * @param {string} emoji - Emoji that was selected\n */\n onSelect: (emoji: string) => void;\n};\nconst EmojiPicker: FC<EmojiPickerProps> = ({ onSelect }) => {\n const [searchString, setSearchString] = useState('');\n const [selectedCategory, setSelectedCategory] = useState(emojiCategories[0]?.slug as Category);\n\n const handleCategorySelect = useCallback((category: Category) => {\n setSearchString('');\n setSelectedCategory(category);\n }, []);\n\n const handleSearchChange = useCallback((event: ChangeEvent<HTMLInputElement>) => {\n setSearchString(event.target.value);\n }, []);\n\n return (\n <StyledEmojiPicker>\n <Input onChange={handleSearchChange} placeholder=\"Suchen\" value={searchString} />\n <EmojiPickerEmojis\n onSelect={onSelect}\n searchString={searchString}\n selectedCategory={selectedCategory}\n />\n <EmojiPickerCategories\n onSelect={handleCategorySelect}\n searchString={searchString}\n selectedCategory={selectedCategory}\n />\n </StyledEmojiPicker>\n );\n};\n\nEmojiPicker.displayName = 'EmojiPicker';\n\nexport default EmojiPicker;\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAEA,IAAAK,sBAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,kBAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AAAyD,SAAAI,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAV,wBAAAM,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GA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AC,EAAE,CAAC;IACnBG,mBAAmB,CAACK,QAAQ,CAAC;EACjC,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMC,kBAAkB,GAAG,IAAAF,kBAAW,EAAEG,KAAoC,IAAK;IAC7EV,eAAe,CAACU,KAAK,CAACC,MAAM,CAACC,KAAK,CAAC;EACvC,CAAC,EAAE,EAAE,CAAC;EAEN,oBACI9C,MAAA,CAAAS,OAAA,CAAAsC,aAAA,CAACzC,YAAA,CAAA0C,iBAAiB,qBACdhD,MAAA,CAAAS,OAAA,CAAAsC,aAAA,CAACjD,KAAA,CAAAmD,KAAK;IAACC,QAAQ,EAAEP,kBAAmB;IAACQ,WAAW,EAAC,QAAQ;IAACL,KAAK,EAAEb;EAAa,EAAG,eACjFjC,MAAA,CAAAS,OAAA,CAAAsC,aAAA,CAAC1C,kBAAA,CAAAI,OAAiB;IACduB,QAAQ,EAAEA,QAAS;IACnBC,YAAY,EAAEA,YAAa;IAC3BG,gBAAgB,EAAEA;EAAiB,EACrC,eACFpC,MAAA,CAAAS,OAAA,CAAAsC,aAAA,CAAC3C,sBAAA,CAAAK,OAAqB;IAClBuB,QAAQ,EAAEQ,oBAAqB;IAC/BP,YAAY,EAAEA,YAAa;IAC3BG,gBAAgB,EAAEA;EAAiB,EACrC,CACc;AAE5B,CAAC;AAEDP,WAAW,CAACuB,WAAW,GAAG,aAAa;AAAC,IAAAC,QAAA,GAEzBxB,WAAW;AAAAyB,OAAA,CAAA7C,OAAA,GAAA4C,QAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EmojiPicker.styles.js","names":["_styledComponents","_interopRequireDefault","require","obj","__esModule","default","emojiPickerSize","height","width","exports","StyledEmojiPicker","styled","div"],"sources":["../../../src/components/emoji-picker/EmojiPicker.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const emojiPickerSize = {\n height: 285,\n width: 350,\n};\n\nexport const StyledEmojiPicker = styled.div`\n display: flex;\n flex-direction: column;\n height: ${emojiPickerSize.height}px;\n padding: 10px 22px;\n width: ${emojiPickerSize.width}px;\n user-select: none;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEhC,MAAMG,eAAe,GAAG;EAC3BC,MAAM,EAAE,GAAG;EACXC,KAAK,EAAE;AACX,CAAC;AAACC,OAAA,CAAAH,eAAA,GAAAA,eAAA;AAEK,MAAMI,iBAAiB,GAAGC,yBAAM,CAACC,GAAI;AAC5C;AACA;AACA,cAAcN,eAAe,CAACC,MAAO;AACrC;AACA,aAAaD,eAAe,CAACE,KAAM;AACnC;AACA,CAAC;AAACC,OAAA,CAAAC,iBAAA,GAAAA,iBAAA"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _dataByGroup = _interopRequireDefault(require("unicode-emoji-json/data-by-group.json"));
|
|
9
|
-
var _categories = require("../../../constants/categories");
|
|
10
|
-
var _EmojiPickerCategories = require("./EmojiPickerCategories.styles");
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
-
const EmojiPickerCategories = _ref => {
|
|
15
|
-
let {
|
|
16
|
-
onSelect,
|
|
17
|
-
searchString,
|
|
18
|
-
selectedCategory
|
|
19
|
-
} = _ref;
|
|
20
|
-
const isSearchStringGiven = searchString.trim() !== '';
|
|
21
|
-
const categories = (0, _react.useMemo)(() => _dataByGroup.default.map(_ref2 => {
|
|
22
|
-
let {
|
|
23
|
-
slug
|
|
24
|
-
} = _ref2;
|
|
25
|
-
const isSelected = selectedCategory === slug && !isSearchStringGiven;
|
|
26
|
-
return /*#__PURE__*/_react.default.createElement(_EmojiPickerCategories.StyledMotionEmojiPickerCategory, {
|
|
27
|
-
animate: {
|
|
28
|
-
filter: `grayscale(${isSelected ? 0 : 0.75})`,
|
|
29
|
-
opacity: isSelected ? 1 : 0.5
|
|
30
|
-
},
|
|
31
|
-
className: "prevent-lose-focus",
|
|
32
|
-
initial: false,
|
|
33
|
-
key: slug,
|
|
34
|
-
onClick: () => onSelect(slug),
|
|
35
|
-
transition: {
|
|
36
|
-
duration: 0.2
|
|
37
|
-
}
|
|
38
|
-
}, _categories.CATEGORY_EMOJIS[slug]);
|
|
39
|
-
}), [isSearchStringGiven, onSelect, selectedCategory]);
|
|
40
|
-
return /*#__PURE__*/_react.default.createElement(_EmojiPickerCategories.StyledEmojiPickerCategories, null, categories);
|
|
41
|
-
};
|
|
42
|
-
EmojiPickerCategories.displayName = 'EmojiPickerCategories';
|
|
43
|
-
var _default = EmojiPickerCategories;
|
|
44
|
-
exports.default = _default;
|
|
45
|
-
//# sourceMappingURL=EmojiPickerCategories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EmojiPickerCategories.js","names":["_react","_interopRequireWildcard","require","_dataByGroup","_interopRequireDefault","_categories","_EmojiPickerCategories","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","EmojiPickerCategories","_ref","onSelect","searchString","selectedCategory","isSearchStringGiven","trim","categories","useMemo","unicodeEmoji","map","_ref2","slug","isSelected","createElement","StyledMotionEmojiPickerCategory","animate","filter","opacity","className","initial","onClick","transition","duration","CATEGORY_EMOJIS","StyledEmojiPickerCategories","displayName","_default","exports"],"sources":["../../../../src/components/emoji-picker/emoji-picker-categories/EmojiPickerCategories.tsx"],"sourcesContent":["import React, { FC, useMemo } from 'react';\nimport unicodeEmoji from 'unicode-emoji-json/data-by-group.json';\nimport { CATEGORY_EMOJIS } from '../../../constants/categories';\nimport type { Category } from '../../../types/category';\nimport {\n StyledEmojiPickerCategories,\n StyledMotionEmojiPickerCategory,\n} from './EmojiPickerCategories.styles';\n\nexport type EmojiPickerCategoriesProps = {\n onSelect: (category: Category) => void;\n searchString: string;\n selectedCategory: Category;\n};\n\nconst EmojiPickerCategories: FC<EmojiPickerCategoriesProps> = ({\n onSelect,\n searchString,\n selectedCategory,\n}) => {\n const isSearchStringGiven = searchString.trim() !== '';\n\n const categories = useMemo(\n () =>\n unicodeEmoji.map(({ slug }) => {\n const isSelected = selectedCategory === slug && !isSearchStringGiven;\n\n return (\n <StyledMotionEmojiPickerCategory\n animate={{\n filter: `grayscale(${isSelected ? 0 : 0.75})`,\n opacity: isSelected ? 1 : 0.5,\n }}\n className=\"prevent-lose-focus\"\n initial={false}\n key={slug}\n onClick={() => onSelect(slug as Category)}\n transition={{ duration: 0.2 }}\n >\n {CATEGORY_EMOJIS[slug as Category]}\n </StyledMotionEmojiPickerCategory>\n );\n }),\n [isSearchStringGiven, onSelect, selectedCategory]\n );\n\n return <StyledEmojiPickerCategories>{categories}</StyledEmojiPickerCategories>;\n};\n\nEmojiPickerCategories.displayName = 'EmojiPickerCategories';\n\nexport default EmojiPickerCategories;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAEA,IAAAI,sBAAA,GAAAJ,OAAA;AAGwC,SAAAE,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAV,wBAAAM,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAQ,KAAA,GAAAL,wBAAA,CAAAC,WAAA,OAAAI,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAT,GAAA,YAAAQ,KAAA,CAAAE,GAAA,CAAAV,GAAA,SAAAW,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAhB,GAAA,QAAAgB,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAnB,GAAA,EAAAgB,GAAA,SA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,CAAC,CAAC,EACN,CAACP,mBAAmB,EAAEH,QAAQ,EAAEE,gBAAgB,CAAC,CACpD;EAED,oBAAOjC,MAAA,CAAAS,OAAA,CAAAkC,aAAA,CAACrC,sBAAA,CAAAgD,2BAA2B,QAAElB,UAAU,CAA+B;AAClF,CAAC;AAEDP,qBAAqB,CAAC0B,WAAW,GAAG,uBAAuB;AAAC,IAAAC,QAAA,GAE7C3B,qBAAqB;AAAA4B,OAAA,CAAAhD,OAAA,GAAA+C,QAAA"}
|
package/lib/components/emoji-picker/emoji-picker-categories/EmojiPickerCategories.styles.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const StyledEmojiPickerCategories: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
-
export declare const StyledMotionEmojiPickerCategory: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.StyledMotionEmojiPickerCategory = exports.StyledEmojiPickerCategories = void 0;
|
|
7
|
-
var _framerMotion = require("framer-motion");
|
|
8
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
const StyledEmojiPickerCategories = _styledComponents.default.div`
|
|
11
|
-
align-items: center;
|
|
12
|
-
border-top: 1px solid rgba(160, 160, 160, 0.3);
|
|
13
|
-
display: flex;
|
|
14
|
-
flex: 0 0 auto;
|
|
15
|
-
justify-content: space-between;
|
|
16
|
-
padding-top: 10px;
|
|
17
|
-
`;
|
|
18
|
-
exports.StyledEmojiPickerCategories = StyledEmojiPickerCategories;
|
|
19
|
-
const StyledMotionEmojiPickerCategory = (0, _styledComponents.default)(_framerMotion.motion.div)`
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
font-family: 'Noto Color Emoji', 'Roboto Regular', 'Tahoma', serif;
|
|
22
|
-
font-size: 20px;
|
|
23
|
-
`;
|
|
24
|
-
exports.StyledMotionEmojiPickerCategory = StyledMotionEmojiPickerCategory;
|
|
25
|
-
//# sourceMappingURL=EmojiPickerCategories.styles.js.map
|
package/lib/components/emoji-picker/emoji-picker-categories/EmojiPickerCategories.styles.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EmojiPickerCategories.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireDefault","obj","__esModule","default","StyledEmojiPickerCategories","styled","div","exports","StyledMotionEmojiPickerCategory","motion"],"sources":["../../../../src/components/emoji-picker/emoji-picker-categories/EmojiPickerCategories.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled from 'styled-components';\n\nexport const StyledEmojiPickerCategories = styled.div`\n align-items: center;\n border-top: 1px solid rgba(160, 160, 160, 0.3);\n display: flex;\n flex: 0 0 auto;\n justify-content: space-between;\n padding-top: 10px;\n`;\n\nexport const StyledMotionEmojiPickerCategory = styled(motion.div)`\n cursor: pointer;\n font-family: 'Noto Color Emoji', 'Roboto Regular', 'Tahoma', serif;\n font-size: 20px;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAuC,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEhC,MAAMG,2BAA2B,GAAGC,yBAAM,CAACC,GAAI;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAACC,OAAA,CAAAH,2BAAA,GAAAA,2BAAA;AAEK,MAAMI,+BAA+B,GAAG,IAAAH,yBAAM,EAACI,oBAAM,CAACH,GAAG,CAAE;AAClE;AACA;AACA;AACA,CAAC;AAACC,OAAA,CAAAC,+BAAA,GAAAA,+BAAA"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _emojilib = _interopRequireDefault(require("emojilib"));
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _dataByEmoji = _interopRequireDefault(require("unicode-emoji-json/data-by-emoji.json"));
|
|
10
|
-
var _dataByGroup = _interopRequireDefault(require("unicode-emoji-json/data-by-group.json"));
|
|
11
|
-
var _emojiDeDE = _interopRequireDefault(require("../../../constants/emoji-de-DE.json"));
|
|
12
|
-
var _EmojiPickerEmojis = require("./EmojiPickerEmojis.styles");
|
|
13
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
const EmojiPickerEmojis = _ref => {
|
|
17
|
-
let {
|
|
18
|
-
onSelect,
|
|
19
|
-
searchString,
|
|
20
|
-
selectedCategory
|
|
21
|
-
} = _ref;
|
|
22
|
-
const emojis = (0, _react.useMemo)(() => {
|
|
23
|
-
var _emojiCategories$find;
|
|
24
|
-
if (searchString.trim() !== '') {
|
|
25
|
-
const lowerSearchString = searchString.toLowerCase();
|
|
26
|
-
const searchResults = [];
|
|
27
|
-
Object.entries(_dataByEmoji.default).forEach(_ref2 => {
|
|
28
|
-
let [emoji, {
|
|
29
|
-
name
|
|
30
|
-
}] = _ref2;
|
|
31
|
-
// @ts-expect-error: Type is correct here
|
|
32
|
-
const keywords = _emojilib.default[emoji];
|
|
33
|
-
// @ts-expect-error: Type is correct here
|
|
34
|
-
const germanKeywords = _emojiDeDE.default[emoji];
|
|
35
|
-
if (name.includes(lowerSearchString) || keywords !== null && keywords !== void 0 && keywords.some(keyword => keyword.includes(lowerSearchString)) || germanKeywords !== null && germanKeywords !== void 0 && germanKeywords.some(keyword => keyword.includes(lowerSearchString))) {
|
|
36
|
-
searchResults.push( /*#__PURE__*/_react.default.createElement(_EmojiPickerEmojis.StyledEmojiPickerEmoji, {
|
|
37
|
-
className: "prevent-lose-focus",
|
|
38
|
-
key: name,
|
|
39
|
-
onClick: () => onSelect(emoji)
|
|
40
|
-
}, emoji));
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
return searchResults;
|
|
44
|
-
}
|
|
45
|
-
return (_emojiCategories$find = _dataByGroup.default.find(_ref3 => {
|
|
46
|
-
let {
|
|
47
|
-
slug
|
|
48
|
-
} = _ref3;
|
|
49
|
-
return slug === selectedCategory;
|
|
50
|
-
})) === null || _emojiCategories$find === void 0 ? void 0 : _emojiCategories$find.emojis.map(_ref4 => {
|
|
51
|
-
let {
|
|
52
|
-
emoji,
|
|
53
|
-
name
|
|
54
|
-
} = _ref4;
|
|
55
|
-
return /*#__PURE__*/_react.default.createElement(_EmojiPickerEmojis.StyledEmojiPickerEmoji, {
|
|
56
|
-
key: name,
|
|
57
|
-
onClick: () => onSelect(emoji)
|
|
58
|
-
}, emoji);
|
|
59
|
-
});
|
|
60
|
-
}, [onSelect, searchString, selectedCategory]);
|
|
61
|
-
return /*#__PURE__*/_react.default.createElement(_EmojiPickerEmojis.StyledEmojiPickerEmojis, null, emojis);
|
|
62
|
-
};
|
|
63
|
-
EmojiPickerEmojis.displayName = 'EmojiPickerEmojis';
|
|
64
|
-
var _default = EmojiPickerEmojis;
|
|
65
|
-
exports.default = _default;
|
|
66
|
-
//# sourceMappingURL=EmojiPickerEmojis.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EmojiPickerEmojis.js","names":["_emojilib","_interopRequireDefault","require","_react","_interopRequireWildcard","_dataByEmoji","_dataByGroup","_emojiDeDE","_EmojiPickerEmojis","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","EmojiPickerEmojis","_ref","onSelect","searchString","selectedCategory","emojis","useMemo","_emojiCategories$find","trim","lowerSearchString","toLowerCase","searchResults","entries","emojiList","forEach","_ref2","emoji","name","keywords","emojiLib","germanKeywords","germanEmojiLib","includes","some","keyword","push","createElement","StyledEmojiPickerEmoji","className","onClick","emojiCategories","find","_ref3","slug","map","_ref4","StyledEmojiPickerEmojis","displayName","_default","exports"],"sources":["../../../../src/components/emoji-picker/emoji-picker-emojis/EmojiPickerEmojis.tsx"],"sourcesContent":["import emojiLib from 'emojilib';\nimport React, { FC, useMemo } from 'react';\nimport emojiList from 'unicode-emoji-json/data-by-emoji.json';\nimport emojiCategories from 'unicode-emoji-json/data-by-group.json';\nimport germanEmojiLib from '../../../constants/emoji-de-DE.json';\nimport type { Category } from '../../../types/category';\nimport { StyledEmojiPickerEmoji, StyledEmojiPickerEmojis } from './EmojiPickerEmojis.styles';\n\nexport type EmojiPickerEmojisProps = {\n onSelect: (emoji: string) => void;\n searchString: string;\n selectedCategory: Category;\n};\n\nconst EmojiPickerEmojis: FC<EmojiPickerEmojisProps> = ({\n onSelect,\n searchString,\n selectedCategory,\n}) => {\n const emojis = useMemo(() => {\n if (searchString.trim() !== '') {\n const lowerSearchString = searchString.toLowerCase();\n\n const searchResults: JSX.Element[] = [];\n\n Object.entries(emojiList).forEach(([emoji, { name }]) => {\n // @ts-expect-error: Type is correct here\n const keywords = emojiLib[emoji] as string[] | undefined;\n // @ts-expect-error: Type is correct here\n const germanKeywords = germanEmojiLib[emoji] as string[] | undefined;\n\n if (\n name.includes(lowerSearchString) ||\n keywords?.some((keyword) => keyword.includes(lowerSearchString)) ||\n germanKeywords?.some((keyword) => keyword.includes(lowerSearchString))\n ) {\n searchResults.push(\n <StyledEmojiPickerEmoji\n className=\"prevent-lose-focus\"\n key={name}\n onClick={() => onSelect(emoji)}\n >\n {emoji}\n </StyledEmojiPickerEmoji>\n );\n }\n });\n\n return searchResults;\n }\n\n return emojiCategories\n .find(({ slug }) => slug === selectedCategory)\n ?.emojis.map(({ emoji, name }) => (\n <StyledEmojiPickerEmoji key={name} onClick={() => onSelect(emoji)}>\n {emoji}\n </StyledEmojiPickerEmoji>\n ));\n }, [onSelect, searchString, selectedCategory]);\n\n return <StyledEmojiPickerEmojis>{emojis}</StyledEmojiPickerEmojis>;\n};\n\nEmojiPickerEmojis.displayName = 'EmojiPickerEmojis';\n\nexport default EmojiPickerEmojis;\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,YAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,UAAA,GAAAN,sBAAA,CAAAC,OAAA;AAEA,IAAAM,kBAAA,GAAAN,OAAA;AAA6F,SA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AAC,GAAAD,KAAA;MAAA,OAAKC,IAAI,KAAK7B,gBAAgB;IAAA,EAAC,cAAAG,qBAAA,uBAD3CA,qBAAA,CAEDF,MAAM,CAAC6B,GAAG,CAACC,KAAA;MAAA,IAAC;QAAEnB,KAAK;QAAEC;MAAK,CAAC,GAAAkB,KAAA;MAAA,oBACzB/D,MAAA,CAAAa,OAAA,CAAAyC,aAAA,CAACjD,kBAAA,CAAAkD,sBAAsB;QAACjC,GAAG,EAAEuB,IAAK;QAACY,OAAO,EAAEA,CAAA,KAAM3B,QAAQ,CAACc,KAAK;MAAE,GAC7DA,KAAK,CACe;IAAA,CAC5B,CAAC;EACV,CAAC,EAAE,CAACd,QAAQ,EAAEC,YAAY,EAAEC,gBAAgB,CAAC,CAAC;EAE9C,oBAAOhC,MAAA,CAAAa,OAAA,CAAAyC,aAAA,CAACjD,kBAAA,CAAA2D,uBAAuB,QAAE/B,MAAM,CAA2B;AACtE,CAAC;AAEDL,iBAAiB,CAACqC,WAAW,GAAG,mBAAmB;AAAC,IAAAC,QAAA,GAErCtC,iBAAiB;AAAAuC,OAAA,CAAAtD,OAAA,GAAAqD,QAAA"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.StyledEmojiPickerEmojis = exports.StyledEmojiPickerEmoji = void 0;
|
|
7
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
const StyledEmojiPickerEmojis = _styledComponents.default.div`
|
|
10
|
-
display: grid;
|
|
11
|
-
flex: 1 1 auto;
|
|
12
|
-
grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
|
|
13
|
-
grid-template-rows: min-content;
|
|
14
|
-
overflow-y: scroll;
|
|
15
|
-
padding: 10px 0;
|
|
16
|
-
|
|
17
|
-
// Styles for custom scrollbar
|
|
18
|
-
::-webkit-scrollbar {
|
|
19
|
-
width: 5px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
::-webkit-scrollbar-track {
|
|
23
|
-
background-color: transparent;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
::-webkit-scrollbar-button {
|
|
27
|
-
background-color: transparent;
|
|
28
|
-
height: 5px;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
::-webkit-scrollbar-thumb {
|
|
32
|
-
background-color: rgba(0, 0, 0, 0.15);
|
|
33
|
-
border-radius: 20px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Scrollbar styles for Firefox. The above styles are not supported in Firefox, these styles are
|
|
37
|
-
// only supported in Firefox:
|
|
38
|
-
* {
|
|
39
|
-
scrollbar-color: #80808080 transparent;
|
|
40
|
-
scrollbar-width: thin;
|
|
41
|
-
}
|
|
42
|
-
`;
|
|
43
|
-
exports.StyledEmojiPickerEmojis = StyledEmojiPickerEmojis;
|
|
44
|
-
const StyledEmojiPickerEmoji = _styledComponents.default.div`
|
|
45
|
-
align-items: center;
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
display: flex;
|
|
48
|
-
font-family: 'Noto Color Emoji', 'Roboto Regular', 'Tahoma', serif;
|
|
49
|
-
font-size: 32px;
|
|
50
|
-
justify-content: center;
|
|
51
|
-
width: 48px;
|
|
52
|
-
height: 48px;
|
|
53
|
-
`;
|
|
54
|
-
exports.StyledEmojiPickerEmoji = StyledEmojiPickerEmoji;
|
|
55
|
-
//# sourceMappingURL=EmojiPickerEmojis.styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EmojiPickerEmojis.styles.js","names":["_styledComponents","_interopRequireDefault","require","obj","__esModule","default","StyledEmojiPickerEmojis","styled","div","exports","StyledEmojiPickerEmoji"],"sources":["../../../../src/components/emoji-picker/emoji-picker-emojis/EmojiPickerEmojis.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledEmojiPickerEmojis = styled.div`\n display: grid;\n flex: 1 1 auto;\n grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));\n grid-template-rows: min-content;\n overflow-y: scroll;\n padding: 10px 0;\n\n // Styles for custom scrollbar\n ::-webkit-scrollbar {\n width: 5px;\n }\n\n ::-webkit-scrollbar-track {\n background-color: transparent;\n }\n\n ::-webkit-scrollbar-button {\n background-color: transparent;\n height: 5px;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.15);\n border-radius: 20px;\n }\n\n // Scrollbar styles for Firefox. The above styles are not supported in Firefox, these styles are\n // only supported in Firefox:\n * {\n scrollbar-color: #80808080 transparent;\n scrollbar-width: thin;\n }\n`;\n\nexport const StyledEmojiPickerEmoji = styled.div`\n align-items: center;\n cursor: pointer;\n display: flex;\n font-family: 'Noto Color Emoji', 'Roboto Regular', 'Tahoma', serif;\n font-size: 32px;\n justify-content: center;\n width: 48px;\n height: 48px;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEhC,MAAMG,uBAAuB,GAAGC,yBAAM,CAACC,GAAI;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAACC,OAAA,CAAAH,uBAAA,GAAAA,uBAAA;AAEK,MAAMI,sBAAsB,GAAGH,yBAAM,CAACC,GAAI;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAACC,OAAA,CAAAC,sBAAA,GAAAA,sBAAA"}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _Icon = _interopRequireDefault(require("@chayns-components/core/lib/components/icon/Icon"));
|
|
8
|
-
var _framerMotion = require("framer-motion");
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _alignment = require("../../constants/alignment");
|
|
11
|
-
var _EmojiPicker = _interopRequireDefault(require("../emoji-picker/EmojiPicker"));
|
|
12
|
-
var _EmojiPicker2 = require("../emoji-picker/EmojiPicker.styles");
|
|
13
|
-
var _EmojiPickerPopup = require("./EmojiPickerPopup.styles");
|
|
14
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
const EmojiPickerPopup = _ref => {
|
|
18
|
-
let {
|
|
19
|
-
alignment,
|
|
20
|
-
onPopupVisibilityChange,
|
|
21
|
-
onSelect
|
|
22
|
-
} = _ref;
|
|
23
|
-
const [internalAlignment, setInternalAlignment] = (0, _react.useState)(_alignment.PopupAlignment.TopLeft);
|
|
24
|
-
const [shouldShowPopup, setShouldShowPopup] = (0, _react.useState)(false);
|
|
25
|
-
const [position, setPosition] = (0, _react.useState)({});
|
|
26
|
-
const contentRef = (0, _react.useRef)(null);
|
|
27
|
-
const handleHide = (0, _react.useCallback)(() => {
|
|
28
|
-
setShouldShowPopup(false);
|
|
29
|
-
}, []);
|
|
30
|
-
const handleDocumentClick = (0, _react.useCallback)(event => {
|
|
31
|
-
var _contentRef$current;
|
|
32
|
-
if (!((_contentRef$current = contentRef.current) !== null && _contentRef$current !== void 0 && _contentRef$current.contains(event.target))) {
|
|
33
|
-
event.preventDefault();
|
|
34
|
-
event.stopPropagation();
|
|
35
|
-
handleHide();
|
|
36
|
-
}
|
|
37
|
-
}, [handleHide]);
|
|
38
|
-
const handlePopupIconClick = (0, _react.useCallback)(event => {
|
|
39
|
-
if (shouldShowPopup) {
|
|
40
|
-
setShouldShowPopup(false);
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
const {
|
|
44
|
-
height,
|
|
45
|
-
left,
|
|
46
|
-
top,
|
|
47
|
-
width
|
|
48
|
-
} = event.currentTarget.getBoundingClientRect();
|
|
49
|
-
let newInternalAlignment = alignment;
|
|
50
|
-
if (typeof newInternalAlignment !== 'number') {
|
|
51
|
-
if (top < _EmojiPicker2.emojiPickerSize.height + 16) {
|
|
52
|
-
if (left < _EmojiPicker2.emojiPickerSize.width + 16) {
|
|
53
|
-
newInternalAlignment = _alignment.PopupAlignment.BottomRight;
|
|
54
|
-
} else {
|
|
55
|
-
newInternalAlignment = _alignment.PopupAlignment.BottomLeft;
|
|
56
|
-
}
|
|
57
|
-
} else if (left < _EmojiPicker2.emojiPickerSize.width + 16) {
|
|
58
|
-
newInternalAlignment = _alignment.PopupAlignment.TopRight;
|
|
59
|
-
} else {
|
|
60
|
-
newInternalAlignment = _alignment.PopupAlignment.TopLeft;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
let newPosition = {};
|
|
64
|
-
switch (newInternalAlignment) {
|
|
65
|
-
case _alignment.PopupAlignment.BottomLeft:
|
|
66
|
-
newPosition = {
|
|
67
|
-
left: 8 + width - _EmojiPicker2.emojiPickerSize.width,
|
|
68
|
-
top: 12 + height
|
|
69
|
-
};
|
|
70
|
-
break;
|
|
71
|
-
case _alignment.PopupAlignment.BottomRight:
|
|
72
|
-
newPosition = {
|
|
73
|
-
left: -10,
|
|
74
|
-
top: 12 + height
|
|
75
|
-
};
|
|
76
|
-
break;
|
|
77
|
-
case _alignment.PopupAlignment.TopLeft:
|
|
78
|
-
newPosition = {
|
|
79
|
-
left: 8 + width - _EmojiPicker2.emojiPickerSize.width,
|
|
80
|
-
top: -12 - _EmojiPicker2.emojiPickerSize.height
|
|
81
|
-
};
|
|
82
|
-
break;
|
|
83
|
-
case _alignment.PopupAlignment.TopRight:
|
|
84
|
-
newPosition = {
|
|
85
|
-
left: -10,
|
|
86
|
-
top: -12 - _EmojiPicker2.emojiPickerSize.height
|
|
87
|
-
};
|
|
88
|
-
break;
|
|
89
|
-
default:
|
|
90
|
-
break;
|
|
91
|
-
}
|
|
92
|
-
setInternalAlignment(newInternalAlignment);
|
|
93
|
-
setPosition(newPosition);
|
|
94
|
-
setShouldShowPopup(true);
|
|
95
|
-
}, [alignment, shouldShowPopup]);
|
|
96
|
-
(0, _react.useEffect)(() => {
|
|
97
|
-
if (shouldShowPopup) {
|
|
98
|
-
document.addEventListener('click', handleDocumentClick, true);
|
|
99
|
-
window.addEventListener('blur', handleHide);
|
|
100
|
-
}
|
|
101
|
-
return () => {
|
|
102
|
-
document.removeEventListener('click', handleDocumentClick, true);
|
|
103
|
-
window.removeEventListener('blur', handleHide);
|
|
104
|
-
};
|
|
105
|
-
}, [handleDocumentClick, handleHide, shouldShowPopup]);
|
|
106
|
-
(0, _react.useEffect)(() => {
|
|
107
|
-
if (typeof onPopupVisibilityChange === 'function') {
|
|
108
|
-
onPopupVisibilityChange(shouldShowPopup);
|
|
109
|
-
}
|
|
110
|
-
}, [onPopupVisibilityChange, shouldShowPopup]);
|
|
111
|
-
const exitAndInitialY = internalAlignment === _alignment.PopupAlignment.TopLeft || internalAlignment === _alignment.PopupAlignment.TopRight ? -16 : 16;
|
|
112
|
-
return /*#__PURE__*/_react.default.createElement(_EmojiPickerPopup.StyledEmojiPickerPopup, null, /*#__PURE__*/_react.default.createElement(_framerMotion.AnimatePresence, {
|
|
113
|
-
initial: false
|
|
114
|
-
}, shouldShowPopup && /*#__PURE__*/_react.default.createElement(_EmojiPickerPopup.StyledMotionEmojiPickerPopupContent, {
|
|
115
|
-
alignment: internalAlignment,
|
|
116
|
-
animate: {
|
|
117
|
-
opacity: 1,
|
|
118
|
-
y: 0
|
|
119
|
-
},
|
|
120
|
-
exit: {
|
|
121
|
-
opacity: 0,
|
|
122
|
-
y: exitAndInitialY
|
|
123
|
-
},
|
|
124
|
-
initial: {
|
|
125
|
-
opacity: 0,
|
|
126
|
-
y: exitAndInitialY
|
|
127
|
-
},
|
|
128
|
-
key: "emojiPickerPopupContent",
|
|
129
|
-
ref: contentRef,
|
|
130
|
-
style: position,
|
|
131
|
-
transition: {
|
|
132
|
-
type: 'tween'
|
|
133
|
-
}
|
|
134
|
-
}, /*#__PURE__*/_react.default.createElement(_EmojiPicker.default, {
|
|
135
|
-
onSelect: onSelect
|
|
136
|
-
}))), /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
137
|
-
className: "prevent-lose-focus",
|
|
138
|
-
icons: ['far fa-smile'],
|
|
139
|
-
onClick: handlePopupIconClick,
|
|
140
|
-
size: 18
|
|
141
|
-
}));
|
|
142
|
-
};
|
|
143
|
-
EmojiPickerPopup.displayName = 'EmojiPickerPopup';
|
|
144
|
-
var _default = EmojiPickerPopup;
|
|
145
|
-
exports.default = _default;
|
|
146
|
-
//# sourceMappingURL=EmojiPickerPopup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EmojiPickerPopup.js","names":["_Icon","_interopRequireDefault","require","_framerMotion","_react","_interopRequireWildcard","_alignment","_EmojiPicker","_EmojiPicker2","_EmojiPickerPopup","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","EmojiPickerPopup","_ref","alignment","onPopupVisibilityChange","onSelect","internalAlignment","setInternalAlignment","useState","PopupAlignment","TopLeft","shouldShowPopup","setShouldShowPopup","position","setPosition","contentRef","useRef","handleHide","useCallback","handleDocumentClick","event","_contentRef$current","current","contains","target","preventDefault","stopPropagation","handlePopupIconClick","height","left","top","width","currentTarget","getBoundingClientRect","newInternalAlignment","emojiPickerSize","BottomRight","BottomLeft","TopRight","newPosition","useEffect","document","addEventListener","window","removeEventListener","exitAndInitialY","createElement","StyledEmojiPickerPopup","AnimatePresence","initial","StyledMotionEmojiPickerPopupContent","animate","opacity","y","exit","ref","style","transition","type","className","icons","onClick","size","displayName","_default","exports"],"sources":["../../../src/components/emoji-picker-popup/EmojiPickerPopup.tsx"],"sourcesContent":["import Icon from '@chayns-components/core/lib/components/icon/Icon';\nimport { AnimatePresence } from 'framer-motion';\nimport React, { FC, MouseEvent, useCallback, useEffect, useRef, useState } from 'react';\nimport { PopupAlignment } from '../../constants/alignment';\nimport EmojiPicker from '../emoji-picker/EmojiPicker';\nimport { emojiPickerSize } from '../emoji-picker/EmojiPicker.styles';\nimport {\n StyledEmojiPickerPopup,\n StyledMotionEmojiPickerPopupContent,\n} from './EmojiPickerPopup.styles';\n\nexport type EmojiPickerPopupProps = {\n /**\n * Sets the alignment of the popup to a fixed value. If this value is not set, the component\n * calculates the best position on its own. Use the imported 'PopupAlignment' enum to set this\n * value.\n */\n alignment?: PopupAlignment;\n /**\n * Function that is executed when the visibility of the popup changes.\n * @param {boolean} isVisible - Whether the popup is visible or not\n */\n onPopupVisibilityChange?: (isVisible: boolean) => void;\n /**\n * Function executed when an emoji is selected in the popup\n * @param {string} emoji - Emoji that was selected\n */\n onSelect: (emoji: string) => void;\n};\n\nexport type PopupPosition = {\n bottom?: number;\n left?: number;\n right?: number;\n top?: number;\n};\n\nconst EmojiPickerPopup: FC<EmojiPickerPopupProps> = ({\n alignment,\n onPopupVisibilityChange,\n onSelect,\n}) => {\n const [internalAlignment, setInternalAlignment] = useState<PopupAlignment>(\n PopupAlignment.TopLeft\n );\n const [shouldShowPopup, setShouldShowPopup] = useState(false);\n const [position, setPosition] = useState({} as PopupPosition);\n\n const contentRef = useRef<HTMLDivElement>(null);\n\n const handleHide = useCallback(() => {\n setShouldShowPopup(false);\n }, []);\n\n const handleDocumentClick = useCallback<EventListener>(\n (event) => {\n if (!contentRef.current?.contains(event.target as Node)) {\n event.preventDefault();\n event.stopPropagation();\n\n handleHide();\n }\n },\n [handleHide]\n );\n\n const handlePopupIconClick = useCallback(\n (event: MouseEvent<HTMLSpanElement>) => {\n if (shouldShowPopup) {\n setShouldShowPopup(false);\n\n return;\n }\n\n const { height, left, top, width } = event.currentTarget.getBoundingClientRect();\n\n let newInternalAlignment: PopupAlignment | undefined = alignment;\n\n if (typeof newInternalAlignment !== 'number') {\n if (top < emojiPickerSize.height + 16) {\n if (left < emojiPickerSize.width + 16) {\n newInternalAlignment = PopupAlignment.BottomRight;\n } else {\n newInternalAlignment = PopupAlignment.BottomLeft;\n }\n } else if (left < emojiPickerSize.width + 16) {\n newInternalAlignment = PopupAlignment.TopRight;\n } else {\n newInternalAlignment = PopupAlignment.TopLeft;\n }\n }\n\n let newPosition: PopupPosition = {};\n\n switch (newInternalAlignment) {\n case PopupAlignment.BottomLeft:\n newPosition = { left: 8 + width - emojiPickerSize.width, top: 12 + height };\n break;\n case PopupAlignment.BottomRight:\n newPosition = { left: -10, top: 12 + height };\n break;\n case PopupAlignment.TopLeft:\n newPosition = {\n left: 8 + width - emojiPickerSize.width,\n top: -12 - emojiPickerSize.height,\n };\n break;\n case PopupAlignment.TopRight:\n newPosition = { left: -10, top: -12 - emojiPickerSize.height };\n break;\n default:\n break;\n }\n\n setInternalAlignment(newInternalAlignment);\n setPosition(newPosition);\n setShouldShowPopup(true);\n },\n [alignment, shouldShowPopup]\n );\n\n useEffect(() => {\n if (shouldShowPopup) {\n document.addEventListener('click', handleDocumentClick, true);\n window.addEventListener('blur', handleHide);\n }\n\n return () => {\n document.removeEventListener('click', handleDocumentClick, true);\n window.removeEventListener('blur', handleHide);\n };\n }, [handleDocumentClick, handleHide, shouldShowPopup]);\n\n useEffect(() => {\n if (typeof onPopupVisibilityChange === 'function') {\n onPopupVisibilityChange(shouldShowPopup);\n }\n }, [onPopupVisibilityChange, shouldShowPopup]);\n\n const exitAndInitialY =\n internalAlignment === PopupAlignment.TopLeft ||\n internalAlignment === PopupAlignment.TopRight\n ? -16\n : 16;\n\n return (\n <StyledEmojiPickerPopup>\n <AnimatePresence initial={false}>\n {shouldShowPopup && (\n <StyledMotionEmojiPickerPopupContent\n alignment={internalAlignment}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0, y: exitAndInitialY }}\n initial={{ opacity: 0, y: exitAndInitialY }}\n key=\"emojiPickerPopupContent\"\n ref={contentRef}\n style={position}\n transition={{ type: 'tween' }}\n >\n <EmojiPicker onSelect={onSelect} />\n </StyledMotionEmojiPickerPopupContent>\n )}\n </AnimatePresence>\n <Icon\n className=\"prevent-lose-focus\"\n icons={['far fa-smile']}\n onClick={handlePopupIconClick}\n size={18}\n />\n </StyledEmojiPickerPopup>\n );\n};\n\nEmojiPickerPopup.displayName = 'EmojiPickerPopup';\n\nexport default EmojiPickerPopup;\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IA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AAA4D,aAAA,CAACpE,iBAAA,CAAAwE,mCAAmC;IAChC/C,SAAS,EAAEG,iBAAkB;IAC7B6C,OAAO,EAAE;MAAEC,OAAO,EAAE,CAAC;MAAEC,CAAC,EAAE;IAAE,CAAE;IAC9BC,IAAI,EAAE;MAAEF,OAAO,EAAE,CAAC;MAAEC,CAAC,EAAER;IAAgB,CAAE;IACzCI,OAAO,EAAE;MAAEG,OAAO,EAAE,CAAC;MAAEC,CAAC,EAAER;IAAgB,CAAE;IAC5ClD,GAAG,EAAC,yBAAyB;IAC7B4D,GAAG,EAAExC,UAAW;IAChByC,KAAK,EAAE3C,QAAS;IAChB4C,UAAU,EAAE;MAAEC,IAAI,EAAE;IAAQ;EAAE,gBAE9BrF,MAAA,CAAAa,OAAA,CAAA4D,aAAA,CAACtE,YAAA,CAAAU,OAAW;IAACmB,QAAQ,EAAEA;EAAS,EAAG,CAE1C,CACa,eAClBhC,MAAA,CAAAa,OAAA,CAAA4D,aAAA,CAAC7E,KAAA,CAAAiB,OAAI;IACDyE,SAAS,EAAC,oBAAoB;IAC9BC,KAAK,EAAE,CAAC,cAAc,CAAE;IACxBC,OAAO,EAAElC,oBAAqB;IAC9BmC,IAAI,EAAE;EAAG,EACX,CACmB;AAEjC,CAAC;AAED7D,gBAAgB,CAAC8D,WAAW,GAAG,kBAAkB;AAAC,IAAAC,QAAA,GAEnC/D,gBAAgB;AAAAgE,OAAA,CAAA/E,OAAA,GAAA8E,QAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PopupAlignment } from '../../constants/alignment';
|
|
2
|
-
export declare const StyledEmojiPickerPopup: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export declare const StyledMotionEmojiPickerPopupContent: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {
|
|
4
|
-
alignment: PopupAlignment;
|
|
5
|
-
} & {
|
|
6
|
-
theme: import("@chayns-components/core/lib/components/color-scheme-provider/ColorSchemeProvider").Theme;
|
|
7
|
-
}, never>;
|