Component: Locale-aware Number Input
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- frontend, internationalization
Línea de trabajo
Start by reading CONTRIBUTING.md and the component conventions, then inspect src/registry/components/ and its index.ts, src/registry/registry.ts, and tests in test/. Implement and verify locale parsing and formatting for en-US, de-DE, fr-FR, and hi-IN, including caret behavior, min/max, and empty input; done means the component, exports, registry entry, tests, and documentation page are in place.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Component: Locale-aware Number Input
A number input that lets people type and read numbers the way their locale writes them: 1.234,56 in German, 1,234.56 in English, 1 234,56 in French. It still gives your code a plain JavaScript number.
Requirements
- TypeScript-first with exported props interface
- Derives the decimal and grouping separators from
Intl.NumberFormat(locale).formatToParts(), not from a hardcoded table - Accepts input with the locale's separators, parses it to a
number(ornullwhen empty), and reformats on blur - Keeps the caret in a sensible place while typing; doesn't reformat mid-typing in a way that jumps the cursor
- Supports
min,max,stepandmaximumFractionDigits - Follows the component conventions:
value/defaultValue/onValueChange(number), forwarded ref,...rest inputMode="decimal"so mobile keyboards show the right keys- Works with React Hook Form and other form libraries (controlled and uncontrolled)
Expected API
<NumberInput
locale="de-DE"
defaultValue={1234.56}
maximumFractionDigits={2}
onValueChange={(value) => setAmount(value)} // 1234.56
/>
Deliverables
- Component source in
src/registry/components/ - Export in
src/registry/components/index.tsand entry insrc/registry/registry.ts - Tests in
test/covering parsing and formatting foren-US,de-DE,fr-FR(narrow no-break space grouping) andhi-IN(lakh grouping), plus min/max and empty input - Documentation page in
content/docs/components/inputs/
Related: #5 (Currency Input) could build on this once it lands.
See CONTRIBUTING.md and the Contributor Rulebook.
- Lenguaje dominante
- TypeScript
- Estrellas
- 39
- Forks
- 16
- Merge medio
- 18 h 14 min
- PR fusionados (30 d)
- 35
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de babelize/babelize-elements
-
accessibility help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
babelize/babelize-elements#94 ·
Los mantenedores suelen responder en 1 día
-
Component: Relative TimeAbiertocomponent date-time good first issue
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
babelize/babelize-elements#92 ·
Los mantenedores suelen responder en 1 día
-
Component: Timezone PickerAbiertocomponent date-time good first issue
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
babelize/babelize-elements#91 ·
Los mantenedores suelen responder en 1 día
-
component good first issue language-switcher
Dificultad 4/5 3-5 días Aptitud para principiantes 56/100
babelize/babelize-elements#90 ·
Los mantenedores suelen responder en 1 día
-
component enhancement help wanted
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
babelize/babelize-elements#47 ·
Los mantenedores suelen responder en 1 día
Todos los issues de babelize/babelize-elements
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
-
bug needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
DSpace/dspace-angular#6511 ·
Los mantenedores suelen responder en 1 día
-
area: frontend area:byok bug severity:low
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Phone app shows Unknown for a remote machine whose key changedPosiblemente ocupada @janicduplessis la tomó hoy. Abiertoarea: mobile priority: P3 type: bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
appandflow/stim#5006 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Area - Local to Cloud Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
microsoft/vscode-mssql#23209 ·
Los mantenedores suelen responder en 1 día