@wallarm-org/design-system 4.8.0-rc-fix-claude-code.1 → 4.8.0-rc-feat-parser.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 (176) hide show
  1. package/README.md +2 -4
  2. package/dist/components/BulkBar/index.d.ts +0 -5
  3. package/dist/components/Drawer/classes.js +1 -1
  4. package/dist/components/DropdownMenu/DropdownMenu.d.ts +2 -0
  5. package/dist/components/DropdownMenu/DropdownMenu.js +84 -71
  6. package/dist/components/DropdownMenu/DropdownMenuItemDescription.js +1 -1
  7. package/dist/components/FilterInput/hooks/useFilterInputAutocomplete/useFilterInputAutocomplete.js +1 -1
  8. package/dist/components/Overlay/Overlay.js +1 -1
  9. package/dist/components/Rules/PointSelector/KeyboardShortcutsDialog.d.ts +14 -0
  10. package/dist/components/Rules/PointSelector/KeyboardShortcutsDialog.js +209 -0
  11. package/dist/components/Rules/PointSelector/MatchStep.d.ts +15 -0
  12. package/dist/components/Rules/PointSelector/MatchStep.js +186 -0
  13. package/dist/components/Rules/PointSelector/MenuFooterHints.d.ts +16 -0
  14. package/dist/components/Rules/PointSelector/MenuFooterHints.js +177 -0
  15. package/dist/components/Rules/PointSelector/PointPreview.d.ts +10 -0
  16. package/dist/components/Rules/PointSelector/PointPreview.js +88 -0
  17. package/dist/components/Rules/PointSelector/PointSelector.d.ts +17 -0
  18. package/dist/components/Rules/PointSelector/PointSelector.js +937 -0
  19. package/dist/components/Rules/PointSelector/PointSelectorEmptyState.d.ts +12 -0
  20. package/dist/components/Rules/PointSelector/PointSelectorEmptyState.js +173 -0
  21. package/dist/components/Rules/PointSelector/PointSelectorError.d.ts +31 -0
  22. package/dist/components/Rules/PointSelector/PointSelectorError.js +275 -0
  23. package/dist/components/Rules/PointSelector/PointSelectorInput.d.ts +20 -0
  24. package/dist/components/Rules/PointSelector/PointSelectorInput.js +130 -0
  25. package/dist/components/Rules/PointSelector/PointSelectorMenu.d.ts +31 -0
  26. package/dist/components/Rules/PointSelector/PointSelectorMenu.js +317 -0
  27. package/dist/components/Rules/PointSelector/PointSelectorSkeleton.d.ts +8 -0
  28. package/dist/components/Rules/PointSelector/PointSelectorSkeleton.js +73 -0
  29. package/dist/components/Rules/PointSelector/SampleRequest.d.ts +14 -0
  30. package/dist/components/Rules/PointSelector/SampleRequest.js +116 -0
  31. package/dist/components/Rules/PointSelector/StepMenu.d.ts +40 -0
  32. package/dist/components/Rules/PointSelector/StepMenu.js +210 -0
  33. package/dist/components/Rules/PointSelector/VersionWarning.d.ts +26 -0
  34. package/dist/components/Rules/PointSelector/VersionWarning.js +231 -0
  35. package/dist/components/Rules/PointSelector/WhereBar.d.ts +48 -0
  36. package/dist/components/Rules/PointSelector/WhereBar.js +263 -0
  37. package/dist/components/Rules/PointSelector/classes.d.ts +28 -0
  38. package/dist/components/Rules/PointSelector/classes.js +22 -0
  39. package/dist/components/Rules/PointSelector/index.d.ts +20 -0
  40. package/dist/components/Rules/PointSelector/index.js +18 -0
  41. package/dist/components/Rules/PointSelector/liftLayer.d.ts +8 -0
  42. package/dist/components/Rules/PointSelector/liftLayer.js +4 -0
  43. package/dist/components/Rules/PointSelector/sampleValue.d.ts +6 -0
  44. package/dist/components/Rules/PointSelector/sampleValue.js +51 -0
  45. package/dist/components/Rules/PointSelector/sdkBridge.d.ts +508 -0
  46. package/dist/components/Rules/PointSelector/sdkBridge.js +339 -0
  47. package/dist/components/Rules/PointSelector/types.d.ts +304 -0
  48. package/dist/components/Rules/PointSelector/types.js +0 -0
  49. package/dist/components/Rules/PointSelector/usePointSelector.d.ts +161 -0
  50. package/dist/components/Rules/PointSelector/usePointSelector.js +1088 -0
  51. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionEditor.d.ts +28 -0
  52. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionEditor.js +208 -0
  53. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionFields.d.ts +23 -0
  54. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionFields.js +950 -0
  55. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTargetPicker.d.ts +21 -0
  56. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTargetPicker.js +110 -0
  57. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTypeSelect.d.ts +20 -0
  58. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTypeSelect.js +31 -0
  59. package/dist/components/Rules/RuleBuilder/ActionEditor/AttackTypeField.d.ts +23 -0
  60. package/dist/components/Rules/RuleBuilder/ActionEditor/AttackTypeField.js +131 -0
  61. package/dist/components/Rules/RuleBuilder/ActionEditor/classes.d.ts +17 -0
  62. package/dist/components/Rules/RuleBuilder/ActionEditor/classes.js +14 -0
  63. package/dist/components/Rules/RuleBuilder/ActionEditor/index.d.ts +6 -0
  64. package/dist/components/Rules/RuleBuilder/ActionEditor/index.js +6 -0
  65. package/dist/components/Rules/RuleBuilder/ConditionTree/AddConditionMenu.d.ts +24 -0
  66. package/dist/components/Rules/RuleBuilder/ConditionTree/AddConditionMenu.js +245 -0
  67. package/dist/components/Rules/RuleBuilder/ConditionTree/AttackCondition.d.ts +15 -0
  68. package/dist/components/Rules/RuleBuilder/ConditionTree/AttackCondition.js +691 -0
  69. package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionCard.d.ts +19 -0
  70. package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionCard.js +72 -0
  71. package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionTree.d.ts +27 -0
  72. package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionTree.js +407 -0
  73. package/dist/components/Rules/RuleBuilder/ConditionTree/FieldCondition.d.ts +14 -0
  74. package/dist/components/Rules/RuleBuilder/ConditionTree/FieldCondition.js +269 -0
  75. package/dist/components/Rules/RuleBuilder/ConditionTree/GroupCondition.d.ts +25 -0
  76. package/dist/components/Rules/RuleBuilder/ConditionTree/GroupCondition.js +99 -0
  77. package/dist/components/Rules/RuleBuilder/ConditionTree/SampleCondition.d.ts +14 -0
  78. package/dist/components/Rules/RuleBuilder/ConditionTree/SampleCondition.js +118 -0
  79. package/dist/components/Rules/RuleBuilder/ConditionTree/SignalCondition.d.ts +14 -0
  80. package/dist/components/Rules/RuleBuilder/ConditionTree/SignalCondition.js +446 -0
  81. package/dist/components/Rules/RuleBuilder/ConditionTree/TagCondition.d.ts +14 -0
  82. package/dist/components/Rules/RuleBuilder/ConditionTree/TagCondition.js +266 -0
  83. package/dist/components/Rules/RuleBuilder/ConditionTree/classes.d.ts +35 -0
  84. package/dist/components/Rules/RuleBuilder/ConditionTree/classes.js +57 -0
  85. package/dist/components/Rules/RuleBuilder/ConditionTree/index.d.ts +15 -0
  86. package/dist/components/Rules/RuleBuilder/ConditionTree/index.js +10 -0
  87. package/dist/components/Rules/RuleBuilder/RuleBuilder.d.ts +67 -0
  88. package/dist/components/Rules/RuleBuilder/RuleBuilder.js +366 -0
  89. package/dist/components/Rules/RuleBuilder/Summary/ActionSummary.d.ts +32 -0
  90. package/dist/components/Rules/RuleBuilder/Summary/ActionSummary.js +420 -0
  91. package/dist/components/Rules/RuleBuilder/Summary/ConditionSummary.d.ts +27 -0
  92. package/dist/components/Rules/RuleBuilder/Summary/ConditionSummary.js +446 -0
  93. package/dist/components/Rules/RuleBuilder/Summary/index.d.ts +7 -0
  94. package/dist/components/Rules/RuleBuilder/Summary/index.js +2 -0
  95. package/dist/components/Rules/RuleBuilder/classes.d.ts +19 -0
  96. package/dist/components/Rules/RuleBuilder/classes.js +18 -0
  97. package/dist/components/Rules/RuleBuilder/index.d.ts +55 -0
  98. package/dist/components/Rules/RuleBuilder/index.js +11 -0
  99. package/dist/components/Rules/RuleBuilder/models/actionModel.d.ts +31 -0
  100. package/dist/components/Rules/RuleBuilder/models/actionModel.js +276 -0
  101. package/dist/components/Rules/RuleBuilder/models/conditionModel.d.ts +95 -0
  102. package/dist/components/Rules/RuleBuilder/models/conditionModel.js +418 -0
  103. package/dist/components/Rules/RuleBuilder/models/index.d.ts +3 -0
  104. package/dist/components/Rules/RuleBuilder/models/index.js +3 -0
  105. package/dist/components/Rules/RuleBuilder/models/validation.d.ts +176 -0
  106. package/dist/components/Rules/RuleBuilder/models/validation.js +242 -0
  107. package/dist/components/Rules/RuleBuilder/shared/ChoiceSelect.d.ts +27 -0
  108. package/dist/components/Rules/RuleBuilder/shared/ChoiceSelect.js +92 -0
  109. package/dist/components/Rules/RuleBuilder/shared/index.d.ts +1 -0
  110. package/dist/components/Rules/RuleBuilder/shared/index.js +1 -0
  111. package/dist/components/Rules/RuleBuilder/types.d.ts +384 -0
  112. package/dist/components/Rules/RuleBuilder/types.js +0 -0
  113. package/dist/components/Rules/RuleBuilder/utils/constants.d.ts +65 -0
  114. package/dist/components/Rules/RuleBuilder/utils/constants.js +356 -0
  115. package/dist/components/Rules/RuleBuilder/utils/extractBindings.d.ts +48 -0
  116. package/dist/components/Rules/RuleBuilder/utils/extractBindings.js +42 -0
  117. package/dist/components/Rules/RuleBuilder/utils/helpers.d.ts +92 -0
  118. package/dist/components/Rules/RuleBuilder/utils/helpers.js +54 -0
  119. package/dist/components/Rules/RuleBuilder/utils/index.d.ts +2 -0
  120. package/dist/components/Rules/RuleBuilder/utils/index.js +2 -0
  121. package/dist/components/SearchInput/SearchInput.d.ts +5 -7
  122. package/dist/components/SearchInput/SearchInput.js +101 -119
  123. package/dist/components/Select/SelectSearchInput.d.ts +1 -1
  124. package/dist/components/Table/types.d.ts +1 -1
  125. package/dist/components/Tabs/Tabs.d.ts +0 -1
  126. package/dist/components/Tabs/Tabs.js +28 -30
  127. package/dist/components/Tabs/TabsList/index.d.ts +1 -1
  128. package/dist/components/Tabs/index.d.ts +2 -2
  129. package/dist/components/Tour/TourPositioner.d.ts +0 -3
  130. package/dist/components/Tour/TourPositioner.js +4 -4
  131. package/dist/index.d.ts +3 -2
  132. package/dist/index.js +2 -1
  133. package/dist/metadata/components.json +9077 -12300
  134. package/dist/theme/typography.css +0 -5
  135. package/dist/utils/formatDateTime.d.ts +0 -6
  136. package/dist/utils/formatDateTime.js +1 -13
  137. package/package.json +4 -6
  138. package/dist/components/NotificationCenter/NotificationCenter.d.ts +0 -20
  139. package/dist/components/NotificationCenter/NotificationCenter.js +0 -65
  140. package/dist/components/NotificationCenter/NotificationCenterBody.d.ts +0 -18
  141. package/dist/components/NotificationCenter/NotificationCenterBody.js +0 -202
  142. package/dist/components/NotificationCenter/NotificationCenterContent.d.ts +0 -5
  143. package/dist/components/NotificationCenter/NotificationCenterContent.js +0 -42
  144. package/dist/components/NotificationCenter/NotificationCenterHeader.d.ts +0 -20
  145. package/dist/components/NotificationCenter/NotificationCenterHeader.js +0 -202
  146. package/dist/components/NotificationCenter/NotificationCenterItem.d.ts +0 -26
  147. package/dist/components/NotificationCenter/NotificationCenterItem.js +0 -211
  148. package/dist/components/NotificationCenter/NotificationCenterItemTime.d.ts +0 -9
  149. package/dist/components/NotificationCenter/NotificationCenterItemTime.js +0 -148
  150. package/dist/components/NotificationCenter/NotificationCenterItemTitle.d.ts +0 -14
  151. package/dist/components/NotificationCenter/NotificationCenterItemTitle.js +0 -115
  152. package/dist/components/NotificationCenter/NotificationCenterTabs.d.ts +0 -10
  153. package/dist/components/NotificationCenter/NotificationCenterTabs.js +0 -77
  154. package/dist/components/NotificationCenter/NotificationCenterTrigger.d.ts +0 -13
  155. package/dist/components/NotificationCenter/NotificationCenterTrigger.js +0 -138
  156. package/dist/components/NotificationCenter/index.d.ts +0 -9
  157. package/dist/components/NotificationCenter/index.js +0 -9
  158. package/dist/guidelines/foundations/color.md +0 -157
  159. package/dist/guidelines/foundations/focus.md +0 -122
  160. package/dist/guidelines/foundations/layering.md +0 -131
  161. package/dist/guidelines/foundations/radius-elevation.md +0 -111
  162. package/dist/guidelines/foundations/spacing.md +0 -117
  163. package/dist/guidelines/foundations/typography.md +0 -114
  164. package/dist/guidelines/patterns/app-layout.md +0 -1567
  165. package/dist/guidelines/patterns/auth-page.md +0 -668
  166. package/dist/guidelines/patterns/confirmation-dialogs.md +0 -605
  167. package/dist/guidelines/patterns/create-edit-forms.md +0 -768
  168. package/dist/guidelines/patterns/detail-drawer.md +0 -868
  169. package/dist/guidelines/patterns/empty-states.md +0 -461
  170. package/dist/guidelines/patterns/entity-table.md +0 -533
  171. package/dist/guidelines/patterns/feedback-toasts.md +0 -493
  172. package/dist/guidelines/patterns/filtering.md +0 -630
  173. package/dist/guidelines/patterns/resource-list-page.md +0 -558
  174. package/dist/guidelines/patterns/settings-page.md +0 -752
  175. package/dist/guidelines/rules.md +0 -25
  176. package/dist/metadata/guidelines.json +0 -1705
