@wso2/oxygen-ui 0.0.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,228 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __spreadValues = (a, b) => {
7
+ for (var prop in b || (b = {}))
8
+ if (__hasOwnProp.call(b, prop))
9
+ __defNormalProp(a, prop, b[prop]);
10
+ if (__getOwnPropSymbols)
11
+ for (var prop of __getOwnPropSymbols(b)) {
12
+ if (__propIsEnum.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ }
15
+ return a;
16
+ };
17
+
18
+ // src/contexts/OxygenUIThemeProvider/OxygenUIThemeProvider.tsx
19
+ import { ThemeProvider as MUIThemeProvider, StyledEngineProvider } from "@mui/material/styles";
20
+ import { CssBaseline } from "@mui/material";
21
+
22
+ // src/styles/OxygenTheme/OxygenTheme.ts
23
+ import { createTheme } from "@mui/material/styles";
24
+ import "@fontsource-variable/inter";
25
+ var noShadows = Array(25).fill("none");
26
+ var OxygenTheme = createTheme({
27
+ typography: {
28
+ fontFamily: "'Inter Variable', sans-serif",
29
+ fontWeightRegular: 300,
30
+ fontSize: 14,
31
+ body1: {
32
+ fontSize: 14
33
+ },
34
+ body2: {
35
+ fontSize: 14
36
+ }
37
+ },
38
+ shadows: noShadows,
39
+ shape: {
40
+ borderRadius: 20
41
+ },
42
+ cssVariables: {
43
+ colorSchemeSelector: "data-color-scheme"
44
+ },
45
+ colorSchemes: {
46
+ light: {
47
+ palette: {
48
+ primary: {
49
+ main: "#F87643",
50
+ contrastText: "#ffffff"
51
+ },
52
+ secondary: {
53
+ main: "#e8e8e8"
54
+ },
55
+ background: {
56
+ default: "#f5f5f5",
57
+ paper: "#ffffff"
58
+ },
59
+ text: {
60
+ primary: "#40404B",
61
+ secondary: "#40404B"
62
+ },
63
+ divider: "#00000012"
64
+ }
65
+ },
66
+ dark: {
67
+ palette: {
68
+ primary: {
69
+ main: "#F87643",
70
+ contrastText: "#ffffff"
71
+ },
72
+ secondary: {
73
+ main: "#3c3c3c"
74
+ },
75
+ background: {
76
+ default: "#000000",
77
+ paper: "#00000088"
78
+ },
79
+ text: {
80
+ primary: "#efefef",
81
+ secondary: "#D0D3E2"
82
+ },
83
+ divider: "#fefefe12"
84
+ }
85
+ }
86
+ },
87
+ components: {
88
+ MuiButton: {
89
+ styleOverrides: {
90
+ root: {
91
+ borderRadius: 20,
92
+ textTransform: "none",
93
+ fontWeight: 400
94
+ },
95
+ containedPrimary: {
96
+ background: "linear-gradient(77.74deg, #eb4f63 11.16%, #fa7b3f 99.55%)",
97
+ color: "#fff",
98
+ "&:hover": {
99
+ background: "linear-gradient(77.74deg, #d0364b 11.16%, #f2621f 99.55%)",
100
+ color: "#fff"
101
+ }
102
+ }
103
+ }
104
+ },
105
+ MuiFormLabel: {
106
+ styleOverrides: {
107
+ root: ({ theme }) => ({
108
+ fontSize: theme.typography.body2.fontSize,
109
+ marginBottom: "4px"
110
+ })
111
+ }
112
+ },
113
+ MuiPaper: {
114
+ styleOverrides: {
115
+ root: ({ theme }) => __spreadValues(__spreadValues({
116
+ WebkitBackdropFilter: "blur(3px)",
117
+ backdropFilter: "blur(3px)"
118
+ }, theme.applyStyles("light", {
119
+ border: "1px solid #ffffff7a",
120
+ background: "rgb(230 230 230 / 5%)",
121
+ boxShadow: "0 5px 10px 0 rgba(6, 6, 14, 0.1), 0 0 0 0 rgba(199, 211, 234, 0.01) inset, 0 0 0 0 rgba(199, 211, 234, 0.12) inset"
122
+ })), theme.applyStyles("dark", {
123
+ border: "1px solid #d2d2d20f",
124
+ background: "rgb(230 230 230 / 5%)",
125
+ boxShadow: "hsla(220, 30%, 5%, 0.5) 0px 5px 15px 0px, hsla(220, 25%, 10%, 0.08) 0px 15px 35px -5px"
126
+ }))
127
+ }
128
+ },
129
+ MuiPopover: {
130
+ styleOverrides: {
131
+ paper: ({ theme }) => __spreadValues(__spreadValues({}, theme.applyStyles("light", {
132
+ background: "#ffffff9c"
133
+ })), theme.applyStyles("dark", {
134
+ background: "#040404c2"
135
+ }))
136
+ }
137
+ },
138
+ MuiTextField: {
139
+ defaultProps: { size: "small" }
140
+ },
141
+ MuiOutlinedInput: {
142
+ styleOverrides: {
143
+ root: ({ theme }) => __spreadValues(__spreadValues({
144
+ fontSize: theme.typography.body2.fontSize,
145
+ borderRadius: 8
146
+ }, theme.applyStyles("light", {
147
+ background: "#ffffffc4"
148
+ })), theme.applyStyles("dark", {
149
+ background: "#ffffff05"
150
+ })),
151
+ notchedOutline: ({ theme }) => __spreadValues(__spreadValues({
152
+ borderWidth: 1
153
+ }, theme.applyStyles("light", {
154
+ borderColor: "#d9d9d987"
155
+ })), theme.applyStyles("dark", {
156
+ borderColor: "#ffffff0d"
157
+ }))
158
+ }
159
+ },
160
+ MuiMenuItem: {
161
+ styleOverrides: {
162
+ root: ({ theme }) => ({
163
+ fontSize: theme.typography.body2.fontSize
164
+ })
165
+ }
166
+ },
167
+ MuiLink: {
168
+ styleOverrides: {
169
+ root: ({ theme }) => ({
170
+ color: theme.palette.primary.main,
171
+ textDecoration: "none",
172
+ "&:hover": {
173
+ color: theme.palette.primary.dark,
174
+ textDecoration: "underline"
175
+ }
176
+ })
177
+ }
178
+ },
179
+ MuiListItemButton: {
180
+ styleOverrides: {
181
+ root: { borderRadius: "8px" }
182
+ }
183
+ },
184
+ MuiDataGrid: {
185
+ styleOverrides: {
186
+ root: ({ theme }) => ({
187
+ border: "1px solid",
188
+ borderColor: theme.palette.divider,
189
+ backgroundColor: "transparent",
190
+ borderRadius: "8px",
191
+ overflow: "hidden",
192
+ "& .MuiDataGrid-columnHeaders": {
193
+ backgroundColor: "#ffffff0a",
194
+ borderBottom: "1px solid",
195
+ borderColor: theme.palette.divider
196
+ }
197
+ }),
198
+ columnHeaders: ({ theme }) => ({
199
+ backgroundColor: "#ffffff0a",
200
+ borderBottom: "1px solid",
201
+ borderColor: theme.palette.divider
202
+ }),
203
+ columnHeader: {
204
+ backgroundColor: "transparent"
205
+ },
206
+ cell: ({ theme }) => ({
207
+ borderBottom: "1px solid",
208
+ backgroundColor: "transparent",
209
+ borderColor: theme.palette.divider
210
+ })
211
+ }
212
+ }
213
+ }
214
+ });
215
+ var OxygenTheme_default = OxygenTheme;
216
+
217
+ // src/contexts/OxygenUIThemeProvider/OxygenUIThemeProvider.tsx
218
+ import { jsx, jsxs } from "react/jsx-runtime";
219
+ function OxygenUIThemeProvider({ children, theme }) {
220
+ return /* @__PURE__ */ jsx(StyledEngineProvider, { injectFirst: true, children: /* @__PURE__ */ jsxs(MUIThemeProvider, { theme: theme != null ? theme : OxygenTheme_default, children: [
221
+ /* @__PURE__ */ jsx(CssBaseline, {}),
222
+ children
223
+ ] }) });
224
+ }
225
+ export {
226
+ OxygenUIThemeProvider as default
227
+ };
228
+ //# sourceMappingURL=OxygenUIThemeProvider.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/contexts/OxygenUIThemeProvider/OxygenUIThemeProvider.tsx", "../../../src/styles/OxygenTheme/OxygenTheme.ts"],
4
+ "sourcesContent": ["/*\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport { ThemeProvider as MUIThemeProvider, StyledEngineProvider, Theme } from '@mui/material/styles';\nimport { CssBaseline } from '@mui/material';\nimport OxygenTheme from '../../styles/OxygenTheme/OxygenTheme';\n\nexport default function OxygenUIThemeProvider({ children, theme }: { children: React.ReactNode, theme?: Theme }) {\n return (\n <StyledEngineProvider injectFirst>\n <MUIThemeProvider theme={theme ?? OxygenTheme}>\n <CssBaseline />\n {children}\n </MUIThemeProvider>\n </StyledEngineProvider>\n );\n}\n", "/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport { createTheme } from '@mui/material/styles';\nimport type { Shadows } from '@mui/material/styles';\nimport type {} from '@mui/x-data-grid/themeAugmentation';\nimport '@fontsource-variable/inter';\n\nconst noShadows = Array(25).fill('none') as Shadows;\n\nconst OxygenTheme = createTheme({\n typography: {\n fontFamily: \"'Inter Variable', sans-serif\",\n fontWeightRegular: 300,\n fontSize: 14,\n body1: {\n fontSize: 14,\n },\n body2: {\n fontSize: 14,\n },\n },\n shadows: noShadows,\n shape: {\n borderRadius: 20,\n },\n cssVariables: {\n colorSchemeSelector: 'data-color-scheme',\n },\n colorSchemes: {\n light: {\n palette: {\n primary: {\n main: '#F87643',\n contrastText: '#ffffff',\n },\n secondary: {\n main: '#e8e8e8',\n },\n background: {\n default: '#f5f5f5',\n paper: '#ffffff',\n },\n text: {\n primary: '#40404B',\n secondary: '#40404B',\n },\n divider: '#00000012',\n },\n },\n dark: {\n palette: {\n primary: {\n main: '#F87643',\n contrastText: '#ffffff',\n },\n secondary: {\n main: '#3c3c3c',\n },\n background: {\n default: '#000000',\n paper: '#00000088',\n },\n text: {\n primary: '#efefef',\n secondary: '#D0D3E2',\n },\n divider: '#fefefe12',\n },\n },\n },\n components: {\n MuiButton: {\n styleOverrides: {\n root: {\n borderRadius: 20,\n textTransform: 'none',\n fontWeight: 400,\n },\n containedPrimary: {\n background: 'linear-gradient(77.74deg, #eb4f63 11.16%, #fa7b3f 99.55%)',\n color: '#fff',\n '&:hover': {\n background: 'linear-gradient(77.74deg, #d0364b 11.16%, #f2621f 99.55%)',\n color: '#fff',\n },\n },\n },\n },\n MuiFormLabel: {\n styleOverrides: {\n root: ({ theme }) => ({\n fontSize: theme.typography.body2.fontSize,\n marginBottom: '4px'\n }),\n },\n },\n MuiPaper: {\n styleOverrides: {\n root: ({ theme }) => ({\n WebkitBackdropFilter: 'blur(3px)',\n backdropFilter: 'blur(3px)',\n ...theme.applyStyles('light', {\n border: '1px solid #ffffff7a',\n background: 'rgb(230 230 230 / 5%)',\n boxShadow: \n '0 5px 10px 0 rgba(6, 6, 14, 0.1), ' +\n '0 0 0 0 rgba(199, 211, 234, 0.01) inset, ' +\n '0 0 0 0 rgba(199, 211, 234, 0.12) inset',\n }),\n ...theme.applyStyles('dark', {\n border: '1px solid #d2d2d20f',\n background: 'rgb(230 230 230 / 5%)',\n boxShadow: 'hsla(220, 30%, 5%, 0.5) 0px 5px 15px 0px, hsla(220, 25%, 10%, 0.08) 0px 15px 35px -5px',\n }),\n })\n }\n },\n MuiPopover: {\n styleOverrides: {\n paper: ({ theme }) => ({\n ...theme.applyStyles('light', {\n background: '#ffffff9c',\n }),\n ...theme.applyStyles('dark', {\n background: '#040404c2',\n }),\n })\n }\n },\n MuiTextField: {\n defaultProps: { size: 'small' },\n },\n MuiOutlinedInput: {\n styleOverrides: {\n root: ({ theme }) => ({\n fontSize: theme.typography.body2.fontSize,\n borderRadius: 8,\n ...theme.applyStyles('light', {\n background: '#ffffffc4'\n }),\n ...theme.applyStyles('dark', {\n background: '#ffffff05'\n })\n }),\n notchedOutline: ({ theme }) => ({\n borderWidth: 1,\n ...theme.applyStyles('light', {\n borderColor: '#d9d9d987'\n }),\n ...theme.applyStyles('dark', {\n borderColor: '#ffffff0d'\n })\n }),\n },\n },\n MuiMenuItem: {\n styleOverrides: {\n root: ({ theme }) => ({\n fontSize: theme.typography.body2.fontSize,\n }),\n },\n },\n MuiLink: {\n styleOverrides: {\n root: ({ theme }) => ({\n color: theme.palette.primary.main,\n textDecoration: 'none',\n '&:hover': {\n color: theme.palette.primary.dark,\n textDecoration: 'underline',\n },\n }),\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: { borderRadius: '8px' },\n },\n },\n MuiDataGrid: {\n styleOverrides: {\n root: ({ theme }) => ({\n border: '1px solid',\n borderColor: theme.palette.divider,\n backgroundColor: 'transparent',\n borderRadius: '8px',\n overflow: 'hidden',\n '& .MuiDataGrid-columnHeaders': {\n backgroundColor: '#ffffff0a',\n borderBottom: '1px solid',\n borderColor: theme.palette.divider,\n }\n }),\n columnHeaders: ({ theme }) => ({\n backgroundColor: '#ffffff0a',\n borderBottom: '1px solid',\n borderColor: theme.palette.divider,\n }),\n columnHeader: {\n backgroundColor: 'transparent',\n },\n cell: ({ theme }) => ({\n borderBottom: '1px solid',\n backgroundColor: 'transparent',\n borderColor: theme.palette.divider,\n }),\n },\n },\n },\n});\n\nexport default OxygenTheme;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAkBA,SAAS,iBAAiB,kBAAkB,4BAAmC;AAC/E,SAAS,mBAAmB;;;ACD5B,SAAS,mBAAmB;AAG5B,OAAO;AAEP,IAAM,YAAY,MAAM,EAAE,EAAE,KAAK,MAAM;AAEvC,IAAM,cAAc,YAAY;AAAA,EAC9B,YAAY;AAAA,IACV,YAAY;AAAA,IACZ,mBAAmB;AAAA,IACnB,UAAU;AAAA,IACV,OAAO;AAAA,MACL,UAAU;AAAA,IACZ;AAAA,IACA,OAAO;AAAA,MACL,UAAU;AAA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,0 +1,27 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ export { default as OxygenTheme } from "./styles/OxygenTheme/OxygenTheme";
19
+ export { default as OxygenUIThemeProvider } from "./contexts/OxygenUIThemeProvider/OxygenUIThemeProvider";
20
+ export { default as ColorSchemeImage } from "./components/ColorSchemeImage/ColorSchemeImage";
21
+ export { default as ColorSchemeToggle } from "./components/ColorSchemeToggle/ColorSchemeToggle";
22
+ export { default as Layout } from "./layouts";
23
+ export * from '@mui/material';
24
+ export * as Charts from '@mui/x-charts';
25
+ export * as DataGrid from '@mui/x-data-grid';
26
+ export * as DatePickers from '@mui/x-date-pickers';
27
+ export * as TreeView from '@mui/x-tree-view';
package/dist/index.js ADDED
@@ -0,0 +1,414 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+
33
+ // src/styles/OxygenTheme/OxygenTheme.ts
34
+ import { createTheme } from "@mui/material/styles";
35
+ import "@fontsource-variable/inter";
36
+ var noShadows = Array(25).fill("none");
37
+ var OxygenTheme = createTheme({
38
+ typography: {
39
+ fontFamily: "'Inter Variable', sans-serif",
40
+ fontWeightRegular: 300,
41
+ fontSize: 14,
42
+ body1: {
43
+ fontSize: 14
44
+ },
45
+ body2: {
46
+ fontSize: 14
47
+ }
48
+ },
49
+ shadows: noShadows,
50
+ shape: {
51
+ borderRadius: 20
52
+ },
53
+ cssVariables: {
54
+ colorSchemeSelector: "data-color-scheme"
55
+ },
56
+ colorSchemes: {
57
+ light: {
58
+ palette: {
59
+ primary: {
60
+ main: "#F87643",
61
+ contrastText: "#ffffff"
62
+ },
63
+ secondary: {
64
+ main: "#e8e8e8"
65
+ },
66
+ background: {
67
+ default: "#f5f5f5",
68
+ paper: "#ffffff"
69
+ },
70
+ text: {
71
+ primary: "#40404B",
72
+ secondary: "#40404B"
73
+ },
74
+ divider: "#00000012"
75
+ }
76
+ },
77
+ dark: {
78
+ palette: {
79
+ primary: {
80
+ main: "#F87643",
81
+ contrastText: "#ffffff"
82
+ },
83
+ secondary: {
84
+ main: "#3c3c3c"
85
+ },
86
+ background: {
87
+ default: "#000000",
88
+ paper: "#00000088"
89
+ },
90
+ text: {
91
+ primary: "#efefef",
92
+ secondary: "#D0D3E2"
93
+ },
94
+ divider: "#fefefe12"
95
+ }
96
+ }
97
+ },
98
+ components: {
99
+ MuiButton: {
100
+ styleOverrides: {
101
+ root: {
102
+ borderRadius: 20,
103
+ textTransform: "none",
104
+ fontWeight: 400
105
+ },
106
+ containedPrimary: {
107
+ background: "linear-gradient(77.74deg, #eb4f63 11.16%, #fa7b3f 99.55%)",
108
+ color: "#fff",
109
+ "&:hover": {
110
+ background: "linear-gradient(77.74deg, #d0364b 11.16%, #f2621f 99.55%)",
111
+ color: "#fff"
112
+ }
113
+ }
114
+ }
115
+ },
116
+ MuiFormLabel: {
117
+ styleOverrides: {
118
+ root: ({ theme }) => ({
119
+ fontSize: theme.typography.body2.fontSize,
120
+ marginBottom: "4px"
121
+ })
122
+ }
123
+ },
124
+ MuiPaper: {
125
+ styleOverrides: {
126
+ root: ({ theme }) => __spreadValues(__spreadValues({
127
+ WebkitBackdropFilter: "blur(3px)",
128
+ backdropFilter: "blur(3px)"
129
+ }, theme.applyStyles("light", {
130
+ border: "1px solid #ffffff7a",
131
+ background: "rgb(230 230 230 / 5%)",
132
+ boxShadow: "0 5px 10px 0 rgba(6, 6, 14, 0.1), 0 0 0 0 rgba(199, 211, 234, 0.01) inset, 0 0 0 0 rgba(199, 211, 234, 0.12) inset"
133
+ })), theme.applyStyles("dark", {
134
+ border: "1px solid #d2d2d20f",
135
+ background: "rgb(230 230 230 / 5%)",
136
+ boxShadow: "hsla(220, 30%, 5%, 0.5) 0px 5px 15px 0px, hsla(220, 25%, 10%, 0.08) 0px 15px 35px -5px"
137
+ }))
138
+ }
139
+ },
140
+ MuiPopover: {
141
+ styleOverrides: {
142
+ paper: ({ theme }) => __spreadValues(__spreadValues({}, theme.applyStyles("light", {
143
+ background: "#ffffff9c"
144
+ })), theme.applyStyles("dark", {
145
+ background: "#040404c2"
146
+ }))
147
+ }
148
+ },
149
+ MuiTextField: {
150
+ defaultProps: { size: "small" }
151
+ },
152
+ MuiOutlinedInput: {
153
+ styleOverrides: {
154
+ root: ({ theme }) => __spreadValues(__spreadValues({
155
+ fontSize: theme.typography.body2.fontSize,
156
+ borderRadius: 8
157
+ }, theme.applyStyles("light", {
158
+ background: "#ffffffc4"
159
+ })), theme.applyStyles("dark", {
160
+ background: "#ffffff05"
161
+ })),
162
+ notchedOutline: ({ theme }) => __spreadValues(__spreadValues({
163
+ borderWidth: 1
164
+ }, theme.applyStyles("light", {
165
+ borderColor: "#d9d9d987"
166
+ })), theme.applyStyles("dark", {
167
+ borderColor: "#ffffff0d"
168
+ }))
169
+ }
170
+ },
171
+ MuiMenuItem: {
172
+ styleOverrides: {
173
+ root: ({ theme }) => ({
174
+ fontSize: theme.typography.body2.fontSize
175
+ })
176
+ }
177
+ },
178
+ MuiLink: {
179
+ styleOverrides: {
180
+ root: ({ theme }) => ({
181
+ color: theme.palette.primary.main,
182
+ textDecoration: "none",
183
+ "&:hover": {
184
+ color: theme.palette.primary.dark,
185
+ textDecoration: "underline"
186
+ }
187
+ })
188
+ }
189
+ },
190
+ MuiListItemButton: {
191
+ styleOverrides: {
192
+ root: { borderRadius: "8px" }
193
+ }
194
+ },
195
+ MuiDataGrid: {
196
+ styleOverrides: {
197
+ root: ({ theme }) => ({
198
+ border: "1px solid",
199
+ borderColor: theme.palette.divider,
200
+ backgroundColor: "transparent",
201
+ borderRadius: "8px",
202
+ overflow: "hidden",
203
+ "& .MuiDataGrid-columnHeaders": {
204
+ backgroundColor: "#ffffff0a",
205
+ borderBottom: "1px solid",
206
+ borderColor: theme.palette.divider
207
+ }
208
+ }),
209
+ columnHeaders: ({ theme }) => ({
210
+ backgroundColor: "#ffffff0a",
211
+ borderBottom: "1px solid",
212
+ borderColor: theme.palette.divider
213
+ }),
214
+ columnHeader: {
215
+ backgroundColor: "transparent"
216
+ },
217
+ cell: ({ theme }) => ({
218
+ borderBottom: "1px solid",
219
+ backgroundColor: "transparent",
220
+ borderColor: theme.palette.divider
221
+ })
222
+ }
223
+ }
224
+ }
225
+ });
226
+ var OxygenTheme_default = OxygenTheme;
227
+
228
+ // src/contexts/OxygenUIThemeProvider/OxygenUIThemeProvider.tsx
229
+ import { ThemeProvider as MUIThemeProvider, StyledEngineProvider } from "@mui/material/styles";
230
+ import { CssBaseline } from "@mui/material";
231
+ import { jsx, jsxs } from "react/jsx-runtime";
232
+ function OxygenUIThemeProvider({ children, theme }) {
233
+ return /* @__PURE__ */ jsx(StyledEngineProvider, { injectFirst: true, children: /* @__PURE__ */ jsxs(MUIThemeProvider, { theme: theme != null ? theme : OxygenTheme_default, children: [
234
+ /* @__PURE__ */ jsx(CssBaseline, {}),
235
+ children
236
+ ] }) });
237
+ }
238
+
239
+ // src/components/ColorSchemeImage/ColorSchemeImage.tsx
240
+ import Box from "@mui/material/Box";
241
+ import { useColorScheme } from "@mui/material/styles";
242
+ import useMediaQuery from "@mui/material/useMediaQuery";
243
+ import { jsx as jsx2 } from "react/jsx-runtime";
244
+ function ColorSchemeImage(_a) {
245
+ var _b = _a, { src, alt, width = 16, height = 16 } = _b, rest = __objRest(_b, ["src", "alt", "width", "height"]);
246
+ const { mode } = useColorScheme();
247
+ const prefersDark = useMediaQuery("(prefers-color-scheme: dark)");
248
+ let actualMode;
249
+ if (mode === "system") {
250
+ actualMode = prefersDark ? "dark" : "light";
251
+ } else {
252
+ actualMode = mode;
253
+ }
254
+ const imageSrc = actualMode === "dark" ? src.dark : src.light;
255
+ let imageAlt;
256
+ if (typeof alt === "string") {
257
+ imageAlt = alt;
258
+ } else {
259
+ imageAlt = actualMode === "dark" ? alt.dark : alt.light;
260
+ }
261
+ return /* @__PURE__ */ jsx2(Box, __spreadValues({ component: "img", src: imageSrc, alt: imageAlt, width, height }, rest));
262
+ }
263
+
264
+ // src/components/ColorSchemeToggle/ColorSchemeToggle.tsx
265
+ import { useColorScheme as useColorScheme2 } from "@mui/material/styles";
266
+ import IconButton from "@mui/material/IconButton";
267
+ import { Moon, Monitor, Sun } from "@wso2/oxygen-ui-icons-react";
268
+ import { Tooltip } from "@mui/material";
269
+ import { jsx as jsx3 } from "react/jsx-runtime";
270
+ var ColorSchemeToggle = (_a) => {
271
+ var _b = _a, {
272
+ darkModeIcon,
273
+ lightModeIcon,
274
+ systemModeIcon
275
+ } = _b, buttonProps = __objRest(_b, [
276
+ "darkModeIcon",
277
+ "lightModeIcon",
278
+ "systemModeIcon"
279
+ ]);
280
+ const { mode, setMode } = useColorScheme2();
281
+ if (!mode) {
282
+ return null;
283
+ }
284
+ const nextMode = (currentMode2) => {
285
+ if (currentMode2 === "light") return "dark";
286
+ if (currentMode2 === "dark") return "system";
287
+ return "light";
288
+ };
289
+ const currentMode = mode != null ? mode : "system";
290
+ const ColorSchemeIcon = () => {
291
+ switch (currentMode) {
292
+ case "light":
293
+ return lightModeIcon != null ? lightModeIcon : /* @__PURE__ */ jsx3(Sun, {});
294
+ case "dark":
295
+ return darkModeIcon != null ? darkModeIcon : /* @__PURE__ */ jsx3(Moon, {});
296
+ default:
297
+ return systemModeIcon != null ? systemModeIcon : /* @__PURE__ */ jsx3(Monitor, {});
298
+ }
299
+ };
300
+ return /* @__PURE__ */ jsx3(Tooltip, { title: `${currentMode.charAt(0).toUpperCase()}${currentMode.slice(1)} Mode`, children: /* @__PURE__ */ jsx3(IconButton, __spreadProps(__spreadValues({}, buttonProps), { onClick: () => setMode(nextMode(currentMode)), children: /* @__PURE__ */ jsx3(ColorSchemeIcon, {}) })) });
301
+ };
302
+ var ColorSchemeToggle_default = ColorSchemeToggle;
303
+
304
+ // src/layouts/Layout.tsx
305
+ import Box2 from "@mui/material/Box";
306
+ import { jsx as jsx4 } from "react/jsx-runtime";
307
+ function Layout(_a) {
308
+ var _b = _a, { children = null, sx } = _b, rest = __objRest(_b, ["children", "sx"]);
309
+ return /* @__PURE__ */ jsx4(
310
+ Box2,
311
+ __spreadProps(__spreadValues({
312
+ sx: __spreadValues({
313
+ display: "flex",
314
+ flexDirection: "row"
315
+ }, sx)
316
+ }, rest), {
317
+ children
318
+ })
319
+ );
320
+ }
321
+ var Layout_default = Layout;
322
+
323
+ // src/layouts/LayoutSidebar.tsx
324
+ import Box3 from "@mui/material/Box";
325
+ import { jsx as jsx5 } from "react/jsx-runtime";
326
+ function LayoutSidebar(_a) {
327
+ var _b = _a, { children = null, sx } = _b, rest = __objRest(_b, ["children", "sx"]);
328
+ return /* @__PURE__ */ jsx5(
329
+ Box3,
330
+ __spreadProps(__spreadValues({
331
+ sx: __spreadValues({
332
+ display: "flex",
333
+ flexDirection: "column"
334
+ }, sx)
335
+ }, rest), {
336
+ children
337
+ })
338
+ );
339
+ }
340
+ var LayoutSidebar_default = LayoutSidebar;
341
+
342
+ // src/layouts/LayoutNavbar.tsx
343
+ function LayoutNavbar({ children = null }) {
344
+ return children;
345
+ }
346
+ var LayoutNavbar_default = LayoutNavbar;
347
+
348
+ // src/layouts/LayoutContent.tsx
349
+ import Box4 from "@mui/material/Box";
350
+ import { jsx as jsx6 } from "react/jsx-runtime";
351
+ function LayoutContent(_a) {
352
+ var _b = _a, { children = null } = _b, rest = __objRest(_b, ["children"]);
353
+ return /* @__PURE__ */ jsx6(
354
+ Box4,
355
+ __spreadProps(__spreadValues({
356
+ component: "main",
357
+ sx: {
358
+ display: "flex",
359
+ flexDirection: "column",
360
+ flexGrow: 1,
361
+ overflow: "auto"
362
+ }
363
+ }, rest), {
364
+ children
365
+ })
366
+ );
367
+ }
368
+ var LayoutContent_default = LayoutContent;
369
+
370
+ // src/layouts/LayoutHeader.tsx
371
+ import Box5 from "@mui/material/Box";
372
+ import { jsx as jsx7 } from "react/jsx-runtime";
373
+ function LayoutHeader(_a) {
374
+ var _b = _a, { children = null, sx } = _b, rest = __objRest(_b, ["children", "sx"]);
375
+ return /* @__PURE__ */ jsx7(
376
+ Box5,
377
+ __spreadProps(__spreadValues({
378
+ sx: __spreadValues({
379
+ display: "flex"
380
+ }, sx)
381
+ }, rest), {
382
+ children
383
+ })
384
+ );
385
+ }
386
+ var LayoutHeader_default = LayoutHeader;
387
+
388
+ // src/layouts/index.ts
389
+ var Layout2 = Object.assign(Layout_default, {
390
+ Sidebar: LayoutSidebar_default,
391
+ Navbar: LayoutNavbar_default,
392
+ Content: LayoutContent_default,
393
+ Header: LayoutHeader_default
394
+ });
395
+ var layouts_default = Layout2;
396
+
397
+ // src/index.ts
398
+ export * from "@mui/material";
399
+ import * as Charts from "@mui/x-charts";
400
+ import * as DataGrid from "@mui/x-data-grid";
401
+ import * as DatePickers from "@mui/x-date-pickers";
402
+ import * as TreeView from "@mui/x-tree-view";
403
+ export {
404
+ Charts,
405
+ ColorSchemeImage,
406
+ ColorSchemeToggle_default as ColorSchemeToggle,
407
+ DataGrid,
408
+ DatePickers,
409
+ layouts_default as Layout,
410
+ OxygenTheme_default as OxygenTheme,
411
+ OxygenUIThemeProvider,
412
+ TreeView
413
+ };
414
+ //# sourceMappingURL=index.js.map