@local-civics/mgmt-ui 0.1.161 → 0.1.163
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 +64 -50
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +67 -53
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -532,7 +532,7 @@ const useStyles$n = core.createStyles((theme) => ({
|
|
|
532
532
|
}));
|
|
533
533
|
const SplitButton$4 = (props) => {
|
|
534
534
|
const { classes, theme } = useStyles$n();
|
|
535
|
-
|
|
535
|
+
theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 5 : 6];
|
|
536
536
|
return /* @__PURE__ */ React__namespace.createElement(core.Group, { noWrap: true, spacing: 0 }, /* @__PURE__ */ React__namespace.createElement(
|
|
537
537
|
core.Button,
|
|
538
538
|
{
|
|
@@ -542,30 +542,21 @@ const SplitButton$4 = (props) => {
|
|
|
542
542
|
variant: "gradient"
|
|
543
543
|
},
|
|
544
544
|
"Preview"
|
|
545
|
-
), /* @__PURE__ */ React__namespace.createElement(
|
|
546
|
-
core.
|
|
547
|
-
{
|
|
548
|
-
variant: "gradient",
|
|
549
|
-
color: theme.primaryColor,
|
|
550
|
-
size: 36,
|
|
551
|
-
className: classes.menuControl
|
|
552
|
-
},
|
|
553
|
-
/* @__PURE__ */ React__namespace.createElement(icons.IconChevronDown, { size: 16, stroke: 1.5 })
|
|
554
|
-
)), /* @__PURE__ */ React__namespace.createElement(core.Menu.Dropdown, null, /* @__PURE__ */ React__namespace.createElement(
|
|
555
|
-
core.Menu.Item,
|
|
545
|
+
), /* @__PURE__ */ React__namespace.createElement(
|
|
546
|
+
core.Button,
|
|
556
547
|
{
|
|
557
|
-
|
|
548
|
+
leftIcon: /* @__PURE__ */ React__namespace.createElement(icons.IconClipboardCopy, { size: 14 }),
|
|
558
549
|
onClick: props.onCopyLinkClick
|
|
559
550
|
},
|
|
560
|
-
"Copy link"
|
|
551
|
+
"Copy class link"
|
|
561
552
|
), /* @__PURE__ */ React__namespace.createElement(
|
|
562
|
-
core.
|
|
553
|
+
core.Button,
|
|
563
554
|
{
|
|
564
|
-
|
|
555
|
+
leftIcon: /* @__PURE__ */ React__namespace.createElement(icons.IconTableExport, { size: 14 }),
|
|
565
556
|
onClick: props.onExportDataClick
|
|
566
557
|
},
|
|
567
558
|
"Export data (.csv)"
|
|
568
|
-
))
|
|
559
|
+
));
|
|
569
560
|
};
|
|
570
561
|
|
|
571
562
|
const useStyles$m = core.createStyles((theme) => ({
|
|
@@ -1647,6 +1638,10 @@ const useStyles$f = core.createStyles((theme) => ({
|
|
|
1647
1638
|
description: {
|
|
1648
1639
|
color: theme.white,
|
|
1649
1640
|
maxWidth: 220
|
|
1641
|
+
},
|
|
1642
|
+
code: {
|
|
1643
|
+
color: theme.white,
|
|
1644
|
+
maxWidth: 220
|
|
1650
1645
|
}
|
|
1651
1646
|
}));
|
|
1652
1647
|
const TenantBanner = (_a) => {
|
|
@@ -1655,15 +1650,31 @@ const TenantBanner = (_a) => {
|
|
|
1655
1650
|
description,
|
|
1656
1651
|
image,
|
|
1657
1652
|
style,
|
|
1658
|
-
className
|
|
1653
|
+
className,
|
|
1654
|
+
code
|
|
1659
1655
|
} = _b, others = __objRest$1(_b, [
|
|
1660
1656
|
"title",
|
|
1661
1657
|
"description",
|
|
1662
1658
|
"image",
|
|
1663
1659
|
"style",
|
|
1664
|
-
"className"
|
|
1660
|
+
"className",
|
|
1661
|
+
"code"
|
|
1665
1662
|
]);
|
|
1666
1663
|
const { classes, cx, theme } = useStyles$f();
|
|
1664
|
+
const handleCopy = async () => {
|
|
1665
|
+
if (!code)
|
|
1666
|
+
return;
|
|
1667
|
+
try {
|
|
1668
|
+
await navigator.clipboard.writeText(code);
|
|
1669
|
+
notifications.showNotification({
|
|
1670
|
+
title: "Copied!",
|
|
1671
|
+
message: "Community code copied to clipboard.",
|
|
1672
|
+
autoClose: 3e3
|
|
1673
|
+
});
|
|
1674
|
+
} catch (err) {
|
|
1675
|
+
console.error("Failed to copy code", err);
|
|
1676
|
+
}
|
|
1677
|
+
};
|
|
1667
1678
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
1668
1679
|
core.Card,
|
|
1669
1680
|
__spreadValues$5({
|
|
@@ -1679,7 +1690,20 @@ const TenantBanner = (_a) => {
|
|
|
1679
1690
|
zIndex: 0
|
|
1680
1691
|
}
|
|
1681
1692
|
),
|
|
1682
|
-
/* @__PURE__ */ React__namespace.createElement("div", { className: classes.content }, /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "lg", weight: 700, className: classes.title }, title), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "sm", className: classes.description }, description))
|
|
1693
|
+
/* @__PURE__ */ React__namespace.createElement("div", { className: classes.content }, /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "lg", weight: 700, className: classes.title }, title), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "sm", className: classes.description }, description), /* @__PURE__ */ React__namespace.createElement(core.Group, { mt: "sm", spacing: "xs" }, /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "sm", className: classes.code }, "Community Code: ", code || "\u2014"), code && /* @__PURE__ */ React__namespace.createElement(
|
|
1694
|
+
core.Button,
|
|
1695
|
+
{
|
|
1696
|
+
size: "xs",
|
|
1697
|
+
variant: "white",
|
|
1698
|
+
onClick: handleCopy,
|
|
1699
|
+
styles: {
|
|
1700
|
+
root: {
|
|
1701
|
+
backgroundColor: "rgba(255,255,255,0.9)"
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
},
|
|
1705
|
+
"Copy"
|
|
1706
|
+
)))
|
|
1683
1707
|
);
|
|
1684
1708
|
};
|
|
1685
1709
|
|
|
@@ -1696,7 +1720,8 @@ const Home = (props) => {
|
|
|
1696
1720
|
{
|
|
1697
1721
|
title: props.organization.name,
|
|
1698
1722
|
description: props.organization.description,
|
|
1699
|
-
image: props.organization.image
|
|
1723
|
+
image: props.organization.image,
|
|
1724
|
+
code: props.organization.accessCode
|
|
1700
1725
|
}
|
|
1701
1726
|
))), /* @__PURE__ */ React__namespace.createElement(core.Grid, { gutter: "md" }, /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, null, /* @__PURE__ */ React__namespace.createElement(
|
|
1702
1727
|
CardGradient,
|
|
@@ -1768,7 +1793,7 @@ const useStyles$e = core.createStyles((theme) => ({
|
|
|
1768
1793
|
}));
|
|
1769
1794
|
const SplitButton$2 = (props) => {
|
|
1770
1795
|
const { classes, theme } = useStyles$e();
|
|
1771
|
-
|
|
1796
|
+
theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 5 : 6];
|
|
1772
1797
|
return /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: "sm" }, /* @__PURE__ */ React__namespace.createElement(
|
|
1773
1798
|
core.Button,
|
|
1774
1799
|
{
|
|
@@ -1786,23 +1811,21 @@ const SplitButton$2 = (props) => {
|
|
|
1786
1811
|
variant: "gradient"
|
|
1787
1812
|
},
|
|
1788
1813
|
"Preview"
|
|
1789
|
-
), /* @__PURE__ */ React__namespace.createElement(
|
|
1790
|
-
core.
|
|
1814
|
+
), /* @__PURE__ */ React__namespace.createElement(
|
|
1815
|
+
core.Button,
|
|
1791
1816
|
{
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
size: 36,
|
|
1795
|
-
className: classes.menuControl
|
|
1817
|
+
leftIcon: /* @__PURE__ */ React__namespace.createElement(icons.IconClipboardCopy, { size: 14 }),
|
|
1818
|
+
onClick: props.onCopyLinkClick
|
|
1796
1819
|
},
|
|
1797
|
-
|
|
1798
|
-
)
|
|
1799
|
-
core.
|
|
1820
|
+
"Copy class link"
|
|
1821
|
+
), /* @__PURE__ */ React__namespace.createElement(
|
|
1822
|
+
core.Button,
|
|
1800
1823
|
{
|
|
1801
|
-
|
|
1824
|
+
leftIcon: /* @__PURE__ */ React__namespace.createElement(icons.IconTableExport, { size: 14 }),
|
|
1802
1825
|
onClick: props.onExportDataClick
|
|
1803
1826
|
},
|
|
1804
1827
|
"Export data (.csv)"
|
|
1805
|
-
)))
|
|
1828
|
+
)));
|
|
1806
1829
|
};
|
|
1807
1830
|
|
|
1808
1831
|
function Stack$2(props) {
|
|
@@ -3219,7 +3242,7 @@ const useStyles$1 = core.createStyles((theme) => ({
|
|
|
3219
3242
|
}));
|
|
3220
3243
|
const SplitButton = (props) => {
|
|
3221
3244
|
const { classes, theme } = useStyles$1();
|
|
3222
|
-
|
|
3245
|
+
theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 5 : 6];
|
|
3223
3246
|
return /* @__PURE__ */ React__namespace.createElement(core.Group, { noWrap: true, spacing: 0 }, /* @__PURE__ */ React__namespace.createElement(
|
|
3224
3247
|
core.Button,
|
|
3225
3248
|
{
|
|
@@ -3229,30 +3252,21 @@ const SplitButton = (props) => {
|
|
|
3229
3252
|
variant: "gradient"
|
|
3230
3253
|
},
|
|
3231
3254
|
"Preview"
|
|
3232
|
-
), /* @__PURE__ */ React__namespace.createElement(
|
|
3233
|
-
core.
|
|
3234
|
-
{
|
|
3235
|
-
variant: "gradient",
|
|
3236
|
-
color: theme.primaryColor,
|
|
3237
|
-
size: 36,
|
|
3238
|
-
className: classes.menuControl
|
|
3239
|
-
},
|
|
3240
|
-
/* @__PURE__ */ React__namespace.createElement(icons.IconChevronDown, { size: 16, stroke: 1.5 })
|
|
3241
|
-
)), /* @__PURE__ */ React__namespace.createElement(core.Menu.Dropdown, null, /* @__PURE__ */ React__namespace.createElement(
|
|
3242
|
-
core.Menu.Item,
|
|
3255
|
+
), /* @__PURE__ */ React__namespace.createElement(
|
|
3256
|
+
core.Button,
|
|
3243
3257
|
{
|
|
3244
|
-
|
|
3258
|
+
leftIcon: /* @__PURE__ */ React__namespace.createElement(icons.IconClipboardCopy, { size: 14 }),
|
|
3245
3259
|
onClick: props.onCopyLinkClick
|
|
3246
3260
|
},
|
|
3247
|
-
"Copy link"
|
|
3261
|
+
"Copy class link"
|
|
3248
3262
|
), /* @__PURE__ */ React__namespace.createElement(
|
|
3249
|
-
core.
|
|
3263
|
+
core.Button,
|
|
3250
3264
|
{
|
|
3251
|
-
|
|
3265
|
+
leftIcon: /* @__PURE__ */ React__namespace.createElement(icons.IconTableExport, { size: 14 }),
|
|
3252
3266
|
onClick: props.onExportDataClick
|
|
3253
3267
|
},
|
|
3254
3268
|
"Export data (.csv)"
|
|
3255
|
-
))
|
|
3269
|
+
));
|
|
3256
3270
|
};
|
|
3257
3271
|
|
|
3258
3272
|
function Stack(props) {
|