@waaelg/dga-design-system 0.4.2 → 0.4.4
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 +23 -23
- package/dist/DGA-logo-icon.svg +55 -0
- package/dist/arrow_left.svg +3 -0
- package/dist/arrow_left_black.svg +3 -0
- package/dist/arrow_right.svg +3 -0
- package/dist/arrow_right_black.svg +3 -0
- package/dist/chevron.svg +0 -0
- package/dist/index.js +253 -0
- package/dist/index.js.map +1 -0
- package/dist/link-icon.svg +19 -0
- package/dist/marker.svg +1 -0
- package/dist/saudiFlag.svg +13 -0
- package/dist/square-lock-password.svg +20 -0
- package/dist/style.css +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +24 -7
- package/docs/README.md +0 -76
- package/docs/changelog.md +0 -54
- package/docs/components/accordion.md +0 -114
- package/docs/components/alert.md +0 -130
- package/docs/components/avatar.md +0 -74
- package/docs/components/breadcrumb.md +0 -56
- package/docs/components/button.md +0 -163
- package/docs/components/card.md +0 -78
- package/docs/components/chart.md +0 -97
- package/docs/components/code-snippet.md +0 -110
- package/docs/components/divider.md +0 -54
- package/docs/components/forms.md +0 -123
- package/docs/components/link.md +0 -52
- package/docs/components/navbar.md +0 -93
- package/docs/components/table.md +0 -69
- package/docs/components/tag.md +0 -76
- package/docs/components/verify-bar.md +0 -79
- package/docs/foundations/colors-cheatsheet.md +0 -593
- package/docs/foundations/colors-swatches.md +0 -441
- package/docs/foundations/colors.md +0 -1284
- package/docs/foundations/grid.md +0 -1406
- package/docs/foundations/radius.md +0 -1166
- package/docs/foundations/spacing.md +0 -134
- package/docs/foundations/typography.md +0 -111
- package/docs/foundations/width-height.md +0 -305
- package/docs/getting-started/installation.md +0 -158
- package/docs/getting-started/javascript-api.md +0 -204
- package/docs/getting-started/rtl-arabic.md +0 -89
- package/docs/getting-started/web-components.md +0 -134
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
# Navbar
|
|
2
|
-
|
|
3
|
-
Responsive navigation with dropdown menus and mobile toggle.
|
|
4
|
-
|
|
5
|
-
**Source:** `src/styles/components/navbar.scss`
|
|
6
|
-
**Demo:** `index.html` (header)
|
|
7
|
-
**JavaScript required:** Yes — `DGAMenuDropDown`
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## HTML structure
|
|
12
|
-
|
|
13
|
-
```html
|
|
14
|
-
<nav class="dga-navbar dga-px-3" role="navigation" aria-label="Main navigation">
|
|
15
|
-
<a class="dga-navbar-brand" href="#">
|
|
16
|
-
<img src="logo.svg" alt="Site name" />
|
|
17
|
-
</a>
|
|
18
|
-
|
|
19
|
-
<ul class="dga-menu">
|
|
20
|
-
<li>
|
|
21
|
-
<a class="dga-menu-item" href="#">Link</a>
|
|
22
|
-
</li>
|
|
23
|
-
<li>
|
|
24
|
-
<a class="dga-menu-item dga-has-dropdown" href="#" role="button"
|
|
25
|
-
aria-expanded="false" aria-haspopup="true">
|
|
26
|
-
الرئيسية
|
|
27
|
-
</a>
|
|
28
|
-
<div class="dga-dropdown">
|
|
29
|
-
<div class="dga-dropdown-content">
|
|
30
|
-
<ul>
|
|
31
|
-
<li><a href="#">Link</a></li>
|
|
32
|
-
<li><a href="#">Link</a></li>
|
|
33
|
-
</ul>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</li>
|
|
37
|
-
</ul>
|
|
38
|
-
|
|
39
|
-
<button class="dga-navbar-toggler" aria-label="Open menu" aria-expanded="false"></button>
|
|
40
|
-
</nav>
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## Classes
|
|
46
|
-
|
|
47
|
-
| Class | Purpose |
|
|
48
|
-
|-------|---------|
|
|
49
|
-
| `dga-navbar` | Root nav container (72px height) |
|
|
50
|
-
| `dga-navbar-brand` | Logo / brand link |
|
|
51
|
-
| `dga-menu` | Horizontal menu list |
|
|
52
|
-
| `dga-menu-item` | Nav link |
|
|
53
|
-
| `dga-has-dropdown` | Item with dropdown chevron |
|
|
54
|
-
| `dga-menu-item-with-icon` | Item with trailing icon |
|
|
55
|
-
| `dga-menu-icon` | Icon inside menu item |
|
|
56
|
-
| `dga-dropdown` | Dropdown panel |
|
|
57
|
-
| `dga-dropdown-content` | Dropdown inner content |
|
|
58
|
-
| `dga-dropdwon-title` | Section title in dropdown (note spelling in source) |
|
|
59
|
-
| `dga-navbar-toggler` | Mobile menu button |
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## JavaScript
|
|
64
|
-
|
|
65
|
-
```js
|
|
66
|
-
import { DGAMenuDropDown, DGAVerifyBar } from '@waaelg/dga-design-on-sass'
|
|
67
|
-
|
|
68
|
-
const menu = new DGAMenuDropDown({
|
|
69
|
-
navbar: document.querySelector('.dga-navbar'),
|
|
70
|
-
})
|
|
71
|
-
|
|
72
|
-
// Optional: coordinate with verify bar
|
|
73
|
-
const verifyBar = new DGAVerifyBar()
|
|
74
|
-
verifyBar.menu = menu
|
|
75
|
-
menu.verifyBar = verifyBar
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Handles desktop dropdowns, mobile slide-out menu, keyboard, and resize.
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
## Accessibility
|
|
83
|
-
|
|
84
|
-
- `role="navigation"` and `aria-label` on `<nav>`
|
|
85
|
-
- Dropdown triggers: `role="button"`, `aria-expanded`, `aria-haspopup`
|
|
86
|
-
- Toggler: `aria-label`, update `aria-expanded` when open
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## Related
|
|
91
|
-
|
|
92
|
-
- [Verify bar](./verify-bar.md)
|
|
93
|
-
- [JavaScript API](../getting-started/javascript-api.md)
|
package/docs/components/table.md
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# Table
|
|
2
|
-
|
|
3
|
-
Data tables with optional contained and striped styles.
|
|
4
|
-
|
|
5
|
-
**Source:** `src/styles/components/table.scss`
|
|
6
|
-
**Demo:** `index.html`
|
|
7
|
-
**JavaScript required:** No
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Basic table
|
|
12
|
-
|
|
13
|
-
```html
|
|
14
|
-
<table class="dga-table" data-contained="true" data-striped="true">
|
|
15
|
-
<thead>
|
|
16
|
-
<tr>
|
|
17
|
-
<th>الاسم</th>
|
|
18
|
-
<th>العمر</th>
|
|
19
|
-
<th>المدينة</th>
|
|
20
|
-
</tr>
|
|
21
|
-
</thead>
|
|
22
|
-
<tbody>
|
|
23
|
-
<tr>
|
|
24
|
-
<td>أحمد</td>
|
|
25
|
-
<td>30</td>
|
|
26
|
-
<td>الرياض</td>
|
|
27
|
-
</tr>
|
|
28
|
-
<tr>
|
|
29
|
-
<td>سارة</td>
|
|
30
|
-
<td>25</td>
|
|
31
|
-
<td>جدة</td>
|
|
32
|
-
</tr>
|
|
33
|
-
</tbody>
|
|
34
|
-
</table>
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## Data attributes
|
|
40
|
-
|
|
41
|
-
| Attribute | Effect |
|
|
42
|
-
|-----------|--------|
|
|
43
|
-
| `data-contained="true"` | Rounded border wrapper, internal dividers |
|
|
44
|
-
| `data-striped="true"` | Alternating row background |
|
|
45
|
-
|
|
46
|
-
Both can be combined.
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
## Styling details
|
|
51
|
-
|
|
52
|
-
- Header: gray background, 48px height, 12px font
|
|
53
|
-
- Body rows: 64px height, 14px font
|
|
54
|
-
- Row hover: light gray highlight
|
|
55
|
-
- Text alignment: `text-align: start` (RTL-aware)
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## Accessibility
|
|
60
|
-
|
|
61
|
-
- Use `<thead>`, `<tbody>`, `<th>`, `<td>` semantically
|
|
62
|
-
- Add `<caption>` for table description when helpful
|
|
63
|
-
- For sortable tables, add ARIA sort attributes in your app logic
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## Related
|
|
68
|
-
|
|
69
|
-
- [Grid](../foundations/grid.md)
|
package/docs/components/tag.md
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
# Tag
|
|
2
|
-
|
|
3
|
-
Compact labels for status, categories, and metadata.
|
|
4
|
-
|
|
5
|
-
**Source:** `src/styles/components/tag.scss`
|
|
6
|
-
**Demo:** `index.html`
|
|
7
|
-
**JavaScript required:** No
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Basic tag
|
|
12
|
-
|
|
13
|
-
```html
|
|
14
|
-
<span class="dga-tag">تاق افتراضي</span>
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Use `<span class="dga-tag">` — includes a default info icon on the left (LTR) or right (RTL).
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Variants
|
|
22
|
-
|
|
23
|
-
| `data-variant` | Color |
|
|
24
|
-
|----------------|-------|
|
|
25
|
-
| (default) | Gray |
|
|
26
|
-
| `success` | Green |
|
|
27
|
-
| `info` | Blue |
|
|
28
|
-
| `warning` | Orange |
|
|
29
|
-
|
|
30
|
-
```html
|
|
31
|
-
<span class="dga-tag" data-variant="success">تاق نجاح</span>
|
|
32
|
-
<span class="dga-tag" data-variant="info">تاق معلومة</span>
|
|
33
|
-
<span class="dga-tag" data-variant="warning">تاق تحذير</span>
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## Modifiers
|
|
39
|
-
|
|
40
|
-
| Attribute | Effect |
|
|
41
|
-
|-----------|--------|
|
|
42
|
-
| `data-outline="true"` | Outlined border |
|
|
43
|
-
| `data-rounded="true"` | Pill shape |
|
|
44
|
-
| `data-icononly="true"` | Circle icon only (no text) |
|
|
45
|
-
|
|
46
|
-
```html
|
|
47
|
-
<span class="dga-tag" data-outline="true">تاق بحدود</span>
|
|
48
|
-
<span class="dga-tag" data-outline="true" data-rounded="true">تاق مدور بحدود</span>
|
|
49
|
-
<span class="dga-tag" data-variant="warning" data-rounded="true" data-icononly="true"></span>
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## Combined example
|
|
55
|
-
|
|
56
|
-
```html
|
|
57
|
-
<div class="dga-d-flex dga-flex-wrap dga-gap-2 dga-align-items-center">
|
|
58
|
-
<span class="dga-tag" data-outline="true">تاق بحدود</span>
|
|
59
|
-
<span class="dga-tag">تاق افتراضي</span>
|
|
60
|
-
<span class="dga-tag" data-variant="success">تاق نجاح</span>
|
|
61
|
-
<div class="dga-divider" data-variant="primary" data-direction="v"></div>
|
|
62
|
-
<span class="dga-tag" data-variant="info" data-rounded="true">تاق معلومة</span>
|
|
63
|
-
</div>
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## RTL
|
|
69
|
-
|
|
70
|
-
Icon position flips with `[dir="rtl"]` on parent or `dir="rtl"` on the tag.
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## Related
|
|
75
|
-
|
|
76
|
-
- [Divider](./divider.md)
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# Verify Bar
|
|
2
|
-
|
|
3
|
-
Saudi government official site verification banner.
|
|
4
|
-
|
|
5
|
-
**Source:** `src/styles/components/verifyBar.scss`, `src/scripts/verifyBar.js`, `src/scripts/dga-verify-bar.js`
|
|
6
|
-
**Demo:** `verify-bar.html`, `index.html`
|
|
7
|
-
**JavaScript:** Optional — web component or `DGAVerifyBar` class
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Option 1: Web component (recommended)
|
|
12
|
-
|
|
13
|
-
Import the package once — registers `<dga-verify-bar>` automatically:
|
|
14
|
-
|
|
15
|
-
```html
|
|
16
|
-
<dga-verify-bar></dga-verify-bar>
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
### Custom attributes
|
|
20
|
-
|
|
21
|
-
```html
|
|
22
|
-
<dga-verify-bar
|
|
23
|
-
domain=".edu.sa"
|
|
24
|
-
registration-number="20250105758"
|
|
25
|
-
registration-link="https://raqmi.dga.gov.sa/platforms/platforms/9ebc5e60-9081-4653-bfb9-08dd2a2f8633/platform-license">
|
|
26
|
-
</dga-verify-bar>
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
| Attribute | Default | Description |
|
|
30
|
-
|-----------|---------|-------------|
|
|
31
|
-
| `domain` | `.edu.sa` | Official domain suffix shown in copy |
|
|
32
|
-
| `registration-number` | `20250105758` | DGA registration number |
|
|
33
|
-
| `registration-link` | DGA Raqmi URL | Link to platform license |
|
|
34
|
-
|
|
35
|
-
No manual JS init required when using the web component.
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## Option 2: Legacy markup + DGAVerifyBar
|
|
40
|
-
|
|
41
|
-
Requires fixed element IDs:
|
|
42
|
-
|
|
43
|
-
- `#dga-verify-bar`
|
|
44
|
-
- `#dga-verifyBtn`
|
|
45
|
-
- `#dga-verify-bar_content`
|
|
46
|
-
|
|
47
|
-
```js
|
|
48
|
-
import { DGAVerifyBar, DGAMenuDropDown } from '@waaelg/dga-design-on-sass'
|
|
49
|
-
|
|
50
|
-
const verifyBar = new DGAVerifyBar()
|
|
51
|
-
const menu = new DGAMenuDropDown()
|
|
52
|
-
verifyBar.menu = menu
|
|
53
|
-
menu.verifyBar = verifyBar
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Use this when integrating with the legacy HTML structure in `index.html`.
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
## Styling
|
|
61
|
-
|
|
62
|
-
- Background: `dga-bg-gray-100`
|
|
63
|
-
- Toggle button: `dga-btn dga-btn-subtle dga-text-primary-500`
|
|
64
|
-
- Expandable panel with domain and HTTPS verification info
|
|
65
|
-
- Arabic copy by default
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Assets
|
|
70
|
-
|
|
71
|
-
The web component references SVG assets (`saudiFlag.svg`, `link-icon.svg`, etc.). Serve them from your app `public` folder or configure paths in your build.
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## Related
|
|
76
|
-
|
|
77
|
-
- [Navbar](./navbar.md) — coordinate open/close with mobile menu
|
|
78
|
-
- [JavaScript API](../getting-started/javascript-api.md)
|
|
79
|
-
- [RTL & Arabic](../getting-started/rtl-arabic.md)
|