@deriv-ds/design-intelligence-layer 0.4.3 → 0.4.5
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/AGENTS.md +15 -3
- package/README.md +16 -3
- package/dist/index.cjs +2458 -709
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +258 -5
- package/dist/index.d.ts +258 -5
- package/dist/index.js +2690 -629
- package/dist/index.js.map +1 -1
- package/guides/design-system-guide/deriv-design-intelligence-guide.md +4 -4
- package/guides/design-system-guide/icon-reference.md +202 -0
- package/guides/design-system-guide/quill-ds-guide.md +4 -4
- package/guides/rules/design-system-consuming-project.mdc +27 -13
- package/package.json +14 -10
- package/src/styles.css +10 -0
|
@@ -59,7 +59,7 @@ Token rules apply ONLY to:
|
|
|
59
59
|
### Rule 4 — Do NOT install or import these separately
|
|
60
60
|
|
|
61
61
|
```
|
|
62
|
-
❌ lucide-react —
|
|
62
|
+
❌ lucide-react or any icon library — icons come from FontAwesome Pro via the package's <Icon /> component (see icon-reference.md in this folder)
|
|
63
63
|
❌ tailwindcss — the package ships its own Tailwind v4 config
|
|
64
64
|
❌ @apply with hsl(var(--token)) — Tailwind v4 uses CSS variables directly
|
|
65
65
|
❌ tailwind.config.js — configuration is handled by the package via CSS
|
|
@@ -612,9 +612,9 @@ Landing page hero sections in multiple layout types.
|
|
|
612
612
|
|---------|-------------|
|
|
613
613
|
| Type 1 — Desktop | Two columns: tagline pill + heading + body + Get started / Learn more CTAs left; square image panel right |
|
|
614
614
|
| Type 1 — Mobile | Single column stacked: text content centred above, image panel full-width below |
|
|
615
|
-
| Type 2 — Desktop | Centred single-column: tagline pill + heading + body + single primary CTA with
|
|
615
|
+
| Type 2 — Desktop | Centred single-column: tagline pill + heading + body + single primary CTA with `<Icon name="arrow-right" />`; no image |
|
|
616
616
|
|
|
617
|
-
**Components used:** `Button` (default `sm`, `secondary sm`);
|
|
617
|
+
**Components used:** `Button` (default `sm`, `secondary sm`); `<Icon name="arrow-up-right" />`, `<Icon name="arrow-right" />` (FontAwesome Pro via the `Icon` component)
|
|
618
618
|
|
|
619
619
|
**Tokens used:** `bg-prominent`, `bg-subtle`, `border-border-subtle`, `text-on-prominent`, `text-on-subtle`, `bg-semantic-win`, `rounded-xl`, `rounded-full`, `px-layout-margin-inline`, `gap-layout-gutter`, `py-24`, `text-5xl`, `font-semibold`, `font-display`, `tracking-tight`, `text-lg`, `font-body`, `text-sm`, `shadow-sm`, `max-w-2xl`
|
|
620
620
|
|
|
@@ -636,7 +636,7 @@ Landing page hero sections in multiple layout types.
|
|
|
636
636
|
| Using standard TW sizes for headings (e.g. `text-6xl` = 60px) | Use design system values (`text-6xl` = 64px in this system) |
|
|
637
637
|
| Forgetting responsive heading sizes | Headings scale down on mobile (see Section 4.2) |
|
|
638
638
|
| Using `rounded-[4px]` or `rounded-[2px]` | Use `rounded-xs` (4px) or `rounded-2xs` (2px) |
|
|
639
|
-
| Installing `lucide-react`
|
|
639
|
+
| Installing or importing `lucide-react` | Use `<Icon name="..." weight="..." />` (FontAwesome Pro) — catalog in `icon-reference.md` |
|
|
640
640
|
| Adding `tailwind.config.js` | Tailwind v4 uses CSS config via the package |
|
|
641
641
|
| Using `bg-gray-*`, `text-zinc-*`, etc. | Use semantic tokens only |
|
|
642
642
|
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
<!-- AUTO-GENERATED by scripts/generate-icon-reference.mjs — do not edit by hand.
|
|
2
|
+
Regenerate with: npm run build && npm run generate:icon-reference -->
|
|
3
|
+
|
|
4
|
+
# Icon reference — FontAwesome Pro via `<Icon />`
|
|
5
|
+
|
|
6
|
+
The design system's only icon source. **Never install or import `lucide-react`** or any other icon library — every icon below ships with the package.
|
|
7
|
+
|
|
8
|
+
## Usage
|
|
9
|
+
|
|
10
|
+
```tsx
|
|
11
|
+
import { Icon } from "@deriv-ds/design-intelligence-layer";
|
|
12
|
+
|
|
13
|
+
// Default weight (bold = medium outline)
|
|
14
|
+
<Icon name="bell" />
|
|
15
|
+
|
|
16
|
+
// Explicit weight + styling via className
|
|
17
|
+
<Icon name="circle-check" weight="fill" className="size-4 text-success" />
|
|
18
|
+
<Icon name="user" weight="regular" className="text-subtle" />
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
When a component prop expects `icon: React.ElementType`, wrap with an arrow function:
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
icon: ({ className }: { className?: string }) => <Icon name="plus" weight="fill" className={className} />
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
At runtime you can introspect the catalog: `ICON_NAMES` (all names) and `iconAvailableWeights(name)` are exported from the package.
|
|
28
|
+
|
|
29
|
+
## Choosing a weight
|
|
30
|
+
|
|
31
|
+
| weight | appearance | when to use |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| `"regular"` | thin / light | unselected nav items, subtle indicators |
|
|
34
|
+
| `"bold"` | medium outline **(default)** | most UI icons |
|
|
35
|
+
| `"fill"` | solid / filled | selected nav items, strong actions |
|
|
36
|
+
|
|
37
|
+
Navigation pattern: render `weight="regular"` for the unselected state and `weight="fill"` for the selected state of the same icon.
|
|
38
|
+
|
|
39
|
+
## Choosing an icon — semantic conventions
|
|
40
|
+
|
|
41
|
+
Use these established mappings before picking something else, so the same intent always gets the same icon:
|
|
42
|
+
|
|
43
|
+
| intent | icon | weight |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| Trade action / CFDs nav | `chart-candlestick` | bold (selected nav: bold) |
|
|
46
|
+
| Transfer between accounts | `arrow-right-arrow-left` | bold |
|
|
47
|
+
| Deposit / add | `plus` | fill |
|
|
48
|
+
| Withdraw / remove | `minus` | fill |
|
|
49
|
+
| Convert | `arrows-left-right` | bold |
|
|
50
|
+
| Home nav | `house-blank` | regular / fill (selected) |
|
|
51
|
+
| Options nav | `options` | regular / fill (selected) |
|
|
52
|
+
| Portfolio / wallet nav | `wallet` | regular / fill (selected) |
|
|
53
|
+
| Refresh / reload | `rotate-right` | fill |
|
|
54
|
+
| Show / hide value | `eye` / `eye-slash` | bold |
|
|
55
|
+
| Back navigation | `arrow-left` | bold |
|
|
56
|
+
| Forward / drill-in | `chevron-right` | bold |
|
|
57
|
+
| More actions / details | `ellipsis` | bold |
|
|
58
|
+
| Close / dismiss | `xmark` | bold |
|
|
59
|
+
| Notifications | `bell` | bold |
|
|
60
|
+
| Info message | `circle-info` | per context |
|
|
61
|
+
| Success message | `circle-check` | per context |
|
|
62
|
+
| Warning message | `circle-exclamation` | per context |
|
|
63
|
+
| Critical / danger message | `triangle-exclamation` | per context |
|
|
64
|
+
| Search | `magnifying-glass` | bold |
|
|
65
|
+
|
|
66
|
+
## Full catalog (131 icons)
|
|
67
|
+
|
|
68
|
+
A "—" means that weight is not mapped for the icon; passing it falls back to the `bold` glyph.
|
|
69
|
+
|
|
70
|
+
| name | regular | bold | fill |
|
|
71
|
+
|---|---|---|---|
|
|
72
|
+
| `arrow-down-to-line` | ✓ | ✓ | ✓ |
|
|
73
|
+
| `arrow-left` | ✓ | ✓ | ✓ |
|
|
74
|
+
| `arrow-right` | ✓ | ✓ | ✓ |
|
|
75
|
+
| `arrow-right-arrow-left` | ✓ | ✓ | ✓ |
|
|
76
|
+
| `arrow-trend-down` | ✓ | ✓ | ✓ |
|
|
77
|
+
| `arrow-trend-up` | ✓ | ✓ | ✓ |
|
|
78
|
+
| `arrow-up-from-line` | ✓ | ✓ | ✓ |
|
|
79
|
+
| `arrow-up-right` | ✓ | ✓ | ✓ |
|
|
80
|
+
| `arrow-up-right-from-square` | ✓ | ✓ | ✓ |
|
|
81
|
+
| `arrows-left-right` | ✓ | ✓ | ✓ |
|
|
82
|
+
| `bell` | ✓ | ✓ | ✓ |
|
|
83
|
+
| `book-circle-question` | ✓ | ✓ | ✓ |
|
|
84
|
+
| `book-open` | ✓ | ✓ | ✓ |
|
|
85
|
+
| `book-open-cover-circle-question` | ✓ | ✓ | — |
|
|
86
|
+
| `box-archive-circle-arrow-down` | ✓ | ✓ | ✓ |
|
|
87
|
+
| `box-archive-circle-arrow-up` | ✓ | ✓ | ✓ |
|
|
88
|
+
| `brand-harmony-os` | — | ✓ | — |
|
|
89
|
+
| `brand-huawei` | — | ✓ | — |
|
|
90
|
+
| `brand-huawei-app-gallery` | — | ✓ | — |
|
|
91
|
+
| `brand-ios` | — | ✓ | — |
|
|
92
|
+
| `brand-ipados` | — | ✓ | — |
|
|
93
|
+
| `brand-macos` | — | ✓ | — |
|
|
94
|
+
| `brand-microsoft-store` | — | ✓ | — |
|
|
95
|
+
| `brand-trustpilot` | — | ✓ | — |
|
|
96
|
+
| `calculator` | ✓ | ✓ | ✓ |
|
|
97
|
+
| `calendar-circle-arrow-left` | ✓ | ✓ | — |
|
|
98
|
+
| `calendar-circle-arrow-right` | ✓ | ✓ | — |
|
|
99
|
+
| `chart-bar` | ✓ | ✓ | ✓ |
|
|
100
|
+
| `chart-candlestick` | ✓ | ✓ | ✓ |
|
|
101
|
+
| `chart-line` | ✓ | ✓ | ✓ |
|
|
102
|
+
| `chart-line-clock` | ✓ | ✓ | — |
|
|
103
|
+
| `chart-line-up-down-clock` | ✓ | ✓ | ✓ |
|
|
104
|
+
| `chart-tradingview` | ✓ | ✓ | ✓ |
|
|
105
|
+
| `chart-trend-down` | ✓ | ✓ | ✓ |
|
|
106
|
+
| `chart-trend-still` | ✓ | ✓ | ✓ |
|
|
107
|
+
| `chart-trend-up` | ✓ | ✓ | ✓ |
|
|
108
|
+
| `check` | ✓ | ✓ | ✓ |
|
|
109
|
+
| `chevron-down` | ✓ | ✓ | ✓ |
|
|
110
|
+
| `chevron-left` | ✓ | ✓ | ✓ |
|
|
111
|
+
| `chevron-right` | ✓ | ✓ | ✓ |
|
|
112
|
+
| `chevron-up` | ✓ | ✓ | ✓ |
|
|
113
|
+
| `circle` | ✓ | ✓ | ✓ |
|
|
114
|
+
| `circle-check` | ✓ | ✓ | ✓ |
|
|
115
|
+
| `circle-exclamation` | ✓ | ✓ | ✓ |
|
|
116
|
+
| `circle-info` | ✓ | ✓ | ✓ |
|
|
117
|
+
| `circle-user-slash` | ✓ | ✓ | ✓ |
|
|
118
|
+
| `clock-rotate-left` | ✓ | ✓ | ✓ |
|
|
119
|
+
| `copy` | ✓ | ✓ | ✓ |
|
|
120
|
+
| `crosshairs-slash` | ✓ | ✓ | — |
|
|
121
|
+
| `deal-cancellation` | ✓ | ✓ | ✓ |
|
|
122
|
+
| `deal-protection` | ✓ | ✓ | ✓ |
|
|
123
|
+
| `deriv` | ✓ | ✓ | ✓ |
|
|
124
|
+
| `deriv-p2p` | ✓ | ✓ | ✓ |
|
|
125
|
+
| `dollar-sign` | ✓ | ✓ | ✓ |
|
|
126
|
+
| `ellipsis` | ✓ | ✓ | ✓ |
|
|
127
|
+
| `envelope` | ✓ | ✓ | ✓ |
|
|
128
|
+
| `envelope-open` | ✓ | ✓ | ✓ |
|
|
129
|
+
| `eye` | ✓ | ✓ | ✓ |
|
|
130
|
+
| `eye-slash` | ✓ | ✓ | ✓ |
|
|
131
|
+
| `fiat-offramp` | ✓ | ✓ | ✓ |
|
|
132
|
+
| `fiat-onramp` | ✓ | ✓ | ✓ |
|
|
133
|
+
| `field-password` | ✓ | ✓ | ✓ |
|
|
134
|
+
| `file-lines` | ✓ | ✓ | ✓ |
|
|
135
|
+
| `file-lines-magnifying-glass` | ✓ | ✓ | — |
|
|
136
|
+
| `file-xmark` | ✓ | ✓ | ✓ |
|
|
137
|
+
| `fingerprint` | ✓ | ✓ | ✓ |
|
|
138
|
+
| `gear` | ✓ | ✓ | ✓ |
|
|
139
|
+
| `grip-vertical` | ✓ | ✓ | ✓ |
|
|
140
|
+
| `hand-gesture-swipe-left-right` | ✓ | ✓ | ✓ |
|
|
141
|
+
| `hand-gesture-tap-left` | ✓ | ✓ | ✓ |
|
|
142
|
+
| `hand-gesture-tap-right` | ✓ | ✓ | ✓ |
|
|
143
|
+
| `handshake-lock` | ✓ | ✓ | — |
|
|
144
|
+
| `handshake-shield` | ✓ | ✓ | — |
|
|
145
|
+
| `horizontal-rule-dashed` | ✓ | ✓ | ✓ |
|
|
146
|
+
| `house` | ✓ | ✓ | ✓ |
|
|
147
|
+
| `house-blank` | ✓ | ✓ | ✓ |
|
|
148
|
+
| `image` | ✓ | ✓ | ✓ |
|
|
149
|
+
| `inbox` | ✓ | ✓ | ✓ |
|
|
150
|
+
| `lock-pattern` | ✓ | ✓ | ✓ |
|
|
151
|
+
| `magnifying-glass` | ✓ | ✓ | ✓ |
|
|
152
|
+
| `memo-shield` | ✓ | ✓ | — |
|
|
153
|
+
| `minus` | ✓ | ✓ | ✓ |
|
|
154
|
+
| `mobile-notch-rotate` | ✓ | ✓ | ✓ |
|
|
155
|
+
| `moon` | ✓ | ✓ | ✓ |
|
|
156
|
+
| `ohlc` | ✓ | ✓ | ✓ |
|
|
157
|
+
| `options` | ✓ | ✓ | ✓ |
|
|
158
|
+
| `page-circle-arrow-right` | ✓ | ✓ | ✓ |
|
|
159
|
+
| `passkey` | ✓ | ✓ | ✓ |
|
|
160
|
+
| `pen-field-circle-xmark` | ✓ | ✓ | — |
|
|
161
|
+
| `pen-field-lock` | ✓ | ✓ | — |
|
|
162
|
+
| `pen-field-slash` | ✓ | ✓ | — |
|
|
163
|
+
| `phone` | ✓ | ✓ | ✓ |
|
|
164
|
+
| `playback-speed` | ✓ | ✓ | ✓ |
|
|
165
|
+
| `plus` | ✓ | ✓ | ✓ |
|
|
166
|
+
| `puzzles-piece-two` | ✓ | ✓ | ✓ |
|
|
167
|
+
| `quill` | — | ✓ | ✓ |
|
|
168
|
+
| `rectangle-history-circle-dollar` | ✓ | ✓ | — |
|
|
169
|
+
| `right-from-bracket` | ✓ | ✓ | ✓ |
|
|
170
|
+
| `rotate-device` | ✓ | ✓ | ✓ |
|
|
171
|
+
| `rotate-right` | ✓ | ✓ | ✓ |
|
|
172
|
+
| `shield-circle-check` | ✓ | ✓ | — |
|
|
173
|
+
| `shield-halved-circle-minus` | ✓ | ✓ | — |
|
|
174
|
+
| `shield-halved-lock` | ✓ | ✓ | — |
|
|
175
|
+
| `shield-lock` | ✓ | ✓ | — |
|
|
176
|
+
| `sparkles` | ✓ | ✓ | ✓ |
|
|
177
|
+
| `spinner` | ✓ | ✓ | ✓ |
|
|
178
|
+
| `square` | ✓ | ✓ | ✓ |
|
|
179
|
+
| `square-check` | ✓ | ✓ | ✓ |
|
|
180
|
+
| `square-minus` | ✓ | ✓ | ✓ |
|
|
181
|
+
| `star` | ✓ | ✓ | ✓ |
|
|
182
|
+
| `stop-loss` | ✓ | ✓ | ✓ |
|
|
183
|
+
| `sun` | ✓ | ✓ | ✓ |
|
|
184
|
+
| `table-cells-large` | ✓ | ✓ | ✓ |
|
|
185
|
+
| `table-columns` | ✓ | ✓ | ✓ |
|
|
186
|
+
| `take-profit` | ✓ | ✓ | ✓ |
|
|
187
|
+
| `trash` | ✓ | ✓ | ✓ |
|
|
188
|
+
| `trash-can` | ✓ | ✓ | ✓ |
|
|
189
|
+
| `triangle-exclamation` | ✓ | ✓ | ✓ |
|
|
190
|
+
| `user` | ✓ | ✓ | ✓ |
|
|
191
|
+
| `user-circle-arrow-right` | ✓ | ✓ | ✓ |
|
|
192
|
+
| `user-circle-arrow-up` | ✓ | ✓ | ✓ |
|
|
193
|
+
| `user-circle-dollar` | ✓ | ✓ | — |
|
|
194
|
+
| `user-large-circle-dollar` | ✓ | ✓ | — |
|
|
195
|
+
| `user-tie-circle-dollar` | ✓ | ✓ | ✓ |
|
|
196
|
+
| `users-line-circle-dollar` | ✓ | ✓ | — |
|
|
197
|
+
| `users-rectangle-circle-dollar` | ✓ | ✓ | — |
|
|
198
|
+
| `wallet` | ✓ | ✓ | ✓ |
|
|
199
|
+
| `wallet-circle-minus` | ✓ | ✓ | ✓ |
|
|
200
|
+
| `wallet-circle-plus` | ✓ | ✓ | ✓ |
|
|
201
|
+
| `wallet-signal` | ✓ | ✓ | ✓ |
|
|
202
|
+
| `xmark` | ✓ | ✓ | ✓ |
|
|
@@ -59,7 +59,7 @@ Token rules apply ONLY to:
|
|
|
59
59
|
### Rule 4 — Do NOT install or import these separately
|
|
60
60
|
|
|
61
61
|
```
|
|
62
|
-
❌ lucide-react —
|
|
62
|
+
❌ lucide-react or any icon library — icons come from FontAwesome Pro via the package's <Icon /> component (see icon-reference.md in this folder)
|
|
63
63
|
❌ tailwindcss — the package ships its own Tailwind v4 config
|
|
64
64
|
❌ @apply with hsl(var(--token)) — Tailwind v4 uses CSS variables directly
|
|
65
65
|
❌ tailwind.config.js — configuration is handled by the package via CSS
|
|
@@ -632,9 +632,9 @@ Landing page hero sections in multiple layout types.
|
|
|
632
632
|
|---------|-------------|
|
|
633
633
|
| Type 1 — Desktop | Two columns: tagline pill + heading + body + Get started / Learn more CTAs left; square image panel right |
|
|
634
634
|
| Type 1 — Mobile | Single column stacked: text content centred above, image panel full-width below |
|
|
635
|
-
| Type 2 — Desktop | Centred single-column: tagline pill + heading + body + single primary CTA with
|
|
635
|
+
| Type 2 — Desktop | Centred single-column: tagline pill + heading + body + single primary CTA with `<Icon name="arrow-right" />`; no image |
|
|
636
636
|
|
|
637
|
-
**Components used:** `Button` (default `sm`, `secondary sm`);
|
|
637
|
+
**Components used:** `Button` (default `sm`, `secondary sm`); `<Icon name="arrow-up-right" />`, `<Icon name="arrow-right" />` (FontAwesome Pro via the `Icon` component)
|
|
638
638
|
|
|
639
639
|
**Tokens used:** `bg-primary-surface`, `bg-secondary-surface`, `border-default`, `text-prominent`, `text-subtle`, `bg-success`, `rounded-xl`, `rounded-full`, `px-layout-margin-inline`, `gap-layout-gutter`, `py-24`, `text-5xl`, `font-semibold`, `font-display`, `tracking-tight`, `text-lg`, `font-body`, `text-sm`, `shadow-sm`, `max-w-2xl`
|
|
640
640
|
|
|
@@ -657,7 +657,7 @@ Landing page hero sections in multiple layout types.
|
|
|
657
657
|
| Using standard TW sizes for headings (e.g. `text-6xl` = 60px) | Use design system values (`text-6xl` = 64px in this system) |
|
|
658
658
|
| Using `rounded-[4px]` or `rounded-[2px]` | Use `rounded-xs` (4px) or `rounded-2xs` (2px) |
|
|
659
659
|
| Using small radius on buttons | Buttons use `rounded-full` (pill shape, 999px) |
|
|
660
|
-
| Installing `lucide-react`
|
|
660
|
+
| Installing or importing `lucide-react` | Use `<Icon name="..." weight="..." />` (FontAwesome Pro) — catalog in `icon-reference.md` |
|
|
661
661
|
| Adding `tailwind.config.js` | Tailwind v4 uses CSS config via the package |
|
|
662
662
|
| Using `bg-gray-*`, `text-zinc-*`, etc. | Use semantic tokens only |
|
|
663
663
|
| Using `bg-prominent`, `bg-card`, `bg-popover`, `bg-subtle` | Use `bg-primary-surface`, `bg-primary-canvas`, `bg-secondary-surface`, `bg-secondary-canvas` |
|
|
@@ -109,7 +109,7 @@ Token rules apply **only** to: color (bg, text, border, ring, shadow color), bor
|
|
|
109
109
|
## Rule 4 — Do NOT install or configure these separately
|
|
110
110
|
|
|
111
111
|
```
|
|
112
|
-
❌ Do NOT install lucide-react
|
|
112
|
+
❌ Do NOT install or import lucide-react or any icon library — use the package's <Icon /> component (FontAwesome Pro): <Icon name="bell" weight="bold" />. Catalog + weight conventions: guides/design-system-guide/icon-reference.md
|
|
113
113
|
❌ Do NOT install tailwindcss separately — the package ships its own Tailwind v4 setup
|
|
114
114
|
❌ Do NOT add a tailwind.config.js — configuration is handled by the package
|
|
115
115
|
❌ Do NOT use @apply with hsl(var(--token)) — Tailwind v4 uses CSS variables directly
|
|
@@ -183,22 +183,36 @@ Wait for confirmation before proceeding.
|
|
|
183
183
|
|
|
184
184
|
---
|
|
185
185
|
|
|
186
|
-
## Rule 8 — Blocks are
|
|
186
|
+
## Rule 8 — Blocks are exported from the package
|
|
187
187
|
|
|
188
|
-
**Blocks** are pre-composed UI sections (
|
|
188
|
+
**Blocks** are pre-composed UI sections (Hero sections, NavBar patterns) exported directly from `@deriv-ds/design-intelligence-layer`. Import them by name — do not re-implement them.
|
|
189
189
|
|
|
190
|
+
### Available blocks
|
|
191
|
+
|
|
192
|
+
| Block name | Export(s) | Description |
|
|
193
|
+
|---|---|---|
|
|
194
|
+
| Hero mobile home | `HeroMobileHomeTitle`, `HeroMobileHomeTotalAssets`, `HeroMobileHomeTitleSkeleton`, `HeroMobileHomeTotalAssetsSkeleton` | Mobile hero with onboarding stepper or total assets |
|
|
195
|
+
| Hero desktop home | `HeroDesktopHomeOnboarding`, `HeroDesktopHomeWithBalance`, `HeroDesktopHomeOnboardingSkeleton`, `HeroDesktopHomeWithBalanceSkeleton` | Desktop hero with onboarding or balance state |
|
|
196
|
+
| Hero mobile main | `HeroMobileMain`, `HeroMobileMainSkeleton` | Mobile hero with account tabs + action buttons |
|
|
197
|
+
| Hero desktop main | `HeroDesktopMain`, `HeroDesktopMainSkeleton` | Desktop hero with account tabs + action buttons |
|
|
198
|
+
| Hero mobile secondary | `HeroMobileSecondary`, `HeroMobileSecondarySkeleton` | Mobile single-account hero (light surface) |
|
|
199
|
+
| Hero desktop secondary | `HeroDesktopSecondary`, `HeroDesktopSecondarySkeleton` | Desktop single-account hero (light surface) |
|
|
200
|
+
| Hero mobile transaction | `HeroMobileTransaction` | Transaction details card (deposit/withdraw/transfer/convert) |
|
|
201
|
+
| Navbar | `Navbar` | Responsive nav — renders sidebar on desktop (≥768px), bottom bar on mobile (<768px). Props: `activeId`, `badges`, `onNavChange` |
|
|
202
|
+
| NavMobileBottomBar | `NavMobileBottomBar` | Mobile bottom tab bar with optional badges (use `Navbar` unless you need explicit control) |
|
|
203
|
+
| NavDesktopSidebar | `NavDesktopSidebar` | Desktop sidebar with nav items, Ask Amy pill, QR banner (use `Navbar` unless you need explicit control) |
|
|
204
|
+
|
|
205
|
+
### Correct import pattern
|
|
206
|
+
|
|
207
|
+
```tsx
|
|
208
|
+
import { Navbar, HeroMobileMain } from "@deriv-ds/design-intelligence-layer"
|
|
190
209
|
```
|
|
191
|
-
❌ Do NOT import blocks from the package — they don't exist there
|
|
192
|
-
❌ Do NOT treat block names (e.g. "NavBar") as component names from Rule 1
|
|
193
|
-
✅ To build a block pattern in your project: compose it manually using package components + tokens
|
|
194
|
-
✅ Reference guides/design-system-guide/trading-game-ds-guide.md Section 8.5 for block structure
|
|
195
|
-
```
|
|
196
210
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
211
|
+
### Shared action button (used by hero main/secondary blocks)
|
|
212
|
+
|
|
213
|
+
```tsx
|
|
214
|
+
import { HeroActionButton } from "@deriv-ds/design-intelligence-layer"
|
|
215
|
+
```
|
|
202
216
|
|
|
203
217
|
---
|
|
204
218
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deriv-ds/design-intelligence-layer",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.5",
|
|
4
4
|
"description": "Deriv Design System — shadcn/ui components with Tailwind CSS v4",
|
|
5
|
+
"license": "UNLICENSED",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"main": "./dist/index.cjs",
|
|
7
8
|
"module": "./dist/index.js",
|
|
@@ -23,11 +24,10 @@
|
|
|
23
24
|
"**/*.css"
|
|
24
25
|
],
|
|
25
26
|
"scripts": {
|
|
26
|
-
"dev": "
|
|
27
|
+
"dev": "next dev -H 127.0.0.1 -p 3000",
|
|
27
28
|
"generate:registry": "node scripts/generate-component-registry.mjs",
|
|
28
|
-
"generate:
|
|
29
|
+
"generate:icon-reference": "node scripts/generate-icon-reference.mjs",
|
|
29
30
|
"build": "tsup",
|
|
30
|
-
"prebuild:next": "npm run generate:blocks",
|
|
31
31
|
"build:next": "next build",
|
|
32
32
|
"start": "next start",
|
|
33
33
|
"lint": "eslint",
|
|
@@ -40,16 +40,20 @@
|
|
|
40
40
|
"AGENTS.md",
|
|
41
41
|
"README.md"
|
|
42
42
|
],
|
|
43
|
-
"publishConfig": {
|
|
44
|
-
"access": "public"
|
|
45
|
-
},
|
|
46
43
|
"peerDependencies": {
|
|
47
44
|
"react": ">=18",
|
|
48
45
|
"react-dom": ">=18",
|
|
49
46
|
"tailwindcss": ">=4"
|
|
50
47
|
},
|
|
51
48
|
"dependencies": {
|
|
49
|
+
"@awesome.me/kit-394c25e5aa": "^1.0.61",
|
|
50
|
+
"@awesome.me/kit-a9f9eb613f": "^1.0.278",
|
|
52
51
|
"@base-ui/react": "^1.2.0",
|
|
52
|
+
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
|
53
|
+
"@fortawesome/pro-light-svg-icons": "^6.7.2",
|
|
54
|
+
"@fortawesome/pro-regular-svg-icons": "^6.7.2",
|
|
55
|
+
"@fortawesome/pro-solid-svg-icons": "^6.7.2",
|
|
56
|
+
"@fortawesome/react-fontawesome": "^3.3.1",
|
|
53
57
|
"@hookform/resolvers": "^5.2.2",
|
|
54
58
|
"class-variance-authority": "^0.7.1",
|
|
55
59
|
"clsx": "^2.1.1",
|
|
@@ -57,7 +61,7 @@
|
|
|
57
61
|
"date-fns": "^4.1.0",
|
|
58
62
|
"embla-carousel-react": "^8.6.0",
|
|
59
63
|
"input-otp": "^1.4.2",
|
|
60
|
-
"
|
|
64
|
+
"next-themes": "^0.4.6",
|
|
61
65
|
"radix-ui": "^1.4.3",
|
|
62
66
|
"react-day-picker": "^9.14.0",
|
|
63
67
|
"react-hook-form": "^7.71.2",
|
|
@@ -77,7 +81,6 @@
|
|
|
77
81
|
"eslint": "^9",
|
|
78
82
|
"eslint-config-next": "16.2.6",
|
|
79
83
|
"next": "16.2.6",
|
|
80
|
-
"next-themes": "^0.4.6",
|
|
81
84
|
"react": "19.2.3",
|
|
82
85
|
"react-dom": "19.2.3",
|
|
83
86
|
"shadcn": "^3.8.5",
|
|
@@ -90,6 +93,7 @@
|
|
|
90
93
|
"lodash": "^4.18.0",
|
|
91
94
|
"postcss": "^8.5.10",
|
|
92
95
|
"qs": "^6.15.2",
|
|
93
|
-
"hono": "^4.12.21"
|
|
96
|
+
"hono": "^4.12.21",
|
|
97
|
+
"esbuild": "^0.28.1"
|
|
94
98
|
}
|
|
95
99
|
}
|
package/src/styles.css
CHANGED
|
@@ -12,6 +12,16 @@
|
|
|
12
12
|
/* Fonts — Inter (all) */
|
|
13
13
|
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");
|
|
14
14
|
|
|
15
|
+
/* FontAwesome Pro — inside @layer base so Tailwind utilities (size-*, hidden) win */
|
|
16
|
+
@layer base {
|
|
17
|
+
.svg-inline--fa {
|
|
18
|
+
height: auto;
|
|
19
|
+
width: auto;
|
|
20
|
+
display: inline-block;
|
|
21
|
+
vertical-align: -0.125em;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
15
25
|
|
|
16
26
|
/* ── Tailwind theme bridge — maps CSS vars to utility classes ── */
|
|
17
27
|
@theme inline {
|