@kinetixui/ui 0.17.0 → 0.19.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.
Files changed (62) hide show
  1. package/dist/index.d.ts +16 -1
  2. package/dist/index.js +455 -238
  3. package/package.json +2 -2
  4. package/src/components/audio-player.tsx +2 -2
  5. package/src/components/badge.tsx +1 -1
  6. package/src/components/banner.tsx +1 -1
  7. package/src/components/button.tsx +8 -8
  8. package/src/components/calendar.tsx +1 -1
  9. package/src/components/chart.tsx +2 -2
  10. package/src/components/checkbox.tsx +2 -2
  11. package/src/components/circular-progress.tsx +1 -1
  12. package/src/components/code-block.tsx +1 -1
  13. package/src/components/color-picker.tsx +4 -0
  14. package/src/components/data-grid.tsx +276 -24
  15. package/src/components/diff-viewer.tsx +9 -8
  16. package/src/components/fab.tsx +1 -1
  17. package/src/components/file-upload.tsx +13 -15
  18. package/src/components/input-group.tsx +1 -1
  19. package/src/components/input-otp.tsx +2 -1
  20. package/src/components/input.tsx +2 -2
  21. package/src/components/json-viewer.tsx +12 -10
  22. package/src/components/list.tsx +41 -27
  23. package/src/components/markdown-editor.tsx +3 -2
  24. package/src/components/message-bubble.tsx +3 -3
  25. package/src/components/multi-select.tsx +14 -3
  26. package/src/components/native-select.tsx +2 -2
  27. package/src/components/notification-center.tsx +2 -2
  28. package/src/components/progress.tsx +1 -1
  29. package/src/components/radio-group.tsx +3 -3
  30. package/src/components/scroll-area.tsx +1 -1
  31. package/src/components/select.tsx +2 -2
  32. package/src/components/skeleton.tsx +1 -1
  33. package/src/components/slider.tsx +2 -2
  34. package/src/components/sonner.tsx +1 -1
  35. package/src/components/spinner.tsx +3 -3
  36. package/src/components/stepper.tsx +3 -3
  37. package/src/components/switch.tsx +1 -1
  38. package/src/components/tab-bar.tsx +1 -1
  39. package/src/components/table-of-contents.tsx +1 -1
  40. package/src/components/textarea.tsx +2 -2
  41. package/src/components/timeline.tsx +1 -1
  42. package/src/components/tooltip.tsx +1 -1
  43. package/src/components/virtual-list.tsx +2 -1
  44. package/src/components-a11y.test.tsx +4 -25
  45. package/src/components-behavior.test.tsx +1 -1
  46. package/src/components-keyboard.test.tsx +388 -34
  47. package/src/stories/AppBar.stories.tsx +1 -1
  48. package/src/stories/Checkbox.stories.tsx +1 -1
  49. package/src/stories/CircularProgress.stories.tsx +4 -4
  50. package/src/stories/DataGrid.stories.tsx +2 -1
  51. package/src/stories/InputOTP.stories.tsx +2 -2
  52. package/src/stories/List.stories.tsx +2 -2
  53. package/src/stories/MarkdownEditor.stories.tsx +1 -1
  54. package/src/stories/MultiSelect.stories.tsx +1 -0
  55. package/src/stories/NativeSelect.stories.tsx +1 -1
  56. package/src/stories/NumberInput.stories.tsx +3 -3
  57. package/src/stories/Progress.stories.tsx +3 -3
  58. package/src/stories/Select.stories.tsx +2 -2
  59. package/src/stories/Slider.stories.tsx +3 -3
  60. package/src/stories/Switch.stories.tsx +1 -1
  61. package/src/stories/ToggleGroup.stories.tsx +6 -6
  62. package/tailwind.config.ts +14 -0
package/dist/index.d.ts CHANGED
@@ -1621,6 +1621,13 @@ interface DataGridColumn<TData> {
1621
1621
  editable?: boolean;
1622
1622
  onCellEdit?: (row: TData, rowIndex: number, value: string) => void;
1623
1623
  }
1624
+ /** A rectangular range of cells, in display order (after sorting and column reordering). */
1625
+ interface DataGridSelection {
1626
+ /** first and last selected row index, inclusive, into the *displayed* (sorted) rows */
1627
+ rows: [number, number];
1628
+ /** ids of the selected columns, in display order */
1629
+ columns: string[];
1630
+ }
1624
1631
  interface DataGridProps<TData> {
1625
1632
  columns: DataGridColumn<TData>[];
1626
1633
  data: TData[];
@@ -1630,6 +1637,14 @@ interface DataGridProps<TData> {
1630
1637
  overscan?: number;
1631
1638
  getRowId?: (row: TData, index: number) => React$1.Key;
1632
1639
  className?: string;
1640
+ /**
1641
+ * Opt in to range selection: Shift+arrows / Shift+click extend a rectangle from the anchor cell,
1642
+ * Ctrl/Cmd+A selects everything, Ctrl/Cmd+C copies the range as tab-separated text (each
1643
+ * column's `value()`; empty where a column has none), Esc clears. Sets aria-multiselectable.
1644
+ */
1645
+ selectable?: boolean;
1646
+ /** fires when the selected range changes; `null` when it is cleared */
1647
+ onSelectionChange?: (selection: DataGridSelection | null) => void;
1633
1648
  }
1634
1649
  /**
1635
1650
  * DataGrid — the "product on its own" the `COMPONENT-ADDITIONS.md` Tier 3
@@ -1647,7 +1662,7 @@ interface DataGridProps<TData> {
1647
1662
  * flexibility, at the cost of the native table-navigation semantics
1648
1663
  * `DataTable` still gets for free.
1649
1664
  */
1650
- declare function DataGrid<TData>({ columns, data, height, rowHeight, overscan, getRowId, className, }: DataGridProps<TData>): React$1.JSX.Element;
1665
+ declare function DataGrid<TData>({ columns, data, height, rowHeight, overscan, getRowId, className, selectable, onSelectionChange, }: DataGridProps<TData>): React$1.JSX.Element;
1651
1666
 
1652
1667
  interface JsonViewerProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "children"> {
1653
1668
  data: unknown;