@zentauri-ui/zentauri-components 2.1.6 → 2.1.8
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/README.md +12 -8
- package/cli/cli.integration.test.ts +36 -0
- package/cli/index.mjs +43 -7
- package/cli/props.json +462 -3
- package/cli/registry.json +29 -0
- package/cli/rewrite-imports.mjs +29 -4
- package/cli/rewrite-imports.test.ts +35 -0
- package/dist/{chunk-WWKAJHIV.mjs → chunk-4PAHLHYF.mjs} +3 -3
- package/dist/{chunk-WWKAJHIV.mjs.map → chunk-4PAHLHYF.mjs.map} +1 -1
- package/dist/chunk-4SLVTSHM.js +241 -0
- package/dist/chunk-4SLVTSHM.js.map +1 -0
- package/dist/chunk-6OVDBAMI.js +19 -0
- package/dist/{chunk-3W2UUKWP.js.map → chunk-6OVDBAMI.js.map} +1 -1
- package/dist/chunk-74SKXGTM.js +4 -0
- package/dist/chunk-74SKXGTM.js.map +1 -0
- package/dist/{chunk-QE7OJW4J.js → chunk-BAAXQPZ7.js} +6 -6
- package/dist/{chunk-QE7OJW4J.js.map → chunk-BAAXQPZ7.js.map} +1 -1
- package/dist/chunk-CYKSS5S5.mjs +128 -0
- package/dist/chunk-CYKSS5S5.mjs.map +1 -0
- package/dist/chunk-D7ZTSAA6.mjs +221 -0
- package/dist/chunk-D7ZTSAA6.mjs.map +1 -0
- package/dist/{chunk-VA6SB6NN.js → chunk-DPNTQ4AK.js} +73 -6
- package/dist/chunk-DPNTQ4AK.js.map +1 -0
- package/dist/chunk-HMDH4BQJ.js +123 -0
- package/dist/chunk-HMDH4BQJ.js.map +1 -0
- package/dist/chunk-I7EBE7BD.js +98 -0
- package/dist/chunk-I7EBE7BD.js.map +1 -0
- package/dist/chunk-IHDM7AHY.mjs +233 -0
- package/dist/chunk-IHDM7AHY.mjs.map +1 -0
- package/dist/chunk-L5QORCUO.js +225 -0
- package/dist/chunk-L5QORCUO.js.map +1 -0
- package/dist/chunk-LHBJD57K.mjs +143 -0
- package/dist/chunk-LHBJD57K.mjs.map +1 -0
- package/dist/{chunk-CHI6MBTI.mjs → chunk-OWVQVAOY.mjs} +3 -3
- package/dist/{chunk-CHI6MBTI.mjs.map → chunk-OWVQVAOY.mjs.map} +1 -1
- package/dist/chunk-OYAJG2BO.js +83 -0
- package/dist/chunk-OYAJG2BO.js.map +1 -0
- package/dist/chunk-PTU5ZAYX.js +145 -0
- package/dist/chunk-PTU5ZAYX.js.map +1 -0
- package/dist/chunk-QKO5DA4N.mjs +81 -0
- package/dist/chunk-QKO5DA4N.mjs.map +1 -0
- package/dist/chunk-T7PIKDUZ.js +130 -0
- package/dist/chunk-T7PIKDUZ.js.map +1 -0
- package/dist/chunk-TDK5TVJE.mjs +3 -0
- package/dist/chunk-TDK5TVJE.mjs.map +1 -0
- package/dist/{chunk-A4IB3C23.mjs → chunk-UVP3MUBU.mjs} +58 -7
- package/dist/chunk-UVP3MUBU.mjs.map +1 -0
- package/dist/chunk-VBNW2B4D.mjs +3 -0
- package/dist/chunk-VBNW2B4D.mjs.map +1 -0
- package/dist/chunk-W6DO36XD.mjs +96 -0
- package/dist/chunk-W6DO36XD.mjs.map +1 -0
- package/dist/chunk-XR3J46TZ.js +4 -0
- package/dist/chunk-XR3J46TZ.js.map +1 -0
- package/dist/chunk-ZOHCADDL.mjs +121 -0
- package/dist/chunk-ZOHCADDL.mjs.map +1 -0
- package/dist/design-system/data-table.d.ts +8 -0
- package/dist/design-system/data-table.d.ts.map +1 -0
- package/dist/design-system/facade.js +6 -6
- package/dist/design-system/facade.mjs +5 -5
- package/dist/design-system/index.d.ts +2 -0
- package/dist/design-system/index.d.ts.map +1 -1
- package/dist/design-system/split-button.d.ts +25 -0
- package/dist/design-system/split-button.d.ts.map +1 -0
- package/dist/hooks/useTableFilter.js +6 -116
- package/dist/hooks/useTableFilter.js.map +1 -1
- package/dist/hooks/useTableFilter.mjs +1 -118
- package/dist/hooks/useTableFilter.mjs.map +1 -1
- package/dist/hooks/useTableSort.js +6 -91
- package/dist/hooks/useTableSort.js.map +1 -1
- package/dist/hooks/useTableSort.mjs +1 -93
- package/dist/hooks/useTableSort.mjs.map +1 -1
- package/dist/hooks/useVirtualList.js +6 -76
- package/dist/hooks/useVirtualList.js.map +1 -1
- package/dist/hooks/useVirtualList.mjs +1 -78
- package/dist/hooks/useVirtualList.mjs.map +1 -1
- package/dist/ui/buttons/animated.js +8 -8
- package/dist/ui/buttons/animated.mjs +6 -6
- package/dist/ui/buttons.js +10 -9
- package/dist/ui/buttons.mjs +8 -7
- package/dist/ui/checkbox.js +7 -123
- package/dist/ui/checkbox.js.map +1 -1
- package/dist/ui/checkbox.mjs +2 -126
- package/dist/ui/checkbox.mjs.map +1 -1
- package/dist/ui/data-table/data-table-base.d.ts +6 -0
- package/dist/ui/data-table/data-table-base.d.ts.map +1 -0
- package/dist/ui/data-table/data-table.d.ts +6 -0
- package/dist/ui/data-table/data-table.d.ts.map +1 -0
- package/dist/ui/data-table/index.d.ts +4 -0
- package/dist/ui/data-table/index.d.ts.map +1 -0
- package/dist/ui/data-table/types.d.ts +92 -0
- package/dist/ui/data-table/types.d.ts.map +1 -0
- package/dist/ui/data-table/variants.d.ts +8 -0
- package/dist/ui/data-table/variants.d.ts.map +1 -0
- package/dist/ui/data-table.js +620 -0
- package/dist/ui/data-table.js.map +1 -0
- package/dist/ui/data-table.mjs +611 -0
- package/dist/ui/data-table.mjs.map +1 -0
- package/dist/ui/dropdown/dropdown.d.ts +1 -1
- package/dist/ui/dropdown/dropdown.d.ts.map +1 -1
- package/dist/ui/dropdown/types.d.ts +2 -2
- package/dist/ui/dropdown/types.d.ts.map +1 -1
- package/dist/ui/dropdown.js +31 -231
- package/dist/ui/dropdown.js.map +1 -1
- package/dist/ui/dropdown.mjs +4 -229
- package/dist/ui/dropdown.mjs.map +1 -1
- package/dist/ui/dynamic-stepper.js +18 -18
- package/dist/ui/dynamic-stepper.mjs +7 -7
- package/dist/ui/inputs.js +7 -138
- package/dist/ui/inputs.js.map +1 -1
- package/dist/ui/inputs.mjs +2 -141
- package/dist/ui/inputs.mjs.map +1 -1
- package/dist/ui/pagination.js +20 -221
- package/dist/ui/pagination.js.map +1 -1
- package/dist/ui/pagination.mjs +8 -223
- package/dist/ui/pagination.mjs.map +1 -1
- package/dist/ui/split-button/index.d.ts +4 -0
- package/dist/ui/split-button/index.d.ts.map +1 -0
- package/dist/ui/split-button/split-button-base.d.ts +6 -0
- package/dist/ui/split-button/split-button-base.d.ts.map +1 -0
- package/dist/ui/split-button/split-button.d.ts +6 -0
- package/dist/ui/split-button/split-button.d.ts.map +1 -0
- package/dist/ui/split-button/types.d.ts +30 -0
- package/dist/ui/split-button/types.d.ts.map +1 -0
- package/dist/ui/split-button/variants.d.ts +16 -0
- package/dist/ui/split-button/variants.d.ts.map +1 -0
- package/dist/ui/split-button.js +287 -0
- package/dist/ui/split-button.js.map +1 -0
- package/dist/ui/split-button.mjs +278 -0
- package/dist/ui/split-button.mjs.map +1 -0
- package/dist/ui/table.js +1 -0
- package/dist/ui/table.mjs +1 -0
- package/package.json +1 -1
- package/src/design-system/data-table.ts +20 -0
- package/src/design-system/index.ts +2 -0
- package/src/design-system/split-button.ts +38 -0
- package/src/ui/data-table/data-table-base.tsx +701 -0
- package/src/ui/data-table/data-table.test.tsx +389 -0
- package/src/ui/data-table/data-table.tsx +11 -0
- package/src/ui/data-table/index.ts +24 -0
- package/src/ui/data-table/types.ts +121 -0
- package/src/ui/data-table/variants.ts +21 -0
- package/src/ui/dropdown/dropdown.tsx +7 -3
- package/src/ui/dropdown/types.ts +2 -2
- package/src/ui/split-button/index.ts +19 -0
- package/src/ui/split-button/split-button-base.tsx +232 -0
- package/src/ui/split-button/split-button.test.tsx +208 -0
- package/src/ui/split-button/split-button.tsx +9 -0
- package/src/ui/split-button/types.ts +46 -0
- package/src/ui/split-button/variants.ts +46 -0
- package/dist/chunk-3W2UUKWP.js +0 -19
- package/dist/chunk-A4IB3C23.mjs.map +0 -1
- package/dist/chunk-VA6SB6NN.js.map +0 -1
package/cli/props.json
CHANGED
|
@@ -5308,6 +5308,279 @@
|
|
|
5308
5308
|
}
|
|
5309
5309
|
]
|
|
5310
5310
|
},
|
|
5311
|
+
"data-table": {
|
|
5312
|
+
"slug": "data-table",
|
|
5313
|
+
"subcomponents": [
|
|
5314
|
+
{
|
|
5315
|
+
"name": "static:DataTable",
|
|
5316
|
+
"displayName": "DataTable",
|
|
5317
|
+
"propsType": "DataTableProps",
|
|
5318
|
+
"source": "static",
|
|
5319
|
+
"props": [
|
|
5320
|
+
{
|
|
5321
|
+
"name": "appearance",
|
|
5322
|
+
"type": "'default' | 'ghost' | 'blue' | 'cyan' | 'green' | 'lime' | 'mint' | 'ocean' | 'sapphire' | 'lavender' | 'ruby' | 'red' | 'slate' | 'zinc' | 'stone' | 'royal' | 'electric' | 'forest' | 'sunset' | 'magenta' | 'crimson' | 'aqua' | 'plum' | 'sky' | 'rose' | 'purple' | 'pink' | 'orange' | 'yellow' | 'teal' | 'indigo' | 'emerald' | 'gray' | 'violet' | 'amber' | 'striped' | 'bordered' | null | undefined",
|
|
5323
|
+
"required": false,
|
|
5324
|
+
"group": "behavior",
|
|
5325
|
+
"deprecated": false
|
|
5326
|
+
},
|
|
5327
|
+
{
|
|
5328
|
+
"name": "bulkActions",
|
|
5329
|
+
"type": "readonly DataTableBulkAction<TData>[] | undefined",
|
|
5330
|
+
"required": false,
|
|
5331
|
+
"group": "behavior",
|
|
5332
|
+
"deprecated": false
|
|
5333
|
+
},
|
|
5334
|
+
{
|
|
5335
|
+
"name": "caption",
|
|
5336
|
+
"type": "ReactNode",
|
|
5337
|
+
"required": false,
|
|
5338
|
+
"group": "behavior",
|
|
5339
|
+
"deprecated": false
|
|
5340
|
+
},
|
|
5341
|
+
{
|
|
5342
|
+
"name": "columns",
|
|
5343
|
+
"type": "readonly DataTableColumn<TData, TKey>[]",
|
|
5344
|
+
"required": true,
|
|
5345
|
+
"group": "behavior",
|
|
5346
|
+
"deprecated": false
|
|
5347
|
+
},
|
|
5348
|
+
{
|
|
5349
|
+
"name": "data",
|
|
5350
|
+
"type": "readonly TData[]",
|
|
5351
|
+
"required": true,
|
|
5352
|
+
"group": "behavior",
|
|
5353
|
+
"deprecated": false
|
|
5354
|
+
},
|
|
5355
|
+
{
|
|
5356
|
+
"name": "defaultSelectedRowIds",
|
|
5357
|
+
"type": "readonly string[] | undefined",
|
|
5358
|
+
"required": false,
|
|
5359
|
+
"group": "behavior",
|
|
5360
|
+
"deprecated": false
|
|
5361
|
+
},
|
|
5362
|
+
{
|
|
5363
|
+
"name": "defaultSortDirection",
|
|
5364
|
+
"type": "TableSortDirection | undefined",
|
|
5365
|
+
"required": false,
|
|
5366
|
+
"group": "behavior",
|
|
5367
|
+
"deprecated": false
|
|
5368
|
+
},
|
|
5369
|
+
{
|
|
5370
|
+
"name": "defaultSortKey",
|
|
5371
|
+
"type": "TKey | undefined",
|
|
5372
|
+
"required": false,
|
|
5373
|
+
"group": "behavior",
|
|
5374
|
+
"deprecated": false
|
|
5375
|
+
},
|
|
5376
|
+
{
|
|
5377
|
+
"name": "defaultVisibleColumnIds",
|
|
5378
|
+
"type": "readonly TKey[] | undefined",
|
|
5379
|
+
"required": false,
|
|
5380
|
+
"group": "behavior",
|
|
5381
|
+
"deprecated": false
|
|
5382
|
+
},
|
|
5383
|
+
{
|
|
5384
|
+
"name": "emptyContent",
|
|
5385
|
+
"type": "ReactNode",
|
|
5386
|
+
"required": false,
|
|
5387
|
+
"group": "behavior",
|
|
5388
|
+
"deprecated": false
|
|
5389
|
+
},
|
|
5390
|
+
{
|
|
5391
|
+
"name": "enableColumnVisibility",
|
|
5392
|
+
"type": "boolean | undefined",
|
|
5393
|
+
"required": false,
|
|
5394
|
+
"group": "behavior",
|
|
5395
|
+
"deprecated": false
|
|
5396
|
+
},
|
|
5397
|
+
{
|
|
5398
|
+
"name": "enableRowSelection",
|
|
5399
|
+
"type": "boolean | undefined",
|
|
5400
|
+
"required": false,
|
|
5401
|
+
"group": "behavior",
|
|
5402
|
+
"deprecated": false
|
|
5403
|
+
},
|
|
5404
|
+
{
|
|
5405
|
+
"name": "getRowId",
|
|
5406
|
+
"type": "((row: TData, index: number) => string) | undefined",
|
|
5407
|
+
"required": false,
|
|
5408
|
+
"group": "behavior",
|
|
5409
|
+
"deprecated": false
|
|
5410
|
+
},
|
|
5411
|
+
{
|
|
5412
|
+
"name": "loading",
|
|
5413
|
+
"type": "boolean | undefined",
|
|
5414
|
+
"required": false,
|
|
5415
|
+
"group": "behavior",
|
|
5416
|
+
"deprecated": false
|
|
5417
|
+
},
|
|
5418
|
+
{
|
|
5419
|
+
"name": "loadingContent",
|
|
5420
|
+
"type": "ReactNode",
|
|
5421
|
+
"required": false,
|
|
5422
|
+
"group": "behavior",
|
|
5423
|
+
"deprecated": false
|
|
5424
|
+
},
|
|
5425
|
+
{
|
|
5426
|
+
"name": "onColumnVisibilityChange",
|
|
5427
|
+
"type": "((visibleColumnIds: TKey[]) => void) | undefined",
|
|
5428
|
+
"required": false,
|
|
5429
|
+
"group": "behavior",
|
|
5430
|
+
"deprecated": false
|
|
5431
|
+
},
|
|
5432
|
+
{
|
|
5433
|
+
"name": "onRowSelectionChange",
|
|
5434
|
+
"type": "((selectedRowIds: string[], selectedRows: TData[]) => void) | undefined",
|
|
5435
|
+
"required": false,
|
|
5436
|
+
"group": "behavior",
|
|
5437
|
+
"deprecated": false
|
|
5438
|
+
},
|
|
5439
|
+
{
|
|
5440
|
+
"name": "onSortChange",
|
|
5441
|
+
"type": "((sort: { sortKey?: TKey; sortDirection: TableSortDirection; }) => void) | undefined",
|
|
5442
|
+
"required": false,
|
|
5443
|
+
"group": "behavior",
|
|
5444
|
+
"deprecated": false
|
|
5445
|
+
},
|
|
5446
|
+
{
|
|
5447
|
+
"name": "pagination",
|
|
5448
|
+
"type": "boolean | DataTablePaginationOptions | undefined",
|
|
5449
|
+
"required": false,
|
|
5450
|
+
"group": "behavior",
|
|
5451
|
+
"deprecated": false
|
|
5452
|
+
},
|
|
5453
|
+
{
|
|
5454
|
+
"name": "ref",
|
|
5455
|
+
"type": "Ref<HTMLElement> | undefined",
|
|
5456
|
+
"required": false,
|
|
5457
|
+
"group": "behavior",
|
|
5458
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).",
|
|
5459
|
+
"deprecated": false
|
|
5460
|
+
},
|
|
5461
|
+
{
|
|
5462
|
+
"name": "search",
|
|
5463
|
+
"type": "boolean | DataTableSearchOptions<TKey> | undefined",
|
|
5464
|
+
"required": false,
|
|
5465
|
+
"group": "behavior",
|
|
5466
|
+
"deprecated": false
|
|
5467
|
+
},
|
|
5468
|
+
{
|
|
5469
|
+
"name": "selectedRowIds",
|
|
5470
|
+
"type": "readonly string[] | undefined",
|
|
5471
|
+
"required": false,
|
|
5472
|
+
"group": "behavior",
|
|
5473
|
+
"deprecated": false
|
|
5474
|
+
},
|
|
5475
|
+
{
|
|
5476
|
+
"name": "showRowCount",
|
|
5477
|
+
"type": "boolean | undefined",
|
|
5478
|
+
"required": false,
|
|
5479
|
+
"group": "behavior",
|
|
5480
|
+
"deprecated": false
|
|
5481
|
+
},
|
|
5482
|
+
{
|
|
5483
|
+
"name": "size",
|
|
5484
|
+
"type": "'md' | 'sm' | 'lg' | null | undefined",
|
|
5485
|
+
"required": false,
|
|
5486
|
+
"group": "behavior",
|
|
5487
|
+
"deprecated": false
|
|
5488
|
+
},
|
|
5489
|
+
{
|
|
5490
|
+
"name": "sortDirection",
|
|
5491
|
+
"type": "TableSortDirection | undefined",
|
|
5492
|
+
"required": false,
|
|
5493
|
+
"group": "behavior",
|
|
5494
|
+
"deprecated": false
|
|
5495
|
+
},
|
|
5496
|
+
{
|
|
5497
|
+
"name": "sortKey",
|
|
5498
|
+
"type": "TKey | undefined",
|
|
5499
|
+
"required": false,
|
|
5500
|
+
"group": "behavior",
|
|
5501
|
+
"deprecated": false
|
|
5502
|
+
},
|
|
5503
|
+
{
|
|
5504
|
+
"name": "stickyHeader",
|
|
5505
|
+
"type": "boolean | null | undefined",
|
|
5506
|
+
"required": false,
|
|
5507
|
+
"group": "behavior",
|
|
5508
|
+
"deprecated": false
|
|
5509
|
+
},
|
|
5510
|
+
{
|
|
5511
|
+
"name": "tableClassName",
|
|
5512
|
+
"type": "string | undefined",
|
|
5513
|
+
"required": false,
|
|
5514
|
+
"group": "behavior",
|
|
5515
|
+
"deprecated": false
|
|
5516
|
+
},
|
|
5517
|
+
{
|
|
5518
|
+
"name": "tableScrollAreaAriaLabel",
|
|
5519
|
+
"type": "string | undefined",
|
|
5520
|
+
"required": false,
|
|
5521
|
+
"group": "behavior",
|
|
5522
|
+
"deprecated": false
|
|
5523
|
+
},
|
|
5524
|
+
{
|
|
5525
|
+
"name": "textAlign",
|
|
5526
|
+
"type": "'center' | 'left' | 'right' | undefined",
|
|
5527
|
+
"required": false,
|
|
5528
|
+
"group": "behavior",
|
|
5529
|
+
"deprecated": false
|
|
5530
|
+
},
|
|
5531
|
+
{
|
|
5532
|
+
"name": "virtualization",
|
|
5533
|
+
"type": "DataTableVirtualizationOptions | undefined",
|
|
5534
|
+
"required": false,
|
|
5535
|
+
"group": "behavior",
|
|
5536
|
+
"deprecated": false
|
|
5537
|
+
},
|
|
5538
|
+
{
|
|
5539
|
+
"name": "visibleColumnIds",
|
|
5540
|
+
"type": "readonly TKey[] | undefined",
|
|
5541
|
+
"required": false,
|
|
5542
|
+
"group": "behavior",
|
|
5543
|
+
"deprecated": false
|
|
5544
|
+
},
|
|
5545
|
+
{
|
|
5546
|
+
"name": "className",
|
|
5547
|
+
"type": "string | undefined",
|
|
5548
|
+
"required": false,
|
|
5549
|
+
"group": "dom",
|
|
5550
|
+
"deprecated": false
|
|
5551
|
+
},
|
|
5552
|
+
{
|
|
5553
|
+
"name": "id",
|
|
5554
|
+
"type": "string | undefined",
|
|
5555
|
+
"required": false,
|
|
5556
|
+
"group": "dom",
|
|
5557
|
+
"deprecated": false
|
|
5558
|
+
},
|
|
5559
|
+
{
|
|
5560
|
+
"name": "onClick",
|
|
5561
|
+
"type": "MouseEventHandler<HTMLElement> | undefined",
|
|
5562
|
+
"required": false,
|
|
5563
|
+
"group": "dom",
|
|
5564
|
+
"deprecated": false
|
|
5565
|
+
},
|
|
5566
|
+
{
|
|
5567
|
+
"name": "style",
|
|
5568
|
+
"type": "CSSProperties | undefined",
|
|
5569
|
+
"required": false,
|
|
5570
|
+
"group": "dom",
|
|
5571
|
+
"deprecated": false
|
|
5572
|
+
},
|
|
5573
|
+
{
|
|
5574
|
+
"name": "title",
|
|
5575
|
+
"type": "string | undefined",
|
|
5576
|
+
"required": false,
|
|
5577
|
+
"group": "dom",
|
|
5578
|
+
"deprecated": false
|
|
5579
|
+
}
|
|
5580
|
+
]
|
|
5581
|
+
}
|
|
5582
|
+
]
|
|
5583
|
+
},
|
|
5311
5584
|
"divider": {
|
|
5312
5585
|
"slug": "divider",
|
|
5313
5586
|
"subcomponents": [
|
|
@@ -5979,9 +6252,44 @@
|
|
|
5979
6252
|
{
|
|
5980
6253
|
"name": "children",
|
|
5981
6254
|
"type": "ReactNode",
|
|
5982
|
-
"required":
|
|
6255
|
+
"required": false,
|
|
5983
6256
|
"group": "content",
|
|
5984
6257
|
"deprecated": false
|
|
6258
|
+
},
|
|
6259
|
+
{
|
|
6260
|
+
"name": "className",
|
|
6261
|
+
"type": "string | undefined",
|
|
6262
|
+
"required": false,
|
|
6263
|
+
"group": "dom",
|
|
6264
|
+
"deprecated": false
|
|
6265
|
+
},
|
|
6266
|
+
{
|
|
6267
|
+
"name": "id",
|
|
6268
|
+
"type": "string | undefined",
|
|
6269
|
+
"required": false,
|
|
6270
|
+
"group": "dom",
|
|
6271
|
+
"deprecated": false
|
|
6272
|
+
},
|
|
6273
|
+
{
|
|
6274
|
+
"name": "onClick",
|
|
6275
|
+
"type": "MouseEventHandler<HTMLDivElement> | undefined",
|
|
6276
|
+
"required": false,
|
|
6277
|
+
"group": "dom",
|
|
6278
|
+
"deprecated": false
|
|
6279
|
+
},
|
|
6280
|
+
{
|
|
6281
|
+
"name": "style",
|
|
6282
|
+
"type": "CSSProperties | undefined",
|
|
6283
|
+
"required": false,
|
|
6284
|
+
"group": "dom",
|
|
6285
|
+
"deprecated": false
|
|
6286
|
+
},
|
|
6287
|
+
{
|
|
6288
|
+
"name": "title",
|
|
6289
|
+
"type": "string | undefined",
|
|
6290
|
+
"required": false,
|
|
6291
|
+
"group": "dom",
|
|
6292
|
+
"deprecated": false
|
|
5985
6293
|
}
|
|
5986
6294
|
]
|
|
5987
6295
|
},
|
|
@@ -6064,8 +6372,8 @@
|
|
|
6064
6372
|
"props": [
|
|
6065
6373
|
{
|
|
6066
6374
|
"name": "value",
|
|
6067
|
-
"type": "string",
|
|
6068
|
-
"required":
|
|
6375
|
+
"type": "string | undefined",
|
|
6376
|
+
"required": false,
|
|
6069
6377
|
"group": "controlled",
|
|
6070
6378
|
"deprecated": false
|
|
6071
6379
|
},
|
|
@@ -12455,6 +12763,157 @@
|
|
|
12455
12763
|
}
|
|
12456
12764
|
]
|
|
12457
12765
|
},
|
|
12766
|
+
"split-button": {
|
|
12767
|
+
"slug": "split-button",
|
|
12768
|
+
"subcomponents": [
|
|
12769
|
+
{
|
|
12770
|
+
"name": "static:SplitButton",
|
|
12771
|
+
"displayName": "SplitButton",
|
|
12772
|
+
"propsType": "SplitButtonProps",
|
|
12773
|
+
"source": "static",
|
|
12774
|
+
"props": [
|
|
12775
|
+
{
|
|
12776
|
+
"name": "fullWidth",
|
|
12777
|
+
"type": "enum",
|
|
12778
|
+
"required": false,
|
|
12779
|
+
"group": "variant",
|
|
12780
|
+
"isVariant": true,
|
|
12781
|
+
"options": [
|
|
12782
|
+
"true"
|
|
12783
|
+
],
|
|
12784
|
+
"variantGroup": "fullWidth",
|
|
12785
|
+
"deprecated": false
|
|
12786
|
+
},
|
|
12787
|
+
{
|
|
12788
|
+
"name": "defaultOpen",
|
|
12789
|
+
"type": "boolean | undefined",
|
|
12790
|
+
"required": false,
|
|
12791
|
+
"group": "controlled",
|
|
12792
|
+
"deprecated": false
|
|
12793
|
+
},
|
|
12794
|
+
{
|
|
12795
|
+
"name": "onOpenChange",
|
|
12796
|
+
"type": "((open: boolean) => void) | undefined",
|
|
12797
|
+
"required": false,
|
|
12798
|
+
"group": "controlled",
|
|
12799
|
+
"deprecated": false
|
|
12800
|
+
},
|
|
12801
|
+
{
|
|
12802
|
+
"name": "open",
|
|
12803
|
+
"type": "boolean | undefined",
|
|
12804
|
+
"required": false,
|
|
12805
|
+
"group": "controlled",
|
|
12806
|
+
"deprecated": false
|
|
12807
|
+
},
|
|
12808
|
+
{
|
|
12809
|
+
"name": "appearance",
|
|
12810
|
+
"type": "'default' | 'outline' | 'ghost' | 'blue' | 'cyan' | 'green' | 'lime' | 'mint' | 'ocean' | 'sapphire' | 'lavender' | 'ruby' | 'red' | 'slate' | 'zinc' | 'stone' | 'royal' | 'electric' | 'forest' | 'sunset' | 'magenta' | 'crimson' | 'aqua' | 'plum' | 'sky' | 'rose' | 'purple' | 'pink' | 'orange' | 'yellow' | 'teal' | 'indigo' | 'emerald' | 'gradient-blue' | 'gradient-green' | 'gradient-red' | 'gradient-yellow' | 'gradient-purple' | 'gradient-teal' | 'gradient-indigo' | 'gradient-pink' | 'gradient-orange' | 'link' | 'gray' | 'violet' | 'secondary' | 'destructive' | 'amber' | 'glass' | null | undefined",
|
|
12811
|
+
"required": false,
|
|
12812
|
+
"group": "behavior",
|
|
12813
|
+
"deprecated": false
|
|
12814
|
+
},
|
|
12815
|
+
{
|
|
12816
|
+
"name": "disabled",
|
|
12817
|
+
"type": "boolean | undefined",
|
|
12818
|
+
"required": false,
|
|
12819
|
+
"group": "behavior",
|
|
12820
|
+
"deprecated": false
|
|
12821
|
+
},
|
|
12822
|
+
{
|
|
12823
|
+
"name": "items",
|
|
12824
|
+
"type": "SplitButtonItem[]",
|
|
12825
|
+
"required": true,
|
|
12826
|
+
"group": "behavior",
|
|
12827
|
+
"deprecated": false
|
|
12828
|
+
},
|
|
12829
|
+
{
|
|
12830
|
+
"name": "label",
|
|
12831
|
+
"type": "string",
|
|
12832
|
+
"required": true,
|
|
12833
|
+
"group": "behavior",
|
|
12834
|
+
"deprecated": false
|
|
12835
|
+
},
|
|
12836
|
+
{
|
|
12837
|
+
"name": "loading",
|
|
12838
|
+
"type": "boolean | undefined",
|
|
12839
|
+
"required": false,
|
|
12840
|
+
"group": "behavior",
|
|
12841
|
+
"deprecated": false
|
|
12842
|
+
},
|
|
12843
|
+
{
|
|
12844
|
+
"name": "onClick",
|
|
12845
|
+
"type": "MouseEventHandler<HTMLButtonElement> | undefined",
|
|
12846
|
+
"required": false,
|
|
12847
|
+
"group": "behavior",
|
|
12848
|
+
"deprecated": false
|
|
12849
|
+
},
|
|
12850
|
+
{
|
|
12851
|
+
"name": "size",
|
|
12852
|
+
"type": "SplitButtonSize | undefined",
|
|
12853
|
+
"required": false,
|
|
12854
|
+
"group": "behavior",
|
|
12855
|
+
"deprecated": false
|
|
12856
|
+
},
|
|
12857
|
+
{
|
|
12858
|
+
"name": "startIcon",
|
|
12859
|
+
"type": "ReactNode",
|
|
12860
|
+
"required": false,
|
|
12861
|
+
"group": "behavior",
|
|
12862
|
+
"deprecated": false
|
|
12863
|
+
},
|
|
12864
|
+
{
|
|
12865
|
+
"name": "triggerLabel",
|
|
12866
|
+
"type": "string | undefined",
|
|
12867
|
+
"required": false,
|
|
12868
|
+
"group": "behavior",
|
|
12869
|
+
"deprecated": false
|
|
12870
|
+
},
|
|
12871
|
+
{
|
|
12872
|
+
"name": "triggerOn",
|
|
12873
|
+
"type": "'hover' | 'click' | undefined",
|
|
12874
|
+
"required": false,
|
|
12875
|
+
"group": "behavior",
|
|
12876
|
+
"deprecated": false
|
|
12877
|
+
},
|
|
12878
|
+
{
|
|
12879
|
+
"name": "variant",
|
|
12880
|
+
"type": "SplitButtonVariant | undefined",
|
|
12881
|
+
"required": false,
|
|
12882
|
+
"group": "behavior",
|
|
12883
|
+
"deprecated": false
|
|
12884
|
+
},
|
|
12885
|
+
{
|
|
12886
|
+
"name": "className",
|
|
12887
|
+
"type": "string | undefined",
|
|
12888
|
+
"required": false,
|
|
12889
|
+
"group": "dom",
|
|
12890
|
+
"deprecated": false
|
|
12891
|
+
},
|
|
12892
|
+
{
|
|
12893
|
+
"name": "id",
|
|
12894
|
+
"type": "string | undefined",
|
|
12895
|
+
"required": false,
|
|
12896
|
+
"group": "dom",
|
|
12897
|
+
"deprecated": false
|
|
12898
|
+
},
|
|
12899
|
+
{
|
|
12900
|
+
"name": "style",
|
|
12901
|
+
"type": "CSSProperties | undefined",
|
|
12902
|
+
"required": false,
|
|
12903
|
+
"group": "dom",
|
|
12904
|
+
"deprecated": false
|
|
12905
|
+
},
|
|
12906
|
+
{
|
|
12907
|
+
"name": "title",
|
|
12908
|
+
"type": "string | undefined",
|
|
12909
|
+
"required": false,
|
|
12910
|
+
"group": "dom",
|
|
12911
|
+
"deprecated": false
|
|
12912
|
+
}
|
|
12913
|
+
]
|
|
12914
|
+
}
|
|
12915
|
+
]
|
|
12916
|
+
},
|
|
12458
12917
|
"table": {
|
|
12459
12918
|
"slug": "table",
|
|
12460
12919
|
"subcomponents": [
|
package/cli/registry.json
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"command",
|
|
17
17
|
"context-menu",
|
|
18
18
|
"copy-button",
|
|
19
|
+
"data-table",
|
|
19
20
|
"divider",
|
|
20
21
|
"drawer",
|
|
21
22
|
"dropdown",
|
|
@@ -37,6 +38,7 @@
|
|
|
37
38
|
"select",
|
|
38
39
|
"skeleton",
|
|
39
40
|
"slider",
|
|
41
|
+
"split-button",
|
|
40
42
|
"table",
|
|
41
43
|
"tabs",
|
|
42
44
|
"timeline",
|
|
@@ -151,6 +153,7 @@
|
|
|
151
153
|
"command",
|
|
152
154
|
"context-menu",
|
|
153
155
|
"copy-button",
|
|
156
|
+
"data-table",
|
|
154
157
|
"divider",
|
|
155
158
|
"drawer",
|
|
156
159
|
"dropdown",
|
|
@@ -173,6 +176,7 @@
|
|
|
173
176
|
"skeleton",
|
|
174
177
|
"slider",
|
|
175
178
|
"spinner",
|
|
179
|
+
"split-button",
|
|
176
180
|
"table",
|
|
177
181
|
"tabs",
|
|
178
182
|
"timeline",
|
|
@@ -268,6 +272,28 @@
|
|
|
268
272
|
"useVirtualList",
|
|
269
273
|
"useWindowSize"
|
|
270
274
|
],
|
|
275
|
+
"componentDependencies": {
|
|
276
|
+
"data-table": [
|
|
277
|
+
"buttons",
|
|
278
|
+
"checkbox",
|
|
279
|
+
"inputs",
|
|
280
|
+
"pagination",
|
|
281
|
+
"table"
|
|
282
|
+
],
|
|
283
|
+
"dynamic-stepper": [
|
|
284
|
+
"buttons"
|
|
285
|
+
],
|
|
286
|
+
"pagination": [
|
|
287
|
+
"buttons"
|
|
288
|
+
],
|
|
289
|
+
"search": [
|
|
290
|
+
"inputs"
|
|
291
|
+
],
|
|
292
|
+
"split-button": [
|
|
293
|
+
"buttons",
|
|
294
|
+
"dropdown"
|
|
295
|
+
]
|
|
296
|
+
},
|
|
271
297
|
"peerHints": {
|
|
272
298
|
"accordion": [
|
|
273
299
|
"framer-motion"
|
|
@@ -341,6 +367,9 @@
|
|
|
341
367
|
"skeleton": [
|
|
342
368
|
"framer-motion"
|
|
343
369
|
],
|
|
370
|
+
"split-button": [
|
|
371
|
+
"react-icons"
|
|
372
|
+
],
|
|
344
373
|
"table": [
|
|
345
374
|
"framer-motion"
|
|
346
375
|
],
|
package/cli/rewrite-imports.mjs
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
* Rewrites internal package-relative imports to app aliases.
|
|
3
3
|
*
|
|
4
4
|
* @param {string} source
|
|
5
|
-
* @param {{ utilsAlias: string; hooksAlias: string; uiAlias?: string }} options
|
|
6
|
-
* @returns {{ code: string; usedHooks: string[] }}
|
|
5
|
+
* @param {{ utilsAlias: string; hooksAlias: string; uiAlias?: string; uiComponents?: string[] }} options
|
|
6
|
+
* @returns {{ code: string; usedHooks: string[]; usedUiComponents: string[] }}
|
|
7
7
|
*/
|
|
8
8
|
export function rewriteImports(source, options) {
|
|
9
|
-
const { utilsAlias, hooksAlias, uiAlias } = options;
|
|
9
|
+
const { utilsAlias, hooksAlias, uiAlias, uiComponents = [] } = options;
|
|
10
10
|
const usedHooks = new Set();
|
|
11
|
+
const usedUiComponents = new Set();
|
|
12
|
+
const uiComponentSet = new Set(uiComponents);
|
|
11
13
|
|
|
12
14
|
const collectHooks = (text) => {
|
|
13
15
|
const re = /from\s+(["'])((?:\.\.\/)+)hooks\/([^'"]+)\1/g;
|
|
@@ -24,6 +26,25 @@ export function rewriteImports(source, options) {
|
|
|
24
26
|
|
|
25
27
|
let code = source;
|
|
26
28
|
|
|
29
|
+
if (uiAlias) {
|
|
30
|
+
// Single-parent imports (`../<name>`) point at a sibling UI component.
|
|
31
|
+
// The leading `[^'"./]` excludes deeper relatives like `../../lib/utils`,
|
|
32
|
+
// which are rewritten by the dedicated blocks below. When a `uiComponents`
|
|
33
|
+
// allowlist is supplied, only those siblings are rewritten; otherwise every
|
|
34
|
+
// sibling import is treated as a UI component.
|
|
35
|
+
code = code.replace(
|
|
36
|
+
/from\s+(["'])\.\.\/([^'"./][^'"]*)\1/g,
|
|
37
|
+
(match, quote, rest) => {
|
|
38
|
+
const componentName = rest.split("/")[0];
|
|
39
|
+
if (uiComponentSet.size > 0 && !uiComponentSet.has(componentName)) {
|
|
40
|
+
return match;
|
|
41
|
+
}
|
|
42
|
+
usedUiComponents.add(componentName);
|
|
43
|
+
return `from ${quote}${uiAlias}/${rest}${quote}`;
|
|
44
|
+
},
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
27
48
|
code = code.replace(
|
|
28
49
|
/from\s+(["'])((?:\.\.\/)+)lib\/utils\1/g,
|
|
29
50
|
(_, quote) => `from ${quote}${utilsAlias}${quote}`,
|
|
@@ -47,7 +68,11 @@ export function rewriteImports(source, options) {
|
|
|
47
68
|
);
|
|
48
69
|
}
|
|
49
70
|
|
|
50
|
-
return {
|
|
71
|
+
return {
|
|
72
|
+
code,
|
|
73
|
+
usedHooks: [...usedHooks],
|
|
74
|
+
usedUiComponents: [...usedUiComponents],
|
|
75
|
+
};
|
|
51
76
|
}
|
|
52
77
|
|
|
53
78
|
/**
|
|
@@ -42,11 +42,46 @@ import { useFocusManagement as u } from "../../../hooks/useFocusManagement";
|
|
|
42
42
|
utilsAlias: "@/lib/utils",
|
|
43
43
|
hooksAlias: "@/hooks",
|
|
44
44
|
uiAlias: "@/components/ui",
|
|
45
|
+
uiComponents: ["buttons", "pagination"],
|
|
45
46
|
});
|
|
46
47
|
expect(code).toContain('from "@/components/ui/pagination/types"');
|
|
47
48
|
expect(code).not.toContain("../../ui/");
|
|
48
49
|
});
|
|
49
50
|
|
|
51
|
+
it("should rewrite sibling ui paths when uiAlias is set", () => {
|
|
52
|
+
const input = `
|
|
53
|
+
import { Button } from "../buttons";
|
|
54
|
+
import type { PaginationAppearance } from "../pagination";
|
|
55
|
+
`;
|
|
56
|
+
const { code } = rewriteImports(input, {
|
|
57
|
+
utilsAlias: "@/lib/utils",
|
|
58
|
+
hooksAlias: "@/hooks",
|
|
59
|
+
uiAlias: "@/components/ui",
|
|
60
|
+
});
|
|
61
|
+
expect(code).toContain('from "@/components/ui/buttons"');
|
|
62
|
+
expect(code).toContain('from "@/components/ui/pagination"');
|
|
63
|
+
expect(code).not.toContain("../buttons");
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
it("should collect sibling ui imports", () => {
|
|
67
|
+
const input = `
|
|
68
|
+
import { Button } from "../buttons";
|
|
69
|
+
import { Checkbox } from "../checkbox";
|
|
70
|
+
import type { PaginationAppearance } from "../pagination";
|
|
71
|
+
`;
|
|
72
|
+
const { usedUiComponents } = rewriteImports(input, {
|
|
73
|
+
utilsAlias: "@/lib/utils",
|
|
74
|
+
hooksAlias: "@/hooks",
|
|
75
|
+
uiAlias: "@/components/ui",
|
|
76
|
+
uiComponents: ["buttons", "checkbox", "pagination"],
|
|
77
|
+
});
|
|
78
|
+
expect(usedUiComponents.sort()).toEqual([
|
|
79
|
+
"buttons",
|
|
80
|
+
"checkbox",
|
|
81
|
+
"pagination",
|
|
82
|
+
]);
|
|
83
|
+
});
|
|
84
|
+
|
|
50
85
|
it("should preserve single-quote import style", () => {
|
|
51
86
|
const input = `import { cn } from '../../lib/utils';\n`;
|
|
52
87
|
const { code } = rewriteImports(input, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { zuiButtonBase, zuiButtonSizes, zuiButtonAppearances } from './chunk-
|
|
1
|
+
import { zuiButtonBase, zuiButtonSizes, zuiButtonAppearances } from './chunk-UVP3MUBU.mjs';
|
|
2
2
|
import { cva } from 'class-variance-authority';
|
|
3
3
|
|
|
4
4
|
var buttonVariants = cva(zuiButtonBase, {
|
|
@@ -13,5 +13,5 @@ var buttonVariants = cva(zuiButtonBase, {
|
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
export { buttonVariants };
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-4PAHLHYF.mjs.map
|
|
17
|
+
//# sourceMappingURL=chunk-4PAHLHYF.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ui/buttons/variants.ts"],"names":[],"mappings":";;;AAQO,IAAM,cAAA,GAAiB,IAAI,aAAA,EAAe;AAAA,EAC/C,QAAA,EAAU;AAAA,IACR,UAAA,EAAY,oBAAA;AAAA,IACZ,IAAA,EAAM;AAAA,GACR;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,UAAA,EAAY,SAAA;AAAA,IACZ,IAAA,EAAM;AAAA;AAEV,CAAC","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../src/ui/buttons/variants.ts"],"names":[],"mappings":";;;AAQO,IAAM,cAAA,GAAiB,IAAI,aAAA,EAAe;AAAA,EAC/C,QAAA,EAAU;AAAA,IACR,UAAA,EAAY,oBAAA;AAAA,IACZ,IAAA,EAAM;AAAA,GACR;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,UAAA,EAAY,SAAA;AAAA,IACZ,IAAA,EAAM;AAAA;AAEV,CAAC","file":"chunk-4PAHLHYF.mjs","sourcesContent":["import { cva } from \"class-variance-authority\";\n\nimport {\n zuiButtonAppearances,\n zuiButtonBase,\n zuiButtonSizes,\n} from \"../../design-system\";\n\nexport const buttonVariants = cva(zuiButtonBase, {\n variants: {\n appearance: zuiButtonAppearances,\n size: zuiButtonSizes,\n },\n defaultVariants: {\n appearance: \"default\",\n size: \"md\",\n },\n});\n"]}
|