@xyo-network/react-appbar 2.64.0 → 2.64.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. package/dist/browser/components/AppBar/Application.js +252 -6
  2. package/dist/browser/components/AppBar/Application.js.map +1 -1
  3. package/dist/browser/components/AppBar/index.js +264 -1
  4. package/dist/browser/components/AppBar/index.js.map +1 -1
  5. package/dist/browser/components/CollapsibleDrawer/CollapseToggle.js +13 -3
  6. package/dist/browser/components/CollapsibleDrawer/CollapseToggle.js.map +1 -1
  7. package/dist/browser/components/CollapsibleDrawer/CollapsibleDrawer.js +14 -4
  8. package/dist/browser/components/CollapsibleDrawer/CollapsibleDrawer.js.map +1 -1
  9. package/dist/browser/components/CollapsibleDrawer/index.js +72 -2
  10. package/dist/browser/components/CollapsibleDrawer/index.js.map +1 -1
  11. package/dist/browser/components/CollapsibleDrawer/storyExampleMenuData.js +4 -3
  12. package/dist/browser/components/CollapsibleDrawer/storyExampleMenuData.js.map +1 -1
  13. package/dist/browser/components/MobileSystemControls/SystemControls.js +117 -5
  14. package/dist/browser/components/MobileSystemControls/SystemControls.js.map +1 -1
  15. package/dist/browser/components/MobileSystemControls/SystemControlsRoot.js +57 -5
  16. package/dist/browser/components/MobileSystemControls/SystemControlsRoot.js.map +1 -1
  17. package/dist/browser/components/MobileSystemControls/SystemControlsType.js +1 -0
  18. package/dist/browser/components/MobileSystemControls/SystemControlsType.js.map +1 -1
  19. package/dist/browser/components/MobileSystemControls/SystemControlsUnstyled.js +35 -9
  20. package/dist/browser/components/MobileSystemControls/SystemControlsUnstyled.js.map +1 -1
  21. package/dist/browser/components/MobileSystemControls/controls/SystemControl.js +5 -5
  22. package/dist/browser/components/MobileSystemControls/controls/SystemControl.js.map +1 -1
  23. package/dist/browser/components/MobileSystemControls/controls/SystemControlText.js +3 -2
  24. package/dist/browser/components/MobileSystemControls/controls/SystemControlText.js.map +1 -1
  25. package/dist/browser/components/MobileSystemControls/controls/index.js +36 -2
  26. package/dist/browser/components/MobileSystemControls/controls/index.js.map +1 -1
  27. package/dist/browser/components/MobileSystemControls/index.js +131 -3
  28. package/dist/browser/components/MobileSystemControls/index.js.map +1 -1
  29. package/dist/browser/components/SearchBar/SearchBar.js +3 -2
  30. package/dist/browser/components/SearchBar/SearchBar.js.map +1 -1
  31. package/dist/browser/components/SearchBar/index.js +31 -1
  32. package/dist/browser/components/SearchBar/index.js.map +1 -1
  33. package/dist/browser/components/SiteMenu/Menu.js +144 -13
  34. package/dist/browser/components/SiteMenu/Menu.js.map +1 -1
  35. package/dist/browser/components/SiteMenu/MenuListItem/MenuListItemContainer.js +73 -13
  36. package/dist/browser/components/SiteMenu/MenuListItem/MenuListItemContainer.js.map +1 -1
  37. package/dist/browser/components/SiteMenu/MenuListItem/index.js +131 -1
  38. package/dist/browser/components/SiteMenu/MenuListItem/index.js.map +1 -1
  39. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/ListItemTooltip.js +3 -2
  40. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/ListItemTooltip.js.map +1 -1
  41. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/MenuIcon.js +3 -2
  42. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/MenuIcon.js.map +1 -1
  43. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/MenuListItem.js +3 -2
  44. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/MenuListItem.js.map +1 -1
  45. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/index.js +30 -3
  46. package/dist/browser/components/SiteMenu/MenuListItem/list-item-components/index.js.map +1 -1
  47. package/dist/browser/components/SiteMenu/MenuListItem/sub-nav/SubNavListItemCollapse.js +3 -2
  48. package/dist/browser/components/SiteMenu/MenuListItem/sub-nav/SubNavListItemCollapse.js.map +1 -1
  49. package/dist/browser/components/SiteMenu/MenuListItem/sub-nav/SubNavToggleIconButton.js +3 -2
  50. package/dist/browser/components/SiteMenu/MenuListItem/sub-nav/SubNavToggleIconButton.js.map +1 -1
  51. package/dist/browser/components/SiteMenu/MenuListItem/sub-nav/index.js +29 -2
  52. package/dist/browser/components/SiteMenu/MenuListItem/sub-nav/index.js.map +1 -1
  53. package/dist/browser/components/SiteMenu/MenuSection.js +138 -7
  54. package/dist/browser/components/SiteMenu/MenuSection.js.map +1 -1
  55. package/dist/browser/components/SiteMenu/hooks/index.js +34 -1
  56. package/dist/browser/components/SiteMenu/hooks/index.js.map +1 -1
  57. package/dist/browser/components/SiteMenu/hooks/useMenuItemsShared.js +12 -2
  58. package/dist/browser/components/SiteMenu/hooks/useMenuItemsShared.js.map +1 -1
  59. package/dist/browser/components/SiteMenu/index.js +209 -5
  60. package/dist/browser/components/SiteMenu/index.js.map +1 -1
  61. package/dist/browser/components/SiteMenu/lib/index.js +0 -2
  62. package/dist/browser/components/SiteMenu/lib/index.js.map +1 -1
  63. package/dist/browser/components/Toolbar/Context/ContextToolbar.js +45 -4
  64. package/dist/browser/components/Toolbar/Context/ContextToolbar.js.map +1 -1
  65. package/dist/browser/components/Toolbar/Context/Logo.js +3 -2
  66. package/dist/browser/components/Toolbar/Context/Logo.js.map +1 -1
  67. package/dist/browser/components/Toolbar/Context/LogoLinkEx.js +18 -7
  68. package/dist/browser/components/Toolbar/Context/LogoLinkEx.js.map +1 -1
  69. package/dist/browser/components/Toolbar/Context/index.js +50 -1
  70. package/dist/browser/components/Toolbar/Context/index.js.map +1 -1
  71. package/dist/browser/components/Toolbar/System/SystemToolbar.js +179 -8
  72. package/dist/browser/components/Toolbar/System/SystemToolbar.js.map +1 -1
  73. package/dist/browser/components/Toolbar/System/index.js +198 -1
  74. package/dist/browser/components/Toolbar/System/index.js.map +1 -1
  75. package/dist/browser/components/Toolbar/index.js +247 -2
  76. package/dist/browser/components/Toolbar/index.js.map +1 -1
  77. package/dist/browser/components/index.js +526 -6
  78. package/dist/browser/components/index.js.map +1 -1
  79. package/dist/browser/contexts/Collapsible/context.js +2 -1
  80. package/dist/browser/contexts/Collapsible/context.js.map +1 -1
  81. package/dist/browser/contexts/Collapsible/index.js +28 -3
  82. package/dist/browser/contexts/Collapsible/index.js.map +1 -1
  83. package/dist/browser/contexts/Collapsible/provider.js +9 -3
  84. package/dist/browser/contexts/Collapsible/provider.js.map +1 -1
  85. package/dist/browser/contexts/Collapsible/use.js +8 -2
  86. package/dist/browser/contexts/Collapsible/use.js.map +1 -1
  87. package/dist/browser/contexts/index.js +28 -1
  88. package/dist/browser/contexts/index.js.map +1 -1
  89. package/dist/browser/index.js +545 -2
  90. package/dist/browser/index.js.map +1 -1
  91. package/dist/docs.json +91 -91
  92. package/package.json +13 -13
@@ -1,10 +1,20 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ // src/components/CollapsibleDrawer/CollapseToggle.tsx
2
2
  import { Icon, useTheme } from "@mui/material";
3
3
  import { FlexRow } from "@xylabs/react-flexbox";
4
4
  import { useState } from "react";
5
5
  import { VscArrowSmallLeft, VscArrowSmallRight } from "react-icons/vsc/index.js";
