@local-civics/mgmt-ui 0.1.102 → 0.1.104
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 +17 -1
- package/dist/index.js +60 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +61 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,22 @@ interface NavbarProps {
|
|
|
23
23
|
}
|
|
24
24
|
declare function Navbar(props: NavbarProps): JSX.Element;
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* GettingStartedProps
|
|
28
|
+
*/
|
|
29
|
+
type GettingStartedProps = {
|
|
30
|
+
opened: boolean;
|
|
31
|
+
loading: boolean;
|
|
32
|
+
videoURL: string;
|
|
33
|
+
onClose: () => void;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* GettingStarted
|
|
37
|
+
* @param props
|
|
38
|
+
* @constructor
|
|
39
|
+
*/
|
|
40
|
+
declare const GettingStarted: (props: GettingStartedProps) => JSX.Element;
|
|
41
|
+
|
|
26
42
|
/**
|
|
27
43
|
* AccountItem
|
|
28
44
|
*/
|
|
@@ -667,4 +683,4 @@ type AppProps = {
|
|
|
667
683
|
*/
|
|
668
684
|
declare const App: (props: AppProps) => JSX.Element;
|
|
669
685
|
|
|
670
|
-
export { AccountItem, AdminProvider, AdminProviderProps, App, AppProps, Badge, BadgeClass, BadgeItem, BadgeProps, BadgeUserItem, Badges, BadgesProps, Class, ClassItem, ClassProps, Classes, ClassesProps, Dashboard, DashboardClass, DashboardProps, Home, HomeProps, Lesson, LessonClass, LessonItem, LessonProps, LessonUserItem, Lessons, LessonsProps, MemberItem, Navbar, NavbarProps, NewTrialRegistration, Organization, OrganizationProps, People, PeopleProps, StartAnonymousLesson, StartAnonymousLessonProps, Student, StudentProps, SwitchAccount, SwitchAccountProps, TrialHome, TrialHomeProps, TrialRegistration, TrialRegistrationProps, UserItem };
|
|
686
|
+
export { AccountItem, AdminProvider, AdminProviderProps, App, AppProps, Badge, BadgeClass, BadgeItem, BadgeProps, BadgeUserItem, Badges, BadgesProps, Class, ClassItem, ClassProps, Classes, ClassesProps, Dashboard, DashboardClass, DashboardProps, GettingStarted, GettingStartedProps, Home, HomeProps, Lesson, LessonClass, LessonItem, LessonProps, LessonUserItem, Lessons, LessonsProps, MemberItem, Navbar, NavbarProps, NewTrialRegistration, Organization, OrganizationProps, People, PeopleProps, StartAnonymousLesson, StartAnonymousLessonProps, Student, StudentProps, SwitchAccount, SwitchAccountProps, TrialHome, TrialHomeProps, TrialRegistration, TrialRegistrationProps, UserItem };
|
package/dist/index.js
CHANGED
|
@@ -62,7 +62,7 @@ var __objRest$2 = (source, exclude) => {
|
|
|
62
62
|
}
|
|
63
63
|
return target;
|
|
64
64
|
};
|
|
65
|
-
const useStyles$
|
|
65
|
+
const useStyles$q = core.createStyles((theme) => ({
|
|
66
66
|
user: {
|
|
67
67
|
display: "block",
|
|
68
68
|
width: "100%",
|
|
@@ -73,7 +73,7 @@ const useStyles$p = core.createStyles((theme) => ({
|
|
|
73
73
|
}));
|
|
74
74
|
function UserButton(_a) {
|
|
75
75
|
var _b = _a, { image, name, email, icon } = _b, others = __objRest$2(_b, ["image", "name", "email", "icon"]);
|
|
76
|
-
const { classes } = useStyles$
|
|
76
|
+
const { classes } = useStyles$q();
|
|
77
77
|
return /* @__PURE__ */ React__namespace.createElement(core.Group, __spreadValues$9({ className: classes.user }, others), /* @__PURE__ */ React__namespace.createElement(core.Avatar, { src: image, radius: "xl" }), /* @__PURE__ */ React__namespace.createElement("div", { style: { flex: 1 } }, /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "sm", weight: 500 }, name), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", size: "xs" }, email)));
|
|
78
78
|
}
|
|
79
79
|
|
|
@@ -84,7 +84,7 @@ const compact = (num) => {
|
|
|
84
84
|
}).format(num || 0);
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
-
const useStyles$
|
|
87
|
+
const useStyles$p = core.createStyles((theme, _params, getRef) => {
|
|
88
88
|
const icon = getRef("icon");
|
|
89
89
|
return {
|
|
90
90
|
control: {
|
|
@@ -137,7 +137,7 @@ const useStyles$o = core.createStyles((theme, _params, getRef) => {
|
|
|
137
137
|
};
|
|
138
138
|
});
|
|
139
139
|
function LinksGroup({ icon: Icon, href, label, initiallyOpened, links, active, notifications }) {
|
|
140
|
-
const { classes, theme, cx } = useStyles$
|
|
140
|
+
const { classes, theme, cx } = useStyles$p();
|
|
141
141
|
const hasLinks = Array.isArray(links) && links.length > 0;
|
|
142
142
|
const hasActiveLinks = Array.isArray(links) && links.map((l) => !!active && active === `${label}/${l.label}`).reduce((a, b) => a || b, false);
|
|
143
143
|
const [opened, setOpened] = React.useState(initiallyOpened || hasActiveLinks || false);
|
|
@@ -201,7 +201,7 @@ var __spreadValues$8 = (a, b) => {
|
|
|
201
201
|
return a;
|
|
202
202
|
};
|
|
203
203
|
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
204
|
-
const useStyles$
|
|
204
|
+
const useStyles$o = core.createStyles((theme, _params, getRef) => {
|
|
205
205
|
const icon = getRef("icon");
|
|
206
206
|
return {
|
|
207
207
|
navbar: {
|
|
@@ -300,7 +300,7 @@ const TRIAL_PAGES = [
|
|
|
300
300
|
"Badges"
|
|
301
301
|
];
|
|
302
302
|
function Navbar(props) {
|
|
303
|
-
const { classes, cx } = useStyles$
|
|
303
|
+
const { classes, cx } = useStyles$o();
|
|
304
304
|
const [burgerOpen, setBurgerOpen] = React__namespace.useState(false);
|
|
305
305
|
const toggle = () => setBurgerOpen(!burgerOpen);
|
|
306
306
|
const links = data.map((item) => {
|
|
@@ -343,6 +343,56 @@ function Navbar(props) {
|
|
|
343
343
|
} }, /* @__PURE__ */ React__namespace.createElement(icons.IconLogout, { className: classes.linkIcon, stroke: 1.5 }), /* @__PURE__ */ React__namespace.createElement("span", null, "Logout"))))));
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
+
const useStyles$n = core.createStyles((theme) => ({
|
|
347
|
+
inner: {
|
|
348
|
+
paddingTop: theme.spacing.xl,
|
|
349
|
+
paddingBottom: theme.spacing.xl * 4
|
|
350
|
+
},
|
|
351
|
+
content: {
|
|
352
|
+
maxWidth: 600,
|
|
353
|
+
marginRight: theme.spacing.xl,
|
|
354
|
+
[theme.fn.smallerThan("md")]: {
|
|
355
|
+
maxWidth: "100%",
|
|
356
|
+
marginRight: 0
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
title: {
|
|
360
|
+
color: theme.colorScheme === "dark" ? theme.white : theme.black,
|
|
361
|
+
fontFamily: `Greycliff CF, ${theme.fontFamily}`,
|
|
362
|
+
fontSize: 44,
|
|
363
|
+
lineHeight: 1.2,
|
|
364
|
+
fontWeight: 900,
|
|
365
|
+
[theme.fn.smallerThan("xs")]: {
|
|
366
|
+
fontSize: 28
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
control: {
|
|
370
|
+
[theme.fn.smallerThan("xs")]: {
|
|
371
|
+
flex: 1
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
highlight: {
|
|
375
|
+
position: "relative",
|
|
376
|
+
backgroundColor: theme.fn.variant({ variant: "light", color: theme.primaryColor }).background,
|
|
377
|
+
borderRadius: theme.radius.sm,
|
|
378
|
+
padding: "4px 12px"
|
|
379
|
+
}
|
|
380
|
+
}));
|
|
381
|
+
const GettingStarted = (props) => {
|
|
382
|
+
const { classes } = useStyles$n();
|
|
383
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
384
|
+
core.Modal,
|
|
385
|
+
{
|
|
386
|
+
centered: true,
|
|
387
|
+
fullScreen: true,
|
|
388
|
+
opened: props.opened,
|
|
389
|
+
onClose: () => props.onClose && props.onClose(),
|
|
390
|
+
size: "sm"
|
|
391
|
+
},
|
|
392
|
+
/* @__PURE__ */ React__namespace.createElement("div", { style: { position: "relative" } }, props.loading && /* @__PURE__ */ React__namespace.createElement(core.Center, { style: { height: 400 } }, /* @__PURE__ */ React__namespace.createElement(core.Loader, null)), !props.loading && /* @__PURE__ */ React__namespace.createElement(core.Container, null, /* @__PURE__ */ React__namespace.createElement(core.Group, { position: "center" }, /* @__PURE__ */ React__namespace.createElement("div", { className: classes.inner }, /* @__PURE__ */ React__namespace.createElement("div", { className: classes.content }, /* @__PURE__ */ React__namespace.createElement(core.Button, { onClick: props.onClose, radius: "xl", size: "md", className: classes.control }, "Skip tour"), /* @__PURE__ */ React__namespace.createElement(core.Title, { className: classes.title }, "An experience purpose built for educators like you!"), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", mt: "md" }, "Hello! We're excited that you chose try out a few of the tools that Local Civics can bring to your classroom. Watch this short video tour to get a sense of how to navigate around the platform."), /* @__PURE__ */ React__namespace.createElement("video", { style: { marginTop: "20px", marginBottom: "20px" }, width: "600", height: "350", controls: true }, /* @__PURE__ */ React__namespace.createElement("source", { src: props.videoURL, type: "video/mp4" }), "Your browser does not support the video tag."))))))
|
|
393
|
+
);
|
|
394
|
+
};
|
|
395
|
+
|
|
346
396
|
const useStyles$m = core.createStyles((theme) => ({
|
|
347
397
|
title: {
|
|
348
398
|
fontSize: 34,
|
|
@@ -2517,7 +2567,7 @@ const BadgeGrid = (props) => {
|
|
|
2517
2567
|
return /* @__PURE__ */ React__namespace.createElement(core.SimpleGrid, { cols: 4, breakpoints: [{ maxWidth: "sm", cols: 1 }, { maxWidth: "md", cols: 3 }] }, badges);
|
|
2518
2568
|
};
|
|
2519
2569
|
function TaskCard(props) {
|
|
2520
|
-
return /* @__PURE__ */ React__namespace.createElement(core.Card, { withBorder: true, radius: "md" }, /* @__PURE__ */ React__namespace.createElement(core.UnstyledButton, { component: reactRouterDom.Link, to: props.href, sx: { ":hover": { textDecoration: "underline" } } }, /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "md", weight: 500 }, props.title)), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "sm", color: "dimmed", mt: 5, mb: 25, h:
|
|
2570
|
+
return /* @__PURE__ */ React__namespace.createElement(core.Card, { withBorder: true, radius: "md" }, /* @__PURE__ */ React__namespace.createElement(core.UnstyledButton, { component: reactRouterDom.Link, to: props.href, sx: { ":hover": { textDecoration: "underline" } } }, /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "md", weight: 500 }, props.title)), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "sm", color: "dimmed", mt: 5, mb: 25, h: 125, sx: { overflowY: "scroll" } }, props.description), /* @__PURE__ */ React__namespace.createElement(
|
|
2521
2571
|
core.Button,
|
|
2522
2572
|
{
|
|
2523
2573
|
variant: "gradient",
|
|
@@ -2531,6 +2581,7 @@ function TaskCard(props) {
|
|
|
2531
2581
|
|
|
2532
2582
|
const useStyles$3 = core.createStyles((theme) => ({
|
|
2533
2583
|
action: {
|
|
2584
|
+
backgroundColor: "inherit",
|
|
2534
2585
|
":hover": {
|
|
2535
2586
|
textDecoration: "underline"
|
|
2536
2587
|
}
|
|
@@ -2573,7 +2624,7 @@ const TrialHome = (props) => {
|
|
|
2573
2624
|
description: `Welcome to your Local Civics Trial Account${props.firstName ? ", " + props.firstName : ""}!`,
|
|
2574
2625
|
image: "https://cdn.localcivics.io/hub/landing.jpg"
|
|
2575
2626
|
}
|
|
2576
|
-
)), /* @__PURE__ */ React__namespace.createElement(core.Title, { mb: 20, mt: 20, className: classes.title }, "Based on the tags you selected,
|
|
2627
|
+
)), /* @__PURE__ */ React__namespace.createElement(core.Title, { maw: 500, mb: 20, mt: 20, className: classes.title }, "Based on the tags you selected, check out these lessons to get started with your students!"), /* @__PURE__ */ React__namespace.createElement(BadgeGrid, { onAssign: props.onAssign, badges: props.badges })));
|
|
2577
2628
|
};
|
|
2578
2629
|
|
|
2579
2630
|
var __defProp$2 = Object.defineProperty;
|
|
@@ -3085,6 +3136,7 @@ exports.Badges = Badges;
|
|
|
3085
3136
|
exports.Class = Class;
|
|
3086
3137
|
exports.Classes = Classes;
|
|
3087
3138
|
exports.Dashboard = Dashboard;
|
|
3139
|
+
exports.GettingStarted = GettingStarted;
|
|
3088
3140
|
exports.Home = Home;
|
|
3089
3141
|
exports.Lesson = Lesson;
|
|
3090
3142
|
exports.Lessons = Lessons;
|