@local-civics/mgmt-ui 0.1.84 → 0.1.85

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
@@ -614,6 +614,7 @@ type TrialRegistrationProps = {
614
614
  onBegin: (data: {
615
615
  firstName: string;
616
616
  lastName: string;
617
+ schoolName: string;
617
618
  interests: string[];
618
619
  }) => void;
619
620
  };
package/dist/index.js CHANGED
@@ -2401,40 +2401,55 @@ const DropzoneButton = (props) => {
2401
2401
  };
2402
2402
 
2403
2403
  const useStyles$3 = core.createStyles((theme) => ({
2404
+ form: {
2405
+ backgroundColor: theme.white,
2406
+ padding: theme.spacing.xl,
2407
+ border: `1px solid ${theme.colorScheme === "dark" ? theme.colors.dark[8] : theme.colors.gray[3]}`,
2408
+ borderRadius: theme.radius.md,
2409
+ boxShadow: theme.shadows.lg,
2410
+ minWidth: 300,
2411
+ height: "fit-content"
2412
+ },
2404
2413
  wrapper: {
2405
- minHeight: 400,
2406
- height: "100%",
2407
- boxSizing: "border-box",
2408
- backgroundImage: `linear-gradient(-60deg, ${theme.colors[theme.primaryColor][4]} 0%, ${theme.colors[theme.primaryColor][7]} 100%)`,
2409
- padding: theme.spacing.xl * 2.5,
2410
- [`@media (max-width: ${theme.breakpoints.sm}px)`]: {
2411
- padding: theme.spacing.xl * 1.5
2414
+ position: "relative",
2415
+ paddingTop: 180,
2416
+ paddingBottom: 130
2417
+ },
2418
+ content: {
2419
+ maxWidth: 480,
2420
+ marginRight: theme.spacing.xl * 3,
2421
+ [theme.fn.smallerThan("md")]: {
2422
+ maxWidth: "100%",
2423
+ marginRight: 0
2412
2424
  }
2413
2425
  },
2414
2426
  title: {
2427
+ color: theme.colorScheme === "dark" ? theme.white : theme.black,
2415
2428
  fontFamily: `Greycliff CF, ${theme.fontFamily}`,
2416
- color: theme.white,
2417
- lineHeight: 1
2418
- },
2419
- description: {
2420
- color: theme.colors[theme.primaryColor][0],
2421
- maxWidth: 300,
2422
- [`@media (max-width: ${theme.breakpoints.sm}px)`]: {
2423
- maxWidth: "100%"
2429
+ fontSize: 44,
2430
+ lineHeight: 1.2,
2431
+ fontWeight: 900,
2432
+ [theme.fn.smallerThan("xs")]: {
2433
+ fontSize: 28
2424
2434
  }
2425
2435
  },
2426
- form: {
2427
- backgroundColor: theme.white,
2428
- padding: theme.spacing.xl,
2429
- borderRadius: theme.radius.md,
2430
- boxShadow: theme.shadows.lg
2436
+ control: {
2437
+ [theme.fn.smallerThan("xs")]: {
2438
+ flex: 1
2439
+ }
2431
2440
  },
2432
- social: {
2433
- color: theme.white,
2434
- "&:hover": {
2435
- color: theme.colors[theme.primaryColor][1]
2441
+ image: {
2442
+ flex: 1,
2443
+ [theme.fn.smallerThan("md")]: {
2444
+ display: "none"
2436
2445
  }
2437
2446
  },
2447
+ highlight: {
2448
+ position: "relative",
2449
+ backgroundColor: theme.fn.variant({ variant: "light", color: theme.primaryColor }).background,
2450
+ borderRadius: theme.radius.sm,
2451
+ padding: "4px 12px"
2452
+ },
2438
2453
  input: {
2439
2454
  backgroundColor: theme.white,
2440
2455
  borderColor: theme.colors.gray[4],
@@ -2445,14 +2460,12 @@ const useStyles$3 = core.createStyles((theme) => ({
2445
2460
  },
2446
2461
  inputLabel: {
2447
2462
  color: theme.black
2448
- },
2449
- control: {
2450
- backgroundColor: theme.colors[theme.primaryColor][6]
2451
2463
  }
2452
2464
  }));
2453
2465
  const StartAnonymousLesson = (props) => {
2454
2466
  const { classes } = useStyles$3();
2455
- return /* @__PURE__ */ React__namespace.createElement("div", { className: classes.wrapper }, /* @__PURE__ */ React__namespace.createElement(core.SimpleGrid, { maw: 960, ml: "auto", mr: "auto", cols: 2, spacing: 50, breakpoints: [{ maxWidth: "sm", cols: 1 }] }, /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement(core.Title, { className: classes.title }, props.title), /* @__PURE__ */ React__namespace.createElement(core.Text, { weight: "bold", className: classes.description, mt: "sm", mb: 30 }, "Instructor: ", props.educatorName), /* @__PURE__ */ React__namespace.createElement(core.Text, { className: classes.description, mt: "sm", mb: 30 }, props.description)), /* @__PURE__ */ React__namespace.createElement("div", { className: classes.form }, /* @__PURE__ */ React__namespace.createElement(
2467
+ const [name, setName] = React__namespace.useState("");
2468
+ return /* @__PURE__ */ React__namespace.createElement("div", { className: classes.wrapper }, /* @__PURE__ */ React__namespace.createElement(core.Container, null, /* @__PURE__ */ React__namespace.createElement(core.SimpleGrid, { maw: 960, cols: 2, spacing: 15, breakpoints: [{ maxWidth: "sm", cols: 1 }] }, /* @__PURE__ */ React__namespace.createElement("div", { className: classes.content }, /* @__PURE__ */ React__namespace.createElement(core.Badge, { color: "violet" }, "Anonymous"), /* @__PURE__ */ React__namespace.createElement(core.Title, { className: classes.title }, props.title), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", mt: "md" }, props.description), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", mt: "md" }, "Instructed by ", props.educatorName, ".")), /* @__PURE__ */ React__namespace.createElement("div", { className: classes.form }, /* @__PURE__ */ React__namespace.createElement(
2456
2469
  core.TextInput,
2457
2470
  {
2458
2471
  label: "Name",
@@ -2460,9 +2473,10 @@ const StartAnonymousLesson = (props) => {
2460
2473
  defaultValue: props.studentName,
2461
2474
  readOnly: !!props.studentName,
2462
2475
  required: true,
2476
+ onChange: (e) => setName(e.target.value),
2463
2477
  classNames: { input: classes.input, label: classes.inputLabel }
2464
2478
  }
2465
- ), /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "right", mt: "md" }, /* @__PURE__ */ React__namespace.createElement(core.Button, { onClick: props.onStart, className: classes.control }, !props.studentName ? "Start lesson" : "Continue lesson")))));
2479
+ ), /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "right", mt: "md" }, /* @__PURE__ */ React__namespace.createElement(core.Button, { disabled: !name && !props.studentName, onClick: props.onStart, className: classes.control }, !props.studentName ? "Start lesson" : "Continue lesson"))))));
2466
2480
  };
2467
2481
 
2468
2482
  var __defProp$3 = Object.defineProperty;
@@ -2574,7 +2588,7 @@ const useStyles$2 = core.createStyles((theme, { checked }) => ({
2574
2588
  transition: "background-color 150ms ease, border-color 150ms ease",
2575
2589
  border: `1px solid ${checked ? theme.fn.variant({ variant: "outline", color: theme.primaryColor }).border : theme.colorScheme === "dark" ? theme.colors.dark[8] : theme.colors.gray[3]}`,
2576
2590
  borderRadius: theme.radius.sm,
2577
- padding: theme.spacing.lg,
2591
+ padding: theme.spacing.xl,
2578
2592
  backgroundColor: checked ? theme.fn.variant({ variant: "light", color: theme.primaryColor }).background : theme.colorScheme === "dark" ? theme.colors.dark[8] : theme.white
2579
2593
  },
2580
2594
  body: {
@@ -2614,7 +2628,7 @@ function ImageCheckbox(_a) {
2614
2628
  className: cx(classes.button, className)
2615
2629
  }),
2616
2630
  /* @__PURE__ */ React__namespace.createElement(core.ThemeIcon, { variant: "light", size: "lg", color: "blue" }, /* @__PURE__ */ React__namespace.createElement(Icon, { size: 40 })),
2617
- /* @__PURE__ */ React__namespace.createElement("div", { className: classes.body }, /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", size: "xs", sx: { lineHeight: 1 }, mb: 5 }, description), /* @__PURE__ */ React__namespace.createElement(core.Text, { weight: 500, size: "sm", sx: { lineHeight: 1 } }, title)),
2631
+ /* @__PURE__ */ React__namespace.createElement("div", { className: classes.body }, /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", size: "xs", sx: { lineHeight: 1 }, mb: 5 }, description), /* @__PURE__ */ React__namespace.createElement(core.Text, { weight: 500, size: "md", sx: { lineHeight: 1 } }, title)),
2618
2632
  /* @__PURE__ */ React__namespace.createElement(
2619
2633
  core.Checkbox,
2620
2634
  {
@@ -2672,7 +2686,7 @@ const useStyles$1 = core.createStyles((theme) => ({
2672
2686
  minHeight: 400,
2673
2687
  height: "100%",
2674
2688
  boxSizing: "border-box",
2675
- backgroundImage: `linear-gradient(-60deg, ${theme.colors[theme.primaryColor][4]} 0%, ${theme.colors[theme.primaryColor][7]} 100%)`,
2689
+ backgroundImage: `linear-gradient(-60deg, #4e5561 0%, #222a39 100%)`,
2676
2690
  padding: theme.spacing.xl * 2.5,
2677
2691
  [`@media (max-width: ${theme.breakpoints.sm}px)`]: {
2678
2692
  padding: theme.spacing.xl * 1.5
@@ -2730,6 +2744,7 @@ const TrialRegistration = (props) => {
2730
2744
  const { classes } = useStyles$1();
2731
2745
  const [firstName, setFirstName] = React__namespace.useState("");
2732
2746
  const [lastName, setLastName] = React__namespace.useState("");
2747
+ const [schoolName, setSchoolName] = React__namespace.useState("");
2733
2748
  const [interests, setInterests] = React__namespace.useState({});
2734
2749
  return /* @__PURE__ */ React__namespace.createElement("div", { className: classes.wrapper }, /* @__PURE__ */ React__namespace.createElement(core.SimpleGrid, { maw: 960, ml: "auto", mr: "auto", cols: 1, spacing: 15, breakpoints: [{ maxWidth: "sm", cols: 1 }] }, /* @__PURE__ */ React__namespace.createElement(core.Group, { spacing: "sm" }, /* @__PURE__ */ React__namespace.createElement(
2735
2750
  core.Image,
@@ -2739,11 +2754,20 @@ const TrialRegistration = (props) => {
2739
2754
  fit: "contain",
2740
2755
  src: "https://cdn.localcivics.io/brand/l.png"
2741
2756
  }
2742
- ), /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement(core.Title, { className: classes.title }, "Trial Educator"), /* @__PURE__ */ React__namespace.createElement(core.Text, { className: classes.description, mt: "sm" }, "Try out a few of the features we can bring to your classroom. No commitment required."))), /* @__PURE__ */ React__namespace.createElement("div", { className: classes.form }, /* @__PURE__ */ React__namespace.createElement(core.Group, { mb: "md", spacing: "md", grow: true }, /* @__PURE__ */ React__namespace.createElement(
2757
+ ), /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement(core.Title, { className: classes.title }, "Are you an", " ", /* @__PURE__ */ React__namespace.createElement(
2758
+ core.Text,
2759
+ {
2760
+ component: "span",
2761
+ inherit: true,
2762
+ variant: "gradient",
2763
+ gradient: { from: "pink", to: "yellow" }
2764
+ },
2765
+ "educator"
2766
+ ), " ", "interested in a free trial?"), /* @__PURE__ */ React__namespace.createElement(core.Text, { className: classes.description, mt: "sm" }, "Try out a few of the features we can bring to your classroom. No commitment required."))), /* @__PURE__ */ React__namespace.createElement("div", { className: classes.form }, /* @__PURE__ */ React__namespace.createElement(core.SimpleGrid, { cols: 2, spacing: 15, breakpoints: [{ maxWidth: "sm", cols: 1 }] }, /* @__PURE__ */ React__namespace.createElement(
2743
2767
  core.TextInput,
2744
2768
  {
2745
2769
  label: "First Name",
2746
- placeholder: "John",
2770
+ placeholder: "Your first name",
2747
2771
  required: true,
2748
2772
  classNames: { input: classes.input, label: classes.inputLabel },
2749
2773
  onChange: (e) => setFirstName(e.target.value)
@@ -2752,11 +2776,19 @@ const TrialRegistration = (props) => {
2752
2776
  core.TextInput,
2753
2777
  {
2754
2778
  label: "Last Name",
2755
- placeholder: "Doe",
2779
+ placeholder: "Your last name",
2756
2780
  required: true,
2757
2781
  classNames: { input: classes.input, label: classes.inputLabel },
2758
2782
  onChange: (e) => setLastName(e.target.value)
2759
2783
  }
2784
+ ), /* @__PURE__ */ React__namespace.createElement(
2785
+ core.TextInput,
2786
+ {
2787
+ label: "School Name (Optional)",
2788
+ placeholder: "What school, if any, are you associated with?",
2789
+ classNames: { input: classes.input, label: classes.inputLabel },
2790
+ onChange: (e) => setSchoolName(e.target.value)
2791
+ }
2760
2792
  )), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: 14, weight: 500, mb: "md", mt: "xl" }, "What are you interested in teaching?"), /* @__PURE__ */ React__namespace.createElement(
2761
2793
  SelectGrid,
2762
2794
  {
@@ -2766,7 +2798,8 @@ const TrialRegistration = (props) => {
2766
2798
  ), /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "right", mt: "md" }, /* @__PURE__ */ React__namespace.createElement(
2767
2799
  core.Button,
2768
2800
  {
2769
- onClick: () => props.onBegin({ firstName, lastName, interests: Object.keys(interests) }),
2801
+ disabled: !firstName || !lastName,
2802
+ onClick: () => props.onBegin({ firstName, lastName, schoolName, interests: Object.keys(interests) }),
2770
2803
  className: classes.control
2771
2804
  },
2772
2805
  "Begin trial"