@local-civics/mgmt-ui 0.1.90 → 0.1.92

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
@@ -106,7 +106,7 @@ type BadgeProps = {
106
106
  students: BadgeUserItem[];
107
107
  href: string;
108
108
  trial?: boolean;
109
- badgesEarned?: number;
109
+ lessonsCompleted?: number;
110
110
  onBackClick: () => void;
111
111
  onClassChange: (classId: string) => void;
112
112
  onCopyLinkClick: () => void;
package/dist/index.js CHANGED
@@ -671,7 +671,7 @@ const Badge = (props) => {
671
671
  ))))), /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React__namespace.createElement(core.LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React__namespace.createElement(core.Stack, null, /* @__PURE__ */ React__namespace.createElement(StatsGroup, { data: [
672
672
  {
673
673
  title: props.trial ? "LESSONS SUBMITTED" : "BADGE COMPLETION",
674
- value: props.trial ? props.badgesEarned || 0 : percentageOfBadgesEarned,
674
+ value: props.trial ? props.lessonsCompleted || 0 : percentageOfBadgesEarned,
675
675
  unit: props.trial ? "" : "%"
676
676
  }
677
677
  ] }), !props.trial && /* @__PURE__ */ React__namespace.createElement(
@@ -1746,7 +1746,7 @@ const SplitButton$1 = (props) => {
1746
1746
  onClick: props.onCopyLinkClick
1747
1747
  },
1748
1748
  "Copy link"
1749
- ), /* @__PURE__ */ React__namespace.createElement(
1749
+ ), !props.noExport && /* @__PURE__ */ React__namespace.createElement(
1750
1750
  core.Menu.Item,
1751
1751
  {
1752
1752
  icon: /* @__PURE__ */ React__namespace.createElement(icons.IconTableExport, { size: 16, stroke: 1.5, color: menuIconColor }),
@@ -1929,6 +1929,7 @@ const Lesson = (props) => {
1929
1929
  SplitButton$1,
1930
1930
  {
1931
1931
  href: props.href,
1932
+ noExport: props.trial,
1932
1933
  onCopyLinkClick: props.onCopyLinkClick,
1933
1934
  onExportDataClick: props.onExportDataClick
1934
1935
  }
@@ -2532,7 +2533,7 @@ const BadgeGrid = (props) => {
2532
2533
  };
2533
2534
  function TaskCard(props) {
2534
2535
  const isComplete = props.lessonsCompleted >= props.lessonsTotal;
2535
- 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 })), !!props.lessonsTotal && isComplete && /* @__PURE__ */ React__namespace.createElement(core.Badge, { variant: "gradient", gradient: { from: "indigo", to: "cyan" } }, "Complete"), !!props.lessonsTotal && !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(
2536
+ return /* @__PURE__ */ React__namespace.createElement(core.Card, { withBorder: true, radius: "md" }, /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "apart", mb: 20 }, /* @__PURE__ */ React__namespace.createElement(core.ThemeIcon, { size: "lg", variant: "gradient", gradient: { from: "indigo", to: "cyan" } }, /* @__PURE__ */ React__namespace.createElement(icons.IconBadge, { size: 20 })), !!props.lessonsTotal && isComplete && /* @__PURE__ */ React__namespace.createElement(core.Badge, { variant: "gradient", gradient: { from: "indigo", to: "cyan" } }, "Complete"), !!props.lessonsTotal && !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, mb: 50 }, props.description), !!props.lessonsCompleted && /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", size: "sm", mt: "md" }, "Lessons completed:", " ", /* @__PURE__ */ React__namespace.createElement(
2536
2537
  core.Text,
2537
2538
  {
2538
2539
  span: true,
@@ -2701,8 +2702,7 @@ var __spreadValues$1 = (a, b) => {
2701
2702
  var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
2702
2703
  const useStyles$1 = core.createStyles((theme) => ({
2703
2704
  wrapper: {
2704
- minHeight: 400,
2705
- height: "100%",
2705
+ minHeight: "100%",
2706
2706
  boxSizing: "border-box",
2707
2707
  backgroundImage: `linear-gradient(-60deg, #4e5561 0%, #222a39 100%)`,
2708
2708
  padding: theme.spacing.xl * 2.5,