@wallarm-org/design-system 4.7.0 → 4.8.0-rc-fix-claude-code.1

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 (60) hide show
  1. package/README.md +4 -2
  2. package/dist/components/BulkBar/index.d.ts +5 -0
  3. package/dist/components/Drawer/classes.js +1 -1
  4. package/dist/components/NotificationCenter/NotificationCenter.d.ts +20 -0
  5. package/dist/components/NotificationCenter/NotificationCenter.js +65 -0
  6. package/dist/components/NotificationCenter/NotificationCenterBody.d.ts +18 -0
  7. package/dist/components/NotificationCenter/NotificationCenterBody.js +202 -0
  8. package/dist/components/NotificationCenter/NotificationCenterContent.d.ts +5 -0
  9. package/dist/components/NotificationCenter/NotificationCenterContent.js +42 -0
  10. package/dist/components/NotificationCenter/NotificationCenterHeader.d.ts +20 -0
  11. package/dist/components/NotificationCenter/NotificationCenterHeader.js +202 -0
  12. package/dist/components/NotificationCenter/NotificationCenterItem.d.ts +26 -0
  13. package/dist/components/NotificationCenter/NotificationCenterItem.js +211 -0
  14. package/dist/components/NotificationCenter/NotificationCenterItemTime.d.ts +9 -0
  15. package/dist/components/NotificationCenter/NotificationCenterItemTime.js +148 -0
  16. package/dist/components/NotificationCenter/NotificationCenterItemTitle.d.ts +14 -0
  17. package/dist/components/NotificationCenter/NotificationCenterItemTitle.js +115 -0
  18. package/dist/components/NotificationCenter/NotificationCenterTabs.d.ts +10 -0
  19. package/dist/components/NotificationCenter/NotificationCenterTabs.js +77 -0
  20. package/dist/components/NotificationCenter/NotificationCenterTrigger.d.ts +13 -0
  21. package/dist/components/NotificationCenter/NotificationCenterTrigger.js +138 -0
  22. package/dist/components/NotificationCenter/index.d.ts +9 -0
  23. package/dist/components/NotificationCenter/index.js +9 -0
  24. package/dist/components/Overlay/Overlay.js +1 -1
  25. package/dist/components/SearchInput/SearchInput.d.ts +7 -5
  26. package/dist/components/SearchInput/SearchInput.js +119 -101
  27. package/dist/components/Select/SelectSearchInput.d.ts +1 -1
  28. package/dist/components/Table/types.d.ts +1 -1
  29. package/dist/components/Tabs/Tabs.d.ts +1 -0
  30. package/dist/components/Tabs/Tabs.js +30 -28
  31. package/dist/components/Tabs/TabsList/index.d.ts +1 -1
  32. package/dist/components/Tabs/index.d.ts +2 -2
  33. package/dist/components/Tour/TourPositioner.d.ts +3 -0
  34. package/dist/components/Tour/TourPositioner.js +4 -4
  35. package/dist/guidelines/foundations/color.md +157 -0
  36. package/dist/guidelines/foundations/focus.md +122 -0
  37. package/dist/guidelines/foundations/layering.md +131 -0
  38. package/dist/guidelines/foundations/radius-elevation.md +111 -0
  39. package/dist/guidelines/foundations/spacing.md +117 -0
  40. package/dist/guidelines/foundations/typography.md +114 -0
  41. package/dist/guidelines/patterns/app-layout.md +1567 -0
  42. package/dist/guidelines/patterns/auth-page.md +668 -0
  43. package/dist/guidelines/patterns/confirmation-dialogs.md +605 -0
  44. package/dist/guidelines/patterns/create-edit-forms.md +768 -0
  45. package/dist/guidelines/patterns/detail-drawer.md +868 -0
  46. package/dist/guidelines/patterns/empty-states.md +461 -0
  47. package/dist/guidelines/patterns/entity-table.md +533 -0
  48. package/dist/guidelines/patterns/feedback-toasts.md +493 -0
  49. package/dist/guidelines/patterns/filtering.md +630 -0
  50. package/dist/guidelines/patterns/resource-list-page.md +558 -0
  51. package/dist/guidelines/patterns/settings-page.md +752 -0
  52. package/dist/guidelines/rules.md +25 -0
  53. package/dist/index.d.ts +2 -1
  54. package/dist/index.js +1 -0
  55. package/dist/metadata/components.json +12641 -9320
  56. package/dist/metadata/guidelines.json +1705 -0
  57. package/dist/theme/typography.css +5 -0
  58. package/dist/utils/formatDateTime.d.ts +6 -0
  59. package/dist/utils/formatDateTime.js +13 -1
  60. package/package.json +6 -1
