@dodopayments/ui 1.7.1 → 1.7.2

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.
Files changed (80) hide show
  1. package/ai/component-registry.json +152 -9
  2. package/ai/component-registry.md +1 -1
  3. package/ai/components/avatar.md +3 -0
  4. package/ai/components/data-grid.md +1 -1
  5. package/ai/components/list-toolbar.md +3 -1
  6. package/ai/components/page-header.md +13 -11
  7. package/ai/components/payment-logos.md +5 -4
  8. package/ai/components/segmented-control.md +14 -1
  9. package/ai/components/sidebar.md +13 -2
  10. package/ai/components/spinner.md +2 -0
  11. package/ai/skills/dodo-design/SKILL.md +11 -6
  12. package/dist/components/app-top-bar/app-top-bar.d.ts.map +1 -1
  13. package/dist/components/app-top-bar/app-top-bar.js +12 -7
  14. package/dist/components/app-top-bar/app-top-bar.js.map +1 -1
  15. package/dist/components/avatar/avatar.d.ts +22 -1
  16. package/dist/components/avatar/avatar.d.ts.map +1 -1
  17. package/dist/components/avatar/avatar.js +13 -3
  18. package/dist/components/avatar/avatar.js.map +1 -1
  19. package/dist/components/data-grid/data-grid.d.ts +1 -1
  20. package/dist/components/data-grid/data-grid.js +2 -2
  21. package/dist/components/data-grid/data-grid.js.map +1 -1
  22. package/dist/components/list-toolbar/list-toolbar.d.ts +3 -1
  23. package/dist/components/list-toolbar/list-toolbar.d.ts.map +1 -1
  24. package/dist/components/list-toolbar/list-toolbar.js +13 -2
  25. package/dist/components/list-toolbar/list-toolbar.js.map +1 -1
  26. package/dist/components/page-header/page-header.d.ts +11 -7
  27. package/dist/components/page-header/page-header.d.ts.map +1 -1
  28. package/dist/components/page-header/page-header.js +34 -11
  29. package/dist/components/page-header/page-header.js.map +1 -1
  30. package/dist/components/payment-logos/payment-logos.d.ts +8 -3
  31. package/dist/components/payment-logos/payment-logos.d.ts.map +1 -1
  32. package/dist/components/payment-logos/payment-logos.js +5 -5
  33. package/dist/components/payment-logos/payment-logos.js.map +1 -1
  34. package/dist/components/radio-group/radio-group.d.ts +2 -2
  35. package/dist/components/radio-group/radio-group.js +5 -5
  36. package/dist/components/radio-group/radio-group.js.map +1 -1
  37. package/dist/components/segmented-control/index.d.ts +1 -1
  38. package/dist/components/segmented-control/index.d.ts.map +1 -1
  39. package/dist/components/segmented-control/index.js +1 -1
  40. package/dist/components/segmented-control/index.js.map +1 -1
  41. package/dist/components/segmented-control/segmented-control.d.ts +19 -0
  42. package/dist/components/segmented-control/segmented-control.d.ts.map +1 -1
  43. package/dist/components/segmented-control/segmented-control.js +28 -7
  44. package/dist/components/segmented-control/segmented-control.js.map +1 -1
  45. package/dist/components/select/select.d.ts.map +1 -1
  46. package/dist/components/select/select.js +8 -2
  47. package/dist/components/select/select.js.map +1 -1
  48. package/dist/components/sidebar/index.d.ts +1 -1
  49. package/dist/components/sidebar/index.d.ts.map +1 -1
  50. package/dist/components/sidebar/index.js +1 -1
  51. package/dist/components/sidebar/index.js.map +1 -1
  52. package/dist/components/sidebar/sidebar.d.ts +22 -3
  53. package/dist/components/sidebar/sidebar.d.ts.map +1 -1
  54. package/dist/components/sidebar/sidebar.js +28 -12
  55. package/dist/components/sidebar/sidebar.js.map +1 -1
  56. package/dist/components/spinner/spinner.d.ts +12 -1
  57. package/dist/components/spinner/spinner.d.ts.map +1 -1
  58. package/dist/components/spinner/spinner.js +2 -2
  59. package/dist/components/spinner/spinner.js.map +1 -1
  60. package/dist/lib/cn-tables.js +5 -5
  61. package/dist/lib/cn-tables.js.map +1 -1
  62. package/dist/primitives/lib/segmented-control.js +2 -2
  63. package/dist/primitives/lib/segmented-control.js.map +1 -1
  64. package/dist/primitives/ui/dialog.d.ts.map +1 -1
  65. package/dist/primitives/ui/dialog.js +4 -2
  66. package/dist/primitives/ui/dialog.js.map +1 -1
  67. package/dist/primitives/ui/sheet.js +4 -4
  68. package/dist/primitives/ui/sheet.js.map +1 -1
  69. package/dist/primitives/ui/sidebar.js +2 -2
  70. package/dist/primitives/ui/sidebar.js.map +1 -1
  71. package/dist/primitives/ui/switch.d.ts +2 -2
  72. package/dist/primitives/ui/switch.d.ts.map +1 -1
  73. package/dist/primitives/ui/switch.js +2 -2
  74. package/dist/primitives/ui/switch.js.map +1 -1
  75. package/dist/primitives/ui/table.js +4 -4
  76. package/dist/primitives/ui/table.js.map +1 -1
  77. package/dist/styles/theme.css +67 -0
  78. package/dist/styles/tokens.css +97 -67
  79. package/dist/styles/tokens.test.tsx +147 -0
  80. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://dodo-ui.dev/schema/component-registry.json",
3
3
  "name": "@dodopayments/ui",
4
- "version": "1.7.1",
4
+ "version": "1.7.2",
5
5
  "components": [
6
6
  {
7
7
  "slug": "alert",
@@ -662,6 +662,24 @@
662
662
  ],
663
663
  "default": "\"md\""
664
664
  },
665
+ {
666
+ "name": "variant",
667
+ "type": "\"person\" | \"logo\"",
668
+ "required": false,
669
+ "description": "",
670
+ "source": "dodo",
671
+ "values": [
672
+ {
673
+ "value": "person",
674
+ "description": "A person: a circle. The default."
675
+ },
676
+ {
677
+ "value": "logo",
678
+ "description": "A business or store logo: a square with 8px corners."
679
+ }
680
+ ],
681
+ "default": "\"person\""
682
+ },
665
683
  {
666
684
  "name": "render",
667
685
  "type": "ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, AvatarRootState>",
@@ -792,6 +810,24 @@
792
810
  }
793
811
  ],
794
812
  "default": "\"md\""
