@refineui/react 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/authoring-manifest.cjs +534 -3
  2. package/dist/authoring-manifest.cjs.map +1 -1
  3. package/dist/authoring-manifest.js +534 -3
  4. package/dist/authoring-manifest.js.map +1 -1
  5. package/dist/index.cjs +10694 -9944
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.cts +115 -2
  8. package/dist/index.d.ts +115 -2
  9. package/dist/index.js +6159 -5424
  10. package/dist/index.js.map +1 -1
  11. package/dist/spec/authoring/components/calendar.json +14 -1
  12. package/dist/spec/authoring/components/code-block-actions.json +28 -0
  13. package/dist/spec/authoring/components/code-block-content.json +45 -0
  14. package/dist/spec/authoring/components/code-block-copy-button.json +28 -0
  15. package/dist/spec/authoring/components/code-block-header.json +28 -0
  16. package/dist/spec/authoring/components/code-block-line.json +31 -0
  17. package/dist/spec/authoring/components/code-block-title.json +18 -0
  18. package/dist/spec/authoring/components/code-block.json +90 -0
  19. package/dist/spec/authoring/components/date-input.json +61 -0
  20. package/dist/spec/authoring/components/popover-content.json +18 -1
  21. package/dist/spec/authoring/components/result-actions.json +18 -0
  22. package/dist/spec/authoring/components/result-button.json +18 -0
  23. package/dist/spec/authoring/components/result-description.json +18 -0
  24. package/dist/spec/authoring/components/result-icon.json +18 -0
  25. package/dist/spec/authoring/components/result-title.json +18 -0
  26. package/dist/spec/authoring/components/result.json +44 -0
  27. package/dist/spec/authoring/components/time-input.json +38 -0
  28. package/dist/spec/authoring/manifest.json +534 -3
  29. package/dist/spec/components/calendar.json +9 -0
  30. package/dist/spec/components/code-block.json +18 -0
  31. package/dist/spec/components/date-input.json +71 -0
  32. package/dist/spec/components/result.json +1 -0
  33. package/dist/spec/components/time-input.json +24 -0
  34. package/dist/spec/contract-index.json +25 -1
  35. package/dist/spec/manifest.json +24 -0
  36. package/dist/spec/token-trace-v2.json +1 -1
  37. package/package.json +2 -2
  38. package/refineui.css +120 -12
  39. package/spec/authoring/components/calendar.json +14 -1
  40. package/spec/authoring/components/code-block-actions.json +28 -0
  41. package/spec/authoring/components/code-block-content.json +45 -0
  42. package/spec/authoring/components/code-block-copy-button.json +28 -0
  43. package/spec/authoring/components/code-block-header.json +28 -0
  44. package/spec/authoring/components/code-block-line.json +31 -0
  45. package/spec/authoring/components/code-block-title.json +18 -0
  46. package/spec/authoring/components/code-block.json +90 -0
  47. package/spec/authoring/components/date-input.json +61 -0
  48. package/spec/authoring/components/popover-content.json +18 -1
  49. package/spec/authoring/components/result-actions.json +18 -0
  50. package/spec/authoring/components/result-button.json +18 -0
  51. package/spec/authoring/components/result-description.json +18 -0
  52. package/spec/authoring/components/result-icon.json +18 -0
  53. package/spec/authoring/components/result-title.json +18 -0
  54. package/spec/authoring/components/result.json +44 -0
  55. package/spec/authoring/components/time-input.json +38 -0
  56. package/spec/authoring/manifest.json +534 -3
  57. package/spec/components/calendar.json +9 -0
  58. package/spec/components/code-block.json +18 -0
  59. package/spec/components/date-input.json +71 -0
  60. package/spec/components/result.json +1 -0
  61. package/spec/components/time-input.json +24 -0
  62. package/spec/manifest.json +24 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema": "refineui.authoring/1",
3
3
  "packageName": "@refineui/react",
