@neo4j-ndl/react 5.6.4 → 6.0.0-alpha.0.d77a467

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 (118) hide show
  1. package/lib/cjs/accordion/Accordion.js +2 -2
  2. package/lib/cjs/accordion/Accordion.js.map +1 -1
  3. package/lib/cjs/ai/preview/Preview.js +1 -1
  4. package/lib/cjs/ai/preview/Preview.js.map +1 -1
  5. package/lib/cjs/ai/reasoning/Reasoning.js +2 -2
  6. package/lib/cjs/ai/reasoning/Reasoning.js.map +1 -1
  7. package/lib/cjs/ai/thinking/Thinking.js +2 -2
  8. package/lib/cjs/ai/thinking/Thinking.js.map +1 -1
  9. package/lib/cjs/avatar/Avatar.js +1 -1
  10. package/lib/cjs/avatar/Avatar.js.map +1 -1
  11. package/lib/cjs/banner/Banner.js +1 -1
  12. package/lib/cjs/banner/Banner.js.map +1 -1
  13. package/lib/cjs/data-grid/Components.js +1 -1
  14. package/lib/cjs/data-grid/Components.js.map +1 -1
  15. package/lib/cjs/date-picker/DatePicker.js +2 -2
  16. package/lib/cjs/date-picker/DatePicker.js.map +1 -1
  17. package/lib/cjs/dialog/Dialog.js +1 -1
  18. package/lib/cjs/dialog/Dialog.js.map +1 -1
  19. package/lib/cjs/drawer/Drawer.js +1 -1
  20. package/lib/cjs/drawer/Drawer.js.map +1 -1
  21. package/lib/cjs/dropzone/Dropzone.js +2 -2
  22. package/lib/cjs/dropzone/Dropzone.js.map +1 -1
  23. package/lib/cjs/icons/index.js +1 -1
  24. package/lib/cjs/index.js +4 -2
  25. package/lib/cjs/index.js.map +1 -1
  26. package/lib/cjs/inline-edit/InlineEdit.js +1 -1
  27. package/lib/cjs/inline-edit/InlineEdit.js.map +1 -1
  28. package/lib/cjs/inline-edit/utils.js +2 -4
  29. package/lib/cjs/inline-edit/utils.js.map +1 -1
  30. package/lib/cjs/search-field/SearchField.js +94 -0
  31. package/lib/cjs/search-field/SearchField.js.map +1 -0
  32. package/lib/cjs/search-field/index.js +30 -0
  33. package/lib/cjs/search-field/index.js.map +1 -0
  34. package/lib/cjs/side-navigation/SideNavigation.js +2 -2
  35. package/lib/cjs/side-navigation/SideNavigation.js.map +1 -1
  36. package/lib/cjs/spotlight/Spotlight.js +1 -1
  37. package/lib/cjs/spotlight/Spotlight.js.map +1 -1
  38. package/lib/cjs/tabs/Tabs.js +1 -1
  39. package/lib/cjs/tabs/Tabs.js.map +1 -1
  40. package/lib/cjs/text-input/TextInput.js +1 -1
  41. package/lib/cjs/text-input/TextInput.js.map +1 -1
  42. package/lib/cjs/tooltip/Tooltip.js +1 -1
  43. package/lib/cjs/tooltip/Tooltip.js.map +1 -1
  44. package/lib/cjs/tree-view/TreeViewTextItem.js +1 -1
  45. package/lib/cjs/tree-view/TreeViewTextItem.js.map +1 -1
  46. package/lib/esm/accordion/Accordion.mjs +2 -2
  47. package/lib/esm/accordion/Accordion.mjs.map +1 -1
  48. package/lib/esm/ai/preview/Preview.mjs +1 -1
  49. package/lib/esm/ai/preview/Preview.mjs.map +1 -1
  50. package/lib/esm/ai/reasoning/Reasoning.mjs +2 -2
  51. package/lib/esm/ai/reasoning/Reasoning.mjs.map +1 -1
  52. package/lib/esm/ai/thinking/Thinking.mjs +2 -2
  53. package/lib/esm/ai/thinking/Thinking.mjs.map +1 -1
  54. package/lib/esm/avatar/Avatar.mjs +1 -1
  55. package/lib/esm/avatar/Avatar.mjs.map +1 -1
  56. package/lib/esm/banner/Banner.mjs +1 -1
  57. package/lib/esm/banner/Banner.mjs.map +1 -1
  58. package/lib/esm/data-grid/Components.mjs +1 -1
  59. package/lib/esm/data-grid/Components.mjs.map +1 -1
  60. package/lib/esm/date-picker/DatePicker.mjs +2 -2
  61. package/lib/esm/date-picker/DatePicker.mjs.map +1 -1
  62. package/lib/esm/dialog/Dialog.mjs +1 -1
  63. package/lib/esm/dialog/Dialog.mjs.map +1 -1
  64. package/lib/esm/drawer/Drawer.mjs +1 -1
  65. package/lib/esm/drawer/Drawer.mjs.map +1 -1
  66. package/lib/esm/dropzone/Dropzone.mjs +2 -2
  67. package/lib/esm/dropzone/Dropzone.mjs.map +1 -1
  68. package/lib/esm/icons/index.mjs +1 -1
  69. package/lib/esm/index.mjs +4 -3
  70. package/lib/esm/index.mjs.map +1 -1
  71. package/lib/esm/inline-edit/InlineEdit.mjs +1 -1
  72. package/lib/esm/inline-edit/InlineEdit.mjs.map +1 -1
  73. package/lib/esm/inline-edit/utils.mjs +2 -4
  74. package/lib/esm/inline-edit/utils.mjs.map +1 -1
  75. package/lib/esm/search-field/SearchField.mjs +89 -0
  76. package/lib/esm/search-field/SearchField.mjs.map +1 -0
  77. package/lib/esm/search-field/index.mjs +24 -0
  78. package/lib/esm/search-field/index.mjs.map +1 -0
  79. package/lib/esm/side-navigation/SideNavigation.mjs +2 -2
  80. package/lib/esm/side-navigation/SideNavigation.mjs.map +1 -1
  81. package/lib/esm/spotlight/Spotlight.mjs +1 -1
  82. package/lib/esm/spotlight/Spotlight.mjs.map +1 -1
  83. package/lib/esm/tabs/Tabs.mjs +1 -1
  84. package/lib/esm/tabs/Tabs.mjs.map +1 -1
  85. package/lib/esm/text-input/TextInput.mjs +1 -1
  86. package/lib/esm/text-input/TextInput.mjs.map +1 -1
  87. package/lib/esm/tooltip/Tooltip.mjs +1 -1
  88. package/lib/esm/tooltip/Tooltip.mjs.map +1 -1
  89. package/lib/esm/tree-view/TreeViewTextItem.mjs +1 -1
  90. package/lib/esm/tree-view/TreeViewTextItem.mjs.map +1 -1
  91. package/lib/types/ai/thinking/Thinking.d.ts.map +1 -1
  92. package/lib/types/index.d.ts +1 -0
  93. package/lib/types/index.d.ts.map +1 -1
  94. package/lib/types/inline-edit/InlineEdit.d.ts +1 -1
  95. package/lib/types/inline-edit/utils.d.ts.map +1 -1
  96. package/lib/types/search-field/SearchField.d.ts +52 -0
  97. package/lib/types/search-field/SearchField.d.ts.map +1 -0
  98. package/lib/types/search-field/index.d.ts +22 -0
  99. package/lib/types/search-field/index.d.ts.map +1 -0
  100. package/package.json +9 -3
  101. package/skills/ndl-react/SKILL.md +3 -2
  102. package/skills/ndl-react/components/accordion.md +3 -3
  103. package/skills/ndl-react/components/clean-icon-button.md +5 -5
  104. package/skills/ndl-react/components/date-picker.md +2 -2
  105. package/skills/ndl-react/components/dropzone.md +2 -2
  106. package/skills/ndl-react/components/icon-button.md +5 -5
  107. package/skills/ndl-react/components/inline-edit.md +1 -1
  108. package/skills/ndl-react/components/radio.md +1 -1
  109. package/skills/ndl-react/components/search-field.md +254 -0
  110. package/skills/ndl-react/components/select-icon-button.md +6 -6
  111. package/skills/ndl-react/components/side-navigation.md +4 -4
  112. package/skills/ndl-react/components/skeleton.md +3 -3
  113. package/skills/ndl-react/components/status-indicator.md +5 -5
  114. package/skills/ndl-react/components/tabs.md +4 -4
  115. package/skills/ndl-react/components/timezone-picker.md +1 -1
  116. package/skills/ndl-react/components/tooltip.md +1 -1
  117. package/skills/ndl-react/components/typography.md +2 -2
  118. package/skills/ndl-react/references/styling.md +1 -1
