@iris-ui-kit/vue 0.2.0 → 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 +35 -31
- 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 +35 -31
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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
|
@@ -228,39 +228,37 @@ var IrisPopoverContent = defineComponent({
|
|
|
228
228
|
target?.focus();
|
|
229
229
|
}
|
|
230
230
|
});
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
innerRef.value = el ?? null;
|
|
238
|
-
},
|
|
239
|
-
id: ctx.contentId,
|
|
240
|
-
role: "dialog",
|
|
241
|
-
tabindex: -1,
|
|
242
|
-
"data-state": ctx.open.value ? "open" : "closed",
|
|
243
|
-
"data-placement": ctx.placement,
|
|
244
|
-
style: {
|
|
245
|
-
...floatingStyles.value,
|
|
246
|
-
background: "var(--iris-surface)",
|
|
247
|
-
color: "var(--iris-foreground)",
|
|
248
|
-
border: "1px solid var(--iris-border)",
|
|
249
|
-
borderRadius: "var(--iris-radius-md)",
|
|
250
|
-
padding: "var(--iris-padding-md)",
|
|
251
|
-
boxShadow: "0 8px 24px -8px rgba(0, 0, 0, 0.16), 0 4px 8px -2px rgba(0, 0, 0, 0.08)",
|
|
252
|
-
fontSize: "14px",
|
|
253
|
-
zIndex: "1000",
|
|
254
|
-
outline: "none",
|
|
255
|
-
...attrs.style ?? {}
|
|
256
|
-
}
|
|
231
|
+
const renderContent = () => h(
|
|
232
|
+
"div",
|
|
233
|
+
{
|
|
234
|
+
...attrs,
|
|
235
|
+
ref: (el) => {
|
|
236
|
+
innerRef.value = el ?? null;
|
|
257
237
|
},
|
|
258
|
-
|
|
259
|
-
|
|
238
|
+
id: ctx.contentId,
|
|
239
|
+
role: "dialog",
|
|
240
|
+
tabindex: -1,
|
|
241
|
+
"data-state": ctx.open.value ? "open" : "closed",
|
|
242
|
+
"data-placement": ctx.placement,
|
|
243
|
+
style: {
|
|
244
|
+
...floatingStyles.value,
|
|
245
|
+
background: "var(--iris-surface)",
|
|
246
|
+
color: "var(--iris-foreground)",
|
|
247
|
+
border: "1px solid var(--iris-border)",
|
|
248
|
+
borderRadius: "var(--iris-radius-md)",
|
|
249
|
+
padding: "var(--iris-padding-md)",
|
|
250
|
+
boxShadow: "0 8px 24px -8px rgba(0, 0, 0, 0.16), 0 4px 8px -2px rgba(0, 0, 0, 0.08)",
|
|
251
|
+
fontSize: "14px",
|
|
252
|
+
zIndex: "1000",
|
|
253
|
+
outline: "none",
|
|
254
|
+
...attrs.style ?? {}
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
slots.default?.()
|
|
260
258
|
);
|
|
261
259
|
return () => {
|
|
262
260
|
if (!ctx.open.value) return null;
|
|
263
|
-
const node =
|
|
261
|
+
const node = renderContent();
|
|
264
262
|
if (props.teleport === false) return node;
|
|
265
263
|
return h(Teleport, { to: props.teleport }, [node]);
|
|
266
264
|
};
|
|
@@ -5425,6 +5423,7 @@ var IrisTable = defineComponent({
|
|
|
5425
5423
|
"update:sort": (_value) => true,
|
|
5426
5424
|
"update:columnWidths": (_value) => true,
|
|
5427
5425
|
rowClick: (_row, _index) => true,
|
|
5426
|
+
rowDblclick: (_row, _index) => true,
|
|
5428
5427
|
cellEdit: (_payload) => true,
|
|
5429
5428
|
expandedRowsChange: (_keys) => true
|
|
5430
5429
|
},
|
|
@@ -5831,6 +5830,8 @@ var IrisTable = defineComponent({
|
|
|
5831
5830
|
const isLeaf = !col.children || col.children.length === 0;
|
|
5832
5831
|
const sortable = isLeaf && col.sortable;
|
|
5833
5832
|
const align = col.align ?? "left";
|
|
5833
|
+
const headerSlot = slots[`header.${col.key}`];
|
|
5834
|
+
const title = headerSlot?.({ column: col }) ?? col.title;
|
|
5834
5835
|
cells.push(
|
|
5835
5836
|
h(
|
|
5836
5837
|
"div",
|
|
@@ -5861,7 +5862,7 @@ var IrisTable = defineComponent({
|
|
|
5861
5862
|
textOverflow: "ellipsis"
|
|
5862
5863
|
}
|
|
5863
5864
|
},
|
|
5864
|
-
[
|
|
5865
|
+
[title, sortable ? sortIndicator(col) : null]
|
|
5865
5866
|
)
|
|
5866
5867
|
);
|
|
5867
5868
|
}
|
|
@@ -5931,6 +5932,8 @@ var IrisTable = defineComponent({
|
|
|
5931
5932
|
const col = props.columns[ci];
|
|
5932
5933
|
if (visibleColSet.value && !visibleColSet.value.has(ci)) continue;
|
|
5933
5934
|
const align = col.align ?? "left";
|
|
5935
|
+
const headerSlot = slots[`header.${col.key}`];
|
|
5936
|
+
const title = headerSlot?.({ column: col }) ?? col.title;
|
|
5934
5937
|
wireResize(col);
|
|
5935
5938
|
const handle = props.resizableColumns ? h("span", {
|
|
5936
5939
|
ref: (el) => {
|
|
@@ -5998,7 +6001,7 @@ var IrisTable = defineComponent({
|
|
|
5998
6001
|
},
|
|
5999
6002
|
"aria-sort": internalSort.value?.key === col.key ? internalSort.value.direction === "asc" ? "ascending" : "descending" : col.sortable ? "none" : void 0
|
|
6000
6003
|
},
|
|
6001
|
-
[
|
|
6004
|
+
[title, sortIndicator(col), handle]
|
|
6002
6005
|
)
|
|
6003
6006
|
);
|
|
6004
6007
|
}
|
|
@@ -6274,6 +6277,7 @@ var IrisTable = defineComponent({
|
|
|
6274
6277
|
"data-iris-table-row": "",
|
|
6275
6278
|
"data-state": selected ? "selected" : void 0,
|
|
6276
6279
|
onClick: () => emit("rowClick", row, index),
|
|
6280
|
+
onDblclick: () => emit("rowDblclick", row, index),
|
|
6277
6281
|
style: {
|
|
6278
6282
|
display: "grid",
|
|
6279
6283
|
gridTemplateColumns: gridTemplate.value,
|