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.
62 lines
1.4 KiB
TypeScript
62 lines
1.4 KiB
TypeScript
"use client"
|
|
|
|
import * as React from "react"
|
|
import {
|
|
NativeSelect,
|
|
NativeSelectOption,
|
|
} from "@/examples/radix/ui-rtl/native-select"
|
|
|
|
import {
|
|
useTranslation,
|
|
type Translations,
|
|
} from "@/components/language-selector"
|
|
|
|
const translations: Translations = {
|
|
en: {
|
|
dir: "ltr",
|
|
values: {
|
|
placeholder: "Select status",
|
|
todo: "Todo",
|
|
inProgress: "In Progress",
|
|
done: "Done",
|
|
cancelled: "Cancelled",
|
|
},
|
|
},
|
|
ar: {
|
|
dir: "rtl",
|
|
values: {
|
|
placeholder: "اختر الحالة",
|
|
todo: "مهام",
|
|
inProgress: "قيد التنفيذ",
|
|
done: "منجز",
|
|
cancelled: "ملغي",
|
|
},
|
|
},
|
|
he: {
|
|
dir: "rtl",
|
|
values: {
|
|
placeholder: "בחר סטטוס",
|
|
todo: "לעשות",
|
|
inProgress: "בתהליך",
|
|
done: "הושלם",
|
|
cancelled: "בוטל",
|
|
},
|
|
},
|
|
}
|
|
|
|
export function NativeSelectRtl() {
|
|
const { dir, t } = useTranslation(translations, "ar")
|
|
|
|
return (
|
|
<NativeSelect dir={dir}>
|
|
<NativeSelectOption value="">{t.placeholder}</NativeSelectOption>
|
|
<NativeSelectOption value="todo">{t.todo}</NativeSelectOption>
|
|
<NativeSelectOption value="in-progress">
|
|
{t.inProgress}
|
|
</NativeSelectOption>
|
|
<NativeSelectOption value="done">{t.done}</NativeSelectOption>
|
|
<NativeSelectOption value="cancelled">{t.cancelled}</NativeSelectOption>
|
|
</NativeSelect>
|
|
)
|
|
}
|