4
- "packageVersion": "0.4.0",
4
+ "packageVersion": "0.4.1",
5
5
  "css": [
6
6
  "@refineui/react/refineui.css"
7
7
  ],
@@ -194,6 +194,373 @@
194
194
  }
195
195
  ]
196
196
  },
197
+ {
198
+ "id": "date-input",
199
+ "exportPath": "@refineui/react",
200
+ "exportName": "DateInput",
201
+ "kind": "root",
202
+ "category": "components",
203
+ "label": "Date Input",
204
+ "props": [
205
+ {
206
+ "name": "mode",
207
+ "label": "mode",
208
+ "valueType": "enum",
209
+ "control": "segmented",
210
+ "options": [
211
+ "single",
212
+ "range"
213
+ ],
214
+ "defaultValue": "single",
215
+ "section": "variants"
216
+ }
217
+ ],
218
+ "preview": {
219
+ "mode": "full"
220
+ },
221
+ "slots": [
222
+ {
223
+ "name": "children",
224
+ "accepts": [],
225
+ "repeatable": true,
226
+ "allowText": true,
227
+ "allowAnyComponent": true,
228
+ "defaultChildren": []
229
+ }
230
+ ],
231
+ "presets": [
232
+ {
233
+ "id": "default",
234
+ "label": "Default",
235
+ "root": {
236
+ "component": "DateInput",
237
+ "slots": {
238
+ "children": [
239
+ {
240
+ "component": "Text",
241
+ "props": {
242
+ "variant": "bodyMd"
243
+ },
244
+ "text": "Date Input"
245
+ }
246
+ ]
247
+ }
248
+ }
249
+ }
250
+ ],
251
+ "events": [
252
+ {
253
+ "name": "click",
254
+ "payload": "void"
255
+ }
256
+ ]
257
+ },
258
+ {
259
+ "id": "time-input",
260
+ "exportPath": "@refineui/react",
261
+ "exportName": "TimeInput",
262
+ "kind": "root",
263
+ "category": "utilities",
264
+ "label": "Time Input",
265
+ "props": [],
266
+ "preview": {
267
+ "mode": "full"
268
+ },
269
+ "slots": [
270
+ {
271
+ "name": "children",
272
+ "accepts": [],
273
+ "repeatable": true,
274
+ "allowText": false,
275
+ "allowAnyComponent": true,
276
+ "defaultChildren": []
277
+ }
278
+ ],
279
+ "presets": [
280
+ {
281
+ "id": "default",
282
+ "label": "Default",
283
+ "root": {
284
+ "component": "TimeInput",
285
+ "slots": {}
286
+ }
287
+ }
288
+ ],
289
+ "events": [
290
+ {
291
+ "name": "click",
292
+ "payload": "void"
293
+ }
294
+ ]
295
+ },
296
+ {
297
+ "id": "code-block",
298
+ "exportPath": "@refineui/react",
299
+ "exportName": "CodeBlock",
300
+ "kind": "root",
301
+ "category": "components",
302
+ "label": "Code Block",
303
+ "props": [],
304
+ "preview": {
305
+ "mode": "full"
306
+ },
307
+ "slots": [
308
+ {
309
+ "name": "children",
310
+ "accepts": [
311
+ "CodeBlockHeader",
312
+ "CodeBlockContent"
313
+ ],
314
+ "repeatable": true
315
+ }
316
+ ],
317
+ "presets": [
318
+ {
319
+ "id": "typescript",
320
+ "label": "TypeScript",
321
+ "root": {
322
+ "component": "CodeBlock",
323
+ "slots": {
324
+ "children": [
325
+ {
326
+ "component": "CodeBlockHeader",
327
+ "slots": {
328
+ "children": [
329
+ {
330
+ "component": "CodeBlockTitle",
331
+ "text": "app/api/chat/route.ts"
332
+ },
333
+ {
334
+ "component": "CodeBlockActions",
335
+ "slots": {
336
+ "children": [
337
+ {
338
+ "component": "CodeBlockCopyButton",
339
+ "props": {
340
+ "value": "export async function POST() {\n return Response.json({ ok: true });\n}"
341
+ }
342
+ }
343
+ ]
344
+ }
345
+ }
346
+ ]
347
+ }
348
+ },
349
+ {
350
+ "component": "CodeBlockContent",
351
+ "props": {
352
+ "lineNumbers": true
353
+ },
354
+ "slots": {
355
+ "children": [
356
+ {
357
+ "component": "CodeBlockLine",
358
+ "text": "export async function POST() {"
359
+ },
360
+ {
361
+ "component": "CodeBlockLine",
362
+ "props": {
363
+ "variant": "highlighted"
364
+ },
365
+ "text": " return Response.json({ ok: true });"
366
+ },
367
+ {
368
+ "component": "CodeBlockLine",
369
+ "text": "}"
370
+ }
371
+ ]
372
+ }
373
+ }
374
+ ]
375
+ }
376
+ }
377
+ }
378
+ ],
379
+ "events": [
380
+ {
381
+ "name": "click",
382
+ "payload": "void"
383
+ }
384
+ ]
385
+ },
386
+ {
387
+ "id": "code-block-actions",
388
+ "exportPath": "@refineui/react",
389
+ "exportName": "CodeBlockActions",
390
+ "kind": "part",
391
+ "category": "parts",
392
+ "label": "Code Block Actions",
393
+ "props": [],
394
+ "preview": {
395
+ "mode": "full"
396
+ },
397
+ "parents": [
398
+ {
399
+ "component": "CodeBlockHeader",
400
+ "slot": "children"
401
+ }
402
+ ],
403
+ "slots": [
404
+ {
405
+ "name": "children",
406
+ "accepts": [
407
+ "CodeBlockCopyButton",
408
+ "Button"
409
+ ],
410
+ "repeatable": true
411
+ }
412
+ ]
413
+ },
414
+ {
415
+ "id": "code-block-content",
416
+ "exportPath": "@refineui/react",
417
+ "exportName": "CodeBlockContent",
418
+ "kind": "part",
419
+ "category": "parts",
420
+ "label": "Code Block Content",
421
+ "props": [
422
+ {
423
+ "name": "wrap",
424
+ "valueType": "boolean",
425
+ "control": "toggle",
426
+ "defaultValue": false,
427
+ "section": "properties",
428
+ "label": "wrap"
429
+ },
430
+ {
431
+ "name": "lineNumbers",
432
+ "valueType": "boolean",
433
+ "control": "toggle",
434
+ "defaultValue": false,
435
+ "section": "properties",
436
+ "label": "line Numbers"
437
+ }
438
+ ],
439
+ "preview": {
440
+ "mode": "full"
441
+ },
442
+ "parents": [
443
+ {
444
+ "component": "CodeBlock",
445
+ "slot": "children"
446
+ }
447
+ ],
448
+ "slots": [
449
+ {
450
+ "name": "children",
451
+ "accepts": [
452
+ "CodeBlockLine"
453
+ ],
454
+ "repeatable": true,
455
+ "min": 1
456
+ }
457
+ ]
458
+ },
459
+ {
460
+ "id": "code-block-copy-button",
461
+ "exportPath": "@refineui/react",
462
+ "exportName": "CodeBlockCopyButton",
463
+ "kind": "part",
464
+ "category": "parts",
465
+ "label": "Code Block Copy Button",
466
+ "props": [
467
+ {
468
+ "name": "value",
469
+ "label": "value",
470
+ "valueType": "string",
471
+ "control": "textarea",
472
+ "defaultValue": "",
473
+ "required": true,
474
+ "section": "properties"
475
+ }
476
+ ],
477
+ "preview": {
478
+ "mode": "full"
479
+ },
480
+ "parents": [
481
+ {
482
+ "component": "CodeBlockActions",
483
+ "slot": "children"
484
+ }
485
+ ]
486
+ },
487
+ {
488
+ "id": "code-block-header",
489
+ "exportPath": "@refineui/react",
490
+ "exportName": "CodeBlockHeader",
491
+ "kind": "part",
492
+ "category": "parts",
493
+ "label": "Code Block Header",
494
+ "props": [],
495
+ "preview": {
496
+ "mode": "full"
497
+ },
498
+ "parents": [
499
+ {
500
+ "component": "CodeBlock",
501
+ "slot": "children"
502
+ }
503
+ ],
504
+ "slots": [
505
+ {
506
+ "name": "children",
507
+ "accepts": [
508
+ "CodeBlockTitle",
509
+ "CodeBlockActions"
510
+ ],
511
+ "repeatable": true
512
+ }
513
+ ]
514
+ },
515
+ {
516
+ "id": "code-block-line",
517
+ "exportPath": "@refineui/react",
518
+ "exportName": "CodeBlockLine",
519
+ "kind": "part",
520
+ "category": "parts",
521
+ "label": "Code Block Line",
522
+ "props": [
523
+ {
524
+ "name": "variant",
525
+ "valueType": "enum",
526
+ "control": "segmented",
527
+ "options": [
528
+ "default",
529
+ "highlighted"
530
+ ],
531
+ "defaultValue": "default",
532
+ "section": "variants",
533
+ "label": "variant"
534
+ }
535
+ ],
536
+ "preview": {
537
+ "mode": "full"
538
+ },
539
+ "parents": [
540
+ {
541
+ "component": "CodeBlockContent",
542
+ "slot": "children"
543
+ }
544
+ ]
545
+ },
546
+ {
547
+ "id": "code-block-title",
548
+ "exportPath": "@refineui/react",
549
+ "exportName": "CodeBlockTitle",
550
+ "kind": "part",
551
+ "category": "parts",
552
+ "label": "Code Block Title",
553
+ "props": [],
554
+ "preview": {
555
+ "mode": "full"
556
+ },
557
+ "parents": [
558
+ {
559
+ "component": "CodeBlockHeader",
560
+ "slot": "children"
561
+ }
562
+ ]
563
+ },
197
564
  {
198
565
  "id": "input-otp",
199
566
  "exportPath": "@refineui/react",
@@ -2158,6 +2525,140 @@
2158
2525
  }