813
+ },
814
+ {
815
+ "name": "variant",
816
+ "type": "\"person\" | \"logo\"",
817
+ "required": false,
818
+ "description": "",
819
+ "source": "dodo",
820
+ "values": [
821
+ {
822
+ "value": "person",
823
+ "description": "A person: a circle. The default."
824
+ },
825
+ {
826
+ "value": "logo",
827
+ "description": "A business or store logo: a square with 8px corners."
828
+ }
829
+ ],
830
+ "default": "\"person\""
795
831
  }
796
832
  ]
797
833
  },
@@ -912,6 +948,24 @@
912
948
  }
913
949
  ],
914
950
  "default": "\"md\""
951
+ },
952
+ {
953
+ "name": "variant",
954
+ "type": "\"person\" | \"logo\"",
955
+ "required": false,
956
+ "description": "",
957
+ "source": "dodo",
958
+ "values": [
959
+ {
960
+ "value": "person",
961
+ "description": "A person: a circle. The default."
962
+ },
963
+ {
964
+ "value": "logo",
965
+ "description": "A business or store logo: a square with 8px corners."
966
+ }
967
+ ],
968
+ "default": "\"person\""
915
969
  }
916
970
  ]
917
971
  }
@@ -10674,7 +10728,7 @@
10674
10728
  },
10675
10729
  {
10676
10730
  "name": "DataGridColumnHeader",
10677
- "description": "Column header label (.Table header cell): Labels/Secondary in Content/Secondary, with 12px icons 4\napart. For sortable columns it is a button that cycles ascending → descending → unsorted and shows an\narrow for the current direction (a neutral caret when unsorted). The arrow fades in and turns on a\nspring when the direction changes. It is disabled while the grid is loading. Non-sortable columns\nrender plain text. `help` adds an info icon with a tooltip.",
10731
+ "description": "Column header label (.Table header cell): Labels/Secondary in Content/Primary, with 12px icons 4\napart. For sortable columns it is a button that cycles ascending → descending → unsorted and shows an\narrow for the current direction (a neutral caret when unsorted). The arrow fades in and turns on a\nspring when the direction changes. It is disabled while the grid is loading. Non-sortable columns\nrender plain text. `help` adds an info icon with a tooltip.",
10678
10732
  "props": [
10679
10733
  {
10680
10734
  "name": "column",
@@ -20078,6 +20132,8 @@
20078
20132
  "exports": [
20079
20133
  "Sidebar",
20080
20134
  "SidebarBanner",
20135
+ "SidebarBusinessList",
20136
+ "SidebarBusinessListProps",
20081
20137
  "SidebarBusinessSwitcher",
20082
20138
  "SidebarBusinessSwitcherProps",
20083
20139
  "SidebarContent",
@@ -20131,9 +20187,22 @@
20131
20187
  "description": "Full-width strips above the whole app shell (a `TestModeBanner`, an impersonation or action strip). Place it first\ninside `SidebarProvider`. From 1024px it is fixed to the top of the window and the docked sidebar and the inset\nstart below it (its height is `--sidebar-top` on the provider, for a page that sizes itself to the window); below\nthat it sits at the top of the page, above the inset. With nothing in it, it takes no space.",
20132
20188
  "props": []
20133
20189
  },
20190
+ {
20191
+ "name": "SidebarBusinessList",
20192
+ "description": "The other businesses in the business Menu, as old-main: the label, then the rows (40 tall, 8 apart) in a list that\nscrolls past 212 tall with faded edges, so \"Add new business\", Settings and Sign out under it stay in view.",
20193
+ "props": [
20194
+ {
20195
+ "name": "label",
20196
+ "type": "ReactNode",
20197
+ "required": true,
20198
+ "description": "The group's label, e.g. \"Other businesses\". It stays put while the rows scroll.",
20199
+ "source": "dodo"
20200
+ }
20201
+ ]
20202
+ },
20134
20203
  {
20135
20204
  "name": "SidebarBusinessSwitcher",
20136
- "description": "The business switcher at the top of the sidebar (Figma `.Business switcher`): a 44px white row with a 24px\navatar, the name (truncates), an optional `badge` and an up-down chevron; the same 24px avatar alone on the icon rail. Opens the business Menu\n(`children`) 8px below. Put it in `SidebarHeader`.",
20205
+ "description": "The business switcher at the top of the sidebar (Figma `.Business switcher`): a 44px white row with a 24px\navatar, the name (truncates), an optional `badge` and an up-down chevron; the same 24px avatar alone on the icon rail. Opens the business Menu\n8px below: the current business (logo and name) on top, then `children`. Put it in `SidebarHeader`.",
20137
20206
  "props": [
20138
20207
  {
20139
20208
  "name": "name",
@@ -20149,6 +20218,13 @@
20149
20218
  "description": "After the name, e.g. the member's role as a neutral `Badge`. Hidden on the icon rail.",
20150
20219
  "source": "dodo"
20151
20220
  },
20221
+ {
20222
+ "name": "footer",
20223
+ "type": "ReactNode",
20224
+ "required": false,
20225
+ "description": "Items on the grey strip under the white panel, such as Settings and Sign out.",
20226
+ "source": "dodo"
20227
+ },
20152
20228
  {
20153
20229
  "name": "logoUrl",
20154
20230
  "type": "string",
@@ -20449,6 +20525,13 @@
20449
20525
  "description": "The mode on the first render (uncontrolled).",
20450
20526
  "source": "dodo"
20451
20527
  },
20528
+ {
20529
+ "name": "labels",
20530
+ "type": "{ test?: string | undefined; live?: string | undefined; }",
20531
+ "required": false,
20532
+ "description": "The two halves' text, e.g. \"Test mode\" and \"Live mode\". The badge on the icon rail keeps the short words.",
20533
+ "source": "dodo"
20534
+ },
20452
20535
  {
20453
20536
  "name": "mode",
20454
20537
  "type": "\"test\" | \"live\"",
@@ -21306,6 +21389,22 @@
21306
21389
  "default": "\"Loading...\"",
21307
21390
  "description": "Accessible label announced by screen readers.",
21308
21391
  "source": "dodo"
21392
+ },
21393
+ {
21394
+ "name": "size",
21395
+ "type": "\"md\" | \"lg\"",
21396
+ "required": false,
21397
+ "default": "\"md\"",
21398
+ "description": "`md` 20 × 20, in a panel or a status line; `lg` 48 × 48, alone in the middle of a page that is still loading.",
21399
+ "source": "dodo"
21400
+ },
21401
+ {
21402
+ "name": "tone",
21403
+ "type": "\"info\" | \"brand\"",
21404
+ "required": false,
21405
+ "default": "\"brand\"",
21406
+ "description": "The arc's colour: `brand` (Content/Brand-primary) or `info` (Surface/Accent-primary blue, the dashboard's\nfull-page loader).",
21407
+ "source": "dodo"
21309
21408
  }
21310
21409
  ]
21311
21410
  }
@@ -21632,6 +21731,8 @@
21632
21731
  "SegmentedControlGroupProps",
21633
21732
  "SegmentedControlItem",
21634
21733
  "SegmentedControlItemProps",
21734
+ "SegmentedControlMenu",
21735
+ "SegmentedControlMenuProps",
21635
21736
  "SegmentedControlOption",
21636
21737
  "SegmentedControlProps",
21637
21738
  "SegmentedControlSize",
@@ -21924,6 +22025,40 @@
21924
22025
  "source": "base-ui"
21925
22026
  }
21926
22027
  ]
22028
+ },
22029
+ {
22030
+ "name": "SegmentedControlMenu",
22031
+ "description": "A segment that opens a menu of further options, for a single-select `segmented` control with more values than\nfit: \"More\" with a 12px caret, 28 tall and padded as the other segments. Picking an option makes it the control's\nvalue; the segment then shows that option, raised under the thumb, and still opens the menu.",
22032
+ "props": [
22033
+ {
22034
+ "name": "items",
22035
+ "type": "readonly { value: string; label: ReactNode; }[]",
22036
+ "required": true,
22037
+ "description": "The options it holds, as `SegmentedControl` values.",
22038
+ "source": "dodo"
22039
+ },
22040
+ {
22041
+ "name": "label",
22042
+ "type": "ReactNode",
22043
+ "required": true,
22044
+ "description": "What the segment says while none of its options is active, e.g. \"More\".",
22045
+ "source": "dodo"
22046
+ },
22047
+ {
22048
+ "name": "aria-label",
22049
+ "type": "string",
22050
+ "required": false,
22051
+ "description": "Accessible name of the segment, e.g. \"More statuses\".",
22052
+ "source": "dodo"
22053
+ },
22054
+ {
22055
+ "name": "className",
22056
+ "type": "string",
22057
+ "required": false,
22058
+ "description": "Additional Tailwind classes, merged last.",
22059
+ "source": "dodo"
22060
+ }
22061
+ ]
21927
22062
  }
