more chip input fixes

This commit is contained in:
Amruth Pillai
2026-01-25 19:35:20 +01:00
parent 8e8ef300ec
commit 92044de6b8
54 changed files with 229 additions and 8 deletions
+4
View File
@@ -1728,6 +1728,10 @@ msgstr ""
msgid "Preferences"
msgstr ""
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr ""
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "አቀማመጥ"
msgid "Preferences"
msgstr "ምርጫዎች"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "ዋና ቀለም"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "المنصب"
msgid "Preferences"
msgstr "التفضيلات"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "اللون الأساسي"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Vəzifə"
msgid "Preferences"
msgstr "Parametrlər"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Əsas Rəng"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Позиция"
msgid "Preferences"
msgstr "Предпочитания"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Основен цвят"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "পদবি"
msgid "Preferences"
msgstr "পছন্দসমূহ"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "প্রাথমিক রঙ"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Càrrec"
msgid "Preferences"
msgstr "Preferències"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Color principal"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Pozice"
msgid "Preferences"
msgstr "Předvolby"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Hlavní barva"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Stilling"
msgid "Preferences"
msgstr "Præferencer"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Primær farve"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Position"
msgid "Preferences"
msgstr "Einstellungen"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Primärfarbe"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Θέση"
msgid "Preferences"
msgstr "Προτιμήσεις"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Βασικό χρώμα"
+4
View File
@@ -1728,6 +1728,10 @@ msgstr "Position"
msgid "Preferences"
msgstr "Preferences"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Primary Color"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Puesto"
msgid "Preferences"
msgstr "Preferencias"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Color primario"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "موقعیت شغلی"
msgid "Preferences"
msgstr "ترجیحات"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "رنگ اصلی"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Tehtävänimike"
msgid "Preferences"
msgstr "Asetukset"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Pääväri"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Poste"
msgid "Preferences"
msgstr "Préférences"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Couleur principale"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "תפקיד"
msgid "Preferences"
msgstr "העדפות"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "צבע עיקרי"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "पद"
msgid "Preferences"
msgstr "प्राथमिकताएँ"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "प्राथमिक रंग"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Pozíció"
msgid "Preferences"
msgstr "Beállítások"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Elsődleges szín"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Posisi"
msgid "Preferences"
msgstr "Preferensi"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Warna Utama"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Posizione"
msgid "Preferences"
msgstr "Preferenze"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Colore primario"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "役職"
msgid "Preferences"
msgstr "設定"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "メインカラー"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "តួនាទី"
msgid "Preferences"
msgstr "ចំណង់ចំណូលចិត្ត"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "ពណ៌​មូលដ្ឋាន"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "ಸ್ಥಾನ"
msgid "Preferences"
msgstr "ಆದ್ಯತೆಗಳು"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "ಪ್ರಾಥಮಿಕ ಬಣ್ಣ"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "직책"
msgid "Preferences"
msgstr "환경 설정"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "기본 색상"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Pareigos"
msgid "Preferences"
msgstr "Nustatymai"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Pagrindinė spalva"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Amats"
msgid "Preferences"
msgstr "Preferences"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Primārā krāsa"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "പദവി"
msgid "Preferences"
msgstr "പ്രിഫറൻസുകൾ"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "പ്രൈമറി നിറം"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "पद"
msgid "Preferences"
msgstr "प्राधान्ये"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "प्राथमिक रंग"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Kedudukan"
msgid "Preferences"
msgstr "Keutamaan"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Warna Utama"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "पद"
msgid "Preferences"
msgstr "प्राथमिकता (Preferences)"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "मुख्य रङ"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Positie"
msgid "Preferences"
msgstr "Voorkeuren"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Primaire kleur"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Posisjon"
msgid "Preferences"
msgstr "Preferanser"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Hovedfarge"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "ପଦବୀ"
msgid "Preferences"
msgstr "ପସନ୍ଦ"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "ମୁଖ୍ୟ ରଙ୍ଗ"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Stanowisko"
msgid "Preferences"
msgstr "Preferencje"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Kolor główny"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Posição"
msgid "Preferences"
msgstr "Preferências"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Cor primária"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Cargo"
msgid "Preferences"
msgstr "Preferências"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Cor principal"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Poziție"
msgid "Preferences"
msgstr "Preferințe"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Culoare primară"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Должность"
msgid "Preferences"
msgstr "Настройки"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Основной цвет"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Pozícia"
msgid "Preferences"
msgstr "Predvoľby"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Hlavná farba"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Pozicioni"
msgid "Preferences"
msgstr "Preferenca"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Ngjyra kryesore"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Позиција"
msgid "Preferences"
msgstr "Поставке"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Примарна боја"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "Position"
msgid "Preferences"
msgstr "Inställningar"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "Primärfärg"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "பதவி"
msgid "Preferences"
msgstr "விருப்பங்கள்"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "முதன்மை நிறம்"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr ""
msgid "Preferences"
msgstr ""
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr ""
+4
View File
@@ -1733,6 +1733,10 @@ msgstr ""
msgid "Preferences"
msgstr ""
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr ""
+4
View File
@@ -1733,6 +1733,10 @@ msgstr ""
msgid "Preferences"
msgstr ""
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr ""
+4
View File
@@ -1733,6 +1733,10 @@ msgstr ""
msgid "Preferences"
msgstr ""
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr ""
+4
View File
@@ -1733,6 +1733,10 @@ msgstr ""
msgid "Preferences"
msgstr ""
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr ""
+4
View File
@@ -1733,6 +1733,10 @@ msgstr ""
msgid "Preferences"
msgstr ""
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr ""
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "职位"
msgid "Preferences"
msgstr "偏好设置"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "主颜色"
+4
View File
@@ -1733,6 +1733,10 @@ msgstr "職位"
msgid "Preferences"
msgstr "偏好設定"
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr "主要顏色"
+4
View File
@@ -1728,6 +1728,10 @@ msgstr ""
msgid "Preferences"
msgstr ""
#: src/components/input/chip-input.tsx
msgid "Press <0>{RETURN_KEY}</0> or <1>{COMMA_KEY}</1> to add or save the current keyword."
msgstr ""
#: src/routes/builder/$resumeId/-sidebar/right/sections/design.tsx
msgid "Primary Color"
msgstr ""
+17 -8
View File
@@ -1,3 +1,4 @@
import { Trans } from "@lingui/react/macro";
import { PencilSimpleIcon, XIcon } from "@phosphor-icons/react";
import { motion, Reorder, useDragControls } from "motion/react";
import * as React from "react";
@@ -5,12 +6,10 @@ import { Badge } from "@/components/ui/badge";
import { Input } from "@/components/ui/input";
import { useControlledState } from "@/hooks/use-controlled-state";
import { cn } from "@/utils/style";
import { Kbd } from "../ui/kbd";
type Props = Omit<React.ComponentProps<"div">, "value" | "onChange"> & {
value?: string[];
defaultValue?: string[];
onChange?: (value: string[]) => void;
};
const RETURN_KEY = "Enter";
const COMMA_KEY = ",";
type ChipItemProps = {
chip: string;
@@ -85,6 +84,12 @@ function ChipItem({ chip, index, isEditing, onEdit, onRemove }: ChipItemProps) {
);
}
type Props = Omit<React.ComponentProps<"div">, "value" | "onChange"> & {
value?: string[];
defaultValue?: string[];
onChange?: (value: string[]) => void;
};
export function ChipInput({ value, defaultValue = [], onChange, className, ...props }: Props) {
const [chips, setChips] = useControlledState<string[]>({
value,
@@ -225,7 +230,7 @@ export function ChipInput({ value, defaultValue = [], onChange, className, ...pr
<Reorder.Group axis="x" values={chips} onReorder={handleReorder} className="flex flex-wrap gap-1.5">
{chips.map((chip, idx) => (
<ChipItem
key={chip}
key={`${chip}-${idx}`}
chip={chip}
index={idx}
isEditing={editingIndex === idx}
@@ -236,7 +241,7 @@ export function ChipInput({ value, defaultValue = [], onChange, className, ...pr
</Reorder.Group>
)}
<div className="flex flex-col gap-1">
<div className="flex flex-col gap-2">
<Input
ref={inputRef}
type="text"
@@ -247,7 +252,11 @@ export function ChipInput({ value, defaultValue = [], onChange, className, ...pr
onKeyDown={handleKeyDown}
onChange={handleInputChange}
/>
<p className="text-muted-foreground text-xs">Press Enter or comma to save your keyword</p>
<p className="text-muted-foreground text-xs">
<Trans>
Press <Kbd>{RETURN_KEY}</Kbd> or <Kbd>{COMMA_KEY}</Kbd> to add or save the current keyword.
</Trans>
</p>
</div>
</div>
);