@canonical/maas-react-components 2.7.2 → 2.8.1
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/@canonical/maas-react-components.es.js +2 -2
- package/dist/{lib-BEVV6FLF.mjs → lib-qz4Dneh_.mjs} +67 -67
- package/dist/maas-react-components.css +1 -1
- package/dist/sections/Layout/Layout.d.ts +3 -1
- package/dist/sections/SidePanel/SidePanel.d.ts +8 -4
- package/dist/sections/SidePanel/index.d.ts +1 -1
- package/dist/sections/SidePanel/utils.d.ts +2 -2
- package/dist/testing/index.es.js +1 -1
- package/package.json +1 -1
|
@@ -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-
|
|
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,
|
|
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-qz4Dneh_.mjs";
|
|
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 };
|
|
@@ -225,50 +225,8 @@ _e.Label = ({ children: e }) => {
|
|
|
225
225
|
//#region src/lib/sections/Layout/components/DocumentTitle/DocumentTitle.tsx
|
|
226
226
|
var ve = ({ children: e }) => (l(() => {
|
|
227
227
|
document.title = t.toArray(e).join("");
|
|
228
|
-
}, [e]), null), ye =
|
|
229
|
-
let e =
|
|
230
|
-
if (!e) throw Error("useSidePanel must be used within a SidePanelProvider");
|
|
231
|
-
return e;
|
|
232
|
-
}, be = ({ children: e }) => {
|
|
233
|
-
let [t, n] = h({
|
|
234
|
-
isOpen: !1,
|
|
235
|
-
title: "",
|
|
236
|
-
size: "regular",
|
|
237
|
-
component: null,
|
|
238
|
-
props: {}
|
|
239
|
-
}), r = ({ component: e, title: t, props: r = {}, size: i = "regular" }) => {
|
|
240
|
-
n({
|
|
241
|
-
isOpen: !0,
|
|
242
|
-
title: t,
|
|
243
|
-
size: i,
|
|
244
|
-
component: e,
|
|
245
|
-
props: r || {}
|
|
246
|
-
});
|
|
247
|
-
}, i = () => {
|
|
248
|
-
n({
|
|
249
|
-
isOpen: !1,
|
|
250
|
-
title: "",
|
|
251
|
-
size: "regular",
|
|
252
|
-
component: null,
|
|
253
|
-
props: {}
|
|
254
|
-
});
|
|
255
|
-
}, a = s((e) => {
|
|
256
|
-
n((t) => ({
|
|
257
|
-
...t,
|
|
258
|
-
size: e
|
|
259
|
-
}));
|
|
260
|
-
}, []);
|
|
261
|
-
return /* @__PURE__ */ P(ye.Provider, {
|
|
262
|
-
value: {
|
|
263
|
-
...t,
|
|
264
|
-
openSidePanel: r,
|
|
265
|
-
closeSidePanel: i,
|
|
266
|
-
setSidePanelSize: a
|
|
267
|
-
},
|
|
268
|
-
children: e
|
|
269
|
-
});
|
|
270
|
-
}, xe = () => {
|
|
271
|
-
let e = re(), { closeSidePanel: t } = q();
|
|
228
|
+
}, [e]), null), ye = () => {
|
|
229
|
+
let e = re(), { closeSidePanel: t } = J();
|
|
272
230
|
l(() => {
|
|
273
231
|
t();
|
|
274
232
|
}, [
|
|
@@ -276,41 +234,41 @@ var ve = ({ children: e }) => (l(() => {
|
|
|
276
234
|
e.search,
|
|
277
235
|
e.hash
|
|
278
236
|
]);
|
|
279
|
-
},
|
|
280
|
-
let { setSidePanelSize: e } =
|
|
237
|
+
}, be = () => {
|
|
238
|
+
let { setSidePanelSize: e } = J();
|
|
281
239
|
l(() => () => {
|
|
282
240
|
e("regular");
|
|
283
241
|
}, []);
|
|
284
|
-
},
|
|
285
|
-
let { closeSidePanel: e } =
|
|
242
|
+
}, xe = () => {
|
|
243
|
+
let { closeSidePanel: e } = J();
|
|
286
244
|
j(() => {
|
|
287
245
|
e();
|
|
288
246
|
});
|
|
289
|
-
},
|
|
290
|
-
|
|
291
|
-
let { isOpen:
|
|
247
|
+
}, q = ({ sidePanelTitles: e = "auto" }) => {
|
|
248
|
+
xe(), ye(), be();
|
|
249
|
+
let { isOpen: t, title: n, component: r, props: i, size: a } = J();
|
|
292
250
|
return /* @__PURE__ */ P(g, {
|
|
293
|
-
"aria-label":
|
|
251
|
+
"aria-label": n ?? void 0,
|
|
294
252
|
className: M({
|
|
295
|
-
"is-narrow":
|
|
296
|
-
"is-large":
|
|
297
|
-
"is-wide":
|
|
253
|
+
"is-narrow": a === "narrow",
|
|
254
|
+
"is-large": a === "large",
|
|
255
|
+
"is-wide": a === "wide"
|
|
298
256
|
}),
|
|
299
|
-
collapsed: !
|
|
257
|
+
collapsed: !t,
|
|
300
258
|
id: "aside-panel",
|
|
301
|
-
children: /* @__PURE__ */ F(W, { children: [
|
|
259
|
+
children: /* @__PURE__ */ F(W, { children: [e === "auto" && n ? /* @__PURE__ */ P("div", {
|
|
302
260
|
className: "row section-header section-header--side-panel",
|
|
303
261
|
children: /* @__PURE__ */ P("div", {
|
|
304
262
|
className: "col-12",
|
|
305
263
|
children: /* @__PURE__ */ P("h3", {
|
|
306
264
|
className: "section-header__title u-flex--no-shrink p-heading--4",
|
|
307
|
-
children:
|
|
265
|
+
children: n
|
|
308
266
|
})
|
|
309
267
|
})
|
|
310
|
-
}) : null,
|
|
268
|
+
}) : null, t && r && /* @__PURE__ */ P(r, { ...i })] })
|
|
311
269
|
});
|
|
312
270
|
};
|
|
313
|
-
|
|
271
|
+
q.Skeleton = ({ hasTitle: e }) => /* @__PURE__ */ F(W, {
|
|
314
272
|
"aria-hidden": "true",
|
|
315
273
|
className: "aside-skeleton",
|
|
316
274
|
children: [
|
|
@@ -360,14 +318,56 @@ J.Skeleton = ({ hasTitle: e }) => /* @__PURE__ */ F(W, {
|
|
|
360
318
|
]
|
|
361
319
|
});
|
|
362
320
|
//#endregion
|
|
363
|
-
//#region src/lib/sections/SidePanel/
|
|
364
|
-
var
|
|
321
|
+
//#region src/lib/sections/SidePanel/SidePanelContextProvider/SidePanelContextProvider.tsx
|
|
322
|
+
var Se = a(null), J = () => {
|
|
323
|
+
let e = c(Se);
|
|
324
|
+
if (!e) throw Error("useSidePanel must be used within a SidePanelProvider");
|
|
325
|
+
return e;
|
|
326
|
+
}, Ce = ({ children: e }) => {
|
|
327
|
+
let [t, n] = h({
|
|
328
|
+
isOpen: !1,
|
|
329
|
+
title: "",
|
|
330
|
+
size: "regular",
|
|
331
|
+
component: null,
|
|
332
|
+
props: {}
|
|
333
|
+
}), r = ({ component: e, title: t, props: r = {}, size: i = "regular" }) => {
|
|
334
|
+
n({
|
|
335
|
+
isOpen: !0,
|
|
336
|
+
title: t,
|
|
337
|
+
size: i,
|
|
338
|
+
component: e,
|
|
339
|
+
props: r || {}
|
|
340
|
+
});
|
|
341
|
+
}, i = () => {
|
|
342
|
+
n({
|
|
343
|
+
isOpen: !1,
|
|
344
|
+
title: "",
|
|
345
|
+
size: "regular",
|
|
346
|
+
component: null,
|
|
347
|
+
props: {}
|
|
348
|
+
});
|
|
349
|
+
}, a = s((e) => {
|
|
350
|
+
n((t) => ({
|
|
351
|
+
...t,
|
|
352
|
+
size: e
|
|
353
|
+
}));
|
|
354
|
+
}, []);
|
|
355
|
+
return /* @__PURE__ */ P(Se.Provider, {
|
|
356
|
+
value: {
|
|
357
|
+
...t,
|
|
358
|
+
openSidePanel: r,
|
|
359
|
+
closeSidePanel: i,
|
|
360
|
+
setSidePanelSize: a
|
|
361
|
+
},
|
|
362
|
+
children: e
|
|
363
|
+
});
|
|
364
|
+
}, we = (e, t) => {
|
|
365
365
|
let n = o(e);
|
|
366
366
|
return (e) => /* @__PURE__ */ P(r, {
|
|
367
|
-
fallback: /* @__PURE__ */ P(W, { children: /* @__PURE__ */ P(
|
|
367
|
+
fallback: /* @__PURE__ */ P(W, { children: /* @__PURE__ */ P(q.Skeleton, { hasTitle: t }) }),
|
|
368
368
|
children: /* @__PURE__ */ P(n, { ...e })
|
|
369
369
|
});
|
|
370
|
-
}, Te = ({ className: e, children: t, pageTitle: n, view: i, isSecondaryNavVisible: a, navigation: o, secondaryNavigation: s,
|
|
370
|
+
}, Te = ({ className: e, children: t, pageTitle: n, view: i, isSecondaryNavVisible: a, navigation: o, secondaryNavigation: s, sidePanelTitles: c = "auto", statusBar: l }) => /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(ve, { children: n }), /* @__PURE__ */ F(v, { children: [
|
|
371
371
|
o,
|
|
372
372
|
/* @__PURE__ */ F(_, {
|
|
373
373
|
className: e,
|
|
@@ -395,8 +395,8 @@ var we = (e, t) => {
|
|
|
395
395
|
})
|
|
396
396
|
]
|
|
397
397
|
}),
|
|
398
|
-
/* @__PURE__ */ P(
|
|
399
|
-
|
|
398
|
+
/* @__PURE__ */ P(q, { sidePanelTitles: c }),
|
|
399
|
+
l
|
|
400
400
|
] })] }), Ee = ({ view: e }) => e === "settings" ? /* @__PURE__ */ F(W, {
|
|
401
401
|
"aria-hidden": "true",
|
|
402
402
|
className: "layout-skeleton",
|
|
@@ -2015,4 +2015,4 @@ var Et = ({ canSelect: e, initialColumns: t, groupBy: n, getSubRows: r, selectio
|
|
|
2015
2015
|
};
|
|
2016
2016
|
};
|
|
2017
2017
|
//#endregion
|
|
2018
|
-
export { H as A, W as C, fe as D, he as E, le as O, G as S, ge as T, we as _, dt as a, q as b, rt as c, et as d, Qe as f, Te as g, Ae as h, ht as i, L as k, tt as l, Xe as m, It as n, ct as o, Y as p, jt as r, st as s, Lt as t, $e as u,
|
|
2018
|
+
export { H as A, W as C, fe as D, he as E, le as O, G as S, ge as T, we as _, dt as a, q as b, rt as c, et as d, Qe as f, Te as g, Ae as h, ht as i, L as k, tt as l, Xe as m, It as n, ct as o, Y as p, jt as r, st as s, Lt as t, $e as u, Ce as v, U as w, _e as x, J as y };
|