2159
2526
  ]
2160
2527
  },
2528
+ {
2529
+ "id": "result",
2530
+ "exportPath": "@refineui/react",
2531
+ "exportName": "Result",
2532
+ "kind": "root",
2533
+ "category": "utilities",
2534
+ "label": "Result",
2535
+ "props": [],
2536
+ "preview": {
2537
+ "mode": "full"
2538
+ },
2539
+ "slots": [
2540
+ {
2541
+ "name": "children",
2542
+ "accepts": [
2543
+ "ResultActions",
2544
+ "ResultButton",
2545
+ "ResultDescription",
2546
+ "ResultIcon",
2547
+ "ResultTitle"
2548
+ ],
2549
+ "repeatable": true,
2550
+ "allowText": false,
2551
+ "allowAnyComponent": false,
2552
+ "defaultChildren": []
2553
+ }
2554
+ ],
2555
+ "presets": [
2556
+ {
2557
+ "id": "default",
2558
+ "label": "Default",
2559
+ "root": {
2560
+ "component": "Result",
2561
+ "slots": {}
2562
+ }
2563
+ }
2564
+ ],
2565
+ "events": [
2566
+ {
2567
+ "name": "click",
2568
+ "payload": "void"
2569
+ }
2570
+ ]
2571
+ },
2572
+ {
2573
+ "id": "result-actions",
2574
+ "exportPath": "@refineui/react",
2575
+ "exportName": "ResultActions",
2576
+ "kind": "part",
2577
+ "category": "parts",
2578
+ "label": "Result Actions",
2579
+ "props": [],
2580
+ "preview": {
2581
+ "mode": "full"
2582
+ },
2583
+ "parents": [
2584
+ {
2585
+ "component": "Result",
2586
+ "slot": "children"
2587
+ }
2588
+ ]
2589
+ },
2590
+ {
2591
+ "id": "result-button",
2592
+ "exportPath": "@refineui/react",
2593
+ "exportName": "ResultButton",
2594
+ "kind": "part",
2595
+ "category": "parts",
2596
+ "label": "Result Button",
2597
+ "props": [],
2598
+ "preview": {
2599
+ "mode": "full"
2600
+ },
2601
+ "parents": [
2602
+ {
2603
+ "component": "Result",
2604
+ "slot": "children"
2605
+ }
2606
+ ]
2607
+ },
2608
+ {
2609
+ "id": "result-description",
2610
+ "exportPath": "@refineui/react",
2611
+ "exportName": "ResultDescription",
2612
+ "kind": "part",
2613
+ "category": "parts",
2614
+ "label": "Result Description",
2615
+ "props": [],
2616
+ "preview": {
2617
+ "mode": "full"
2618
+ },
2619
+ "parents": [
2620
+ {
2621
+ "component": "Result",
2622
+ "slot": "children"
2623
+ }
2624
+ ]
2625
+ },
2626
+ {
2627
+ "id": "result-icon",
2628
+ "exportPath": "@refineui/react",
2629
+ "exportName": "ResultIcon",
2630
+ "kind": "part",
2631
+ "category": "parts",
2632
+ "label": "Result Icon",
2633
+ "props": [],
2634
+ "preview": {
2635
+ "mode": "full"
2636
+ },
2637
+ "parents": [
2638
+ {
2639
+ "component": "Result",
2640
+ "slot": "children"
2641
+ }
2642
+ ]
2643
+ },
2644
+ {
2645
+ "id": "result-title",
2646
+ "exportPath": "@refineui/react",
2647
+ "exportName": "ResultTitle",
2648
+ "kind": "part",
2649
+ "category": "parts",
2650
+ "label": "Result Title",
2651
+ "props": [],
2652
+ "preview": {
2653
+ "mode": "full"
2654
+ },
2655
+ "parents": [
2656
+ {
2657
+ "component": "Result",
2658
+ "slot": "children"
2659
+ }
2660
+ ]
2661
+ },
2161
2662
  {
2162
2663
  "id": "kbd",
2163
2664
  "exportPath": "@refineui/react",
@@ -4744,7 +5245,20 @@
4744
5245
  "kind": "root",
4745
5246
  "category": "components",
4746
5247
  "label": "Calendar",
4747
- "props": [],
5248
+ "props": [
5249
+ {
5250
+ "name": "mode",
5251
+ "label": "mode",
5252
+ "valueType": "enum",
5253
+ "control": "segmented",
5254
+ "options": [
5255
+ "single",
5256
+ "range"
5257
+ ],
5258
+ "defaultValue": "single",
5259
+ "section": "variants"
5260
+ }
5261
+ ],
4748
5262
  "preview": {
4749
5263
  "mode": "full"
4750
5264
  },
@@ -7515,7 +8029,24 @@
7515
8029
  "kind": "part",
7516
8030
  "category": "parts",
7517
8031
  "label": "Popover Content",
7518
- "props": [],
8032
+ "props": [
8033
+ {
8034
+ "name": "surface",
8035
+ "valueType": "boolean",
8036
+ "control": "toggle",
8037
+ "defaultValue": true,
8038
+ "section": "properties",
8039
+ "label": "surface"
8040
+ },
8041
+ {
8042
+ "name": "fitContent",
8043
+ "valueType": "boolean",
8044
+ "control": "toggle",
8045
+ "defaultValue": false,
8046
+ "section": "properties",
8047
+ "label": "fit Content"
8048
+ }
8049
+ ],
7519
8050
  "preview": {
7520
8051
  "mode": "full"
7521
8052
  },
@@ -10,6 +10,15 @@
10
10
  "attributes": {
11
11
  "data-refineui": "calendar"
12
12
  },
13
+ "variants": {
14
+ "mode": [
15
+ "single",
16
+ "range"
17
+ ]
18
+ },
19
+ "tokens": {
20
+ "visual": "calendar"
21
+ },
13
22
  "states": {
14
23
  "pseudo": [
15
24
  "focus-visible"
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "../schema/component-spec.schema.json",
3
+ "component": "code-block",
4
+ "version": 1,
5
+ "export": "CodeBlock",
6
+ "anatomy": {
7
+ "root": "code-block",
8
+ "actions": "code-block-actions",
9
+ "content": "code-block-content",
10
+ "copy": "code-block-copy",
11
+ "header": "code-block-header",
12
+ "line": "code-block-line",
13
+ "title": "code-block-title"
14
+ },
15
+ "attributes": {
16
+ "data-refineui": "code-block"
17
+ }
18
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "$schema": "../schema/component-spec.schema.json",
3
+ "component": "date-input",
4
+ "version": 1,
5
+ "export": "DateInput",
6
+ "anatomy": {
7
+ "root": "date-input"
8
+ },
9
+ "attributes": {
10
+ "data-refineui": "date-input"
11
+ },
12
+ "variants": {
13
+ "mode": [
14
+ "single",
15
+ "range"
16
+ ]
17
+ },
18
+ "tokens": {
19
+ "visual": "input"
20
+ },
21
+ "states": {
22
+ "pseudo": [
23
+ "focus-visible"
24
+ ],
25
+ "component": {
26
+ "selection": [
27
+ "placeholder",
28
+ "value"
29
+ ],
30
+ "validation": [
31
+ "error",
32
+ "success"
33
+ ]
34
+ },
35
+ "availability": [
36
+ "disabled"
37
+ ],
38
+ "environment": [
39
+ "dir"
40
+ ]
41
+ },
42
+ "accessibility": {
43
+ "date-input": {
44
+ "element": "button",
45
+ "native": true,
46
+ "labeling": {
47
+ "accessibleName": "required"
48
+ }
49
+ }
50
+ },
51
+ "keyboard": {
52
+ "Enter": {
53
+ "action": "activate",
54
+ "native": true
55
+ },
56
+ "Space": {
57
+ "action": "activate",
58
+ "native": true
59
+ }
60
+ },
61
+ "focus": {
62
+ "visual": {
63
+ "required": true,
64
+ "selector": ":focus-visible"
65
+ }
66
+ },
67
+ "layout": {
68
+ "direction": "logical",
69
+ "rtl": true
70
+ }
71
+ }
@@ -0,0 +1 @@
1
+ {"$schema":"../schema/component-spec.schema.json","component":"result","version":1,"export":"Result","anatomy":{"root":"result","icon":"result-icon","title":"result-title","description":"result-description","actions":"result-actions"},"attributes":{"data-refineui":"result"},"variants":{"variant":["success","info","warning","error"]},"accessibility":{"result":{"element":"section","labeling":{"accessibleName":"required"}}},"layout":{"direction":"logical","rtl":true}}
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "../schema/component-spec.schema.json",
3
+ "component": "time-input",
4
+ "version": 1,
5
+ "export": "TimeInput",
6
+ "anatomy": { "root": "time-input" },
7
+ "attributes": { "data-refineui": "time-input" },
8
+ "tokens": { "visual": "input" },
9
+ "states": {
10
+ "pseudo": ["focus-visible"],
11
+ "component": {
12
+ "selection": ["placeholder", "value"],
13
+ "validation": ["error", "success"]
14
+ },
15
+ "availability": ["disabled"],
16
+ "environment": ["dir"]
17
+ },
18
+ "accessibility": {
19
+ "time-input": { "element": "button", "native": true, "labeling": { "accessibleName": "required" } }
20
+ },
21
+ "keyboard": { "Enter": { "action": "activate", "native": true }, "Space": { "action": "activate", "native": true } },
22
+ "focus": { "visual": { "required": true, "selector": ":focus-visible" } },
23
+ "layout": { "direction": "logical", "rtl": true }
24
+ }