@red-hat-developer-hub/backstage-plugin-mui5-test 0.0.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.
package/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # mui5-test
2
+
3
+ Welcome to the mui5-test plugin!
4
+
5
+ _This plugin was created through the Backstage CLI_
6
+
7
+ ## Getting started
8
+
9
+ Your plugin has been added to the example app in this repository, meaning you'll be able to access it by running `yarn start` in the root directory, and then navigating to [/mui5-test](http://localhost:3000/mui5-test).
10
+
11
+ You can also serve the plugin in isolation by running `yarn start` in the plugin directory.
12
+ This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads.
13
+ It is only meant for local development, and the setup for it can be found inside the [/dev](./dev) directory.
@@ -0,0 +1,145 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { InfoCard } from '@backstage/core-components';
3
+ import Button from '@mui/material/Button';
4
+ import FormControlLabel from '@mui/material/FormControlLabel';
5
+ import Checkbox from '@mui/material/Checkbox';
6
+ import Switch from '@mui/material/Switch';
7
+
8
+ const Buttons = () => {
9
+ const colors = [
10
+ undefined,
11
+ "inherit",
12
+ "primary",
13
+ "secondary",
14
+ "success",
15
+ "error",
16
+ "info",
17
+ "warning"
18
+ ];
19
+ const variants = ["contained", "outlined", "text"];
20
+ return /* @__PURE__ */ jsxs("table", { style: { borderSpacing: 8 }, children: [
21
+ /* @__PURE__ */ jsxs("tr", { children: [
22
+ /* @__PURE__ */ jsx("th", { children: "\xA0" }),
23
+ /* @__PURE__ */ jsx("th", { colSpan: 3, children: "enabled" }),
24
+ /* @__PURE__ */ jsx("th", { colSpan: 3, children: "disabled" })
25
+ ] }),
26
+ /* @__PURE__ */ jsxs("tr", { children: [
27
+ /* @__PURE__ */ jsx("th", { children: "color" }),
28
+ variants.map((variant) => /* @__PURE__ */ jsx("th", { children: variant }, variant))
29
+ ] }),
30
+ colors.map((color) => /* @__PURE__ */ jsxs("tr", { children: [
31
+ /* @__PURE__ */ jsx("td", { children: color ?? "no color" }),
32
+ variants.map((variant) => /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Button, { color, variant, children: "a button" }) }, variant)),
33
+ variants.map((variant) => /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Button, { color, variant, disabled: true, children: "a button" }) }, variant))
34
+ ] }, color))
35
+ ] });
36
+ };
37
+ const Checkboxes = () => {
38
+ const colors = [
39
+ undefined,
40
+ "primary",
41
+ "secondary",
42
+ "error",
43
+ "info",
44
+ "success",
45
+ "warning",
46
+ "default"
47
+ ];
48
+ return /* @__PURE__ */ jsxs("table", { children: [
49
+ /* @__PURE__ */ jsxs("tr", { children: [
50
+ /* @__PURE__ */ jsx("th", { children: "color" }),
51
+ /* @__PURE__ */ jsx("th", { children: "enabled" }),
52
+ /* @__PURE__ */ jsx("th", { children: "disabled" })
53
+ ] }),
54
+ colors.map((color) => /* @__PURE__ */ jsxs("tr", { children: [
55
+ /* @__PURE__ */ jsx("td", { children: color ?? "no color" }),
56
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(
57
+ FormControlLabel,
58
+ {
59
+ control: /* @__PURE__ */ jsx(Checkbox, { defaultChecked: true, color }),
60
+ label: "a checkbox"
61
+ }
62
+ ) }),
63
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(
64
+ FormControlLabel,
65
+ {
66
+ control: /* @__PURE__ */ jsx(Checkbox, { defaultChecked: true, color }),
67
+ label: "a checkbox",
68
+ disabled: true
69
+ }
70
+ ) })
71
+ ] }, color))
72
+ ] });
73
+ };
74
+ const Switches = () => {
75
+ const colors = [
76
+ undefined,
77
+ "primary",
78
+ "secondary",
79
+ "error",
80
+ "info",
81
+ "success",
82
+ "warning",
83
+ "default"
84
+ ];
85
+ return /* @__PURE__ */ jsxs("table", { children: [
86
+ /* @__PURE__ */ jsxs("tr", { children: [
87
+ /* @__PURE__ */ jsx("th", { children: "color" }),
88
+ /* @__PURE__ */ jsx("th", { children: "enabled on" }),
89
+ /* @__PURE__ */ jsx("th", { children: "enabled off" }),
90
+ /* @__PURE__ */ jsx("th", { children: "disabled on" }),
91
+ /* @__PURE__ */ jsx("th", { children: "disabled off" })
92
+ ] }),
93
+ colors.map((color) => /* @__PURE__ */ jsxs("tr", { children: [
94
+ /* @__PURE__ */ jsx("td", { children: color ?? "no color" }),
95
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(
96
+ FormControlLabel,
97
+ {
98
+ control: /* @__PURE__ */ jsx(Switch, { checked: true, color }),
99
+ label: "a switch"
100
+ }
101
+ ) }),
102
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(
103
+ FormControlLabel,
104
+ {
105
+ control: /* @__PURE__ */ jsx(Switch, { color }),
106
+ label: "a switch"
107
+ }
108
+ ) }),
109
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(
110
+ FormControlLabel,
111
+ {
112
+ control: /* @__PURE__ */ jsx(Switch, { color }),
113
+ label: "a switch",
114
+ disabled: true
115
+ }
116
+ ) }),
117
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(
118
+ FormControlLabel,
119
+ {
120
+ control: /* @__PURE__ */ jsx(Switch, { checked: true, color }),
121
+ label: "a switch",
122
+ disabled: true
123
+ }
124
+ ) })
125
+ ] }, color))
126
+ ] });
127
+ };
128
+ const FormComponents = () => {
129
+ return /* @__PURE__ */ jsxs("div", { children: [
130
+ /* @__PURE__ */ jsxs(InfoCard, { title: "Information card", children: [
131
+ /* @__PURE__ */ jsx(Buttons, {}),
132
+ /* @__PURE__ */ jsx("br", {}),
133
+ /* @__PURE__ */ jsx(Checkboxes, {})
134
+ ] }),
135
+ /* @__PURE__ */ jsx("br", {}),
136
+ /* @__PURE__ */ jsx(Buttons, {}),
137
+ /* @__PURE__ */ jsx("br", {}),
138
+ /* @__PURE__ */ jsx(Checkboxes, {}),
139
+ /* @__PURE__ */ jsx("br", {}),
140
+ /* @__PURE__ */ jsx(Switches, {})
141
+ ] });
142
+ };
143
+
144
+ export { FormComponents };
145
+ //# sourceMappingURL=FormComponents.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormComponents.esm.js","sources":["../../src/components/FormComponents.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except 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, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { InfoCard } from '@backstage/core-components';\nimport Button, { ButtonProps } from '@mui/material/Button';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Checkbox, { CheckboxProps } from '@mui/material/Checkbox';\nimport Switch, { SwitchProps } from '@mui/material/Switch';\n\nconst Buttons = () => {\n const colors: ButtonProps['color'][] = [\n undefined,\n 'inherit',\n 'primary',\n 'secondary',\n 'success',\n 'error',\n 'info',\n 'warning',\n ];\n const variants: ButtonProps['variant'][] = ['contained', 'outlined', 'text'];\n return (\n <table style={{ borderSpacing: 8 }}>\n <tr>\n <th>&nbsp;</th>\n <th colSpan={3}>enabled</th>\n <th colSpan={3}>disabled</th>\n </tr>\n <tr>\n <th>color</th>\n {variants.map(variant => (\n <th key={variant}>{variant}</th>\n ))}\n </tr>\n {colors.map(color => (\n <tr key={color}>\n <td>{color ?? 'no color'}</td>\n {variants.map(variant => (\n <td key={variant}>\n <Button color={color} variant={variant}>\n a button\n </Button>\n </td>\n ))}\n {variants.map(variant => (\n <td key={variant}>\n <Button color={color} variant={variant} disabled>\n a button\n </Button>\n </td>\n ))}\n </tr>\n ))}\n </table>\n );\n};\n\nconst Checkboxes = () => {\n const colors: CheckboxProps['color'][] = [\n undefined,\n 'primary',\n 'secondary',\n 'error',\n 'info',\n 'success',\n 'warning',\n 'default',\n ];\n return (\n <table>\n <tr>\n <th>color</th>\n <th>enabled</th>\n <th>disabled</th>\n </tr>\n {colors.map(color => (\n <tr key={color}>\n <td>{color ?? 'no color'}</td>\n <td>\n <FormControlLabel\n control={<Checkbox defaultChecked color={color} />}\n label=\"a checkbox\"\n />\n </td>\n <td>\n <FormControlLabel\n control={<Checkbox defaultChecked color={color} />}\n label=\"a checkbox\"\n disabled\n />\n </td>\n </tr>\n ))}\n </table>\n );\n};\n\nconst Switches = () => {\n const colors: SwitchProps['color'][] = [\n undefined,\n 'primary',\n 'secondary',\n 'error',\n 'info',\n 'success',\n 'warning',\n 'default',\n ];\n return (\n <table>\n <tr>\n <th>color</th>\n <th>enabled on</th>\n <th>enabled off</th>\n <th>disabled on</th>\n <th>disabled off</th>\n </tr>\n {colors.map(color => (\n <tr key={color}>\n <td>{color ?? 'no color'}</td>\n <td>\n <FormControlLabel\n control={<Switch checked color={color} />}\n label=\"a switch\"\n />\n </td>\n <td>\n <FormControlLabel\n control={<Switch color={color} />}\n label=\"a switch\"\n />\n </td>\n <td>\n <FormControlLabel\n control={<Switch color={color} />}\n label=\"a switch\"\n disabled\n />\n </td>\n <td>\n <FormControlLabel\n control={<Switch checked color={color} />}\n label=\"a switch\"\n disabled\n />\n </td>\n </tr>\n ))}\n </table>\n );\n};\n\nexport const FormComponents = () => {\n return (\n <div>\n <InfoCard title=\"Information card\">\n <Buttons />\n <br />\n <Checkboxes />\n </InfoCard>\n <br />\n <Buttons />\n <br />\n <Checkboxes />\n <br />\n <Switches />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAsBA,MAAM,UAAU,MAAM;AACpB,EAAA,MAAM,MAAiC,GAAA;AAAA,IACrC,SAAA;AAAA,IACA,SAAA;AAAA,IACA,SAAA;AAAA,IACA,WAAA;AAAA,IACA,SAAA;AAAA,IACA,OAAA;AAAA,IACA,MAAA;AAAA,IACA;AAAA,GACF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
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import { useState } from 'react';
3
+ import Box from '@mui/material/Box';
4
+ import Card from '@mui/material/Card';
5
+ import Checkbox from '@mui/material/Checkbox';
6
+ import FormControlLabel from '@mui/material/FormControlLabel';
7
+ import Grid from '@mui/material/Grid';
8
+
9
+ const GridContainer = (props) => /* @__PURE__ */ jsx(Grid, { container: true, ...props });
10
+ const GridItem = (props) => /* @__PURE__ */ jsx(
11
+ Grid,
12
+ {
13
+ item: true,
14
+ xs: 12,
15
+ sm: 6,
16
+ md: 4,
17
+ lg: 3,
18
+ xl: 2,
19
+ ...props
20
+ }
21
+ );
22
+ const CommonGridExamples = () => {
23
+ const cards = Array.from({ length: 8 }, (_, i) => i + 1);
24
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
25
+ /* @__PURE__ */ jsx("h1", { children: "Default: Grid container without spacing, an unstyled Grid item and an unstyled Card" }),
26
+ /* @__PURE__ */ jsx(GridContainer, { children: cards.map((cardContent) => /* @__PURE__ */ jsx(GridItem, { children: /* @__PURE__ */ jsx(Card, { children: cardContent }) }, cardContent)) }),
27
+ /* @__PURE__ */ jsx("h1", { children: "Grid container with spacing=2, an unstyled Grid item and an unstyled Card" }),
28
+ /* @__PURE__ */ jsx(GridContainer, { spacing: 2, children: cards.map((cardContent) => /* @__PURE__ */ jsx(GridItem, { children: /* @__PURE__ */ jsx(Card, { children: cardContent }) }, cardContent)) }),
29
+ /* @__PURE__ */ jsx("h1", { children: "Grid container with spacing=4, an unstyled Grid item and a Card with padding=2" }),
30
+ /* @__PURE__ */ jsx(GridContainer, { spacing: 4, children: cards.map((cardContent) => /* @__PURE__ */ jsx(GridItem, { children: /* @__PURE__ */ jsx(Card, { sx: { p: 2 }, children: cardContent }) }, cardContent)) })
31
+ ] });
32
+ };
33
+ const DebugGridExamples = () => {
34
+ const backgroundColors = [
35
+ "#600",
36
+ "#060",
37
+ "#800",
38
+ "#080",
39
+ "#a00",
40
+ "#0a0",
41
+ "#d00",
42
+ "#0d0"
43
+ ];
44
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
45
+ /* @__PURE__ */ jsx("h1", { children: "Grid container without spacing, an unstyled Grid item and colorized Card" }),
46
+ /* @__PURE__ */ jsx(GridContainer, { children: backgroundColors.map((backgroundColor, index) => /* @__PURE__ */ jsx(GridItem, { children: /* @__PURE__ */ jsx(Card, { sx: { color: "#ffffff", backgroundColor }, children: index + 1 }) }, backgroundColor)) }),
47
+ /* @__PURE__ */ jsx("h1", { children: "Grid container with colorized Grid item to show one-sided padding, Card position is fine" }),
48
+ /* @__PURE__ */ jsx(GridContainer, { children: backgroundColors.map((backgroundColor, index) => /* @__PURE__ */ jsx(
49
+ GridItem,
50
+ {
51
+ sx: { color: "#ffffff", backgroundColor },
52
+ children: /* @__PURE__ */ jsx(Card, { children: index + 1 })
53
+ },
54
+ backgroundColor
55
+ )) }),
56
+ /* @__PURE__ */ jsx("h1", { children: "Grid container with spacing=4, an unstyled Grid item and a colorized Card with p=2" }),
57
+ /* @__PURE__ */ jsx(GridContainer, { spacing: 4, children: backgroundColors.map((backgroundColor, index) => /* @__PURE__ */ jsx(GridItem, { children: /* @__PURE__ */ jsx(Card, { sx: { color: "#ffffff", backgroundColor, p: 2 }, children: index + 1 }) }, backgroundColor)) }),
58
+ /* @__PURE__ */ jsx("h1", { children: "Grid container with spacing=4, an colorized Grid item to show one-sided padding, Card position is fine" }),
59
+ /* @__PURE__ */ jsx(GridContainer, { spacing: 4, children: backgroundColors.map((backgroundColor, index) => /* @__PURE__ */ jsx(
60
+ GridItem,
61
+ {
62
+ sx: { color: "#ffffff", backgroundColor },
63
+ children: /* @__PURE__ */ jsx(Card, { sx: { p: 2 }, children: index + 1 })
64
+ },
65
+ backgroundColor
66
+ )) }),
67
+ /* @__PURE__ */ jsx("h1", { children: "Grid container without spacing and Grid item with p=4 result in unaligned Cards! (Too much padding on the right side!)" }),
68
+ /* @__PURE__ */ jsx(GridContainer, { children: backgroundColors.map((backgroundColor, index) => /* @__PURE__ */ jsx(
69
+ GridItem,
70
+ {
71
+ sx: { color: "#ffffff", backgroundColor, p: 4 },
72
+ children: /* @__PURE__ */ jsx(Card, { children: index + 1 })
73
+ },
74
+ backgroundColor
75
+ )) }),
76
+ /* @__PURE__ */ jsx("h1", { children: "Grid container with spacing=4 and Grid item with p=4 result also in unaligned Cards! (Too much padding on the right side!)" }),
77
+ /* @__PURE__ */ jsx(GridContainer, { spacing: 4, children: backgroundColors.map((backgroundColor, index) => /* @__PURE__ */ jsx(
78
+ GridItem,
79
+ {
80
+ sx: { color: "#ffffff", backgroundColor, p: 4 },
81
+ children: /* @__PURE__ */ jsx(Card, { children: index + 1 })
82
+ },
83
+ backgroundColor
84
+ )) })
85
+ ] });
86
+ };
87
+ const GridExamples = () => {
88
+ const [showDebugExamples, setShowDebugExamples] = useState(false);
89
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
90
+ /* @__PURE__ */ jsx(CommonGridExamples, {}),
91
+ /* @__PURE__ */ jsx(Box, { sx: { pt: 4, pb: 4 }, children: /* @__PURE__ */ jsx(
92
+ FormControlLabel,
93
+ {
94
+ control: /* @__PURE__ */ jsx(
95
+ Checkbox,
96
+ {
97
+ onChange: (_, checked) => setShowDebugExamples(checked)
98
+ }
99
+ ),
100
+ label: "Show debug examples"
101
+ }
102
+ ) }),
103
+ showDebugExamples && /* @__PURE__ */ jsx(DebugGridExamples, {})
104
+ ] });
105
+ };
106
+
107
+ export { CommonGridExamples, GridExamples };
108
+ //# sourceMappingURL=GridExamples.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridExamples.esm.js","sources":["../../src/components/GridExamples.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except 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, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useState } from 'react';\nimport Box from '@mui/material/Box';\nimport Card from '@mui/material/Card';\nimport Checkbox from '@mui/material/Checkbox';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Grid, { GridProps } from '@mui/material/Grid';\n\nconst GridContainer = (props: GridProps) => <Grid container {...props} />;\n\nconst GridItem = (props: GridProps) => (\n <Grid\n item\n xs={12} // show 1 item per row on extra small screens\n sm={6} // show 2 items per row on small screens\n md={4} // show 3 items per row on medium screens\n lg={3} // show 4 items per row on large screens\n xl={2} // show 6 items per row on extra large screens\n {...props}\n />\n);\n\nexport const CommonGridExamples = () => {\n const cards = Array.from({ length: 8 }, (_, i) => i + 1);\n return (\n <>\n <h1>\n Default: Grid container without spacing, an unstyled Grid item and an\n unstyled Card\n </h1>\n <GridContainer>\n {cards.map(cardContent => (\n <GridItem key={cardContent}>\n <Card>{cardContent}</Card>\n </GridItem>\n ))}\n </GridContainer>\n\n <h1>\n Grid container with spacing=2, an unstyled Grid item and an unstyled\n Card\n </h1>\n <GridContainer spacing={2}>\n {cards.map(cardContent => (\n <GridItem key={cardContent}>\n <Card>{cardContent}</Card>\n </GridItem>\n ))}\n </GridContainer>\n\n <h1>\n Grid container with spacing=4, an unstyled Grid item and a Card with\n padding=2\n </h1>\n <GridContainer spacing={4}>\n {cards.map(cardContent => (\n <GridItem key={cardContent}>\n <Card sx={{ p: 2 }}>{cardContent}</Card>\n </GridItem>\n ))}\n </GridContainer>\n </>\n );\n};\n\nconst DebugGridExamples = () => {\n const backgroundColors = [\n '#600',\n '#060',\n '#800',\n '#080',\n '#a00',\n '#0a0',\n '#d00',\n '#0d0',\n ];\n return (\n <>\n <h1>\n Grid container without spacing, an unstyled Grid item and colorized Card\n </h1>\n <GridContainer>\n {backgroundColors.map((backgroundColor, index) => (\n <GridItem key={backgroundColor}>\n <Card sx={{ color: '#ffffff', backgroundColor }}>{index + 1}</Card>\n </GridItem>\n ))}\n </GridContainer>\n\n <h1>\n Grid container with colorized Grid item to show one-sided padding, Card\n position is fine\n </h1>\n <GridContainer>\n {backgroundColors.map((backgroundColor, index) => (\n <GridItem\n key={backgroundColor}\n sx={{ color: '#ffffff', backgroundColor }}\n >\n <Card>{index + 1}</Card>\n </GridItem>\n ))}\n </GridContainer>\n\n <h1>\n Grid container with spacing=4, an unstyled Grid item and a colorized\n Card with p=2\n </h1>\n <GridContainer spacing={4}>\n {backgroundColors.map((backgroundColor, index) => (\n <GridItem key={backgroundColor}>\n <Card sx={{ color: '#ffffff', backgroundColor, p: 2 }}>\n {index + 1}\n </Card>\n </GridItem>\n ))}\n </GridContainer>\n\n <h1>\n Grid container with spacing=4, an colorized Grid item to show one-sided\n padding, Card position is fine\n </h1>\n <GridContainer spacing={4}>\n {backgroundColors.map((backgroundColor, index) => (\n <GridItem\n key={backgroundColor}\n sx={{ color: '#ffffff', backgroundColor }}\n >\n <Card sx={{ p: 2 }}>{index + 1}</Card>\n </GridItem>\n ))}\n </GridContainer>\n\n <h1>\n Grid container without spacing and Grid item with p=4 result in\n unaligned Cards! (Too much padding on the right side!)\n </h1>\n <GridContainer>\n {backgroundColors.map((backgroundColor, index) => (\n <GridItem\n key={backgroundColor}\n sx={{ color: '#ffffff', backgroundColor, p: 4 }}\n >\n <Card>{index + 1}</Card>\n </GridItem>\n ))}\n </GridContainer>\n\n <h1>\n Grid container with spacing=4 and Grid item with p=4 result also in\n unaligned Cards! (Too much padding on the right side!)\n </h1>\n <GridContainer spacing={4}>\n {backgroundColors.map((backgroundColor, index) => (\n <GridItem\n key={backgroundColor}\n sx={{ color: '#ffffff', backgroundColor, p: 4 }}\n >\n <Card>{index + 1}</Card>\n </GridItem>\n ))}\n </GridContainer>\n </>\n );\n};\n\nexport const GridExamples = () => {\n const [showDebugExamples, setShowDebugExamples] = useState(false);\n return (\n <>\n <CommonGridExamples />\n <Box sx={{ pt: 4, pb: 4 }}>\n <FormControlLabel\n control={\n <Checkbox\n onChange={(_, checked) => setShowDebugExamples(checked)}\n />\n }\n label=\"Show debug examples\"\n />\n </Box>\n {showDebugExamples && <DebugGridExamples />}\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAuBA,MAAM,aAAA,GAAgB,CAAC,KAAqB,qBAAA,GAAA,CAAC,QAAK,SAAS,EAAA,IAAA,EAAE,GAAG,KAAO,EAAA,CAAA;AAEvE,MAAM,QAAA,GAAW,CAAC,KAChB,qBAAA,GAAA;AAAA,EAAC,IAAA;AAAA,EAAA;AAAA,IACC,IAAI,EAAA,IAAA;AAAA,IACJ,EAAI,EAAA,EAAA;AAAA,IACJ,EAAI,EAAA,CAAA;AAAA,IACJ,EAAI,EAAA,CAAA;AAAA,IACJ,EAAI,EAAA,CAAA;AAAA,IACJ,EAAI,EAAA,CAAA;AAAA,IACH,GAAG;AAAA;AACN,CAAA;AAGK,MAAM,qBAAqB,MAAM;AACtC,EAAM,MAAA,KAAA,GAAQ,KAAM,CAAA,IAAA,CAAK,EAAE,MAAA,EAAQ,CAAE,EAAA,EAAG,CAAC,CAAA,EAAG,CAAM,KAAA,CAAA,GAAI,CAAC,CAAA;AACvD,EAAA,uBAEI,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,QAAG,QAGJ,EAAA,qFAAA,EAAA,CAAA;AAAA,oBACC,GAAA,CAAA,aAAA,EAAA,EACE,QAAM,EAAA,KAAA,CAAA,GAAA,CAAI,CACT,WAAA,qBAAA,GAAA,CAAC,QACC,EAAA,EAAA,QAAA,kBAAA,GAAA,CAAC,IAAM,EAAA,EAAA,QAAA,EAAA,WAAA,EAAY,CADN,EAAA,EAAA,WAEf,CACD,CACH,EAAA,CAAA;AAAA,oBAEA,GAAA,CAAC,QAAG,QAGJ,EAAA,2EAAA,EAAA,CAAA;AAAA,oBACC,GAAA,CAAA,aAAA,EAAA,EAAc,OAAS,EA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C,QAAU,EAAA,CAAC,CAAG,EAAA,OAAA,KAAY,qBAAqB,OAAO;AAAA;AAAA,SACxD;AAAA,QAEF,KAAM,EAAA;AAAA;AAAA,KAEV,EAAA,CAAA;AAAA,IACC,iBAAA,wBAAsB,iBAAkB,EAAA,EAAA;AAAA,GAC3C,EAAA,CAAA;AAEJ;;;;"}
@@ -0,0 +1,25 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { InfoCard } from '@backstage/core-components';
3
+ import Button from '@mui/material/Button';
4
+
5
+ const InlineStyles = () => {
6
+ return /* @__PURE__ */ jsxs(InfoCard, { title: "Inline styles", children: [
7
+ /* @__PURE__ */ jsx("h1", { children: "Default button" }),
8
+ /* @__PURE__ */ jsx(Button, { children: "a button" }),
9
+ /* @__PURE__ */ jsxs("h1", { children: [
10
+ "Default button with",
11
+ " ",
12
+ /* @__PURE__ */ jsx("code", { children: "style={{ padding: 32, backgroundColor: 'gray' }}" })
13
+ ] }),
14
+ /* @__PURE__ */ jsx(Button, { style: { padding: 32, backgroundColor: "gray" }, children: "a button" }),
15
+ /* @__PURE__ */ jsxs("h1", { children: [
16
+ "Default button with",
17
+ " ",
18
+ /* @__PURE__ */ jsx("code", { children: "sx={{ padding: 4, backgroundColor: 'background.default' }}" })
19
+ ] }),
20
+ /* @__PURE__ */ jsx(Button, { sx: { padding: 4, backgroundColor: "background.default" }, children: "a button" })
21
+ ] });
22
+ };
23
+
24
+ export { InlineStyles };
25
+ //# sourceMappingURL=InlineStyles.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InlineStyles.esm.js","sources":["../../src/components/InlineStyles.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except 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, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { InfoCard } from '@backstage/core-components';\nimport Button from '@mui/material/Button';\n\nexport const InlineStyles = () => {\n return (\n <InfoCard title=\"Inline styles\">\n <h1>Default button</h1>\n <Button>a button</Button>\n\n <h1>\n Default button with{' '}\n <code>{\"style={{ padding: 32, backgroundColor: 'gray' }}\"}</code>\n </h1>\n <Button style={{ padding: 32, backgroundColor: 'gray' }}>a button</Button>\n\n <h1>\n Default button with{' '}\n <code>\n {\"sx={{ padding: 4, backgroundColor: 'background.default' }}\"}\n </code>\n </h1>\n <Button sx={{ padding: 4, backgroundColor: 'background.default' }}>\n a button\n </Button>\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;;AAmBO,MAAM,eAAe,MAAM;AAChC,EACE,uBAAA,IAAA,CAAC,QAAS,EAAA,EAAA,KAAA,EAAM,eACd,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,QAAG,QAAc,EAAA,gBAAA,EAAA,CAAA;AAAA,oBAClB,GAAA,CAAC,UAAO,QAAQ,EAAA,UAAA,EAAA,CAAA;AAAA,yBAEf,IAAG,EAAA,EAAA,QAAA,EAAA;AAAA,MAAA,qBAAA;AAAA,MACkB,GAAA;AAAA,sBACpB,GAAA,CAAC,UAAM,QAAmD,EAAA,kDAAA,EAAA;AAAA,KAC5D,EAAA,CAAA;AAAA,oBACA,GAAA,CAAC,UAAO,KAAO,EAAA,EAAE,SAAS,EAAI,EAAA,eAAA,EAAiB,MAAO,EAAA,EAAG,QAAQ,EAAA,UAAA,EAAA,CAAA;AAAA,yBAEhE,IAAG,EAAA,EAAA,QAAA,EAAA;AAAA,MAAA,qBAAA;AAAA,MACkB,GAAA;AAAA,sBACpB,GAAA,CAAC,UACE,QACH,EAAA,4DAAA,EAAA;AAAA,KACF,EAAA,CAAA;AAAA,oBACA,GAAA,CAAC,UAAO,EAAI,EAAA,EAAE,SAAS,CAAG,EAAA,eAAA,EAAiB,oBAAqB,EAAA,EAAG,QAEnE,EAAA,UAAA,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
@@ -0,0 +1,24 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { Page, Header, TabbedLayout } from '@backstage/core-components';
3
+ import { UserSettingsThemeToggle } from '@backstage/plugin-user-settings';
4
+ import { FormComponents } from './FormComponents.esm.js';
5
+ import { PaperExamples } from './PaperExamples.esm.js';
6
+ import { TabExamples } from './TabExamples.esm.js';
7
+ import { GridExamples } from './GridExamples.esm.js';
8
+ import { InlineStyles } from './InlineStyles.esm.js';
9
+
10
+ const MUI5TestPage = () => {
11
+ return /* @__PURE__ */ jsxs(Page, { themeId: "tool", children: [
12
+ /* @__PURE__ */ jsx(Header, { title: "MUI v5 Test Page", children: /* @__PURE__ */ jsx(UserSettingsThemeToggle, {}) }),
13
+ /* @__PURE__ */ jsxs(TabbedLayout, { children: [
14
+ /* @__PURE__ */ jsx(TabbedLayout.Route, { path: "/form-components", title: "Form components", children: /* @__PURE__ */ jsx(FormComponents, {}) }),
15
+ /* @__PURE__ */ jsx(TabbedLayout.Route, { path: "/papers", title: "Papers", children: /* @__PURE__ */ jsx(PaperExamples, {}) }),
16
+ /* @__PURE__ */ jsx(TabbedLayout.Route, { path: "/tabs", title: "Tabs", children: /* @__PURE__ */ jsx(TabExamples, {}) }),
17
+ /* @__PURE__ */ jsx(TabbedLayout.Route, { path: "/grids", title: "Grids", children: /* @__PURE__ */ jsx(GridExamples, {}) }),
18
+ /* @__PURE__ */ jsx(TabbedLayout.Route, { path: "/inline-styles", title: "Inline styles", children: /* @__PURE__ */ jsx(InlineStyles, {}) })
19
+ ] })
20
+ ] });
21
+ };
22
+
23
+ export { MUI5TestPage };
24
+ //# sourceMappingURL=MUI5TestPage.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MUI5TestPage.esm.js","sources":["../../src/components/MUI5TestPage.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except 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, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Page, Header, TabbedLayout } from '@backstage/core-components';\nimport { UserSettingsThemeToggle } from '@backstage/plugin-user-settings';\n\nimport { FormComponents } from './FormComponents';\nimport { PaperExamples } from './PaperExamples';\nimport { TabExamples } from './TabExamples';\nimport { GridExamples } from './GridExamples';\nimport { InlineStyles } from './InlineStyles';\n\nexport const MUI5TestPage = () => {\n return (\n <Page themeId=\"tool\">\n <Header title=\"MUI v5 Test Page\">\n <UserSettingsThemeToggle />\n </Header>\n <TabbedLayout>\n <TabbedLayout.Route path=\"/form-components\" title=\"Form components\">\n <FormComponents />\n </TabbedLayout.Route>\n <TabbedLayout.Route path=\"/papers\" title=\"Papers\">\n <PaperExamples />\n </TabbedLayout.Route>\n <TabbedLayout.Route path=\"/tabs\" title=\"Tabs\">\n <TabExamples />\n </TabbedLayout.Route>\n <TabbedLayout.Route path=\"/grids\" title=\"Grids\">\n <GridExamples />\n </TabbedLayout.Route>\n <TabbedLayout.Route path=\"/inline-styles\" title=\"Inline styles\">\n <InlineStyles />\n </TabbedLayout.Route>\n </TabbedLayout>\n </Page>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAyBO,MAAM,eAAe,MAAM;AAChC,EACE,uBAAA,IAAA,CAAC,IAAK,EAAA,EAAA,OAAA,EAAQ,MACZ,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,MAAO,EAAA,EAAA,KAAA,EAAM,kBACZ,EAAA,QAAA,kBAAA,GAAA,CAAC,2BAAwB,CAC3B,EAAA,CAAA;AAAA,yBACC,YACC,EAAA,EAAA,QAAA,EAAA;AAAA,sBAAC,GAAA,CAAA,YAAA,CAAa,OAAb,EAAmB,IAAA,EAAK,oBAAmB,KAAM,EAAA,iBAAA,EAChD,QAAC,kBAAA,GAAA,CAAA,cAAA,EAAA,EAAe,CAClB,EAAA,CAAA;AAAA,sBACA,GAAA,CAAC,YAAa,CAAA,KAAA,EAAb,EAAmB,IAAA,EAAK,WAAU,KAAM,EAAA,QAAA,EACvC,QAAC,kBAAA,GAAA,CAAA,aAAA,EAAA,EAAc,CACjB,EAAA,CAAA;AAAA,sBACA,GAAA,CAAC,YAAa,CAAA,KAAA,EAAb,EAAmB,IAAA,EAAK,SAAQ,KAAM,EAAA,MAAA,EACrC,QAAC,kBAAA,GAAA,CAAA,WAAA,EAAA,EAAY,CACf,EAAA,CAAA;AAAA,sBACA,GAAA,CAAC,YAAa,CAAA,KAAA,EAAb,EAAmB,IAAA,EAAK,UAAS,KAAM,EAAA,OAAA,EACtC,QAAC,kBAAA,GAAA,CAAA,YAAA,EAAA,EAAa,CAChB,EAAA,CAAA;AAAA,sBACA,GAAA,CAAC,YAAa,CAAA,KAAA,EAAb,EAAmB,IAAA,EAAK,kBAAiB,KAAM,EAAA,eAAA,EAC9C,QAAC,kBAAA,GAAA,CAAA,YAAA,EAAA,EAAa,CAChB,EAAA;AAAA,KACF,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
@@ -0,0 +1,25 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import Paper from '@mui/material/Paper';
3
+
4
+ const PaperExamples = () => {
5
+ const elevations = Array.from({ length: 25 }, (_, i) => i);
6
+ return /* @__PURE__ */ jsx("div", { style: { display: "flex", flexWrap: "wrap" }, children: elevations.map((elevation) => /* @__PURE__ */ jsx("div", { style: { margin: "20px" }, children: /* @__PURE__ */ jsx(Paper, { elevation, children: /* @__PURE__ */ jsxs(
7
+ "div",
8
+ {
9
+ style: {
10
+ display: "flex",
11
+ width: "200px",
12
+ height: "200px",
13
+ alignItems: "center",
14
+ justifyContent: "center"
15
+ },
16
+ children: [
17
+ "e=",
18
+ elevation
19
+ ]
20
+ }
21
+ ) }) }, elevation)) });
22
+ };
23
+
24
+ export { PaperExamples };
25
+ //# sourceMappingURL=PaperExamples.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaperExamples.esm.js","sources":["../../src/components/PaperExamples.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except 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, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Paper from '@mui/material/Paper';\n\nexport const PaperExamples = () => {\n // elevations from 0 to 24\n const elevations = Array.from({ length: 25 }, (_, i) => i);\n\n return (\n <div style={{ display: 'flex', flexWrap: 'wrap' }}>\n {elevations.map(elevation => (\n <div key={elevation} style={{ margin: '20px' }}>\n <Paper elevation={elevation}>\n <div\n style={{\n display: 'flex',\n width: '200px',\n height: '200px',\n alignItems: 'center',\n justifyContent: 'center',\n }}\n >\n e={elevation}\n </div>\n </Paper>\n </div>\n ))}\n </div>\n );\n};\n"],"names":[],"mappings":";;;AAkBO,MAAM,gBAAgB,MAAM;AAEjC,EAAM,MAAA,UAAA,GAAa,KAAM,CAAA,IAAA,CAAK,EAAE,MAAA,EAAQ,IAAM,EAAA,CAAC,CAAG,EAAA,CAAA,KAAM,CAAC,CAAA;AAEzD,EACE,uBAAA,GAAA,CAAC,SAAI,KAAO,EAAA,EAAE,SAAS,MAAQ,EAAA,QAAA,EAAU,QACtC,EAAA,QAAA,EAAA,UAAA,CAAW,IAAI,CACd,SAAA,qBAAA,GAAA,CAAC,SAAoB,KAAO,EAAA,EAAE,QAAQ,MAAO,EAAA,EAC3C,QAAC,kBAAA,GAAA,CAAA,KAAA,EAAA,EAAM,SACL,EAAA,QAAA,kBAAA,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA;AAAA,QACL,OAAS,EAAA,MAAA;AAAA,QACT,KAAO,EAAA,OAAA;AAAA,QACP,MAAQ,EAAA,OAAA;AAAA,QACR,UAAY,EAAA,QAAA;AAAA,QACZ,cAAgB,EAAA;AAAA,OAClB;AAAA,MACD,QAAA,EAAA;AAAA,QAAA,IAAA;AAAA,QACI;AAAA;AAAA;AAAA,GAEP,EAAA,CAAA,EAAA,EAbQ,SAcV,CACD,CACH,EAAA,CAAA;AAEJ;;;;"}
@@ -0,0 +1,87 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { useState } from 'react';
3
+ import Tabs from '@mui/material/Tabs';
4
+ import Tab from '@mui/material/Tab';
5
+ import Box from '@mui/material/Box';
6
+ import Typography from '@mui/material/Typography';
7
+
8
+ const TabExamples = () => {
9
+ const colors = [
10
+ undefined,
11
+ "primary",
12
+ "secondary"
13
+ ];
14
+ const [selectedTab, setSelectedTab] = useState(0);
15
+ const handleChange = (_event, newValue) => {
16
+ setSelectedTab(newValue);
17
+ };
18
+ return /* @__PURE__ */ jsxs("div", { children: [
19
+ colors.map((color) => /* @__PURE__ */ jsxs("div", { children: [
20
+ /* @__PURE__ */ jsxs("div", { style: { padding: "20px 0" }, children: [
21
+ "color: ",
22
+ color ?? "undefined"
23
+ ] }),
24
+ /* @__PURE__ */ jsxs(
25
+ Tabs,
26
+ {
27
+ value: selectedTab,
28
+ indicatorColor: color,
29
+ textColor: color,
30
+ onChange: handleChange,
31
+ children: [
32
+ /* @__PURE__ */ jsx(Tab, { label: "One" }),
33
+ /* @__PURE__ */ jsx(Tab, { label: "Two" }),
34
+ /* @__PURE__ */ jsx(Tab, { label: "Three" }),
35
+ /* @__PURE__ */ jsx(Tab, { label: "Disabled", disabled: true })
36
+ ]
37
+ }
38
+ )
39
+ ] }, color)),
40
+ /* @__PURE__ */ jsx("div", { style: { padding: "20px 0" }, children: "long titles and scroll buttons" }),
41
+ /* @__PURE__ */ jsxs(
42
+ Tabs,
43
+ {
44
+ value: selectedTab,
45
+ onChange: handleChange,
46
+ scrollButtons: true,
47
+ variant: "scrollable",
48
+ children: [
49
+ /* @__PURE__ */ jsx(Tab, { label: "Tab one with extra long title" }),
50
+ /* @__PURE__ */ jsx(Tab, { label: "Tab two with extra long title" }),
51
+ /* @__PURE__ */ jsx(Tab, { label: "Tab three with extra long title" }),
52
+ /* @__PURE__ */ jsx(Tab, { label: "Disabled tab with extra long title", disabled: true })
53
+ ]
54
+ }
55
+ ),
56
+ /* @__PURE__ */ jsx("div", { style: { padding: "20px 0" }, children: "Vertical test" }),
57
+ /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "flex-start" }, children: [
58
+ /* @__PURE__ */ jsx(Box, { sx: { p: 2 }, children: /* @__PURE__ */ jsxs(
59
+ Tabs,
60
+ {
61
+ orientation: "vertical",
62
+ value: selectedTab,
63
+ indicatorColor: "primary",
64
+ textColor: "primary",
65
+ onChange: handleChange,
66
+ "aria-label": "disabled tabs example",
67
+ children: [
68
+ /* @__PURE__ */ jsx(Tab, { label: "One" }),
69
+ /* @__PURE__ */ jsx(Tab, { label: "Two" }),
70
+ /* @__PURE__ */ jsx(Tab, { label: "Extra long label Three" }),
71
+ /* @__PURE__ */ jsx(Tab, { label: "Disabled", disabled: true })
72
+ ]
73
+ }
74
+ ) }),
75
+ /* @__PURE__ */ jsx(
76
+ Box,
77
+ {
78
+ sx: { height: 200, width: "100%", border: "1px solid #ccc", m: 2 },
79
+ children: /* @__PURE__ */ jsx(Typography, { variant: "h6", p: 2, children: `selectedTab: ${selectedTab + 1}` })
80
+ }
81
+ )
82
+ ] })
83
+ ] });
84
+ };
85
+
86
+ export { TabExamples };
87
+ //# sourceMappingURL=TabExamples.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TabExamples.esm.js","sources":["../../src/components/TabExamples.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except 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, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { SyntheticEvent } from 'react';\n\nimport { useState } from 'react';\nimport Tabs, { TabsProps } from '@mui/material/Tabs';\nimport Tab from '@mui/material/Tab';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\n\nexport const TabExamples = () => {\n const colors: TabsProps['indicatorColor'][] = [\n undefined,\n 'primary',\n 'secondary',\n ];\n\n const [selectedTab, setSelectedTab] = useState(0);\n const handleChange = (_event: SyntheticEvent, newValue: number) => {\n setSelectedTab(newValue);\n };\n\n return (\n <div>\n {colors.map(color => (\n <div key={color}>\n <div style={{ padding: '20px 0' }}>color: {color ?? 'undefined'}</div>\n <Tabs\n value={selectedTab}\n indicatorColor={color}\n textColor={color}\n onChange={handleChange}\n >\n <Tab label=\"One\" />\n <Tab label=\"Two\" />\n <Tab label=\"Three\" />\n <Tab label=\"Disabled\" disabled />\n </Tabs>\n </div>\n ))}\n\n <div style={{ padding: '20px 0' }}>long titles and scroll buttons</div>\n <Tabs\n value={selectedTab}\n onChange={handleChange}\n scrollButtons\n variant=\"scrollable\"\n >\n <Tab label=\"Tab one with extra long title\" />\n <Tab label=\"Tab two with extra long title\" />\n <Tab label=\"Tab three with extra long title\" />\n <Tab label=\"Disabled tab with extra long title\" disabled />\n </Tabs>\n\n <div style={{ padding: '20px 0' }}>Vertical test</div>\n <Box sx={{ display: 'flex', alignItems: 'flex-start' }}>\n <Box sx={{ p: 2 }}>\n <Tabs\n orientation=\"vertical\"\n value={selectedTab}\n indicatorColor=\"primary\"\n textColor=\"primary\"\n onChange={handleChange}\n aria-label=\"disabled tabs example\"\n >\n <Tab label=\"One\" />\n <Tab label=\"Two\" />\n <Tab label=\"Extra long label Three\" />\n <Tab label=\"Disabled\" disabled />\n </Tabs>\n </Box>\n <Box\n sx={{ height: 200, width: '100%', border: '1px solid #ccc', m: 2 }}\n >\n <Typography variant=\"h6\" p={2}>{`selectedTab: ${\n selectedTab + 1\n }`}</Typography>\n </Box>\n </Box>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAwBO,MAAM,cAAc,MAAM;AAC/B,EAAA,MAAM,MAAwC,GAAA;AAAA,IAC5C,SAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAI,SAAS,CAAC,CAAA;AAChD,EAAM,MAAA,YAAA,GAAe,CAAC,MAAA,EAAwB,QAAqB,KAAA;AACjE,IAAA,cAAA,CAAe,QAAQ,CAAA;AAAA,GACzB;AAEA,EAAA,4BACG,KACE,EAAA,EAAA,QAAA,EAAA;AAAA,IAAO,MAAA,CAAA,GAAA,CAAI,CACV,KAAA,qBAAA,IAAA,CAAC,KACC,EAAA,EAAA,QAAA,EAAA;AAAA,sBAAA,IAAA,CAAC,KAAI,EAAA,EAAA,KAAA,EAAO,EAAE,OAAA,EAAS,UAAY,EAAA,QAAA,EAAA;AAAA,QAAA,SAAA;AAAA,QAAQ,KAAS,IAAA;AAAA,OAAY,EAAA,CAAA;AAAA,sBAChE,IAAA;AAAA,QAAC,IAAA;AAAA,QAAA;AAAA,UACC,KAAO,EAAA,WAAA;AAAA,UACP,cAAgB,EAAA,KAAA;AAAA,UAChB,SAAW,EAAA,KAAA;AAAA,UACX,QAAU,EAAA,YAAA;AAAA,UAEV,QAAA,EAAA;AAAA,4BAAC,GAAA,CAAA,GAAA,EAAA,EAAI,OAAM,KAAM,EAAA,C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,kBAAA,IAAA;AAAA,QAAC,IAAA;AAAA,QAAA;AAAA,UACC,WAAY,EAAA,UAAA;AAAA,UACZ,KAAO,EAAA,WAAA;AAAA,UACP,cAAe,EAAA,SAAA;AAAA,UACf,SAAU,EAAA,SAAA;AAAA,UACV,QAAU,EAAA,YAAA;AAAA,UACV,YAAW,EAAA,uBAAA;AAAA,UAEX,QAAA,EAAA;AAAA,4BAAC,GAAA,CAAA,GAAA,EAAA,EAAI,OAAM,KAAM,EAAA,CAAA;AAAA,4BACjB,GAAA,CAAC,GAAI,EAAA,EAAA,KAAA,EAAM,KAAM,EAAA,CAAA;AAAA,4BACjB,GAAA,CAAC,GAAI,EAAA,EAAA,KAAA,EAAM,wBAAyB,EAAA,CAAA;AAAA,4BACnC,GAAA,CAAA,GAAA,EAAA,EAAI,KAAM,EAAA,UAAA,EAAW,UAAQ,IAAC,EAAA;AAAA;AAAA;AAAA,OAEnC,EAAA,CAAA;AAAA,sBACA,GAAA;AAAA,QAAC,GAAA;AAAA,QAAA;AAAA,UACC,EAAA,EAAI,EAAE,MAAQ,EAAA,GAAA,EAAK,OAAO,MAAQ,EAAA,MAAA,EAAQ,gBAAkB,EAAA,CAAA,EAAG,CAAE,EAAA;AAAA,UAEjE,QAAA,kBAAA,GAAA,CAAC,cAAW,OAAQ,EAAA,IAAA,EAAK,GAAG,CAAI,EAAA,QAAA,EAAA,CAAA,aAAA,EAC9B,WAAc,GAAA,CAChB,CAAG,CAAA,EAAA;AAAA;AAAA;AACL,KACF,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
@@ -0,0 +1,15 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
3
+
4
+ /**
5
+ * @public
6
+ */
7
+ declare const mui5TestPlugin: _backstage_core_plugin_api.BackstagePlugin<{
8
+ root: _backstage_core_plugin_api.RouteRef<undefined>;
9
+ }, {}, {}>;
10
+ /**
11
+ * @public
12
+ */
13
+ declare const MUI5TestPage: () => react_jsx_runtime.JSX.Element;
14
+
15
+ export { MUI5TestPage, mui5TestPlugin };
@@ -0,0 +1,7 @@
1
+ import { unstable_ClassNameGenerator } from '@mui/material/className';
2
+ export { MUI5TestPage, mui5TestPlugin } from './plugin.esm.js';
3
+
4
+ unstable_ClassNameGenerator.configure((componentName) => {
5
+ return componentName.startsWith("v5-") ? componentName : `v5-${componentName}`;
6
+ });
7
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../src/index.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except 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, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/material/className';\n\nClassNameGenerator.configure(componentName => {\n return componentName.startsWith('v5-')\n ? componentName\n : `v5-${componentName}`;\n});\n\nexport * from './plugin';\n"],"names":["ClassNameGenerator"],"mappings":";;;AAiBAA,2BAAA,CAAmB,UAAU,CAAiB,aAAA,KAAA;AAC5C,EAAA,OAAO,cAAc,UAAW,CAAA,KAAK,CACjC,GAAA,aAAA,GACA,MAAM,aAAa,CAAA,CAAA;AACzB,CAAC,CAAA"}
@@ -0,0 +1,19 @@
1
+ import { createPlugin, createRoutableExtension } from '@backstage/core-plugin-api';
2
+ import { rootRouteRef } from './routes.esm.js';
3
+
4
+ const mui5TestPlugin = createPlugin({
5
+ id: "mui5-test",
6
+ routes: {
7
+ root: rootRouteRef
8
+ }
9
+ });
10
+ const MUI5TestPage = mui5TestPlugin.provide(
11
+ createRoutableExtension({
12
+ name: "MUI5TestPage",
13
+ component: () => import('./components/MUI5TestPage.esm.js').then((m) => m.MUI5TestPage),
14
+ mountPoint: rootRouteRef
15
+ })
16
+ );
17
+
18
+ export { MUI5TestPage, mui5TestPlugin };
19
+ //# sourceMappingURL=plugin.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except 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, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createPlugin,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\n\nimport { rootRouteRef } from './routes';\n\n/**\n * @public\n */\nexport const mui5TestPlugin = createPlugin({\n id: 'mui5-test',\n routes: {\n root: rootRouteRef,\n },\n});\n\n/**\n * @public\n */\nexport const MUI5TestPage = mui5TestPlugin.provide(\n createRoutableExtension({\n name: 'MUI5TestPage',\n component: () =>\n import('./components/MUI5TestPage').then(m => m.MUI5TestPage),\n mountPoint: rootRouteRef,\n }),\n);\n"],"names":[],"mappings":";;;AA0BO,MAAM,iBAAiB,YAAa,CAAA;AAAA,EACzC,EAAI,EAAA,WAAA;AAAA,EACJ,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA;AAAA;AAEV,CAAC;AAKM,MAAM,eAAe,cAAe,CAAA,OAAA;AAAA,EACzC,uBAAwB,CAAA;AAAA,IACtB,IAAM,EAAA,cAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,kCAA2B,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,YAAY,CAAA;AAAA,IAC9D,UAAY,EAAA;AAAA,GACb;AACH;;;;"}
@@ -0,0 +1,8 @@
1
+ import { createRouteRef } from '@backstage/core-plugin-api';
2
+
3
+ const rootRouteRef = createRouteRef({
4
+ id: "mui5-test"
5
+ });
6
+
7
+ export { rootRouteRef };
8
+ //# sourceMappingURL=routes.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except 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, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'mui5-test',\n});\n"],"names":[],"mappings":";;AAkBO,MAAM,eAAe,cAAe,CAAA;AAAA,EACzC,EAAI,EAAA;AACN,CAAC;;;;"}
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@red-hat-developer-hub/backstage-plugin-mui5-test",
3
+ "version": "0.0.0",
4
+ "main": "dist/index.esm.js",
5
+ "types": "dist/index.d.ts",
6
+ "license": "Apache-2.0",
7
+ "publishConfig": {
8
+ "access": "public",
9
+ "main": "dist/index.esm.js",
10
+ "types": "dist/index.d.ts"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/redhat-developer/rhdh-plugins",
15
+ "directory": "workspaces/theme/plugins/mui5-test"
16
+ },
17
+ "backstage": {
18
+ "role": "frontend-plugin",
19
+ "pluginId": "mui5-test",
20
+ "pluginPackages": [
21
+ "@red-hat-developer-hub/backstage-plugin-mui5-test"
22
+ ]
23
+ },
24
+ "sideEffects": false,
25
+ "scripts": {
26
+ "start": "backstage-cli package start",
27
+ "build": "backstage-cli package build",
28
+ "lint": "backstage-cli package lint",
29
+ "test": "backstage-cli package test",
30
+ "clean": "backstage-cli package clean",
31
+ "prepack": "backstage-cli package prepack",
32
+ "postpack": "backstage-cli package postpack"
33
+ },
34
+ "dependencies": {
35
+ "@backstage/core-components": "^0.17.5",
36
+ "@backstage/core-plugin-api": "^1.10.9",
37
+ "@backstage/plugin-user-settings": "^0.8.25",
38
+ "@mui/icons-material": "^5",
39
+ "@mui/material": "^5",
40
+ "@mui/styles": "^5"
41
+ },
42
+ "peerDependencies": {
43
+ "react": "^16.13.1 || ^17.0.0 || ^18.0.0"
44
+ },
45
+ "devDependencies": {
46
+ "@backstage/cli": "^0.34.1",
47
+ "@backstage/core-app-api": "^1.18.0",
48
+ "@backstage/dev-utils": "^1.1.13",
49
+ "@backstage/test-utils": "^1.7.11",
50
+ "@testing-library/jest-dom": "^6.0.0",
51
+ "@testing-library/react": "^14.0.0",
52
+ "@testing-library/user-event": "^14.0.0",
53
+ "msw": "^1.0.0",
54
+ "react": "^16.13.1 || ^17.0.0 || ^18.0.0"
55
+ },
56
+ "files": [
57
+ "dist"
58
+ ],
59
+ "typesVersions": {
60
+ "*": {
61
+ "package.json": [
62
+ "package.json"
63
+ ]
64
+ }
65
+ },
66
+ "module": "./dist/index.esm.js"
67
+ }