@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 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 `lucide-react`, `tailwindcss`, or other bundled dependencies separately.
59
- 5. **After a version bump** — re-copy the rules file into `.cursor/rules/`, check for stale local component copies, and align them with the package.
60
- 6. **Blocks are playground-only** — Blocks (e.g. NavBar) appear in the playground's Blocks tab but are **not** exported from the package. Do not try to import them. To build a block pattern in a consuming project, compose it manually using package components and design tokens. See `guides/design-system-guide/deriv-design-intelligence-guide.md` Section 8.5.
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
@@ -79,6 +79,19 @@ npm install react react-dom tailwindcss
79
79
 
80
80
  > Requires React 18+ and Tailwind CSS v4+.
81
81
 
82
+ ### Icons
83
+
84
+ Icons use **FontAwesome Pro 6** (Deriv-licensed). Do not install `lucide-react` — it is not used in this package. Use the bundled `Icon` component:
85
+
86
+ ```tsx
87
+ import { Icon } from "@deriv-ds/design-intelligence-layer"
88
+
89
+ <Icon name="bell" />
90
+ <Icon name="circle-check" weight="fill" className="text-success" />
91
+ ```
92
+
93
+ The full icon catalog is at `node_modules/@deriv-ds/design-intelligence-layer/guides/design-system-guide/icon-reference.md`.
94
+
82
95
  ---
83
96
 
84
97
  ## What's inside
@@ -693,7 +706,7 @@ This project uses @deriv-ds/design-intelligence-layer (Quill Design System). Bef
693
706
  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
707
  5. Check if the component exists in the package — import it, don't re-implement
695
708
  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
709
+ 7. Do not install lucide-react — icons use FontAwesome Pro via the bundled Icon component; do not install tailwindcss or other bundled dependencies separately
697
710
  8. If no token exists for a value, ask before using a hardcoded value
698
711
  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
712
 
@@ -719,7 +732,7 @@ See node_modules/@deriv-ds/design-intelligence-layer/README.md for complete toke
719
732
  | `bg-[var(--primary)]` | `bg-primary` | Raw CSS var — Tailwind v4 maps tokens directly |
720
733
  | `hsl(var(--primary))` | `bg-primary` | Tailwind v3 syntax — not needed in v4 |
721
734
  | `font-[Plus_Jakarta_Sans]` | `font-sans` (Inter) | Project font is Inter, not Plus Jakarta Sans |
722
- | Installing `lucide-react` | Already bundled | Icons are included in the package |
735
+ | `import ... from 'lucide-react'` | `import { Icon } from "@deriv-ds/design-intelligence-layer"` | Icons use FontAwesome Pro — lucide-react is not in this package |
723
736
 
724
737
  ---
725
738
 
@@ -727,7 +740,7 @@ See node_modules/@deriv-ds/design-intelligence-layer/README.md for complete toke
727
740
 
728
741
  These are bundled with the package. Installing them separately can cause version conflicts:
729
742
 
730
- - `lucide-react` — icon library
743
+ - `lucide-react` — **not used**; icons are FontAwesome Pro via the bundled `Icon` component
731
744
  - `radix-ui` — headless primitives
732
745
  - `class-variance-authority` — variant API
733
746
  - `cmdk` — command palette