@shwfed/nuxt 0.11.52 → 0.11.53
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/module.json
CHANGED
|
@@ -107,7 +107,7 @@ function translate(column) {
|
|
|
107
107
|
const options = renderer.parseOptions(column.renderer && typeof column.renderer === "object" && "props" in column.renderer ? column.renderer.props : null);
|
|
108
108
|
return {
|
|
109
109
|
id: column.id ?? genColumnId(column),
|
|
110
|
-
header: (ctx) => renderer.header
|
|
110
|
+
header: (ctx) => renderer.header ? renderer.header({ ctx, options }) : getColumnTitle(column),
|
|
111
111
|
cell: (ctx) => {
|
|
112
112
|
const slot = slots[ctx.column.id];
|
|
113
113
|
if (slot) {
|
|
@@ -594,16 +594,27 @@ defineTableRenderer(
|
|
|
594
594
|
"table.renderer.radio",
|
|
595
595
|
{},
|
|
596
596
|
{
|
|
597
|
-
cell: ({ ctx }) =>
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
597
|
+
cell: ({ ctx }) => {
|
|
598
|
+
const selected = ctx.row.getIsSelected();
|
|
599
|
+
const disabled = !ctx.row.getCanSelect();
|
|
600
|
+
return /* @__PURE__ */ jsx("div", { class: "w-full h-full flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
601
|
+
"button",
|
|
602
|
+
{
|
|
603
|
+
type: "button",
|
|
604
|
+
role: "radio",
|
|
605
|
+
"aria-checked": selected,
|
|
606
|
+
disabled,
|
|
607
|
+
onClick: () => ctx.table.setRowSelection({ [ctx.row.id]: true }),
|
|
608
|
+
class: [
|
|
609
|
+
"size-4 shrink-0 rounded-full border shadow-xs outline-none transition-shadow",
|
|
610
|
+
"flex items-center justify-center",
|
|
611
|
+
selected ? "bg-(--primary) border-(--primary)" : "border-zinc-200 hover:shadow",
|
|
612
|
+
disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
|
|
613
|
+
],
|
|
614
|
+
children: selected ? /* @__PURE__ */ jsx("span", { class: "size-1.5 rounded-full bg-white" }) : null
|
|
615
|
+
}
|
|
616
|
+
) });
|
|
617
|
+
},
|
|
607
618
|
header: () => null,
|
|
608
619
|
config: NoOptionsConfig,
|
|
609
620
|
columnDefOverrides: {
|