@dev-dga/react 0.1.0 → 0.1.1
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/README.md +49 -0
- package/package.json +27 -3
package/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# @dev-dga/react
|
|
2
|
+
|
|
3
|
+
React 19 components for the **DGA (Digital Government Authority)** design system , Saudi Arabia's national reference for government digital platforms.
|
|
4
|
+
|
|
5
|
+
Accessible (WCAG 2.2 AA), RTL-native, dark-mode ready. **Ships no CSS** , pair with `@dev-dga/css`.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @dev-dga/react @dev-dga/css
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Requires `react@^19` and `react-dom@^19` (peer dependencies).
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import '@dev-dga/css'; // required , components ship no styles
|
|
19
|
+
import { DgaProvider, Button, Input, Textarea, Checkbox } from '@dev-dga/react';
|
|
20
|
+
|
|
21
|
+
export default function App() {
|
|
22
|
+
return (
|
|
23
|
+
<DgaProvider>
|
|
24
|
+
<Button>Hello</Button>
|
|
25
|
+
<Input label="Email" type="email" helperText="We'll never share it." />
|
|
26
|
+
</DgaProvider>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
For RTL or dark mode, configure the provider:
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
<DgaProvider dir="rtl" mode="dark">
|
|
35
|
+
{/* … */}
|
|
36
|
+
</DgaProvider>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Components
|
|
40
|
+
|
|
41
|
+
`Button` · `Input` · `Textarea` · `Checkbox` · `DgaProvider` , plus `cn` (clsx) and `useDga`.
|
|
42
|
+
|
|
43
|
+
## Docs
|
|
44
|
+
|
|
45
|
+
[Live Storybook](https://devdhaif.github.io/dev-dga/) · [Source](https://github.com/DevDhaif/dev-dga)
|
|
46
|
+
|
|
47
|
+
## License
|
|
48
|
+
|
|
49
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dev-dga/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "React 19 components for the DGA (Digital Government Authority) design system — accessible, RTL-native, dark-mode ready.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"react-19",
|
|
8
|
+
"ui",
|
|
9
|
+
"components",
|
|
10
|
+
"design-system",
|
|
11
|
+
"dga",
|
|
12
|
+
"saudi-arabia",
|
|
13
|
+
"rtl",
|
|
14
|
+
"dark-mode",
|
|
15
|
+
"accessible",
|
|
16
|
+
"wcag"
|
|
17
|
+
],
|
|
18
|
+
"homepage": "https://devdhaif.github.io/dev-dga/",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/DevDhaif/dev-dga/issues"
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/DevDhaif/dev-dga.git",
|
|
26
|
+
"directory": "packages/react"
|
|
27
|
+
},
|
|
4
28
|
"type": "module",
|
|
5
29
|
"sideEffects": false,
|
|
6
30
|
"files": [
|
|
@@ -32,7 +56,7 @@
|
|
|
32
56
|
"peerDependencies": {
|
|
33
57
|
"react": "^19.0.0",
|
|
34
58
|
"react-dom": "^19.0.0",
|
|
35
|
-
"@dev-dga/css": "0.1.
|
|
59
|
+
"@dev-dga/css": "0.1.1"
|
|
36
60
|
},
|
|
37
61
|
"devDependencies": {
|
|
38
62
|
"@storybook/react-vite": "^10.2.15",
|
|
@@ -49,7 +73,7 @@
|
|
|
49
73
|
"typescript": "^5.7.0",
|
|
50
74
|
"vitest": "^2.0.0",
|
|
51
75
|
"vitest-axe": "^0.1.0",
|
|
52
|
-
"@dev-dga/tokens": "0.1.
|
|
76
|
+
"@dev-dga/tokens": "0.1.1"
|
|
53
77
|
},
|
|
54
78
|
"scripts": {
|
|
55
79
|
"build": "tsup",
|