aplance-ui 1.0.1
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/LICENSE +21 -0
- package/README.md +29 -0
- package/dist/api.d.ts +175 -0
- package/dist/api.js +1954 -0
- package/dist/api.js.map +1 -0
- package/dist/frameworks/astro/astro.config.snippet.md +23 -0
- package/dist/frameworks/astro/postcss.config.mjs.template +20 -0
- package/dist/frameworks/astro/vite-inline.snippet.md +22 -0
- package/dist/frameworks/electron-vite/vite.config.snippet.md +44 -0
- package/dist/frameworks/next/layout-import.snippet.md +19 -0
- package/dist/frameworks/next/next.config.snippet.md +15 -0
- package/dist/frameworks/next/postcss.config.js.template +16 -0
- package/dist/frameworks/tanstack-start/postcss.config.ts.template +17 -0
- package/dist/frameworks/tanstack-start/vite-inline.snippet.md +22 -0
- package/dist/frameworks/vite-react/postcss.config.ts.template +16 -0
- package/dist/frameworks/vite-react/vite-inline.snippet.md +20 -0
- package/dist/frameworks/vite-react/vite.config.ts.template +48 -0
- package/dist/index.js +2047 -0
- package/dist/index.js.map +1 -0
- package/package.json +63 -0
- package/registry/components/primitives/icon/icon.module.css +63 -0
- package/registry/components/primitives/icon/icon.tsx +53 -0
- package/registry/components/primitives/modal/modal-context.ts +19 -0
- package/registry/components/primitives/modal/modal.module.css +415 -0
- package/registry/components/primitives/modal/modal.tsx +550 -0
- package/registry/components/primitives/popover/popover-context.ts +28 -0
- package/registry/components/primitives/popover/popover.module.css +28 -0
- package/registry/components/primitives/popover/popover.tsx +465 -0
- package/registry/components/ui/accordion/accordion.module.css +208 -0
- package/registry/components/ui/accordion/accordion.tsx +327 -0
- package/registry/components/ui/avatar/avatar.module.css +32 -0
- package/registry/components/ui/avatar/avatar.tsx +37 -0
- package/registry/components/ui/badge/badge.module.css +103 -0
- package/registry/components/ui/badge/badge.tsx +29 -0
- package/registry/components/ui/button/button.module.css +216 -0
- package/registry/components/ui/button/button.tsx +133 -0
- package/registry/components/ui/chart/chart.module.css +168 -0
- package/registry/components/ui/chart/chart.tsx +1293 -0
- package/registry/components/ui/chart/types.ts +210 -0
- package/registry/components/ui/chart/utils.ts +59 -0
- package/registry/components/ui/copy-button/copy-button.module.css +21 -0
- package/registry/components/ui/copy-button/copy-button.tsx +123 -0
- package/registry/components/ui/countdown/countdown.module.css +5 -0
- package/registry/components/ui/countdown/countdown.tsx +152 -0
- package/registry/components/ui/data-table/checkbox-column.tsx +59 -0
- package/registry/components/ui/data-table/data-table.module.css +594 -0
- package/registry/components/ui/data-table/data-table.tsx +1109 -0
- package/registry/components/ui/data-table/filter-bar.tsx +33 -0
- package/registry/components/ui/data-table/pagination-bar.tsx +125 -0
- package/registry/components/ui/data-table/types.ts +594 -0
- package/registry/components/ui/data-table/useDataTable.tsx +573 -0
- package/registry/components/ui/data-table/utils.ts +445 -0
- package/registry/components/ui/empty-state/empty-state.module.css +26 -0
- package/registry/components/ui/empty-state/empty-state.tsx +32 -0
- package/registry/components/ui/input-fields/color-picker/color-palette.module.css +102 -0
- package/registry/components/ui/input-fields/color-picker/color-palette.tsx +92 -0
- package/registry/components/ui/input-fields/color-picker/color-picker.module.css +29 -0
- package/registry/components/ui/input-fields/color-picker/color-picker.tsx +168 -0
- package/registry/components/ui/input-fields/common/field-message/field-message.module.css +28 -0
- package/registry/components/ui/input-fields/common/field-message/field-message.tsx +39 -0
- package/registry/components/ui/input-fields/common/input-field-common.module.css +318 -0
- package/registry/components/ui/input-fields/common/input-field-native.module.css +267 -0
- package/registry/components/ui/input-fields/common/picker-popover-common.module.css +40 -0
- package/registry/components/ui/input-fields/common/select-button/select-button.module.css +9 -0
- package/registry/components/ui/input-fields/common/select-button/select-button.tsx +171 -0
- package/registry/components/ui/input-fields/common/types.ts +38 -0
- package/registry/components/ui/input-fields/custom-select/custom-select.module.css +56 -0
- package/registry/components/ui/input-fields/custom-select/custom-select.tsx +403 -0
- package/registry/components/ui/input-fields/date-picker/calendar.module.css +311 -0
- package/registry/components/ui/input-fields/date-picker/calendar.tsx +186 -0
- package/registry/components/ui/input-fields/date-picker/date-picker.module.css +57 -0
- package/registry/components/ui/input-fields/date-picker/date-picker.tsx +945 -0
- package/registry/components/ui/input-fields/date-picker/types.ts +102 -0
- package/registry/components/ui/input-fields/date-picker/utils.ts +236 -0
- package/registry/components/ui/input-fields/emoji-picker/emoji-palette.module.css +90 -0
- package/registry/components/ui/input-fields/emoji-picker/emoji-palette.tsx +168 -0
- package/registry/components/ui/input-fields/emoji-picker/emoji-picker.module.css +8 -0
- package/registry/components/ui/input-fields/emoji-picker/emoji-picker.tsx +102 -0
- package/registry/components/ui/input-fields/emoji-picker/utils.ts +505 -0
- package/registry/components/ui/input-fields/field-group/field-group.module.css +86 -0
- package/registry/components/ui/input-fields/field-group/field-group.tsx +86 -0
- package/registry/components/ui/input-fields/input/input.tsx +319 -0
- package/registry/components/ui/input-fields/media-input/kind-icons.tsx +62 -0
- package/registry/components/ui/input-fields/media-input/media-input.module.css +294 -0
- package/registry/components/ui/input-fields/media-input/media-input.tsx +327 -0
- package/registry/components/ui/input-fields/media-input/media-preview.tsx +101 -0
- package/registry/components/ui/input-fields/media-input/types.ts +129 -0
- package/registry/components/ui/input-fields/media-input/useMediaUpload.tsx +302 -0
- package/registry/components/ui/input-fields/media-input/utils.ts +325 -0
- package/registry/components/ui/input-fields/otp-input/otp-input.module.css +24 -0
- package/registry/components/ui/input-fields/otp-input/otp-input.tsx +291 -0
- package/registry/components/ui/input-fields/select/select.tsx +118 -0
- package/registry/components/ui/input-fields/switch/switch.module.css +70 -0
- package/registry/components/ui/input-fields/switch/switch.tsx +59 -0
- package/registry/components/ui/input-fields/textarea/textarea.tsx +133 -0
- package/registry/components/ui/input-fields/time-picker/time-picker.module.css +57 -0
- package/registry/components/ui/input-fields/time-picker/time-picker.tsx +437 -0
- package/registry/components/ui/loader/loader.module.css +156 -0
- package/registry/components/ui/loader/loader.tsx +102 -0
- package/registry/components/ui/stepper/stepper.module.css +294 -0
- package/registry/components/ui/stepper/stepper.tsx +197 -0
- package/registry/components/ui/tabs/tabs.module.css +150 -0
- package/registry/components/ui/tabs/tabs.tsx +134 -0
- package/registry/components/ui/toast/toast.module.css +159 -0
- package/registry/components/ui/toast/toast.tsx +104 -0
- package/registry/components/ui/tooltip/tooltip.module.css +82 -0
- package/registry/components/ui/tooltip/tooltip.tsx +72 -0
- package/registry/global.d.ts +4 -0
- package/registry/hooks/useFocusOutside.tsx +33 -0
- package/registry/hooks/useResizeObserver.tsx +32 -0
- package/registry/lib/dom.ts +25 -0
- package/registry/lib/string.ts +23 -0
- package/registry/registry.json +719 -0
- package/registry/styles/app.css +240 -0
- package/registry/styles/components.css +78 -0
- package/registry/styles/fonts/geist-regular.woff2 +0 -0
- package/registry/styles/globals.css +7 -0
- package/registry/styles/media.css +25 -0
- package/registry/styles/utilities.css +90 -0
- package/registry/themes/colors/blue.css +37 -0
- package/registry/themes/colors/green.css +37 -0
- package/registry/themes/colors/rose.css +37 -0
- package/registry/themes/colors/slate.css +37 -0
- package/registry/themes/colors/stone.css +37 -0
- package/registry/themes/colors/violet.css +37 -0
- package/registry/themes/colors/zinc.css +37 -0
- package/registry/themes/radius/pill.css +8 -0
- package/registry/themes/radius/rounded.css +8 -0
- package/registry/themes/radius/sharp.css +8 -0
- package/registry/themes/spacing/compact.css +17 -0
- package/registry/themes/spacing/spacious.css +17 -0
- package/registry/tsconfig.json +25 -0
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Curated emoji dataset for EmojiPalette.
|
|
3
|
+
* ~300 popular emojis grouped by category, each with a searchable name.
|
|
4
|
+
* Tiny enough to bundle inline (~10KB) while covering 90%+ of common use cases.
|
|
5
|
+
* Extend or replace by passing your own `categories` to <EmojiPalette />.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export type EmojiEntry = { char: string; name: string };
|
|
9
|
+
|
|
10
|
+
export type EmojiCategory = {
|
|
11
|
+
id: string;
|
|
12
|
+
label: string;
|
|
13
|
+
emojis: readonly EmojiEntry[];
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const e = (char: string, name: string): EmojiEntry => ({ char, name });
|
|
17
|
+
|
|
18
|
+
export const DEFAULT_EMOJI_CATEGORIES: readonly EmojiCategory[] = [
|
|
19
|
+
{
|
|
20
|
+
id: "smileys",
|
|
21
|
+
label: "Smileys & people",
|
|
22
|
+
emojis: [
|
|
23
|
+
e("😀", "grinning face"),
|
|
24
|
+
e("😃", "smiling face big eyes"),
|
|
25
|
+
e("😄", "smiling face smiling eyes"),
|
|
26
|
+
e("😁", "beaming face smiling eyes"),
|
|
27
|
+
e("😆", "grinning squinting face"),
|
|
28
|
+
e("😅", "grinning face sweat"),
|
|
29
|
+
e("🤣", "rolling on the floor laughing"),
|
|
30
|
+
e("😂", "face tears of joy"),
|
|
31
|
+
e("🙂", "slightly smiling face"),
|
|
32
|
+
e("🙃", "upside-down face"),
|
|
33
|
+
e("😉", "winking face"),
|
|
34
|
+
e("😊", "smiling face smiling eyes"),
|
|
35
|
+
e("😇", "smiling face halo"),
|
|
36
|
+
e("🥰", "smiling face hearts"),
|
|
37
|
+
e("😍", "smiling face heart-eyes"),
|
|
38
|
+
e("🤩", "star-struck"),
|
|
39
|
+
e("😘", "face blowing kiss"),
|
|
40
|
+
e("😗", "kissing face"),
|
|
41
|
+
e("😚", "kissing face closed eyes"),
|
|
42
|
+
e("😙", "kissing face smiling eyes"),
|
|
43
|
+
e("🥲", "smiling face tear"),
|
|
44
|
+
e("😋", "face savoring food"),
|
|
45
|
+
e("😛", "face tongue"),
|
|
46
|
+
e("😜", "winking face tongue"),
|
|
47
|
+
e("🤪", "zany face"),
|
|
48
|
+
e("😝", "squinting face tongue"),
|
|
49
|
+
e("🤑", "money-mouth face"),
|
|
50
|
+
e("🤗", "smiling face open hands hug"),
|
|
51
|
+
e("🤭", "face hand over mouth"),
|
|
52
|
+
e("🤫", "shushing face"),
|
|
53
|
+
e("🤔", "thinking face"),
|
|
54
|
+
e("🤐", "zipper-mouth face"),
|
|
55
|
+
e("🤨", "face raised eyebrow"),
|
|
56
|
+
e("😐", "neutral face"),
|
|
57
|
+
e("😑", "expressionless face"),
|
|
58
|
+
e("😶", "face without mouth"),
|
|
59
|
+
e("😏", "smirking face"),
|
|
60
|
+
e("😒", "unamused face"),
|
|
61
|
+
e("🙄", "face with rolling eyes"),
|
|
62
|
+
e("😬", "grimacing face"),
|
|
63
|
+
e("🤥", "lying face"),
|
|
64
|
+
e("😌", "relieved face"),
|
|
65
|
+
e("😔", "pensive face"),
|
|
66
|
+
e("😪", "sleepy face"),
|
|
67
|
+
e("🤤", "drooling face"),
|
|
68
|
+
e("😴", "sleeping face"),
|
|
69
|
+
e("😷", "face medical mask"),
|
|
70
|
+
e("🤒", "face thermometer"),
|
|
71
|
+
e("🤕", "face head bandage"),
|
|
72
|
+
e("🤢", "nauseated face"),
|
|
73
|
+
e("🤮", "face vomiting"),
|
|
74
|
+
e("🥵", "hot face"),
|
|
75
|
+
e("🥶", "cold face"),
|
|
76
|
+
e("😵", "face crossed-out eyes"),
|
|
77
|
+
e("🤯", "exploding head mind blown"),
|
|
78
|
+
e("🥳", "partying face celebration"),
|
|
79
|
+
e("😎", "smiling face sunglasses cool"),
|
|
80
|
+
e("🤓", "nerd face"),
|
|
81
|
+
e("🧐", "face monocle"),
|
|
82
|
+
e("😢", "crying face sad"),
|
|
83
|
+
e("😭", "loudly crying face"),
|
|
84
|
+
e("😤", "face steam from nose"),
|
|
85
|
+
e("😡", "pouting face angry"),
|
|
86
|
+
e("😠", "angry face"),
|
|
87
|
+
e("🤬", "face cursing"),
|
|
88
|
+
e("👍", "thumbs up like"),
|
|
89
|
+
e("👎", "thumbs down dislike"),
|
|
90
|
+
e("👏", "clapping hands"),
|
|
91
|
+
e("🙌", "raising hands celebration"),
|
|
92
|
+
e("🙏", "folded hands please thanks"),
|
|
93
|
+
e("👋", "waving hand hi hello"),
|
|
94
|
+
e("🤝", "handshake deal"),
|
|
95
|
+
e("✌️", "victory hand peace"),
|
|
96
|
+
e("🤞", "crossed fingers luck"),
|
|
97
|
+
e("🤟", "love-you gesture"),
|
|
98
|
+
e("🤘", "rock on horns"),
|
|
99
|
+
e("👌", "ok hand"),
|
|
100
|
+
e("🤙", "call me hand"),
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: "animals",
|
|
105
|
+
label: "Animals & nature",
|
|
106
|
+
emojis: [
|
|
107
|
+
e("🐶", "dog face"),
|
|
108
|
+
e("🐱", "cat face"),
|
|
109
|
+
e("🐭", "mouse face"),
|
|
110
|
+
e("🐹", "hamster"),
|
|
111
|
+
e("🐰", "rabbit face"),
|
|
112
|
+
e("🦊", "fox"),
|
|
113
|
+
e("🐻", "bear"),
|
|
114
|
+
e("🐼", "panda"),
|
|
115
|
+
e("🐨", "koala"),
|
|
116
|
+
e("🐯", "tiger face"),
|
|
117
|
+
e("🦁", "lion"),
|
|
118
|
+
e("🐮", "cow face"),
|
|
119
|
+
e("🐷", "pig face"),
|
|
120
|
+
e("🐸", "frog"),
|
|
121
|
+
e("🐵", "monkey face"),
|
|
122
|
+
e("🐔", "chicken"),
|
|
123
|
+
e("🐧", "penguin"),
|
|
124
|
+
e("🐦", "bird"),
|
|
125
|
+
e("🐤", "baby chick"),
|
|
126
|
+
e("🦆", "duck"),
|
|
127
|
+
e("🦅", "eagle"),
|
|
128
|
+
e("🦉", "owl"),
|
|
129
|
+
e("🐺", "wolf"),
|
|
130
|
+
e("🐗", "boar"),
|
|
131
|
+
e("🐴", "horse face"),
|
|
132
|
+
e("🦄", "unicorn"),
|
|
133
|
+
e("🐝", "honeybee"),
|
|
134
|
+
e("🐛", "bug caterpillar"),
|
|
135
|
+
e("🦋", "butterfly"),
|
|
136
|
+
e("🐌", "snail"),
|
|
137
|
+
e("🐞", "ladybug"),
|
|
138
|
+
e("🐜", "ant"),
|
|
139
|
+
e("🦂", "scorpion"),
|
|
140
|
+
e("🐢", "turtle"),
|
|
141
|
+
e("🐍", "snake"),
|
|
142
|
+
e("🦎", "lizard"),
|
|
143
|
+
e("🦖", "t-rex dinosaur"),
|
|
144
|
+
e("🦕", "sauropod dinosaur"),
|
|
145
|
+
e("🐙", "octopus"),
|
|
146
|
+
e("🦑", "squid"),
|
|
147
|
+
e("🦐", "shrimp"),
|
|
148
|
+
e("🦞", "lobster"),
|
|
149
|
+
e("🦀", "crab"),
|
|
150
|
+
e("🐡", "blowfish"),
|
|
151
|
+
e("🐠", "tropical fish"),
|
|
152
|
+
e("🐟", "fish"),
|
|
153
|
+
e("🐬", "dolphin"),
|
|
154
|
+
e("🐳", "spouting whale"),
|
|
155
|
+
e("🐋", "whale"),
|
|
156
|
+
e("🦈", "shark"),
|
|
157
|
+
e("🌵", "cactus"),
|
|
158
|
+
e("🌲", "evergreen tree"),
|
|
159
|
+
e("🌳", "deciduous tree"),
|
|
160
|
+
e("🌴", "palm tree"),
|
|
161
|
+
e("🌱", "seedling"),
|
|
162
|
+
e("🌿", "herb"),
|
|
163
|
+
e("☘️", "shamrock"),
|
|
164
|
+
e("🍀", "four leaf clover"),
|
|
165
|
+
e("🍁", "maple leaf"),
|
|
166
|
+
e("🌷", "tulip"),
|
|
167
|
+
e("🌹", "rose"),
|
|
168
|
+
e("🌺", "hibiscus"),
|
|
169
|
+
e("🌻", "sunflower"),
|
|
170
|
+
e("🌼", "blossom"),
|
|
171
|
+
e("🌸", "cherry blossom"),
|
|
172
|
+
],
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
id: "food",
|
|
176
|
+
label: "Food & drink",
|
|
177
|
+
emojis: [
|
|
178
|
+
e("🍎", "red apple"),
|
|
179
|
+
e("🍏", "green apple"),
|
|
180
|
+
e("🍐", "pear"),
|
|
181
|
+
e("🍊", "tangerine orange"),
|
|
182
|
+
e("🍋", "lemon"),
|
|
183
|
+
e("🍌", "banana"),
|
|
184
|
+
e("🍉", "watermelon"),
|
|
185
|
+
e("🍇", "grapes"),
|
|
186
|
+
e("🍓", "strawberry"),
|
|
187
|
+
e("🫐", "blueberries"),
|
|
188
|
+
e("🍒", "cherries"),
|
|
189
|
+
e("🍑", "peach"),
|
|
190
|
+
e("🥭", "mango"),
|
|
191
|
+
e("🍍", "pineapple"),
|
|
192
|
+
e("🥥", "coconut"),
|
|
193
|
+
e("🥝", "kiwi"),
|
|
194
|
+
e("🍅", "tomato"),
|
|
195
|
+
e("🍆", "eggplant"),
|
|
196
|
+
e("🥑", "avocado"),
|
|
197
|
+
e("🥦", "broccoli"),
|
|
198
|
+
e("🥬", "leafy greens"),
|
|
199
|
+
e("🥒", "cucumber"),
|
|
200
|
+
e("🌶️", "hot pepper"),
|
|
201
|
+
e("🌽", "corn"),
|
|
202
|
+
e("🥕", "carrot"),
|
|
203
|
+
e("🥔", "potato"),
|
|
204
|
+
e("🍞", "bread"),
|
|
205
|
+
e("🥐", "croissant"),
|
|
206
|
+
e("🥖", "baguette"),
|
|
207
|
+
e("🥨", "pretzel"),
|
|
208
|
+
e("🥯", "bagel"),
|
|
209
|
+
e("🧀", "cheese wedge"),
|
|
210
|
+
e("🍳", "cooking egg"),
|
|
211
|
+
e("🥞", "pancakes"),
|
|
212
|
+
e("🧇", "waffle"),
|
|
213
|
+
e("🥓", "bacon"),
|
|
214
|
+
e("🍔", "hamburger"),
|
|
215
|
+
e("🍟", "french fries"),
|
|
216
|
+
e("🍕", "pizza"),
|
|
217
|
+
e("🌭", "hot dog"),
|
|
218
|
+
e("🌮", "taco"),
|
|
219
|
+
e("🌯", "burrito"),
|
|
220
|
+
e("🥗", "green salad"),
|
|
221
|
+
e("🍝", "spaghetti"),
|
|
222
|
+
e("🍣", "sushi"),
|
|
223
|
+
e("🍱", "bento"),
|
|
224
|
+
e("🍜", "ramen"),
|
|
225
|
+
e("🍙", "rice ball"),
|
|
226
|
+
e("🍚", "rice bowl"),
|
|
227
|
+
e("🍛", "curry"),
|
|
228
|
+
e("🍤", "shrimp tempura"),
|
|
229
|
+
e("🥟", "dumpling"),
|
|
230
|
+
e("🍦", "soft ice cream"),
|
|
231
|
+
e("🍰", "shortcake"),
|
|
232
|
+
e("🎂", "birthday cake"),
|
|
233
|
+
e("🍪", "cookie"),
|
|
234
|
+
e("🍩", "doughnut"),
|
|
235
|
+
e("🍫", "chocolate bar"),
|
|
236
|
+
e("🍬", "candy"),
|
|
237
|
+
e("☕", "coffee hot drink"),
|
|
238
|
+
e("🍵", "tea"),
|
|
239
|
+
e("🍺", "beer mug"),
|
|
240
|
+
e("🍷", "wine glass"),
|
|
241
|
+
e("🍸", "cocktail"),
|
|
242
|
+
e("🥂", "clinking glasses cheers"),
|
|
243
|
+
e("🍾", "bottle popping champagne"),
|
|
244
|
+
],
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
id: "activities",
|
|
248
|
+
label: "Activities & objects",
|
|
249
|
+
emojis: [
|
|
250
|
+
e("⚽", "soccer ball"),
|
|
251
|
+
e("🏀", "basketball"),
|
|
252
|
+
e("🏈", "american football"),
|
|
253
|
+
e("⚾", "baseball"),
|
|
254
|
+
e("🎾", "tennis"),
|
|
255
|
+
e("🏐", "volleyball"),
|
|
256
|
+
e("🏉", "rugby"),
|
|
257
|
+
e("🎱", "billiards pool"),
|
|
258
|
+
e("🏓", "ping pong"),
|
|
259
|
+
e("🏸", "badminton"),
|
|
260
|
+
e("🥊", "boxing glove"),
|
|
261
|
+
e("🥋", "martial arts uniform"),
|
|
262
|
+
e("⛳", "flag in hole golf"),
|
|
263
|
+
e("🎯", "bullseye dart"),
|
|
264
|
+
e("🎮", "video game controller"),
|
|
265
|
+
e("🎲", "game die dice"),
|
|
266
|
+
e("🧩", "puzzle piece"),
|
|
267
|
+
e("🎨", "artist palette"),
|
|
268
|
+
e("🎭", "performing arts"),
|
|
269
|
+
e("🎪", "circus tent"),
|
|
270
|
+
e("🎬", "clapper board film"),
|
|
271
|
+
e("🎤", "microphone"),
|
|
272
|
+
e("🎧", "headphone"),
|
|
273
|
+
e("🎼", "musical score"),
|
|
274
|
+
e("🎹", "musical keyboard piano"),
|
|
275
|
+
e("🥁", "drum"),
|
|
276
|
+
e("🎷", "saxophone"),
|
|
277
|
+
e("🎺", "trumpet"),
|
|
278
|
+
e("🎸", "guitar"),
|
|
279
|
+
e("🎻", "violin"),
|
|
280
|
+
e("🎯", "dart bullseye"),
|
|
281
|
+
e("🎁", "gift wrapped present"),
|
|
282
|
+
e("🎉", "party popper celebration"),
|
|
283
|
+
e("🎊", "confetti ball"),
|
|
284
|
+
e("🎈", "balloon"),
|
|
285
|
+
e("🎂", "birthday cake"),
|
|
286
|
+
e("📱", "mobile phone"),
|
|
287
|
+
e("💻", "laptop"),
|
|
288
|
+
e("⌨️", "keyboard"),
|
|
289
|
+
e("🖥️", "desktop computer"),
|
|
290
|
+
e("🖱️", "computer mouse"),
|
|
291
|
+
e("🖨️", "printer"),
|
|
292
|
+
e("📷", "camera"),
|
|
293
|
+
e("🎥", "movie camera"),
|
|
294
|
+
e("📺", "television"),
|
|
295
|
+
e("⏰", "alarm clock"),
|
|
296
|
+
e("⏳", "hourglass"),
|
|
297
|
+
e("📅", "calendar"),
|
|
298
|
+
e("📌", "pushpin"),
|
|
299
|
+
e("📎", "paperclip"),
|
|
300
|
+
e("✂️", "scissors"),
|
|
301
|
+
e("🔑", "key"),
|
|
302
|
+
e("🔒", "locked"),
|
|
303
|
+
e("🔓", "unlocked"),
|
|
304
|
+
e("🔍", "magnifying glass search"),
|
|
305
|
+
e("💡", "light bulb idea"),
|
|
306
|
+
e("📚", "books"),
|
|
307
|
+
e("✏️", "pencil"),
|
|
308
|
+
e("🖊️", "pen"),
|
|
309
|
+
e("📝", "memo writing"),
|
|
310
|
+
],
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
id: "travel",
|
|
314
|
+
label: "Travel & places",
|
|
315
|
+
emojis: [
|
|
316
|
+
e("🚗", "car"),
|
|
317
|
+
e("🚕", "taxi"),
|
|
318
|
+
e("🚙", "suv"),
|
|
319
|
+
e("🚌", "bus"),
|
|
320
|
+
e("🚎", "trolleybus"),
|
|
321
|
+
e("🏎️", "racing car"),
|
|
322
|
+
e("🚓", "police car"),
|
|
323
|
+
e("🚑", "ambulance"),
|
|
324
|
+
e("🚒", "fire engine"),
|
|
325
|
+
e("🚐", "minibus"),
|
|
326
|
+
e("🚛", "articulated lorry truck"),
|
|
327
|
+
e("🚜", "tractor"),
|
|
328
|
+
e("🏍️", "motorcycle"),
|
|
329
|
+
e("🛵", "scooter"),
|
|
330
|
+
e("🚲", "bicycle"),
|
|
331
|
+
e("🛴", "kick scooter"),
|
|
332
|
+
e("🛹", "skateboard"),
|
|
333
|
+
e("🚏", "bus stop"),
|
|
334
|
+
e("⛽", "fuel pump gas"),
|
|
335
|
+
e("🚦", "vertical traffic light"),
|
|
336
|
+
e("🚧", "construction"),
|
|
337
|
+
e("⚓", "anchor"),
|
|
338
|
+
e("⛵", "sailboat"),
|
|
339
|
+
e("🚤", "speedboat"),
|
|
340
|
+
e("🛳️", "passenger ship"),
|
|
341
|
+
e("🚢", "ship"),
|
|
342
|
+
e("✈️", "airplane"),
|
|
343
|
+
e("🛩️", "small airplane"),
|
|
344
|
+
e("🚁", "helicopter"),
|
|
345
|
+
e("🚂", "locomotive"),
|
|
346
|
+
e("🚆", "train"),
|
|
347
|
+
e("🚇", "metro subway"),
|
|
348
|
+
e("🚉", "station"),
|
|
349
|
+
e("🚀", "rocket"),
|
|
350
|
+
e("🛸", "flying saucer ufo"),
|
|
351
|
+
e("🗺️", "world map"),
|
|
352
|
+
e("🗿", "moai"),
|
|
353
|
+
e("🗽", "statue of liberty"),
|
|
354
|
+
e("🗼", "tokyo tower"),
|
|
355
|
+
e("🏰", "castle"),
|
|
356
|
+
e("🏯", "japanese castle"),
|
|
357
|
+
e("🏟️", "stadium"),
|
|
358
|
+
e("🎡", "ferris wheel"),
|
|
359
|
+
e("🎢", "roller coaster"),
|
|
360
|
+
e("🎠", "carousel horse"),
|
|
361
|
+
e("⛲", "fountain"),
|
|
362
|
+
e("⛱️", "umbrella on ground"),
|
|
363
|
+
e("🏖️", "beach with umbrella"),
|
|
364
|
+
e("🏝️", "desert island"),
|
|
365
|
+
e("🏔️", "snow-capped mountain"),
|
|
366
|
+
e("⛰️", "mountain"),
|
|
367
|
+
e("🌋", "volcano"),
|
|
368
|
+
e("🏕️", "camping"),
|
|
369
|
+
e("🏠", "house"),
|
|
370
|
+
e("🏡", "house with garden"),
|
|
371
|
+
e("🏢", "office building"),
|
|
372
|
+
e("🏥", "hospital"),
|
|
373
|
+
e("🏦", "bank"),
|
|
374
|
+
e("🏨", "hotel"),
|
|
375
|
+
e("🏪", "convenience store"),
|
|
376
|
+
e("🏫", "school"),
|
|
377
|
+
e("⛪", "church"),
|
|
378
|
+
e("🕌", "mosque"),
|
|
379
|
+
e("🕍", "synagogue"),
|
|
380
|
+
e("🛕", "hindu temple"),
|
|
381
|
+
],
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
id: "symbols",
|
|
385
|
+
label: "Symbols",
|
|
386
|
+
emojis: [
|
|
387
|
+
e("❤️", "red heart love"),
|
|
388
|
+
e("🧡", "orange heart"),
|
|
389
|
+
e("💛", "yellow heart"),
|
|
390
|
+
e("💚", "green heart"),
|
|
391
|
+
e("💙", "blue heart"),
|
|
392
|
+
e("💜", "purple heart"),
|
|
393
|
+
e("🖤", "black heart"),
|
|
394
|
+
e("🤍", "white heart"),
|
|
395
|
+
e("🤎", "brown heart"),
|
|
396
|
+
e("💔", "broken heart"),
|
|
397
|
+
e("❣️", "heart exclamation"),
|
|
398
|
+
e("💕", "two hearts"),
|
|
399
|
+
e("💞", "revolving hearts"),
|
|
400
|
+
e("💓", "beating heart"),
|
|
401
|
+
e("💗", "growing heart"),
|
|
402
|
+
e("💖", "sparkling heart"),
|
|
403
|
+
e("💘", "heart with arrow"),
|
|
404
|
+
e("💝", "heart with ribbon"),
|
|
405
|
+
e("💟", "heart decoration"),
|
|
406
|
+
e("☮️", "peace symbol"),
|
|
407
|
+
e("✝️", "latin cross"),
|
|
408
|
+
e("☪️", "star and crescent"),
|
|
409
|
+
e("🕉️", "om"),
|
|
410
|
+
e("☸️", "wheel of dharma"),
|
|
411
|
+
e("✡️", "star of david"),
|
|
412
|
+
e("☯️", "yin yang"),
|
|
413
|
+
e("✨", "sparkles"),
|
|
414
|
+
e("⭐", "star"),
|
|
415
|
+
e("🌟", "glowing star"),
|
|
416
|
+
e("💫", "dizzy star"),
|
|
417
|
+
e("🔥", "fire"),
|
|
418
|
+
e("💥", "collision boom"),
|
|
419
|
+
e("💢", "anger symbol"),
|
|
420
|
+
e("💦", "sweat droplets"),
|
|
421
|
+
e("💨", "dashing away"),
|
|
422
|
+
e("💤", "zzz sleep"),
|
|
423
|
+
e("✅", "check mark green"),
|
|
424
|
+
e("❌", "cross mark"),
|
|
425
|
+
e("❎", "cross mark button"),
|
|
426
|
+
e("⭕", "hollow red circle"),
|
|
427
|
+
e("‼️", "double exclamation"),
|
|
428
|
+
e("⁉️", "exclamation question mark"),
|
|
429
|
+
e("❓", "question mark"),
|
|
430
|
+
e("❗", "exclamation mark"),
|
|
431
|
+
e("💯", "hundred points"),
|
|
432
|
+
e("🔴", "red circle"),
|
|
433
|
+
e("🟠", "orange circle"),
|
|
434
|
+
e("🟡", "yellow circle"),
|
|
435
|
+
e("🟢", "green circle"),
|
|
436
|
+
e("🔵", "blue circle"),
|
|
437
|
+
e("🟣", "purple circle"),
|
|
438
|
+
e("🟤", "brown circle"),
|
|
439
|
+
e("⚫", "black circle"),
|
|
440
|
+
e("⚪", "white circle"),
|
|
441
|
+
e("♻️", "recycling symbol"),
|
|
442
|
+
e("🔔", "bell"),
|
|
443
|
+
e("🔕", "bell with slash"),
|
|
444
|
+
e("📣", "megaphone announce"),
|
|
445
|
+
e("📢", "loudspeaker"),
|
|
446
|
+
],
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
id: "flags",
|
|
450
|
+
label: "Flags",
|
|
451
|
+
emojis: [
|
|
452
|
+
e("🏁", "chequered flag"),
|
|
453
|
+
e("🚩", "triangular flag"),
|
|
454
|
+
e("🎌", "crossed flags"),
|
|
455
|
+
e("🏴", "black flag"),
|
|
456
|
+
e("🏳️", "white flag"),
|
|
457
|
+
e("🏳️🌈", "rainbow flag"),
|
|
458
|
+
e("🏴☠️", "pirate flag"),
|
|
459
|
+
e("🇺🇸", "united states flag"),
|
|
460
|
+
e("🇬🇧", "united kingdom flag uk"),
|
|
461
|
+
e("🇨🇦", "canada flag"),
|
|
462
|
+
e("🇦🇺", "australia flag"),
|
|
463
|
+
e("🇩🇪", "germany flag"),
|
|
464
|
+
e("🇫🇷", "france flag"),
|
|
465
|
+
e("🇪🇸", "spain flag"),
|
|
466
|
+
e("🇮🇹", "italy flag"),
|
|
467
|
+
e("🇯🇵", "japan flag"),
|
|
468
|
+
e("🇰🇷", "south korea flag"),
|
|
469
|
+
e("🇨🇳", "china flag"),
|
|
470
|
+
e("🇮🇳", "india flag"),
|
|
471
|
+
e("🇧🇷", "brazil flag"),
|
|
472
|
+
e("🇲🇽", "mexico flag"),
|
|
473
|
+
e("🇷🇺", "russia flag"),
|
|
474
|
+
e("🇿🇦", "south africa flag"),
|
|
475
|
+
e("🇳🇱", "netherlands flag"),
|
|
476
|
+
e("🇸🇪", "sweden flag"),
|
|
477
|
+
e("🇳🇴", "norway flag"),
|
|
478
|
+
e("🇫🇮", "finland flag"),
|
|
479
|
+
e("🇩🇰", "denmark flag"),
|
|
480
|
+
e("🇨🇭", "switzerland flag"),
|
|
481
|
+
e("🇦🇹", "austria flag"),
|
|
482
|
+
],
|
|
483
|
+
},
|
|
484
|
+
];
|
|
485
|
+
|
|
486
|
+
/** Filter the dataset by name match (case-insensitive substring). */
|
|
487
|
+
export const searchEmojis = (
|
|
488
|
+
query: string,
|
|
489
|
+
categories: readonly EmojiCategory[],
|
|
490
|
+
): EmojiEntry[] => {
|
|
491
|
+
const q = query.trim().toLowerCase();
|
|
492
|
+
if (!q) return [];
|
|
493
|
+
const seen = new Set<string>();
|
|
494
|
+
const out: EmojiEntry[] = [];
|
|
495
|
+
for (const cat of categories) {
|
|
496
|
+
for (const item of cat.emojis) {
|
|
497
|
+
if (seen.has(item.char)) continue;
|
|
498
|
+
if (item.name.includes(q)) {
|
|
499
|
+
seen.add(item.char);
|
|
500
|
+
out.push(item);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
return out;
|
|
505
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/* Field group - accessibility-first wrapper for grouping form controls.
|
|
2
|
+
Removes default fieldset chrome and arranges children in a flex
|
|
3
|
+
row/column with sensible gap. Outer shell + legend typography come
|
|
4
|
+
from the common module (sCommon.container, sCommon.label). */
|
|
5
|
+
|
|
6
|
+
.root {
|
|
7
|
+
border: 0;
|
|
8
|
+
padding: 0;
|
|
9
|
+
margin: 0;
|
|
10
|
+
min-inline-size: 0;
|
|
11
|
+
/* Inherits the standard .container gap (--spacing-2). The legend's own
|
|
12
|
+
border + margin handle the heading separation. */
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.legend {
|
|
16
|
+
/* Reset fieldset's odd legend defaults (padding-inline, float-like flow)
|
|
17
|
+
and pin typography explicitly - some UA stylesheets size <legend>
|
|
18
|
+
differently from the inherited form font, which would defeat the
|
|
19
|
+
sCommon.label class otherwise. */
|
|
20
|
+
float: none;
|
|
21
|
+
display: block;
|
|
22
|
+
width: 100%;
|
|
23
|
+
font-family: var(--font-family-1);
|
|
24
|
+
font-size: var(--font-size-sm);
|
|
25
|
+
font-weight: inherit;
|
|
26
|
+
color: var(--color-secondary-foreground);
|
|
27
|
+
line-height: 1.4;
|
|
28
|
+
/* background-color: var(--color-muted); */
|
|
29
|
+
|
|
30
|
+
/* Subtle separator between the heading and the grouped fields -
|
|
31
|
+
visual hierarchy without breaking the family's gap rhythm. */
|
|
32
|
+
margin-bottom: var(--spacing-6);
|
|
33
|
+
padding-bottom: var(--spacing-2);
|
|
34
|
+
border-bottom: 1px solid var(--color-border);
|
|
35
|
+
/* border-radius: var(--radius-md); */
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.group {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-wrap: wrap;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.group_vertical {
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
gap: var(--spacing-6);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.group_horizontal {
|
|
49
|
+
flex-direction: row;
|
|
50
|
+
align-items: center;
|
|
51
|
+
gap: var(--spacing-8);
|
|
52
|
+
|
|
53
|
+
/* Compact-control siblings (Switch / Input radio / Input checkbox) size
|
|
54
|
+
to their content in horizontal mode so flex doesn't distribute them
|
|
55
|
+
into equal columns. Vertical mode lets children keep their natural
|
|
56
|
+
width - text Input/Select stay full-width. */
|
|
57
|
+
> * {
|
|
58
|
+
width: fit-content;
|
|
59
|
+
min-width: 0;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* Grid layout - column count comes from the inline `--fg-cols` custom
|
|
64
|
+
property set by the FieldGroup component. minmax(0, 1fr) prevents
|
|
65
|
+
long values from overflowing equal-width tracks. */
|
|
66
|
+
.group_grid {
|
|
67
|
+
display: grid;
|
|
68
|
+
grid-template-columns: repeat(var(--fg-cols, 2), minmax(0, 1fr));
|
|
69
|
+
gap: var(--spacing-6);
|
|
70
|
+
|
|
71
|
+
> * {
|
|
72
|
+
min-width: 0;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@media (width <= 768px) {
|
|
77
|
+
.group_grid {
|
|
78
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@media (width <= 480px) {
|
|
83
|
+
.group_grid {
|
|
84
|
+
grid-template-columns: minmax(0, 1fr);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from "react";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import sCommon from "../common/input-field-common.module.css";
|
|
4
|
+
import s from "./field-group.module.css";
|
|
5
|
+
import { FieldMessage } from "../common/field-message/field-message";
|
|
6
|
+
|
|
7
|
+
export type FieldGroupOrientation = "vertical" | "horizontal";
|
|
8
|
+
|
|
9
|
+
export type FieldGroupProps = {
|
|
10
|
+
label?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Accessible role. Defaults to the implicit fieldset role ("group").
|
|
13
|
+
* Set "radiogroup" when wrapping `<input type="radio">` siblings.
|
|
14
|
+
*/
|
|
15
|
+
role?: "group" | "radiogroup";
|
|
16
|
+
orientation?: FieldGroupOrientation;
|
|
17
|
+
/**
|
|
18
|
+
* Render children in a CSS grid with this many equal-width columns.
|
|
19
|
+
* Overrides `orientation` when set. Collapses to 2 columns on tablets
|
|
20
|
+
* and 1 column on narrow phones. Typical values: 2, 3, 4.
|
|
21
|
+
*/
|
|
22
|
+
columns?: number;
|
|
23
|
+
errors?: readonly string[];
|
|
24
|
+
info?: readonly string[];
|
|
25
|
+
/**
|
|
26
|
+
* Native fieldset-level disable. Browsers propagate `:disabled` to every
|
|
27
|
+
* nested form control automatically - no per-child wiring required.
|
|
28
|
+
*/
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
required?: boolean;
|
|
31
|
+
className?: string;
|
|
32
|
+
style?: CSSProperties;
|
|
33
|
+
id?: string;
|
|
34
|
+
children?: ReactNode;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const FieldGroup = ({
|
|
38
|
+
label,
|
|
39
|
+
role,
|
|
40
|
+
orientation = "vertical",
|
|
41
|
+
columns,
|
|
42
|
+
errors,
|
|
43
|
+
info,
|
|
44
|
+
disabled,
|
|
45
|
+
required,
|
|
46
|
+
className,
|
|
47
|
+
style,
|
|
48
|
+
id,
|
|
49
|
+
children,
|
|
50
|
+
}: FieldGroupProps) => {
|
|
51
|
+
const hasErrors = (errors?.length ?? 0) > 0;
|
|
52
|
+
const isGrid = typeof columns === "number" && columns > 1;
|
|
53
|
+
const groupStyle = isGrid
|
|
54
|
+
? ({ ["--fg-cols" as string]: columns } as CSSProperties)
|
|
55
|
+
: undefined;
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<fieldset
|
|
59
|
+
id={id}
|
|
60
|
+
className={clsx(sCommon.container, s.root, className)}
|
|
61
|
+
style={style}
|
|
62
|
+
disabled={disabled}
|
|
63
|
+
role={role}
|
|
64
|
+
aria-required={required || undefined}
|
|
65
|
+
aria-invalid={hasErrors || undefined}
|
|
66
|
+
>
|
|
67
|
+
{label && (
|
|
68
|
+
<legend className={clsx(sCommon.label, s.legend)}>{label}</legend>
|
|
69
|
+
)}
|
|
70
|
+
<div
|
|
71
|
+
className={clsx(
|
|
72
|
+
s.group,
|
|
73
|
+
isGrid
|
|
74
|
+
? s.group_grid
|
|
75
|
+
: orientation === "horizontal"
|
|
76
|
+
? s.group_horizontal
|
|
77
|
+
: s.group_vertical,
|
|
78
|
+
)}
|
|
79
|
+
style={groupStyle}
|
|
80
|
+
>
|
|
81
|
+
{children}
|
|
82
|
+
</div>
|
|
83
|
+
<FieldMessage errors={errors} info={info} />
|
|
84
|
+
</fieldset>
|
|
85
|
+
);
|
|
86
|
+
};
|