@neo4j-ndl/react 4.3.5 → 4.4.0
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/ai/presence/Presence.js +1 -0
- package/lib/cjs/ai/presence/Presence.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/data-grid/stories/datagrid-single-selectable.story.js +0 -24
- package/lib/cjs/data-grid/stories/datagrid-single-selectable.story.js.map +1 -1
- package/lib/cjs/date-picker/DatePicker.js.map +1 -1
- package/lib/cjs/dropdown-button/DropdownButton.js.map +1 -1
- package/lib/cjs/icon-button-base/IconButtonBase.js +5 -3
- package/lib/cjs/icon-button-base/IconButtonBase.js.map +1 -1
- package/lib/cjs/icons/generated/custom/DatabaseCross.js +1 -1
- package/lib/cjs/icons/generated/custom/DatabaseCross.js.map +1 -1
- package/lib/cjs/icons/generated/custom/DatabasePlus.js +1 -1
- package/lib/cjs/icons/generated/custom/DatabasePlus.js.map +1 -1
- package/lib/cjs/icons/generated/custom/GlobePin.js +1 -1
- package/lib/cjs/icons/generated/custom/GlobePin.js.map +1 -1
- package/lib/cjs/icons/generated/custom/PanelBottom.js +1 -1
- package/lib/cjs/icons/generated/custom/PanelBottom.js.map +1 -1
- package/lib/cjs/icons/generated/custom/PanelLeftCollapsed.js +30 -0
- package/lib/cjs/icons/generated/custom/PanelLeftCollapsed.js.map +1 -0
- package/lib/cjs/icons/generated/custom/PanelLeftExpanded.js +30 -0
- package/lib/cjs/icons/generated/custom/PanelLeftExpanded.js.map +1 -0
- package/lib/cjs/icons/generated/custom/PanelRightCollapsed.js +30 -0
- package/lib/cjs/icons/generated/custom/PanelRightCollapsed.js.map +1 -0
- package/lib/cjs/icons/generated/custom/PanelRightExpanded.js +30 -0
- package/lib/cjs/icons/generated/custom/PanelRightExpanded.js.map +1 -0
- package/lib/cjs/icons/generated/custom/ThreePanel.js +1 -1
- package/lib/cjs/icons/generated/custom/ThreePanel.js.map +1 -1
- package/lib/cjs/icons/generated/custom/index.js +9 -1
- package/lib/cjs/icons/generated/custom/index.js.map +1 -1
- package/lib/cjs/icons/wrapIcon.js +1 -1
- package/lib/cjs/icons/wrapIcon.js.map +1 -1
- package/lib/cjs/menu/stories/menu-custom-items.story.js +3 -1
- package/lib/cjs/menu/stories/menu-custom-items.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-default.story.js +3 -1
- package/lib/cjs/menu/stories/menu-default.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-in-dialog.story.js +5 -1
- package/lib/cjs/menu/stories/menu-in-dialog.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-in-popover.story.js +3 -1
- package/lib/cjs/menu/stories/menu-in-popover.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-nested.story.js +3 -1
- package/lib/cjs/menu/stories/menu-nested.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-placements.story.js +3 -1
- package/lib/cjs/menu/stories/menu-placements.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-with-category.story.js +1 -2
- package/lib/cjs/menu/stories/menu-with-category.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-with-disabled-item.story.js +1 -2
- package/lib/cjs/menu/stories/menu-with-disabled-item.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-with-divider.story.js +1 -2
- package/lib/cjs/menu/stories/menu-with-divider.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-with-icon.story.js +3 -1
- package/lib/cjs/menu/stories/menu-with-icon.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-with-keyboard-shortcuts.story.js +3 -1
- package/lib/cjs/menu/stories/menu-with-keyboard-shortcuts.story.js.map +1 -1
- package/lib/cjs/select/Select.js +25 -3
- package/lib/cjs/select/Select.js.map +1 -1
- package/lib/cjs/side-navigation/SideNavigation.js +1 -1
- package/lib/cjs/side-navigation/SideNavigation.js.map +1 -1
- package/lib/cjs/tabs/Tabs.js +1 -1
- package/lib/cjs/tabs/Tabs.js.map +1 -1
- package/lib/cjs/tabs/stories/tabs-overflow.story.js +1 -1
- package/lib/cjs/tabs/stories/tabs-overflow.story.js.map +1 -1
- package/lib/cjs/text-input/TextInput.js +33 -2
- package/lib/cjs/text-input/TextInput.js.map +1 -1
- package/lib/cjs/text-input/stories/index.js +9 -1
- package/lib/cjs/text-input/stories/index.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-clearable.story.js +30 -0
- package/lib/cjs/text-input/stories/text-input-clearable.story.js.map +1 -0
- package/lib/cjs/text-input/stories/text-input-loading-spinner.story.js +31 -0
- package/lib/cjs/text-input/stories/text-input-loading-spinner.story.js.map +1 -0
- package/lib/cjs/text-input/stories/text-input-with-icons.story.js +1 -3
- package/lib/cjs/text-input/stories/text-input-with-icons.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input.stories.js +61 -35
- package/lib/cjs/text-input/stories/text-input.stories.js.map +1 -1
- package/lib/cjs/wizard/Wizard.js +1 -1
- package/lib/cjs/wizard/Wizard.js.map +1 -1
- package/lib/esm/ai/presence/Presence.js +1 -0
- package/lib/esm/ai/presence/Presence.js.map +1 -1
- package/lib/esm/banner/Banner.js +1 -1
- package/lib/esm/banner/Banner.js.map +1 -1
- package/lib/esm/data-grid/Components.js +1 -1
- package/lib/esm/data-grid/Components.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-single-selectable.story.js +0 -24
- package/lib/esm/data-grid/stories/datagrid-single-selectable.story.js.map +1 -1
- package/lib/esm/date-picker/DatePicker.js.map +1 -1
- package/lib/esm/dropdown-button/DropdownButton.js.map +1 -1
- package/lib/esm/icon-button-base/IconButtonBase.js +5 -3
- package/lib/esm/icon-button-base/IconButtonBase.js.map +1 -1
- package/lib/esm/icons/generated/custom/DatabaseCross.js +2 -2
- package/lib/esm/icons/generated/custom/DatabaseCross.js.map +1 -1
- package/lib/esm/icons/generated/custom/DatabasePlus.js +1 -1
- package/lib/esm/icons/generated/custom/DatabasePlus.js.map +1 -1
- package/lib/esm/icons/generated/custom/GlobePin.js +1 -1
- package/lib/esm/icons/generated/custom/GlobePin.js.map +1 -1
- package/lib/esm/icons/generated/custom/PanelBottom.js +1 -1
- package/lib/esm/icons/generated/custom/PanelBottom.js.map +1 -1
- package/lib/esm/icons/generated/custom/PanelLeftCollapsed.js +28 -0
- package/lib/esm/icons/generated/custom/PanelLeftCollapsed.js.map +1 -0
- package/lib/esm/icons/generated/custom/PanelLeftExpanded.js +28 -0
- package/lib/esm/icons/generated/custom/PanelLeftExpanded.js.map +1 -0
- package/lib/esm/icons/generated/custom/PanelRightCollapsed.js +28 -0
- package/lib/esm/icons/generated/custom/PanelRightCollapsed.js.map +1 -0
- package/lib/esm/icons/generated/custom/PanelRightExpanded.js +28 -0
- package/lib/esm/icons/generated/custom/PanelRightExpanded.js.map +1 -0
- package/lib/esm/icons/generated/custom/ThreePanel.js +1 -1
- package/lib/esm/icons/generated/custom/ThreePanel.js.map +1 -1
- package/lib/esm/icons/generated/custom/index.js +4 -0
- package/lib/esm/icons/generated/custom/index.js.map +1 -1
- package/lib/esm/icons/wrapIcon.js +1 -1
- package/lib/esm/icons/wrapIcon.js.map +1 -1
- package/lib/esm/menu/stories/menu-custom-items.story.js +3 -1
- package/lib/esm/menu/stories/menu-custom-items.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-default.story.js +3 -1
- package/lib/esm/menu/stories/menu-default.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-in-dialog.story.js +5 -1
- package/lib/esm/menu/stories/menu-in-dialog.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-in-popover.story.js +3 -1
- package/lib/esm/menu/stories/menu-in-popover.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-nested.story.js +3 -1
- package/lib/esm/menu/stories/menu-nested.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-placements.story.js +3 -1
- package/lib/esm/menu/stories/menu-placements.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-with-category.story.js +1 -2
- package/lib/esm/menu/stories/menu-with-category.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-with-disabled-item.story.js +1 -2
- package/lib/esm/menu/stories/menu-with-disabled-item.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-with-divider.story.js +1 -2
- package/lib/esm/menu/stories/menu-with-divider.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-with-icon.story.js +3 -1
- package/lib/esm/menu/stories/menu-with-icon.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-with-keyboard-shortcuts.story.js +3 -1
- package/lib/esm/menu/stories/menu-with-keyboard-shortcuts.story.js.map +1 -1
- package/lib/esm/select/Select.js +26 -4
- package/lib/esm/select/Select.js.map +1 -1
- package/lib/esm/side-navigation/SideNavigation.js +1 -1
- package/lib/esm/side-navigation/SideNavigation.js.map +1 -1
- package/lib/esm/tabs/Tabs.js +1 -1
- package/lib/esm/tabs/Tabs.js.map +1 -1
- package/lib/esm/tabs/stories/tabs-overflow.story.js +1 -1
- package/lib/esm/tabs/stories/tabs-overflow.story.js.map +1 -1
- package/lib/esm/text-input/TextInput.js +35 -4
- package/lib/esm/text-input/TextInput.js.map +1 -1
- package/lib/esm/text-input/stories/index.js +6 -0
- package/lib/esm/text-input/stories/index.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-clearable.story.js +28 -0
- package/lib/esm/text-input/stories/text-input-clearable.story.js.map +1 -0
- package/lib/esm/text-input/stories/text-input-loading-spinner.story.js +29 -0
- package/lib/esm/text-input/stories/text-input-loading-spinner.story.js.map +1 -0
- package/lib/esm/text-input/stories/text-input-with-icons.story.js +3 -5
- package/lib/esm/text-input/stories/text-input-with-icons.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input.stories.js +61 -35
- package/lib/esm/text-input/stories/text-input.stories.js.map +1 -1
- package/lib/esm/wizard/Wizard.js +1 -1
- package/lib/esm/wizard/Wizard.js.map +1 -1
- package/lib/types/ai/presence/Presence.d.ts.map +1 -1
- package/lib/types/data-grid/Components.d.ts.map +1 -1
- package/lib/types/data-grid/stories/datagrid-single-selectable.story.d.ts.map +1 -1
- package/lib/types/dropdown-button/DropdownButton.d.ts +1 -1
- package/lib/types/dropdown-button/DropdownButton.d.ts.map +1 -1
- package/lib/types/icon-button-base/IconButtonBase.d.ts.map +1 -1
- package/lib/types/icons/generated/custom/DatabaseCross.d.ts.map +1 -1
- package/lib/types/icons/generated/custom/DatabasePlus.d.ts.map +1 -1
- package/lib/types/icons/generated/custom/GlobePin.d.ts.map +1 -1
- package/lib/types/icons/generated/custom/PanelLeftCollapsed.d.ts +29 -0
- package/lib/types/icons/generated/custom/PanelLeftCollapsed.d.ts.map +1 -0
- package/lib/types/icons/generated/custom/PanelLeftExpanded.d.ts +29 -0
- package/lib/types/icons/generated/custom/PanelLeftExpanded.d.ts.map +1 -0
- package/lib/types/icons/generated/custom/PanelRightCollapsed.d.ts +29 -0
- package/lib/types/icons/generated/custom/PanelRightCollapsed.d.ts.map +1 -0
- package/lib/types/icons/generated/custom/PanelRightExpanded.d.ts +29 -0
- package/lib/types/icons/generated/custom/PanelRightExpanded.d.ts.map +1 -0
- package/lib/types/icons/generated/custom/index.d.ts +4 -0
- package/lib/types/icons/generated/custom/index.d.ts.map +1 -1
- package/lib/types/icons/wrapIcon.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-custom-items.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-default.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-in-dialog.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-in-popover.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-nested.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-placements.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-with-category.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-with-disabled-item.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-with-divider.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-with-icon.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-with-keyboard-shortcuts.story.d.ts.map +1 -1
- package/lib/types/select/Select.d.ts.map +1 -1
- package/lib/types/side-navigation/SideNavigation.d.ts.map +1 -1
- package/lib/types/tabs/Tabs.d.ts.map +1 -1
- package/lib/types/tabs/stories/tabs-overflow.story.d.ts.map +1 -1
- package/lib/types/text-input/TextInput.d.ts +5 -1
- package/lib/types/text-input/TextInput.d.ts.map +1 -1
- package/lib/types/text-input/stories/index.d.ts +4 -0
- package/lib/types/text-input/stories/index.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-clearable.story.d.ts +24 -0
- package/lib/types/text-input/stories/text-input-clearable.story.d.ts.map +1 -0
- package/lib/types/text-input/stories/text-input-loading-spinner.story.d.ts +24 -0
- package/lib/types/text-input/stories/text-input-loading-spinner.story.d.ts.map +1 -0
- package/lib/types/text-input/stories/text-input-with-icons.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input.stories.d.ts +3 -1
- package/lib/types/text-input/stories/text-input.stories.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -21,203 +21,229 @@
|
|
|
21
21
|
|
|
22
22
|
"use strict";
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.Full = exports.
|
|
24
|
+
exports.Loading = exports.Clearable = exports.Full = exports.SkeletonLoading = exports.Sizes = exports.Password = exports.WithIcons = exports.Number = exports.Email = exports.InformationIcon = exports.Error = exports.Readonly = exports.Disabled = exports.Optional = exports.Required = exports.Default = void 0;
|
|
25
25
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
26
26
|
const index_1 = require("../../index");
|
|
27
27
|
const _1 = require(".");
|
|
28
28
|
const componentMeta = {
|
|
29
|
-
title: 'Components/TextInput',
|
|
30
|
-
id: 'components-text-input',
|
|
31
29
|
component: index_1.TextInput,
|
|
32
|
-
tags: ['docsPage'],
|
|
33
|
-
parameters: {
|
|
34
|
-
controls: { disable: true },
|
|
35
|
-
},
|
|
36
30
|
decorators: [
|
|
37
31
|
(Story) => ((0, jsx_runtime_1.jsx)("div", { className: "n-flex n-justify-center", children: (0, jsx_runtime_1.jsx)(Story, {}) })),
|
|
38
32
|
],
|
|
33
|
+
id: 'components-text-input',
|
|
34
|
+
parameters: {
|
|
35
|
+
controls: { disable: true },
|
|
36
|
+
},
|
|
37
|
+
tags: ['docsPage'],
|
|
38
|
+
title: 'Components/TextInput',
|
|
39
39
|
};
|
|
40
40
|
exports.default = componentMeta;
|
|
41
41
|
exports.Default = {
|
|
42
42
|
args: {},
|
|
43
|
-
render: _1.TextInputDefault,
|
|
44
43
|
parameters: {
|
|
45
44
|
docs: {
|
|
46
45
|
source: {
|
|
46
|
+
code: _1.TextInputDefaultSource,
|
|
47
47
|
language: 'tsx',
|
|
48
48
|
type: 'code',
|
|
49
|
-
code: _1.TextInputDefaultSource,
|
|
50
49
|
},
|
|
51
50
|
},
|
|
52
51
|
},
|
|
52
|
+
render: _1.TextInputDefault,
|
|
53
53
|
};
|
|
54
54
|
exports.Required = {
|
|
55
55
|
args: {},
|
|
56
|
-
render: _1.TextInputRequired,
|
|
57
56
|
parameters: {
|
|
58
57
|
docs: {
|
|
59
58
|
source: {
|
|
59
|
+
code: _1.TextInputRequiredSource,
|
|
60
60
|
language: 'tsx',
|
|
61
61
|
type: 'code',
|
|
62
|
-
code: _1.TextInputRequiredSource,
|
|
63
62
|
},
|
|
64
63
|
},
|
|
65
64
|
},
|
|
65
|
+
render: _1.TextInputRequired,
|
|
66
66
|
};
|
|
67
67
|
exports.Optional = {
|
|
68
68
|
args: {},
|
|
69
|
-
render: _1.TextInputOptional,
|
|
70
69
|
parameters: {
|
|
71
70
|
docs: {
|
|
72
71
|
source: {
|
|
72
|
+
code: _1.TextInputOptionalSource,
|
|
73
73
|
language: 'tsx',
|
|
74
74
|
type: 'code',
|
|
75
|
-
code: _1.TextInputOptionalSource,
|
|
76
75
|
},
|
|
77
76
|
},
|
|
78
77
|
},
|
|
78
|
+
render: _1.TextInputOptional,
|
|
79
79
|
};
|
|
80
80
|
exports.Disabled = {
|
|
81
81
|
args: {},
|
|
82
|
-
render: _1.TextInputDisabled,
|
|
83
82
|
parameters: {
|
|
84
83
|
docs: {
|
|
85
84
|
source: {
|
|
85
|
+
code: _1.TextInputDisabledSource,
|
|
86
86
|
language: 'tsx',
|
|
87
87
|
type: 'code',
|
|
88
|
-
code: _1.TextInputDisabledSource,
|
|
89
88
|
},
|
|
90
89
|
},
|
|
91
90
|
},
|
|
91
|
+
render: _1.TextInputDisabled,
|
|
92
92
|
};
|
|
93
93
|
exports.Readonly = {
|
|
94
94
|
args: {},
|
|
95
|
-
render: _1.TextInputReadonly,
|
|
96
95
|
parameters: {
|
|
97
96
|
docs: {
|
|
98
97
|
source: {
|
|
98
|
+
code: _1.TextInputReadonlySource,
|
|
99
99
|
language: 'tsx',
|
|
100
100
|
type: 'code',
|
|
101
|
-
code: _1.TextInputReadonlySource,
|
|
102
101
|
},
|
|
103
102
|
},
|
|
104
103
|
},
|
|
104
|
+
render: _1.TextInputReadonly,
|
|
105
105
|
};
|
|
106
106
|
exports.Error = {
|
|
107
107
|
args: {},
|
|
108
|
-
render: _1.TextInputError,
|
|
109
108
|
parameters: {
|
|
110
109
|
docs: {
|
|
111
110
|
source: {
|
|
111
|
+
code: _1.TextInputErrorSource,
|
|
112
112
|
language: 'tsx',
|
|
113
113
|
type: 'code',
|
|
114
|
-
code: _1.TextInputErrorSource,
|
|
115
114
|
},
|
|
116
115
|
},
|
|
117
116
|
},
|
|
117
|
+
render: _1.TextInputError,
|
|
118
118
|
};
|
|
119
119
|
exports.InformationIcon = {
|
|
120
120
|
args: {},
|
|
121
|
-
render: _1.TextInputInformationIcon,
|
|
122
121
|
parameters: {
|
|
123
122
|
docs: {
|
|
124
123
|
source: {
|
|
124
|
+
code: _1.TextInputInformationIconSource,
|
|
125
125
|
language: 'tsx',
|
|
126
126
|
type: 'code',
|
|
127
|
-
code: _1.TextInputInformationIconSource,
|
|
128
127
|
},
|
|
129
128
|
},
|
|
130
129
|
},
|
|
130
|
+
render: _1.TextInputInformationIcon,
|
|
131
131
|
};
|
|
132
132
|
exports.Email = {
|
|
133
133
|
args: {},
|
|
134
|
-
render: _1.TextInputEmail,
|
|
135
134
|
parameters: {
|
|
136
135
|
docs: {
|
|
137
136
|
source: {
|
|
137
|
+
code: _1.TextInputEmailSource,
|
|
138
138
|
language: 'tsx',
|
|
139
139
|
type: 'code',
|
|
140
|
-
code: _1.TextInputEmailSource,
|
|
141
140
|
},
|
|
142
141
|
},
|
|
143
142
|
},
|
|
143
|
+
render: _1.TextInputEmail,
|
|
144
144
|
};
|
|
145
145
|
exports.Number = {
|
|
146
146
|
args: {},
|
|
147
|
-
render: _1.TextInputNumber,
|
|
148
147
|
parameters: {
|
|
149
148
|
docs: {
|
|
150
149
|
source: {
|
|
150
|
+
code: _1.TextInputNumberSource,
|
|
151
151
|
language: 'tsx',
|
|
152
152
|
type: 'code',
|
|
153
|
-
code: _1.TextInputNumberSource,
|
|
154
153
|
},
|
|
155
154
|
},
|
|
156
155
|
},
|
|
156
|
+
render: _1.TextInputNumber,
|
|
157
157
|
};
|
|
158
158
|
exports.WithIcons = {
|
|
159
159
|
args: {},
|
|
160
|
-
render: _1.TextInputWithIcons,
|
|
161
160
|
parameters: {
|
|
162
161
|
docs: {
|
|
163
162
|
source: {
|
|
163
|
+
code: _1.TextInputWithIconsSource,
|
|
164
164
|
language: 'tsx',
|
|
165
165
|
type: 'code',
|
|
166
|
-
code: _1.TextInputWithIconsSource,
|
|
167
166
|
},
|
|
168
167
|
},
|
|
169
168
|
},
|
|
169
|
+
render: _1.TextInputWithIcons,
|
|
170
170
|
};
|
|
171
171
|
exports.Password = {
|
|
172
172
|
args: {},
|
|
173
|
-
render: _1.TextInputPassword,
|
|
174
173
|
parameters: {
|
|
175
174
|
docs: {
|
|
176
175
|
source: {
|
|
176
|
+
code: _1.TextInputPasswordSource,
|
|
177
177
|
language: 'tsx',
|
|
178
178
|
type: 'code',
|
|
179
|
-
code: _1.TextInputPasswordSource,
|
|
180
179
|
},
|
|
181
180
|
},
|
|
182
181
|
},
|
|
182
|
+
render: _1.TextInputPassword,
|
|
183
183
|
};
|
|
184
184
|
exports.Sizes = {
|
|
185
185
|
args: {},
|
|
186
|
-
render: _1.TextInputSizes,
|
|
187
186
|
parameters: {
|
|
188
187
|
docs: {
|
|
189
188
|
source: {
|
|
189
|
+
code: _1.TextInputSizesSource,
|
|
190
190
|
language: 'tsx',
|
|
191
191
|
type: 'code',
|
|
192
|
-
code: _1.TextInputSizesSource,
|
|
193
192
|
},
|
|
194
193
|
},
|
|
195
194
|
},
|
|
195
|
+
render: _1.TextInputSizes,
|
|
196
196
|
};
|
|
197
|
-
exports.
|
|
197
|
+
exports.SkeletonLoading = {
|
|
198
198
|
args: {},
|
|
199
|
-
render: _1.TextInputLoading,
|
|
200
199
|
parameters: {
|
|
201
200
|
docs: {
|
|
202
201
|
source: {
|
|
202
|
+
code: _1.TextInputLoadingSource,
|
|
203
203
|
language: 'tsx',
|
|
204
204
|
type: 'code',
|
|
205
|
-
code: _1.TextInputLoadingSource,
|
|
206
205
|
},
|
|
207
206
|
},
|
|
208
207
|
},
|
|
208
|
+
render: _1.TextInputLoading,
|
|
209
209
|
};
|
|
210
210
|
exports.Full = {
|
|
211
211
|
args: {},
|
|
212
|
+
parameters: {
|
|
213
|
+
docs: {
|
|
214
|
+
source: {
|
|
215
|
+
code: _1.TextInputFullSource,
|
|
216
|
+
language: 'tsx',
|
|
217
|
+
type: 'code',
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
},
|
|
212
221
|
render: _1.TextInputFull,
|
|
222
|
+
};
|
|
223
|
+
exports.Clearable = {
|
|
224
|
+
args: {},
|
|
213
225
|
parameters: {
|
|
214
226
|
docs: {
|
|
215
227
|
source: {
|
|
228
|
+
code: _1.TextInputClearableSource,
|
|
229
|
+
language: 'tsx',
|
|
230
|
+
type: 'code',
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
render: _1.TextInputClearable,
|
|
235
|
+
};
|
|
236
|
+
exports.Loading = {
|
|
237
|
+
args: {},
|
|
238
|
+
parameters: {
|
|
239
|
+
docs: {
|
|
240
|
+
source: {
|
|
241
|
+
code: _1.TextInputLoadingSpinnerSource,
|
|
216
242
|
language: 'tsx',
|
|
217
243
|
type: 'code',
|
|
218
|
-
code: _1.TextInputFullSource,
|
|
219
244
|
},
|
|
220
245
|
},
|
|
221
246
|
},
|
|
247
|
+
render: _1.TextInputLoadingSpinner,
|
|
222
248
|
};
|
|
223
249
|
//# sourceMappingURL=text-input.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.stories.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input.stories.tsx"],"names":[],"mappings":";;;;AAuBA,uCAAwC;AACxC,
|
|
1
|
+
{"version":3,"file":"text-input.stories.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input.stories.tsx"],"names":[],"mappings":";;;;AAuBA,uCAAwC;AACxC,wBAiCW;AAEX,MAAM,aAAa,GAA2B;IAC5C,SAAS,EAAE,iBAAS;IACpB,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,gCAAK,SAAS,EAAC,yBAAyB,YACtC,uBAAC,KAAK,KAAG,GACL,CACP;KACF;IACD,EAAE,EAAE,uBAAuB;IAC3B,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,sBAAsB;CAC9B,CAAC;AAEF,kBAAe,aAAa,CAAC;AAGhB,QAAA,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,yBAAsB;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EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,uBAAoB;gBAC1B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,iBAAc;CACvB,CAAC;AAEW,QAAA,eAAe,GAAU;IACpC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,yBAAsB;gBAC5B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,mBAAgB;CACzB,CAAC;AAEW,QAAA,IAAI,GAAU;IACzB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,sBAAmB;gBACzB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,gBAAa;CACtB,CAAC;AAEW,QAAA,SAAS,GAAU;IAC9B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,2BAAwB;gBAC9B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,qBAAkB;CAC3B,CAAC;AAEW,QAAA,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,gCAA6B;gBACnC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,0BAAuB;CAChC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { TextInput } from '../../index';\nimport {\n TextInputClearable,\n TextInputClearableSource,\n TextInputDefault,\n TextInputDefaultSource,\n TextInputDisabled,\n TextInputDisabledSource,\n TextInputEmail,\n TextInputEmailSource,\n TextInputError,\n TextInputErrorSource,\n TextInputFull,\n TextInputFullSource,\n TextInputInformationIcon,\n TextInputInformationIconSource,\n TextInputLoading,\n TextInputLoadingSource,\n TextInputLoadingSpinner,\n TextInputLoadingSpinnerSource,\n TextInputNumber,\n TextInputNumberSource,\n TextInputOptional,\n TextInputOptionalSource,\n TextInputPassword,\n TextInputPasswordSource,\n TextInputReadonly,\n TextInputReadonlySource,\n TextInputRequired,\n TextInputRequiredSource,\n TextInputSizes,\n TextInputSizesSource,\n TextInputWithIcons,\n TextInputWithIconsSource,\n} from '.';\n\nconst componentMeta: Meta<typeof TextInput> = {\n component: TextInput,\n decorators: [\n (Story) => (\n <div className=\"n-flex n-justify-center\">\n <Story />\n </div>\n ),\n ],\n id: 'components-text-input',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/TextInput',\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof TextInput>;\n\nexport const Default: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextInputDefaultSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextInputDefault,\n};\n\nexport const Required: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextInputRequiredSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextInputRequired,\n};\n\nexport const Optional: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextInputOptionalSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextInputOptional,\n};\n\nexport const Disabled: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextInputDisabledSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextInputDisabled,\n};\n\nexport const Readonly: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextInputReadonlySource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextInputReadonly,\n};\n\nexport const Error: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextInputErrorSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextInputError,\n};\n\nexport const InformationIcon: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextInputInformationIconSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextInputInformationIcon,\n};\n\nexport const Email: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextInputEmailSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextInputEmail,\n};\n\nexport const Number: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextInputNumberSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextInputNumber,\n};\n\nexport const WithIcons: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextInputWithIconsSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextInputWithIcons,\n};\n\nexport const Password: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextInputPasswordSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextInputPassword,\n};\n\nexport const Sizes: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextInputSizesSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextInputSizes,\n};\n\nexport const SkeletonLoading: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextInputLoadingSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextInputLoading,\n};\n\nexport const Full: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextInputFullSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextInputFull,\n};\n\nexport const Clearable: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextInputClearableSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextInputClearable,\n};\n\nexport const Loading: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextInputLoadingSpinnerSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextInputLoadingSpinner,\n};\n"]}
|
package/lib/cjs/wizard/Wizard.js
CHANGED
|
@@ -168,6 +168,6 @@ const Circle = ({ status, number, alignment = 'middle', }) => {
|
|
|
168
168
|
const outerCircleClasses = (0, classnames_1.default)('ndl-wizard-circle', {
|
|
169
169
|
[`ndl-wizard-align-${alignment}`]: alignment,
|
|
170
170
|
});
|
|
171
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: outerCircleClasses, children: (0, jsx_runtime_1.jsxs)("svg", { children: [status === 'active' && ((0, jsx_runtime_1.jsx)("g", { children: (0, jsx_runtime_1.jsx)("circle", { className: "n-stroke-primary-bg-strong", style: { fill: 'transparent', strokeWidth: 2 }, cx: "16", cy: "16", r: "14" }) })), (0, jsx_runtime_1.jsx)("circle", { className: innerCircleClasses, cx: "16", cy: "16", r: "12" }), (0, jsx_runtime_1.jsx)("text", { x: "50%", y: "50%", fontSize: 14, className: "n-fill-neutral-bg-weak", textAnchor: "middle", dominantBaseline: "middle", dy: "0.1em", children: status === 'error' ? '!' : number })] }) }));
|
|
171
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: outerCircleClasses, children: (0, jsx_runtime_1.jsxs)("svg", { "aria-hidden": "true", children: [status === 'active' && ((0, jsx_runtime_1.jsx)("g", { children: (0, jsx_runtime_1.jsx)("circle", { className: "n-stroke-primary-bg-strong", style: { fill: 'transparent', strokeWidth: 2 }, cx: "16", cy: "16", r: "14" }) })), (0, jsx_runtime_1.jsx)("circle", { className: innerCircleClasses, cx: "16", cy: "16", r: "12" }), (0, jsx_runtime_1.jsx)("text", { x: "50%", y: "50%", fontSize: 14, className: "n-fill-neutral-bg-weak", textAnchor: "middle", dominantBaseline: "middle", dy: "0.1em", children: status === 'error' ? '!' : number })] }) }));
|
|
172
172
|
};
|
|
173
173
|
//# sourceMappingURL=Wizard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Wizard.js","sourceRoot":"","sources":["../../../src/wizard/Wizard.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AACpC,+CAAyC;AAGzC,8CAA2C;AA+CpC,MAAM,MAAM,GAAG,CAAsC,EAC1D,EAAE,EACF,SAAS,EACT,KAAK,EACL,IAAI,GAAG,OAAO,EACd,KAAK,EACL,eAAe,EACf,WAAW,EACX,cAAc,EACd,SAAS,GAAG,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,EACzD,GAAG,GACoC,EAAE,EAAE;IAC3C,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,eAAe,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,eAAe,GAAG,CAAC,EAAE,CAAC;YAC9D,OAAO,CAAC,IAAI,CACV,uFAAuF,eAAe,+BAA+B,KAAK,CAAC,MAAM,GAAG,CACrJ,CAAC;QACJ,CAAC;IACH,CAAC,EAAE,CAAC,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAEpC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,OAAO;YACV,OAAO,CACL,uBAAC,mBAAW,IACV,EAAE,EAAE,EAAE,EACN,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KA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oBAAU,EAAC;QACpC,0BAA0B,EAAE,MAAM,KAAK,UAAU,IAAI,MAAM,KAAK,QAAQ;QACxE,4BAA4B,EAAE,MAAM,KAAK,YAAY;QACrD,yBAAyB,EAAE,MAAM,KAAK,OAAO;KAC9C,CAAC,CAAC;IACH,MAAM,kBAAkB,GAAG,IAAA,oBAAU,EAAC,mBAAmB,EAAE;QACzD,CAAC,oBAAoB,SAAS,EAAE,CAAC,EAAE,SAAS;KAC7C,CAAC,CAAC;IAEH,OAAO,CACL,gCAAK,SAAS,EAAE,kBAAkB,YAChC,4CACG,MAAM,KAAK,QAAQ,IAAI,CACtB,wCACE,mCACE,SAAS,EAAC,4BAA4B,EACtC,KAAK,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC,EAAE,EAC9C,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,IAAI,EACP,CAAC,EAAC,IAAI,GACN,GACA,CACL,EAED,mCAAQ,SAAS,EAAE,kBAAkB,EAAE,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,IAAI,GAAG,EAChE,iCACE,CAAC,EAAC,KAAK,EACP,CAAC,EAAC,KAAK,EACP,QAAQ,EAAE,EAAE,EACZ,SAAS,EAAC,wBAAwB,EAClC,UAAU,EAAC,QAAQ,EACnB,gBAAgB,EAAC,QAAQ,EACzB,EAAE,EAAC,OAAO,YAET,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,GAC7B,IACH,GACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport React, { useEffect } from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { Typography } from '../typography';\n\ninterface Step {\n /** Content displayed as the step label */\n content: React.ReactNode;\n /** Explicit status for the step. When set to `error`, the step is rendered in an error state */\n status?: 'default' | 'error';\n}\n\ninterface BaseWizardProps {\n /** Layout orientation of the wizard */\n orientation?: 'horizontal' | 'vertical';\n /** Visual size of the wizard */\n size?: 'small' | 'large';\n /** Additional style */\n style?: React.CSSProperties;\n /** Additional class name */\n className?: string;\n /** Zero-based index of the active step */\n activeStepIndex: number;\n /** Steps to display in the wizard */\n steps: Step[];\n}\n\ntype HorizontalWizardProps = BaseWizardProps & {\n orientation: 'horizontal';\n /** Alignment of labels/content, is set to `middle` for horizontal orientation and can be set to `top` or `middle` for vertical orientation and is not applicable when `orientation` is undefined */\n alignment?: 'middle';\n};\n\ntype VerticalWizardProps = BaseWizardProps & {\n orientation: 'vertical';\n /** Alignment of labels/content, is set to `middle` for horizontal orientation and can be set to `top` or `middle` for vertical orientation and is not applicable when `orientation` is undefined */\n alignment?: 'top' | 'middle';\n};\n\ntype NonOrientationWizardProps = BaseWizardProps & {\n orientation: undefined;\n /** Alignment of labels/content, is set to `middle` for horizontal orientation and can be set to `top` or `middle` for vertical orientation and is not applicable when `orientation` is undefined */\n alignment?: never;\n};\n\ntype WizardProps =\n | HorizontalWizardProps\n | VerticalWizardProps\n | NonOrientationWizardProps;\n\nexport const Wizard = <T extends React.ElementType = 'div'>({\n as,\n className,\n style,\n size = 'large',\n steps,\n activeStepIndex,\n orientation,\n htmlAttributes,\n alignment = orientation === 'vertical' ? 'top' : 'middle',\n ref,\n}: PolymorphicCommonProps<T, WizardProps>) => {\n useEffect(() => {\n if (activeStepIndex > steps.length - 1 || activeStepIndex < 0) {\n console.warn(\n `[🪡 Needle]: The activeStepIndex in Wizard is out of bounds. The activeStepIndex is ${activeStepIndex} and the number of steps is ${steps.length}.`,\n );\n }\n }, [activeStepIndex, steps.length]);\n\n switch (size) {\n case 'small':\n return (\n <WizardSmall\n as={as}\n orientation={orientation}\n style={style}\n className={className}\n steps={steps}\n activeStepIndex={activeStepIndex}\n ref={ref}\n htmlAttributes={htmlAttributes}\n alignment={alignment}\n />\n );\n case 'large':\n return (\n <WizardLarge\n as={as}\n orientation={orientation}\n style={style}\n className={className}\n steps={steps}\n activeStepIndex={activeStepIndex}\n ref={ref}\n htmlAttributes={htmlAttributes}\n alignment={alignment}\n />\n );\n }\n};\n\nconst getStatus = (activeStepIndex: number, stepIndex: number) =>\n stepIndex === activeStepIndex\n ? 'active'\n : activeStepIndex < stepIndex\n ? 'incomplete'\n : 'complete';\n\nconst WizardLarge = <T extends React.ElementType = 'div'>({\n orientation = 'horizontal',\n activeStepIndex,\n steps,\n as,\n style,\n className,\n htmlAttributes,\n alignment,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, Omit<WizardProps, 'size'>>) => {\n const Component: React.ElementType = as || 'div';\n\n const wizardClasses = classNames(\n 'ndl-wizard',\n 'ndl-wizard-large',\n {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n [`ndl-wizard-align-${alignment}`]: alignment,\n },\n className,\n );\n\n const componentStyle = {\n gridTemplateColumns:\n orientation === 'horizontal'\n ? `repeat(${steps.length}, 1fr)`\n : `32px 1fr`,\n\n gridTemplateRows:\n orientation === 'vertical' && `repeat(${steps.length}, 1fr)`,\n };\n\n const stepClasses = (index: number, step: Step) => {\n const status = getStatus(activeStepIndex, index);\n\n return classNames('ndl-wizard-step', {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n 'ndl-wizard-step-line-right': index < steps.length - 1,\n 'ndl-wizard-step-line-left': index > 0,\n 'ndl-wizard-step-complete': status === 'complete',\n 'ndl-wizard-step-active': status === 'active',\n 'ndl-wizard-step-error': step.status === 'error',\n [`ndl-wizard-align-${alignment}`]: alignment,\n });\n };\n\n return (\n <Component\n className={wizardClasses}\n style={{ ...style, ...componentStyle }}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {/* iterate over the steps to render the text content (the first row of the component)*/}\n {steps.map((step, index) => {\n if (typeof step.content === 'string') {\n const wizardStepClasses = classNames('ndl-wizard-step-text', {\n 'ndl-vertical': orientation === 'vertical',\n 'ndl-horizontal': orientation === 'horizontal',\n [`ndl-wizard-align-${alignment}`]: alignment,\n 'ndl-wizard-step-incomplete':\n getStatus(activeStepIndex, index) === 'incomplete',\n });\n\n return (\n <div key={index} className={wizardStepClasses}>\n <Typography variant=\"body-large\">{step.content}</Typography>\n </div>\n );\n } else {\n return <React.Fragment key={index}>{step.content}</React.Fragment>;\n }\n })}\n {/* iterate over the steps to render the circles (iterates again to render the second row of the component) */}\n {steps.map((step, index) => {\n return (\n <div\n className={stepClasses(index, step)}\n key={index}\n style={{\n gridRow: orientation === 'vertical' ? index + 1 : '',\n }}\n >\n <Circle\n status={\n step.status === 'error'\n ? 'error'\n : getStatus(activeStepIndex, index)\n }\n number={index + 1}\n text={step.content}\n alignment={alignment}\n />\n </div>\n );\n })}\n </Component>\n );\n};\n\nexport const WizardSmall = <T extends React.ElementType = 'div'>({\n orientation = 'horizontal',\n activeStepIndex,\n steps,\n as,\n className,\n htmlAttributes,\n style,\n alignment = 'middle',\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, Omit<WizardProps, 'size'>>) => {\n const Component = as ?? 'div';\n\n const wizardClasses = classNames(\n 'ndl-wizard',\n 'ndl-wizard-small',\n {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n [`ndl-wizard-align-${alignment}`]: alignment,\n },\n className,\n );\n\n const stepClasses = (index: number) =>\n classNames('ndl-wizard-step', {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n 'ndl-wizard-step-active': getStatus(activeStepIndex, index) === 'active',\n 'ndl-wizard-step-complete':\n getStatus(activeStepIndex, index) === 'complete',\n [`ndl-wizard-align-${alignment}`]: alignment,\n });\n\n return (\n <Component\n className={wizardClasses}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-wizard-steps-line\" />\n {steps.map((step, index) => {\n return (\n <div key={index} className={stepClasses(index)}>\n <div className=\"ndl-wizard-circle\"></div>\n </div>\n );\n })}\n <div className=\"ndl-wizard-steps-line\" />\n </Component>\n );\n};\n\nconst Circle = ({\n status,\n number,\n alignment = 'middle',\n}: {\n status: 'active' | 'complete' | 'incomplete' | 'error';\n number: number;\n text: React.ReactNode;\n alignment?: 'top' | 'middle';\n}) => {\n const innerCircleClasses = classNames({\n 'n-fill-primary-bg-strong': status === 'complete' || status === 'active',\n 'n-fill-neutral-bg-stronger': status === 'incomplete',\n 'n-fill-danger-bg-strong': status === 'error',\n });\n const outerCircleClasses = classNames('ndl-wizard-circle', {\n [`ndl-wizard-align-${alignment}`]: alignment,\n });\n\n return (\n <div className={outerCircleClasses}>\n <svg>\n {status === 'active' && (\n <g>\n <circle\n className=\"n-stroke-primary-bg-strong\"\n style={{ fill: 'transparent', strokeWidth: 2 }}\n cx=\"16\"\n cy=\"16\"\n r=\"14\"\n />\n </g>\n )}\n\n <circle className={innerCircleClasses} cx=\"16\" cy=\"16\" r=\"12\" />\n <text\n x=\"50%\"\n y=\"50%\"\n fontSize={14}\n className=\"n-fill-neutral-bg-weak\"\n textAnchor=\"middle\"\n dominantBaseline=\"middle\"\n dy=\"0.1em\"\n >\n {status === 'error' ? '!' : number}\n </text>\n </svg>\n </div>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Wizard.js","sourceRoot":"","sources":["../../../src/wizard/Wizard.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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KAAK,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC,EAAE,EAC9C,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,IAAI,EACP,CAAC,EAAC,IAAI,GACN,GACA,CACL,EAED,mCAAQ,SAAS,EAAE,kBAAkB,EAAE,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,IAAI,GAAG,EAChE,iCACE,CAAC,EAAC,KAAK,EACP,CAAC,EAAC,KAAK,EACP,QAAQ,EAAE,EAAE,EACZ,SAAS,EAAC,wBAAwB,EAClC,UAAU,EAAC,QAAQ,EACnB,gBAAgB,EAAC,QAAQ,EACzB,EAAE,EAAC,OAAO,YAET,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,GAC7B,IACH,GACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport React, { useEffect } from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { Typography } from '../typography';\n\ninterface Step {\n /** Content displayed as the step label */\n content: React.ReactNode;\n /** Explicit status for the step. When set to `error`, the step is rendered in an error state */\n status?: 'default' | 'error';\n}\n\ninterface BaseWizardProps {\n /** Layout orientation of the wizard */\n orientation?: 'horizontal' | 'vertical';\n /** Visual size of the wizard */\n size?: 'small' | 'large';\n /** Additional style */\n style?: React.CSSProperties;\n /** Additional class name */\n className?: string;\n /** Zero-based index of the active step */\n activeStepIndex: number;\n /** Steps to display in the wizard */\n steps: Step[];\n}\n\ntype HorizontalWizardProps = BaseWizardProps & {\n orientation: 'horizontal';\n /** Alignment of labels/content, is set to `middle` for horizontal orientation and can be set to `top` or `middle` for vertical orientation and is not applicable when `orientation` is undefined */\n alignment?: 'middle';\n};\n\ntype VerticalWizardProps = BaseWizardProps & {\n orientation: 'vertical';\n /** Alignment of labels/content, is set to `middle` for horizontal orientation and can be set to `top` or `middle` for vertical orientation and is not applicable when `orientation` is undefined */\n alignment?: 'top' | 'middle';\n};\n\ntype NonOrientationWizardProps = BaseWizardProps & {\n orientation: undefined;\n /** Alignment of labels/content, is set to `middle` for horizontal orientation and can be set to `top` or `middle` for vertical orientation and is not applicable when `orientation` is undefined */\n alignment?: never;\n};\n\ntype WizardProps =\n | HorizontalWizardProps\n | VerticalWizardProps\n | NonOrientationWizardProps;\n\nexport const Wizard = <T extends React.ElementType = 'div'>({\n as,\n className,\n style,\n size = 'large',\n steps,\n activeStepIndex,\n orientation,\n htmlAttributes,\n alignment = orientation === 'vertical' ? 'top' : 'middle',\n ref,\n}: PolymorphicCommonProps<T, WizardProps>) => {\n useEffect(() => {\n if (activeStepIndex > steps.length - 1 || activeStepIndex < 0) {\n console.warn(\n `[🪡 Needle]: The activeStepIndex in Wizard is out of bounds. The activeStepIndex is ${activeStepIndex} and the number of steps is ${steps.length}.`,\n );\n }\n }, [activeStepIndex, steps.length]);\n\n switch (size) {\n case 'small':\n return (\n <WizardSmall\n as={as}\n orientation={orientation}\n style={style}\n className={className}\n steps={steps}\n activeStepIndex={activeStepIndex}\n ref={ref}\n htmlAttributes={htmlAttributes}\n alignment={alignment}\n />\n );\n case 'large':\n return (\n <WizardLarge\n as={as}\n orientation={orientation}\n style={style}\n className={className}\n steps={steps}\n activeStepIndex={activeStepIndex}\n ref={ref}\n htmlAttributes={htmlAttributes}\n alignment={alignment}\n />\n );\n }\n};\n\nconst getStatus = (activeStepIndex: number, stepIndex: number) =>\n stepIndex === activeStepIndex\n ? 'active'\n : activeStepIndex < stepIndex\n ? 'incomplete'\n : 'complete';\n\nconst WizardLarge = <T extends React.ElementType = 'div'>({\n orientation = 'horizontal',\n activeStepIndex,\n steps,\n as,\n style,\n className,\n htmlAttributes,\n alignment,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, Omit<WizardProps, 'size'>>) => {\n const Component: React.ElementType = as || 'div';\n\n const wizardClasses = classNames(\n 'ndl-wizard',\n 'ndl-wizard-large',\n {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n [`ndl-wizard-align-${alignment}`]: alignment,\n },\n className,\n );\n\n const componentStyle = {\n gridTemplateColumns:\n orientation === 'horizontal'\n ? `repeat(${steps.length}, 1fr)`\n : `32px 1fr`,\n\n gridTemplateRows:\n orientation === 'vertical' && `repeat(${steps.length}, 1fr)`,\n };\n\n const stepClasses = (index: number, step: Step) => {\n const status = getStatus(activeStepIndex, index);\n\n return classNames('ndl-wizard-step', {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n 'ndl-wizard-step-line-right': index < steps.length - 1,\n 'ndl-wizard-step-line-left': index > 0,\n 'ndl-wizard-step-complete': status === 'complete',\n 'ndl-wizard-step-active': status === 'active',\n 'ndl-wizard-step-error': step.status === 'error',\n [`ndl-wizard-align-${alignment}`]: alignment,\n });\n };\n\n return (\n <Component\n className={wizardClasses}\n style={{ ...style, ...componentStyle }}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {/* iterate over the steps to render the text content (the first row of the component)*/}\n {steps.map((step, index) => {\n if (typeof step.content === 'string') {\n const wizardStepClasses = classNames('ndl-wizard-step-text', {\n 'ndl-vertical': orientation === 'vertical',\n 'ndl-horizontal': orientation === 'horizontal',\n [`ndl-wizard-align-${alignment}`]: alignment,\n 'ndl-wizard-step-incomplete':\n getStatus(activeStepIndex, index) === 'incomplete',\n });\n\n return (\n <div key={index} className={wizardStepClasses}>\n <Typography variant=\"body-large\">{step.content}</Typography>\n </div>\n );\n } else {\n return <React.Fragment key={index}>{step.content}</React.Fragment>;\n }\n })}\n {/* iterate over the steps to render the circles (iterates again to render the second row of the component) */}\n {steps.map((step, index) => {\n return (\n <div\n className={stepClasses(index, step)}\n key={index}\n style={{\n gridRow: orientation === 'vertical' ? index + 1 : '',\n }}\n >\n <Circle\n status={\n step.status === 'error'\n ? 'error'\n : getStatus(activeStepIndex, index)\n }\n number={index + 1}\n text={step.content}\n alignment={alignment}\n />\n </div>\n );\n })}\n </Component>\n );\n};\n\nexport const WizardSmall = <T extends React.ElementType = 'div'>({\n orientation = 'horizontal',\n activeStepIndex,\n steps,\n as,\n className,\n htmlAttributes,\n style,\n alignment = 'middle',\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, Omit<WizardProps, 'size'>>) => {\n const Component = as ?? 'div';\n\n const wizardClasses = classNames(\n 'ndl-wizard',\n 'ndl-wizard-small',\n {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n [`ndl-wizard-align-${alignment}`]: alignment,\n },\n className,\n );\n\n const stepClasses = (index: number) =>\n classNames('ndl-wizard-step', {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n 'ndl-wizard-step-active': getStatus(activeStepIndex, index) === 'active',\n 'ndl-wizard-step-complete':\n getStatus(activeStepIndex, index) === 'complete',\n [`ndl-wizard-align-${alignment}`]: alignment,\n });\n\n return (\n <Component\n className={wizardClasses}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-wizard-steps-line\" />\n {steps.map((step, index) => {\n return (\n <div key={index} className={stepClasses(index)}>\n <div className=\"ndl-wizard-circle\"></div>\n </div>\n );\n })}\n <div className=\"ndl-wizard-steps-line\" />\n </Component>\n );\n};\n\nconst Circle = ({\n status,\n number,\n alignment = 'middle',\n}: {\n status: 'active' | 'complete' | 'incomplete' | 'error';\n number: number;\n text: React.ReactNode;\n alignment?: 'top' | 'middle';\n}) => {\n const innerCircleClasses = classNames({\n 'n-fill-primary-bg-strong': status === 'complete' || status === 'active',\n 'n-fill-neutral-bg-stronger': status === 'incomplete',\n 'n-fill-danger-bg-strong': status === 'error',\n });\n const outerCircleClasses = classNames('ndl-wizard-circle', {\n [`ndl-wizard-align-${alignment}`]: alignment,\n });\n\n return (\n <div className={outerCircleClasses}>\n <svg aria-hidden=\"true\">\n {status === 'active' && (\n <g>\n <circle\n className=\"n-stroke-primary-bg-strong\"\n style={{ fill: 'transparent', strokeWidth: 2 }}\n cx=\"16\"\n cy=\"16\"\n r=\"14\"\n />\n </g>\n )}\n\n <circle className={innerCircleClasses} cx=\"16\" cy=\"16\" r=\"12\" />\n <text\n x=\"50%\"\n y=\"50%\"\n fontSize={14}\n className=\"n-fill-neutral-bg-weak\"\n textAnchor=\"middle\"\n dominantBaseline=\"middle\"\n dy=\"0.1em\"\n >\n {status === 'error' ? '!' : number}\n </text>\n </svg>\n </div>\n );\n};\n"]}
|
|
@@ -41,6 +41,7 @@ const Presence = (_a) => {
|
|
|
41
41
|
const { theme } = useNeedleTheme();
|
|
42
42
|
const Component = theme === 'light' ? Neo4JAiColorLightIcon : Neo4JAiColorDarkIcon;
|
|
43
43
|
return (_jsx(Component, Object.assign({ ref: ref, className: classes, style: style, htmlAttributes: htmlAttributes }, (isThinking === true && {
|
|
44
|
+
'aria-hidden': 'false',
|
|
44
45
|
'aria-label': 'Thinking',
|
|
45
46
|
'aria-live': 'polite',
|
|
46
47
|
role: 'status',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Presence.js","sourceRoot":"","sources":["../../../../src/ai/presence/Presence.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EACL,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,UAAU,MAAM,YAAY,CAAC;AASpC,MAAM,QAAQ,GAAG,CAAC,EAOkB,EAAE,EAAE;QAPtB,EAChB,SAAS,EACT,UAAU,GAAG,KAAK,EAClB,KAAK,EACL,cAAc,EACd,GAAG,OAE+B,EAD/B,SAAS,cANI,6DAOjB,CADa;IAEZ,MAAM,OAAO,GAAG,UAAU,CAAC,iBAAiB,EAAE,SAAS,EAAE;QACvD,cAAc,EAAE,UAAU,KAAK,IAAI;KACpC,CAAC,CAAC;IACH,MAAM,EAAE,KAAK,EAAE,GAAG,cAAc,EAAE,CAAC;IAEnC,MAAM,SAAS,GACb,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,oBAAoB,CAAC;IAEnE,OAAO,CACL,KAAC,SAAS,kBACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,cAAc,IAC1B,CAAC,UAAU,KAAK,IAAI,IAAI;QAC1B,YAAY,EAAE,UAAU;QACxB,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,QAAQ;KACf,CAAC,EACE,SAAS,EACb,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { useNeedleTheme } from '@neo4j-ndl/react';\nimport {\n Neo4JAiColorDarkIcon,\n Neo4JAiColorLightIcon,\n} from '@neo4j-ndl/react/icons';\nimport classNames from 'classnames';\n\nimport type { CommonProps } from '../../_common/types';\n\ntype PresenceProps = {\n /** Whether the AI is thinking. Animates the underlying SVG */\n isThinking?: boolean;\n};\n\nconst Presence = ({\n className,\n isThinking = false,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'svg', PresenceProps>) => {\n const classes = classNames('ndl-ai-presence', className, {\n 'ndl-thinking': isThinking === true,\n });\n const { theme } = useNeedleTheme();\n\n const Component =\n theme === 'light' ? Neo4JAiColorLightIcon : Neo4JAiColorDarkIcon;\n\n return (\n <Component\n ref={ref}\n className={classes}\n style={style}\n htmlAttributes={htmlAttributes}\n {...(isThinking === true && {\n 'aria-label': 'Thinking',\n 'aria-live': 'polite',\n role: 'status',\n })}\n {...restProps}\n />\n );\n};\n\nPresence.displayName = 'Presence';\n\nexport { Presence };\n"]}
|
|
1
|
+
{"version":3,"file":"Presence.js","sourceRoot":"","sources":["../../../../src/ai/presence/Presence.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EACL,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,UAAU,MAAM,YAAY,CAAC;AASpC,MAAM,QAAQ,GAAG,CAAC,EAOkB,EAAE,EAAE;QAPtB,EAChB,SAAS,EACT,UAAU,GAAG,KAAK,EAClB,KAAK,EACL,cAAc,EACd,GAAG,OAE+B,EAD/B,SAAS,cANI,6DAOjB,CADa;IAEZ,MAAM,OAAO,GAAG,UAAU,CAAC,iBAAiB,EAAE,SAAS,EAAE;QACvD,cAAc,EAAE,UAAU,KAAK,IAAI;KACpC,CAAC,CAAC;IACH,MAAM,EAAE,KAAK,EAAE,GAAG,cAAc,EAAE,CAAC;IAEnC,MAAM,SAAS,GACb,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,oBAAoB,CAAC;IAEnE,OAAO,CACL,KAAC,SAAS,kBACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,cAAc,IAC1B,CAAC,UAAU,KAAK,IAAI,IAAI;QAC1B,aAAa,EAAE,OAAO;QACtB,YAAY,EAAE,UAAU;QACxB,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,QAAQ;KACf,CAAC,EACE,SAAS,EACb,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { useNeedleTheme } from '@neo4j-ndl/react';\nimport {\n Neo4JAiColorDarkIcon,\n Neo4JAiColorLightIcon,\n} from '@neo4j-ndl/react/icons';\nimport classNames from 'classnames';\n\nimport type { CommonProps } from '../../_common/types';\n\ntype PresenceProps = {\n /** Whether the AI is thinking. Animates the underlying SVG */\n isThinking?: boolean;\n};\n\nconst Presence = ({\n className,\n isThinking = false,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'svg', PresenceProps>) => {\n const classes = classNames('ndl-ai-presence', className, {\n 'ndl-thinking': isThinking === true,\n });\n const { theme } = useNeedleTheme();\n\n const Component =\n theme === 'light' ? Neo4JAiColorLightIcon : Neo4JAiColorDarkIcon;\n\n return (\n <Component\n ref={ref}\n className={classes}\n style={style}\n htmlAttributes={htmlAttributes}\n {...(isThinking === true && {\n 'aria-hidden': 'false',\n 'aria-label': 'Thinking',\n 'aria-live': 'polite',\n role: 'status',\n })}\n {...restProps}\n />\n );\n};\n\nPresence.displayName = 'Presence';\n\nexport { Presence };\n"]}
|
package/lib/esm/banner/Banner.js
CHANGED
|
@@ -85,7 +85,7 @@ const BannerComponent = (_a) => {
|
|
|
85
85
|
onClose(e);
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
|
-
return (_jsxs(Element, Object.assign({ className: classes, role: isAlert ?
|
|
88
|
+
return (_jsxs(Element, Object.assign({ className: classes, role: isAlert ? 'alert' : undefined, ref: ref }, restProps, htmlAttributes, { children: [hasIcon && _jsx(StatusIcon, { variant: variant }), _jsx("div", { className: "ndl-banner-content", children: children }), isCloseable && (_jsx(CleanIconButton, { size: "small", onClick: handleClose, description: "Close", children: _jsx(XMarkIconOutline, {}) }))] })));
|
|
89
89
|
};
|
|
90
90
|
const Banner = Object.assign(BannerComponent, {
|
|
91
91
|
Actions: BannerActions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.js","sourceRoot":"","sources":["../../../src/banner/Banner.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAOpC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,0BAA0B,EAC1B,4BAA4B,EAC5B,0BAA0B,EAC1B,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,UAAU,EAAE,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AAO,EAAE,OAAO,GAAI,EAC5C,cAAK,SAAS,EAAC,oBAAoB,YAAE,QAAQ,GAAO,EACnD,WAAW,IAAI,CACd,KAAC,eAAe,IAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAC,OAAO,YACrE,KAAC,gBAAgB,KAAG,GACJ,CACnB,KACO,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE;IAC5C,OAAO,EAAE,aAAa;IACtB,WAAW,EAAE,iBAAiB;IAC9B,MAAM,EAAE,YAAY;CACrB,CAAC,CAAC;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport {\n type CommonProps,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { CleanIconButton } from '../clean-icon-button';\nimport {\n BoltIconOutline,\n CheckCircleIconSolid,\n ExclamationCircleIconSolid,\n ExclamationTriangleIconSolid,\n InformationCircleIconSolid,\n XMarkIconOutline,\n} from '../icons';\nimport { Typography } from '../typography';\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype BannerCommonProps = {\n /** Shows a status icon. The icon is based on the value of the `variant` prop */\n hasIcon?: boolean;\n\n /** Content to be shown in the banner. */\n children?: React.ReactNode;\n\n /** Sets the role to alert or alertdialog, based on the value of `isCloseable` */\n isAlert?: boolean;\n\n /** How the banner is used. */\n usage?: 'inline' | 'global';\n\n /** The variant of the banner */\n variant?: BannerVariant;\n};\n\ntype CloseableBannerProps = {\n /** If the banner is closeable. Renders an icon button in the top right corner */\n isCloseable: true;\n\n /** Event handler for when the close icon is clicked */\n onClose: (\n e?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => void;\n};\n\ntype NonCloseableBannerProps = {\n isCloseable?: false;\n onClose?: never;\n};\n\ntype BannerCloseProps = CloseableBannerProps | NonCloseableBannerProps;\n\ntype BannerProps = BannerCommonProps & BannerCloseProps;\ntype BannerVariant = 'info' | 'success' | 'warning' | 'danger' | 'neutral';\n\nconst StatusIcon = ({ variant }: { variant: BannerVariant }) => {\n const iconComponent = (() => {\n switch (variant) {\n case 'success':\n return <CheckCircleIconSolid />;\n case 'warning':\n return <ExclamationTriangleIconSolid />;\n case 'danger':\n return <ExclamationCircleIconSolid />;\n case 'info':\n return <InformationCircleIconSolid />;\n case 'neutral':\n return <BoltIconOutline />;\n default:\n return null;\n }\n })();\n\n return <div className=\"ndl-banner-status-icon\">{iconComponent}</div>;\n};\n\nconst BannerHeader = ({\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'span', { children: React.ReactNode }>) => {\n const classes = classNames('ndl-banner-header', className);\n return (\n <Typography\n as=\"span\"\n variant=\"title-4\"\n className={classes}\n style={style}\n ref={ref}\n htmlAttributes={htmlAttributes}\n {...restProps}\n >\n {children}\n </Typography>\n );\n};\n\nconst BannerDescription = ({\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'div', { children: React.ReactNode }>) => {\n const classes = classNames('ndl-banner-description', className);\n return (\n <Typography\n as=\"div\"\n variant=\"body-medium\"\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </Typography>\n );\n};\n\nconst BannerActions = ({\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'div', { children: React.ReactNode }>) => {\n const classes = classNames('ndl-banner-actions', className);\n return (\n <div\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </div>\n );\n};\n\nconst BannerComponent = <T extends React.ElementType = 'section'>({\n as,\n variant = 'info',\n hasIcon = false,\n onClose,\n className,\n children,\n isCloseable = false,\n usage = 'inline',\n htmlAttributes,\n isAlert = false,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, BannerProps>) => {\n const Element: React.ElementType = as ?? 'section';\n\n const classes = classNames('ndl-banner', className, {\n 'ndl-danger': variant === 'danger',\n 'ndl-global': usage === 'global',\n 'ndl-info': variant === 'info',\n 'ndl-inline': usage === 'inline',\n 'ndl-neutral': variant === 'neutral',\n 'ndl-success': variant === 'success',\n 'ndl-warning': variant === 'warning',\n });\n\n const handleClose = (\n e:\n | React.MouseEvent<HTMLElement, MouseEvent>\n | React.KeyboardEvent<HTMLElement>,\n ) => {\n if (onClose && typeof onClose === 'function') {\n onClose(e);\n }\n };\n\n return (\n <Element\n className={classes}\n role={isAlert ? 'alert' : undefined}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {hasIcon && <StatusIcon variant={variant} />}\n <div className=\"ndl-banner-content\">{children}</div>\n {isCloseable && (\n <CleanIconButton size=\"small\" onClick={handleClose} description=\"Close\">\n <XMarkIconOutline />\n </CleanIconButton>\n )}\n </Element>\n );\n};\n\nconst Banner = Object.assign(BannerComponent, {\n Actions: BannerActions,\n Description: BannerDescription,\n Header: BannerHeader,\n});\n\nexport { Banner };\n"]}
|
|
@@ -311,7 +311,7 @@ const TableResults = (_a) => {
|
|
|
311
311
|
if (isSmallNavigation) {
|
|
312
312
|
return null;
|
|
313
313
|
}
|
|
314
|
-
return (_jsx(Skeleton, Object.assign({ as: "span", onBackground: "weak", shape: "rectangular" }, skeletonProps, { isLoading: isSkeletonLoading, children: _jsx("span", Object.assign({ ref: ref, style: style, className: classNames('ndl-data-grid-results', className) }, restProps, htmlAttributes, { children: children || (_jsxs("span", { children: ["Showing", ' ', _jsx("
|
|
314
|
+
return (_jsx(Skeleton, Object.assign({ as: "span", onBackground: "weak", shape: "rectangular" }, skeletonProps, { isLoading: isSkeletonLoading, children: _jsx("span", Object.assign({ ref: ref, style: style, className: classNames('ndl-data-grid-results', className) }, restProps, htmlAttributes, { children: children || (_jsxs("span", { children: ["Showing", ' ', _jsx("span", { className: "n-font-bold", children: totalRows ? `${from}${to !== from ? `-${to}` : ''}` : 0 }), ' ', "of ", _jsx("span", { className: "n-font-bold", children: totalRows }), " ", resultsLabel] })) })) })));
|
|
315
315
|
};
|
|
316
316
|
const RowsPerPage = (_a) => {
|
|
317
317
|
var { portalTarget: portalTargetProp, children, className, style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["portalTarget", "children", "className", "style", "htmlAttributes", "ref"]);
|