@kumix/ui 0.3.10 → 0.3.11

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 (105) hide show
  1. package/README.md +14 -14
  2. package/dist/components/motion/adaptive-stepper.d.ts +32 -0
  3. package/dist/components/motion/adaptive-stepper.d.ts.map +1 -0
  4. package/dist/components/motion/adaptive-stepper.js +302 -0
  5. package/dist/components/motion/adaptive-stepper.js.map +1 -0
  6. package/dist/components/motion/combobox/content.js +1 -1
  7. package/dist/components/motion/combobox/context.js +216 -1
  8. package/dist/components/motion/combobox/context.js.map +1 -0
  9. package/dist/components/motion/combobox/list.js +1 -1
  10. package/dist/components/motion/combobox/trigger.js +1 -1
  11. package/dist/components/motion/combobox.js +1 -1
  12. package/dist/components/motion/input.d.ts +2 -0
  13. package/dist/components/motion/input.d.ts.map +1 -1
  14. package/dist/components/motion/input.js +28 -25
  15. package/dist/components/motion/input.js.map +1 -1
  16. package/dist/components/motion/liquid.d.ts +30 -0
  17. package/dist/components/motion/liquid.d.ts.map +1 -0
  18. package/dist/components/motion/liquid.js +248 -0
  19. package/dist/components/motion/liquid.js.map +1 -0
  20. package/dist/components/motion/multi-select/content.d.ts +16 -0
  21. package/dist/components/motion/multi-select/content.d.ts.map +1 -0
  22. package/dist/components/motion/multi-select/content.js +91 -0
  23. package/dist/components/motion/multi-select/content.js.map +1 -0
  24. package/dist/components/motion/multi-select/context.d.ts +64 -0
  25. package/dist/components/motion/multi-select/context.d.ts.map +1 -0
  26. package/dist/{context-BizvUNZv.js → components/motion/multi-select/context.js} +44 -114
  27. package/dist/components/motion/multi-select/context.js.map +1 -0
  28. package/dist/components/motion/multi-select/index.d.ts +5 -0
  29. package/dist/components/motion/multi-select/index.js +6 -0
  30. package/dist/components/motion/multi-select/list.d.ts +40 -0
  31. package/dist/components/motion/multi-select/list.d.ts.map +1 -0
  32. package/dist/components/motion/multi-select/list.js +144 -0
  33. package/dist/components/motion/multi-select/list.js.map +1 -0
  34. package/dist/components/motion/multi-select/trigger.d.ts +22 -0
  35. package/dist/components/motion/multi-select/trigger.d.ts.map +1 -0
  36. package/dist/components/motion/multi-select/trigger.js +185 -0
  37. package/dist/components/motion/multi-select/trigger.js.map +1 -0
  38. package/dist/components/motion/signup-form.js +6 -2
  39. package/dist/components/motion/signup-form.js.map +1 -1
  40. package/dist/components/motion/table/index.js.map +1 -1
  41. package/dist/components/reui/alert.d.ts +1 -1
  42. package/dist/components/reui/badge.d.ts +1 -1
  43. package/dist/components/reui/cascader/cascader-async.d.ts.map +1 -1
  44. package/dist/components/reui/cascader/cascader-async.js.map +1 -1
  45. package/dist/components/reui/cascader/cascader-virtual.d.ts.map +1 -1
  46. package/dist/components/reui/cascader/cascader-virtual.js.map +1 -1
  47. package/dist/components/reui/cascader/cascader.d.ts.map +1 -1
  48. package/dist/components/reui/cascader/cascader.js.map +1 -1
  49. package/dist/components/reui/code-block/code-block.js.map +1 -1
  50. package/dist/components/reui/data-grid/data-grid-cell-selection.d.ts +117 -0
  51. package/dist/components/reui/data-grid/data-grid-cell-selection.d.ts.map +1 -0
  52. package/dist/components/reui/data-grid/data-grid-cell-selection.js +1554 -0
  53. package/dist/components/reui/data-grid/data-grid-cell-selection.js.map +1 -0
  54. package/dist/components/reui/data-grid/data-grid-column-filter.d.ts.map +1 -1
  55. package/dist/components/reui/data-grid/data-grid-column-filter.js +6 -4
  56. package/dist/components/reui/data-grid/data-grid-column-filter.js.map +1 -1
  57. package/dist/components/reui/data-grid/data-grid-column-header.d.ts.map +1 -1
  58. package/dist/components/reui/data-grid/data-grid-column-header.js +10 -7
  59. package/dist/components/reui/data-grid/data-grid-column-header.js.map +1 -1
  60. package/dist/components/reui/data-grid/data-grid-column-visibility.js +3 -2
  61. package/dist/components/reui/data-grid/data-grid-column-visibility.js.map +1 -1
  62. package/dist/components/reui/data-grid/data-grid-i18n.d.ts +2 -0
  63. package/dist/components/reui/data-grid/data-grid-i18n.js +53 -0
  64. package/dist/components/reui/data-grid/data-grid-i18n.js.map +1 -0
  65. package/dist/components/reui/data-grid/data-grid-pagination.js +14 -8
  66. package/dist/components/reui/data-grid/data-grid-pagination.js.map +1 -1
  67. package/dist/components/reui/data-grid/data-grid-scroll-area.d.ts.map +1 -1
  68. package/dist/components/reui/data-grid/data-grid-scroll-area.js +3 -3
  69. package/dist/components/reui/data-grid/data-grid-scroll-area.js.map +1 -1
  70. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts.map +1 -1
  71. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +6 -4
  72. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js.map +1 -1
  73. package/dist/components/reui/data-grid/data-grid-table-dnd.js +2 -2
  74. package/dist/components/reui/data-grid/data-grid-table-dnd.js.map +1 -1
  75. package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts +17 -1
  76. package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts.map +1 -1
  77. package/dist/components/reui/data-grid/data-grid-table-virtual.js +146 -50
  78. package/dist/components/reui/data-grid/data-grid-table-virtual.js.map +1 -1
  79. package/dist/components/reui/data-grid/data-grid-table.d.ts +23 -4
  80. package/dist/components/reui/data-grid/data-grid-table.d.ts.map +1 -1
  81. package/dist/components/reui/data-grid/data-grid-table.js +215 -68
  82. package/dist/components/reui/data-grid/data-grid-table.js.map +1 -1
  83. package/dist/components/reui/data-grid/data-grid.d.ts +276 -6
  84. package/dist/components/reui/data-grid/data-grid.d.ts.map +1 -1
  85. package/dist/components/reui/data-grid/data-grid.js +150 -15
  86. package/dist/components/reui/data-grid/data-grid.js.map +1 -1
  87. package/dist/components/reui/filters/filters-advanced.js.map +1 -1
  88. package/dist/components/reui/filters/filters-chip.js.map +1 -1
  89. package/dist/components/reui/filters/filters.d.ts.map +1 -1
  90. package/dist/components/reui/filters/filters.js.map +1 -1
  91. package/dist/components/reui/icon-tile.d.ts +1 -1
  92. package/dist/components/ui/badge.d.ts +1 -1
  93. package/dist/components/ui/bubble.d.ts +1 -1
  94. package/dist/components/ui/button.d.ts +1 -1
  95. package/dist/components/ui/item.d.ts +1 -1
  96. package/dist/components/ui/marker.d.ts +1 -1
  97. package/dist/components/ui/message-scroller.js +1 -1
  98. package/dist/components/ui/message-scroller.js.map +1 -1
  99. package/dist/components/ui/tabs.d.ts +1 -1
  100. package/dist/data-grid-i18n-52UUYPbr.d.ts +66 -0
  101. package/dist/data-grid-i18n-52UUYPbr.d.ts.map +1 -0
  102. package/dist/use-active-option-CmX6Z-4S.js +86 -0
  103. package/dist/use-active-option-CmX6Z-4S.js.map +1 -0
  104. package/package.json +5 -5
  105. package/dist/context-BizvUNZv.js.map +0 -1
