@local-civics/mgmt-ui 0.1.84 → 0.1.86
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 +1 -0
- package/dist/index.js +73 -38
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +73 -38
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
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
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
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
|
-
|
|
2417
|
-
lineHeight: 1
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
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
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
boxShadow: theme.shadows.lg
|
|
2436
|
+
control: {
|
|
2437
|
+
[theme.fn.smallerThan("xs")]: {
|
|
2438
|
+
flex: 1
|
|
2439
|
+
}
|
|
2431
2440
|
},
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
"
|
|
2435
|
-
|
|
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
|
-
|
|
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" }, "Community"), /* @__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.
|
|
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: "
|
|
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,
|
|
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
|
|
@@ -2680,8 +2694,10 @@ const useStyles$1 = core.createStyles((theme) => ({
|
|
|
2680
2694
|
},
|
|
2681
2695
|
title: {
|
|
2682
2696
|
fontFamily: `Greycliff CF, ${theme.fontFamily}`,
|
|
2697
|
+
fontSize: 40,
|
|
2683
2698
|
color: theme.white,
|
|
2684
|
-
lineHeight: 1
|
|
2699
|
+
lineHeight: 1,
|
|
2700
|
+
maxWidth: 450
|
|
2685
2701
|
},
|
|
2686
2702
|
description: {
|
|
2687
2703
|
color: theme.colors[theme.primaryColor][0],
|
|
@@ -2730,20 +2746,30 @@ const TrialRegistration = (props) => {
|
|
|
2730
2746
|
const { classes } = useStyles$1();
|
|
2731
2747
|
const [firstName, setFirstName] = React__namespace.useState("");
|
|
2732
2748
|
const [lastName, setLastName] = React__namespace.useState("");
|
|
2749
|
+
const [schoolName, setSchoolName] = React__namespace.useState("");
|
|
2733
2750
|
const [interests, setInterests] = React__namespace.useState({});
|
|
2734
2751
|
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
2752
|
core.Image,
|
|
2736
2753
|
{
|
|
2737
|
-
height:
|
|
2754
|
+
height: 150,
|
|
2738
2755
|
width: "auto",
|
|
2739
2756
|
fit: "contain",
|
|
2740
2757
|
src: "https://cdn.localcivics.io/brand/l.png"
|
|
2741
2758
|
}
|
|
2742
|
-
), /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement(core.Title, { className: classes.title }, "
|
|
2759
|
+
), /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement(core.Title, { className: classes.title }, "Are you an", " ", /* @__PURE__ */ React__namespace.createElement(
|
|
2760
|
+
core.Text,
|
|
2761
|
+
{
|
|
2762
|
+
component: "span",
|
|
2763
|
+
inherit: true,
|
|
2764
|
+
variant: "gradient",
|
|
2765
|
+
gradient: { from: "pink", to: "yellow" }
|
|
2766
|
+
},
|
|
2767
|
+
"educator"
|
|
2768
|
+
), " ", "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
2769
|
core.TextInput,
|
|
2744
2770
|
{
|
|
2745
2771
|
label: "First Name",
|
|
2746
|
-
placeholder: "
|
|
2772
|
+
placeholder: "Your first name",
|
|
2747
2773
|
required: true,
|
|
2748
2774
|
classNames: { input: classes.input, label: classes.inputLabel },
|
|
2749
2775
|
onChange: (e) => setFirstName(e.target.value)
|
|
@@ -2752,11 +2778,19 @@ const TrialRegistration = (props) => {
|
|
|
2752
2778
|
core.TextInput,
|
|
2753
2779
|
{
|
|
2754
2780
|
label: "Last Name",
|
|
2755
|
-
placeholder: "
|
|
2781
|
+
placeholder: "Your last name",
|
|
2756
2782
|
required: true,
|
|
2757
2783
|
classNames: { input: classes.input, label: classes.inputLabel },
|
|
2758
2784
|
onChange: (e) => setLastName(e.target.value)
|
|
2759
2785
|
}
|
|
2786
|
+
), /* @__PURE__ */ React__namespace.createElement(
|
|
2787
|
+
core.TextInput,
|
|
2788
|
+
{
|
|
2789
|
+
label: "School Name (Optional)",
|
|
2790
|
+
placeholder: "What school, if any, are you associated with?",
|
|
2791
|
+
classNames: { input: classes.input, label: classes.inputLabel },
|
|
2792
|
+
onChange: (e) => setSchoolName(e.target.value)
|
|
2793
|
+
}
|
|
2760
2794
|
)), /* @__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
2795
|
SelectGrid,
|
|
2762
2796
|
{
|
|
@@ -2766,7 +2800,8 @@ const TrialRegistration = (props) => {
|
|
|
2766
2800
|
), /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "right", mt: "md" }, /* @__PURE__ */ React__namespace.createElement(
|
|
2767
2801
|
core.Button,
|
|
2768
2802
|
{
|
|
2769
|
-
|
|
2803
|
+
disabled: !firstName || !lastName,
|
|
2804
|
+
onClick: () => props.onBegin({ firstName, lastName, schoolName, interests: Object.keys(interests) }),
|
|
2770
2805
|
className: classes.control
|
|
2771
2806
|
},
|
|
2772
2807
|
"Begin trial"
|