@@ -0,0 +1,114 @@
1
+ ---
2
+ title: Typography
3
+ description: Use when you set text size, weight, line height or font family, or pick between Text, Heading and Code.
4
+ components: [Text, Heading, Code]
5
+ keywords: [typography, font, font size, text size, line height, leading, weight, heading, body, title, label, caption, mono, tracking, letter spacing]
6
+ order: 30
7
+ ---
8
+
9
+ # Typography
10
+
11
+ Set text with `Text`, `Heading` and `Code`; raw classes go only on your own elements.
12
+
13
+ ## What you use
14
+
15
+ | Need | Use | Not |
16
+ | --- | --- | --- |
17
+ | Body copy, labels, descriptions | `<Text size="sm">` | `<p className="text-sm">` |
18
+ | Secondary or meta text | `<Text size="xs" color="secondary">` | `text-gray-500` |
19
+ | A title or section heading | `<Heading as="h2" size="lg">` | `<Text size="xl" weight="bold">` |
20
+ | Code, IDs, hashes, paths | `<Code size="m">` | `font-mono` on a `<span>` |
21
+ | Text in your own element | `text-sm`, `font-medium`, `leading-20` | `font-regular` |
22
+
23
+ There are no `heading-*` or `body-*` classes, no `font-regular`, and no `semibold` value on the `weight` prop.
24
+
25
+ ## Rules
26
+
27
+ - If you need body text in an app screen, pass `size="sm"` (14/20). `Text` defaults to `lg` (16/24).
28
+ - If you see `size="md"` on `Text` or `text-md`, write `sm` / `text-sm`. They render the same 14/20.
29
+ - If you need a heading, set `as` to the real level. `Heading` defaults to `h1`, `size="xl"`, `weight="bold"`.
30
+ - **Never** pass `className` to `Text` (the build fails) or `Heading` (it is ignored). Style a wrapper element instead.
31
+ - If a `Text` or `Code` sits inside a `<p>`, pass `asChild` with a `<span>` child. Both render a `<p>`. Still pass `size`: `asChild` keeps the default (16px).
32
+ - `leading-N` is N pixels (`leading-5` is 5px). For a size's paired line height, use the named step (`leading-sm` = 20px).
33
+ - **Never** use `leading-none` or `lineHeight="none"`: 0px, lines overlap.
34
+ - Keep `lineClamp` 1–6; higher values get no CSS.
35
+ - If you mark an error, use `color="danger"` on `Text` and `color="destructive"` on `Code`. Neither accepts the other's value.
36
+ - **Never** add letter spacing below 20px. `Heading` sets tracking per size.
37
+ - **Never** use `font-pixel` (decorative, `EmptyState` only) or `font-serif` (points at Inter, not bundled) in app screens.
38
+ - If you need weight 800, write `font-extrabold`, **never** the misspelled `font-extrablod`.
39
+ - `font-medium` is 450, not 500. You load no font: the theme ships Geist and Geist Mono.
40
+
41
+ ## Examples
42
+
43
+ A section header with a secondary description and a code value.
44
+
45
+ ```tsx
46
+ import { Code, Heading, Text } from '@wallarm-org/design-system';
47
+
48
+ <section className='flex flex-col gap-8'>
49
+ <Heading as='h2' size='lg' weight='medium'>Blocking rules</Heading>
50
+ <Text size='sm' color='secondary'>Requests that match are blocked.</Text>
51
+ <Code size='m'>/api/v1/users/{'{id}'}</Code>
52
+ </section>
53
+ ```
54
+
55
+ Inline text inside a paragraph you own, with its size set to match.
56
+
57
+ ```tsx
58
+ <p className='text-sm leading-20'>
59
+ Last seen <Text asChild size='sm' weight='medium'><span>2 min ago</span></Text>
60
+ </p>
61
+ ```
62
+
63
+ A style the props lack goes on a wrapper.
64
+
65
+ ```tsx
66
+ <div className='tabular-nums'>
67
+ <Text size='sm'>1,204 requests</Text>
68
+ </div>
69
+ ```
70
+
71
+ ## Reference
72
+
73
+ ### Size scale (`text-*` sets size and paired line height, px)
74
+
75
+ | Class | Size / LH | Class | Size / LH |
76
+ | --- | --- | --- | --- |
77
+ | `text-2xs` | 10 / 12 | `text-3xl` | 30 / 36 |
78
+ | `text-xs` | 12 / 16 | `text-4xl` | 36 / 40 |
79
+ | `text-sm` | 14 / 20 | `text-5xl` | 48 / 48 |
80
+ | `text-base` | 16 / 24 | `text-6xl` | 60 / 60 |
81
+ | `text-lg` | 18 / 24 | `text-7xl` | 72 / 72 |
82
+ | `text-xl` | 20 / 28 | `text-8xl` | 96 / 96 |
83
+ | `text-2xl` | 24 / 32 | `text-9xl` | 128 / 128 |
84
+
85
+ ### Weights
86
+
87
+ | Class | Value | `weight` prop |
88
+ | --- | --- | --- |
89
+ | `font-light` | 300 | `light` |
90
+ | `font-normal` | 400 | `regular` |
91
+ | `font-medium` | 450 | `medium` |
92
+ | `font-semibold` | 600 | none |
93
+ | `font-bold` | 700 | `bold` |
94
+ | `font-extrabold` | 800 | none |
95
+
96
+ ### Component sizes (size / line height)
97
+
98
+ | Component | Sizes | Default |
99
+ | --- | --- | --- |
100
+ | `Text` | `xs` 12/16, `sm` 14/20, `md` 14/20, `lg` 16/24, `xl` 18/28 | `lg` |
101
+ | `Heading` | `sm`, `md`, `lg`, `xl`, `2xl`…`7xl` = `text-sm`, `text-base`, `text-lg`, `text-xl`, `text-2xl`…`text-7xl` | `xl` |
102
+ | `Code` | `xs` 10/12, `s` 12/16, `m` 14/20, `l` 16/20 | `l` |
103
+
104
+ ### Component colors
105
+
106
+ | Component | `color` values | Default |
107
+ | --- | --- | --- |
108
+ | `Text` | `primary`, `primary-alt`, `secondary`, `secondary-alt`, `tertiary-alt`, `danger`, `inherit` | `inherit` |
109
+ | `Heading` | `primary`, `primary-alt`, `secondary`, `secondary-alt`, `inherit` | `inherit` |
110
+ | `Code` | `primary`, `primary-alt`, `secondary`, `destructive` | `primary` |
111
+
112
+ `Text` has no `success`, `warning` or `brand`. Without `truncate`, `Text` keeps line breaks. `Code` accepts `className`.
113
+
114
+ Related: [Spacing](../foundations/spacing.md), [Color](../foundations/color.md).