@neo4j-ndl/react 4.18.5 → 4.18.7
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/LICENSES.txt +30 -4
- package/lib/cjs/_generated/style-rules/index.js +7 -1
- package/lib/cjs/_generated/style-rules/index.js.map +1 -1
- package/lib/cjs/_generated/style-rules/literal-schemas.js +32 -1
- package/lib/cjs/_generated/style-rules/literal-schemas.js.map +1 -1
- package/lib/cjs/_generated/style-rules/range-utils.js +46 -0
- package/lib/cjs/_generated/style-rules/range-utils.js.map +1 -0
- package/lib/cjs/data-grid/stories/datagrid-rule-based-styling-datetime.story.js +26 -8
- package/lib/cjs/data-grid/stories/datagrid-rule-based-styling-datetime.story.js.map +1 -1
- package/lib/cjs/data-grid/style-rules/evaluate.js +60 -55
- package/lib/cjs/data-grid/style-rules/evaluate.js.map +1 -1
- package/lib/cjs/data-grid/style-rules/index.js +2 -1
- package/lib/cjs/data-grid/style-rules/index.js.map +1 -1
- package/lib/cjs/data-grid/style-rules/types.js +20 -14
- package/lib/cjs/data-grid/style-rules/types.js.map +1 -1
- package/lib/cjs/menu/Menu.js +60 -42
- package/lib/cjs/menu/Menu.js.map +1 -1
- package/lib/cjs/menu/stories/menu-in-dialog.story.js +3 -5
- package/lib/cjs/menu/stories/menu-in-dialog.story.js.map +1 -1
- package/lib/esm/_generated/style-rules/index.js +2 -1
- package/lib/esm/_generated/style-rules/index.js.map +1 -1
- package/lib/esm/_generated/style-rules/literal-schemas.js +28 -0
- package/lib/esm/_generated/style-rules/literal-schemas.js.map +1 -1
- package/lib/esm/_generated/style-rules/range-utils.js +43 -0
- package/lib/esm/_generated/style-rules/range-utils.js.map +1 -0
- package/lib/esm/data-grid/stories/datagrid-rule-based-styling-datetime.story.js +26 -8
- package/lib/esm/data-grid/stories/datagrid-rule-based-styling-datetime.story.js.map +1 -1
- package/lib/esm/data-grid/style-rules/evaluate.js +61 -56
- package/lib/esm/data-grid/style-rules/evaluate.js.map +1 -1
- package/lib/esm/data-grid/style-rules/index.js +1 -1
- package/lib/esm/data-grid/style-rules/index.js.map +1 -1
- package/lib/esm/data-grid/style-rules/types.js +20 -14
- package/lib/esm/data-grid/style-rules/types.js.map +1 -1
- package/lib/esm/menu/Menu.js +60 -42
- package/lib/esm/menu/Menu.js.map +1 -1
- package/lib/esm/menu/stories/menu-in-dialog.story.js +3 -5
- package/lib/esm/menu/stories/menu-in-dialog.story.js.map +1 -1
- package/lib/types/_generated/style-rules/index.d.ts +3 -2
- package/lib/types/_generated/style-rules/index.d.ts.map +1 -1
- package/lib/types/_generated/style-rules/literal-schemas.d.ts +20 -0
- package/lib/types/_generated/style-rules/literal-schemas.d.ts.map +1 -1
- package/lib/types/_generated/style-rules/range-utils.d.ts +26 -0
- package/lib/types/_generated/style-rules/range-utils.d.ts.map +1 -0
- package/lib/types/data-grid/stories/datagrid-rule-based-styling-datetime.story.d.ts.map +1 -1
- package/lib/types/data-grid/style-rules/evaluate.d.ts.map +1 -1
- package/lib/types/data-grid/style-rules/index.d.ts +2 -2
- package/lib/types/data-grid/style-rules/index.d.ts.map +1 -1
- package/lib/types/data-grid/style-rules/types.d.ts +141 -28
- package/lib/types/data-grid/style-rules/types.d.ts.map +1 -1
- package/lib/types/menu/Menu.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-in-dialog.story.d.ts.map +1 -1
- package/package.json +3 -3
- package/skills/ndl-react/SKILL.md +4 -4
- package/skills/ndl-react/components/ai/response.md +5 -5
- package/skills/ndl-react/components/color-picker.md +78 -0
- package/skills/ndl-react/components/data-grid.md +27 -9
- package/skills/ndl-react/components/menu.md +42 -41
- package/skills/ndl-react/components/time-picker.md +44 -0
- package/skills/ndl-react/components/timezone-picker.md +43 -0
|
@@ -19,10 +19,19 @@
|
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
import { z } from 'zod';
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* A literal value used in style-rule where clauses, converter return values,
|
|
24
|
+
* and cell data. Temporal wrappers resolve to numbers at evaluation time.
|
|
25
|
+
*/
|
|
23
26
|
export declare const DataGridStyleRuleLiteralSchema: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
24
27
|
bigint: z.ZodString;
|
|
25
|
-
}, z.core.$strip>]>, z.ZodBoolean, z.ZodNull
|
|
28
|
+
}, z.core.$strip>]>, z.ZodBoolean, z.ZodNull, z.ZodObject<{
|
|
29
|
+
datetime: z.ZodString;
|
|
30
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
31
|
+
localdatetime: z.ZodString;
|
|
32
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
33
|
+
time: z.ZodString;
|
|
34
|
+
}, z.core.$strip>]>;
|
|
26
35
|
export type DataGridStyleRuleLiteral = z.infer<typeof DataGridStyleRuleLiteralSchema>;
|
|
27
36
|
/** A JSON-safe bigint literal represented by a signed decimal string. */
|
|
28
37
|
export declare const DataGridBigintLiteralSchema: z.ZodObject<{
|
|
@@ -34,6 +43,17 @@ export declare const DataGridNumericLiteralSchema: z.ZodUnion<readonly [z.ZodNum
|
|
|
34
43
|
bigint: z.ZodString;
|
|
35
44
|
}, z.core.$strip>]>;
|
|
36
45
|
export type DataGridNumericLiteral = z.infer<typeof DataGridNumericLiteralSchema>;
|
|
46
|
+
/** A numeric, datetime, localdatetime, or time literal used as a range boundary. */
|
|
47
|
+
export declare const DataGridRangeLiteralSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
48
|
+
bigint: z.ZodString;
|
|
49
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
50
|
+
datetime: z.ZodString;
|
|
51
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
52
|
+
localdatetime: z.ZodString;
|
|
53
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
+
time: z.ZodString;
|
|
55
|
+
}, z.core.$strip>]>;
|
|
56
|
+
export type DataGridRangeLiteral = z.infer<typeof DataGridRangeLiteralSchema>;
|
|
37
57
|
/** A reference to a column whose cell value is resolved at evaluation time. */
|
|
38
58
|
export declare const DataGridColumnRefSchema: z.ZodObject<{
|
|
39
59
|
column: z.ZodString;
|
|
@@ -82,19 +102,19 @@ export declare const DataGridTimeLiteralSchema: z.ZodObject<{
|
|
|
82
102
|
time: z.ZodString;
|
|
83
103
|
}, z.core.$strip>;
|
|
84
104
|
export type DataGridTimeLiteral = z.infer<typeof DataGridTimeLiteralSchema>;
|
|
85
|
-
/** An operand in a style-rule where clause -- either a literal value
|
|
105
|
+
/** An operand in a style-rule where clause -- either a literal value or a column reference. */
|
|
86
106
|
export declare const DataGridStyleRuleOperandSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
87
107
|
column: z.ZodString;
|
|
88
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
108
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
109
|
+
bigint: z.ZodString;
|
|
110
|
+
}, z.core.$strip>]>, z.ZodBoolean, z.ZodNull, z.ZodObject<{
|
|
89
111
|
datetime: z.ZodString;
|
|
90
112
|
}, z.core.$strip>, z.ZodObject<{
|
|
91
113
|
localdatetime: z.ZodString;
|
|
92
114
|
}, z.core.$strip>, z.ZodObject<{
|
|
93
115
|
time: z.ZodString;
|
|
94
|
-
}, z.core.$strip
|
|
95
|
-
|
|
96
|
-
}, z.core.$strip>]>, z.ZodBoolean, z.ZodNull]>]>;
|
|
97
|
-
export type DataGridStyleRuleOperand = DataGridColumnRef | DataGridDatetimeLiteral | DataGridLocalDatetimeLiteral | DataGridTimeLiteral | DataGridStyleRuleLiteral;
|
|
116
|
+
}, z.core.$strip>]>]>;
|
|
117
|
+
export type DataGridStyleRuleOperand = z.infer<typeof DataGridStyleRuleOperandSchema>;
|
|
98
118
|
/**
|
|
99
119
|
* Recursive WHERE clause for conditional expressions.
|
|
100
120
|
* Inspired by the graph visualization style rule system but adapted for tabular data.
|
|
@@ -129,23 +149,42 @@ export type DataGridStyleRuleWhere = {
|
|
|
129
149
|
};
|
|
130
150
|
export declare const DataGridStyleRuleWhereSchema: z.ZodType<DataGridStyleRuleWhere>;
|
|
131
151
|
/**
|
|
132
|
-
* Gradient coloring based on a continuous
|
|
152
|
+
* Gradient coloring based on a continuous orderable column value.
|
|
133
153
|
* Colors should be hex strings (#rrggbb).
|
|
134
|
-
*
|
|
154
|
+
* Temporal range boundaries resolve to numbers before interpolation.
|
|
155
|
+
* If the column value is missing or non-orderable, the colorRange is ignored.
|
|
135
156
|
*/
|
|
136
157
|
export declare const DataGridColorRangeSchema: z.ZodObject<{
|
|
137
158
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
138
159
|
maxColor: z.ZodString;
|
|
139
|
-
maxValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
160
|
+
maxValue: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
140
161
|
bigint: z.ZodString;
|
|
162
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
163
|
+
datetime: z.ZodString;
|
|
164
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
165
|
+
localdatetime: z.ZodString;
|
|
166
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
167
|
+
time: z.ZodString;
|
|
141
168
|
}, z.core.$strip>]>;
|
|
142
169
|
midColor: z.ZodOptional<z.ZodString>;
|
|
143
|
-
midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
170
|
+
midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
144
171
|
bigint: z.ZodString;
|
|
172
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
173
|
+
datetime: z.ZodString;
|
|
174
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
175
|
+
localdatetime: z.ZodString;
|
|
176
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
177
|
+
time: z.ZodString;
|
|
145
178
|
}, z.core.$strip>]>>;
|
|
146
179
|
minColor: z.ZodString;
|
|
147
|
-
minValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
180
|
+
minValue: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
148
181
|
bigint: z.ZodString;
|
|
182
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
183
|
+
datetime: z.ZodString;
|
|
184
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
185
|
+
localdatetime: z.ZodString;
|
|
186
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
187
|
+
time: z.ZodString;
|
|
149
188
|
}, z.core.$strip>]>;
|
|
150
189
|
onColumn: z.ZodString;
|
|
151
190
|
}, z.core.$strip>;
|
|
@@ -165,16 +204,34 @@ export declare const DataGridCellStyleSchema: z.ZodObject<{
|
|
|
165
204
|
colorRange: z.ZodOptional<z.ZodObject<{
|
|
166
205
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
167
206
|
maxColor: z.ZodString;
|
|
168
|
-
maxValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
207
|
+
maxValue: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
169
208
|
bigint: z.ZodString;
|
|
209
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
210
|
+
datetime: z.ZodString;
|
|
211
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
212
|
+
localdatetime: z.ZodString;
|
|
213
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
214
|
+
time: z.ZodString;
|
|
170
215
|
}, z.core.$strip>]>;
|
|
171
216
|
midColor: z.ZodOptional<z.ZodString>;
|
|
172
|
-
midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
217
|
+
midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
173
218
|
bigint: z.ZodString;
|
|
219
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
220
|
+
datetime: z.ZodString;
|
|
221
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
222
|
+
localdatetime: z.ZodString;
|
|
223
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
224
|
+
time: z.ZodString;
|
|
174
225
|
}, z.core.$strip>]>>;
|
|
175
226
|
minColor: z.ZodString;
|
|
176
|
-
minValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
227
|
+
minValue: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
177
228
|
bigint: z.ZodString;
|
|
229
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
230
|
+
datetime: z.ZodString;
|
|
231
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
232
|
+
localdatetime: z.ZodString;
|
|
233
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
234
|
+
time: z.ZodString;
|
|
178
235
|
}, z.core.$strip>]>;
|
|
179
236
|
onColumn: z.ZodString;
|
|
180
237
|
}, z.core.$strip>>;
|
|
@@ -185,16 +242,34 @@ export declare const DataGridCellStyleSchema: z.ZodObject<{
|
|
|
185
242
|
textColorRange: z.ZodOptional<z.ZodObject<{
|
|
186
243
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
187
244
|
maxColor: z.ZodString;
|
|
188
|
-
maxValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
245
|
+
maxValue: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
189
246
|
bigint: z.ZodString;
|
|
247
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
248
|
+
datetime: z.ZodString;
|
|
249
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
250
|
+
localdatetime: z.ZodString;
|
|
251
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
252
|
+
time: z.ZodString;
|
|
190
253
|
}, z.core.$strip>]>;
|
|
191
254
|
midColor: z.ZodOptional<z.ZodString>;
|
|
192
|
-
midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
255
|
+
midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
193
256
|
bigint: z.ZodString;
|
|
257
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
258
|
+
datetime: z.ZodString;
|
|
259
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
260
|
+
localdatetime: z.ZodString;
|
|
261
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
262
|
+
time: z.ZodString;
|
|
194
263
|
}, z.core.$strip>]>>;
|
|
195
264
|
minColor: z.ZodString;
|
|
196
|
-
minValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
265
|
+
minValue: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
197
266
|
bigint: z.ZodString;
|
|
267
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
268
|
+
datetime: z.ZodString;
|
|
269
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
270
|
+
localdatetime: z.ZodString;
|
|
271
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
272
|
+
time: z.ZodString;
|
|
198
273
|
}, z.core.$strip>]>;
|
|
199
274
|
onColumn: z.ZodString;
|
|
200
275
|
}, z.core.$strip>>;
|
|
@@ -206,9 +281,11 @@ export type DataGridCellStyle = z.infer<typeof DataGridCellStyleSchema>;
|
|
|
206
281
|
* and color-range interpolation.
|
|
207
282
|
*
|
|
208
283
|
* The function receives the raw cell value (`unknown`) and must return a scalar
|
|
209
|
-
* (`string | number | bigint | { bigint: string } | boolean | null`)
|
|
210
|
-
*
|
|
211
|
-
*
|
|
284
|
+
* (`string | number | bigint | { bigint: string } | boolean | null`) or a
|
|
285
|
+
* temporal wrapper (`{ datetime: string }`, `{ localdatetime: string }`,
|
|
286
|
+
* `{ time: string }`). The engine parses temporal wrappers to milliseconds.
|
|
287
|
+
* Return `null` or `undefined` to signal that the value is missing or cannot
|
|
288
|
+
* be represented.
|
|
212
289
|
*
|
|
213
290
|
* Note: converter functions are TypeScript-only — they cannot be serialized as
|
|
214
291
|
* JSON, so no Zod schema is provided.
|
|
@@ -240,16 +317,34 @@ export declare const DataGridStyleRuleSchema: z.ZodObject<{
|
|
|
240
317
|
colorRange: z.ZodOptional<z.ZodObject<{
|
|
241
318
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
242
319
|
maxColor: z.ZodString;
|
|
243
|
-
maxValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
320
|
+
maxValue: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
244
321
|
bigint: z.ZodString;
|
|
322
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
323
|
+
datetime: z.ZodString;
|
|
324
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
325
|
+
localdatetime: z.ZodString;
|
|
326
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
327
|
+
time: z.ZodString;
|
|
245
328
|
}, z.core.$strip>]>;
|
|
246
329
|
midColor: z.ZodOptional<z.ZodString>;
|
|
247
|
-
midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
330
|
+
midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
248
331
|
bigint: z.ZodString;
|
|
332
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
333
|
+
datetime: z.ZodString;
|
|
334
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
335
|
+
localdatetime: z.ZodString;
|
|
336
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
337
|
+
time: z.ZodString;
|
|
249
338
|
}, z.core.$strip>]>>;
|
|
250
339
|
minColor: z.ZodString;
|
|
251
|
-
minValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
340
|
+
minValue: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
252
341
|
bigint: z.ZodString;
|
|
342
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
343
|
+
datetime: z.ZodString;
|
|
344
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
345
|
+
localdatetime: z.ZodString;
|
|
346
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
347
|
+
time: z.ZodString;
|
|
253
348
|
}, z.core.$strip>]>;
|
|
254
349
|
onColumn: z.ZodString;
|
|
255
350
|
}, z.core.$strip>>;
|
|
@@ -260,16 +355,34 @@ export declare const DataGridStyleRuleSchema: z.ZodObject<{
|
|
|
260
355
|
textColorRange: z.ZodOptional<z.ZodObject<{
|
|
261
356
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
262
357
|
maxColor: z.ZodString;
|
|
263
|
-
maxValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
358
|
+
maxValue: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
264
359
|
bigint: z.ZodString;
|
|
360
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
361
|
+
datetime: z.ZodString;
|
|
362
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
363
|
+
localdatetime: z.ZodString;
|
|
364
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
365
|
+
time: z.ZodString;
|
|
265
366
|
}, z.core.$strip>]>;
|
|
266
367
|
midColor: z.ZodOptional<z.ZodString>;
|
|
267
|
-
midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
368
|
+
midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
268
369
|
bigint: z.ZodString;
|
|
370
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
371
|
+
datetime: z.ZodString;
|
|
372
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
373
|
+
localdatetime: z.ZodString;
|
|
374
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
375
|
+
time: z.ZodString;
|
|
269
376
|
}, z.core.$strip>]>>;
|
|
270
377
|
minColor: z.ZodString;
|
|
271
|
-
minValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
378
|
+
minValue: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
|
|
272
379
|
bigint: z.ZodString;
|
|
380
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
381
|
+
datetime: z.ZodString;
|
|
382
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
383
|
+
localdatetime: z.ZodString;
|
|
384
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
385
|
+
time: z.ZodString;
|
|
273
386
|
}, z.core.$strip>]>;
|
|
274
387
|
onColumn: z.ZodString;
|
|
275
388
|
}, z.core.$strip>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/style-rules/types.ts"],"names":[],"m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"
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../src/menu/Menu.tsx"],"names":[],"mappings":"AA+CA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC5B,MAAM,kBAAkB,CAAC;AAQ1B,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EAEd,aAAa,EACb,cAAc,EACd,SAAS,EAET,cAAc,EACf,MAAM,cAAc,CAAC;AAoDtB,QAAA,MAAM,aAAa,GAAI,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,EAAE,2NAoBzD,sBAAsB,CAAC,CAAC,EAAE,SAAS,CAAC,4CAoRtC,CAAC;AAsVF;;;;;;;;;GASG;AACH,QAAA,MAAM,IAAI,WAtpBkB,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC;mBA4ehD,CAAC,SAAS,KAAK,CAAC,WAAW,oFAQ9C,sBAAsB,CAAC,CAAC,EAAE,iBAAiB,CAAC;;;;+EAkI5C,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC;WAjQnB,CAAC,SAAS,KAAK,CAAC,WAAW,gKAe1C,sBAAsB,CAAC,CAAC,EAAE,aAAa,CAAC;IAuRzC;;OAEG;YAtEc,CAAC,SAAS,KAAK,CAAC,WAAW,iFAQ3C,sBAAsB,CAAC,CAAC,EAAE,cAAc,CAAC;gBA/EzB,CAAC,SAAS,KAAK,CAAC,WAAW,2KAgB3C,sBAAsB,CAAC,CAAC,EAAE,cAAc,CAAC;CAgI1C,CAAC;AACH,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-in-dialog.story.d.ts","sourceRoot":"","sources":["../../../../src/menu/stories/menu-in-dialog.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAMjD,QAAA,MAAM,SAAS,+
|
|
1
|
+
{"version":3,"file":"menu-in-dialog.story.d.ts","sourceRoot":"","sources":["../../../../src/menu/stories/menu-in-dialog.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAMjD,QAAA,MAAM,SAAS,+CAmEd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neo4j-ndl/react",
|
|
3
|
-
"version": "4.18.
|
|
3
|
+
"version": "4.18.7",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "React implementation of Neo4j Design System",
|
|
6
6
|
"keywords": [
|
|
@@ -404,8 +404,8 @@
|
|
|
404
404
|
"dependencies": {
|
|
405
405
|
"@dnd-kit/core": "6.3.1",
|
|
406
406
|
"@dnd-kit/sortable": "10.0.0",
|
|
407
|
-
"@floating-ui/react": "0.27.
|
|
408
|
-
"@floating-ui/react-dom": "2.1.
|
|
407
|
+
"@floating-ui/react": "0.27.20",
|
|
408
|
+
"@floating-ui/react-dom": "2.1.9",
|
|
409
409
|
"@heroicons/react": "2.2.0",
|
|
410
410
|
"@neo4j-devtools/word-color": "0.0.8",
|
|
411
411
|
"@uiw/react-color": "2.8.1",
|
|
@@ -68,10 +68,10 @@ Import from `@neo4j-ndl/react`.
|
|
|
68
68
|
| `ClipboardButton` | [components/clipboard-button.md](components/clipboard-button.md) | | 7 |
|
|
69
69
|
| `Code` | [components/code.md](components/code.md) | ✅ | 2 |
|
|
70
70
|
| `CodeBlock` | [components/code-block.md](components/code-block.md) | | 8 |
|
|
71
|
-
| `ColorPicker` | [components/color-picker.md](components/color-picker.md) | |
|
|
71
|
+
| `ColorPicker` | [components/color-picker.md](components/color-picker.md) | | 5 |
|
|
72
72
|
| `ConditionalWrap` | [components/conditional-wrap.md](components/conditional-wrap.md) | | 1 |
|
|
73
73
|
| `DataGrid` | [components/data-grid.md](components/data-grid.md) | | 20 |
|
|
74
|
-
| `DatePicker` | [components/date-picker.md](components/date-picker.md) | ✅ |
|
|
74
|
+
| `DatePicker` | [components/date-picker.md](components/date-picker.md) | ✅ | 15 |
|
|
75
75
|
| `Dialog` | [components/dialog.md](components/dialog.md) | ✅ | 7 |
|
|
76
76
|
| `DismissibleTag` | [components/dismissible-tag.md](components/dismissible-tag.md) | | 4 |
|
|
77
77
|
| `Divider` | [components/divider.md](components/divider.md) | | 3 |
|
|
@@ -112,8 +112,8 @@ Import from `@neo4j-ndl/react`.
|
|
|
112
112
|
| `TextButton` | [components/text-button.md](components/text-button.md) | | 0 |
|
|
113
113
|
| `TextInput` | [components/text-input.md](components/text-input.md) | ✅ | 16 |
|
|
114
114
|
| `TextLink` | [components/text-link.md](components/text-link.md) | ✅ | 5 |
|
|
115
|
-
| `TimePicker` | [components/time-picker.md](components/time-picker.md) | |
|
|
116
|
-
| `TimeZonePicker` | [components/timezone-picker.md](components/timezone-picker.md) | |
|
|
115
|
+
| `TimePicker` | [components/time-picker.md](components/time-picker.md) | | 5 |
|
|
116
|
+
| `TimeZonePicker` | [components/timezone-picker.md](components/timezone-picker.md) | | 10 |
|
|
117
117
|
| `Tooltip` | [components/tooltip.md](components/tooltip.md) | ✅ | 13 |
|
|
118
118
|
| `TreeView` | [components/tree-view.md](components/tree-view.md) | | 3 |
|
|
119
119
|
| `Typography` | [components/typography.md](components/typography.md) | | 3 |
|
|
@@ -550,7 +550,7 @@ export const Component = () => {
|
|
|
550
550
|
role: 'user' | 'assistant';
|
|
551
551
|
content: string;
|
|
552
552
|
thinkingTime?: number;
|
|
553
|
-
|
|
553
|
+
isDone?: boolean;
|
|
554
554
|
}[]
|
|
555
555
|
>([]);
|
|
556
556
|
const [prompt, setPrompt] = useState('');
|
|
@@ -584,7 +584,7 @@ export const Component = () => {
|
|
|
584
584
|
const newMessages = [...prev];
|
|
585
585
|
const lastMessage = newMessages[newMessages.length - 1];
|
|
586
586
|
if (lastMessage?.role === 'assistant') {
|
|
587
|
-
lastMessage.
|
|
587
|
+
lastMessage.isDone = true;
|
|
588
588
|
}
|
|
589
589
|
return newMessages;
|
|
590
590
|
});
|
|
@@ -615,7 +615,7 @@ export const Component = () => {
|
|
|
615
615
|
let currentText = '';
|
|
616
616
|
setMessages((prev) => [
|
|
617
617
|
...prev,
|
|
618
|
-
{ content: '',
|
|
618
|
+
{ content: '', isDone: false, role: 'assistant', thinkingTime },
|
|
619
619
|
]);
|
|
620
620
|
|
|
621
621
|
// Simulate streaming
|
|
@@ -647,7 +647,7 @@ export const Component = () => {
|
|
|
647
647
|
const newMessages = [...prev];
|
|
648
648
|
const lastMessage = newMessages[newMessages.length - 1];
|
|
649
649
|
if (lastMessage.role === 'assistant') {
|
|
650
|
-
lastMessage.
|
|
650
|
+
lastMessage.isDone = true;
|
|
651
651
|
}
|
|
652
652
|
return newMessages;
|
|
653
653
|
});
|
|
@@ -748,7 +748,7 @@ export const Component = () => {
|
|
|
748
748
|
<div className="n-flex n-flex-col n-gap-2">
|
|
749
749
|
<Response>{msg.content}</Response>
|
|
750
750
|
|
|
751
|
-
{msg.
|
|
751
|
+
{msg.isDone === true && (
|
|
752
752
|
<div className="n-flex n-flex-row n-gap-1.5">
|
|
753
753
|
<CleanIconButton size="small" description="Dislike">
|
|
754
754
|
<HandThumbDownIconOutline />
|
|
@@ -9,7 +9,9 @@ Import: `import { ColorPicker } from '@neo4j-ndl/react'`
|
|
|
9
9
|
| Prop | Type | Required | Default | Description |
|
|
10
10
|
|------|------|----------|---------|-------------|
|
|
11
11
|
| `color` | `` HsvaColor \| RgbaColor \| `#${string}` `` | ✅ | | The current color value. Can be provided in HSVA, RGBA, or Hex format. The component will automatically convert between formats as needed. |
|
|
12
|
+
| `floatingStrategy` | `'absolute' \| 'fixed'` | | `absolute` | The floating strategy to use for the menu. If not provided, the menu will be positioned absolutely. |
|
|
12
13
|
| `onChange` | `` (newColor: { hex: `#${string}`; rgb: RgbaColor; hsva: HsvaColor; }) => void `` | ✅ | | Callback function triggered when the color value changes. Receives an object containing the new color in all three formats (hex, rgb, hsva) for convenience. |
|
|
14
|
+
| `portalTarget` | `HTMLElement \| null` | | | The target element to portal the menu to. If not provided, the menu will not be portaled. |
|
|
13
15
|
| `shouldShowEyeDropper` | `boolean` | | `true` | Whether to display the eye dropper tool that allows users to sample colors from anywhere on the screen. |
|
|
14
16
|
| `swatches` | `` (HsvaColor \| RgbaColor \| `#${string}`)[] `` | | `Object.values(tokens.graph).filter(validHex)` | Optional array of predefined color swatches for quick selection. Each swatch can be in HSVA, RGBA, or Hex format. |
|
|
15
17
|
|
|
@@ -103,6 +105,82 @@ const Component = () => {
|
|
|
103
105
|
export default Component;
|
|
104
106
|
```
|
|
105
107
|
|
|
108
|
+
### Dialog
|
|
109
|
+
|
|
110
|
+
```tsx
|
|
111
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
112
|
+
|
|
113
|
+
import { ColorPicker, Dialog, FilledButton } from '@neo4j-ndl/react';
|
|
114
|
+
import { useState } from 'react';
|
|
115
|
+
|
|
116
|
+
const Component = () => {
|
|
117
|
+
const [isOpen, setIsOpen] = useState<boolean>(false);
|
|
118
|
+
const handleClick = () => setIsOpen((prev) => !prev);
|
|
119
|
+
const handleClose = () => setIsOpen(false);
|
|
120
|
+
|
|
121
|
+
const [color, setColor] = useState({
|
|
122
|
+
a: 1,
|
|
123
|
+
b: 0,
|
|
124
|
+
g: 0,
|
|
125
|
+
r: 0,
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
return (
|
|
129
|
+
<div className="n-flex n-items-center n-justify-centern-w-full">
|
|
130
|
+
<FilledButton
|
|
131
|
+
onClick={handleClick}
|
|
132
|
+
htmlAttributes={{ 'aria-haspopup': 'dialog' }}
|
|
133
|
+
>
|
|
134
|
+
Open Dialog
|
|
135
|
+
</FilledButton>
|
|
136
|
+
<Dialog onClose={handleClose} isOpen={isOpen}>
|
|
137
|
+
<Dialog.Header>Header</Dialog.Header>
|
|
138
|
+
<Dialog.Content className="n-max-h-96 n-overflow-y-auto">
|
|
139
|
+
<ColorPicker
|
|
140
|
+
color={color}
|
|
141
|
+
onChange={(newColor) => setColor(newColor.rgb)}
|
|
142
|
+
floatingStrategy="fixed"
|
|
143
|
+
/>
|
|
144
|
+
</Dialog.Content>
|
|
145
|
+
</Dialog>
|
|
146
|
+
</div>
|
|
147
|
+
);
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export default Component;
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Popover
|
|
154
|
+
|
|
155
|
+
```tsx
|
|
156
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
157
|
+
|
|
158
|
+
import { ColorPicker, FilledButton, Popover } from '@neo4j-ndl/react';
|
|
159
|
+
|
|
160
|
+
const Component = () => {
|
|
161
|
+
return (
|
|
162
|
+
<Popover>
|
|
163
|
+
<Popover.Trigger hasButtonWrapper>
|
|
164
|
+
<FilledButton>Open Popover</FilledButton>
|
|
165
|
+
</Popover.Trigger>
|
|
166
|
+
<Popover.Content className="n-overflow-y-auto n-overflow-x-hidden n-p-4 n-max-h-64">
|
|
167
|
+
Popover content
|
|
168
|
+
<ColorPicker
|
|
169
|
+
color="#ff0000"
|
|
170
|
+
onChange={() => {
|
|
171
|
+
console.info('color changed');
|
|
172
|
+
}}
|
|
173
|
+
floatingStrategy="fixed"
|
|
174
|
+
portalTarget={document.body}
|
|
175
|
+
/>
|
|
176
|
+
</Popover.Content>
|
|
177
|
+
</Popover>
|
|
178
|
+
);
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
export default Component;
|
|
182
|
+
```
|
|
183
|
+
|
|
106
184
|
### Without Eyedropper
|
|
107
185
|
|
|
108
186
|
```tsx
|
|
@@ -18,7 +18,7 @@ Import: `import { DataGrid } from '@neo4j-ndl/react'`
|
|
|
18
18
|
| `ref` | `Ref<HTMLDivElement>` | | | A ref to apply to the root element. |
|
|
19
19
|
| `rootProps` | `HtmlAttributes<"div">` | | | @deprecated Use htmlAttributes, className and style on the root element instead |
|
|
20
20
|
| `skeletonProps` | `(SkeletonProps & { as?: ElementType<any, keyof IntrinsicElements>; } & BaseProps<ElementType<any, keyof IntrinsicElements>>)` | | | |
|
|
21
|
-
| `styleRules` | `{ apply: { color?: { value: string; isDisabled?: boolean; }; colorRange?: { maxColor: string; maxValue: number \| bigint \| { bigint: string; }
|
|
21
|
+
| `styleRules` | `{ apply: { color?: { value: string; isDisabled?: boolean; }; colorRange?: { maxColor: string; maxValue: number \| bigint \| { bigint: string; } \| { datetime: string; } \| { ...; } \| { ...; }; ... 5 more ...; midValue?: number \| ... 5 more ... \| undefined; } \| undefined; textColor?: { ...; } \| un...` | | | Rule-based conditional styling for cells and rows. |
|
|
22
22
|
| `styleRuleValueConverters` | `DataGridStyleRuleValueConverters` | | | Per-column converters that teach the style-rule engine how to interpret complex cell values. |
|
|
23
23
|
| `styling` | `Partial<{ hasZebraStriping: boolean; borderStyle: "all-sides" \| "horizontal" \| "vertical" \| "none"; headerStyle: "filled" \| "clean"; hasHoverEffects: boolean; isCompact: boolean; }>` | | `{}` | |
|
|
24
24
|
| `tableInstance` | `Table<T>` | ✅ | | Table instance created from `useTable` |
|
|
@@ -1959,16 +1959,13 @@ const data: EventRow[] = [
|
|
|
1959
1959
|
// 13:15 Paris CEST (+02:00) = 11:15 UTC
|
|
1960
1960
|
scheduledDate: new Date('2026-07-08T13:15:00+02:00'),
|
|
1961
1961
|
scheduledTimeMs: 11 * 3_600_000 + 15 * 60_000,
|
|
1962
|
-
status: '
|
|
1962
|
+
status: 'confirmed',
|
|
1963
1963
|
},
|
|
1964
|
-
// ── Far future (after 2026-07-15T00:00 Stockholm / CEST = 2026-07-14T22:00Z)
|
|
1965
1964
|
{
|
|
1966
1965
|
event: 'Architecture summit',
|
|
1967
1966
|
localTimeDisplay: '08:00 CEST (+02:00)',
|
|
1968
|
-
// 08:00 Amsterdam CEST (+02:00) = 06:00 UTC
|
|
1969
|
-
|
|
1970
|
-
// same UTC day as July 14 22:00Z, so it crosses the far-future boundary.
|
|
1971
|
-
scheduledDate: new Date('2026-07-15T08:00:00+02:00'),
|
|
1967
|
+
// 08:00 Amsterdam CEST (+02:00) = 06:00 UTC
|
|
1968
|
+
scheduledDate: new Date('2026-07-11T08:00:00+02:00'),
|
|
1972
1969
|
scheduledTimeMs: 6 * 3_600_000,
|
|
1973
1970
|
status: 'confirmed',
|
|
1974
1971
|
},
|
|
@@ -1976,17 +1973,18 @@ const data: EventRow[] = [
|
|
|
1976
1973
|
event: 'Annual conference',
|
|
1977
1974
|
localTimeDisplay: '09:00 PDT (-07:00)',
|
|
1978
1975
|
// 09:00 San Francisco PDT (-07:00) = 16:00 UTC — after Stockholm closes
|
|
1979
|
-
scheduledDate: new Date('2026-
|
|
1976
|
+
scheduledDate: new Date('2026-07-13T09:00:00-07:00'),
|
|
1980
1977
|
scheduledTimeMs: 16 * 3_600_000,
|
|
1981
1978
|
status: 'confirmed',
|
|
1982
1979
|
},
|
|
1980
|
+
// ── Far future (after 2026-07-15T00:00 Stockholm / CEST = 2026-07-14T22:00Z)
|
|
1983
1981
|
{
|
|
1984
1982
|
event: 'Year-end planning',
|
|
1985
1983
|
localTimeDisplay: '09:00 JST (+09:00)',
|
|
1986
1984
|
// 09:00 Tokyo JST (+09:00) = 00:00 UTC — midnight, well before Stockholm opens
|
|
1987
1985
|
scheduledDate: new Date('2026-11-20T09:00:00+09:00'),
|
|
1988
1986
|
scheduledTimeMs: 0,
|
|
1989
|
-
status: '
|
|
1987
|
+
status: 'cancelled',
|
|
1990
1988
|
},
|
|
1991
1989
|
];
|
|
1992
1990
|
|
|
@@ -2008,6 +2006,26 @@ const data: EventRow[] = [
|
|
|
2008
2006
|
* { time: '17:00:00+02:00' } resolves to 15:00 UTC (54 000 000 ms)
|
|
2009
2007
|
*/
|
|
2010
2008
|
const styleRules: DataGridStyleRule[] = [
|
|
2009
|
+
// Near-future date cells use temporal literals directly as gradient
|
|
2010
|
+
// boundaries. Several rows are spread across this interval so the progression
|
|
2011
|
+
// from amber to blue is easy to see.
|
|
2012
|
+
{
|
|
2013
|
+
apply: {
|
|
2014
|
+
colorRange: {
|
|
2015
|
+
maxColor: '#dbeafe',
|
|
2016
|
+
maxValue: {
|
|
2017
|
+
datetime: '2026-07-15T00:00:00[Europe/Stockholm]',
|
|
2018
|
+
},
|
|
2019
|
+
minColor: '#fef3c7',
|
|
2020
|
+
minValue: {
|
|
2021
|
+
datetime: '2026-06-26T00:00:00[Europe/Stockholm]',
|
|
2022
|
+
},
|
|
2023
|
+
onColumn: 'scheduledDate',
|
|
2024
|
+
},
|
|
2025
|
+
},
|
|
2026
|
+
column: 'scheduledDate',
|
|
2027
|
+
priority: 0,
|
|
2028
|
+
},
|
|
2011
2029
|
// Past events — entire row in muted red
|
|
2012
2030
|
{
|
|
2013
2031
|
apply: {
|