@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.mjs CHANGED
@@ -2381,40 +2381,55 @@ const DropzoneButton = (props) => {
2381
2381
  };
2382
2382
 
2383
2383
  const useStyles$3 = createStyles((theme) => ({
2384
+ form: {
2385
+ backgroundColor: theme.white,
2386
+ padding: theme.spacing.xl,
2387
+ border: `1px solid ${theme.colorScheme === "dark" ? theme.colors.dark[8] : theme.colors.gray[3]}`,
2388
+ borderRadius: theme.radius.md,
2389
+ boxShadow: theme.shadows.lg,
2390
+ minWidth: 300,
2391
+ height: "fit-content"
2392
+ },
2384
2393
  wrapper: {
2385
- minHeight: 400,
2386
- height: "100%",
2387
- boxSizing: "border-box",
2388
- backgroundImage: `linear-gradient(-60deg, ${theme.colors[theme.primaryColor][4]} 0%, ${theme.colors[theme.primaryColor][7]} 100%)`,
2389
- padding: theme.spacing.xl * 2.5,
2390
- [`@media (max-width: ${theme.breakpoints.sm}px)`]: {
2391
- padding: theme.spacing.xl * 1.5
2394
+ position: "relative",
2395
+ paddingTop: 180,
2396
+ paddingBottom: 130
2397
+ },
2398
+ content: {
2399
+ maxWidth: 480,
2400
+ marginRight: theme.spacing.xl * 3,
2401
+ [theme.fn.smallerThan("md")]: {
2402
+ maxWidth: "100%",
2403
+ marginRight: 0
2392
2404
  }
2393
2405
  },
2394
2406
  title: {
2407
+ color: theme.colorScheme === "dark" ? theme.white : theme.black,
2395
2408
  fontFamily: `Greycliff CF, ${theme.fontFamily}`,
2396
- color: theme.white,
2397
- lineHeight: 1
2398
- },
2399
- description: {
2400
- color: theme.colors[theme.primaryColor][0],
2401
- maxWidth: 300,
2402
- [`@media (max-width: ${theme.breakpoints.sm}px)`]: {
2403
- maxWidth: "100%"
2409
+ fontSize: 44,
2410
+ lineHeight: 1.2,
2411
+ fontWeight: 900,
2412
+ [theme.fn.smallerThan("xs")]: {
2413
+ fontSize: 28
2404
2414
  }
2405
2415
  },
2406
- form: {
2407
- backgroundColor: theme.white,
2408
- padding: theme.spacing.xl,
2409
- borderRadius: theme.radius.md,
2410
- boxShadow: theme.shadows.lg
2416
+ control: {
2417
+ [theme.fn.smallerThan("xs")]: {
2418
+ flex: 1
2419
+ }
2411
2420
  },
2412
- social: {
2413
- color: theme.white,
2414
- "&:hover": {
2415
- color: theme.colors[theme.primaryColor][1]
2421
+ image: {
2422
+ flex: 1,
2423
+ [theme.fn.smallerThan("md")]: {
2424
+ display: "none"
2416
2425
  }
2417
2426
  },
2427
+ highlight: {
2428
+ position: "relative",
2429
+ backgroundColor: theme.fn.variant({ variant: "light", color: theme.primaryColor }).background,
2430
+ borderRadius: theme.radius.sm,
2431
+ padding: "4px 12px"
2432
+ },
2418
2433
  input: {
2419
2434
  backgroundColor: theme.white,
2420
2435
  borderColor: theme.colors.gray[4],
@@ -2425,14 +2440,12 @@ const useStyles$3 = createStyles((theme) => ({
2425
2440
  },
2426
2441
  inputLabel: {
2427
2442
  color: theme.black
2428
- },
2429
- control: {
2430
- backgroundColor: theme.colors[theme.primaryColor][6]
2431
2443
  }
2432
2444
  }));
2433
2445
  const StartAnonymousLesson = (props) => {
2434
2446
  const { classes } = useStyles$3();
2435
- return /* @__PURE__ */ React.createElement("div", { className: classes.wrapper }, /* @__PURE__ */ React.createElement(SimpleGrid, { maw: 960, ml: "auto", mr: "auto", cols: 2, spacing: 50, breakpoints: [{ maxWidth: "sm", cols: 1 }] }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Title, { className: classes.title }, props.title), /* @__PURE__ */ React.createElement(Text, { weight: "bold", className: classes.description, mt: "sm", mb: 30 }, "Instructor: ", props.educatorName), /* @__PURE__ */ React.createElement(Text, { className: classes.description, mt: "sm", mb: 30 }, props.description)), /* @__PURE__ */ React.createElement("div", { className: classes.form }, /* @__PURE__ */ React.createElement(
2447
+ const [name, setName] = React.useState("");
2448
+ return /* @__PURE__ */ React.createElement("div", { className: classes.wrapper }, /* @__PURE__ */ React.createElement(Container, null, /* @__PURE__ */ React.createElement(SimpleGrid, { maw: 960, cols: 2, spacing: 15, breakpoints: [{ maxWidth: "sm", cols: 1 }] }, /* @__PURE__ */ React.createElement("div", { className: classes.content }, /* @__PURE__ */ React.createElement(Badge$1, { color: "violet" }, "Anonymous"), /* @__PURE__ */ React.createElement(Title, { className: classes.title }, props.title), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", mt: "md" }, props.description), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", mt: "md" }, "Instructed by ", props.educatorName, ".")), /* @__PURE__ */ React.createElement("div", { className: classes.form }, /* @__PURE__ */ React.createElement(
2436
2449
  TextInput,
2437
2450
  {
2438
2451
  label: "Name",
@@ -2440,9 +2453,10 @@ const StartAnonymousLesson = (props) => {
2440
2453
  defaultValue: props.studentName,
2441
2454
  readOnly: !!props.studentName,
2442
2455
  required: true,
2456
+ onChange: (e) => setName(e.target.value),
2443
2457
  classNames: { input: classes.input, label: classes.inputLabel }
2444
2458
  }
2445
- ), /* @__PURE__ */ React.createElement(Group, { position: "right", mt: "md" }, /* @__PURE__ */ React.createElement(Button, { onClick: props.onStart, className: classes.control }, !props.studentName ? "Start lesson" : "Continue lesson")))));
2459
+ ), /* @__PURE__ */ React.createElement(Group, { position: "right", mt: "md" }, /* @__PURE__ */ React.createElement(Button, { disabled: !name && !props.studentName, onClick: props.onStart, className: classes.control }, !props.studentName ? "Start lesson" : "Continue lesson"))))));
2446
2460
  };
2447
2461
 
2448
2462
  var __defProp$3 = Object.defineProperty;
@@ -2554,7 +2568,7 @@ const useStyles$2 = createStyles((theme, { checked }) => ({
2554
2568
  transition: "background-color 150ms ease, border-color 150ms ease",
2555
2569
  border: `1px solid ${checked ? theme.fn.variant({ variant: "outline", color: theme.primaryColor }).border : theme.colorScheme === "dark" ? theme.colors.dark[8] : theme.colors.gray[3]}`,
2556
2570
  borderRadius: theme.radius.sm,
2557
- padding: theme.spacing.lg,
2571
+ padding: theme.spacing.xl,
2558
2572
  backgroundColor: checked ? theme.fn.variant({ variant: "light", color: theme.primaryColor }).background : theme.colorScheme === "dark" ? theme.colors.dark[8] : theme.white
2559
2573
  },
2560
2574
  body: {
@@ -2594,7 +2608,7 @@ function ImageCheckbox(_a) {
2594
2608
  className: cx(classes.button, className)
2595
2609
  }),
2596
2610
  /* @__PURE__ */ React.createElement(ThemeIcon, { variant: "light", size: "lg", color: "blue" }, /* @__PURE__ */ React.createElement(Icon, { size: 40 })),
2597
- /* @__PURE__ */ React.createElement("div", { className: classes.body }, /* @__PURE__ */ React.createElement(Text, { color: "dimmed", size: "xs", sx: { lineHeight: 1 }, mb: 5 }, description), /* @__PURE__ */ React.createElement(Text, { weight: 500, size: "sm", sx: { lineHeight: 1 } }, title)),
2611
+ /* @__PURE__ */ React.createElement("div", { className: classes.body }, /* @__PURE__ */ React.createElement(Text, { color: "dimmed", size: "xs", sx: { lineHeight: 1 }, mb: 5 }, description), /* @__PURE__ */ React.createElement(Text, { weight: 500, size: "md", sx: { lineHeight: 1 } }, title)),
2598
2612
  /* @__PURE__ */ React.createElement(
2599
2613
  Checkbox,
2600
2614
  {
@@ -2652,7 +2666,7 @@ const useStyles$1 = createStyles((theme) => ({
2652
2666
  minHeight: 400,
2653
2667
  height: "100%",
2654
2668
  boxSizing: "border-box",
2655
- backgroundImage: `linear-gradient(-60deg, ${theme.colors[theme.primaryColor][4]} 0%, ${theme.colors[theme.primaryColor][7]} 100%)`,
2669
+ backgroundImage: `linear-gradient(-60deg, #4e5561 0%, #222a39 100%)`,
2656
2670
  padding: theme.spacing.xl * 2.5,
2657
2671
  [`@media (max-width: ${theme.breakpoints.sm}px)`]: {
2658
2672
  padding: theme.spacing.xl * 1.5
@@ -2710,6 +2724,7 @@ const TrialRegistration = (props) => {
2710
2724
  const { classes } = useStyles$1();
2711
2725
  const [firstName, setFirstName] = React.useState("");
2712
2726
  const [lastName, setLastName] = React.useState("");
2727
+ const [schoolName, setSchoolName] = React.useState("");
2713
2728
  const [interests, setInterests] = React.useState({});
2714
2729
  return /* @__PURE__ */ React.createElement("div", { className: classes.wrapper }, /* @__PURE__ */ React.createElement(SimpleGrid, { maw: 960, ml: "auto", mr: "auto", cols: 1, spacing: 15, breakpoints: [{ maxWidth: "sm", cols: 1 }] }, /* @__PURE__ */ React.createElement(Group, { spacing: "sm" }, /* @__PURE__ */ React.createElement(
2715
2730
  Image,
@@ -2719,11 +2734,20 @@ const TrialRegistration = (props) => {
2719
2734
  fit: "contain",
2720
2735
  src: "https://cdn.localcivics.io/brand/l.png"
2721
2736
  }
2722
- ), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Title, { className: classes.title }, "Trial Educator"), /* @__PURE__ */ React.createElement(Text, { className: classes.description, mt: "sm" }, "Try out a few of the features we can bring to your classroom. No commitment required."))), /* @__PURE__ */ React.createElement("div", { className: classes.form }, /* @__PURE__ */ React.createElement(Group, { mb: "md", spacing: "md", grow: true }, /* @__PURE__ */ React.createElement(
2737
+ ), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Title, { className: classes.title }, "Are you an", " ", /* @__PURE__ */ React.createElement(
2738
+ Text,
2739
+ {
2740
+ component: "span",
2741
+ inherit: true,
2742
+ variant: "gradient",
2743
+ gradient: { from: "pink", to: "yellow" }
2744
+ },
2745
+ "educator"
2746
+ ), " ", "interested in a free trial?"), /* @__PURE__ */ React.createElement(Text, { className: classes.description, mt: "sm" }, "Try out a few of the features we can bring to your classroom. No commitment required."))), /* @__PURE__ */ React.createElement("div", { className: classes.form }, /* @__PURE__ */ React.createElement(SimpleGrid, { cols: 2, spacing: 15, breakpoints: [{ maxWidth: "sm", cols: 1 }] }, /* @__PURE__ */ React.createElement(
2723
2747
  TextInput,
2724
2748
  {
2725
2749
  label: "First Name",
2726
- placeholder: "John",
2750
+ placeholder: "Your first name",
2727
2751
  required: true,
2728
2752
  classNames: { input: classes.input, label: classes.inputLabel },
2729
2753
  onChange: (e) => setFirstName(e.target.value)
@@ -2732,11 +2756,19 @@ const TrialRegistration = (props) => {
2732
2756
  TextInput,
2733
2757
  {
2734
2758
  label: "Last Name",
2735
- placeholder: "Doe",
2759
+ placeholder: "Your last name",
2736
2760
  required: true,
2737
2761
  classNames: { input: classes.input, label: classes.inputLabel },
2738
2762
  onChange: (e) => setLastName(e.target.value)
2739
2763
  }
2764
+ ), /* @__PURE__ */ React.createElement(
2765
+ TextInput,
2766
+ {
2767
+ label: "School Name (Optional)",
2768
+ placeholder: "What school, if any, are you associated with?",
2769
+ classNames: { input: classes.input, label: classes.inputLabel },
2770
+ onChange: (e) => setSchoolName(e.target.value)
2771
+ }
2740
2772
  )), /* @__PURE__ */ React.createElement(Text, { size: 14, weight: 500, mb: "md", mt: "xl" }, "What are you interested in teaching?"), /* @__PURE__ */ React.createElement(
2741
2773
  SelectGrid,
2742
2774
  {
@@ -2746,7 +2778,8 @@ const TrialRegistration = (props) => {
2746
2778
  ), /* @__PURE__ */ React.createElement(Group, { position: "right", mt: "md" }, /* @__PURE__ */ React.createElement(
2747
2779
  Button,
2748
2780
  {
2749
- onClick: () => props.onBegin({ firstName, lastName, interests: Object.keys(interests) }),
2781
+ disabled: !firstName || !lastName,
2782
+ onClick: () => props.onBegin({ firstName, lastName, schoolName, interests: Object.keys(interests) }),
2750
2783
  className: classes.control
2751
2784
  },
2752
2785
  "Begin trial"