@dev-dga/react 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/README.md +2 -2
- package/dist/index.cjs +1322 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +302 -11
- package/dist/index.d.ts +302 -11
- package/dist/index.js +1327 -18
- package/dist/index.js.map +1 -1
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @dev-dga/react
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
#### Components (7 new)
|
|
8
|
+
|
|
9
|
+
- **`DatePicker`** — single-date picker on `react-aria-components` + `@internationalized/date` (new deps). Gregorian ↔ Hijri (Umm al-Qura) toggle via a scoped `I18nProvider`; the public value stays `Date | null`. Month + Year `<select>` dropdowns in the header, outside-month days selectable, today indicator, optional dual-calendar display, Latin digits at all times (DGA convention), RTL-native. 28 unit + 10 Playwright tests.
|
|
10
|
+
|
|
11
|
+
- **`FileUpload`** — controlled, presentational uploader (no network I/O). Owns selection (drag-drop + click + keyboard), validation (`accept` / `maxSize` / `maxFiles`) with reject-before-accept (`onFilesAdded(File[])` / `onFilesRejected(rejections)` carrying `file-too-large` / `file-invalid-type` / `too-many-files`), and renders the file list with a per-row `Progress` bar. The consumer owns the `files` array and performs the upload. Accessible drop zone (focusable input; drag-drop is a mouse enhancement). New internal `Upload` icon.
|
|
12
|
+
|
|
13
|
+
- **`Slider`** — range input on Radix Slider. Single **and** range in one component: pass a `number` for one thumb or `number[]` for a range, and the emitted value mirrors that shape. `showValue` readout + `formatValue` (→ `aria-valuetext`), range `thumbLabels`, sizes, error state. RTL-native via the provider direction.
|
|
14
|
+
|
|
15
|
+
- **`NumberInput`** — numeric field with flanking − / + steppers. `value: number | null` (controlled/uncontrolled); free typing clamped to `[min, max]` on blur while `step` drives the buttons + ArrowUp/Down; a focused string draft preserves partials (`-`, `1.`); non-numeric input is rejected at `onChange`; display stays plain-decimal (no scientific notation). Latin + LTR digits inside RTL forms, `inputmode` numeric/decimal. New internal `Plus` icon.
|
|
16
|
+
|
|
17
|
+
- **`Rating`** — star rating, interactive (`role="slider"`: Arrow/Home/End + pointer half-detection) or `readOnly` (`role="img"`). Whole or half-star (`allowHalf`) precision; RTL-aware fill + pointer math. `max`, sizes, error tint, `formatValueText` (i18n). Recolor via the `--ddga-rating-color` CSS variable. New solid `Star` icon.
|
|
18
|
+
|
|
19
|
+
- **`Toggle` + `ToggleGroup` + `ToggleGroupItem`** — Radix Toggle. Standalone two-state button (`role="button"` + `aria-pressed`) plus a group that is a segmented control (`type="single"`) or a multi-select toolbar (`type="multiple"`), via a discriminated union on `type`. `default` / `outline` variants (outline joins items into one segmented bar), sizes; item visuals cascade from the group via CSS. Dev-warns on a missing group accessible name.
|
|
20
|
+
|
|
21
|
+
- **`DescriptionList` + `DescriptionItem` + `DescriptionTerm` + `DescriptionDetails`** — semantic `<dl>/<dt>/<dd>` key–value list for review / summary screens. `orientation` horizontal (label beside value, auto-stacks under 480px) or vertical; `divided` rows; term-column width via the `--ddga-dl-term-width` CSS variable. RTL via logical properties. No Radix.
|
|
22
|
+
|
|
23
|
+
#### Architecture
|
|
24
|
+
|
|
25
|
+
- **Body-level portal container for overlays.** `DgaProvider` now creates a `<div data-slot="dga-portal">` appended to `document.body` and exposes it as `DgaContext.portalEl`, mirroring `data-theme` / `dir` / theme CSS variables. All overlay components (Tooltip, Modal, Drawer, DropdownMenu, Select, Combobox, DatePicker) portal there instead of `rootEl`, so they escape any consumer `overflow: hidden` / `transform` ancestor while still inheriting theming. Falls back to `rootEl` during SSR / first commit.
|
|
26
|
+
|
|
27
|
+
#### Tooling
|
|
28
|
+
|
|
29
|
+
- **Bundle-size budgets** (`size-limit`, brotli) per component with a CI gate that fails PRs on regression.
|
|
30
|
+
|
|
31
|
+
#### New dependencies
|
|
32
|
+
|
|
33
|
+
- `react-aria-components` and `@internationalized/date` (DatePicker only; both externalized in the build).
|
|
34
|
+
|
|
3
35
|
## 0.5.0
|
|
4
36
|
|
|
5
37
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -82,9 +82,9 @@ function MyField({ label, helperText, error, errorMessage, ...rest }) {
|
|
|
82
82
|
|
|
83
83
|
## Components
|
|
84
84
|
|
|
85
|
-
**Form:** `Button` · `Input` · `Textarea` · `Checkbox` · `RadioGroup` + `Radio` · `Switch` · `Select` + `SelectItem` · `Combobox` + `ComboboxItem` (+ `ComboboxGroup` · `ComboboxSeparator`)
|
|
85
|
+
**Form:** `Button` · `Input` · `Textarea` · `NumberInput` · `Checkbox` · `RadioGroup` + `Radio` · `Switch` · `Select` + `SelectItem` · `Combobox` + `ComboboxItem` (+ `ComboboxGroup` · `ComboboxSeparator`) · `DatePicker` (Hijri toggle) · `Slider` (single/range) · `Rating` (half-star) · `FileUpload` · `Toggle` + `ToggleGroup` (+ `ToggleGroupItem`)
|
|
86
86
|
|
|
87
|
-
**Display:** `Card` (+ `CardImage`/`CardHeader`/`CardTitle`/`CardDescription`/`CardContent`/`CardFooter`) · `Badge` · `Divider` · `Avatar` (+ `AvatarImage`/`AvatarFallback`/`AvatarGroup`)
|
|
87
|
+
**Display:** `Card` (+ `CardImage`/`CardHeader`/`CardTitle`/`CardDescription`/`CardContent`/`CardFooter`) · `Badge` · `Divider` · `Avatar` (+ `AvatarImage`/`AvatarFallback`/`AvatarGroup`) · `DescriptionList` (+ `DescriptionItem`/`DescriptionTerm`/`DescriptionDetails`)
|
|
88
88
|
|
|
89
89
|
**Feedback / overlay:** `Tooltip` · `Alert` · `Modal` · `Toast` (imperative API) · `Drawer` (off-canvas, 4 sides) · `DropdownMenu` (compound w/ CheckboxItem, RadioGroup, Sub)
|
|
90
90
|
|