@deriv-ds/design-intelligence-layer 0.4.3 → 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/AGENTS.md +15 -3
- package/README.md +20 -3
- package/dist/index.cjs +5498 -1038
- package/dist/index.d.cts +258 -5
- package/dist/index.d.ts +258 -5
- package/dist/index.js +5377 -958
- 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
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
package/AGENTS.md
CHANGED
|
@@ -55,9 +55,21 @@ cp node_modules/@deriv-ds/design-intelligence-layer/guides/rules/design-system-c
|
|
|
55
55
|
1. **Check before building** — if a component exists in `@deriv-ds/design-intelligence-layer`, import it. Never re-implement it.
|
|
56
56
|
2. **Tokens only** — use semantic token classes (`bg-prominent`, `text-on-prominent`, `border-border`, etc.). Never hardcode hex values, raw Tailwind palette colors, or CSS variables.
|
|
57
57
|
3. **Design principles and accessibility first** — every screen must reflect the 8 design principles and meet the accessibility standards (WCAG 2.1 AA). Run both checklists before shipping.
|
|
58
|
-
4. **No separate installs** — do not install `
|
|
59
|
-
5. **
|
|
60
|
-
6. **
|
|
58
|
+
4. **No separate installs** — do not install `tailwindcss` or other bundled dependencies separately. Never install or import `lucide-react` or any other icon library.
|
|
59
|
+
5. **Icons** — use the exported `<Icon />` component (FontAwesome Pro): `<Icon name="bell" weight="bold" />`. Three weights: `regular` (unselected nav, subtle), `bold` (default), `fill` (selected nav, strong actions). Full catalog of names, weights, and intent → icon mappings: `guides/design-system-guide/icon-reference.md`. At runtime, `ICON_NAMES` and `iconAvailableWeights(name)` are exported from the package.
|
|
60
|
+
6. **After a version bump** — re-copy the rules file into `.cursor/rules/`, check for stale local component copies, and align them with the package.
|
|
61
|
+
7. **Blocks are exported from the package** — Blocks (Hero sections, NavBar patterns) are importable directly from `@deriv-ds/design-intelligence-layer`. When a user asks to use a block by name, import it:
|
|
62
|
+
```tsx
|
|
63
|
+
import { HeroMobileHomeTitle, HeroMobileHomeTotalAssets } from "@deriv-ds/design-intelligence-layer"
|
|
64
|
+
import { HeroDesktopHomeOnboarding, HeroDesktopHomeWithBalance } from "@deriv-ds/design-intelligence-layer"
|
|
65
|
+
import { HeroMobileMain, HeroDesktopMain } from "@deriv-ds/design-intelligence-layer"
|
|
66
|
+
import { HeroMobileSecondary, HeroDesktopSecondary } from "@deriv-ds/design-intelligence-layer"
|
|
67
|
+
import { HeroMobileTransaction } from "@deriv-ds/design-intelligence-layer"
|
|
68
|
+
import { Navbar } from "@deriv-ds/design-intelligence-layer"
|
|
69
|
+
// Responsive: renders sidebar on desktop (≥768px), bottom bar on mobile (<768px)
|
|
70
|
+
// For explicit control: NavMobileBottomBar, NavDesktopSidebar are also exported
|
|
71
|
+
```
|
|
72
|
+
See `guides/design-system-guide/deriv-design-intelligence-guide.md` Section 8.5 for full block catalogue and prop signatures.
|
|
61
73
|
|
|
62
74
|
---
|
|
63
75
|
|
package/README.md
CHANGED
|
@@ -6,6 +6,23 @@ Published as **`@deriv-ds/design-intelligence-layer`** on npm.
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
## License & FontAwesome Pro — read before installing
|
|
10
|
+
|
|
11
|
+
This package is **proprietary to Deriv** (`"license": "UNLICENSED"`). It is not open source and must never be published with public access or mirrored to a public registry.
|
|
12
|
+
|
|
13
|
+
The icon system depends on **FontAwesome Pro**, which is commercially licensed to Deriv on a **per-seat basis**. Compliance rules:
|
|
14
|
+
|
|
15
|
+
1. **Only licensed seat-holders may install or build this package.** FontAwesome counts every developer who uses Pro icons during development as a seat. Currently this is restricted to one designated engineer — do not share registry access beyond licensed seats.
|
|
16
|
+
2. **Token setup (required to install).** The FA registry token is read from an environment variable — it is never stored in the repo. The designated engineer adds this to their shell profile (and CI adds it as a masked secret):
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
export FONTAWESOME_NPM_AUTH_TOKEN=<token from the Deriv FontAwesome account>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The committed-ignored `.npmrc` references it as `${FONTAWESOME_NPM_AUTH_TOKEN}`. Without the variable set, `npm install` fails loudly — that is intentional.
|
|
23
|
+
3. **Never bundle FA glyph data.** FA packages must stay in `dependencies` (tsup externalizes them) so the published tarball contains no FontAwesome code. Do not add `@fortawesome/*` to tsup's bundled output.
|
|
24
|
+
4. **Never commit the token.** `.npmrc` is gitignored; the token lives only in shell profiles and CI secrets. If it ever leaks, regenerate it at fontawesome.com → Account.
|
|
25
|
+
|
|
9
26
|
## Quick Start
|
|
10
27
|
|
|
11
28
|
### Installation
|
|
@@ -693,7 +710,7 @@ This project uses @deriv-ds/design-intelligence-layer (Quill Design System). Bef
|
|
|
693
710
|
4. Read node_modules/@deriv-ds/design-intelligence-layer/guides/brand-voice/quill-brand-voice.md — apply the brand voice: channel-specific voice, banned phrases, vocabulary, and formatting rules for all player-facing copy
|
|
694
711
|
5. Check if the component exists in the package — import it, don't re-implement
|
|
695
712
|
6. Use only design token classes (bg-prominent, text-on-prominent, border-border-subtle, etc.) — no hardcoded hex or raw Tailwind palette colors
|
|
696
|
-
7. Do not install lucide-react, tailwindcss, or other bundled dependencies separately
|
|
713
|
+
7. Do not install icon libraries (lucide-react etc.), tailwindcss, or other bundled dependencies separately — icons come from FontAwesome Pro via the <Icon /> component (see guides/design-system-guide/icon-reference.md for the full catalog and weight conventions)
|
|
697
714
|
8. If no token exists for a value, ask before using a hardcoded value
|
|
698
715
|
9. After upgrading the package: prefer package imports over local copies of components; if replacing local UI code with the package version, tell the user what was overwritten; re-copy guides/rules/design-system-consuming-project.mdc into .cursor/rules if using Cursor
|
|
699
716
|
|
|
@@ -719,7 +736,7 @@ See node_modules/@deriv-ds/design-intelligence-layer/README.md for complete toke
|
|
|
719
736
|
| `bg-[var(--primary)]` | `bg-primary` | Raw CSS var — Tailwind v4 maps tokens directly |
|
|
720
737
|
| `hsl(var(--primary))` | `bg-primary` | Tailwind v3 syntax — not needed in v4 |
|
|
721
738
|
| `font-[Plus_Jakarta_Sans]` | `font-sans` (Inter) | Project font is Inter, not Plus Jakarta Sans |
|
|
722
|
-
|
|
|
739
|
+
| Importing `lucide-react` | `<Icon name="..." />` | Icons are FontAwesome Pro via the bundled `<Icon />` component — see `guides/design-system-guide/icon-reference.md` |
|
|
723
740
|
|
|
724
741
|
---
|
|
725
742
|
|
|
@@ -727,7 +744,7 @@ See node_modules/@deriv-ds/design-intelligence-layer/README.md for complete toke
|
|
|
727
744
|
|
|
728
745
|
These are bundled with the package. Installing them separately can cause version conflicts:
|
|
729
746
|
|
|
730
|
-
-
|
|
747
|
+
- `@fortawesome/*` and `@awesome.me/*` — FontAwesome Pro icon packages, used through the exported `<Icon />` component (never imported directly in consuming code)
|
|
731
748
|
- `radix-ui` — headless primitives
|
|
732
749
|
- `class-variance-authority` — variant API
|
|
733
750
|
- `cmdk` — command palette
|