@canonical/maas-react-components 2.8.3 → 2.8.4
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, c as u, d, f, g as p, h as m, i as h, k as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T, v as E, w as D, x as O, y as k } from "../lib-
|
|
1
|
+
import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, c as u, d, f, g as p, h as m, i as h, k as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T, v as E, w as D, x as O, y as k } from "../lib-C9ig--7u.mjs";
|
|
2
2
|
export { t as ContentSection, c as DynamicTable, r as ExternalLink, u as FileUpload, a as FormSection, S as GenericTable, O as InputGroup, p as Layout, m as MainToolbar, n as Meter, b as MultiSelect, C as MultiSelectDropdown, x as Navigation, v as NavigationBar, f as NestedFormGroup, T as Pagination, d as PaginationContainer, D as Placeholder, o as ProgressIndicator, y as QueryInput, l as SidePanel, E as SidePanelContextProvider, _ as Stepper, h as TableCaption, i as defaultFilledColors, w as formatBytes, s as lazyLoadSidePanel, g as meterColor, e as testIds, k as useSidePanel };
|
|
@@ -2,6 +2,7 @@ import { ReactElement } from 'react';
|
|
|
2
2
|
import { Header } from '@tanstack/react-table';
|
|
3
3
|
type TableHeaderProps<T> = {
|
|
4
4
|
header: Header<T, unknown>;
|
|
5
|
+
isLoading?: boolean;
|
|
5
6
|
};
|
|
6
|
-
declare const ColumnHeader: <T>({ header }: TableHeaderProps<T>) => ReactElement;
|
|
7
|
+
declare const ColumnHeader: <T>({ header, isLoading, }: TableHeaderProps<T>) => ReactElement;
|
|
7
8
|
export default ColumnHeader;
|
|
@@ -1160,21 +1160,22 @@ var gt = ({ header: e }) => ({
|
|
|
1160
1160
|
name: "chevron-down",
|
|
1161
1161
|
children: "descending"
|
|
1162
1162
|
})
|
|
1163
|
-
})[e?.column?.getIsSorted()] ?? null, _t = ({ header: e }) => {
|
|
1164
|
-
let
|
|
1163
|
+
})[e?.column?.getIsSorted()] ?? null, _t = ({ header: e, isLoading: t }) => {
|
|
1164
|
+
let n = e.column.getCanSort(), r = e.column.columnDef.meta, i = r?.isInteractiveHeader, a = I(e.column.columnDef.header, e.getContext());
|
|
1165
1165
|
return /* @__PURE__ */ P("th", {
|
|
1166
|
-
"aria-hidden":
|
|
1167
|
-
"aria-label":
|
|
1166
|
+
"aria-hidden": r?.headerAriaHidden || void 0,
|
|
1167
|
+
"aria-label": r?.headerAriaLabel,
|
|
1168
1168
|
className: M("p-column-header", e.column.id),
|
|
1169
|
-
children:
|
|
1169
|
+
children: n && !i ? /* @__PURE__ */ P(y, {
|
|
1170
1170
|
appearance: "link",
|
|
1171
1171
|
className: "p-button--column-header",
|
|
1172
1172
|
onClick: e.column.getToggleSortingHandler(),
|
|
1173
|
+
tabIndex: t ? -1 : 0,
|
|
1173
1174
|
type: "button",
|
|
1174
|
-
children: /* @__PURE__ */ F(N, { children: [
|
|
1175
|
+
children: /* @__PURE__ */ F(N, { children: [a, /* @__PURE__ */ P(gt, { header: e })] })
|
|
1175
1176
|
}) : /* @__PURE__ */ F("span", {
|
|
1176
1177
|
className: "p-container--column-header",
|
|
1177
|
-
children: [
|
|
1178
|
+
children: [a, n && !i && /* @__PURE__ */ P(gt, { header: e })]
|
|
1178
1179
|
})
|
|
1179
1180
|
}, e.id);
|
|
1180
1181
|
}, X = ({ children: e, "aria-label": t = "Table controls" }) => /* @__PURE__ */ P("section", {
|
|
@@ -1717,7 +1718,10 @@ var Et = ({ canSelect: e, initialColumns: t, groupBy: n, getSubRows: r, selectio
|
|
|
1717
1718
|
children: [/* @__PURE__ */ P("thead", { children: B.getHeaderGroups().map((e) => /* @__PURE__ */ P("tr", {
|
|
1718
1719
|
"aria-rowindex": 1,
|
|
1719
1720
|
role: "row",
|
|
1720
|
-
children: e.headers.filter(c).map((e, t) => /* @__PURE__ */ F(n, { children: [/* @__PURE__ */ P(_t, {
|
|
1721
|
+
children: e.headers.filter(c).map((e, t) => /* @__PURE__ */ F(n, { children: [/* @__PURE__ */ P(_t, {
|
|
1722
|
+
header: e,
|
|
1723
|
+
isLoading: d
|
|
1724
|
+
}), R && u && (!C && t === 2 || C && t === 3) ? /* @__PURE__ */ P("th", {
|
|
1721
1725
|
"aria-hidden": "true",
|
|
1722
1726
|
className: "p-generic-table__select-alignment",
|
|
1723
1727
|
role: "columnheader"
|
package/dist/testing/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { v as e } from "../lib-
|
|
1
|
+
import { v as e } from "../lib-C9ig--7u.mjs";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import { RouterProvider as n, createMemoryRouter as r } from "react-router";
|
|
4
4
|
import { render as i, renderHook as a, screen as o } from "@testing-library/react";
|
package/package.json
CHANGED