@popmenu/admin-ui 0.31.0 → 0.34.0

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.
@@ -1,2 +1,3 @@
1
- import { HTMLAttributes, PropsWithChildren } from 'react';
2
- export declare const PageSection: (props: PropsWithChildren<HTMLAttributes<HTMLElement>>) => JSX.Element;
1
+ import React from 'react';
2
+ import { PageSectionProps } from './PageSectionProps';
3
+ export declare const PageSection: React.ForwardRefExoticComponent<PageSectionProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,5 @@
1
+ import { HTMLAttributes, PropsWithChildren } from 'react';
2
+ export interface PageSectionProps extends PropsWithChildren<HTMLAttributes<HTMLElement>> {
3
+ /** Removes the background of the section. */
4
+ uncontained?: boolean;
5
+ }
@@ -0,0 +1,2 @@
1
+ import { PageSectionProps } from './PageSectionProps';
2
+ export declare const usePageSectionStyles: (props: PageSectionProps) => import("@material-ui/styles").ClassNameMap<string>;
package/build/index.es.js CHANGED
@@ -175,19 +175,19 @@ function __rest(s, e) {
175
175
  return t;
176
176
  }
177
177
 
178
- var _path$D;
178
+ var _path$F;
179
179
 
180
- function _extends$16() { _extends$16 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$16.apply(this, arguments); }
180
+ function _extends$1c() { _extends$1c = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1c.apply(this, arguments); }
181
181
 
