@iris-ui-kit/vue 0.2.1 → 0.2.2
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/dist/index.cjs +8 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -4248,7 +4248,8 @@ type IrisTableColumnWidths = Record<string, number>;
|
|
|
4248
4248
|
* are wired explicitly for screen readers.
|
|
4249
4249
|
*
|
|
4250
4250
|
* **Features**:
|
|
4251
|
-
* - Column-driven rendering with optional `#cell.<key>` slots
|
|
4251
|
+
* - Column-driven rendering with optional `#header.<key>` and `#cell.<key>` slots
|
|
4252
|
+
* - Row activation via `rowClick` and `rowDblclick` events
|
|
4252
4253
|
* - Sorting (controlled or uncontrolled, cycles `none → asc → desc → none`)
|
|
4253
4254
|
* - Row selection (single / multi) with master checkbox + indeterminate
|
|
4254
4255
|
* - **Column resize** (`resizable-columns`) — draggable handle on each
|
|
@@ -4397,6 +4398,7 @@ declare const IrisTable: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
4397
4398
|
'update:sort': (_value: IrisTableSortState | null) => true;
|
|
4398
4399
|
'update:columnWidths': (_value: IrisTableColumnWidths) => true;
|
|
4399
4400
|
rowClick: (_row: Record<string, unknown>, _index: number) => true;
|
|
4401
|
+
rowDblclick: (_row: Record<string, unknown>, _index: number) => true;
|
|
4400
4402
|
cellEdit: (_payload: IrisTableCellEditEvent<Record<string, unknown>>) => true;
|
|
4401
4403
|
expandedRowsChange: (_keys: Array<string | number>) => true;
|
|
4402
4404
|
}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
@@ -4530,6 +4532,7 @@ declare const IrisTable: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
4530
4532
|
onCellEdit?: ((_payload: IrisTableCellEditEvent<Record<string, unknown>>) => any) | undefined;
|
|
4531
4533
|
"onUpdate:columnWidths"?: ((_value: IrisTableColumnWidths) => any) | undefined;
|
|
4532
4534
|
onRowClick?: ((_row: Record<string, unknown>, _index: number) => any) | undefined;
|
|
4535
|
+
onRowDblclick?: ((_row: Record<string, unknown>, _index: number) => any) | undefined;
|
|
4533
4536
|
}>, {
|
|
4534
4537
|
sort: IrisTableSortState | null;
|
|
4535
4538
|
error: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -4248,7 +4248,8 @@ type IrisTableColumnWidths = Record<string, number>;
|
|
|
4248
4248
|
* are wired explicitly for screen readers.
|
|
4249
4249
|
*
|
|
4250
4250
|
* **Features**:
|
|
4251
|
-
* - Column-driven rendering with optional `#cell.<key>` slots
|
|
4251
|
+
* - Column-driven rendering with optional `#header.<key>` and `#cell.<key>` slots
|
|
4252
|
+
* - Row activation via `rowClick` and `rowDblclick` events
|
|
4252
4253
|
* - Sorting (controlled or uncontrolled, cycles `none → asc → desc → none`)
|
|
4253
4254
|
* - Row selection (single / multi) with master checkbox + indeterminate
|
|
4254
4255
|
* - **Column resize** (`resizable-columns`) — draggable handle on each
|
|
@@ -4397,6 +4398,7 @@ declare const IrisTable: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
4397
4398
|
'update:sort': (_value: IrisTableSortState | null) => true;
|
|
4398
4399
|
'update:columnWidths': (_value: IrisTableColumnWidths) => true;
|
|
4399
4400
|
rowClick: (_row: Record<string, unknown>, _index: number) => true;
|
|
4401
|
+
rowDblclick: (_row: Record<string, unknown>, _index: number) => true;
|
|
4400
4402
|
cellEdit: (_payload: IrisTableCellEditEvent<Record<string, unknown>>) => true;
|
|
4401
4403
|
expandedRowsChange: (_keys: Array<string | number>) => true;
|
|
4402
4404
|
}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
@@ -4530,6 +4532,7 @@ declare const IrisTable: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
4530
4532
|
onCellEdit?: ((_payload: IrisTableCellEditEvent<Record<string, unknown>>) => any) | undefined;
|
|
4531
4533
|
"onUpdate:columnWidths"?: ((_value: IrisTableColumnWidths) => any) | undefined;
|
|
4532
4534
|
onRowClick?: ((_row: Record<string, unknown>, _index: number) => any) | undefined;
|
|
4535
|
+
onRowDblclick?: ((_row: Record<string, unknown>, _index: number) => any) | undefined;
|
|
4533
4536
|
}>, {
|
|
4534
4537
|
sort: IrisTableSortState | null;
|
|
4535
4538
|
error: boolean;
|
package/dist/index.js
CHANGED
|
@@ -5423,6 +5423,7 @@ var IrisTable = defineComponent({
|
|
|
5423
5423
|
"update:sort": (_value) => true,
|
|
5424
5424
|
"update:columnWidths": (_value) => true,
|
|
5425
5425
|
rowClick: (_row, _index) => true,
|
|
5426
|
+
rowDblclick: (_row, _index) => true,
|
|
5426
5427
|
cellEdit: (_payload) => true,
|
|
5427
5428
|
expandedRowsChange: (_keys) => true
|
|
5428
5429
|
},
|
|
@@ -5829,6 +5830,8 @@ var IrisTable = defineComponent({
|
|
|
5829
5830
|
const isLeaf = !col.children || col.children.length === 0;
|
|
5830
5831
|
const sortable = isLeaf && col.sortable;
|
|
5831
5832
|
const align = col.align ?? "left";
|
|
5833
|
+
const headerSlot = slots[`header.${col.key}`];
|
|
5834
|
+
const title = headerSlot?.({ column: col }) ?? col.title;
|
|
5832
5835
|
cells.push(
|
|
5833
5836
|
h(
|
|
5834
5837
|
"div",
|
|
@@ -5859,7 +5862,7 @@ var IrisTable = defineComponent({
|
|
|
5859
5862
|
textOverflow: "ellipsis"
|
|
5860
5863
|
}
|
|
5861
5864
|
},
|
|
5862
|
-
[
|
|
5865
|
+
[title, sortable ? sortIndicator(col) : null]
|
|
5863
5866
|
)
|
|
5864
5867
|
);
|
|
5865
5868
|
}
|
|
@@ -5929,6 +5932,8 @@ var IrisTable = defineComponent({
|
|
|
5929
5932
|
const col = props.columns[ci];
|
|
5930
5933
|
if (visibleColSet.value && !visibleColSet.value.has(ci)) continue;
|
|
5931
5934
|
const align = col.align ?? "left";
|
|
5935
|
+
const headerSlot = slots[`header.${col.key}`];
|
|
5936
|
+
const title = headerSlot?.({ column: col }) ?? col.title;
|
|
5932
5937
|
wireResize(col);
|
|
5933
5938
|
const handle = props.resizableColumns ? h("span", {
|
|
5934
5939
|
ref: (el) => {
|
|
@@ -5996,7 +6001,7 @@ var IrisTable = defineComponent({
|
|
|
5996
6001
|
},
|
|
5997
6002
|
"aria-sort": internalSort.value?.key === col.key ? internalSort.value.direction === "asc" ? "ascending" : "descending" : col.sortable ? "none" : void 0
|
|
5998
6003
|
},
|
|
5999
|
-
[
|
|
6004
|
+
[title, sortIndicator(col), handle]
|
|
6000
6005
|
)
|
|
6001
6006
|
);
|
|
6002
6007
|
}
|
|
@@ -6272,6 +6277,7 @@ var IrisTable = defineComponent({
|
|
|
6272
6277
|
"data-iris-table-row": "",
|
|
6273
6278
|
"data-state": selected ? "selected" : void 0,
|
|
6274
6279
|
onClick: () => emit("rowClick", row, index),
|
|
6280
|
+
onDblclick: () => emit("rowDblclick", row, index),
|
|
6275
6281
|
style: {
|
|
6276
6282
|
display: "grid",
|
|
6277
6283
|
gridTemplateColumns: gridTemplate.value,
|