@local-civics/mgmt-ui 0.1.78 → 0.1.80
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.d.ts +0 -1
- package/dist/index.js +15 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -294,13 +294,18 @@ const data = [
|
|
|
294
294
|
]
|
|
295
295
|
}
|
|
296
296
|
];
|
|
297
|
+
const TRIAL_PAGES = [
|
|
298
|
+
"Home",
|
|
299
|
+
"Lessons",
|
|
300
|
+
"Badges"
|
|
301
|
+
];
|
|
297
302
|
function Navbar(props) {
|
|
298
303
|
const { classes, cx } = useStyles$m();
|
|
299
304
|
const [burgerOpen, setBurgerOpen] = React__namespace.useState(false);
|
|
300
305
|
const toggle = () => setBurgerOpen(!burgerOpen);
|
|
301
306
|
const links = data.map((item) => {
|
|
302
307
|
const context = props.links[item.label] || { notifications: 0, href: "" };
|
|
303
|
-
if (context.hidden || props.trial && item.label
|
|
308
|
+
if (context.hidden || props.trial && TRIAL_PAGES.indexOf(item.label) === -1) {
|
|
304
309
|
return null;
|
|
305
310
|
}
|
|
306
311
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
@@ -2494,17 +2499,15 @@ function TaskCard(props) {
|
|
|
2494
2499
|
});
|
|
2495
2500
|
const remainingUsers = props.users.slice(3).length;
|
|
2496
2501
|
const isComplete = props.lessonsCompleted >= props.lessonsTotal;
|
|
2497
|
-
return /* @__PURE__ */ React__namespace.createElement(core.Card, { withBorder: true, radius: "md" }, /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "apart" }, /* @__PURE__ */ React__namespace.createElement(core.ThemeIcon, { size: "lg", variant: "gradient", gradient: { from: "indigo", to: "cyan" } }, /* @__PURE__ */ React__namespace.createElement(icons.IconBadge, { size: 20 })), isComplete && /* @__PURE__ */ React__namespace.createElement(core.Badge, { variant: "gradient", gradient: { from: "indigo", to: "cyan" } }, "Complete"), !isComplete && /* @__PURE__ */ React__namespace.createElement(core.Badge, { variant: "filled" }, "Incomplete")), /* @__PURE__ */ React__namespace.createElement(core.UnstyledButton, { to: props.href, mt: "md", sx: { ":hover": { textDecoration: "underline" } } }, /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "lg", weight: 500 }, props.title)), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "sm", color: "dimmed", mt: 5 }, props.description), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", size: "sm", mt: "md" }, "Lessons completed:", " ", /* @__PURE__ */ React__namespace.createElement(
|
|
2502
|
+
return /* @__PURE__ */ React__namespace.createElement(core.Card, { withBorder: true, radius: "md" }, !!props.lessonsTotal && /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "apart" }, /* @__PURE__ */ React__namespace.createElement(core.ThemeIcon, { size: "lg", variant: "gradient", gradient: { from: "indigo", to: "cyan" } }, /* @__PURE__ */ React__namespace.createElement(icons.IconBadge, { size: 20 })), isComplete && /* @__PURE__ */ React__namespace.createElement(core.Badge, { variant: "gradient", gradient: { from: "indigo", to: "cyan" } }, "Complete"), !isComplete && /* @__PURE__ */ React__namespace.createElement(core.Badge, { variant: "filled" }, "Incomplete")), /* @__PURE__ */ React__namespace.createElement(core.UnstyledButton, { component: reactRouterDom.Link, to: props.href, mt: "md", sx: { ":hover": { textDecoration: "underline" } } }, /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "lg", weight: 500 }, props.title)), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "sm", color: "dimmed", mt: 5 }, props.description), !!props.lessonsCompleted && /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", size: "sm", mt: "md" }, "Lessons completed:", " ", /* @__PURE__ */ React__namespace.createElement(
|
|
2498
2503
|
core.Text,
|
|
2499
2504
|
{
|
|
2500
2505
|
span: true,
|
|
2501
2506
|
weight: 500,
|
|
2502
2507
|
sx: (theme) => ({ color: theme.colorScheme === "dark" ? theme.white : theme.black })
|
|
2503
2508
|
},
|
|
2504
|
-
props.lessonsCompleted
|
|
2505
|
-
|
|
2506
|
-
props.lessonsTotal
|
|
2507
|
-
)), /* @__PURE__ */ React__namespace.createElement(core.Progress, { value: props.lessonsCompleted / props.lessonsTotal * 100, mt: 5 }), /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "apart", mt: "md" }, /* @__PURE__ */ React__namespace.createElement(core.Avatar.Group, { spacing: "sm" }, avatars, !!remainingUsers && /* @__PURE__ */ React__namespace.createElement(core.Avatar, { radius: "xl" }, "+", remainingUsers)), /* @__PURE__ */ React__namespace.createElement(core.ActionIcon, { onClick: props.onCopy, variant: "default" }, /* @__PURE__ */ React__namespace.createElement(icons.IconCopy, { size: 18 }))));
|
|
2509
|
+
props.lessonsCompleted
|
|
2510
|
+
)), !!props.lessonsTotal && /* @__PURE__ */ React__namespace.createElement(core.Progress, { value: props.lessonsCompleted / props.lessonsTotal * 100, mt: 5 }), /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "apart", mt: "md" }, /* @__PURE__ */ React__namespace.createElement(core.Avatar.Group, { spacing: "sm" }, avatars, !!remainingUsers && /* @__PURE__ */ React__namespace.createElement(core.Avatar, { radius: "xl" }, "+", remainingUsers))));
|
|
2508
2511
|
}
|
|
2509
2512
|
|
|
2510
2513
|
const TrialHome = (props) => {
|
|
@@ -2818,6 +2821,11 @@ const useStyles = core.createStyles((theme, props) => ({
|
|
|
2818
2821
|
paddingLeft: props.navbar ? theme.spacing.xl * 13 : 0
|
|
2819
2822
|
}
|
|
2820
2823
|
},
|
|
2824
|
+
page: {
|
|
2825
|
+
[theme.fn.smallerThan("sm")]: {
|
|
2826
|
+
paddingTop: theme.spacing.xl * 3
|
|
2827
|
+
}
|
|
2828
|
+
},
|
|
2821
2829
|
logo: {
|
|
2822
2830
|
maxWidth: 200,
|
|
2823
2831
|
[theme.fn.smallerThan("sm")]: {
|
|
@@ -2940,7 +2948,7 @@ const App = (props) => {
|
|
|
2940
2948
|
main: { backgroundColor: theme.colorScheme === "dark" ? theme.colors.dark[8] : theme.colors.gray[0] }
|
|
2941
2949
|
})
|
|
2942
2950
|
},
|
|
2943
|
-
/* @__PURE__ */ React__namespace.createElement("div", { style: { position: "relative" } }, (props.loading || account.opened) && /* @__PURE__ */ React__namespace.createElement(core.Center, { style: { height: 400 } }, /* @__PURE__ */ React__namespace.createElement(core.Loader, null)), !props.loading && !account.opened && props.page),
|
|
2951
|
+
/* @__PURE__ */ React__namespace.createElement("div", { className: classes.page, style: { position: "relative" } }, (props.loading || account.opened) && /* @__PURE__ */ React__namespace.createElement(core.Center, { style: { height: 400 } }, /* @__PURE__ */ React__namespace.createElement(core.Loader, null)), !props.loading && !account.opened && props.page),
|
|
2944
2952
|
!!account.accounts && !!account.account && /* @__PURE__ */ React__namespace.createElement(
|
|
2945
2953
|
SwitchAccount,
|
|
2946
2954
|
{
|