@@ -0,0 +1,254 @@
1
+ [//]: # (This file is auto-generated by the docs:generate-skills script, do not edit it manually)
2
+
3
+ # SearchField
4
+
5
+ Import: `import { SearchField } from '@neo4j-ndl/react'`
6
+
7
+ ## Props
8
+
9
+ ### SearchField
10
+
11
+ | Prop | Type | Required | Default | Description |
12
+ |------|------|----------|---------|-------------|
13
+ | `debounceDelay` | `number` | | `500` | Delay in milliseconds before calling `onSearch` after the query changes. |
14
+ | `errorText` | `ReactNode` | | | Error message displayed below the input. When provided, it overrides `helpText` and shows an error icon |
15
+ | `helpText` | `ReactNode` | | | Assistive text displayed below the input |
16
+ | `isDisabled` | `boolean` | | | Whether the input is disabled |
17
+ | `isFluid` | `boolean` | | | Whether the input should take the full available width |
18
+ | `isLoading` | `boolean` | | | Whether to show the loading spinner |
19
+ | `isReadOnly` | `boolean` | | | Whether the input is read-only |
20
+ | `isSkeletonLoading` | `boolean` | | | Whether to render skeletons instead of content |
21
+ | `label` | `string` | ✅ | | Accessible name for the search field. The label is announced by assistive technologies but is not rendered visually. |
22
+ | `onChange` | `ChangeEventHandler<HTMLInputElement, HTMLInputElement>` | | | Callback function triggered when the input value changes |
23
+ | `onSearch` | `((query: string) => void)` | | | Called with the search query after typing pauses for `debounceDelay`, and immediately when the user presses Enter or clears the field. |
24
+ | `placeholder` | `string` | | | Placeholder text displayed when the input is empty |
25
+ | `ref` | `Ref<HTMLInputElement>` | | | A ref to apply to the root element. |
26
+ | `size` | `'large' \| 'medium' \| 'small'` | | | Size of the input |
27
+ | `skeletonProps` | `(SkeletonProps & { as?: ElementType<any, keyof IntrinsicElements>; } & BaseProps<ElementType<any, keyof IntrinsicElements>>)` | | | Additional props forwarded to the underlying Skeleton components |
28
+ | `value` | `string \| number \| readonly string[]` | | | The current value of the input |
29
+
30
+ SearchField renders a fixed search icon and uses the native `search` input
31
+ type. `onChange` is called immediately, while `onSearch` is debounced until
32
+ typing pauses. Pressing Enter or clearing the field calls `onSearch`
33
+ immediately.
34
+
35
+ ## Accessibility
36
+
37
+ ## Implementation guidelines
38
+
39
+ ### Name and search landmark
40
+
41
+ The required `label` prop provides the search field's accessible name through `aria-label`; it is not displayed visually. Use a concise label that identifies the search scope or purpose, such as “Search documentation” rather than only “Search,” when context is needed. Do not pass a separate `aria-label` through `htmlAttributes`.
42
+
43
+ SearchField uses the native `search` input type and is exposed with the `searchbox` role.
44
+
45
+ Wrap the field in an element with `role="search"` when it provides page- or site-wide search. If a page has multiple search landmarks, give each landmark a distinct accessible name with `aria-label` or `aria-labelledby`.
46
+
47
+ ### Results and status messages
48
+
49
+ Present results with appropriate page structure, such as a heading followed by a list of links. Keep focus in the search field when results update; do not automatically move focus into the results. This lets keyboard and screen reader users decide when to navigate to them.
50
+
51
+ Announce the completed result count in a persistent, polite live region, for example, “7 results for Neo4j” or “No results for Neo4j.” A `role="status"` region with `aria-atomic="true"` supports WCAG 2.2 SC 4.1.3 Status Messages (Level AA). Mount the empty status region before a search starts, update only its text, and do not place interactive content inside it.
52
+
53
+ For asynchronous searches, set `aria-busy="true"` on the results container while it is updating and remove it when the update completes. Communicate loading, failure, and recovery without clearing existing results prematurely. Avoid having multiple live regions announce the same update.
54
+
55
+ SearchField is not an autocomplete or combobox. If typing opens a selectable suggestions popup, use Combobox or implement the complete combobox keyboard and ARIA pattern rather than adding only `aria-expanded` to SearchField.
56
+
57
+ ### Interaction
58
+
59
+ SearchField is always clearable. Pressing Escape clears a non-empty search field without moving focus. The same action is available with a pointer from the clear button.
60
+
61
+ `onChange` runs immediately so controlled fields can update their visible value as the user types. `onSearch` is debounced while typing, but runs immediately when the field is cleared or the user presses Enter.
62
+
63
+ If a consumer prevents the default Enter key behavior in `htmlAttributes.onKeyDown`, `onSearch` is not called.
64
+
65
+ ## Examples
66
+
67
+ ### Default
68
+
69
+ ```tsx
70
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
71
+
72
+ import { SearchField } from '@neo4j-ndl/react';
73
+
74
+ const Component = () => {
75
+ return <SearchField label="Search" placeholder="Search for something" />;
76
+ };
77
+
78
+ export default Component;
79
+ ```
80
+
81
+ ### Debounced
82
+
83
+ ```tsx
84
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
85
+
86
+ import { SearchField, Typography } from '@neo4j-ndl/react';
87
+ import { useState } from 'react';
88
+
89
+ const Component = () => {
90
+ const [query, setQuery] = useState('');
91
+
92
+ return (
93
+ <div>
94
+ <SearchField
95
+ label="Search"
96
+ placeholder="Search for something"
97
+ onSearch={setQuery}
98
+ />
99
+ <Typography as="p" variant="body-medium">
100
+ Latest query: {query || 'None'}
101
+ </Typography>
102
+ </div>
103
+ );
104
+ };
105
+
106
+ export default Component;
107
+ ```
108
+
109
+ ### Results
110
+
111
+ ```tsx
112
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
113
+
114
+ import { SearchField, Typography } from '@neo4j-ndl/react';
115
+ import { useEffect, useState } from 'react';
116
+
117
+ const documentationPages = [
118
+ {
119
+ description: 'Connect an application and run your first query.',
120
+ href: '#getting-started',
121
+ title: 'Getting started',
122
+ },
123
+ {
124
+ description: 'Learn how nodes, relationships, and properties work.',
125
+ href: '#graph-data-model',
126
+ title: 'Graph data model',
127
+ },
128
+ {
129
+ description: 'Read and write graph data with the Cypher query language.',
130
+ href: '#cypher-manual',
131
+ title: 'Cypher manual',
132
+ },
133
+ {
134
+ description: 'Configure drivers, authentication, and connection pooling.',
135
+ href: '#drivers',
136
+ title: 'Neo4j drivers',
137
+ },
138
+ {
139
+ description: 'Deploy and operate Neo4j in production.',
140
+ href: '#operations',
141
+ title: 'Operations manual',
142
+ },
143
+ ];
144
+
145
+ const Component = () => {
146
+ const [isLoading, setIsLoading] = useState(false);
147
+ const [query, setQuery] = useState<string | null>(null);
148
+ const [resultMessage, setResultMessage] = useState(
149
+ `${documentationPages.length} results`,
150
+ );
151
+ const [results, setResults] = useState(documentationPages);
152
+
153
+ useEffect(() => {
154
+ if (query === null) {
155
+ return;
156
+ }
157
+
158
+ setIsLoading(true);
159
+
160
+ const timeout = window.setTimeout(() => {
161
+ const normalizedQuery = query.trim().toLocaleLowerCase();
162
+ const nextResults = documentationPages.filter(({ description, title }) =>
163
+ `${title} ${description}`.toLocaleLowerCase().includes(normalizedQuery),
164
+ );
165
+ const querySuffix = query ? ` for ${query}` : '';
166
+
167
+ setResults(nextResults);
168
+ setResultMessage(
169
+ nextResults.length === 0
170
+ ? `No results${querySuffix}`
171
+ : `${nextResults.length} ${
172
+ nextResults.length === 1 ? 'result' : 'results'
173
+ }${querySuffix}`,
174
+ );
175
+ setIsLoading(false);
176
+ }, 400);
177
+
178
+ return () => {
179
+ window.clearTimeout(timeout);
180
+ };
181
+ }, [query]);
182
+
183
+ return (
184
+ <main
185
+ style={{
186
+ display: 'grid',
187
+ gap: '24px',
188
+ maxWidth: '640px',
189
+ width: '100%',
190
+ }}
191
+ >
192
+ <div role="search" aria-label="Documentation">
193
+ <SearchField
194
+ label="Search documentation"
195
+ placeholder="Search documentation"
196
+ isLoading={isLoading}
197
+ onSearch={setQuery}
198
+ />
199
+ </div>
200
+
201
+ <section aria-labelledby="search-results-heading">
202
+ <Typography
203
+ as="h2"
204
+ variant="title-3"
205
+ htmlAttributes={{ id: 'search-results-heading' }}
206
+ >
207
+ Documentation
208
+ </Typography>
209
+ <Typography
210
+ as="p"
211
+ variant="body-medium"
212
+ htmlAttributes={{ 'aria-atomic': 'true', role: 'status' }}
213
+ >
214
+ {resultMessage}
215
+ </Typography>
216
+ <div aria-busy={isLoading || undefined}>
217
+ {results.length > 0 ? (
218
+ <ul
219
+ style={{
220
+ display: 'grid',
221
+ gap: '16px',
222
+ listStyle: 'none',
223
+ margin: '16px 0 0',
224
+ padding: 0,
225
+ }}
226
+ >
227
+ {results.map(({ description, href, title }) => (
228
+ <li key={href}>
229
+ <Typography
230
+ as="a"
231
+ variant="body-medium"
232
+ htmlAttributes={{ href }}
233
+ >
234
+ {title}
235
+ </Typography>
236
+ <Typography
237
+ as="p"
238
+ variant="body-small"
239
+ style={{ margin: '4px 0 0' }}
240
+ >
241
+ {description}
242
+ </Typography>
243
+ </li>
244
+ ))}
245
+ </ul>
246
+ ) : null}
247
+ </div>
248
+ </section>
249
+ </main>
250
+ );
251
+ };
252
+
253
+ export default Component;
254
+ ```
@@ -57,19 +57,19 @@ const Component = () => {
57
57
  <SelectIconButton description="Select" size="small" isOpen={false}>
58
58
  <SelectIcon />
59
59
  </SelectIconButton>
60
- <Typography variant="label"> Small</Typography>
60
+ <Typography variant="title-4"> Small</Typography>
61
61
  </div>
62
62
  <div className="flex flex-row gap-token-16 items-center">
63
63
  <SelectIconButton description="Select" size="medium" isOpen={false}>
64
64
  <SelectIcon />
65
65
  </SelectIconButton>
66
- <Typography variant="label"> Medium</Typography>
66
+ <Typography variant="title-4"> Medium</Typography>
67
67
  </div>
68
68
  <div className="flex flex-row gap-token-16 items-center">
69
69
  <SelectIconButton description="Select" size="large" isOpen={false}>
70
70
  <SelectIcon />
71
71
  </SelectIconButton>
72
- <Typography variant="label"> Large</Typography>
72
+ <Typography variant="title-4"> Large</Typography>
73
73
  </div>
74
74
  </div>
75
75
  );
@@ -98,13 +98,13 @@ const Component = () => {
98
98
  >
99
99
  <SelectIcon />
100
100
  </SelectIconButton>
101
- <Typography variant="label"> Disabled</Typography>
101
+ <Typography variant="title-4"> Disabled</Typography>
102
102
  </div>
103
103
  <div className="flex flex-row gap-token-16 items-center">
104
104
  <SelectIconButton description="Select" size="small" isOpen={true}>
105
105
  <SelectIcon />
106
106
  </SelectIconButton>
107
- <Typography variant="label"> Active</Typography>
107
+ <Typography variant="title-4"> Active</Typography>
108
108
  </div>
109
109
  <div className="flex flex-row gap-token-16 items-center">
110
110
  <SelectIconButton
@@ -116,7 +116,7 @@ const Component = () => {
116
116
  >
117
117
  <SelectIcon />
118
118
  </SelectIconButton>
119
- <Typography variant="label"> Loading</Typography>
119
+ <Typography variant="title-4"> Loading</Typography>
120
120
  </div>
121
121
  </div>
122
122
  );
@@ -190,7 +190,7 @@ const Component = () => {
190
190
  <div className="h-full w-full">
191
191
  <div className="flex flex-col p-8 w-full max-w-[1024px] mx-auto">
192
192
  <div className="flex flex-col gap-token-8 bg-neutral-bg-weak p-token-32 rounded-lg items-center justify-center">
193
- <Typography variant="title-4">Side Nav with Badges</Typography>
193
+ <Typography variant="title-3">Side Nav with Badges</Typography>
194
194
  <Typography variant="body-medium">
195
195
  Badges can be used to indicate that there are actions that need
196
196
  attention from the user on the specific page. The badge can have
@@ -320,7 +320,7 @@ const Component = () => {
320
320
  <div className="h-full w-full">
321
321
  <div className="flex flex-col p-8 w-full max-w-[1024px] mx-auto">
322
322
  <div className="flex flex-col gap-token-8 bg-neutral-bg-weak p-token-32 rounded-lg items-center justify-center">
323
- <Typography variant="title-4">Compact Side Nav</Typography>
323
+ <Typography variant="title-3">Compact Side Nav</Typography>
324
324
  <Typography variant="body-medium">
325
325
  When using a compact side nav you must make sure to set a
326
326
  <b> label</b> on the NavItems, as the label will be used for the
@@ -449,7 +449,7 @@ const Component = () => {
449
449
  <div className="h-full w-full">
450
450
  <div className="flex flex-col p-8 w-full max-w-[1024px] mx-auto">
451
451
  <div className="flex flex-col gap-token-8 bg-neutral-bg-weak p-token-32 rounded-lg items-center justify-center">
452
- <Typography variant="title-4">Default Side Nav</Typography>
452
+ <Typography variant="title-3">Default Side Nav</Typography>
453
453
  <Typography variant="body-medium">
454
454
  This is the default behavior for a side nav. It expands on hover,
455
455
  and can be pinned to stay expanded.
@@ -637,7 +637,7 @@ const Component = () => {
637
637
  <div className="h-full w-full">
638
638
  <div className="flex flex-col p-8 w-full max-w-[1024px] mx-auto">
639
639
  <div className="flex flex-col gap-token-8 bg-neutral-bg-weak p-token-32 rounded-lg items-center justify-center">
640
- <Typography variant="title-4">Secondary Side Nav</Typography>
640
+ <Typography variant="title-3">Secondary Side Nav</Typography>
641
641
  <Typography variant="body-medium">
642
642
  If a page requires its own navigation, you can use a secondary
643
643
  side nav. The secondary side nav is always expanded and does not
@@ -194,7 +194,7 @@ const Component = () => {
194
194
  </defs>
195
195
  </svg>
196
196
  </div>
197
- <Typography variant="title-3">Customer stories</Typography>
197
+ <Typography variant="title-2">Customer stories</Typography>
198
198
  <Typography variant="body-medium">
199
199
  Customer success stories across industries
200
200
  </Typography>
@@ -213,7 +213,7 @@ const Component = () => {
213
213
  onBackground="weak"
214
214
  width="80%"
215
215
  >
216
- <Typography variant="title-3">Customer stories</Typography>
216
+ <Typography variant="title-2">Customer stories</Typography>
217
217
  </Skeleton>
218
218
  <Skeleton className="w-full" onBackground="weak" width="60%">
219
219
  <Typography variant="body-medium">Customer</Typography>
@@ -266,7 +266,7 @@ const Component = () => {
266
266
  </Typography>
267
267
  </Skeleton>
268
268
  <Skeleton shape="rectangular">
269
- <Typography variant="title-3">Shorter text</Typography>
269
+ <Typography variant="title-2">Shorter text</Typography>
270
270
  </Skeleton>
271
271
  </div>
272
272
  );
@@ -33,23 +33,23 @@ const Component = () => {
33
33
  <div className="flex gap-token-16">
34
34
  <div className="flex flex-col items-center gap-token-8">
35
35
  <StatusIndicator variant="unknown" />
36
- <Typography variant="label">Unknown</Typography>
36
+ <Typography variant="title-4">Unknown</Typography>
37
37
  </div>
38
38
  <div className="flex flex-col items-center gap-token-8">
39
39
  <StatusIndicator variant="success" />
40
- <Typography variant="label">Success</Typography>
40
+ <Typography variant="title-4">Success</Typography>
41
41
  </div>
42
42
  <div className="flex flex-col items-center gap-token-8">
43
43
  <StatusIndicator variant="info" />
44
- <Typography variant="label">Info</Typography>
44
+ <Typography variant="title-4">Info</Typography>
45
45
  </div>
46
46
  <div className="flex flex-col items-center gap-token-8">
47
47
  <StatusIndicator variant="warning" />
48
- <Typography variant="label">Warning</Typography>
48
+ <Typography variant="title-4">Warning</Typography>
49
49
  </div>
50
50
  <div className="flex flex-col items-center gap-token-8">
51
51
  <StatusIndicator variant="danger" />
52
- <Typography variant="label">Danger</Typography>
52
+ <Typography variant="title-4">Danger</Typography>
53
53
  </div>
54
54
  </div>
55
55
  );
@@ -188,7 +188,7 @@ const Component = () => {
188
188
  return (
189
189
  <div className="flex gap-token-8">
190
190
  <div className="flex flex-col gap-token-32">
191
- <Typography variant="label">Underline (Default)</Typography>
191
+ <Typography variant="title-4">Underline (Default)</Typography>
192
192
  <div>
193
193
  <Tabs
194
194
  value={underlineValue}
@@ -212,7 +212,7 @@ const Component = () => {
212
212
  </div>
213
213
 
214
214
  <div className="flex flex-col gap-token-8">
215
- <Typography variant="label">Filled</Typography>
215
+ <Typography variant="title-4">Filled</Typography>
216
216
  <div>
217
217
  <Tabs
218
218
  value={filledValue}
@@ -323,7 +323,7 @@ const Component = () => {
323
323
  return (
324
324
  <div className="flex gap-token-8">
325
325
  <div className="flex flex-col gap-token-8">
326
- <Typography variant="label">Small Size</Typography>
326
+ <Typography variant="title-4">Small Size</Typography>
327
327
  <div className="w-fit">
328
328
  <Tabs
329
329
  value={smallValue}
@@ -354,7 +354,7 @@ const Component = () => {
354
354
  </div>
355
355
 
356
356
  <div className="flex flex-col gap-token-8">
357
- <Typography variant="label">Large Size (Default)</Typography>
357
+ <Typography variant="title-4">Large Size (Default)</Typography>
358
358
  <Tabs
359
359
  value={largeValue}
360
360
  onChange={setLargeValue}
@@ -76,7 +76,7 @@ export const TimeZonePickerBothMode = () => {
76
76
 
77
77
  return (
78
78
  <div style={{ maxWidth: '400px', padding: '20px' }}>
79
- <Typography variant="title-4" style={{ marginBottom: '16px' }}>
79
+ <Typography variant="title-3" style={{ marginBottom: '16px' }}>
80
80
  Both Mode - UTC and City-Based Timezones
81
81
  </Typography>
82
82
  <Typography variant="body-medium" style={{ marginBottom: '24px' }}>
@@ -53,7 +53,7 @@ Import: `import { Tooltip } from '@neo4j-ndl/react'`
53
53
  | `children` | `ReactNode` | ✅ | | Content displayed inside the header |
54
54
  | `passThroughProps` | `Partial<Omit<TypographyProps & { as?: ElementType<any, keyof IntrinsicElements>; } & BaseProps<ElementType<any, keyof IntrinsicElements>>, "ref">>` | | | @deprecated Use `typographyVariant` instead |
55
55
  | `ref` | `Ref<HTMLSpanElement>` | | | A ref to apply to the root element. |
56
- | `typographyVariant` | `'body-large' \| 'body-medium' \| 'body-small' \| 'code' \| 'display' \| 'label' \| 'subheading-large' \| 'subheading-medium' \| 'subheading-small' \| 'title-1' \| 'title-2' \| 'title-3' \| 'title-4'` | | `subheading-medium` | |
56
+ | `typographyVariant` | `'body-large' \| 'body-medium' \| 'body-small' \| 'code' \| 'display' \| 'subheading-large' \| 'subheading-medium' \| 'subheading-small' \| 'title-1' \| 'title-2' \| 'title-3' \| 'title-4'` | | `subheading-large` | |
57
57
 
58
58
  ### Tooltip.Trigger
59
59
 
@@ -13,7 +13,7 @@ Import: `import { Typography } from '@neo4j-ndl/react'`
13
13
  | `as` | `ElementType<any, keyof IntrinsicElements>` | | | An override of the default HTML tag of the root of the component. Can also be another React component. |
14
14
  | `children` | `ReactNode` | | | Content displayed inside the component |
15
15
  | `ref` | `any` | | | A ref to apply to the root element. |
16
- | `variant` | `'body-large' \| 'body-medium' \| 'body-small' \| 'code' \| 'display' \| 'label' \| 'subheading-large' \| 'subheading-medium' \| 'subheading-small' \| 'title-1' \| 'title-2' \| 'title-3' \| 'title-4'` | ✅ | | The typography variant to use for the text. |
16
+ | `variant` | `'body-large' \| 'body-medium' \| 'body-small' \| 'code' \| 'display' \| 'subheading-large' \| 'subheading-medium' \| 'subheading-small' \| 'title-1' \| 'title-2' \| 'title-3' \| 'title-4'` | ✅ | | The typography variant to use for the text. |
17
17
 
18
18
  Renders the public `ndl-typography-<variant>` class from `@neo4j-ndl/base`
19
19
  (for example `ndl-typography-body-medium`). The same classes can be applied
@@ -41,7 +41,7 @@ export default Component;
41
41
  import { Typography } from '../Typography';
42
42
 
43
43
  const Component = () => {
44
- const variant = 'title-1';
44
+ const variant = 'title-2';
45
45
 
46
46
  return (
47
47
  <Typography as="a" htmlAttributes={{ href: '/index' }} variant={variant}>
@@ -23,7 +23,7 @@ the prebuilt stylesheet ships only two groups of classes meant for consumers:
23
23
 
24
24
  | Group | Classes | Why they ship |
25
25
  |-------|---------|---------------|
26
- | Typography | `ndl-typography-display`, `ndl-typography-title-1` … `ndl-typography-title-4`, `ndl-typography-subheading-large/medium/small`, `ndl-typography-body-large/medium/small`, `ndl-typography-label`, `ndl-typography-code` (the legacy `n-display`, `n-body-medium`, … names still work as aliases) | Defined directly in the base typography stylesheet |
26
+ | Typography | `ndl-typography-display`, `ndl-typography-title-1` … `ndl-typography-title-4`, `ndl-typography-subheading-large/medium/small`, `ndl-typography-body-large/medium/small`, `ndl-typography-code` (the legacy `n-display`, `n-body-medium`, … names still work as aliases) | Defined directly in the base typography stylesheet |
27
27
  | Semantic colors | `text-*`, `bg-*`, `border-*` for the color families below, plus `hover:` variants (and `active:` for `bg-*`) | Safelisted in the Tailwind preset |
28
28
 
29
29
  **Only `ndl-typography-*` and `ndl-theme-light`/`ndl-theme-dark` are public