@@ -1,111 +0,0 @@
1
- ---
2
- title: Radius and elevation
3
- description: Use when choosing a border radius or a shadow for your own element, or when matching the corners and depth of a design-system surface.
4
- components: [Button, Input, Select, Card, CardContent, Tag, Tooltip, Avatar, DropdownMenu, Popover, PopoverTrigger, PopoverContent, Drawer, Dialog, SearchModal, Alert, Table, Toast, ChatInput, Checkbox, Radio, Switch, Kbd, NavRail, SegmentedControl, Skeleton, InputGroup, SplitButton]
5
- keywords: [radius, border-radius, rounded, corners, shadow, box-shadow, elevation, depth, drop shadow, raised, floating, dark mode, rounded-8, rounded-12, shadow-md, shadow-xl]
6
- order: 40
7
- ---
8
-
9
- # Radius and elevation
10
-
11
- Radius utilities are named in pixels. Shadows are named by size and do not change in dark mode.
12
-
13
- ## What you use
14
-
15
- | Need | Use | Not |
16
- | --- | --- | --- |
17
- | Corners on a control-sized element | `rounded-8` | `rounded-lg`, `rounded-md`, `rounded` |
18
- | Corners on a menu item or a small inline chip | `rounded-6` | `rounded-md` |
19
- | Corners on a panel or floating surface | `rounded-12` | `rounded-xl` |
20
- | A circle or a pill | `rounded-full` | `rounded-[50%]`, `rounded-[999px]` |
21
- | A bordered tile with a shadow | `Card` | A `div` with `rounded-8 border shadow-sm` |
22
- | A floating panel anchored to a trigger | `Popover`, `PopoverTrigger`, `PopoverContent` | A positioned `div` with `rounded-12 shadow-md` |
23
- | A side panel or a modal | `Drawer` or `Dialog` | A `div` with `rounded-12 shadow-xl` |
24
- | A loading placeholder with matching corners | `<Skeleton rounded={8} />` | `<Skeleton className='rounded-8' />` |
25
- | Depth on your own floating element | `shadow-md` + `border border-border-primary-light bg-bg-surface-2` | `shadow-md` alone, `drop-shadow-*` |
26
-
27
- ## Rules
28
-
29
- - Read `rounded-*` numbers as pixels. If a value is off the scale, round to the nearest step.
30
- - **Never** use Tailwind's named radii (`rounded-xs` … `rounded-4xl`) or bare `rounded`. They compile to rem defaults off the scale.
31
- - **Never** write an arbitrary radius or shadow such as `rounded-[15px]` or `shadow-[0_2px_4px_rgba(0,0,0,0.1)]`.
32
- - If your element sits next to a design-system component, copy that component's radius. A custom button-sized element next to `Button` gets `rounded-8`.
33
- - If you nest a rounded element inside a padded rounded container, use a smaller inner radius: `rounded-12` outside, 4px padding, `rounded-8` inside.
34
- - If you round only some corners, use side or corner variants of the same step: `rounded-t-12`, `rounded-tl-12`.
35
- - If an element stays in the page flow, give it no shadow. `Card` is the one in-flow surface with a shadow (`shadow-sm`).
36
- - If an element floats, use the shadow for its layer below.
37
- - If you add a shadow to your own floating element, pair it with `border border-border-primary-light` and a surface fill such as `bg-bg-surface-2`. They carry the depth in dark mode.
38
- - **Never** add `shadow-*` to `Card`, `Input`, `Button` or another design-system component. They own their shadow.
39
- - **Never** add a dark-mode shadow (`dark:shadow-lg`) or use `shadow-2xl`.
40
- - **Never** use a shadow as a focus indicator. See [Focus](./focus.md).
41
-
42
- There is no `--elevation-*` token, no `shadow-card`/`shadow-popover`/`shadow-modal` utility, and no dark-mode shadow value.
43
-
44
- ## Examples
45
-
46
- A placeholder takes its corners from the `rounded` prop.
47
-
48
- ```tsx
49
- import { Card, CardContent, Skeleton } from '@wallarm-org/design-system';
50
-
51
- export const UsageTile = ({ loading }: { loading: boolean }) => (
52
- <Card>
53
- <CardContent>
54
- {loading ? (
55
- <Skeleton width='100%' height='120px' rounded={8} />
56
- ) : (
57
- <div className='h-120 rounded-8 border border-border-primary-light' />
58
- )}
59
- </CardContent>
60
- </Card>
61
- );
62
- ```
63
-
64
- A custom floating element pairs its shadow with a border and fill.
65
-
66
- ```tsx
67
- <div className='rounded-12 border border-border-primary-light bg-bg-surface-2 p-12 shadow-md'>
68
- …
69
- </div>
70
- ```
71
-
72
- A nested item steps the radius down.
73
-
74
- ```tsx
75
- <div className='flex rounded-12 bg-bg-surface-2 p-4'>
76
- <div className='rounded-8 bg-bg-surface-1 px-12 py-6'>Day</div>
77
- </div>
78
- ```
79
-
80
- ## Reference
81
-
82
- ### Radius scale
83
-
84
- | Utility | Value | Used by |
85
- | --- | --- | --- |
86
- | `rounded-none` | 0 | Joined edges in `InputGroup`, `SplitButton` |
87
- | `rounded-2` | 2px | Indicators, status dots |
88
- | `rounded-4` | 4px | `Checkbox` box, `Kbd`, `Switch` thumb |
89
- | `rounded-6` | 6px | `DropdownMenu` items, small badges, `Skeleton` default |
90
- | `rounded-8` | 8px | `Button`, `Input`, `Select`, `Tag`, `Tooltip`, `Card`, `Avatar` sm/md |
91
- | `rounded-10` | 10px | `NavRail` items |
92
- | `rounded-12` | 12px | `Popover`, `DropdownMenu`, `Dialog`, `Drawer`, `Alert`, `Table` container |
93
- | `rounded-16` | 16px | `Toast`, `ChatInput`, chat messages |
94
- | `rounded-24`, `rounded-32` | 24px, 32px | `Skeleton` only |
95
- | `rounded-full` | 9999px | `Radio`, numeric badges, pills |
96
-
97
- `Skeleton` `rounded` accepts `'none'`, `'full'`, `2`, `4`, `6`, `8`, `10`, `12`, `16`, `24`, `32`.
98
-
99
- ### Elevation scale
100
-
101
- | Utility | Layer | Used by |
102
- | --- | --- | --- |
103
- | `shadow-none` | Reset | Fields inside `InputGroup` |
104
- | `shadow-2xs` | Hairline lift | Bordered filter triggers |
105
- | `shadow-xs` | Raised control | `Button` primary/outline, `Input`, `Select`, `Checkbox` |
106
- | `shadow-sm` | In-flow tile, moving thumb | `Card`, `Switch` thumb, `SegmentedControl` indicator |
107
- | `shadow-md` | Anchored floating surface | `Popover`, `DropdownMenu`, tooltip tour steps |
108
- | `shadow-lg` | Notification, dragged item | `Toast`, `Table` bulk action bar, dragged rows |
109
- | `shadow-xl` | Modal layer | `Drawer`, `Dialog`, `SearchModal` |
110
-
111
- See [Spacing](./spacing.md) for padding inside rounded surfaces.
@@ -1,117 +0,0 @@
1
- ---
2
- title: Spacing
3
- description: Use when choosing a gap, padding or margin value, a Stack or Flex gap prop, or the inner spacing of a page, card, drawer or dialog.
4
- components: [Stack, HStack, VStack, Flex, Page, PageHeader, PageToolbar, PageContent, PageTitle, PageActions, Card, CardHeader, CardTitle, CardContent, CardFooter, Drawer, DrawerHeader, DrawerBody, DrawerFooter, Dialog, DialogBody, DialogFooter]
5
- keywords: [spacing, gap, padding, margin, space, px, scale, inset, gutter, Stack, HStack, VStack, Flex, layout, whitespace]
6
- order: 10
7
- ---
8
-
9
- # Spacing
10
-
11
- Every numeric spacing and sizing utility counts in pixels. `p-16` is 16px; `p-4` is 4px.
12
-
13
- ## What you use
14
-
15
- | Need | Use | Not |
16
- | --- | --- | --- |
17
- | Children in a column | `<VStack gap={16}>` | `space-y-4`, `flex flex-col gap-4` |
18
- | Children in a row | `<HStack gap={8}>` | `space-x-2`, per-child margins |
19
- | A row or column with `basis`, `grow` or `shrink` | `<Flex gap={12} basis='1/2'>` | A raw `div` with `flex basis-1/2` |
20
- | Padding on your own element | `p-16`, `px-24`, `py-8` | `p-4` meaning 16px |
21
- | Page gutters | `PageHeader`, `PageToolbar`, `PageContent` | Your own `px-*` on the page wrapper |
22
- | A bordered tile | `Card` with `CardHeader`, `CardContent`, `CardFooter` | A `div` with `p-16 rounded-8 border` |
23
- | Side panel or modal body | `DrawerBody`, `DialogBody` | Padding classes inside header, body or footer |
24
-
25
- ## Rules
26
-
27
- - Read every number in a spacing or sizing class (`p-*`, `m-*`, `gap-*`, `w-*`, `h-*`, `size-*`, `inset-*`, `top-*`) as pixels.
28
- - **Never** copy a Tailwind docs value as-is. Multiply it by 4: Tailwind `p-4` is `p-16` here, `mt-8` is `mt-32`, `h-8` is `h-32`.
29
- - Stay on the scale. If a value is off it, round to the nearest step. Off-scale classes such as `p-10` still compile; the rule stops you, not the build.
30
- - If children sit in a line, use `Stack`, `HStack` or `VStack` with `gap`. **Never** use per-child margins or `space-*`.
31
- - Pass `gap` as a scale-number prop, not a `gap-*` class. Off-scale numbers fail type-checking.
32
- - If you omit `gap` on `Stack`, `HStack` or `VStack`, you get 4px. If you omit it on `Flex`, you get none.
33
- - If you want no gap on `Stack`, pass `gap={0}`. `Flex` has no `gap={0}`; omit the prop.
34
- - If you need `className` on the flex container, use `Stack`. `Flex` does not accept `className`.
35
- - `PageHeader`, `PageToolbar` and `PageContent` own the 24px side gutter. **Never** wrap `Page` in a padded container.
36
- - `Card` owns its 16px padding. **Never** add `p-*` to `Card` or its parts.
37
- - Put drawer and dialog content straight into `DrawerBody` or `DialogBody`. Their 24px gutter is fixed.
38
- - **Never** pass `className` to `DrawerHeader`, `DrawerBody` or `DrawerFooter`. They accept only `children` and `ref`.
39
- - Import `Dialog` parts from `@wallarm-org/design-system/Dialog`. `Dialog` is not exported from the package root.
40
- - **Never** reach for a `--spacing-10` token, a `space-*` component prop, or a `padding` prop on `Stack`, `Flex`, `Card` or `Page`. None exist.
41
-
42
- ## Examples
43
-
44
- A column of sections uses `VStack`, not per-child margins.
45
-
46
- ```tsx
47
- import { Text, VStack } from '@wallarm-org/design-system';
48
-
49
- <VStack gap={24}>
50
- <Text>Profile</Text>
51
- <Text>Security</Text>
52
- </VStack>;
53
- ```
54
-
55
- Padding on your own element uses the pixel number, not the Tailwind docs number.
56
-
57
- ```tsx
58
- <div className='px-24 py-12'>Content</div>; // not 'px-6 py-3'
59
- ```
60
-
61
- A page puts cards straight into `PageContent`, with no padding of its own.
62
-
63
- ```tsx
64
- import {
65
- Card, CardContent, CardHeader, CardTitle, HStack,
66
- Page, PageContent, PageHeader, PageTitle,
67
- } from '@wallarm-org/design-system';
68
-
69
- <Page name='overview' fullSize fixedHeight>
70
- <PageHeader>
71
- <PageTitle>Overview</PageTitle>
72
- </PageHeader>
73
- <PageContent>
74
- <HStack gap={16} align='stretch'>
75
- <Card>
76
- <CardHeader><CardTitle>Requests</CardTitle></CardHeader>
77
- <CardContent>1,204</CardContent>
78
- </Card>
79
- </HStack>
80
- </PageContent>
81
- </Page>;
82
- ```
83
-
84
- ## Reference
85
-
86
- ### Scale
87
-
88
- Each step is a `--spacing-N` token and a utility suffix (`p-N`, `gap-N`, `w-N`), N in pixels. Zero is `--spacing-none` (`p-0`).
89
-
90
- | Range | Steps (px) |
91
- | --- | --- |
92
- | Tight | 1, 2, 4, 6, 8, 12 |
93
- | Component | 16, 20, 24, 28, 32, 36, 40, 44, 48 |
94
- | Layout | 56, 64, 80, 96, 112, 128, 144 |
95
-
96
- ### Layout components
97
-
98
- | Component | `gap` values | Default `gap` | Direction | `className` |
99
- | --- | --- | --- | --- | --- |
100
- | `Stack` | `0` and every step `1`–`144` | `4` | `column` | Yes |
101
- | `VStack` | Same as `Stack` | `4` | `column` (fixed) | Yes |
102
- | `HStack` | Same as `Stack` | `4` | `row` (fixed), `align='center'` | Yes |
103
- | `Flex` | Every step `1`–`144`, no `0` | none | `row` | No |
104
-
105
- ### Built into components
106
-
107
- Do not repeat these.
108
-
109
- | Component | Side gutter | Gap between items |
110
- | --- | --- | --- |
111
- | `PageHeader`, `PageToolbar`, `PageContent` | 24px | 12px (header, toolbar) |
112
- | `PageActions` | — | 8px |
113
- | `Card` | 16px all round | 8px between parts; 12px in `CardFooter` |
114
- | `DrawerHeader`, `DialogHeader` | 24px left | 12px |
115
- | `DrawerBody`, `DialogBody` | 24px | — |
116
- | `DrawerFooter`, `DialogFooter` | 24px, 16px vertical | 8px |
117
- | Drawer / Dialog inset from viewport | 8px / 32px | — |
@@ -1,114 +0,0 @@
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).