182
182
  function SvgUser(props) {
183
- return /*#__PURE__*/React.createElement("svg", _extends$16({
183
+ return /*#__PURE__*/React.createElement("svg", _extends$1c({
184
184
  viewBox: "0 0 16 16",
185
185
  fill: "none",
186
186
  strokeLinecap: "round",
187
187
  strokeLinejoin: "round",
188
188
  width: "1em",
189
189
  height: "1em"
190
- }, props), _path$D || (_path$D = /*#__PURE__*/React.createElement("path", {
190
+ }, props), _path$F || (_path$F = /*#__PURE__*/React.createElement("path", {
191
191
  d: "M13.333 14v-1.333A2.667 2.667 0 0010.667 10H5.333a2.667 2.667 0 00-2.666 2.667V14M8 7.333A2.667 2.667 0 108 2a2.667 2.667 0 000 5.333z",
192
192
  stroke: "currentColor"
193
193
  })));
@@ -494,18 +494,7 @@ var useTypographyStyles = makeStyles$1(function (theme) {
494
494
  var Typography = forwardRef(function (props, ref) {
495
495
  props.weight; props.color; var restProps = __rest(props, ["weight", "color"]);
496
496
  var classes = useTypographyStyles(__assign({}, props));
497
- var variantMapping = {
498
- h1: 'h1',
499
- h2: 'h2',
500
- h3: 'h3',
501
- h4: 'h4',
502
- h5: 'h5',
503
- h6: 'h6',
504
- subtitle1: 'p',
505
- subtitle2: 'p',
506
- body1: 'p',
507
- body2: 'p',
508
- };
497
+ var variantMapping = { subtitle1: 'p' };
509
498
  return React__default.createElement(Typography$1, __assign({ ref: ref, classes: classes, variantMapping: variantMapping }, restProps));
510
499
  });
511
500
  Typography.displayName = 'Typography';
@@ -768,19 +757,19 @@ makeStyles(function (theme) { return ({
768
757
  },
769
758
  }); });
770
759
 
771
- var _g$I;
760
+ var _g$M;
772
761
 
773
- function _extends$1L() { _extends$1L = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1L.apply(this, arguments); }
762
+ function _extends$1R() { _extends$1R = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1R.apply(this, arguments); }
774
763
 
775
764
  function SvgCheckCircle(props) {
776
- return /*#__PURE__*/React.createElement("svg", _extends$1L({
765
+ return /*#__PURE__*/React.createElement("svg", _extends$1R({
777
766
  viewBox: "0 0 16 16",
778
767
  fill: "none",
779
768
  strokeLinecap: "round",
780
769
  strokeLinejoin: "round",
781
770
  width: "1em",
782
771
  height: "1em"
783
- }, props), _g$I || (_g$I = /*#__PURE__*/React.createElement("g", {
772
+ }, props), _g$M || (_g$M = /*#__PURE__*/React.createElement("g", {
784
773
  stroke: "currentColor"
785
774
  }, /*#__PURE__*/React.createElement("path", {
786
775
  d: "M14.667 7.387V8a6.667 6.667 0 11-3.954-6.093"
@@ -789,37 +778,37 @@ function SvgCheckCircle(props) {
789
778
  }))));
790
779
  }
791
780
 
792
- var _path$12;
781
+ var _path$14;
793
782
 
794
- function _extends$1J() { _extends$1J = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1J.apply(this, arguments); }
783
+ function _extends$1P() { _extends$1P = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1P.apply(this, arguments); }
795
784
 
796
785
  function SvgX(props) {
797
- return /*#__PURE__*/React.createElement("svg", _extends$1J({
786
+ return /*#__PURE__*/React.createElement("svg", _extends$1P({
798
787
  viewBox: "0 0 16 16",
799
788
  fill: "none",
800
789
  strokeLinecap: "round",
801
790
  strokeLinejoin: "round",
802
791
  width: "1em",
803
792
  height: "1em"
804
- }, props), _path$12 || (_path$12 = /*#__PURE__*/React.createElement("path", {
793
+ }, props), _path$14 || (_path$14 = /*#__PURE__*/React.createElement("path", {
805
794
  d: "M12 4l-8 8m0-8l8 8",
806
795
  stroke: "currentColor"
807
796
  })));
808
797
  }
809
798
 
810
- var _g$D;
799
+ var _g$H;
811
800
 
812
- function _extends$1z() { _extends$1z = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1z.apply(this, arguments); }
801
+ function _extends$1F() { _extends$1F = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1F.apply(this, arguments); }
813
802
 
814
803
  function SvgHelp(props) {
815
- return /*#__PURE__*/React.createElement("svg", _extends$1z({
804
+ return /*#__PURE__*/React.createElement("svg", _extends$1F({
816
805
  viewBox: "0 0 16 16",
817
806
  fill: "none",
818
807
  strokeLinecap: "round",
819
808
  strokeLinejoin: "round",
820
809
  width: "1em",
821
810
  height: "1em"
822
- }, props), _g$D || (_g$D = /*#__PURE__*/React.createElement("g", {
811
+ }, props), _g$H || (_g$H = /*#__PURE__*/React.createElement("g", {
823
812
  stroke: "currentColor"
824
813
  }, /*#__PURE__*/React.createElement("path", {
825
814
  d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333z"
@@ -828,73 +817,73 @@ function SvgHelp(props) {
828
817
  }))));
829
818
  }
830
819
 
831
- var _path$X;
820
+ var _path$Z;
832
821
 
833
- function _extends$1x() { _extends$1x = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1x.apply(this, arguments); }
822
+ function _extends$1D() { _extends$1D = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1D.apply(this, arguments); }
834
823
 
835
824
  function SvgInfo(props) {
836
- return /*#__PURE__*/React.createElement("svg", _extends$1x({
825
+ return /*#__PURE__*/React.createElement("svg", _extends$1D({
837
826
  viewBox: "0 0 16 16",
838
827
  fill: "none",
839
828
  strokeLinecap: "round",
840
829
  strokeLinejoin: "round",
841
830
  width: "1em",
842
831
  height: "1em"
843
- }, props), _path$X || (_path$X = /*#__PURE__*/React.createElement("path", {
832
+ }, props), _path$Z || (_path$Z = /*#__PURE__*/React.createElement("path", {
844
833
  d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zm0-4V8m0-2.667h.007",
845
834
  stroke: "currentColor"
846
835
  })));
847
836
  }
848
837
 
849
- var _path$B;
838
+ var _path$C;
850
839
 
851
- function _extends$13() { _extends$13 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$13.apply(this, arguments); }
840
+ function _extends$18() { _extends$18 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$18.apply(this, arguments); }
852
841
 
853
842
  function SvgError(props) {
854
- return /*#__PURE__*/React.createElement("svg", _extends$13({
843
+ return /*#__PURE__*/React.createElement("svg", _extends$18({
855
844
  viewBox: "0 0 16 16",
856
845
  fill: "none",
857
846
  strokeLinecap: "round",
858
847
  strokeLinejoin: "round",
859
848
  width: "1em",
860
849
  height: "1em"
861
- }, props), _path$B || (_path$B = /*#__PURE__*/React.createElement("path", {
850
+ }, props), _path$C || (_path$C = /*#__PURE__*/React.createElement("path", {
862
851
  d: "M5.24 1.333h5.52l3.907 3.907v5.52l-3.907 3.907H5.24L1.333 10.76V5.24L5.24 1.333zm2.76 4V8m0 2.666h.008",
863
852
  stroke: "currentColor"
864
853
  })));
865
854
  }
866
855
 
867
- var _path$A;
856
+ var _path$B;
868
857
 
869
- function _extends$12() { _extends$12 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$12.apply(this, arguments); }
858
+ function _extends$17() { _extends$17 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$17.apply(this, arguments); }
870
859
 
871
860
  function SvgWarning(props) {
872
- return /*#__PURE__*/React.createElement("svg", _extends$12({
861
+ return /*#__PURE__*/React.createElement("svg", _extends$17({
873
862
  viewBox: "0 0 16 16",
874
863
  fill: "none",
875
864
  strokeLinecap: "round",
876
865
  strokeLinejoin: "round",
877
866
  width: "1em",
878
867
  height: "1em"
879
- }, props), _path$A || (_path$A = /*#__PURE__*/React.createElement("path", {
868
+ }, props), _path$B || (_path$B = /*#__PURE__*/React.createElement("path", {
880
869
  d: "M6.86 2.573L1.213 12a1.334 1.334 0 001.14 2h11.294a1.332 1.332 0 001.14-2L9.14 2.573a1.333 1.333 0 00-2.28 0v0zM8 6v2.667m0 2.667h.007",
881
870
  stroke: "currentColor"
882
871
  })));
883
872
  }
884
873
 
885
- var _path$a;
874
+ var _path$b;
886
875
 
887
- function _extends$o() { _extends$o = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$o.apply(this, arguments); }
876
+ function _extends$r() { _extends$r = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$r.apply(this, arguments); }
888
877
 
889
878
  function SvgCircle(props) {
890
- return /*#__PURE__*/React.createElement("svg", _extends$o({
879
+ return /*#__PURE__*/React.createElement("svg", _extends$r({
891
880
  viewBox: "0 0 16 16",
892
881
  fill: "none",
893
882
  strokeLinecap: "round",
894
883
  strokeLinejoin: "round",
895
884
  width: "1em",
896
885
  height: "1em"
897
- }, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
886
+ }, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
898
887
  d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333z",
899
888
  stroke: "currentColor"
900
889
  })));
@@ -1618,11 +1607,22 @@ var PageBody = function (props) {
1618
1607
  return (React__default.createElement(Box, __assign$1({ py: 2, px: 5.5, maxWidth: 1100, width: "100%" }, restProps), children));
1619
1608
  };
1620
1609
 
1621
- var PageSection = function (props) {
1622
- var children = props.children, restProps = __rest$1(props, ["children"]);
1623
- return (React__default.createElement(Card, __assign$1({}, restProps),
1610
+ var usePageSectionStyles = makeStyles(function () { return ({
1611
+ root: {
1612
+ background: function (_a) {
1613
+ var uncontained = _a.uncontained;
1614
+ return (uncontained ? 'transparent' : undefined);
1615
+ },
1616
+ },
1617
+ }); });
1618
+
1619
+ var PageSection = forwardRef(function (props, ref) {
1620
+ var children = props.children; props.uncontained; var restProps = __rest$1(props, ["children", "uncontained"]);
1621
+ var classes = usePageSectionStyles(props);
1622
+ return (React__default.createElement(Card, __assign$1({ classes: { root: classes.root }, ref: ref }, restProps),
1624
1623
  React__default.createElement(CardContent, null, children)));
1625
- };
1624
+ });
1625
+ PageSection.displayName = 'PageSection';
1626
1626
 
1627
1627
  var PageSections = function (props) {
1628
1628
  var children = props.children, restProps = __rest$1(props, ["children"]);
@@ -1632,16 +1632,17 @@ var PageSections = function (props) {
1632
1632
  var PageSectionTitle = function (props) {
1633
1633
  var children = props.children, restProps = __rest$1(props, ["children"]);
1634
1634
  return (React__default.createElement(Box, __assign$1({}, restProps),
1635
- React__default.createElement(Typography, { gutterBottom: true, variant: "h4" }, children)));
1635
+ React__default.createElement(Typography, { gutterBottom: true, variant: "h5" }, children)));
1636
1636
  };
1637
1637
 
1638
1638
  var SettingsIndexCardGroup = function (props) {
1639
1639
  var children = props.children, restProps = __rest$1(props, ["children"]);
1640
- return (React__default.createElement(Box, __assign$1({ display: "grid", gridGap: 16, gridTemplateColumns: "repeat(auto-fit, minmax(250px, 1fr))" }, restProps), children));
1640
+ return (React__default.createElement(Box, __assign$1({ display: "grid", gridGap: 16, gridTemplateColumns: "repeat(auto-fill, minmax(250px, 1fr))" }, restProps), children));
1641
1641
  };
1642
1642
 
1643
1643
  var useSettingsIndexCardStyles = makeStyles$1(function (theme) { return ({
1644
1644
  cardRoot: {
1645
+ border: "1px solid " + theme.palette.grey[300],
1645
1646
  alignSelf: 'stretch',
1646
1647
  flexGrow: 1,
1647
1648
  '&:hover': {