21928
22063
  ],
21929
22064
  "examples": [
@@ -24354,7 +24489,7 @@
24354
24489
  },
24355
24490
  {
24356
24491
  "name": "ListToolbarFilters",
24357
- "description": "Filters (Figma: Button secondary lg with the filter icon) opening a `Popover` sm, 8 below and right-aligned: the\n\"Filter by\" header, your filters in the panel, and Clear / Filter on the strip when `onClear` / `onApply` are set.\nOn mobile it holds every filter and the date range. `count` shows how many filters are applied.",
24492
+ "description": "Filters (Figma: Button secondary lg with the filter icon) opening a `Popover` sm, 8 below and right-aligned: the\n\"Filter by\" header, your filters in the panel, and Clear / Filter on the strip when `onClear` / `onApply` are set.\nSeveral filters (more than one child) sit two to a row, 12 apart, in a 464 wide popover, as Figma's Filter\npopover; one filter keeps the 220 popover. On mobile it holds every filter and the date range. `count` shows how\nmany filters are applied.",
24358
24493
  "props": [
24359
24494
  {
24360
24495
  "name": "className",
@@ -27535,7 +27670,7 @@
27535
27670
  "title": "Page header",
27536
27671
  "category": "Navigation",
27537
27672
  "status": "stable",
27538
- "description": "The title row at the top of every dashboard page (Dodo Nest Page header). `size=\"sm\"` shrinks the title and\nraises the description for list and settings pages. Navigation is none (top-level pages),\n`back` (one level up: a secondary 36px icon button before the title) or `breadcrumb` (two or more levels, above\nthe title). The title is Heading/Secondary with an optional `help` question icon and a `meta` slot for a status\nBadge or Copyable ID; `actions` holds up to two large Buttons on the right; the `description` sits under the title,\nindented past the back button. Rows are 4 apart. Below 576px (or with `breakpoint=\"mobile\"`) the back button stays\nbeside the title and the actions move 8 below the description. No fill: put it first on the\nmain panel, 24 above the first section.",
27673
+ "description": "The title row at the top of every dashboard page (Dodo Nest Page header). `size=\"sm\"` shrinks the title and\nraises the description for list and settings pages. Navigation is none (top-level pages),\n`back` (one level up: a secondary 36px icon button before the title) or `breadcrumb` (two or more levels, above\nthe title). The title is Heading/Primary (Heading/Secondary on the mobile layout) with an optional `help`\nquestion icon and a `meta` slot for a status Badge or Copyable ID; `actions` holds up to two large Buttons on the\nright; the `description` sits under the title, indented past the back button. Rows are 4 apart. Below 576px (or\nwith `breakpoint=\"mobile\"`) the back button stays beside the title and the actions move 8 below the description.\nNo fill: put it first on the main panel, 40 under the App top bar on desktop (24 on mobile) and 24 above the\nfirst section.",
27539
27674
  "importPath": "@dodopayments/ui/page-header",
27540
27675
  "exports": [
27541
27676
  "PageHeader",
@@ -27544,13 +27679,13 @@
27544
27679
  "parts": [
27545
27680
  {
27546
27681
  "name": "PageHeader",
27547
- "description": "The title row at the top of every dashboard page (Dodo Nest Page header). `size=\"sm\"` shrinks the title and\nraises the description for list and settings pages. Navigation is none (top-level pages),\n`back` (one level up: a secondary 36px icon button before the title) or `breadcrumb` (two or more levels, above\nthe title). The title is Heading/Secondary with an optional `help` question icon and a `meta` slot for a status\nBadge or Copyable ID; `actions` holds up to two large Buttons on the right; the `description` sits under the title,\nindented past the back button. Rows are 4 apart. Below 576px (or with `breakpoint=\"mobile\"`) the back button stays\nbeside the title and the actions move 8 below the description. No fill: put it first on the\nmain panel, 24 above the first section.",
27682
+ "description": "The title row at the top of every dashboard page (Dodo Nest Page header). `size=\"sm\"` shrinks the title and\nraises the description for list and settings pages. Navigation is none (top-level pages),\n`back` (one level up: a secondary 36px icon button before the title) or `breadcrumb` (two or more levels, above\nthe title). The title is Heading/Primary (Heading/Secondary on the mobile layout) with an optional `help`\nquestion icon and a `meta` slot for a status Badge or Copyable ID; `actions` holds up to two large Buttons on the\nright; the `description` sits under the title, indented past the back button. Rows are 4 apart. Below 576px (or\nwith `breakpoint=\"mobile\"`) the back button stays beside the title and the actions move 8 below the description.\nNo fill: put it first on the main panel, 40 under the App top bar on desktop (24 on mobile) and 24 above the\nfirst section.",
27548
27683
  "props": [
27549
27684
  {
27550
27685
  "name": "title",
27551
27686
  "type": "ReactNode",
27552
27687
  "required": true,
27553
- "description": "Page title (Heading/Secondary), e.g. \"Transaction details\". Long titles and IDs wrap.",
27688
+ "description": "Page title, e.g. \"Transaction details\": Heading/Primary on the desktop row, Heading/Secondary on the mobile\nlayout (`size=\"sm\"`: Heading/Tertiary). Long titles and IDs wrap.",
27554
27689
  "source": "dodo"
27555
27690
  },
27556
27691
  {
@@ -31030,7 +31165,7 @@
31030
31165
  "title": "Payment logos & flags",
31031
31166
  "category": "Brand",
31032
31167
  "status": "stable",
31033
- "description": "The official logo of a card network, wallet, bank method, BNPL or crypto, 32 × 22 everywhere (tables, detail\npages, settings): the artwork itself with 4px corners and a hairline edge, so every corner reads the same on any\nbackground. Never recoloured; the same in dark mode. `unknown` is a neutral tile with a credit card icon. Named\nafter the brand unless `decorative`. Each logo loads on first use; until then its box holds the space.",
31168
+ "description": "The official logo of a card network, wallet, bank method, BNPL or crypto, 33 × 22 (detail pages, settings) or\n30 × 20 with `size=\"sm\"` (table rows), always 3:2 so the artwork is never cropped: the artwork itself with 4px corners and a hairline edge, so every corner reads the same on any\nbackground. Never recoloured; the same in dark mode. `unknown` is a neutral tile with a credit card icon. Named\nafter the brand unless `decorative`. Each logo loads on first use; until then its box holds the space.",
31034
31169
  "importPath": "@dodopayments/ui/payment-logos",
31035
31170
  "exports": [
31036
31171
  "FLAG_COUNTRIES",
@@ -31050,7 +31185,7 @@
31050
31185
  "parts": [
31051
31186
  {
31052
31187
  "name": "PaymentLogo",
31053
- "description": "The official logo of a card network, wallet, bank method, BNPL or crypto, 32 × 22 everywhere (tables, detail\npages, settings): the artwork itself with 4px corners and a hairline edge, so every corner reads the same on any\nbackground. Never recoloured; the same in dark mode. `unknown` is a neutral tile with a credit card icon. Named\nafter the brand unless `decorative`. Each logo loads on first use; until then its box holds the space.",
31188
+ "description": "The official logo of a card network, wallet, bank method, BNPL or crypto, 33 × 22 (detail pages, settings) or\n30 × 20 with `size=\"sm\"` (table rows), always 3:2 so the artwork is never cropped: the artwork itself with 4px corners and a hairline edge, so every corner reads the same on any\nbackground. Never recoloured; the same in dark mode. `unknown` is a neutral tile with a credit card icon. Named\nafter the brand unless `decorative`. Each logo loads on first use; until then its box holds the space.",
31054
31189
  "props": [
31055
31190
  {
31056
31191
  "name": "brand",
@@ -31065,6 +31200,14 @@
31065
31200
  "required": false,
31066
31201
  "description": "Hide from assistive technology when the text next to it already names the method.",
31067
31202
  "source": "dodo"
31203
+ },
31204
+ {
31205
+ "name": "size",
31206
+ "type": "\"sm\" | \"md\"",
31207
+ "required": false,
31208
+ "default": "\"md\"",
31209
+ "description": "`md` 33 × 22 (detail pages, settings); `sm` 30 × 20, for table rows. Both 3:2, the artwork's own ratio.",
31210
+ "source": "dodo"
31068
31211
  }
31069
31212
  ]
31070
31213
  },
@@ -118,7 +118,7 @@
118
118
  - **Product Card** (`@dodopayments/ui/product-card`, Blocks): Storefront product card, ported from the Dodo store front: a square blur-up photo (or
119
119
  - **Record Header** (`@dodopayments/ui/record-header`, Blocks): Hero of a record's detail page (a payment, customer or subscription), not the page title: a
120
120
  - **Brand logos** (`@dodopayments/ui/brand-logos`, Brand): A brand's mark at 16px (size it with `size-*`), e.g. the provider type of a workload identity provider. Black or
121
- - **Payment logos & flags** (`@dodopayments/ui/payment-logos`, Brand): The official logo of a card network, wallet, bank method, BNPL or crypto, 32 × 22 everywhere (tables, detail
121
+ - **Payment logos & flags** (`@dodopayments/ui/payment-logos`, Brand): The official logo of a card network, wallet, bank method, BNPL or crypto, 33 × 22 (detail pages, settings) or
122
122
  - **Card Field** (`@dodopayments/ui/card-field`, Forms): PCI-sensitive card form composing Input/InputGroup and Field errors. Use only when your integration permits raw card inputs, not as a substitute for PSP-hosted fields.
123
123
  - **Wallet Buttons** (`@dodopayments/ui/wallet-buttons`, Forms): Express checkout buttons for Apple Pay, Google Pay and Amazon Pay in the brands' black (white in dark mode) style,
124
124
  - **Checkout Page** (`@dodopayments/ui/checkout-page`, Blocks): Two-column hosted checkout layout, after the Dodo checkout: the merchant brand and order summary on
@@ -16,6 +16,7 @@ A round profile picture with an initials fallback, built on the `Avatar` primiti
16
16
  | --- | --- | --- | --- |
17
17
  | `className` | `string` | - | Additional Tailwind classes, merged last. |
18
18
  | `size` | `"sm" \| "md" \| "xl" \| "2xl"` | `"md"` | `sm`: 24px, previews and inline mentions.<br>`md`: 32px, lists, tables, onboarding and the top bar. The default.<br>`xl`: 56px, the store logo on a Storefront header (mobile).<br>`2xl`: 72px, the store logo on a Storefront header from `md`. |
19
+ | `variant` | `"person" \| "logo"` | `"person"` | `person`: A person: a circle. The default.<br>`logo`: A business or store logo: a square with 8px corners. |
19
20
 
20
21
  Also accepts Base UI props: `render`.
21
22
 
@@ -44,6 +45,7 @@ avatars that do not set their own; `max` collapses the rest into a "+N" count.
44
45
  | `formatOverflowLabel` | `((hiddenCount: number) => string)` | `(count) => `${count} more`` | Screen-reader text for the "+N" count. |
45
46
  | `max` | `number` | - | Show at most this many avatars, followed by a "+N" count of the rest. Avatars inside fragments count one by one. |
46
47
  | `size` | `"sm" \| "md" \| "xl" \| "2xl"` | `"md"` | `sm`: 24px, previews and inline mentions.<br>`md`: 32px, lists, tables, onboarding and the top bar. The default.<br>`xl`: 56px, the store logo on a Storefront header (mobile).<br>`2xl`: 72px, the store logo on a Storefront header from `md`. |
48
+ | `variant` | `"person" \| "logo"` | `"person"` | `person`: A person: a circle. The default.<br>`logo`: A business or store logo: a square with 8px corners. |
47
49
 
48
50
  ## AvatarImage
49
51
 
@@ -75,6 +77,7 @@ a polite announcement after changes. Under reduced motion, the stack changes ins
75
77
  | `max` | `number` | `5` | Show at most this many avatars, followed by a "+N" count of the rest. |
76
78
  | `onOverflowClick` | `((hidden: AvatarPresencePerson[]) => void)` | - | Makes the "+N" count a button. Called with the people it hides, e.g. to open a popover list. |
77
79
  | `size` | `"sm" \| "md" \| "xl" \| "2xl"` | `"md"` | `sm`: 24px, previews and inline mentions.<br>`md`: 32px, lists, tables, onboarding and the top bar. The default.<br>`xl`: 56px, the store logo on a Storefront header (mobile).<br>`2xl`: 72px, the store logo on a Storefront header from `md`. |
80
+ | `variant` | `"person" \| "logo"` | `"person"` | `person`: A person: a circle. The default.<br>`logo`: A business or store logo: a square with 8px corners. |
78
81
 
79
82
  ## Examples
80
83
 
@@ -54,7 +54,7 @@ the selected rows.
54
54
 
55
55
  ## DataGridColumnHeader
56
56
 
57
- Column header label (.Table header cell): Labels/Secondary in Content/Secondary, with 12px icons 4
57
+ Column header label (.Table header cell): Labels/Secondary in Content/Primary, with 12px icons 4
58
58
  apart. For sortable columns it is a button that cycles ascending → descending → unsorted and shows an
59
59
  arrow for the current direction (a neutral caret when unsorted). The arrow fades in and turns on a
60
60
  spring when the direction changes. It is disabled while the grid is loading. Non-sortable columns
@@ -40,7 +40,9 @@ only its icon; the label still names it.
40
40
 
41
41
  Filters (Figma: Button secondary lg with the filter icon) opening a `Popover` sm, 8 below and right-aligned: the
42
42
  "Filter by" header, your filters in the panel, and Clear / Filter on the strip when `onClear` / `onApply` are set.
43
- On mobile it holds every filter and the date range. `count` shows how many filters are applied.
43
+ Several filters (more than one child) sit two to a row, 12 apart, in a 464 wide popover, as Figma's Filter
44
+ popover; one filter keeps the 220 popover. On mobile it holds every filter and the date range. `count` shows how
45
+ many filters are applied.
44
46
 
45
47
  | Prop | Type | Default | Description |
46
48
  | --- | --- | --- | --- |
@@ -3,11 +3,12 @@
3
3
  The title row at the top of every dashboard page (Dodo Nest Page header). `size="sm"` shrinks the title and
4
4
  raises the description for list and settings pages. Navigation is none (top-level pages),
5
5
  `back` (one level up: a secondary 36px icon button before the title) or `breadcrumb` (two or more levels, above
6
- the title). The title is Heading/Secondary with an optional `help` question icon and a `meta` slot for a status
7
- Badge or Copyable ID; `actions` holds up to two large Buttons on the right; the `description` sits under the title,
8
- indented past the back button. Rows are 4 apart. Below 576px (or with `breakpoint="mobile"`) the back button stays
9
- beside the title and the actions move 8 below the description. No fill: put it first on the
10
- main panel, 24 above the first section.
6
+ the title). The title is Heading/Primary (Heading/Secondary on the mobile layout) with an optional `help`
7
+ question icon and a `meta` slot for a status Badge or Copyable ID; `actions` holds up to two large Buttons on the
8
+ right; the `description` sits under the title, indented past the back button. Rows are 4 apart. Below 576px (or
9
+ with `breakpoint="mobile"`) the back button stays beside the title and the actions move 8 below the description.
10
+ No fill: put it first on the main panel, 40 under the App top bar on desktop (24 on mobile) and 24 above the
11
+ first section.
11
12
 
12
13
  ```tsx
13
14
  import { PageHeader } from "@dodopayments/ui/page-header";
@@ -18,15 +19,16 @@ import { PageHeader } from "@dodopayments/ui/page-header";
18
19
  The title row at the top of every dashboard page (Dodo Nest Page header). `size="sm"` shrinks the title and
19
20
  raises the description for list and settings pages. Navigation is none (top-level pages),
20
21
  `back` (one level up: a secondary 36px icon button before the title) or `breadcrumb` (two or more levels, above
21
- the title). The title is Heading/Secondary with an optional `help` question icon and a `meta` slot for a status
22
- Badge or Copyable ID; `actions` holds up to two large Buttons on the right; the `description` sits under the title,
23
- indented past the back button. Rows are 4 apart. Below 576px (or with `breakpoint="mobile"`) the back button stays
24
- beside the title and the actions move 8 below the description. No fill: put it first on the
25
- main panel, 24 above the first section.
22
+ the title). The title is Heading/Primary (Heading/Secondary on the mobile layout) with an optional `help`
23
+ question icon and a `meta` slot for a status Badge or Copyable ID; `actions` holds up to two large Buttons on the
24
+ right; the `description` sits under the title, indented past the back button. Rows are 4 apart. Below 576px (or
25
+ with `breakpoint="mobile"`) the back button stays beside the title and the actions move 8 below the description.
26
+ No fill: put it first on the main panel, 40 under the App top bar on desktop (24 on mobile) and 24 above the
27
+ first section.
26
28
 
27
29
  | Prop | Type | Default | Description |
28
30
  | --- | --- | --- | --- |
29
- | `title` (required) | `ReactNode` | - | Page title (Heading/Secondary), e.g. "Transaction details". Long titles and IDs wrap. |
31
+ | `title` (required) | `ReactNode` | - | Page title, e.g. "Transaction details": Heading/Primary on the desktop row, Heading/Secondary on the mobile layout (`size="sm"`: Heading/Tertiary). Long titles and IDs wrap. |
30
32
  | `actions` | `ReactNode` | - | Up to two `Button size="lg"` on the right, one primary at most: a secondary action, then the primary. On the mobile layout they move under the description. |
31
33
  | `back` | `PageHeaderBack` | - | |
32
34
  | `breadcrumb` | `readonly PageHeaderCrumb[]` | - | |
@@ -1,7 +1,7 @@
1
1
  # Payment logos & flags
2
2
 
3
- The official logo of a card network, wallet, bank method, BNPL or crypto, 32 × 22 everywhere (tables, detail
4
- pages, settings): the artwork itself with 4px corners and a hairline edge, so every corner reads the same on any
3
+ The official logo of a card network, wallet, bank method, BNPL or crypto, 33 × 22 (detail pages, settings) or
4
+ 30 × 20 with `size="sm"` (table rows), always 3:2 so the artwork is never cropped: the artwork itself with 4px corners and a hairline edge, so every corner reads the same on any
5
5
  background. Never recoloured; the same in dark mode. `unknown` is a neutral tile with a credit card icon. Named
6
6
  after the brand unless `decorative`. Each logo loads on first use; until then its box holds the space.
7
7
 
@@ -11,8 +11,8 @@ import { PaymentLogo, Flag, WalletLogo } from "@dodopayments/ui/payment-logos";
11
11
 
12
12
  ## PaymentLogo
13
13
 
14
- The official logo of a card network, wallet, bank method, BNPL or crypto, 32 × 22 everywhere (tables, detail
15
- pages, settings): the artwork itself with 4px corners and a hairline edge, so every corner reads the same on any
14
+ The official logo of a card network, wallet, bank method, BNPL or crypto, 33 × 22 (detail pages, settings) or
15
+ 30 × 20 with `size="sm"` (table rows), always 3:2 so the artwork is never cropped: the artwork itself with 4px corners and a hairline edge, so every corner reads the same on any
16
16
  background. Never recoloured; the same in dark mode. `unknown` is a neutral tile with a credit card icon. Named
17
17
  after the brand unless `decorative`. Each logo loads on first use; until then its box holds the space.
18
18
 
@@ -20,6 +20,7 @@ after the brand unless `decorative`. Each logo loads on first use; until then it
20
20
  | --- | --- | --- | --- |
21
21
  | `brand` (required) | `"link" \| "card" \| "visa" \| "mastercard" \| "amex" \| "discover" \| "diners" \| "jcb" \| "unionpay" \| "maestro" \| "rupay" \| "cartes-bancaires" \| "apple-pay" \| "gpay" \| "amazon-pay" \| "cash-app" \| "paypal" \| "revolut-pay" \| "satispay" \| "wechat-pay" \| "alipay-hk" \| "kakao-pay" \| "naver-pay" \| "payco" \| "gcash" \| "touch-n-go" \| "twint" \| "bizum" \| "upi" \| "ideal" \| "bancontact" \| "eps" \| "multibanco" \| "pix" \| "blik" \| "przelewy24" \| "fps" \| "ach" \| "sepa" \| "bacs" \| "klarna" \| "afterpay" \| "affirm" \| "zip" \| "billie" \| "stablecoins" \| "unknown"` | - | The payment method. `unknown` draws a credit card icon for methods without artwork. |
22
22
  | `decorative` | `boolean` | - | Hide from assistive technology when the text next to it already names the method. |
23
+ | `size` | `"sm" \| "md"` | `"md"` | `md` 33 × 22 (detail pages, settings); `sm` 30 × 20, for table rows. Both 3:2, the artwork's own ratio. |
23
24
 
24
25
  ## Flag
25
26
 
@@ -9,7 +9,7 @@ toggle buttons (`aria-pressed`); give it an `aria-label`. Don't use it for page
9
9
  more than 3–4 options (use a `Select`).
10
10
 
11
11
  ```tsx
12
- import { SegmentedControl, SegmentedControlGroup, SegmentedControlItem } from "@dodopayments/ui/segmented-control";
12
+ import { SegmentedControl, SegmentedControlGroup, SegmentedControlItem, SegmentedControlMenu } from "@dodopayments/ui/segmented-control";
13
13
  ```
14
14
 
15
15
  ## SegmentedControl
@@ -67,6 +67,19 @@ or active. An icon-only segment is square and needs an `aria-label`. `disabled`
67
67
 
68
68
  Also accepts Base UI props: `defaultPressed`, `disabled`, `nativeButton`, `onPressedChange`, `pressed`, `render`.
69
69
 
70
+ ## SegmentedControlMenu
71
+
72
+ A segment that opens a menu of further options, for a single-select `segmented` control with more values than
73
+ fit: "More" with a 12px caret, 28 tall and padded as the other segments. Picking an option makes it the control's
74
+ value; the segment then shows that option, raised under the thumb, and still opens the menu.
75
+
76
+ | Prop | Type | Default | Description |
77
+ | --- | --- | --- | --- |
78
+ | `items` (required) | `readonly { value: string; label: ReactNode; }[]` | - | The options it holds, as `SegmentedControl` values. |
79
+ | `label` (required) | `ReactNode` | - | What the segment says while none of its options is active, e.g. "More". |
80
+ | `aria-label` | `string` | - | Accessible name of the segment, e.g. "More statuses". |
81
+ | `className` | `string` | - | Additional Tailwind classes, merged last. |
82
+
70
83
  ## Examples
71
84
 
72
85
  ### segmented-control/disabled
@@ -6,7 +6,7 @@ as a 256px drawer. Compose it from `SidebarHeader` (a `SidebarBusinessSwitcher`)
6
6
  menus) and `SidebarFooter` (Developer, Settings and a `SidebarModeSwitch`), inside a `SidebarProvider`.
7
7
 
8
8
  ```tsx
9
- import { Sidebar, SidebarBanner, SidebarBusinessSwitcher, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuCollapsible, SidebarMenuCollapsibleContent, SidebarMenuCollapsibleTrigger, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarModeSwitch, SidebarProvider, SidebarRail, SidebarTrigger, useSidebar } from "@dodopayments/ui/sidebar";
9
+ import { Sidebar, SidebarBanner, SidebarBusinessList, SidebarBusinessSwitcher, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuCollapsible, SidebarMenuCollapsibleContent, SidebarMenuCollapsibleTrigger, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarModeSwitch, SidebarProvider, SidebarRail, SidebarTrigger, useSidebar } from "@dodopayments/ui/sidebar";
10
10
  ```
11
11
 
12
12
  ## Sidebar
@@ -27,16 +27,26 @@ inside `SidebarProvider`. From 1024px it is fixed to the top of the window and t
27
27
  start below it (its height is `--sidebar-top` on the provider, for a page that sizes itself to the window); below
28
28
  that it sits at the top of the page, above the inset. With nothing in it, it takes no space.
29
29
 
30
+ ## SidebarBusinessList
31
+
32
+ The other businesses in the business Menu, as old-main: the label, then the rows (40 tall, 8 apart) in a list that
33
+ scrolls past 212 tall with faded edges, so "Add new business", Settings and Sign out under it stay in view.
34
+
35
+ | Prop | Type | Default | Description |
36
+ | --- | --- | --- | --- |
37
+ | `label` (required) | `ReactNode` | - | The group's label, e.g. "Other businesses". It stays put while the rows scroll. |
38
+
30
39
  ## SidebarBusinessSwitcher
31
40
 
32
41
  The business switcher at the top of the sidebar (Figma `.Business switcher`): a 44px white row with a 24px
33
42
  avatar, the name (truncates), an optional `badge` and an up-down chevron; the same 24px avatar alone on the icon rail. Opens the business Menu
34
- (`children`) 8px below. Put it in `SidebarHeader`.
43
+ 8px below: the current business (logo and name) on top, then `children`. Put it in `SidebarHeader`.
35
44
 
36
45
  | Prop | Type | Default | Description |
37
46
  | --- | --- | --- | --- |
38
47
  | `name` (required) | `string` | - | Name of the current business. Its initials fill the avatar when there is no `logoUrl`. |
39
48
  | `badge` | `ReactNode` | - | After the name, e.g. the member's role as a neutral `Badge`. Hidden on the icon rail. |
49
+ | `footer` | `ReactNode` | - | Items on the grey strip under the white panel, such as Settings and Sign out. |
40
50
  | `logoUrl` | `string` | - | Logo of the current business. |
41
51
  | `menuClassName` | `string` | `240 wide` | Extra classes for the menu. |
42
52
  | `menuContentProps` | `Omit<MenuContentProps, "className" \| "children">` | - | Props for the `MenuContent`, e.g. `finalFocus`. |
@@ -166,6 +176,7 @@ icon rail it is a warning "Test" / success "Live" `Badge` that switches the mode
166
176
  | --- | --- | --- | --- |
167
177
  | `className` | `string` | - | Additional Tailwind classes, merged last. |
168
178
  | `defaultMode` | `"test" \| "live"` | `"test"` | The mode on the first render (uncontrolled). |
179
+ | `labels` | `{ test?: string \| undefined; live?: string \| undefined; }` | - | The two halves' text, e.g. "Test mode" and "Live mode". The badge on the icon rail keeps the short words. |
169
180
  | `mode` | `"test" \| "live"` | - | The current mode (controlled). |
170
181
  | `onModeChange` | `((mode: "test" \| "live") => void)` | - | Called with the mode the user picked. |
171
182
 
@@ -21,6 +21,8 @@ so the label is real text that screen readers announce in every browser.
21
21
  | Prop | Type | Default | Description |
22
22
  | --- | --- | --- | --- |
23
23
  | `label` | `string` | `"Loading..."` | Accessible label announced by screen readers. |
24
+ | `size` | `"md" \| "lg"` | `"md"` | `md` 20 × 20, in a panel or a status line; `lg` 48 × 48, alone in the middle of a page that is still loading. |
25
+ | `tone` | `"info" \| "brand"` | `"brand"` | The arc's colour: `brand` (Content/Brand-primary) or `info` (Surface/Accent-primary blue, the dashboard's full-page loader). |
24
26
 
25
27
  ## Examples
26
28
 
@@ -81,9 +81,9 @@ another component library.
81
81
  | Picking how many of something (seats, add-ons) next to a price | `QuantityStepper` (`value`, `min` (default 0), `max`, `onValueChange`; whole numbers, 0 shows 0 with − disabled); `size="lg"` (36) in a row with a lg Button, such as Buy now | A single + button that expands into a stepper, or `Input type="number"` |
82
82
  | A currency conversion (settlement amount, rate, rate lock) | `FxConversion` | Two amounts and a hand-written "1 USD = ..." line |
83
83
  | A record's fields grouped in sections (payment, customer, billing) | `DetailsPanel` | A two-column Data table |
84
- | The title row at the top of every page (title, back or breadcrumb, status, up to two buttons) | `PageHeader` with `title`, `description`, `back` (one level up) or `breadcrumb` (2+ levels), `meta` (Badge, Copyable ID), `help` and `actions` (two `Button size="lg"`, one primary at most) | A text back link (‹ Products) above the title, or a Page header for an in-page section heading (use a `Card` header) |
84
+ | The title row at the top of every page (title, back or breadcrumb, status, up to two buttons) | `PageHeader` with `title`, `description`, `back` (one level up) or `breadcrumb` (2+ levels), `meta` (Badge, Copyable ID), `help` and `actions` (two `Button size="lg"`, one primary at most). It starts the content area, 40 under the `AppTopBar` on desktop (`pt-6 sm:pt-10`), 24 on mobile | A text back link (‹ Products) above the title, or a Page header for an in-page section heading (use a `Card` header) |
85
85
  | The top of a record page: amount or name, status, IDs, actions | `RecordHeader` (`PageHeader` stays the page title) | A second `h1` with ad hoc badges |
86
- | The bar at the top of every dashboard page: search, Games, Milestones (Setup guide while setting up), Dodo AI, chat, theme, notifications, account | `AppTopBar` (`notifications` fills its lg Popover, `account` its Menu; `showSetupGuide` swaps Milestones for Setup guide; it collapses itself below 672px). The page content starts 32 below it (`pt-8`), and Sentra opens from its Dodo AI button, not from the Sidebar | Page actions or a count on the bell in the top bar; a hand-built header row; a Sentra item in the Sidebar nav |
86
+ | The bar at the top of every dashboard page: search, Games, Milestones (Setup guide while setting up), Dodo AI, chat, theme, notifications, account | `AppTopBar` (`notifications` fills its lg Popover, `account` its Menu; `showSetupGuide` swaps Milestones for Setup guide; it collapses itself below 672px). The page content starts 40 below it on desktop and 24 on mobile (`pt-6 sm:pt-10`), and Sentra opens from its Dodo AI button, not from the Sidebar | Page actions or a count on the bell in the top bar; a hand-built header row; a Sentra item in the Sidebar nav |
87
87
  | A formatted description in a form (product, collection) | `RichTextEditor` in a `Field` (markdown value; text style, bold, italic, underline, text colour) | A bare `Input type="textarea"` with markdown hints, or link / code buttons in its toolbar |
88
88
  | Showing a saved description (product, invoice) | `RichTextContent` from `@dodopayments/ui/rich-text-editor` (formatted prose); `RichTextPreview` for one plain-text line in a table cell or card | Raw markdown on screen, or the value through `dangerouslySetInnerHTML` |
89
89
  | A section of a page (a form section, a list, a summary) | `Card`: the grey tray with a `CardHeader` strip (`CardTitle`, optional `help`, `CardDescription`, a small `CardAction`), the white `CardContent` panel and an optional `CardFooter` note, or the header as props (`<Card title description action>`, `layout="full-bleed"` for a list or table); `tone="error"` only for a problem to act on or the Danger zone. Stack cards 24 apart | A white bordered `div`, a card nested in a card, page actions or a page title on the strip, status shown as coloured text instead of a `Badge` |
@@ -117,7 +117,7 @@ another component library.
117
117
  | A merchant-branded surface (checkout, portal, preview) | `ThemeProvider` from `@dodopayments/ui/theme` with the merchant `appearance` (or `fromCheckoutTheme(theme)`) | Hand-set `--primary` styles or palette classes per merchant |
118
118
  | Checking a merchant colour is readable | `contrastRatio` / `ensureContrast` from `@dodopayments/ui/theme` | A hard-coded white or black label |
119
119
  | A component whose registry `status` is `deprecated` (docs badge, dev console warning) | Its `deprecated.replacement` | The deprecated component in new code |
120
- | A page title, heading, caption or big number in new UI | A text style: `font-heading text-heading-secondary` (page title), `text-heading-tertiary` (section title), `text-body-secondary` (caption), `font-heading text-heading-primary` (key figure), plus `text-numeric` for amounts | `text-2xl font-semibold tracking-tight` assembled by hand |
120
+ | A page title, heading, caption or big number in new UI | A text style: `font-heading text-heading-secondary sm:text-heading-primary` (page title: 20/28 on mobile, 24/32 on desktop), `text-heading-tertiary` (section title), `text-body-secondary` (caption), `font-heading text-heading-primary` (key figure), plus `text-numeric` for amounts | `text-2xl font-semibold tracking-tight` assembled by hand |
121
121
  | Lift on a raised surface or a control's 1px edge | `shadow-xs/5` (resting), `shadow-lg/5` (floating), `before:shadow-highlight` (edge) | `shadow-[...]` |
122
122
  | A denser table, toolbar or settings panel | `data-density="compact"` on the area (`comfortable` restores); `size="sm"` on Button, Input, `SelectTrigger`, `TabsList` and Badge for one compact row in a regular page | `size="sm"` on every control of a whole area, or `h-7` overrides |
123
123
  | A short task on a phone that keeps the page in view (a confirm, a few fields, a list to pick from) | `Drawer` (`DrawerContent` with `DrawerHeader`, `DrawerPanel`, `DrawerFooter`): a bottom panel that closes with a swipe down, the scrim, Escape or its close button; `snapPoints` for a list that can grow | A `Drawer` on a wide screen (use a `Dialog` or a `Sheet`), or a swipe as the only way to close |
@@ -502,8 +502,8 @@ pass `suggestions` to the same `Input` (it loads the list on demand) instead of
502
502
 
503
503
  Use the Dodo Nest text styles. Each style sets the size, line height, letter spacing and weight:
504
504
 
505
- - `text-heading-primary`: key figures
506
- - `text-heading-secondary`: page titles
505
+ - `text-heading-primary`: page titles on desktop, key figures
506
+ - `text-heading-secondary`: page titles on mobile
507
507
  - `text-heading-tertiary`: section and dialog titles
508
508
  - `text-heading-quaternary`: card titles
509
509
  - `text-body-primary`: body copy, table cells
@@ -525,7 +525,7 @@ paragraph that is a `div` or `span`.
525
525
 
526
526
  ```tsx
527
527
  // Good
528
- <h1 className="font-heading text-heading-secondary text-foreground">Payments</h1>
528
+ <h1 className="font-heading text-heading-secondary text-foreground sm:text-heading-primary">Payments</h1>
529
529
  <p className="text-body-primary text-muted-foreground">Every payment in the last 30 days.</p>
530
530
  <td className="text-right tabular-nums">$1,240.00</td>
531
531
  <td className="font-mono text-xs text-muted-foreground">pay_0NxJ7c2e</td>
@@ -661,6 +661,11 @@ The semantic tokens use shadcn-style names. Each `X` has an `X-foreground` for c
661
661
  | Radius | `rounded-lg` controls, `rounded-xl` / `rounded-2xl` cards, dialogs and popovers, `rounded-md` menu items, `rounded-sm` badges |
662
662
  | Shadow | `shadow-xs` inputs and secondary buttons, `shadow-lg` popovers, menus and dialogs |
663
663
 
664
+ - Use-case names are also available and paint the same colours: `bg-surface-secondary` (`bg-muted`),
665
+ `bg-surface-hover` (`bg-accent`), `text-content-primary` (`text-foreground`), `text-content-secondary`
666
+ (`text-muted-foreground`), `border-border-primary` (`border-border`); `rounded-control`, `rounded-panel`,
667
+ `rounded-tray`; `duration-open`, `duration-close`. Keep `bg-background`, `bg-card` and `bg-popover` for
668
+ those three fills: theme rules select them by class name.
664
669
  - The logo keeps its brand tokens (`--logo-*`). Use them only for `Logo`.
665
670
  - Solid `variant="destructive"` (white on `bg-destructive`) is below WCAG AA for normal-size text
666
671
  (about 3.8:1). Where that is important, use `destructive-outline`.
@@ -1 +1 @@
1
- {"version":3,"file":"app-top-bar.d.ts","sourceRoot":"","sources":["../../../src/components/app-top-bar/app-top-bar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAcpC,OAAO,EAAkB,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAQ9E;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;CAkB5B,CAAC;AAEX,eAAO,MAAM,iCAAiC;;CAAkC,CAAC;AAQjF,MAAM,WAAW,eAAe;IAC9B,mGAAmG;I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AgB,uBAAuB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,4BAA4B,qBAsB5F;AAED,MAAM,WAAW,yBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,yBAAyB,qBAehG;AA4GD,MAAM,WAAW,yBAAyB;IACxC,gCAAgC;IAChC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,yFAAyF;IACzF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,SAAS,GACV,EAAE,yBAAyB,0EA2B3B;AA0FD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,UAAU,EACV,QAAQ,EACR,cAAqB,EACrB,SAAgB,EAChB,WAAW,EACX,cAAqB,EACrB,kBAAsB,EACtB,gBAAgB,EAChB,cAAsB,EACtB,kBAAsB,EACtB,gBAAgB,EAChB,MAAa,EACb,QAAQ,EACR,UAAU,EACV,KAAK,EACL,YAAsB,EACtB,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,OAAO,EACP,OAAO,EACP,aAAa,EACb,IAAI,EACJ,aAAa,EACb,MAAM,EACN,GAAG,KAAK,EACT,EAAE,cAAc,qBAoLhB"}
1
+ {"version":3,"file":"app-top-bar.d.ts","sourceRoot":"","sources":["../../../src/components/app-top-bar/app-top-bar.tsx"],"names":[],"mappings":"AA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