6
- import { useCollapsible } from "../../contexts";
7
- const CollapseToggleFlex = (props) => {
6
+
7
+ // src/contexts/Collapsible/context.ts
8
+ import { createContextEx } from "@xyo-network/react-shared";
9
+ var CollapsibleContext = createContextEx();
10
+
11
+ // src/contexts/Collapsible/use.tsx
12
+ import { useContextEx } from "@xyo-network/react-shared";
13
+ var useCollapsible = () => useContextEx(CollapsibleContext, "Collapsible", false);
14
+
15
+ // src/components/CollapsibleDrawer/CollapseToggle.tsx
16
+ import { jsx } from "react/jsx-runtime";
17
+ var CollapseToggleFlex = (props) => {
8
18
  const { collapse, setCollapse, setCollapseEnd } = useCollapsible();
9
19
  const [hover, setHover] = useState(false);
10
20
  const theme = useTheme();
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/CollapsibleDrawer/CollapseToggle.tsx"],"sourcesContent":["import { Icon, useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\nimport { useState } from 'react'\n// eslint-disable-next-line import/no-internal-modules\nimport { VscArrowSmallLeft, VscArrowSmallRight } from 'react-icons/vsc/index.js'\n\nimport { useCollapsible } from '../../contexts'\n\nexport const CollapseToggleFlex: React.FC<FlexBoxProps> = (props) => {\n const { collapse, setCollapse, setCollapseEnd } = useCollapsible()\n const [hover, setHover] = useState(false)\n const theme = useTheme()\n\n const handleCollapseToggle = () => {\n setCollapse?.(!collapse)\n setCollapseEnd?.((previous) => (previous ? false : previous))\n }\n\n return (\n <FlexRow mt={2} py={2} justifyContent={collapse ? 'start' : 'center'} {...props}>\n <Icon\n onClick={handleCollapseToggle}\n onMouseEnter={() => setHover(true)}\n onMouseLeave={() => setHover(false)}\n fontSize={'large'}\n sx={{ color: hover ? theme.palette.secondary.main : 'inherit', cursor: 'pointer' }}\n >\n {!collapse ? <VscArrowSmallLeft /> : <VscArrowSmallRight />}\n </Icon>\n </FlexRow>\n )\n}\n"],"mappings":"AA2BqB;AA3BrB,SAAS,MAAM,gBAAgB;AAC/B,SAAuB,eAAe;AACtC,SAAS,gBAAgB;AAEzB,SAAS,mBAAmB,0BAA0B;AAEtD,SAAS,sBAAsB;AAExB,MAAM,qBAA6C,CAAC,UAAU;AACnE,QAAM,EAAE,UAAU,aAAa,eAAe,IAAI,eAAe;AACjE,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,KAAK;AACxC,QAAM,QAAQ,SAAS;AAEvB,QAAM,uBAAuB,MAAM;AACjC,kBAAc,CAAC,QAAQ;AACvB,qBAAiB,CAAC,aAAc,WAAW,QAAQ,QAAS;AAAA,EAC9D;AAEA,SACE,oBAAC,WAAQ,IAAI,GAAG,IAAI,GAAG,gBAAgB,WAAW,UAAU,UAAW,GAAG,OACxE;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,cAAc,MAAM,SAAS,IAAI;AAAA,MACjC,cAAc,MAAM,SAAS,KAAK;AAAA,MAClC,UAAU;AAAA,MACV,IAAI,EAAE,OAAO,QAAQ,MAAM,QAAQ,UAAU,OAAO,WAAW,QAAQ,UAAU;AAAA,MAEhF,WAAC,WAAW,oBAAC,qBAAkB,IAAK,oBAAC,sBAAmB;AAAA;AAAA,EAC3D,GACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../../../src/components/CollapsibleDrawer/CollapseToggle.tsx","../../../../src/contexts/Collapsible/context.ts","../../../../src/contexts/Collapsible/use.tsx"],"sourcesContent":["import { Icon, useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\nimport { useState } from 'react'\n// eslint-disable-next-line import/no-internal-modules\nimport { VscArrowSmallLeft, VscArrowSmallRight } from 'react-icons/vsc/index.js'\n\nimport { useCollapsible } from '../../contexts'\n\nexport const CollapseToggleFlex: React.FC<FlexBoxProps> = (props) => {\n const { collapse, setCollapse, setCollapseEnd } = useCollapsible()\n const [hover, setHover] = useState(false)\n const theme = useTheme()\n\n const handleCollapseToggle = () => {\n setCollapse?.(!collapse)\n setCollapseEnd?.((previous) => (previous ? false : previous))\n }\n\n return (\n <FlexRow mt={2} py={2} justifyContent={collapse ? 'start' : 'center'} {...props}>\n <Icon\n onClick={handleCollapseToggle}\n onMouseEnter={() => setHover(true)}\n onMouseLeave={() => setHover(false)}\n fontSize={'large'}\n sx={{ color: hover ? theme.palette.secondary.main : 'inherit', cursor: 'pointer' }}\n >\n {!collapse ? <VscArrowSmallLeft /> : <VscArrowSmallRight />}\n </Icon>\n </FlexRow>\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { CollapsibleState } from './State'\n\nexport const CollapsibleContext = createContextEx<CollapsibleState>()\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { CollapsibleContext } from './context'\n\nexport const useCollapsible = () => useContextEx(CollapsibleContext, 'Collapsible', false)\n"],"mappings":";AAAA,SAAS,MAAM,gBAAgB;AAC/B,SAAuB,eAAe;AACtC,SAAS,gBAAgB;AAEzB,SAAS,mBAAmB,0BAA0B;;;ACJtD,SAAS,uBAAuB;AAIzB,IAAM,qBAAqB,gBAAkC;;;ACJpE,SAAS,oBAAoB;AAItB,IAAM,iBAAiB,MAAM,aAAa,oBAAoB,eAAe,KAAK;;;AFuBpE;AAnBd,IAAM,qBAA6C,CAAC,UAAU;AACnE,QAAM,EAAE,UAAU,aAAa,eAAe,IAAI,eAAe;AACjE,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,KAAK;AACxC,QAAM,QAAQ,SAAS;AAEvB,QAAM,uBAAuB,MAAM;AACjC,kBAAc,CAAC,QAAQ;AACvB,qBAAiB,CAAC,aAAc,WAAW,QAAQ,QAAS;AAAA,EAC9D;AAEA,SACE,oBAAC,WAAQ,IAAI,GAAG,IAAI,GAAG,gBAAgB,WAAW,UAAU,UAAW,GAAG,OACxE;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,cAAc,MAAM,SAAS,IAAI;AAAA,MACjC,cAAc,MAAM,SAAS,KAAK;AAAA,MAClC,UAAU;AAAA,MACV,IAAI,EAAE,OAAO,QAAQ,MAAM,QAAQ,UAAU,OAAO,WAAW,QAAQ,UAAU;AAAA,MAEhF,WAAC,WAAW,oBAAC,qBAAkB,IAAK,oBAAC,sBAAmB;AAAA;AAAA,EAC3D,GACF;AAEJ;","names":[]}
@@ -1,7 +1,17 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ // src/components/CollapsibleDrawer/CollapsibleDrawer.tsx
2
2
  import { Collapse, styled, useTheme } from "@mui/material";
3
- import { useCollapsible } from "../../contexts";
4
- const CollapsibleDrawer = ({ children, sx, ...props }) => {
3
+
4
+ // src/contexts/Collapsible/context.ts
5
+ import { createContextEx } from "@xyo-network/react-shared";
6
+ var CollapsibleContext = createContextEx();
7
+
8
+ // src/contexts/Collapsible/use.tsx
9
+ import { useContextEx } from "@xyo-network/react-shared";
10
+ var useCollapsible = () => useContextEx(CollapsibleContext, "Collapsible", false);
11
+
12
+ // src/components/CollapsibleDrawer/CollapsibleDrawer.tsx
13
+ import { jsx } from "react/jsx-runtime";
14
+ var CollapsibleDrawer = ({ children, sx, ...props }) => {
5
15
  const { collapse, setCollapseEnd } = useCollapsible();
6
16
  const theme = useTheme();
7
17
  const collapsedSize = props.collapsedSize ?? theme.spacing(5);
@@ -23,7 +33,7 @@ const CollapsibleDrawer = ({ children, sx, ...props }) => {
23
33
  }
24
34
  );
25
35
  };
26
- const CollapsibleFlexInner = styled(Collapse)(() => ({
36
+ var CollapsibleFlexInner = styled(Collapse)(() => ({
27
37
  "& .MuiCollapse-wrapperInner": {
28
38
  display: "flex",
29
39
  flexDirection: "column"
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/CollapsibleDrawer/CollapsibleDrawer.tsx"],"sourcesContent":["import { Collapse, CollapseProps, styled, useTheme } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\nimport { useCollapsible } from '../../contexts'\n\nexport const CollapsibleDrawer: React.FC<WithChildren<CollapseProps>> = ({ children, sx, ...props }) => {\n const { collapse, setCollapseEnd } = useCollapsible()\n const theme = useTheme()\n\n const collapsedSize = props.collapsedSize ?? theme.spacing(5)\n\n return (\n <CollapsibleFlexInner\n in={!collapse}\n orientation=\"horizontal\"\n collapsedSize={collapsedSize}\n onExited={() => setCollapseEnd?.(true)}\n sx={{\n alignItems: 'start',\n display: 'flex',\n height: '100%',\n ...sx,\n }}\n {...props}\n >\n {children}\n </CollapsibleFlexInner>\n )\n}\n\nconst CollapsibleFlexInner = styled(Collapse)(() => ({\n '& .MuiCollapse-wrapperInner': {\n display: 'flex',\n flexDirection: 'column',\n },\n}))\n"],"mappings":"AAYI;AAZJ,SAAS,UAAyB,QAAQ,gBAAgB;AAG1D,SAAS,sBAAsB;AAExB,MAAM,oBAA2D,CAAC,EAAE,UAAU,IAAI,GAAG,MAAM,MAAM;AACtG,QAAM,EAAE,UAAU,eAAe,IAAI,eAAe;AACpD,QAAM,QAAQ,SAAS;AAEvB,QAAM,gBAAgB,MAAM,iBAAiB,MAAM,QAAQ,CAAC;AAE5D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI,CAAC;AAAA,MACL,aAAY;AAAA,MACZ;AAAA,MACA,UAAU,MAAM,iBAAiB,IAAI;AAAA,MACrC,IAAI;AAAA,QACF,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,GAAG;AAAA,MACL;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AAEA,MAAM,uBAAuB,OAAO,QAAQ,EAAE,OAAO;AAAA,EACnD,+BAA+B;AAAA,IAC7B,SAAS;AAAA,IACT,eAAe;AAAA,EACjB;AACF,EAAE;","names":[]}
1
+ {"version":3,"sources":["../../../../src/components/CollapsibleDrawer/CollapsibleDrawer.tsx","../../../../src/contexts/Collapsible/context.ts","../../../../src/contexts/Collapsible/use.tsx"],"sourcesContent":["import { Collapse, CollapseProps, styled, useTheme } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\nimport { useCollapsible } from '../../contexts'\n\nexport const CollapsibleDrawer: React.FC<WithChildren<CollapseProps>> = ({ children, sx, ...props }) => {\n const { collapse, setCollapseEnd } = useCollapsible()\n const theme = useTheme()\n\n const collapsedSize = props.collapsedSize ?? theme.spacing(5)\n\n return (\n <CollapsibleFlexInner\n in={!collapse}\n orientation=\"horizontal\"\n collapsedSize={collapsedSize}\n onExited={() => setCollapseEnd?.(true)}\n sx={{\n alignItems: 'start',\n display: 'flex',\n height: '100%',\n ...sx,\n }}\n {...props}\n >\n {children}\n </CollapsibleFlexInner>\n )\n}\n\nconst CollapsibleFlexInner = styled(Collapse)(() => ({\n '& .MuiCollapse-wrapperInner': {\n display: 'flex',\n flexDirection: 'column',\n },\n}))\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { CollapsibleState } from './State'\n\nexport const CollapsibleContext = createContextEx<CollapsibleState>()\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { CollapsibleContext } from './context'\n\nexport const useCollapsible = () => useContextEx(CollapsibleContext, 'Collapsible', false)\n"],"mappings":";AAAA,SAAS,UAAyB,QAAQ,gBAAgB;;;ACA1D,SAAS,uBAAuB;AAIzB,IAAM,qBAAqB,gBAAkC;;;ACJpE,SAAS,oBAAoB;AAItB,IAAM,iBAAiB,MAAM,aAAa,oBAAoB,eAAe,KAAK;;;AFQrF;AAPG,IAAM,oBAA2D,CAAC,EAAE,UAAU,IAAI,GAAG,MAAM,MAAM;AACtG,QAAM,EAAE,UAAU,eAAe,IAAI,eAAe;AACpD,QAAM,QAAQ,SAAS;AAEvB,QAAM,gBAAgB,MAAM,iBAAiB,MAAM,QAAQ,CAAC;AAE5D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI,CAAC;AAAA,MACL,aAAY;AAAA,MACZ;AAAA,MACA,UAAU,MAAM,iBAAiB,IAAI;AAAA,MACrC,IAAI;AAAA,QACF,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,GAAG;AAAA,MACL;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AAEA,IAAM,uBAAuB,OAAO,QAAQ,EAAE,OAAO;AAAA,EACnD,+BAA+B;AAAA,IAC7B,SAAS;AAAA,IACT,eAAe;AAAA,EACjB;AACF,EAAE;","names":[]}
@@ -1,3 +1,73 @@
1
- export * from "./CollapseToggle";
2
- export * from "./CollapsibleDrawer";
1
+ // src/components/CollapsibleDrawer/CollapseToggle.tsx
2
+ import { Icon, useTheme } from "@mui/material";
3
+ import { FlexRow } from "@xylabs/react-flexbox";
4
+ import { useState } from "react";
5
+ import { VscArrowSmallLeft, VscArrowSmallRight } from "react-icons/vsc/index.js";
6
+
7
+ // src/contexts/Collapsible/context.ts
8
+ import { createContextEx } from "@xyo-network/react-shared";
9
+ var CollapsibleContext = createContextEx();
10
+
11
+ // src/contexts/Collapsible/use.tsx
12
+ import { useContextEx } from "@xyo-network/react-shared";
13
+ var useCollapsible = () => useContextEx(CollapsibleContext, "Collapsible", false);
14
+
15
+ // src/components/CollapsibleDrawer/CollapseToggle.tsx
16
+ import { jsx } from "react/jsx-runtime";
17
+ var CollapseToggleFlex = (props) => {
18
+ const { collapse, setCollapse, setCollapseEnd } = useCollapsible();
19
+ const [hover, setHover] = useState(false);
20
+ const theme = useTheme();
21
+ const handleCollapseToggle = () => {
22
+ setCollapse?.(!collapse);
23
+ setCollapseEnd?.((previous) => previous ? false : previous);
24
+ };
25
+ return /* @__PURE__ */ jsx(FlexRow, { mt: 2, py: 2, justifyContent: collapse ? "start" : "center", ...props, children: /* @__PURE__ */ jsx(
26
+ Icon,
27
+ {
28
+ onClick: handleCollapseToggle,
29
+ onMouseEnter: () => setHover(true),
30
+ onMouseLeave: () => setHover(false),
31
+ fontSize: "large",
32
+ sx: { color: hover ? theme.palette.secondary.main : "inherit", cursor: "pointer" },
33
+ children: !collapse ? /* @__PURE__ */ jsx(VscArrowSmallLeft, {}) : /* @__PURE__ */ jsx(VscArrowSmallRight, {})
34
+ }
35
+ ) });
36
+ };
37
+
38
+ // src/components/CollapsibleDrawer/CollapsibleDrawer.tsx
39
+ import { Collapse, styled, useTheme as useTheme2 } from "@mui/material";
40
+ import { jsx as jsx2 } from "react/jsx-runtime";
41
+ var CollapsibleDrawer = ({ children, sx, ...props }) => {
42
+ const { collapse, setCollapseEnd } = useCollapsible();
43
+ const theme = useTheme2();
44
+ const collapsedSize = props.collapsedSize ?? theme.spacing(5);
45
+ return /* @__PURE__ */ jsx2(
46
+ CollapsibleFlexInner,
47
+ {
48
+ in: !collapse,
49
+ orientation: "horizontal",
50
+ collapsedSize,
51
+ onExited: () => setCollapseEnd?.(true),
52
+ sx: {
53
+ alignItems: "start",
54
+ display: "flex",
55
+ height: "100%",
56
+ ...sx
57
+ },
58
+ ...props,
59
+ children
60
+ }
61
+ );
62
+ };
63
+ var CollapsibleFlexInner = styled(Collapse)(() => ({
64
+ "& .MuiCollapse-wrapperInner": {
65
+ display: "flex",
66
+ flexDirection: "column"
67
+ }
68
+ }));
69
+ export {
70
+ CollapseToggleFlex,
71
+ CollapsibleDrawer
72
+ };
3
73
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/CollapsibleDrawer/index.ts"],"sourcesContent":["export * from './CollapseToggle'\nexport * from './CollapsibleDrawer'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../../../src/components/CollapsibleDrawer/CollapseToggle.tsx","../../../../src/contexts/Collapsible/context.ts","../../../../src/contexts/Collapsible/use.tsx","../../../../src/components/CollapsibleDrawer/CollapsibleDrawer.tsx"],"sourcesContent":["import { Icon, useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\nimport { useState } from 'react'\n// eslint-disable-next-line import/no-internal-modules\nimport { VscArrowSmallLeft, VscArrowSmallRight } from 'react-icons/vsc/index.js'\n\nimport { useCollapsible } from '../../contexts'\n\nexport const CollapseToggleFlex: React.FC<FlexBoxProps> = (props) => {\n const { collapse, setCollapse, setCollapseEnd } = useCollapsible()\n const [hover, setHover] = useState(false)\n const theme = useTheme()\n\n const handleCollapseToggle = () => {\n setCollapse?.(!collapse)\n setCollapseEnd?.((previous) => (previous ? false : previous))\n }\n\n return (\n <FlexRow mt={2} py={2} justifyContent={collapse ? 'start' : 'center'} {...props}>\n <Icon\n onClick={handleCollapseToggle}\n onMouseEnter={() => setHover(true)}\n onMouseLeave={() => setHover(false)}\n fontSize={'large'}\n sx={{ color: hover ? theme.palette.secondary.main : 'inherit', cursor: 'pointer' }}\n >\n {!collapse ? <VscArrowSmallLeft /> : <VscArrowSmallRight />}\n </Icon>\n </FlexRow>\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { CollapsibleState } from './State'\n\nexport const CollapsibleContext = createContextEx<CollapsibleState>()\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { CollapsibleContext } from './context'\n\nexport const useCollapsible = () => useContextEx(CollapsibleContext, 'Collapsible', false)\n","import { Collapse, CollapseProps, styled, useTheme } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\nimport { useCollapsible } from '../../contexts'\n\nexport const CollapsibleDrawer: React.FC<WithChildren<CollapseProps>> = ({ children, sx, ...props }) => {\n const { collapse, setCollapseEnd } = useCollapsible()\n const theme = useTheme()\n\n const collapsedSize = props.collapsedSize ?? theme.spacing(5)\n\n return (\n <CollapsibleFlexInner\n in={!collapse}\n orientation=\"horizontal\"\n collapsedSize={collapsedSize}\n onExited={() => setCollapseEnd?.(true)}\n sx={{\n alignItems: 'start',\n display: 'flex',\n height: '100%',\n ...sx,\n }}\n {...props}\n >\n {children}\n </CollapsibleFlexInner>\n )\n}\n\nconst CollapsibleFlexInner = styled(Collapse)(() => ({\n '& .MuiCollapse-wrapperInner': {\n display: 'flex',\n flexDirection: 'column',\n },\n}))\n"],"mappings":";AAAA,SAAS,MAAM,gBAAgB;AAC/B,SAAuB,eAAe;AACtC,SAAS,gBAAgB;AAEzB,SAAS,mBAAmB,0BAA0B;;;ACJtD,SAAS,uBAAuB;AAIzB,IAAM,qBAAqB,gBAAkC;;;ACJpE,SAAS,oBAAoB;AAItB,IAAM,iBAAiB,MAAM,aAAa,oBAAoB,eAAe,KAAK;;;AFuBpE;AAnBd,IAAM,qBAA6C,CAAC,UAAU;AACnE,QAAM,EAAE,UAAU,aAAa,eAAe,IAAI,eAAe;AACjE,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,KAAK;AACxC,QAAM,QAAQ,SAAS;AAEvB,QAAM,uBAAuB,MAAM;AACjC,kBAAc,CAAC,QAAQ;AACvB,qBAAiB,CAAC,aAAc,WAAW,QAAQ,QAAS;AAAA,EAC9D;AAEA,SACE,oBAAC,WAAQ,IAAI,GAAG,IAAI,GAAG,gBAAgB,WAAW,UAAU,UAAW,GAAG,OACxE;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,cAAc,MAAM,SAAS,IAAI;AAAA,MACjC,cAAc,MAAM,SAAS,KAAK;AAAA,MAClC,UAAU;AAAA,MACV,IAAI,EAAE,OAAO,QAAQ,MAAM,QAAQ,UAAU,OAAO,WAAW,QAAQ,UAAU;AAAA,MAEhF,WAAC,WAAW,oBAAC,qBAAkB,IAAK,oBAAC,sBAAmB;AAAA;AAAA,EAC3D,GACF;AAEJ;;;AG/BA,SAAS,UAAyB,QAAQ,YAAAA,iBAAgB;AAYtD,gBAAAC,YAAA;AAPG,IAAM,oBAA2D,CAAC,EAAE,UAAU,IAAI,GAAG,MAAM,MAAM;AACtG,QAAM,EAAE,UAAU,eAAe,IAAI,eAAe;AACpD,QAAM,QAAQC,UAAS;AAEvB,QAAM,gBAAgB,MAAM,iBAAiB,MAAM,QAAQ,CAAC;AAE5D,SACE,gBAAAD;AAAA,IAAC;AAAA;AAAA,MACC,IAAI,CAAC;AAAA,MACL,aAAY;AAAA,MACZ;AAAA,MACA,UAAU,MAAM,iBAAiB,IAAI;AAAA,MACrC,IAAI;AAAA,QACF,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,GAAG;AAAA,MACL;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AAEA,IAAM,uBAAuB,OAAO,QAAQ,EAAE,OAAO;AAAA,EACnD,+BAA+B;AAAA,IAC7B,SAAS;AAAA,IACT,eAAe;AAAA,EACjB;AACF,EAAE;","names":["useTheme","jsx","useTheme"]}
@@ -1,4 +1,4 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ // src/components/CollapsibleDrawer/storyExampleMenuData.tsx
2
2
  import {
3
3
  VscAccount,
4
4
  VscAdd,
@@ -13,7 +13,8 @@ import {
13
13
  VscSymbolNamespace,
14
14
  VscTable
15
15
  } from "react-icons/vsc/index.js";
16
- const menuDataTop = [
16
+ import { jsx } from "react/jsx-runtime";
17
+ var menuDataTop = [
17
18
  {
18
19
  icon: /* @__PURE__ */ jsx(VscGlobe, { fontSize: "body1" }),
19
20
  primary: "Explore",
@@ -50,7 +51,7 @@ const menuDataTop = [
50
51
  tooltip: "The most recent blocks seen in the in temp archive on your current network."
51
52
  }
52
53
  ];
53
- const menuDataBottom = [
54
+ var menuDataBottom = [
54
55
  {
55
56
  icon: /* @__PURE__ */ jsx(VscGraphLine, { fontSize: "body1" }),
56
57
  primary: "Statistics",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/CollapsibleDrawer/storyExampleMenuData.tsx"],"sourcesContent":["import {\n VscAccount,\n VscAdd,\n VscDashboard,\n VscGlobe,\n VscGraph,\n VscGraphLine,\n VscJson,\n VscServer,\n VscSettingsGear,\n VscSymbolMethod,\n VscSymbolNamespace,\n VscTable,\n // eslint-disable-next-line import/no-internal-modules\n} from 'react-icons/vsc/index.js'\n\nimport { MenuListItemProps } from '../SiteMenu'\n\nexport const menuDataTop: MenuListItemProps[] = [\n {\n icon: <VscGlobe fontSize=\"body1\" />,\n primary: 'Explore',\n to: '',\n tooltip: 'View global archivist data on a world map.',\n },\n {\n icon: <VscSymbolMethod fontSize=\"body1\" />,\n primary: 'Blocks',\n to: '',\n tooltip: 'The most recent blocks seen in the in temp archive on your current network.',\n },\n {\n icon: <VscSymbolNamespace fontSize=\"body1\" />,\n primary: 'Payloads',\n to: '',\n tooltip: 'The most recent blocks seen in the in temp archive on your current network.',\n },\n {\n icon: <VscGraph fontSize=\"body1\" />,\n primary: 'Queries',\n to: '',\n tooltip: 'The most recent blocks seen in the in temp archive on your current network.',\n },\n {\n icon: <VscServer fontSize=\"body1\" />,\n primary: 'Archives',\n subNavListItems: [\n { icon: <VscDashboard fontSize=\"body2\" />, primary: 'Dashboard', to: '', tooltip: 'View data for all archives on this network.' },\n { icon: <VscAdd fontSize=\"body2\" />, primary: 'Create Archive', to: '', tooltip: 'Create a new archive on this network.' },\n { icon: <VscTable fontSize=\"body2\" />, primary: 'Archive Table', to: '', tooltip: 'View all archives on this network as a table.' },\n ],\n to: '',\n tooltip: 'The most recent blocks seen in the in temp archive on your current network.',\n },\n]\n\nexport const menuDataBottom: MenuListItemProps[] = [\n {\n icon: <VscGraphLine fontSize=\"body1\" />,\n primary: 'Statistics',\n to: '',\n tooltip: 'The most recent blocks seen in the in temp archive on your current network.',\n },\n {\n icon: <VscJson fontSize=\"body1\" />,\n primary: 'Schema',\n to: '',\n tooltip: 'The most recent blocks seen in the in temp archive on your current network.',\n },\n {\n icon: <VscAccount fontSize=\"body1\" />,\n primary: 'Account',\n to: '',\n tooltip: 'The most recent blocks seen in the in temp archive on your current network.',\n },\n {\n icon: <VscSettingsGear fontSize=\"body1\" />,\n primary: 'Settings',\n to: '',\n tooltip: 'The most recent blocks seen in the in temp archive on your current network.',\n },\n]\n"],"mappings":"AAoBU;AApBV;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAIA,MAAM,cAAmC;AAAA,EAC9C;AAAA,IACE,MAAM,oBAAC,YAAS,UAAS,SAAQ;AAAA,IACjC,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM,oBAAC,mBAAgB,UAAS,SAAQ;AAAA,IACxC,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM,oBAAC,sBAAmB,UAAS,SAAQ;AAAA,IAC3C,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM,oBAAC,YAAS,UAAS,SAAQ;AAAA,IACjC,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM,oBAAC,aAAU,UAAS,SAAQ;AAAA,IAClC,SAAS;AAAA,IACT,iBAAiB;AAAA,MACf,EAAE,MAAM,oBAAC,gBAAa,UAAS,SAAQ,GAAI,SAAS,aAAa,IAAI,IAAI,SAAS,8CAA8C;AAAA,MAChI,EAAE,MAAM,oBAAC,UAAO,UAAS,SAAQ,GAAI,SAAS,kBAAkB,IAAI,IAAI,SAAS,wCAAwC;AAAA,MACzH,EAAE,MAAM,oBAAC,YAAS,UAAS,SAAQ,GAAI,SAAS,iBAAiB,IAAI,IAAI,SAAS,gDAAgD;AAAA,IACpI;AAAA,IACA,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AACF;AAEO,MAAM,iBAAsC;AAAA,EACjD;AAAA,IACE,MAAM,oBAAC,gBAAa,UAAS,SAAQ;AAAA,IACrC,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM,oBAAC,WAAQ,UAAS,SAAQ;AAAA,IAChC,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM,oBAAC,cAAW,UAAS,SAAQ;AAAA,IACnC,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM,oBAAC,mBAAgB,UAAS,SAAQ;AAAA,IACxC,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../../src/components/CollapsibleDrawer/storyExampleMenuData.tsx"],"sourcesContent":["import {\n VscAccount,\n VscAdd,\n VscDashboard,\n VscGlobe,\n VscGraph,\n VscGraphLine,\n VscJson,\n VscServer,\n VscSettingsGear,\n VscSymbolMethod,\n VscSymbolNamespace,\n VscTable,\n // eslint-disable-next-line import/no-internal-modules\n} from 'react-icons/vsc/index.js'\n\nimport { MenuListItemProps } from '../SiteMenu'\n\nexport const menuDataTop: MenuListItemProps[] = [\n {\n icon: <VscGlobe fontSize=\"body1\" />,\n primary: 'Explore',\n to: '',\n tooltip: 'View global archivist data on a world map.',\n },\n {\n icon: <VscSymbolMethod fontSize=\"body1\" />,\n primary: 'Blocks',\n to: '',\n tooltip: 'The most recent blocks seen in the in temp archive on your current network.',\n },\n {\n icon: <VscSymbolNamespace fontSize=\"body1\" />,\n primary: 'Payloads',\n to: '',\n tooltip: 'The most recent blocks seen in the in temp archive on your current network.',\n },\n {\n icon: <VscGraph fontSize=\"body1\" />,\n primary: 'Queries',\n to: '',\n tooltip: 'The most recent blocks seen in the in temp archive on your current network.',\n },\n {\n icon: <VscServer fontSize=\"body1\" />,\n primary: 'Archives',\n subNavListItems: [\n { icon: <VscDashboard fontSize=\"body2\" />, primary: 'Dashboard', to: '', tooltip: 'View data for all archives on this network.' },\n { icon: <VscAdd fontSize=\"body2\" />, primary: 'Create Archive', to: '', tooltip: 'Create a new archive on this network.' },\n { icon: <VscTable fontSize=\"body2\" />, primary: 'Archive Table', to: '', tooltip: 'View all archives on this network as a table.' },\n ],\n to: '',\n tooltip: 'The most recent blocks seen in the in temp archive on your current network.',\n },\n]\n\nexport const menuDataBottom: MenuListItemProps[] = [\n {\n icon: <VscGraphLine fontSize=\"body1\" />,\n primary: 'Statistics',\n to: '',\n tooltip: 'The most recent blocks seen in the in temp archive on your current network.',\n },\n {\n icon: <VscJson fontSize=\"body1\" />,\n primary: 'Schema',\n to: '',\n tooltip: 'The most recent blocks seen in the in temp archive on your current network.',\n },\n {\n icon: <VscAccount fontSize=\"body1\" />,\n primary: 'Account',\n to: '',\n tooltip: 'The most recent blocks seen in the in temp archive on your current network.',\n },\n {\n icon: <VscSettingsGear fontSize=\"body1\" />,\n primary: 'Settings',\n to: '',\n tooltip: 'The most recent blocks seen in the in temp archive on your current network.',\n },\n]\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAMG;AAFH,IAAM,cAAmC;AAAA,EAC9C;AAAA,IACE,MAAM,oBAAC,YAAS,UAAS,SAAQ;AAAA,IACjC,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM,oBAAC,mBAAgB,UAAS,SAAQ;AAAA,IACxC,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM,oBAAC,sBAAmB,UAAS,SAAQ;AAAA,IAC3C,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM,oBAAC,YAAS,UAAS,SAAQ;AAAA,IACjC,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM,oBAAC,aAAU,UAAS,SAAQ;AAAA,IAClC,SAAS;AAAA,IACT,iBAAiB;AAAA,MACf,EAAE,MAAM,oBAAC,gBAAa,UAAS,SAAQ,GAAI,SAAS,aAAa,IAAI,IAAI,SAAS,8CAA8C;AAAA,MAChI,EAAE,MAAM,oBAAC,UAAO,UAAS,SAAQ,GAAI,SAAS,kBAAkB,IAAI,IAAI,SAAS,wCAAwC;AAAA,MACzH,EAAE,MAAM,oBAAC,YAAS,UAAS,SAAQ,GAAI,SAAS,iBAAiB,IAAI,IAAI,SAAS,gDAAgD;AAAA,IACpI;AAAA,IACA,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AACF;AAEO,IAAM,iBAAsC;AAAA,EACjD;AAAA,IACE,MAAM,oBAAC,gBAAa,UAAS,SAAQ;AAAA,IACrC,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM,oBAAC,WAAQ,UAAS,SAAQ;AAAA,IAChC,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM,oBAAC,cAAW,UAAS,SAAQ;AAAA,IACnC,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM,oBAAC,mBAAgB,UAAS,SAAQ;AAAA,IACxC,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,SAAS;AAAA,EACX;AACF;","names":[]}
@@ -1,8 +1,120 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { FlexCol } from "@xylabs/react-flexbox";
3
- import { SystemControlsRoot } from "./SystemControlsRoot";
4
- const SystemControls = (props) => {
5
- return /* @__PURE__ */ jsx(FlexCol, { children: /* @__PURE__ */ jsx(SystemControlsRoot, { ...props }) });
1
+ // src/components/MobileSystemControls/SystemControls.tsx
2
+ import { FlexCol as FlexCol3 } from "@xylabs/react-flexbox";
3
+
4
+ // src/components/MobileSystemControls/SystemControlsRoot.tsx
5
+ import { styled } from "@mui/material";
6
+
7
+ // src/components/MobileSystemControls/SystemControlsUnstyled.tsx
8
+ import { Paper, useMediaQuery } from "@mui/material";
9
+ import { FlexCol as FlexCol2, FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
10
+ import { NetworkSelectEx } from "@xyo-network/react-network";
11
+
12
+ // src/components/MobileSystemControls/controls/SystemControl.tsx
13
+ import { Collapse } from "@mui/material";
14
+ import { FlexCol, FlexRow } from "@xylabs/react-flexbox";
15
+ import { useState } from "react";
16
+ import { jsx, jsxs } from "react/jsx-runtime";
17
+ var SystemControl = ({
18
+ children,
19
+ controlElement,
20
+ systemControlsType = "WindowShade" /* WindowShade */,
21
+ ...props
22
+ }) => {
23
+ const [toggleControls, setToggleControls] = useState(false);
24
+ let orientation = "vertical";
25
+ switch (systemControlsType) {
26
+ case "Left" /* Left */: {
27
+ orientation = "horizontal";
28
+ break;
29
+ }
30
+ }
31
+ return /* @__PURE__ */ jsxs(FlexRow, { className: "controls", ...props, children: [
32
+ /* @__PURE__ */ jsx(Collapse, { in: toggleControls, orientation, timeout: 500, children: /* @__PURE__ */ jsx(FlexRow, { bgcolor: "primary.main", className: "control", children: controlElement }) }),
33
+ /* @__PURE__ */ jsx(FlexCol, { style: { cursor: "pointer" }, onClick: () => setToggleControls(!toggleControls), children })
34
+ ] });
35
+ };
36
+
37
+ // src/components/MobileSystemControls/SystemControlsUnstyled.tsx
38
+ import { Fragment, jsx as jsx2 } from "react/jsx-runtime";
39
+ var SystemControlsUnstyled = ({
40
+ visible,
41
+ systemControlsType = "WindowShade" /* WindowShade */,
42
+ ...props
43
+ }) => {
44
+ const isSmall = useMediaQuery((theme) => theme.breakpoints.down("sm"));
45
+ if (visible || isSmall) {
46
+ return /* @__PURE__ */ jsx2(FlexCol2, { ...props, className: `${props.className} system-controls-type-${systemControlsType}`, children: /* @__PURE__ */ jsx2(
47
+ SystemControl,
48
+ {
49
+ systemControlsType,
50
+ controlElement: /* @__PURE__ */ jsx2(Fragment, { children: /* @__PURE__ */ jsx2(FlexRow2, { className: "control-wrap", children: /* @__PURE__ */ jsx2(Paper, { variant: "elevation", elevation: 0, children: /* @__PURE__ */ jsx2(NetworkSelectEx, { responsive: false, className: "network-ex" }) }) }) })
51
+ }
52
+ ) });
53
+ } else {
54
+ return /* @__PURE__ */ jsx2(FlexCol2, {});
55
+ }
56
+ };
57
+
58
+ // src/components/MobileSystemControls/SystemControlsRoot.tsx
59
+ var SystemControlsRoot = styled(SystemControlsUnstyled, { name: "SystemControls", slot: "Root" })(({ theme }) => ({
60
+ // shared defaults
61
+ ["&"]: {
62
+ ".toggle": {
63
+ backgroundColor: theme.palette.primary.main
64
+ },
65
+ alignItems: "start",
66
+ zIndex: 1
67
+ },
68
+ // WindowShade System Controls styles
69
+ [`&.system-controls-type-${"WindowShade" /* WindowShade */}`]: {
70
+ ".control": {
71
+ borderRadius: "0 0 5px 5px",
72
+ flexDirection: "row",
73
+ flexGrow: 1,
74
+ justifyContent: "space-around",
75
+ padding: `${theme.spacing(2)} ${theme.spacing(2.5)}`
76
+ },
77
+ ".controls": {
78
+ alignItems: "stretch",
79
+ flexDirection: "column",
80
+ flexGrow: 1
81
+ },
82
+ ".toggle": {
83
+ borderRadius: "0 0 5px 5px",
84
+ padding: `${theme.spacing(0.5)} ${theme.spacing(1)}`
85
+ },
86
+ flexDirection: "row",
87
+ position: "absolute",
88
+ top: 0,
89
+ width: "100%"
90
+ },
91
+ // Left System Control styles
92
+ [`&.system-controls-type-${"Left" /* Left */}`]: {
93
+ ".control": {
94
+ alignItems: "start",
95
+ flexDirection: "column",
96
+ padding: `${theme.spacing(2)} ${theme.spacing(2.5)}`
97
+ },
98
+ ".control-wrap": {
99
+ marginBottom: `${theme.spacing(2)}`
100
+ },
101
+ ".toggle": {
102
+ borderRadius: "0 5px 5px 0",
103
+ padding: `${theme.spacing(1)} ${theme.spacing(0.5)}`,
104
+ writingMode: "vertical-rl"
105
+ },
106
+ flexDirection: "column",
107
+ left: 0,
108
+ position: "fixed",
109
+ top: "30vh",
110
+ width: "auto"
111
+ }
112
+ }));
113
+
114
+ // src/components/MobileSystemControls/SystemControls.tsx
115
+ import { jsx as jsx3 } from "react/jsx-runtime";
116
+ var SystemControls = (props) => {
117
+ return /* @__PURE__ */ jsx3(FlexCol3, { children: /* @__PURE__ */ jsx3(SystemControlsRoot, { ...props }) });
6
118
  };
7
119
  export {
8
120
  SystemControls
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/MobileSystemControls/SystemControls.tsx"],"sourcesContent":["import { FlexCol } from '@xylabs/react-flexbox'\n\nimport { SystemControlsRoot } from './SystemControlsRoot'\nimport { SystemControlsUnstyledProps } from './SystemControlsUnstyled'\n\nconst SystemControls: React.FC<SystemControlsUnstyledProps> = (props) => {\n return (\n <FlexCol>\n <SystemControlsRoot {...props} />\n </FlexCol>\n )\n}\n\nexport { SystemControls }\n"],"mappings":"AAQM;AARN,SAAS,eAAe;AAExB,SAAS,0BAA0B;AAGnC,MAAM,iBAAwD,CAAC,UAAU;AACvE,SACE,oBAAC,WACC,8BAAC,sBAAoB,GAAG,OAAO,GACjC;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../../../src/components/MobileSystemControls/SystemControls.tsx","../../../../src/components/MobileSystemControls/SystemControlsRoot.tsx","../../../../src/components/MobileSystemControls/SystemControlsUnstyled.tsx","../../../../src/components/MobileSystemControls/controls/SystemControl.tsx"],"sourcesContent":["import { FlexCol } from '@xylabs/react-flexbox'\n\nimport { SystemControlsRoot } from './SystemControlsRoot'\nimport { SystemControlsUnstyledProps } from './SystemControlsUnstyled'\n\nconst SystemControls: React.FC<SystemControlsUnstyledProps> = (props) => {\n return (\n <FlexCol>\n <SystemControlsRoot {...props} />\n </FlexCol>\n )\n}\n\nexport { SystemControls }\n","import { styled } from '@mui/material'\n\nimport { SystemControlsType } from './SystemControlsType'\nimport { SystemControlsUnstyled, SystemControlsUnstyledProps } from './SystemControlsUnstyled'\n\nconst SystemControlsRoot = styled(SystemControlsUnstyled, { name: 'SystemControls', slot: 'Root' })<SystemControlsUnstyledProps>(({ theme }) => ({\n // shared defaults\n ['&']: {\n '.toggle': {\n backgroundColor: theme.palette.primary.main,\n },\n alignItems: 'start',\n zIndex: 1,\n },\n // WindowShade System Controls styles\n [`&.system-controls-type-${SystemControlsType.WindowShade}`]: {\n '.control': {\n borderRadius: '0 0 5px 5px',\n flexDirection: 'row',\n flexGrow: 1,\n justifyContent: 'space-around',\n padding: `${theme.spacing(2)} ${theme.spacing(2.5)}`,\n },\n '.controls': {\n alignItems: 'stretch',\n flexDirection: 'column',\n flexGrow: 1,\n },\n '.toggle': {\n borderRadius: '0 0 5px 5px',\n padding: `${theme.spacing(0.5)} ${theme.spacing(1)}`,\n },\n flexDirection: 'row',\n position: 'absolute',\n top: 0,\n width: '100%',\n },\n // Left System Control styles\n [`&.system-controls-type-${SystemControlsType.Left}`]: {\n '.control': {\n alignItems: 'start',\n flexDirection: 'column',\n padding: `${theme.spacing(2)} ${theme.spacing(2.5)}`,\n },\n '.control-wrap': {\n marginBottom: `${theme.spacing(2)}`,\n },\n '.toggle': {\n borderRadius: '0 5px 5px 0',\n padding: `${theme.spacing(1)} ${theme.spacing(0.5)}`,\n writingMode: 'vertical-rl',\n },\n flexDirection: 'column',\n left: 0,\n position: 'fixed',\n top: '30vh',\n width: 'auto',\n },\n}))\n\nexport { SystemControlsRoot }\n","import { Paper, Theme, useMediaQuery } from '@mui/material'\nimport { FlexBoxProps, FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { NetworkSelectEx } from '@xyo-network/react-network'\n\nimport { SystemControl } from './controls'\nimport { SystemControlsType } from './SystemControlsType'\n\ninterface SystemControlsUnstyledProps extends FlexBoxProps {\n systemControlsType?: SystemControlsType\n visible?: boolean\n}\n\nconst SystemControlsUnstyled: React.FC<SystemControlsUnstyledProps> = ({\n visible,\n systemControlsType = SystemControlsType.WindowShade,\n ...props\n}) => {\n const isSmall = useMediaQuery<Theme>((theme) => theme.breakpoints.down('sm'))\n\n if (visible || isSmall) {\n return (\n <FlexCol {...props} className={`${props.className} system-controls-type-${systemControlsType}`}>\n <SystemControl\n systemControlsType={systemControlsType}\n controlElement={\n <>\n <FlexRow className={'control-wrap'}>\n <Paper variant=\"elevation\" elevation={0}>\n <NetworkSelectEx responsive={false} className=\"network-ex\" />\n </Paper>\n </FlexRow>\n </>\n }\n />\n </FlexCol>\n )\n } else {\n return <FlexCol />\n }\n}\n\nexport type { SystemControlsUnstyledProps }\nexport { SystemControlsUnstyled }\n","import { Collapse, CollapseProps } from '@mui/material'\nimport { FlexBoxProps, FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { useState } from 'react'\n\nimport { SystemControlsType } from '../SystemControlsType'\n\ninterface SystemControlProps extends FlexBoxProps {\n controlElement: React.ReactNode\n systemControlsType?: SystemControlsType\n}\n\nconst SystemControl: React.FC<WithChildren<SystemControlProps>> = ({\n children,\n controlElement,\n systemControlsType = SystemControlsType.WindowShade,\n ...props\n}) => {\n const [toggleControls, setToggleControls] = useState(false)\n\n let orientation: CollapseProps['orientation'] = 'vertical'\n\n switch (systemControlsType) {\n case SystemControlsType.Left: {\n orientation = 'horizontal'\n break\n }\n }\n\n return (\n <FlexRow className=\"controls\" {...props}>\n <Collapse in={toggleControls} orientation={orientation} timeout={500}>\n <FlexRow bgcolor=\"primary.main\" className=\"control\">\n {controlElement}\n </FlexRow>\n </Collapse>\n <FlexCol style={{ cursor: 'pointer' }} onClick={() => setToggleControls(!toggleControls)}>\n {children}\n </FlexCol>\n </FlexRow>\n )\n}\n\nexport { SystemControl }\n"],"mappings":"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","names":["FlexCol","FlexCol","FlexRow","jsx","FlexCol","FlexRow","jsx","FlexCol"]}
@@ -1,7 +1,59 @@
1
+ // src/components/MobileSystemControls/SystemControlsRoot.tsx
1
2
  import { styled } from "@mui/material";
2
- import { SystemControlsType } from "./SystemControlsType";
3
- import { SystemControlsUnstyled } from "./SystemControlsUnstyled";
4
- const SystemControlsRoot = styled(SystemControlsUnstyled, { name: "SystemControls", slot: "Root" })(({ theme }) => ({
3
+
4
+ // src/components/MobileSystemControls/SystemControlsUnstyled.tsx
5
+ import { Paper, useMediaQuery } from "@mui/material";
6
+ import { FlexCol as FlexCol2, FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
7
+ import { NetworkSelectEx } from "@xyo-network/react-network";
8
+
9
+ // src/components/MobileSystemControls/controls/SystemControl.tsx
10
+ import { Collapse } from "@mui/material";
11
+ import { FlexCol, FlexRow } from "@xylabs/react-flexbox";
12
+ import { useState } from "react";
13
+ import { jsx, jsxs } from "react/jsx-runtime";
14
+ var SystemControl = ({
15
+ children,
16
+ controlElement,
17
+ systemControlsType = "WindowShade" /* WindowShade */,
18
+ ...props
19
+ }) => {
20
+ const [toggleControls, setToggleControls] = useState(false);
21
+ let orientation = "vertical";
22
+ switch (systemControlsType) {
23
+ case "Left" /* Left */: {
24
+ orientation = "horizontal";
25
+ break;
26
+ }
27
+ }
28
+ return /* @__PURE__ */ jsxs(FlexRow, { className: "controls", ...props, children: [
29
+ /* @__PURE__ */ jsx(Collapse, { in: toggleControls, orientation, timeout: 500, children: /* @__PURE__ */ jsx(FlexRow, { bgcolor: "primary.main", className: "control", children: controlElement }) }),
30
+ /* @__PURE__ */ jsx(FlexCol, { style: { cursor: "pointer" }, onClick: () => setToggleControls(!toggleControls), children })
31
+ ] });
32
+ };
33
+
34
+ // src/components/MobileSystemControls/SystemControlsUnstyled.tsx
35
+ import { Fragment, jsx as jsx2 } from "react/jsx-runtime";
36
+ var SystemControlsUnstyled = ({
37
+ visible,
38
+ systemControlsType = "WindowShade" /* WindowShade */,
39
+ ...props
40
+ }) => {
41
+ const isSmall = useMediaQuery((theme) => theme.breakpoints.down("sm"));
42
+ if (visible || isSmall) {
43
+ return /* @__PURE__ */ jsx2(FlexCol2, { ...props, className: `${props.className} system-controls-type-${systemControlsType}`, children: /* @__PURE__ */ jsx2(
44
+ SystemControl,
45
+ {
46
+ systemControlsType,
47
+ controlElement: /* @__PURE__ */ jsx2(Fragment, { children: /* @__PURE__ */ jsx2(FlexRow2, { className: "control-wrap", children: /* @__PURE__ */ jsx2(Paper, { variant: "elevation", elevation: 0, children: /* @__PURE__ */ jsx2(NetworkSelectEx, { responsive: false, className: "network-ex" }) }) }) })
48
+ }
49
+ ) });
50
+ } else {
51
+ return /* @__PURE__ */ jsx2(FlexCol2, {});
52
+ }
53
+ };
54
+
55
+ // src/components/MobileSystemControls/SystemControlsRoot.tsx
56
+ var SystemControlsRoot = styled(SystemControlsUnstyled, { name: "SystemControls", slot: "Root" })(({ theme }) => ({
5
57
  // shared defaults
6
58
  ["&"]: {
7
59
  ".toggle": {
@@ -11,7 +63,7 @@ const SystemControlsRoot = styled(SystemControlsUnstyled, { name: "SystemControl
11
63
  zIndex: 1
12
64
  },
13
65
  // WindowShade System Controls styles
14
- [`&.system-controls-type-${SystemControlsType.WindowShade}`]: {
66
+ [`&.system-controls-type-${"WindowShade" /* WindowShade */}`]: {
15
67
  ".control": {
16
68
  borderRadius: "0 0 5px 5px",
17
69
  flexDirection: "row",
@@ -34,7 +86,7 @@ const SystemControlsRoot = styled(SystemControlsUnstyled, { name: "SystemControl
34
86
  width: "100%"
35
87
  },
36
88
  // Left System Control styles
37
- [`&.system-controls-type-${SystemControlsType.Left}`]: {
89
+ [`&.system-controls-type-${"Left" /* Left */}`]: {
38
90
  ".control": {
39
91
  alignItems: "start",
40
92
  flexDirection: "column",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/MobileSystemControls/SystemControlsRoot.tsx"],"sourcesContent":["import { styled } from '@mui/material'\n\nimport { SystemControlsType } from './SystemControlsType'\nimport { SystemControlsUnstyled, SystemControlsUnstyledProps } from './SystemControlsUnstyled'\n\nconst SystemControlsRoot = styled(SystemControlsUnstyled, { name: 'SystemControls', slot: 'Root' })<SystemControlsUnstyledProps>(({ theme }) => ({\n // shared defaults\n ['&']: {\n '.toggle': {\n backgroundColor: theme.palette.primary.main,\n },\n alignItems: 'start',\n zIndex: 1,\n },\n // WindowShade System Controls styles\n [`&.system-controls-type-${SystemControlsType.WindowShade}`]: {\n '.control': {\n borderRadius: '0 0 5px 5px',\n flexDirection: 'row',\n flexGrow: 1,\n justifyContent: 'space-around',\n padding: `${theme.spacing(2)} ${theme.spacing(2.5)}`,\n },\n '.controls': {\n alignItems: 'stretch',\n flexDirection: 'column',\n flexGrow: 1,\n },\n '.toggle': {\n borderRadius: '0 0 5px 5px',\n padding: `${theme.spacing(0.5)} ${theme.spacing(1)}`,\n },\n flexDirection: 'row',\n position: 'absolute',\n top: 0,\n width: '100%',\n },\n // Left System Control styles\n [`&.system-controls-type-${SystemControlsType.Left}`]: {\n '.control': {\n alignItems: 'start',\n flexDirection: 'column',\n padding: `${theme.spacing(2)} ${theme.spacing(2.5)}`,\n },\n '.control-wrap': {\n marginBottom: `${theme.spacing(2)}`,\n },\n '.toggle': {\n borderRadius: '0 5px 5px 0',\n padding: `${theme.spacing(1)} ${theme.spacing(0.5)}`,\n writingMode: 'vertical-rl',\n },\n flexDirection: 'column',\n left: 0,\n position: 'fixed',\n top: '30vh',\n width: 'auto',\n },\n}))\n\nexport { SystemControlsRoot }\n"],"mappings":"AAAA,SAAS,cAAc;AAEvB,SAAS,0BAA0B;AACnC,SAAS,8BAA2D;AAEpE,MAAM,qBAAqB,OAAO,wBAAwB,EAAE,MAAM,kBAAkB,MAAM,OAAO,CAAC,EAA+B,CAAC,EAAE,MAAM,OAAO;AAAA;AAAA,EAE/I,CAAC,GAAG,GAAG;AAAA,IACL,WAAW;AAAA,MACT,iBAAiB,MAAM,QAAQ,QAAQ;AAAA,IACzC;AAAA,IACA,YAAY;AAAA,IACZ,QAAQ;AAAA,EACV;AAAA;AAAA,EAEA,CAAC,0BAA0B,mBAAmB,WAAW,EAAE,GAAG;AAAA,IAC5D,YAAY;AAAA,MACV,cAAc;AAAA,MACd,eAAe;AAAA,MACf,UAAU;AAAA,MACV,gBAAgB;AAAA,MAChB,SAAS,GAAG,MAAM,QAAQ,CAAC,CAAC,IAAI,MAAM,QAAQ,GAAG,CAAC;AAAA,IACpD;AAAA,IACA,aAAa;AAAA,MACX,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,UAAU;AAAA,IACZ;AAAA,IACA,WAAW;AAAA,MACT,cAAc;AAAA,MACd,SAAS,GAAG,MAAM,QAAQ,GAAG,CAAC,IAAI,MAAM,QAAQ,CAAC,CAAC;AAAA,IACpD;AAAA,IACA,eAAe;AAAA,IACf,UAAU;AAAA,IACV,KAAK;AAAA,IACL,OAAO;AAAA,EACT;AAAA;AAAA,EAEA,CAAC,0BAA0B,mBAAmB,IAAI,EAAE,GAAG;AAAA,IACrD,YAAY;AAAA,MACV,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,SAAS,GAAG,MAAM,QAAQ,CAAC,CAAC,IAAI,MAAM,QAAQ,GAAG,CAAC;AAAA,IACpD;AAAA,IACA,iBAAiB;AAAA,MACf,cAAc,GAAG,MAAM,QAAQ,CAAC,CAAC;AAAA,IACnC;AAAA,IACA,WAAW;AAAA,MACT,cAAc;AAAA,MACd,SAAS,GAAG,MAAM,QAAQ,CAAC,CAAC,IAAI,MAAM,QAAQ,GAAG,CAAC;AAAA,MAClD,aAAa;AAAA,IACf;AAAA,IACA,eAAe;AAAA,IACf,MAAM;AAAA,IACN,UAAU;AAAA,IACV,KAAK;AAAA,IACL,OAAO;AAAA,EACT;AACF,EAAE;","names":[]}
1
+ {"version":3,"sources":["../../../../src/components/MobileSystemControls/SystemControlsRoot.tsx","../../../../src/components/MobileSystemControls/SystemControlsUnstyled.tsx","../../../../src/components/MobileSystemControls/controls/SystemControl.tsx"],"sourcesContent":["import { styled } from '@mui/material'\n\nimport { SystemControlsType } from './SystemControlsType'\nimport { SystemControlsUnstyled, SystemControlsUnstyledProps } from './SystemControlsUnstyled'\n\nconst SystemControlsRoot = styled(SystemControlsUnstyled, { name: 'SystemControls', slot: 'Root' })<SystemControlsUnstyledProps>(({ theme }) => ({\n // shared defaults\n ['&']: {\n '.toggle': {\n backgroundColor: theme.palette.primary.main,\n },\n alignItems: 'start',\n zIndex: 1,\n },\n // WindowShade System Controls styles\n [`&.system-controls-type-${SystemControlsType.WindowShade}`]: {\n '.control': {\n borderRadius: '0 0 5px 5px',\n flexDirection: 'row',\n flexGrow: 1,\n justifyContent: 'space-around',\n padding: `${theme.spacing(2)} ${theme.spacing(2.5)}`,\n },\n '.controls': {\n alignItems: 'stretch',\n flexDirection: 'column',\n flexGrow: 1,\n },\n '.toggle': {\n borderRadius: '0 0 5px 5px',\n padding: `${theme.spacing(0.5)} ${theme.spacing(1)}`,\n },\n flexDirection: 'row',\n position: 'absolute',\n top: 0,\n width: '100%',\n },\n // Left System Control styles\n [`&.system-controls-type-${SystemControlsType.Left}`]: {\n '.control': {\n alignItems: 'start',\n flexDirection: 'column',\n padding: `${theme.spacing(2)} ${theme.spacing(2.5)}`,\n },\n '.control-wrap': {\n marginBottom: `${theme.spacing(2)}`,\n },\n '.toggle': {\n borderRadius: '0 5px 5px 0',\n padding: `${theme.spacing(1)} ${theme.spacing(0.5)}`,\n writingMode: 'vertical-rl',\n },\n flexDirection: 'column',\n left: 0,\n position: 'fixed',\n top: '30vh',\n width: 'auto',\n },\n}))\n\nexport { SystemControlsRoot }\n","import { Paper, Theme, useMediaQuery } from '@mui/material'\nimport { FlexBoxProps, FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { NetworkSelectEx } from '@xyo-network/react-network'\n\nimport { SystemControl } from './controls'\nimport { SystemControlsType } from './SystemControlsType'\n\ninterface SystemControlsUnstyledProps extends FlexBoxProps {\n systemControlsType?: SystemControlsType\n visible?: boolean\n}\n\nconst SystemControlsUnstyled: React.FC<SystemControlsUnstyledProps> = ({\n visible,\n systemControlsType = SystemControlsType.WindowShade,\n ...props\n}) => {\n const isSmall = useMediaQuery<Theme>((theme) => theme.breakpoints.down('sm'))\n\n if (visible || isSmall) {\n return (\n <FlexCol {...props} className={`${props.className} system-controls-type-${systemControlsType}`}>\n <SystemControl\n systemControlsType={systemControlsType}\n controlElement={\n <>\n <FlexRow className={'control-wrap'}>\n <Paper variant=\"elevation\" elevation={0}>\n <NetworkSelectEx responsive={false} className=\"network-ex\" />\n </Paper>\n </FlexRow>\n </>\n }\n />\n </FlexCol>\n )\n } else {\n return <FlexCol />\n }\n}\n\nexport type { SystemControlsUnstyledProps }\nexport { SystemControlsUnstyled }\n","import { Collapse, CollapseProps } from '@mui/material'\nimport { FlexBoxProps, FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { useState } from 'react'\n\nimport { SystemControlsType } from '../SystemControlsType'\n\ninterface SystemControlProps extends FlexBoxProps {\n controlElement: React.ReactNode\n systemControlsType?: SystemControlsType\n}\n\nconst SystemControl: React.FC<WithChildren<SystemControlProps>> = ({\n children,\n controlElement,\n systemControlsType = SystemControlsType.WindowShade,\n ...props\n}) => {\n const [toggleControls, setToggleControls] = useState(false)\n\n let orientation: CollapseProps['orientation'] = 'vertical'\n\n switch (systemControlsType) {\n case SystemControlsType.Left: {\n orientation = 'horizontal'\n break\n }\n }\n\n return (\n <FlexRow className=\"controls\" {...props}>\n <Collapse in={toggleControls} orientation={orientation} timeout={500}>\n <FlexRow bgcolor=\"primary.main\" className=\"control\">\n {controlElement}\n </FlexRow>\n </Collapse>\n <FlexCol style={{ cursor: 'pointer' }} onClick={() => setToggleControls(!toggleControls)}>\n {children}\n </FlexCol>\n </FlexRow>\n )\n}\n\nexport { SystemControl }\n"],"mappings":"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","names":["FlexCol","FlexRow","jsx","FlexCol","FlexRow"]}
@@ -1,3 +1,4 @@
1
+ // src/components/MobileSystemControls/SystemControlsType.ts
1
2
  var SystemControlsType = /* @__PURE__ */ ((SystemControlsType2) => {
2
3
  SystemControlsType2["Left"] = "Left";
3
4
  SystemControlsType2["Right"] = "Right";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/MobileSystemControls/SystemControlsType.ts"],"sourcesContent":["export enum SystemControlsType {\n Left = 'Left',\n Right = 'Right',\n WindowShade = 'WindowShade',\n}\n"],"mappings":"AAAO,IAAK,qBAAL,kBAAKA,wBAAL;AACL,EAAAA,oBAAA,UAAO;AACP,EAAAA,oBAAA,WAAQ;AACR,EAAAA,oBAAA,iBAAc;AAHJ,SAAAA;AAAA,GAAA;","names":["SystemControlsType"]}
1
+ {"version":3,"sources":["../../../../src/components/MobileSystemControls/SystemControlsType.ts"],"sourcesContent":["export enum SystemControlsType {\n Left = 'Left',\n Right = 'Right',\n WindowShade = 'WindowShade',\n}\n"],"mappings":";AAAO,IAAK,qBAAL,kBAAKA,wBAAL;AACL,EAAAA,oBAAA,UAAO;AACP,EAAAA,oBAAA,WAAQ;AACR,EAAAA,oBAAA,iBAAc;AAHJ,SAAAA;AAAA,GAAA;","names":["SystemControlsType"]}
@@ -1,25 +1,51 @@
1
- import { Fragment, jsx } from "react/jsx-runtime";
1
+ // src/components/MobileSystemControls/SystemControlsUnstyled.tsx
2
2
  import { Paper, useMediaQuery } from "@mui/material";
3
- import { FlexCol, FlexRow } from "@xylabs/react-flexbox";
3
+ import { FlexCol as FlexCol2, FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
4
4
  import { NetworkSelectEx } from "@xyo-network/react-network";
5
- import { SystemControl } from "./controls";
6
- import { SystemControlsType } from "./SystemControlsType";
7
- const SystemControlsUnstyled = ({
5
+
6
+ // src/components/MobileSystemControls/controls/SystemControl.tsx
7
+ import { Collapse } from "@mui/material";
8
+ import { FlexCol, FlexRow } from "@xylabs/react-flexbox";
9
+ import { useState } from "react";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ var SystemControl = ({
12
+ children,
13
+ controlElement,
14
+ systemControlsType = "WindowShade" /* WindowShade */,
15
+ ...props
16
+ }) => {
17
+ const [toggleControls, setToggleControls] = useState(false);
18
+ let orientation = "vertical";
19
+ switch (systemControlsType) {
20
+ case "Left" /* Left */: {
21
+ orientation = "horizontal";
22
+ break;
23
+ }
24
+ }
25
+ return /* @__PURE__ */ jsxs(FlexRow, { className: "controls", ...props, children: [
26
+ /* @__PURE__ */ jsx(Collapse, { in: toggleControls, orientation, timeout: 500, children: /* @__PURE__ */ jsx(FlexRow, { bgcolor: "primary.main", className: "control", children: controlElement }) }),
27
+ /* @__PURE__ */ jsx(FlexCol, { style: { cursor: "pointer" }, onClick: () => setToggleControls(!toggleControls), children })
28
+ ] });
29
+ };
30
+
31
+ // src/components/MobileSystemControls/SystemControlsUnstyled.tsx
32
+ import { Fragment, jsx as jsx2 } from "react/jsx-runtime";
33
+ var SystemControlsUnstyled = ({
8
34
  visible,
9
- systemControlsType = SystemControlsType.WindowShade,
35
+ systemControlsType = "WindowShade" /* WindowShade */,
10
36
  ...props
11
37
  }) => {
12
38
  const isSmall = useMediaQuery((theme) => theme.breakpoints.down("sm"));
13
39
  if (visible || isSmall) {
14
- return /* @__PURE__ */ jsx(FlexCol, { ...props, className: `${props.className} system-controls-type-${systemControlsType}`, children: /* @__PURE__ */ jsx(
40
+ return /* @__PURE__ */ jsx2(FlexCol2, { ...props, className: `${props.className} system-controls-type-${systemControlsType}`, children: /* @__PURE__ */ jsx2(
15
41
  SystemControl,
16
42
  {
17
43
  systemControlsType,
18
- controlElement: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(FlexRow, { className: "control-wrap", children: /* @__PURE__ */ jsx(Paper, { variant: "elevation", elevation: 0, children: /* @__PURE__ */ jsx(NetworkSelectEx, { responsive: false, className: "network-ex" }) }) }) })
44
+ controlElement: /* @__PURE__ */ jsx2(Fragment, { children: /* @__PURE__ */ jsx2(FlexRow2, { className: "control-wrap", children: /* @__PURE__ */ jsx2(Paper, { variant: "elevation", elevation: 0, children: /* @__PURE__ */ jsx2(NetworkSelectEx, { responsive: false, className: "network-ex" }) }) }) })
19
45
  }
20
46
  ) });
21
47
  } else {
22
- return /* @__PURE__ */ jsx(FlexCol, {});
48
+ return /* @__PURE__ */ jsx2(FlexCol2, {});
23
49
  }
24
50
  };
25
51
  export {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/MobileSystemControls/SystemControlsUnstyled.tsx"],"sourcesContent":["import { Paper, Theme, useMediaQuery } from '@mui/material'\nimport { FlexBoxProps, FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { NetworkSelectEx } from '@xyo-network/react-network'\n\nimport { SystemControl } from './controls'\nimport { SystemControlsType } from './SystemControlsType'\n\ninterface SystemControlsUnstyledProps extends FlexBoxProps {\n systemControlsType?: SystemControlsType\n visible?: boolean\n}\n\nconst SystemControlsUnstyled: React.FC<SystemControlsUnstyledProps> = ({\n visible,\n systemControlsType = SystemControlsType.WindowShade,\n ...props\n}) => {\n const isSmall = useMediaQuery<Theme>((theme) => theme.breakpoints.down('sm'))\n\n if (visible || isSmall) {\n return (\n <FlexCol {...props} className={`${props.className} system-controls-type-${systemControlsType}`}>\n <SystemControl\n systemControlsType={systemControlsType}\n controlElement={\n <>\n <FlexRow className={'control-wrap'}>\n <Paper variant=\"elevation\" elevation={0}>\n <NetworkSelectEx responsive={false} className=\"network-ex\" />\n </Paper>\n </FlexRow>\n </>\n }\n />\n </FlexCol>\n )\n } else {\n return <FlexCol />\n }\n}\n\nexport type { SystemControlsUnstyledProps }\nexport { SystemControlsUnstyled }\n"],"mappings":"AAyBY,mBAGM,WAHN;AAzBZ,SAAS,OAAc,qBAAqB;AAC5C,SAAuB,SAAS,eAAe;AAC/C,SAAS,uBAAuB;AAEhC,SAAS,qBAAqB;AAC9B,SAAS,0BAA0B;AAOnC,MAAM,yBAAgE,CAAC;AAAA,EACrE;AAAA,EACA,qBAAqB,mBAAmB;AAAA,EACxC,GAAG;AACL,MAAM;AACJ,QAAM,UAAU,cAAqB,CAAC,UAAU,MAAM,YAAY,KAAK,IAAI,CAAC;AAE5E,MAAI,WAAW,SAAS;AACtB,WACE,oBAAC,WAAS,GAAG,OAAO,WAAW,GAAG,MAAM,SAAS,yBAAyB,kBAAkB,IAC1F;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,gBACE,gCACE,8BAAC,WAAQ,WAAW,gBAClB,8BAAC,SAAM,SAAQ,aAAY,WAAW,GACpC,8BAAC,mBAAgB,YAAY,OAAO,WAAU,cAAa,GAC7D,GACF,GACF;AAAA;AAAA,IAEJ,GACF;AAAA,EAEJ,OAAO;AACL,WAAO,oBAAC,WAAQ;AAAA,EAClB;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../../src/components/MobileSystemControls/SystemControlsUnstyled.tsx","../../../../src/components/MobileSystemControls/controls/SystemControl.tsx"],"sourcesContent":["import { Paper, Theme, useMediaQuery } from '@mui/material'\nimport { FlexBoxProps, FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { NetworkSelectEx } from '@xyo-network/react-network'\n\nimport { SystemControl } from './controls'\nimport { SystemControlsType } from './SystemControlsType'\n\ninterface SystemControlsUnstyledProps extends FlexBoxProps {\n systemControlsType?: SystemControlsType\n visible?: boolean\n}\n\nconst SystemControlsUnstyled: React.FC<SystemControlsUnstyledProps> = ({\n visible,\n systemControlsType = SystemControlsType.WindowShade,\n ...props\n}) => {\n const isSmall = useMediaQuery<Theme>((theme) => theme.breakpoints.down('sm'))\n\n if (visible || isSmall) {\n return (\n <FlexCol {...props} className={`${props.className} system-controls-type-${systemControlsType}`}>\n <SystemControl\n systemControlsType={systemControlsType}\n controlElement={\n <>\n <FlexRow className={'control-wrap'}>\n <Paper variant=\"elevation\" elevation={0}>\n <NetworkSelectEx responsive={false} className=\"network-ex\" />\n </Paper>\n </FlexRow>\n </>\n }\n />\n </FlexCol>\n )\n } else {\n return <FlexCol />\n }\n}\n\nexport type { SystemControlsUnstyledProps }\nexport { SystemControlsUnstyled }\n","import { Collapse, CollapseProps } from '@mui/material'\nimport { FlexBoxProps, FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { useState } from 'react'\n\nimport { SystemControlsType } from '../SystemControlsType'\n\ninterface SystemControlProps extends FlexBoxProps {\n controlElement: React.ReactNode\n systemControlsType?: SystemControlsType\n}\n\nconst SystemControl: React.FC<WithChildren<SystemControlProps>> = ({\n children,\n controlElement,\n systemControlsType = SystemControlsType.WindowShade,\n ...props\n}) => {\n const [toggleControls, setToggleControls] = useState(false)\n\n let orientation: CollapseProps['orientation'] = 'vertical'\n\n switch (systemControlsType) {\n case SystemControlsType.Left: {\n orientation = 'horizontal'\n break\n }\n }\n\n return (\n <FlexRow className=\"controls\" {...props}>\n <Collapse in={toggleControls} orientation={orientation} timeout={500}>\n <FlexRow bgcolor=\"primary.main\" className=\"control\">\n {controlElement}\n </FlexRow>\n </Collapse>\n <FlexCol style={{ cursor: 'pointer' }} onClick={() => setToggleControls(!toggleControls)}>\n {children}\n </FlexCol>\n </FlexRow>\n )\n}\n\nexport { SystemControl }\n"],"mappings":";AAAA,SAAS,OAAc,qBAAqB;AAC5C,SAAuB,WAAAA,UAAS,WAAAC,gBAAe;AAC/C,SAAS,uBAAuB;;;ACFhC,SAAS,gBAA+B;AACxC,SAAuB,SAAS,eAAe;AAE/C,SAAS,gBAAgB;AA2BrB,SAEI,KAFJ;AAlBJ,IAAM,gBAA4D,CAAC;AAAA,EACjE;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAAS,KAAK;AAE1D,MAAI,cAA4C;AAEhD,UAAQ,oBAAoB;AAAA,IAC1B,wBAA8B;AAC5B,oBAAc;AACd;AAAA,IACF;AAAA,EACF;AAEA,SACE,qBAAC,WAAQ,WAAU,YAAY,GAAG,OAChC;AAAA,wBAAC,YAAS,IAAI,gBAAgB,aAA0B,SAAS,KAC/D,8BAAC,WAAQ,SAAQ,gBAAe,WAAU,WACvC,0BACH,GACF;AAAA,IACA,oBAAC,WAAQ,OAAO,EAAE,QAAQ,UAAU,GAAG,SAAS,MAAM,kBAAkB,CAAC,cAAc,GACpF,UACH;AAAA,KACF;AAEJ;;;ADhBY,mBAGM,OAAAC,YAHN;AAbZ,IAAM,yBAAgE,CAAC;AAAA,EACrE;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,UAAU,cAAqB,CAAC,UAAU,MAAM,YAAY,KAAK,IAAI,CAAC;AAE5E,MAAI,WAAW,SAAS;AACtB,WACE,gBAAAA,KAACC,UAAA,EAAS,GAAG,OAAO,WAAW,GAAG,MAAM,SAAS,yBAAyB,kBAAkB,IAC1F,0BAAAD;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,gBACE,gBAAAA,KAAA,YACE,0BAAAA,KAACE,UAAA,EAAQ,WAAW,gBAClB,0BAAAF,KAAC,SAAM,SAAQ,aAAY,WAAW,GACpC,0BAAAA,KAAC,mBAAgB,YAAY,OAAO,WAAU,cAAa,GAC7D,GACF,GACF;AAAA;AAAA,IAEJ,GACF;AAAA,EAEJ,OAAO;AACL,WAAO,gBAAAA,KAACC,UAAA,EAAQ;AAAA,EAClB;AACF;","names":["FlexCol","FlexRow","jsx","FlexCol","FlexRow"]}
@@ -1,18 +1,18 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ // src/components/MobileSystemControls/controls/SystemControl.tsx
2
2
  import { Collapse } from "@mui/material";
3
3
  import { FlexCol, FlexRow } from "@xylabs/react-flexbox";
4
4
  import { useState } from "react";
5
- import { SystemControlsType } from "../SystemControlsType";
6
- const SystemControl = ({
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ var SystemControl = ({
7
7
  children,
8
8
  controlElement,
9
- systemControlsType = SystemControlsType.WindowShade,
9
+ systemControlsType = "WindowShade" /* WindowShade */,
10
10
  ...props
11
11
  }) => {
12
12
  const [toggleControls, setToggleControls] = useState(false);
13
13
  let orientation = "vertical";
14
14
  switch (systemControlsType) {
15
- case SystemControlsType.Left: {
15
+ case "Left" /* Left */: {
16
16
  orientation = "horizontal";
17
17
  break;
18
18
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/MobileSystemControls/controls/SystemControl.tsx"],"sourcesContent":["import { Collapse, CollapseProps } from '@mui/material'\nimport { FlexBoxProps, FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { useState } from 'react'\n\nimport { SystemControlsType } from '../SystemControlsType'\n\ninterface SystemControlProps extends FlexBoxProps {\n controlElement: React.ReactNode\n systemControlsType?: SystemControlsType\n}\n\nconst SystemControl: React.FC<WithChildren<SystemControlProps>> = ({\n children,\n controlElement,\n systemControlsType = SystemControlsType.WindowShade,\n ...props\n}) => {\n const [toggleControls, setToggleControls] = useState(false)\n\n let orientation: CollapseProps['orientation'] = 'vertical'\n\n switch (systemControlsType) {\n case SystemControlsType.Left: {\n orientation = 'horizontal'\n break\n }\n }\n\n return (\n <FlexRow className=\"controls\" {...props}>\n <Collapse in={toggleControls} orientation={orientation} timeout={500}>\n <FlexRow bgcolor=\"primary.main\" className=\"control\">\n {controlElement}\n </FlexRow>\n </Collapse>\n <FlexCol style={{ cursor: 'pointer' }} onClick={() => setToggleControls(!toggleControls)}>\n {children}\n </FlexCol>\n </FlexRow>\n )\n}\n\nexport { SystemControl }\n"],"mappings":"AA8BI,SAEI,KAFJ;AA9BJ,SAAS,gBAA+B;AACxC,SAAuB,SAAS,eAAe;AAE/C,SAAS,gBAAgB;AAEzB,SAAS,0BAA0B;AAOnC,MAAM,gBAA4D,CAAC;AAAA,EACjE;AAAA,EACA;AAAA,EACA,qBAAqB,mBAAmB;AAAA,EACxC,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAAS,KAAK;AAE1D,MAAI,cAA4C;AAEhD,UAAQ,oBAAoB;AAAA,IAC1B,KAAK,mBAAmB,MAAM;AAC5B,oBAAc;AACd;AAAA,IACF;AAAA,EACF;AAEA,SACE,qBAAC,WAAQ,WAAU,YAAY,GAAG,OAChC;AAAA,wBAAC,YAAS,IAAI,gBAAgB,aAA0B,SAAS,KAC/D,8BAAC,WAAQ,SAAQ,gBAAe,WAAU,WACvC,0BACH,GACF;AAAA,IACA,oBAAC,WAAQ,OAAO,EAAE,QAAQ,UAAU,GAAG,SAAS,MAAM,kBAAkB,CAAC,cAAc,GACpF,UACH;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../../../../src/components/MobileSystemControls/controls/SystemControl.tsx"],"sourcesContent":["import { Collapse, CollapseProps } from '@mui/material'\nimport { FlexBoxProps, FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { useState } from 'react'\n\nimport { SystemControlsType } from '../SystemControlsType'\n\ninterface SystemControlProps extends FlexBoxProps {\n controlElement: React.ReactNode\n systemControlsType?: SystemControlsType\n}\n\nconst SystemControl: React.FC<WithChildren<SystemControlProps>> = ({\n children,\n controlElement,\n systemControlsType = SystemControlsType.WindowShade,\n ...props\n}) => {\n const [toggleControls, setToggleControls] = useState(false)\n\n let orientation: CollapseProps['orientation'] = 'vertical'\n\n switch (systemControlsType) {\n case SystemControlsType.Left: {\n orientation = 'horizontal'\n break\n }\n }\n\n return (\n <FlexRow className=\"controls\" {...props}>\n <Collapse in={toggleControls} orientation={orientation} timeout={500}>\n <FlexRow bgcolor=\"primary.main\" className=\"control\">\n {controlElement}\n </FlexRow>\n </Collapse>\n <FlexCol style={{ cursor: 'pointer' }} onClick={() => setToggleControls(!toggleControls)}>\n {children}\n </FlexCol>\n </FlexRow>\n )\n}\n\nexport { SystemControl }\n"],"mappings":";AAAA,SAAS,gBAA+B;AACxC,SAAuB,SAAS,eAAe;AAE/C,SAAS,gBAAgB;AA2BrB,SAEI,KAFJ;AAlBJ,IAAM,gBAA4D,CAAC;AAAA,EACjE;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAAS,KAAK;AAE1D,MAAI,cAA4C;AAEhD,UAAQ,oBAAoB;AAAA,IAC1B,wBAA8B;AAC5B,oBAAc;AACd;AAAA,IACF;AAAA,EACF;AAEA,SACE,qBAAC,WAAQ,WAAU,YAAY,GAAG,OAChC;AAAA,wBAAC,YAAS,IAAI,gBAAgB,aAA0B,SAAS,KAC/D,8BAAC,WAAQ,SAAQ,gBAAe,WAAU,WACvC,0BACH,GACF;AAAA,IACA,oBAAC,WAAQ,OAAO,EAAE,QAAQ,UAAU,GAAG,SAAS,MAAM,kBAAkB,CAAC,cAAc,GACpF,UACH;AAAA,KACF;AAEJ;","names":[]}