@local-civics/mgmt-ui 0.1.102 → 0.1.103
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 +57 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +58 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import { createStyles, Group, Avatar, Text, Box, Badge as Badge$1, ThemeIcon, Collapse, Navbar as Navbar$1, Center, Image, Code, Burger, ScrollArea,
|
|
3
|
+
import { createStyles, Group, Avatar, Text, Box, Badge as Badge$1, ThemeIcon, Collapse, Navbar as Navbar$1, Center, Image, Code, Burger, ScrollArea, Modal, Loader, Container, Button, Title, UnstyledButton, Card, SimpleGrid, Tabs as Tabs$1, Menu, ActionIcon, Grid, Table as Table$h, Stack as Stack$3, LoadingOverlay, Select, Autocomplete, Drawer, Divider, TextInput, Tooltip, Paper, Overlay, Anchor, Checkbox, createEmotionCache, MantineProvider, AppShell } from '@mantine/core';
|
|
4
4
|
import { IconChevronRight, IconChevronLeft, IconVideo, IconSwitchHorizontal, IconLogout, IconHome2, IconGauge, IconCategory2, IconAlbum, IconLambda, IconBuilding, IconBatteryEco, IconBooks, IconBackpack, IconChevronDown, IconClipboardCopy, IconTableExport, IconArrowLeft, IconPlaylistAdd, IconCheck, IconTrash, IconDownload, IconX, IconCloudUpload, IconInfoCircle, IconColorSwatch, IconPointer, IconScribble, IconSchool, IconPodium, IconBriefcase, IconPresentation, IconNews, IconTools, IconBrandInstagram, IconBrandLinkedin, IconBrandFacebook } from '@tabler/icons';
|
|
5
5
|
import { Link } from 'react-router-dom';
|
|
6
6
|
import { NotificationsProvider } from '@mantine/notifications';
|
|
@@ -42,7 +42,7 @@ var __objRest$2 = (source, exclude) => {
|
|
|
42
42
|
}
|
|
43
43
|
return target;
|
|
44
44
|
};
|
|
45
|
-
const useStyles$
|
|
45
|
+
const useStyles$q = createStyles((theme) => ({
|
|
46
46
|
user: {
|
|
47
47
|
display: "block",
|
|
48
48
|
width: "100%",
|
|
@@ -53,7 +53,7 @@ const useStyles$p = createStyles((theme) => ({
|
|
|
53
53
|
}));
|
|
54
54
|
function UserButton(_a) {
|
|
55
55
|
var _b = _a, { image, name, email, icon } = _b, others = __objRest$2(_b, ["image", "name", "email", "icon"]);
|
|
56
|
-
const { classes } = useStyles$
|
|
56
|
+
const { classes } = useStyles$q();
|
|
57
57
|
return /* @__PURE__ */ React.createElement(Group, __spreadValues$9({ className: classes.user }, others), /* @__PURE__ */ React.createElement(Avatar, { src: image, radius: "xl" }), /* @__PURE__ */ React.createElement("div", { style: { flex: 1 } }, /* @__PURE__ */ React.createElement(Text, { size: "sm", weight: 500 }, name), /* @__PURE__ */ React.createElement(Text, { color: "dimmed", size: "xs" }, email)));
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -64,7 +64,7 @@ const compact = (num) => {
|
|
|
64
64
|
}).format(num || 0);
|
|
65
65
|
};
|
|
66
66
|
|
|
67
|
-
const useStyles$
|
|
67
|
+
const useStyles$p = createStyles((theme, _params, getRef) => {
|
|
68
68
|
const icon = getRef("icon");
|
|
69
69
|
return {
|
|
70
70
|
control: {
|
|
@@ -117,7 +117,7 @@ const useStyles$o = createStyles((theme, _params, getRef) => {
|
|
|
117
117
|
};
|
|
118
118
|
});
|
|
119
119
|
function LinksGroup({ icon: Icon, href, label, initiallyOpened, links, active, notifications }) {
|
|
120
|
-
const { classes, theme, cx } = useStyles$
|
|
120
|
+
const { classes, theme, cx } = useStyles$p();
|
|
121
121
|
const hasLinks = Array.isArray(links) && links.length > 0;
|
|
122
122
|
const hasActiveLinks = Array.isArray(links) && links.map((l) => !!active && active === `${label}/${l.label}`).reduce((a, b) => a || b, false);
|
|
123
123
|
const [opened, setOpened] = useState(initiallyOpened || hasActiveLinks || false);
|
|
@@ -181,7 +181,7 @@ var __spreadValues$8 = (a, b) => {
|
|
|
181
181
|
return a;
|
|
182
182
|
};
|
|
183
183
|
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
184
|
-
const useStyles$
|
|
184
|
+
const useStyles$o = createStyles((theme, _params, getRef) => {
|
|
185
185
|
const icon = getRef("icon");
|
|
186
186
|
return {
|
|
187
187
|
navbar: {
|
|
@@ -280,7 +280,7 @@ const TRIAL_PAGES = [
|
|
|
280
280
|
"Badges"
|
|
281
281
|
];
|
|
282
282
|
function Navbar(props) {
|
|
283
|
-
const { classes, cx } = useStyles$
|
|
283
|
+
const { classes, cx } = useStyles$o();
|
|
284
284
|
const [burgerOpen, setBurgerOpen] = React.useState(false);
|
|
285
285
|
const toggle = () => setBurgerOpen(!burgerOpen);
|
|
286
286
|
const links = data.map((item) => {
|
|
@@ -323,6 +323,56 @@ function Navbar(props) {
|
|
|
323
323
|
} }, /* @__PURE__ */ React.createElement(IconLogout, { className: classes.linkIcon, stroke: 1.5 }), /* @__PURE__ */ React.createElement("span", null, "Logout"))))));
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
+
const useStyles$n = createStyles((theme) => ({
|
|
327
|
+
inner: {
|
|
328
|
+
paddingTop: theme.spacing.xl,
|
|
329
|
+
paddingBottom: theme.spacing.xl * 4
|
|
330
|
+
},
|
|
331
|
+
content: {
|
|
332
|
+
maxWidth: 600,
|
|
333
|
+
marginRight: theme.spacing.xl,
|
|
334
|
+
[theme.fn.smallerThan("md")]: {
|
|
335
|
+
maxWidth: "100%",
|
|
336
|
+
marginRight: 0
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
title: {
|
|
340
|
+
color: theme.colorScheme === "dark" ? theme.white : theme.black,
|
|
341
|
+
fontFamily: `Greycliff CF, ${theme.fontFamily}`,
|
|
342
|
+
fontSize: 44,
|
|
343
|
+
lineHeight: 1.2,
|
|
344
|
+
fontWeight: 900,
|
|
345
|
+
[theme.fn.smallerThan("xs")]: {
|
|
346
|
+
fontSize: 28
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
control: {
|
|
350
|
+
[theme.fn.smallerThan("xs")]: {
|
|
351
|
+
flex: 1
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
highlight: {
|
|
355
|
+
position: "relative",
|
|
356
|
+
backgroundColor: theme.fn.variant({ variant: "light", color: theme.primaryColor }).background,
|
|
357
|
+
borderRadius: theme.radius.sm,
|
|
358
|
+
padding: "4px 12px"
|
|
359
|
+
}
|
|
360
|
+
}));
|
|
361
|
+
const GettingStarted = (props) => {
|
|
362
|
+
const { classes } = useStyles$n();
|
|
363
|
+
return /* @__PURE__ */ React.createElement(
|
|
364
|
+
Modal,
|
|
365
|
+
{
|
|
366
|
+
centered: true,
|
|
367
|
+
fullScreen: true,
|
|
368
|
+
opened: props.opened,
|
|
369
|
+
onClose: () => props.onClose && props.onClose(),
|
|
370
|
+
size: "sm"
|
|
371
|
+
},
|
|
372
|
+
/* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, props.loading && /* @__PURE__ */ React.createElement(Center, { style: { height: 400 } }, /* @__PURE__ */ React.createElement(Loader, null)), !props.loading && /* @__PURE__ */ React.createElement(Container, null, /* @__PURE__ */ React.createElement(Group, { position: "center" }, /* @__PURE__ */ React.createElement("div", { className: classes.inner }, /* @__PURE__ */ React.createElement("div", { className: classes.content }, /* @__PURE__ */ React.createElement(Button, { radius: "xl", size: "md", className: classes.control }, "Skip tour"), /* @__PURE__ */ React.createElement(Title, { className: classes.title }, "An experience purpose built for educators like you!"), /* @__PURE__ */ React.createElement(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.createElement("video", { style: { marginTop: "20px", marginBottom: "20px" }, width: "600", height: "350", controls: true }, /* @__PURE__ */ React.createElement("source", { src: props.videoURL, type: "video/mp4" }), "Your browser does not support the video tag."))))))
|
|
373
|
+
);
|
|
374
|
+
};
|
|
375
|
+
|
|
326
376
|
const useStyles$m = createStyles((theme) => ({
|
|
327
377
|
title: {
|
|
328
378
|
fontSize: 34,
|
|
@@ -3050,5 +3100,5 @@ const useAccount = (account, accounts, onAccountChange) => {
|
|
|
3050
3100
|
};
|
|
3051
3101
|
};
|
|
3052
3102
|
|
|
3053
|
-
export { AdminProvider, App, Badge, Badges, Class, Classes, Dashboard, Home, Lesson, Lessons, Navbar, Organization, People, StartAnonymousLesson, Student, SwitchAccount, TrialHome, TrialRegistration };
|
|
3103
|
+
export { AdminProvider, App, Badge, Badges, Class, Classes, Dashboard, GettingStarted, Home, Lesson, Lessons, Navbar, Organization, People, StartAnonymousLesson, Student, SwitchAccount, TrialHome, TrialRegistration };
|
|
3054
3104
|
//# sourceMappingURL=index.mjs.map
|