@deriv-ds/design-intelligence-layer 0.5.1 → 0.6.0

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
@@ -56,9 +56,10 @@ cp node_modules/@deriv-ds/design-intelligence-layer/guides/rules/design-system-c
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
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.
59
+ 5. **Icons** — use the exported `<Icon />` component (`@deriv/quill-icons`): `<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
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:
61
+ 7. **No `Alert` / `Banner` component** — they do not exist. For an inline status/alert message use **`SectionMessage`** (`role="alert"`; variants `default | information | success | warning | danger`). For a dismissible banner bar use **`NotificationBanner`** (`title`, `description`, `onClose`). Never invent an `Alert` or `Banner` import.
62
+ 8. **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
63
  ```tsx
63
64
  import { HeroMobileHomeTitle, HeroMobileHomeTotalAssets } from "@deriv-ds/design-intelligence-layer"
64
65
  import { HeroDesktopHomeOnboarding, HeroDesktopHomeWithBalance } from "@deriv-ds/design-intelligence-layer"
package/CHANGELOG.md ADDED
@@ -0,0 +1,63 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@deriv-ds/design-intelligence-layer` are documented here.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.5.2]
11
+
12
+ ### Added
13
+ - **Paired on-surface foreground tokens** — every surface now has a matching legible
14
+ foreground utility (`text-on-primary-surface`, `text-on-secondary-surface`,
15
+ `text-on-prominent`, `text-on-subtle`), so pairings like `bg-prominent text-on-prominent`
16
+ are always self-consistent and theme-aware. Additive only — existing components are
17
+ unchanged.
18
+ - **Test suite** — Vitest + React Testing Library smoke/render tests for core components
19
+ (Button, Badge, SectionMessage, NotificationBanner, Icon), wired into CI.
20
+ - `PhoneInput` and `EmailOrPhoneInput` components.
21
+ - This `CHANGELOG.md`.
22
+
23
+ ### Changed
24
+ - **Button** — size scale renamed to `XL` / `LG` / `MD` / `SM` with corrected token values.
25
+ - Consistent cursor states across interactive components.
26
+
27
+ ### Fixed
28
+ - `EmailOrPhoneInput` now restores focus to the email `Input` when reverting phone → email.
29
+
30
+ ### Documentation
31
+ - Documented the `Alert` → `SectionMessage` and `Banner` → `NotificationBanner` mapping in
32
+ the README and `AGENTS.md`, so consumers and AI agents reach the right primitive.
33
+
34
+ ## [0.5.1]
35
+
36
+ ### Added
37
+ - **Referral** block + playground page.
38
+
39
+ ## [0.5.0]
40
+
41
+ ### Added
42
+ - **Blocks**: Home blocks, Header block (`HeaderApp`, `HeaderAppHome`, `HeaderBranding`),
43
+ `FeedbackSuccessScreen`, `AccountActivatedCard`, `TradingAccountCard`, Trading blocks
44
+ (Action Buttons, Empty state), `HomeHighlightCard` / `HomeHighlights`.
45
+
46
+ ### Changed
47
+ - **Icons** — migrated from FontAwesome Pro to `@deriv/quill-icons`, exposed via the
48
+ `<Icon />` wrapper with three weights (`regular`, `bold`, `fill`). Static block assets
49
+ replaced with Quill Illustration icons.
50
+
51
+ ### Fixed
52
+ - Icon size variants, `Tag`/`Chip` `asChild`, checkbox fill icon.
53
+ - `HomeHighlights` dark-mode colors.
54
+
55
+ ## [0.4.5]
56
+
57
+ ### Security
58
+ - Patched CVE-2026-53550 and CVE-2026-49356 (dependency bumps).
59
+
60
+ [Unreleased]: https://github.com/deriv-com/design-intelligence-layer/compare/v0.5.1...HEAD
61
+ [0.5.1]: https://github.com/deriv-com/design-intelligence-layer/compare/v0.5.0...v0.5.1
62
+ [0.5.0]: https://github.com/deriv-com/design-intelligence-layer/compare/v0.4.5...v0.5.0
63
+ [0.4.5]: https://github.com/deriv-com/design-intelligence-layer/releases/tag/v0.4.5
package/README.md CHANGED
@@ -81,7 +81,7 @@ npm install react react-dom tailwindcss
81
81
 
82
82
  ### Icons
83
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:
84
+ Icons are provided by **`@deriv/quill-icons`** via the bundled `Icon` component — do not install `lucide-react` or `@fortawesome/*`. Three weights cover the density range: `regular` (thin outline), `bold` (medium outline — default), and `fill` (solid). Use the bundled `Icon` component:
85
85
 
86
86
  ```tsx
87
87
  import { Icon } from "@deriv-ds/design-intelligence-layer"
@@ -96,7 +96,7 @@ The full icon catalog is at `node_modules/@deriv-ds/design-intelligence-layer/gu
96
96
 
97
97
  ## What's inside
98
98
 
99
- - **61 UI components** — buttons, forms, dialogs, charts, sidebars, and more
99
+ - **63 UI components** — buttons, forms, dialogs, charts, sidebars, and more
100
100
  - **Design tokens** — three-layer architecture (primitives → foundation semantics → component tokens) synced from Figma
101
101
  - **Light + Dark themes** — toggle `.dark` on `<html>` to switch; every semantic token has a paired override
102
102
  - **Inter typography** — heading (mega → h6) and body (xl → xs) scales ready to use
@@ -132,6 +132,7 @@ The full icon catalog is at `node_modules/@deriv-ds/design-intelligence-layer/gu
132
132
  | Direction | `DirectionProvider, useDirection` |
133
133
  | Drawer | `Drawer, DrawerTrigger, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, DrawerClose` |
134
134
  | Dropdown Menu | `DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, ...` |
135
+ | Email or Phone Input | `EmailOrPhoneInput` |
135
136
  | Empty State | `Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent` |
136
137
  | Field | `Field, FieldLabel, FieldDescription, FieldError, FieldGroup` |
137
138
  | Form | `Form, FormItem, FormLabel, FormControl, FormField, FormMessage` |
@@ -149,6 +150,7 @@ The full icon catalog is at `node_modules/@deriv-ds/design-intelligence-layer/gu
149
150
  | Notification | `NotificationBanner, NotificationItem, NotificationDivider` |
150
151
  | OTP Field | `CodeInput, CodeInputGroup, CodeInputSlot, CodeInputSeparator` |
151
152
  | Pagination | `Pagination, PaginationContent, PaginationLink, ...` |
153
+ | Phone Input | `PhoneInput` (also exports `COUNTRIES, DEFAULT_COUNTRY, Country`) |
152
154
  | Popover | `Popover, PopoverTrigger, PopoverContent, PopoverAnchor` |
153
155
  | Progress | `Progress` |
154
156
  | Radio Group | `RadioGroup, RadioGroupItem` |
@@ -269,8 +271,8 @@ Tags are 4px-radius chips for filtering, metadata, and categorisation. Two visua
269
271
  <Tag variant="fill" /> // tinted background (red @ 8%, etc.)
270
272
 
271
273
  // Sizes
272
- <Tag size="sm" /> // 24px · 12px font · 16px icon · 4px gap
273
- <Tag size="md" /> // 32px · 14px font · 18px icon · 8px gap
274
+ <Tag size="sm" /> // 24px · 12px font · 18px icon · 4px gap
275
+ <Tag size="md" /> // 32px · 14px font · 20px icon · 4px gap
274
276
  ```
275
277
 
276
278
  ## Section message variants
@@ -283,15 +285,34 @@ Tags are 4px-radius chips for filtering, metadata, and categorisation. Two visua
283
285
  <SectionMessage variant="danger" /> // Red tint + danger icon
284
286
 
285
287
  // Sizes
286
- <SectionMessage size="sm" /> // 14px message · 16px title · 20px icon
287
- <SectionMessage size="md" /> // 16px message · 18px title · 22px icon
288
+ <SectionMessage size="sm" /> // 14px message · 16px title · 24px icon
289
+ <SectionMessage size="md" /> // 16px message · 18px title · 24px icon
288
290
  ```
289
291
 
290
- ## Alert variants
292
+ ## Alert & Banner — use SectionMessage / NotificationBanner
293
+
294
+ There is **no** `Alert` or `Banner` component in this package. The same patterns are covered
295
+ by existing primitives — reach for these instead:
296
+
297
+ | You may be looking for | Use this | Import |
298
+ |---|---|---|
299
+ | `Alert` (inline status message) | **`SectionMessage`** | `SectionMessage, SectionMessageIcon, SectionMessageTitle, SectionMessageDescription` |
300
+ | `Banner` (dismissible notice bar) | **`NotificationBanner`** | `NotificationBanner, NotificationItem, NotificationDivider` |
291
301
 
292
302
  ```tsx
293
- <Alert variant="info" /> // blue (#0777C4 / #53B9FF) informational (default)
294
- <Alert variant="error" /> // red (#C40000 / #FF4D4D) — error state
303
+ // Alert → SectionMessage (role="alert"; variants: default | information | success | warning | danger)
304
+ <SectionMessage variant="information">
305
+ <SectionMessageIcon><Icon name="circle-info" weight="fill" /></SectionMessageIcon>
306
+ <SectionMessageTitle>Heads up</SectionMessageTitle>
307
+ <SectionMessageDescription>Your session expires soon.</SectionMessageDescription>
308
+ </SectionMessage>
309
+
310
+ // Banner → NotificationBanner (dismissible via onClose)
311
+ <NotificationBanner
312
+ title="New feature available"
313
+ description="Check out the latest update."
314
+ onClose={() => setOpen(false)}
315
+ />
295
316
  ```
296
317
 
297
318
  ## Component behaviour notes
@@ -706,7 +727,7 @@ This project uses @deriv-ds/design-intelligence-layer (Quill Design System). Bef
706
727
  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
707
728
  5. Check if the component exists in the package — import it, don't re-implement
708
729
  6. Use only design token classes (bg-prominent, text-on-prominent, border-border-subtle, etc.) — no hardcoded hex or raw Tailwind palette colors
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
730
+ 7. Do not install lucide-react — icons come from @deriv/quill-icons via the bundled Icon component; do not install tailwindcss or other bundled dependencies separately
710
731
  8. If no token exists for a value, ask before using a hardcoded value
711
732
  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
712
733
 
@@ -732,7 +753,7 @@ See node_modules/@deriv-ds/design-intelligence-layer/README.md for complete toke
732
753
  | `bg-[var(--primary)]` | `bg-primary` | Raw CSS var — Tailwind v4 maps tokens directly |
733
754
  | `hsl(var(--primary))` | `bg-primary` | Tailwind v3 syntax — not needed in v4 |
734
755
  | `font-[Plus_Jakarta_Sans]` | `font-sans` (Inter) | Project font is Inter, not Plus Jakarta Sans |
735
- | `import ... from 'lucide-react'` | `import { Icon } from "@deriv-ds/design-intelligence-layer"` | Icons use FontAwesome Pro — lucide-react is not in this package |
756
+ | `import ... from 'lucide-react'` | `import { Icon } from "@deriv-ds/design-intelligence-layer"` | Icons come from @deriv/quill-icons — lucide-react is not in this package |
736
757
 
737
758
  ---
738
759
 
@@ -740,7 +761,7 @@ See node_modules/@deriv-ds/design-intelligence-layer/README.md for complete toke
740
761
 
741
762
  These are bundled with the package. Installing them separately can cause version conflicts:
742
763
 
743
- - `lucide-react` — **not used**; icons are FontAwesome Pro via the bundled `Icon` component
764
+ - `lucide-react` — **not used**; icons come from `@deriv/quill-icons` via the bundled `Icon` component
744
765
  - `radix-ui` — headless primitives
745
766
  - `class-variance-authority` — variant API
746
767
  - `cmdk` — command palette
@@ -808,3 +829,10 @@ Design tokens are managed in Figma and exported as CSS variables. To update:
808
829
  - **shadcn/ui** (New York style) — base component primitives
809
830
  - **Radix UI** — accessible headless primitives
810
831
  - **Figma** — source of truth for design tokens
832
+
833
+ ---
834
+
835
+ ## Changelog
836
+
837
+ See [CHANGELOG.md](./CHANGELOG.md) for the full version history. The file follows the
838
+ [Keep a Changelog](https://keepachangelog.com/) format and ships with the package.