@local-civics/mgmt-ui 0.1.77 → 0.1.79

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 CHANGED
@@ -586,7 +586,6 @@ type TaskCardProps = {
586
586
  users: {
587
587
  name: string;
588
588
  }[];
589
- onCopy: () => void;
590
589
  };
591
590
 
592
591
  /**
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 !== "Home") {
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,7 +2499,7 @@ 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" }, /* @__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), !!props.lessonsTotal && /* @__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,
@@ -2504,7 +2509,7 @@ function TaskCard(props) {
2504
2509
  props.lessonsCompleted,
2505
2510
  "/",
2506
2511
  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 }))));
2512
+ )), !!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
2513
  }
2509
2514
 
2510
2515
  const TrialHome = (props) => {
@@ -2818,6 +2823,11 @@ const useStyles = core.createStyles((theme, props) => ({
2818
2823
  paddingLeft: props.navbar ? theme.spacing.xl * 13 : 0
2819
2824
  }
2820
2825
  },
2826
+ page: {
2827
+ [theme.fn.smallerThan("sm")]: {
2828
+ paddingTop: theme.spacing.xl * 2 - 3
2829
+ }
2830
+ },
2821
2831
  logo: {
2822
2832
  maxWidth: 200,
2823
2833
  [theme.fn.smallerThan("sm")]: {
@@ -2940,7 +2950,7 @@ const App = (props) => {
2940
2950
  main: { backgroundColor: theme.colorScheme === "dark" ? theme.colors.dark[8] : theme.colors.gray[0] }
2941
2951
  })
2942
2952
  },
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),
2953
+ /* @__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
2954
  !!account.accounts && !!account.account && /* @__PURE__ */ React__namespace.createElement(
2945
2955
  SwitchAccount,
2946
2956
  {