@@ -0,0 +1,117 @@
1
+ import { DataGridCellsChangeDetails, DataGridTableInstance } from "./data-grid.js";
2
+ import { ReactNode, RefObject } from "react";
3
+ //#region src/components/reui/data-grid/data-grid-cell-selection.d.ts
4
+ interface DataGridFocusCellOptions {
5
+ /** Also open the cell's editor, the way Enter would. */
6
+ edit?: boolean;
7
+ }
8
+ /** Imperative surface of the cell-selection controller. */
9
+ interface DataGridCellSelectionApi {
10
+ /**
11
+ * Moves the grid's cell focus AND the document focus together, retrying
12
+ * briefly while the row mounts, so a freshly created row is typeable
13
+ * without an extra click. `edit: true` also opens the cell's editor the
14
+ * way Enter would. Registered once the controller is wired; null while
15
+ * cell selection is off.
16
+ */
17
+ focusCell: (rowId: string, columnId: string, options?: DataGridFocusCellOptions) => void;
18
+ /** Clears every range and the focused cell. */
19
+ clearSelection: () => void;
20
+ /** Scrolls a rendered cell into view without moving focus. */
21
+ scrollToCell: (rowId: string, columnId: string) => void;
22
+ }
23
+ /** Row-major grid to TSV, CRLF rows, Excel-style quoting. */
24
+ declare function serializeDataGridClipboardText(grid: string[][]): string;
25
+ /**
26
+ * TSV to a row-major grid. A stateful scan, not a split: a quoted field may
27
+ * contain tabs, quotes and both newline flavors, which is exactly what Excel
28
+ * emits for a multi-line cell.
29
+ */
30
+ declare function parseDataGridClipboardText(text: string): string[][];
31
+ /** Repeats a block cyclically to fill rowCount x columnCount. */
32
+ declare function tileDataGridClipboardBlock(block: string[][], rowCount: number, columnCount: number): string[][];
33
+ /**
34
+ * Cells of the current selection the view can actually show, under the
35
+ * same row filter the batch builders use, so a count shown next to the
36
+ * selection always matches what is painted and what a batch will touch.
37
+ * The feature's own getSelectedCellCount spans off-page rows instead.
38
+ */
39
+ declare function getDataGridVisibleSelectedCellCount<TData extends object>(table: DataGridTableInstance<TData>,
40
+ /** The grid's body viewport; null falls back to the full-range count. */
41
+ viewport: HTMLElement | null): number;
42
+ /**
43
+ * The active region as formatted strings, row-major. Columns opted out of
44
+ * selection are compacted away, matching the feature's own ranges-data
45
+ * behavior, and rows the view cannot show are skipped when a viewport is
46
+ * given. Null when nothing is selected.
47
+ */
48
+ declare function getDataGridActiveRegionGrid<TData extends object>(table: DataGridTableInstance<TData>, viewport?: HTMLElement | null): string[][] | null;
49
+ /**
50
+ * A clear/cut batch over the selection's writable cells. Non-writable columns
51
+ * are skipped silently: clearing is an intent over what the grid owns, and a
52
+ * rejection per read-only cell would be noise. Null when nothing clears.
53
+ */
54
+ declare function buildDataGridClearDetails<TData extends object>(table: DataGridTableInstance<TData>, source: "clear" | "cut", activeRegionOnly: boolean, viewport?: HTMLElement | null): DataGridCellsChangeDetails<TData> | null;
55
+ type DataGridPasteTarget = {
56
+ /** Display indexes of the pasted region's first and last row. */
57
+ startRowIndex: number;
58
+ endRowIndex: number;
59
+ /** How many rows a paste actually wrote (hidden rows are skipped). */
60
+ rowCount?: number;
61
+ /** Display indexes of the pasted region's first and last column. */
62
+ startColumnIndex: number;
63
+ endColumnIndex: number;
64
+ };
65
+ /**
66
+ * Resolves a parsed clipboard block into a paste batch, Excel semantics:
67
+ * a 1x1 block fills the whole selected region; a block tiles when the region
68
+ * is an exact multiple of it; otherwise it pastes once from the region's
69
+ * top-left, clamped at the grid edges (rows are never grown).
70
+ */
71
+ declare function buildDataGridPasteDetails<TData extends object>(table: DataGridTableInstance<TData>, block: string[][], viewport?: HTMLElement | null): {
72
+ details: DataGridCellsChangeDetails<TData>;
73
+ target: DataGridPasteTarget;
74
+ } | null;
75
+ /**
76
+ * The inverse batch: every change's value and previousValue swapped and
77
+ * rejections dropped. Feed it through the same state update onCellsChange
78
+ * uses to implement undo; inverting the inverse is redo.
79
+ */
80
+ declare function invertDataGridCellsChange<TData extends object>(details: DataGridCellsChangeDetails<TData>): DataGridCellsChangeDetails<TData>;
81
+ /**
82
+ * Headless spreadsheet controller: keyboard navigation, clipboard, clear and
83
+ * the fill-handle drag. Mount once inside `<DataGrid>`, next to the table.
84
+ * Renders only a hidden anchor; the real listeners attach to the grid's own
85
+ * body viewport, which also receives focus (container-focus model), so a
86
+ * virtualized row unmounting can never strand `document.activeElement`.
87
+ */
88
+ declare function DataGridCellSelection<TData extends object>({ apiRef, clipboard, keyboard }: {
89
+ /** Receives the controller's imperative API, e.g. for create-row flows. */
90
+ apiRef?: RefObject<DataGridCellSelectionApi | null>;
91
+ /** Native copy, cut and paste handling. Defaults to true. */
92
+ clipboard?: boolean;
93
+ /**
94
+ * Arrows (with Ctrl/Cmd edge jumps), Home/End, PageUp/PageDown, Enter,
95
+ * F2, type-to-edit, Tab, Ctrl/Cmd+A, Delete, Escape. Defaults to true.
96
+ */
97
+ keyboard?: boolean;
98
+ }): import("react").JSX.Element;
99
+ /**
100
+ * Thin shell over row selection for bulk actions: selected count, a slot for
101
+ * the consumer's controls, and a clear action. Hidden while nothing is
102
+ * selected. What the controls do stays consumer-owned.
103
+ *
104
+ * Presented as a floating toolbar, the Google Sheets way: auto width,
105
+ * centered, elevated, and sticky to the viewport bottom with breathing room,
106
+ * so bulk actions stay reachable while the grid scrolls.
107
+ */
108
+ declare function DataGridSelectionBar({ children, className, label, clearLabel, onClear }: {
109
+ children?: ReactNode;
110
+ className?: string;
111
+ label?: (count: number) => ReactNode;
112
+ clearLabel?: ReactNode;
113
+ onClear?: () => void;
114
+ }): import("react").JSX.Element | null;
115
+ //#endregion
116
+ export { DataGridCellSelection, type DataGridCellSelectionApi, type DataGridFocusCellOptions, type DataGridPasteTarget, DataGridSelectionBar, buildDataGridClearDetails, buildDataGridPasteDetails, getDataGridActiveRegionGrid, getDataGridVisibleSelectedCellCount, invertDataGridCellsChange, parseDataGridClipboardText, serializeDataGridClipboardText, tileDataGridClipboardBlock };
117
+ //# sourceMappingURL=data-grid-cell-selection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-grid-cell-selection.d.ts","names":[],"sources":["../../../../src/components/reui/data-grid/data-grid-cell-selection.tsx"],"mappings":";;;UA0BU;;EAER;;;UAIQ;;;;;;;;EAQR,YAAY,eAAe,kBAAkB,UAAU;;EAEvD;;EAEA,eAAe,eAAe;;;iBA2BvB,+BAA+B;;;;;;iBAS/B,2BAA2B;;iBA2D3B,2BACP,mBACA,kBACA;;;;;;;iBA6GO,oCAAoC,sBAC3C,OAAO,sBAAsB,QAE7B;;AAAA,UAAU;;;;;;;iBA6JH,4BAA4B,sBACnC,OAAO,sBAAsB,QAC7B,WAAW;;;;;;iBAiCJ,0BAA0B,sBACjC,OAAO,sBAAsB,QAC7B,yBACA,2BACA,WAAW,qBACV,2BAA2B;KAmCzB;;EAEH;EACA;;EAEA;;EAEA;EACA;;;;;;;;iBASO,0BAA0B,sBACjC,OAAO,sBAAsB,QAC7B,mBACA,WAAW;EAEX,SAAS,2BAA2B;EACpC,QAAQ;;;;;;;iBAsHD,0BAA0B,sBACjC,SAAS,2BAA2B,SACnC,2BAA2B;;;;;;;;iBAgXrB,sBAAsB,wBAC7B,QACA,WACA;;EAGA,SAAS,UAAU;;EAEnB;;;;;EAKA;oBACD,IAAA;;;;;;;;;;iBAm0CQ,uBACP,UACA,WACA,OACA,YACA;EAEA,WAAW;EACX;EACA,SAAS,kBAAkB;EAC3B,aAAa;EACb;oBACD,IAAA"}