@vantageos/mosaic-blocks 0.4.1-alpha → 0.4.2-alpha
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 +34 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +49 -3
- package/dist/index.d.ts +49 -3
- package/dist/index.js +34 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -46,7 +46,7 @@ function _interopNamespace(e) {
|
|
|
46
46
|
var React27__namespace = /*#__PURE__*/_interopNamespace(React27);
|
|
47
47
|
|
|
48
48
|
// src/version.ts
|
|
49
|
-
var version = "0.4.
|
|
49
|
+
var version = "0.4.2-alpha";
|
|
50
50
|
function Placeholder({ label = "mosaic-blocks placeholder" }) {
|
|
51
51
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-mosaic-block": "placeholder", children: label });
|
|
52
52
|
}
|
|
@@ -10024,7 +10024,9 @@ function MosaicDataTable({
|
|
|
10024
10024
|
emptyState,
|
|
10025
10025
|
emptyMessage,
|
|
10026
10026
|
className,
|
|
10027
|
-
ref
|
|
10027
|
+
ref,
|
|
10028
|
+
footerSlot,
|
|
10029
|
+
pagination
|
|
10028
10030
|
}) {
|
|
10029
10031
|
const [sort, setSort] = React27.useState(null);
|
|
10030
10032
|
function handleHeaderClick(col) {
|
|
@@ -10137,7 +10139,36 @@ function MosaicDataTable({
|
|
|
10137
10139
|
},
|
|
10138
10140
|
key
|
|
10139
10141
|
);
|
|
10140
|
-
}) })
|
|
10142
|
+
}) }),
|
|
10143
|
+
(footerSlot || pagination) && /* @__PURE__ */ jsxRuntime.jsx("tfoot", { "data-slot": "data-table-footer", children: /* @__PURE__ */ jsxRuntime.jsx("tr", { "data-slot": "data-table-footer-row", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10144
|
+
"td",
|
|
10145
|
+
{
|
|
10146
|
+
"data-slot": "data-table-footer-cell",
|
|
10147
|
+
colSpan: columns.length,
|
|
10148
|
+
className: "px-4 py-3 text-center",
|
|
10149
|
+
children: [
|
|
10150
|
+
footerSlot,
|
|
10151
|
+
pagination && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10152
|
+
"div",
|
|
10153
|
+
{
|
|
10154
|
+
"data-slot": "data-table-pagination",
|
|
10155
|
+
"aria-live": "polite",
|
|
10156
|
+
className: "flex items-center justify-center",
|
|
10157
|
+
children: pagination.isLoadingMore ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: pagination.loadingLabel }) : pagination.hasMore && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10158
|
+
"button",
|
|
10159
|
+
{
|
|
10160
|
+
type: "button",
|
|
10161
|
+
"data-slot": "data-table-load-more",
|
|
10162
|
+
onClick: pagination.onLoadMore,
|
|
10163
|
+
className: "rounded-md border border-border px-4 py-2 text-sm font-medium text-foreground hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
10164
|
+
children: pagination.loadMoreLabel
|
|
10165
|
+
}
|
|
10166
|
+
)
|
|
10167
|
+
}
|
|
10168
|
+
)
|
|
10169
|
+
]
|
|
10170
|
+
}
|
|
10171
|
+
) }) })
|
|
10141
10172
|
]
|
|
10142
10173
|
}
|
|
10143
10174
|
);
|