@neo4j-ndl/react 5.7.0 → 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.
- package/lib/cjs/accordion/Accordion.js +2 -2
- package/lib/cjs/accordion/Accordion.js.map +1 -1
- package/lib/cjs/ai/preview/Preview.js +1 -1
- package/lib/cjs/ai/preview/Preview.js.map +1 -1
- package/lib/cjs/ai/reasoning/Reasoning.js +2 -2
- package/lib/cjs/ai/reasoning/Reasoning.js.map +1 -1
- package/lib/cjs/ai/thinking/Thinking.js +2 -2
- package/lib/cjs/ai/thinking/Thinking.js.map +1 -1
- package/lib/cjs/avatar/Avatar.js +1 -1
- package/lib/cjs/avatar/Avatar.js.map +1 -1
- package/lib/cjs/banner/Banner.js +1 -1
- package/lib/cjs/banner/Banner.js.map +1 -1
- package/lib/cjs/data-grid/Components.js +1 -1
- package/lib/cjs/data-grid/Components.js.map +1 -1
- package/lib/cjs/date-picker/DatePicker.js +2 -2
- package/lib/cjs/date-picker/DatePicker.js.map +1 -1
- package/lib/cjs/dialog/Dialog.js +1 -1
- package/lib/cjs/dialog/Dialog.js.map +1 -1
- package/lib/cjs/drawer/Drawer.js +1 -1
- package/lib/cjs/drawer/Drawer.js.map +1 -1
- package/lib/cjs/dropzone/Dropzone.js +2 -2
- package/lib/cjs/dropzone/Dropzone.js.map +1 -1
- package/lib/cjs/inline-edit/InlineEdit.js +1 -1
- package/lib/cjs/inline-edit/InlineEdit.js.map +1 -1
- package/lib/cjs/inline-edit/utils.js +2 -4
- package/lib/cjs/inline-edit/utils.js.map +1 -1
- package/lib/cjs/side-navigation/SideNavigation.js +2 -2
- package/lib/cjs/side-navigation/SideNavigation.js.map +1 -1
- package/lib/cjs/spotlight/Spotlight.js +1 -1
- package/lib/cjs/spotlight/Spotlight.js.map +1 -1
- package/lib/cjs/tabs/Tabs.js +1 -1
- package/lib/cjs/tabs/Tabs.js.map +1 -1
- package/lib/cjs/tooltip/Tooltip.js +1 -1
- package/lib/cjs/tooltip/Tooltip.js.map +1 -1
- package/lib/cjs/tree-view/TreeViewTextItem.js +1 -1
- package/lib/cjs/tree-view/TreeViewTextItem.js.map +1 -1
- package/lib/esm/accordion/Accordion.mjs +2 -2
- package/lib/esm/accordion/Accordion.mjs.map +1 -1
- package/lib/esm/ai/preview/Preview.mjs +1 -1
- package/lib/esm/ai/preview/Preview.mjs.map +1 -1
- package/lib/esm/ai/reasoning/Reasoning.mjs +2 -2
- package/lib/esm/ai/reasoning/Reasoning.mjs.map +1 -1
- package/lib/esm/ai/thinking/Thinking.mjs +2 -2
- package/lib/esm/ai/thinking/Thinking.mjs.map +1 -1
- package/lib/esm/avatar/Avatar.mjs +1 -1
- package/lib/esm/avatar/Avatar.mjs.map +1 -1
- package/lib/esm/banner/Banner.mjs +1 -1
- package/lib/esm/banner/Banner.mjs.map +1 -1
- package/lib/esm/data-grid/Components.mjs +1 -1
- package/lib/esm/data-grid/Components.mjs.map +1 -1
- package/lib/esm/date-picker/DatePicker.mjs +2 -2
- package/lib/esm/date-picker/DatePicker.mjs.map +1 -1
- package/lib/esm/dialog/Dialog.mjs +1 -1
- package/lib/esm/dialog/Dialog.mjs.map +1 -1
- package/lib/esm/drawer/Drawer.mjs +1 -1
- package/lib/esm/drawer/Drawer.mjs.map +1 -1
- package/lib/esm/dropzone/Dropzone.mjs +2 -2
- package/lib/esm/dropzone/Dropzone.mjs.map +1 -1
- package/lib/esm/inline-edit/InlineEdit.mjs +1 -1
- package/lib/esm/inline-edit/InlineEdit.mjs.map +1 -1
- package/lib/esm/inline-edit/utils.mjs +2 -4
- package/lib/esm/inline-edit/utils.mjs.map +1 -1
- package/lib/esm/side-navigation/SideNavigation.mjs +2 -2
- package/lib/esm/side-navigation/SideNavigation.mjs.map +1 -1
- package/lib/esm/spotlight/Spotlight.mjs +1 -1
- package/lib/esm/spotlight/Spotlight.mjs.map +1 -1
- package/lib/esm/tabs/Tabs.mjs +1 -1
- package/lib/esm/tabs/Tabs.mjs.map +1 -1
- package/lib/esm/tooltip/Tooltip.mjs +1 -1
- package/lib/esm/tooltip/Tooltip.mjs.map +1 -1
- package/lib/esm/tree-view/TreeViewTextItem.mjs +1 -1
- package/lib/esm/tree-view/TreeViewTextItem.mjs.map +1 -1
- package/lib/types/ai/thinking/Thinking.d.ts.map +1 -1
- package/lib/types/inline-edit/InlineEdit.d.ts +1 -1
- package/lib/types/inline-edit/utils.d.ts.map +1 -1
- package/package.json +4 -3
- package/skills/ndl-react/SKILL.md +2 -2
- package/skills/ndl-react/components/accordion.md +3 -3
- package/skills/ndl-react/components/clean-icon-button.md +5 -5
- package/skills/ndl-react/components/date-picker.md +2 -2
- package/skills/ndl-react/components/dropzone.md +2 -2
- package/skills/ndl-react/components/icon-button.md +5 -5
- package/skills/ndl-react/components/inline-edit.md +1 -1
- package/skills/ndl-react/components/radio.md +1 -1
- package/skills/ndl-react/components/select-icon-button.md +6 -6
- package/skills/ndl-react/components/side-navigation.md +4 -4
- package/skills/ndl-react/components/skeleton.md +3 -3
- package/skills/ndl-react/components/status-indicator.md +5 -5
- package/skills/ndl-react/components/tabs.md +4 -4
- package/skills/ndl-react/components/timezone-picker.md +1 -1
- package/skills/ndl-react/components/tooltip.md +1 -1
- package/skills/ndl-react/components/typography.md +2 -2
- package/skills/ndl-react/references/styling.md +1 -1
|
@@ -25,7 +25,7 @@ Import: `import { InlineEdit } from '@neo4j-ndl/react'`
|
|
|
25
25
|
| `onConfirm` | `((value: string, event?: MouseEvent<HTMLElement, MouseEvent> \| KeyboardEvent<HTMLElement>) => void)` | | | Callback when confirm icon button is pressed |
|
|
26
26
|
| `placeholder` | `string` | ✅ | | Placeholder text displayed when the input is empty. |
|
|
27
27
|
| `ref` | `any` | | | A ref to apply to the root element. |
|
|
28
|
-
| `typographyVariant` | `'body-large' \| 'body-medium' \| 'body-small' \| 'code' \| 'display' \| '
|
|
28
|
+
| `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` | The typographyVariant of the component applied to Typography as its variant. |
|
|
29
29
|
| `value` | `string` | | | The input value. Makes the component controlled. |
|
|
30
30
|
|
|
31
31
|
## Accessibility
|
|
@@ -77,7 +77,7 @@ import { Radio, Typography } from '@neo4j-ndl/react';
|
|
|
77
77
|
const Component = () => {
|
|
78
78
|
return (
|
|
79
79
|
<Radio
|
|
80
|
-
label={<Typography variant="
|
|
80
|
+
label={<Typography variant="title-4">Custom label</Typography>}
|
|
81
81
|
ariaLabel="example aria label"
|
|
82
82
|
/>
|
|
83
83
|
);
|
|
@@ -57,19 +57,19 @@ const Component = () => {
|
|
|
57
57
|
<SelectIconButton description="Select" size="small" isOpen={false}>
|
|
58
58
|
<SelectIcon />
|
|
59
59
|
</SelectIconButton>
|
|
60
|
-
<Typography variant="
|
|
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="
|
|
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="
|
|
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="
|
|
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="
|
|
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="
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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="
|
|
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="
|
|
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="
|
|
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="
|
|
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="
|
|
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="
|
|
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="
|
|
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="
|
|
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="
|
|
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-
|
|
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' \| '
|
|
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' \| '
|
|
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-
|
|
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-
|
|
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
|