@xyo-network/react-appbar 7.5.7 → 7.5.11
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/browser/components/MobileSystemControls/SystemControlsRoot.d.ts +2 -1
- package/dist/browser/components/MobileSystemControls/SystemControlsRoot.d.ts.map +1 -1
- package/dist/browser/index.mjs +217 -197
- package/dist/browser/index.mjs.map +1 -1
- package/package.json +100 -35
- package/src/components/AppBar/Application.stories.tsx +0 -85
- package/src/components/AppBar/Application.tsx +0 -27
- package/src/components/AppBar/index.ts +0 -1
- package/src/components/CollapsibleDrawer/CollapseDrawer.stories.tsx +0 -55
- package/src/components/CollapsibleDrawer/CollapseToggle.tsx +0 -35
- package/src/components/CollapsibleDrawer/CollapsibleDrawer.tsx +0 -41
- package/src/components/CollapsibleDrawer/index.ts +0 -2
- package/src/components/CollapsibleDrawer/storyExampleMenuData.tsx +0 -87
- package/src/components/MobileSystemControls/SystemControls.stories.tsx +0 -37
- package/src/components/MobileSystemControls/SystemControls.tsx +0 -15
- package/src/components/MobileSystemControls/SystemControlsRoot.tsx +0 -58
- package/src/components/MobileSystemControls/SystemControlsType.ts +0 -10
- package/src/components/MobileSystemControls/SystemControlsUnstyled.tsx +0 -42
- package/src/components/MobileSystemControls/controls/SystemControl.tsx +0 -46
- package/src/components/MobileSystemControls/controls/SystemControlText.tsx +0 -20
- package/src/components/MobileSystemControls/controls/index.ts +0 -2
- package/src/components/MobileSystemControls/index.ts +0 -3
- package/src/components/SearchBar/SearchBar.tsx +0 -55
- package/src/components/SearchBar/index.ts +0 -1
- package/src/components/Toolbar/Context/ContextToolbar.stories.tsx +0 -28
- package/src/components/Toolbar/Context/ContextToolbar.tsx +0 -21
- package/src/components/Toolbar/Context/Logo.tsx +0 -7
- package/src/components/Toolbar/Context/LogoLinkEx.tsx +0 -45
- package/src/components/Toolbar/Context/index.ts +0 -1
- package/src/components/Toolbar/System/SystemToolbar.stories.tsx +0 -59
- package/src/components/Toolbar/System/SystemToolbar.tsx +0 -43
- package/src/components/Toolbar/System/index.ts +0 -1
- package/src/components/Toolbar/index.ts +0 -2
- package/src/components/index.ts +0 -5
- package/src/global.d.ts +0 -1
- package/src/index.ts +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import type React from 'react';
|
|
1
2
|
import type { SystemControlsUnstyledProps } from './SystemControlsUnstyled.tsx';
|
|
2
|
-
declare const SystemControlsRoot:
|
|
3
|
+
declare const SystemControlsRoot: React.FC<SystemControlsUnstyledProps>;
|
|
3
4
|
export { SystemControlsRoot };
|
|
4
5
|
//# sourceMappingURL=SystemControlsRoot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SystemControlsRoot.d.ts","sourceRoot":"","sources":["../../../../src/components/MobileSystemControls/SystemControlsRoot.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SystemControlsRoot.d.ts","sourceRoot":"","sources":["../../../../src/components/MobileSystemControls/SystemControlsRoot.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAA;AAG/E,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAiD3D,CAAA;AAEH,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
|
package/dist/browser/index.mjs
CHANGED
|
@@ -1,153 +1,177 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
1
|
// src/components/AppBar/Application.tsx
|
|
5
2
|
import { ApplicationAppBar } from "@xylabs/react-appbar";
|
|
6
|
-
import React5 from "react";
|
|
7
3
|
|
|
8
4
|
// src/components/Toolbar/Context/ContextToolbar.tsx
|
|
9
5
|
import { Toolbar } from "@mui/material";
|
|
10
|
-
import React3 from "react";
|
|
11
6
|
|
|
12
7
|
// src/components/Toolbar/Context/LogoLinkEx.tsx
|
|
13
8
|
import { Typography, useTheme } from "@mui/material";
|
|
14
9
|
import { FlexRow } from "@xylabs/react-flexbox";
|
|
15
10
|
import { LinkEx } from "@xylabs/react-link";
|
|
16
11
|
import { assertEx } from "@xylabs/sdk-js";
|
|
17
|
-
import React2 from "react";
|
|
18
12
|
|
|
19
13
|
// src/components/Toolbar/Context/Logo.tsx
|
|
20
|
-
import
|
|
21
|
-
var Logo =
|
|
14
|
+
import { jsx } from "react/jsx-runtime";
|
|
15
|
+
var Logo = (props) => {
|
|
22
16
|
const logoUrl = "https://cdn.xy.company/img/brand/XYO/XYO_icon_white.svg";
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
|
|
25
|
-
...props
|
|
26
|
-
});
|
|
27
|
-
}, "Logo");
|
|
17
|
+
return /* @__PURE__ */ jsx("img", { src: logoUrl, ...props });
|
|
18
|
+
};
|
|
28
19
|
|
|
29
20
|
// src/components/Toolbar/Context/LogoLinkEx.tsx
|
|
30
|
-
|
|
21
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
22
|
+
var LogoLinkEx = ({
|
|
23
|
+
logo,
|
|
24
|
+
to = "/",
|
|
25
|
+
href,
|
|
26
|
+
version = false,
|
|
27
|
+
...props
|
|
28
|
+
}) => {
|
|
31
29
|
const theme = useTheme();
|
|
32
30
|
assertEx(href === void 0, () => "href is not supported");
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
return /* @__PURE__ */ jsx2(LinkEx, { to, sx: { "opacity": 0.8, "&:hover": { opacity: 1 } }, ...props, children: /* @__PURE__ */ jsxs(FlexRow, { paddingX: "4px", children: [
|
|
32
|
+
logo ?? /* @__PURE__ */ jsx2(Logo, { height: "40", width: "43" }),
|
|
33
|
+
version === void 0 ? null : /* @__PURE__ */ jsx2(
|
|
34
|
+
Typography,
|
|
35
|
+
{
|
|
36
|
+
position: "absolute",
|
|
37
|
+
borderRadius: 1,
|
|
38
|
+
right: 6,
|
|
39
|
+
color: theme.vars.palette.primary.main,
|
|
40
|
+
bottom: 0,
|
|
41
|
+
bgcolor: theme.vars.palette.primary.contrastText,
|
|
42
|
+
paddingX: "2px",
|
|
43
|
+
lineHeight: 1,
|
|
44
|
+
variant: "caption",
|
|
45
|
+
border: `1px ${theme.vars.palette.primary.main} solid`,
|
|
46
|
+
children: typeof version === "string" ? version : "2.1"
|
|
39
47
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
paddingX: "4px"
|
|
44
|
-
}, logo ?? /* @__PURE__ */ React2.createElement(Logo, {
|
|
45
|
-
height: "40",
|
|
46
|
-
width: "43"
|
|
47
|
-
}), version === void 0 ? null : /* @__PURE__ */ React2.createElement(Typography, {
|
|
48
|
-
position: "absolute",
|
|
49
|
-
borderRadius: 1,
|
|
50
|
-
right: 6,
|
|
51
|
-
color: theme.vars.palette.primary.main,
|
|
52
|
-
bottom: 0,
|
|
53
|
-
bgcolor: theme.vars.palette.primary.contrastText,
|
|
54
|
-
paddingX: "2px",
|
|
55
|
-
lineHeight: 1,
|
|
56
|
-
variant: "caption",
|
|
57
|
-
border: `1px ${theme.vars.palette.primary.main} solid`
|
|
58
|
-
}, typeof version === "string" ? version : "2.1")));
|
|
59
|
-
}, "LogoLinkEx");
|
|
48
|
+
)
|
|
49
|
+
] }) });
|
|
50
|
+
};
|
|
60
51
|
|
|
61
52
|
// src/components/Toolbar/Context/ContextToolbar.tsx
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
53
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
54
|
+
var XyoContextToolbar = ({
|
|
55
|
+
children,
|
|
56
|
+
logo,
|
|
57
|
+
logoTo = "/",
|
|
58
|
+
version = false,
|
|
59
|
+
...props
|
|
60
|
+
}) => {
|
|
61
|
+
return /* @__PURE__ */ jsxs2(Toolbar, { ...props, children: [
|
|
62
|
+
/* @__PURE__ */ jsx3(LogoLinkEx, { logo, version, to: logoTo }),
|
|
63
|
+
children
|
|
64
|
+
] });
|
|
65
|
+
};
|
|
69
66
|
|
|
70
67
|
// src/components/Toolbar/System/SystemToolbar.tsx
|
|
71
68
|
import { Paper } from "@mui/material";
|
|
72
|
-
import {
|
|
69
|
+
import {
|
|
70
|
+
SystemToolbar
|
|
71
|
+
} from "@xylabs/react-appbar";
|
|
73
72
|
import { FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
|
|
74
73
|
import { NetworkSelectEx } from "@xyo-network/react-network";
|
|
75
|
-
import
|
|
76
|
-
var XyoSystemToolbar =
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
74
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
75
|
+
var XyoSystemToolbar = ({
|
|
76
|
+
children,
|
|
77
|
+
hideNetworkSelect,
|
|
78
|
+
networkSelectProps,
|
|
79
|
+
precedingChildren,
|
|
80
|
+
...props
|
|
81
|
+
}) => {
|
|
82
|
+
return /* @__PURE__ */ jsxs3(SystemToolbar, { ...props, children: [
|
|
83
|
+
precedingChildren,
|
|
84
|
+
hideNetworkSelect ? null : /* @__PURE__ */ jsx4(FlexRow2, { marginX: 0.5, children: /* @__PURE__ */ jsx4(Paper, { variant: "elevation", children: /* @__PURE__ */ jsx4(NetworkSelectEx, { fullWidth: true, ...networkSelectProps }) }) }),
|
|
85
|
+
children
|
|
86
|
+
] });
|
|
87
|
+
};
|
|
86
88
|
|
|
87
89
|
// src/components/AppBar/Application.tsx
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
90
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
91
|
+
var XyoApplicationAppBar = ({
|
|
92
|
+
systemToolbar,
|
|
93
|
+
contextToolbar,
|
|
94
|
+
responsive = true,
|
|
95
|
+
...props
|
|
96
|
+
}) => {
|
|
97
|
+
return /* @__PURE__ */ jsx5(
|
|
98
|
+
ApplicationAppBar,
|
|
99
|
+
{
|
|
100
|
+
systemToolbar: systemToolbar ?? /* @__PURE__ */ jsx5(XyoSystemToolbar, {}),
|
|
101
|
+
contextToolbar: contextToolbar ?? /* @__PURE__ */ jsx5(XyoContextToolbar, {}),
|
|
102
|
+
position: "sticky",
|
|
103
|
+
responsive,
|
|
104
|
+
...props
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
};
|
|
97
108
|
|
|
98
109
|
// src/components/CollapsibleDrawer/CollapseToggle.tsx
|
|
99
110
|
import { Icon, useTheme as useTheme2 } from "@mui/material";
|
|
100
111
|
import { FlexRow as FlexRow3 } from "@xylabs/react-flexbox";
|
|
101
112
|
import { useCollapsible } from "@xylabs/react-shared";
|
|
102
|
-
import
|
|
113
|
+
import { useState } from "react";
|
|
103
114
|
import { VscArrowSmallLeft, VscArrowSmallRight } from "react-icons/vsc";
|
|
104
|
-
|
|
105
|
-
|
|
115
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
116
|
+
var CollapseToggleFlex = (props) => {
|
|
117
|
+
const {
|
|
118
|
+
collapse,
|
|
119
|
+
setCollapse,
|
|
120
|
+
setCollapseEnd
|
|
121
|
+
} = useCollapsible();
|
|
106
122
|
const [hover, setHover] = useState(false);
|
|
107
123
|
const theme = useTheme2();
|
|
108
|
-
const handleCollapseToggle =
|
|
124
|
+
const handleCollapseToggle = () => {
|
|
109
125
|
setCollapse?.(!collapse);
|
|
110
126
|
setCollapseEnd?.((previous) => previous ? false : previous);
|
|
111
|
-
}
|
|
112
|
-
return /* @__PURE__ */
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
fontSize: "large",
|
|
122
|
-
sx: {
|
|
123
|
-
color: hover ? theme.vars.palette.secondary.main : "inherit",
|
|
124
|
-
cursor: "pointer"
|
|
127
|
+
};
|
|
128
|
+
return /* @__PURE__ */ jsx6(FlexRow3, { mt: 2, py: 2, justifyContent: collapse ? "start" : "center", ...props, children: /* @__PURE__ */ jsx6(
|
|
129
|
+
Icon,
|
|
130
|
+
{
|
|
131
|
+
onClick: handleCollapseToggle,
|
|
132
|
+
onMouseEnter: () => setHover(true),
|
|
133
|
+
onMouseLeave: () => setHover(false),
|
|
134
|
+
fontSize: "large",
|
|
135
|
+
sx: { color: hover ? theme.vars.palette.secondary.main : "inherit", cursor: "pointer" },
|
|
136
|
+
children: collapse ? /* @__PURE__ */ jsx6(VscArrowSmallRight, {}) : /* @__PURE__ */ jsx6(VscArrowSmallLeft, {})
|
|
125
137
|
}
|
|
126
|
-
|
|
127
|
-
}
|
|
138
|
+
) });
|
|
139
|
+
};
|
|
128
140
|
|
|
129
141
|
// src/components/CollapsibleDrawer/CollapsibleDrawer.tsx
|
|
130
|
-
import {
|
|
142
|
+
import {
|
|
143
|
+
Collapse,
|
|
144
|
+
styled,
|
|
145
|
+
useTheme as useTheme3
|
|
146
|
+
} from "@mui/material";
|
|
131
147
|
import { useCollapsible as useCollapsible2 } from "@xylabs/react-shared";
|
|
132
|
-
import
|
|
133
|
-
var CollapsibleDrawer =
|
|
148
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
149
|
+
var CollapsibleDrawer = ({
|
|
150
|
+
children,
|
|
151
|
+
sx,
|
|
152
|
+
...props
|
|
153
|
+
}) => {
|
|
134
154
|
const { collapse, setCollapseEnd } = useCollapsible2();
|
|
135
155
|
const theme = useTheme3();
|
|
136
156
|
const collapsedSize = props.collapsedSize ?? theme.spacing(5);
|
|
137
|
-
return /* @__PURE__ */
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
157
|
+
return /* @__PURE__ */ jsx7(
|
|
158
|
+
CollapsibleFlexInner,
|
|
159
|
+
{
|
|
160
|
+
in: !collapse,
|
|
161
|
+
orientation: "horizontal",
|
|
162
|
+
collapsedSize,
|
|
163
|
+
onExited: () => setCollapseEnd?.(true),
|
|
164
|
+
sx: {
|
|
165
|
+
alignItems: "start",
|
|
166
|
+
display: "flex",
|
|
167
|
+
height: "100%",
|
|
168
|
+
...sx
|
|
169
|
+
},
|
|
170
|
+
...props,
|
|
171
|
+
children
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
};
|
|
151
175
|
var CollapsibleFlexInner = styled(Collapse)(() => ({
|
|
152
176
|
"& .MuiCollapse-wrapperInner": {
|
|
153
177
|
display: "flex",
|
|
@@ -157,7 +181,6 @@ var CollapsibleFlexInner = styled(Collapse)(() => ({
|
|
|
157
181
|
|
|
158
182
|
// src/components/MobileSystemControls/SystemControls.tsx
|
|
159
183
|
import { FlexCol as FlexCol3 } from "@xylabs/react-flexbox";
|
|
160
|
-
import React10 from "react";
|
|
161
184
|
|
|
162
185
|
// src/components/MobileSystemControls/SystemControlsRoot.tsx
|
|
163
186
|
import { styled as styled2 } from "@mui/material";
|
|
@@ -174,13 +197,18 @@ var SystemControlsType = Enum({
|
|
|
174
197
|
import { Paper as Paper2, useMediaQuery } from "@mui/material";
|
|
175
198
|
import { FlexCol as FlexCol2, FlexRow as FlexRow5 } from "@xylabs/react-flexbox";
|
|
176
199
|
import { NetworkSelectEx as NetworkSelectEx2 } from "@xyo-network/react-network";
|
|
177
|
-
import React9 from "react";
|
|
178
200
|
|
|
179
201
|
// src/components/MobileSystemControls/controls/SystemControl.tsx
|
|
180
202
|
import { Collapse as Collapse2 } from "@mui/material";
|
|
181
203
|
import { FlexCol, FlexRow as FlexRow4 } from "@xylabs/react-flexbox";
|
|
182
|
-
import
|
|
183
|
-
|
|
204
|
+
import { useState as useState2 } from "react";
|
|
205
|
+
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
206
|
+
var SystemControl = ({
|
|
207
|
+
children,
|
|
208
|
+
controlElement,
|
|
209
|
+
systemControlsType = SystemControlsType.WindowShade,
|
|
210
|
+
...props
|
|
211
|
+
}) => {
|
|
184
212
|
const [toggleControls, setToggleControls] = useState2(false);
|
|
185
213
|
let orientation = "vertical";
|
|
186
214
|
switch (systemControlsType) {
|
|
@@ -189,54 +217,34 @@ var SystemControl = /* @__PURE__ */ __name(({ children, controlElement, systemCo
|
|
|
189
217
|
break;
|
|
190
218
|
}
|
|
191
219
|
}
|
|
192
|
-
return /* @__PURE__ */
|
|
193
|
-
className: "
|
|
194
|
-
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
orientation,
|
|
198
|
-
timeout: 500
|
|
199
|
-
}, /* @__PURE__ */ React8.createElement(FlexRow4, {
|
|
200
|
-
bgcolor: "primary.main",
|
|
201
|
-
className: "control"
|
|
202
|
-
}, controlElement)), /* @__PURE__ */ React8.createElement(FlexCol, {
|
|
203
|
-
style: {
|
|
204
|
-
cursor: "pointer"
|
|
205
|
-
},
|
|
206
|
-
onClick: /* @__PURE__ */ __name(() => setToggleControls(!toggleControls), "onClick")
|
|
207
|
-
}, children));
|
|
208
|
-
}, "SystemControl");
|
|
220
|
+
return /* @__PURE__ */ jsxs4(FlexRow4, { className: "controls", ...props, children: [
|
|
221
|
+
/* @__PURE__ */ jsx8(Collapse2, { in: toggleControls, orientation, timeout: 500, children: /* @__PURE__ */ jsx8(FlexRow4, { bgcolor: "primary.main", className: "control", children: controlElement }) }),
|
|
222
|
+
/* @__PURE__ */ jsx8(FlexCol, { style: { cursor: "pointer" }, onClick: () => setToggleControls(!toggleControls), children })
|
|
223
|
+
] });
|
|
224
|
+
};
|
|
209
225
|
|
|
210
226
|
// src/components/MobileSystemControls/SystemControlsUnstyled.tsx
|
|
211
|
-
|
|
227
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
228
|
+
var SystemControlsUnstyled = ({
|
|
229
|
+
visible,
|
|
230
|
+
systemControlsType = SystemControlsType.WindowShade,
|
|
231
|
+
...props
|
|
232
|
+
}) => {
|
|
212
233
|
const isSmall = useMediaQuery((theme) => theme.breakpoints.down("sm"));
|
|
213
|
-
return visible || isSmall ? /* @__PURE__ */
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
variant: "elevation",
|
|
222
|
-
elevation: 0
|
|
223
|
-
}, /* @__PURE__ */ React9.createElement(NetworkSelectEx2, {
|
|
224
|
-
responsive: false,
|
|
225
|
-
className: "network-ex"
|
|
226
|
-
})))
|
|
227
|
-
})) : /* @__PURE__ */ React9.createElement(FlexCol2, null);
|
|
228
|
-
}, "SystemControlsUnstyled");
|
|
234
|
+
return visible || isSmall ? /* @__PURE__ */ jsx9(FlexCol2, { ...props, className: `${props.className} system-controls-type-${systemControlsType}`, children: /* @__PURE__ */ jsx9(
|
|
235
|
+
SystemControl,
|
|
236
|
+
{
|
|
237
|
+
systemControlsType,
|
|
238
|
+
controlElement: /* @__PURE__ */ jsx9(FlexRow5, { className: "control-wrap", children: /* @__PURE__ */ jsx9(Paper2, { variant: "elevation", elevation: 0, children: /* @__PURE__ */ jsx9(NetworkSelectEx2, { responsive: false, className: "network-ex" }) }) })
|
|
239
|
+
}
|
|
240
|
+
) }) : /* @__PURE__ */ jsx9(FlexCol2, {});
|
|
241
|
+
};
|
|
229
242
|
|
|
230
243
|
// src/components/MobileSystemControls/SystemControlsRoot.tsx
|
|
231
|
-
var SystemControlsRoot = styled2(SystemControlsUnstyled, {
|
|
232
|
-
name: "SystemControls",
|
|
233
|
-
slot: "Root"
|
|
234
|
-
})(({ theme }) => ({
|
|
244
|
+
var SystemControlsRoot = styled2(SystemControlsUnstyled, { name: "SystemControls", slot: "Root" })(({ theme }) => ({
|
|
235
245
|
// shared defaults
|
|
236
246
|
["&"]: {
|
|
237
|
-
".toggle": {
|
|
238
|
-
backgroundColor: theme.vars.palette.primary.main
|
|
239
|
-
},
|
|
247
|
+
".toggle": { backgroundColor: theme.vars.palette.primary.main },
|
|
240
248
|
"alignItems": "start",
|
|
241
249
|
"zIndex": 1
|
|
242
250
|
},
|
|
@@ -270,9 +278,7 @@ var SystemControlsRoot = styled2(SystemControlsUnstyled, {
|
|
|
270
278
|
flexDirection: "column",
|
|
271
279
|
padding: `${theme.spacing(2)} ${theme.spacing(2.5)}`
|
|
272
280
|
},
|
|
273
|
-
".control-wrap": {
|
|
274
|
-
marginBottom: `${theme.spacing(2)}`
|
|
275
|
-
},
|
|
281
|
+
".control-wrap": { marginBottom: `${theme.spacing(2)}` },
|
|
276
282
|
".toggle": {
|
|
277
283
|
borderRadius: "0 5px 5px 0",
|
|
278
284
|
padding: `${theme.spacing(1)} ${theme.spacing(0.5)}`,
|
|
@@ -287,58 +293,72 @@ var SystemControlsRoot = styled2(SystemControlsUnstyled, {
|
|
|
287
293
|
}));
|
|
288
294
|
|
|
289
295
|
// src/components/MobileSystemControls/SystemControls.tsx
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
296
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
297
|
+
var SystemControls = (props) => {
|
|
298
|
+
return /* @__PURE__ */ jsx10(FlexCol3, { children: /* @__PURE__ */ jsx10(SystemControlsRoot, { ...props }) });
|
|
299
|
+
};
|
|
293
300
|
|
|
294
301
|
// src/components/SearchBar/SearchBar.tsx
|
|
295
302
|
import { Search as SearchIcon } from "@mui/icons-material";
|
|
296
303
|
import { Paper as Paper3, TextField } from "@mui/material";
|
|
297
304
|
import { ButtonEx } from "@xylabs/react-button";
|
|
298
305
|
import { FlexRow as FlexRow6 } from "@xylabs/react-flexbox";
|
|
299
|
-
import
|
|
300
|
-
|
|
306
|
+
import { useState as useState3 } from "react";
|
|
307
|
+
import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
308
|
+
var SearchBar = ({
|
|
309
|
+
defaultValue,
|
|
310
|
+
onSearch,
|
|
311
|
+
...props
|
|
312
|
+
}) => {
|
|
301
313
|
const [term, setTerm] = useState3();
|
|
302
|
-
return /* @__PURE__ */
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
314
|
+
return /* @__PURE__ */ jsx11(FlexRow6, { alignItems: "stretch", ...props, children: /* @__PURE__ */ jsxs5(
|
|
315
|
+
Paper3,
|
|
316
|
+
{
|
|
317
|
+
variant: "elevation",
|
|
318
|
+
elevation: 0,
|
|
319
|
+
style: {
|
|
320
|
+
display: "flex",
|
|
321
|
+
overflow: "hidden",
|
|
322
|
+
width: "100%"
|
|
323
|
+
},
|
|
324
|
+
children: [
|
|
325
|
+
/* @__PURE__ */ jsx11(
|
|
326
|
+
TextField,
|
|
327
|
+
{
|
|
328
|
+
variant: "outlined",
|
|
329
|
+
size: "small",
|
|
330
|
+
defaultValue,
|
|
331
|
+
fullWidth: true,
|
|
332
|
+
onChange: (event) => setTerm(event.target.value),
|
|
333
|
+
onKeyDown: (event) => {
|
|
334
|
+
if (event.key === "Enter") onSearch?.(term);
|
|
335
|
+
},
|
|
336
|
+
slotProps: {
|
|
337
|
+
input: {
|
|
338
|
+
color: "secondary",
|
|
339
|
+
style: {
|
|
340
|
+
borderBottomRightRadius: 0,
|
|
341
|
+
borderTopRightRadius: 0,
|
|
342
|
+
borderWidth: 0
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
),
|
|
348
|
+
/* @__PURE__ */ jsx11(
|
|
349
|
+
ButtonEx,
|
|
350
|
+
{
|
|
351
|
+
variant: "contained",
|
|
352
|
+
style: { borderRadius: 0, borderTopLeftRadius: 0 },
|
|
353
|
+
color: "secondary",
|
|
354
|
+
onClick: () => onSearch?.(term),
|
|
355
|
+
children: /* @__PURE__ */ jsx11(SearchIcon, {})
|
|
356
|
+
}
|
|
357
|
+
)
|
|
358
|
+
]
|
|
331
359
|
}
|
|
332
|
-
})
|
|
333
|
-
|
|
334
|
-
style: {
|
|
335
|
-
borderRadius: 0,
|
|
336
|
-
borderTopLeftRadius: 0
|
|
337
|
-
},
|
|
338
|
-
color: "secondary",
|
|
339
|
-
onClick: /* @__PURE__ */ __name(() => onSearch?.(term), "onClick")
|
|
340
|
-
}, /* @__PURE__ */ React11.createElement(SearchIcon, null))));
|
|
341
|
-
}, "SearchBar");
|
|
360
|
+
) });
|
|
361
|
+
};
|
|
342
362
|
export {
|
|
343
363
|
CollapseToggleFlex,
|
|
344
364
|
CollapsibleDrawer,
|