المكوّنات · جدول بيانات عربي
جدول بيانات عربي
الأرقام تُحاذى يسارًا داخل جدول يُقرأ يمينًا
2 تصاميم من هذه العائلة
جدول بيانات عربيجدول موظفين
<div class="mini adt">
<table>
<thead><tr>
<th data-ar="الصنف" data-en="Item">الصنف</th>
<th class="n" data-ar="الكمية" data-en="Qty">الكمية</th>
<th class="n" data-ar="السعر" data-en="Price">السعر</th>
<th class="s" data-ar="الحالة" data-en="Status">الحالة</th>
</tr></thead>
<tbody>
<tr><td data-ar="رخصة سنوية" data-en="Annual license">رخصة سنوية</td>
<td class="n">12</td><td class="n">1,200.00</td>
<td class="s"><span class="dot ok"></span><span data-ar="نشط" data-en="Active">نشط</span></td></tr>
<tr><td data-ar="تدريب فرق" data-en="Team training">تدريب فرق</td>
<td class="n">3</td><td class="n">400.50</td>
<td class="s"><span class="dot wait"></span><span data-ar="معلّق" data-en="Pending">معلّق</span></td></tr>
<tr><td data-ar="دعم مميّز" data-en="Priority support">دعم مميّز</td>
<td class="n">1</td><td class="n">9,840.75</td>
<td class="s"><span class="dot ok"></span><span data-ar="نشط" data-en="Active">نشط</span></td></tr>
</tbody>
<tfoot><tr><td data-ar="المجموع" data-en="Total">المجموع</td><td class="n">16</td>
<td class="n">11,441.25</td><td class="s"></td></tr></tfoot>
</table>
</div>
/* pt-scoped */
/* جدول بيانات عربي */
.adt{width:100%;max-width:280px;background:var(--pt-surface);border-radius:var(--pt-radius-md);
border:1px solid var(--pt-border-subtle);overflow:hidden}
.adt table{width:100%;border-collapse:collapse;font-size:9.5px}
.adt th, .adt td{padding:6px 8px;text-align:start;border-bottom:1px solid var(--pt-border-subtle)}
.adt thead th{background:var(--pt-bg-inset);color:var(--pt-text-muted);font-weight:600;font-size:8.5px}
/* الأرقام تُحاذى يسارًا وتُقرأ بأرقام ثابتة العرض مهما كان اتجاه الجدول */
.adt .n{text-align:left;direction:ltr;font-variant-numeric:tabular-nums;
color:var(--pt-text-primary);white-space:nowrap}
.adt .s{white-space:nowrap}
.adt tbody tr:hover{background:var(--pt-bg-raised)}
.adt tfoot td{background:var(--pt-bg-inset);font-weight:600;border-bottom:0;color:var(--pt-text-primary)}
.adt .dot{display:inline-block;width:5px;height:5px;border-radius:50%;
margin-inline-end:4px;vertical-align:middle}
.adt .dot.ok{background:var(--pt-accent)}
.adt .dot.wait{background:var(--pt-color-info-400)}
# Arabic Data Table
**Role:** You are an Arabic-first UI designer and front-end engineer. Read the whole
specification before writing a single line, then follow it literally. If two requirements
conflict, favour usability over visual effect.
**Goal:** Arabic Data Table — Numbers align left inside a table that reads right
**Why this component matters:** Arabic text aligns to the start while numbers always align left, so their decimal places line up and can be compared by eye. A table that aligns numbers with the text makes comparison impossible.
**Direction:** Genuine RTL — not a mirrored Latin layout. Use logical properties
(`margin-inline-start`, `padding-inline`, `inset-inline-start`, `text-align: start`),
never physical ones (`margin-left`, `left`). The layout must flip with `dir` on its own,
with no duplicated rules.
**Typography:** Cairo for Arabic, IBM Plex Sans for Latin. Arabic line-height must be
`0.18` higher than the Latin equivalent — dots, hamzas and maddas need more vertical room.
Arabic font-size runs `1.06×` the Latin size at the same optical weight.
**Numerals:** Western digits in both languages (`1,234.50`). Only the currency changes:
`ر.س` **after** the number in Arabic, `$` **before** it in English. Jordanian dinar
uses **three** decimal places, not two.
**Colors:** Dark mode — background `#0D142B` · surfaces `#211F54` · borders `#545C91` · text `#918FC2`.
Accent `#ADA9E8` must never exceed 8% of the screen area.
**Language:** Bilingual — every string carries both Arabic and English, and the layout
flips with `dir` automatically.
**States:** `default` · `hover` · `focus` · `active` · `disabled` · `loading` · `error`.
Do not design the resting state alone.
**Accessibility:** Contrast ratio at least `4.5:1`, complete keyboard navigation,
visible focus rings, and honour `prefers-reduced-motion`.
**Output:** Clean HTML and CSS in two separate files. No frameworks, no libraries,
no external dependencies.