mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-10-30 18:22:59 +00:00
Squash merge of shadcn-ui/ui main branch into hanzo/ui, bringing in: - [email protected] through [email protected] releases - New apps/v4 directory structure - Registry system improvements and MCP server - Framework support (Vue, Svelte, React Native) - New templates (vite-app, monorepo-next, laravel) - Zod 4 compatibility (scoped override for zod@>4) - Test fixture corrections for alias resolution All 867 merge conflicts resolved preserving Hanzo customizations. 1020/1020 shadcn tests pass.
59 lines
1.3 KiB
TypeScript
59 lines
1.3 KiB
TypeScript
"use client"
|
|
|
|
import * as React from "react"
|
|
import {
|
|
Field,
|
|
FieldDescription,
|
|
FieldLabel,
|
|
} from "@/examples/base/ui-rtl/field"
|
|
import { Input } from "@/examples/base/ui-rtl/input"
|
|
|
|
import {
|
|
useTranslation,
|
|
type Translations,
|
|
} from "@/components/language-selector"
|
|
|
|
const translations: Translations = {
|
|
en: {
|
|
dir: "ltr",
|
|
values: {
|
|
apiKey: "API Key",
|
|
placeholder: "sk-...",
|
|
description: "Your API key is encrypted and stored securely.",
|
|
},
|
|
},
|
|
ar: {
|
|
dir: "rtl",
|
|
values: {
|
|
apiKey: "مفتاح API",
|
|
placeholder: "sk-...",
|
|
description: "مفتاح API الخاص بك مشفر ومخزن بأمان.",
|
|
},
|
|
},
|
|
he: {
|
|
dir: "rtl",
|
|
values: {
|
|
apiKey: "מפתח API",
|
|
placeholder: "sk-...",
|
|
description: "מפתח ה-API שלך מוצפן ונשמר בצורה מאובטחת.",
|
|
},
|
|
},
|
|
}
|
|
|
|
export function InputRtl() {
|
|
const { dir, t } = useTranslation(translations, "ar")
|
|
|
|
return (
|
|
<Field dir={dir}>
|
|
<FieldLabel htmlFor="input-rtl-api-key">{t.apiKey}</FieldLabel>
|
|
<Input
|
|
id="input-rtl-api-key"
|
|
type="password"
|
|
placeholder={t.placeholder}
|
|
dir={dir}
|
|
/>
|
|
<FieldDescription>{t.description}</FieldDescription>
|
|
</Field>
|
|
)
|
|
}
|