@m4l/widgets 0.0.3 → 0.0.4-beta-feature-655-widget-digitalinput.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/cards/WidgetBase/WidgetBase.d.ts +13 -0
- package/cards/WidgetBase/WidgetBase.d.ts.map +1 -0
- package/cards/WidgetBase/WidgetBase.js +47 -0
- package/cards/WidgetBase/WidgetBase.styles.d.ts +3 -0
- package/cards/WidgetBase/WidgetBase.styles.d.ts.map +1 -0
- package/cards/WidgetBase/WidgetBase.styles.js +83 -0
- package/cards/WidgetBase/constants.d.ts +2 -0
- package/cards/WidgetBase/constants.d.ts.map +1 -0
- package/cards/WidgetBase/constants.js +4 -0
- package/cards/WidgetBase/index.d.ts +3 -0
- package/cards/WidgetBase/index.d.ts.map +1 -0
- package/cards/WidgetBase/slots/WidgetBaseEnum.d.ts +12 -0
- package/cards/WidgetBase/slots/WidgetBaseEnum.d.ts.map +1 -0
- package/cards/WidgetBase/slots/WidgetBaseEnum.js +4 -0
- package/cards/WidgetBase/slots/WidgetBaseSlots.d.ts +16 -0
- package/cards/WidgetBase/slots/WidgetBaseSlots.d.ts.map +1 -0
- package/cards/WidgetBase/slots/WidgetBaseSlots.js +28 -0
- package/cards/WidgetBase/types.d.ts +23 -0
- package/cards/WidgetBase/types.d.ts.map +1 -0
- package/cards/WidgetBaseThreeValues/WidgetBaseThreeValues.d.ts +16 -0
- package/cards/WidgetBaseThreeValues/WidgetBaseThreeValues.d.ts.map +1 -0
- package/cards/WidgetBaseThreeValues/WidgetBaseThreeValues.js +25 -0
- package/cards/WidgetBaseThreeValues/WidgetBaseThreeValues.styles.d.ts +3 -0
- package/cards/WidgetBaseThreeValues/WidgetBaseThreeValues.styles.d.ts.map +1 -0
- package/cards/WidgetBaseThreeValues/WidgetBaseThreeValues.styles.js +72 -0
- package/cards/WidgetBaseThreeValues/constants.d.ts +2 -0
- package/cards/WidgetBaseThreeValues/constants.d.ts.map +1 -0
- package/cards/WidgetBaseThreeValues/constants.js +4 -0
- package/cards/WidgetBaseThreeValues/index.d.ts +3 -0
- package/cards/WidgetBaseThreeValues/index.d.ts.map +1 -0
- package/cards/WidgetBaseThreeValues/slots/WidgetBaseThreeValuesEnum.d.ts +13 -0
- package/cards/WidgetBaseThreeValues/slots/WidgetBaseThreeValuesEnum.d.ts.map +1 -0
- package/cards/WidgetBaseThreeValues/slots/WidgetBaseThreeValuesEnum.js +4 -0
- package/cards/WidgetBaseThreeValues/slots/WidgetBaseThreeValuesSlots.d.ts +19 -0
- package/cards/WidgetBaseThreeValues/slots/WidgetBaseThreeValuesSlots.d.ts.map +1 -0
- package/cards/WidgetBaseThreeValues/slots/WidgetBaseThreeValuesSlots.js +31 -0
- package/cards/WidgetBaseThreeValues/types.d.ts +25 -0
- package/cards/WidgetBaseThreeValues/types.d.ts.map +1 -0
- package/cards/WidgetDigitalInput/WidgetDigitalInput.d.ts +20 -0
- package/cards/WidgetDigitalInput/WidgetDigitalInput.d.ts.map +1 -0
- package/cards/WidgetDigitalInput/WidgetDigitalInput.js +49 -0
- package/cards/WidgetDigitalInput/WidgetDigitalInput.styles.d.ts +3 -0
- package/cards/WidgetDigitalInput/WidgetDigitalInput.styles.d.ts.map +1 -0
- package/cards/WidgetDigitalInput/WidgetDigitalInput.styles.js +34 -0
- package/cards/WidgetDigitalInput/constants.d.ts +2 -0
- package/cards/WidgetDigitalInput/constants.d.ts.map +1 -0
- package/cards/WidgetDigitalInput/constants.js +4 -0
- package/cards/WidgetDigitalInput/hooks/useGetValues.d.ts +6 -0
- package/cards/WidgetDigitalInput/hooks/useGetValues.d.ts.map +1 -0
- package/cards/WidgetDigitalInput/hooks/useGetValues.js +17 -0
- package/cards/WidgetDigitalInput/index.d.ts +3 -0
- package/cards/WidgetDigitalInput/index.d.ts.map +1 -0
- package/cards/WidgetDigitalInput/slots/WidgetDigitalInputEnum.d.ts +9 -0
- package/cards/WidgetDigitalInput/slots/WidgetDigitalInputEnum.d.ts.map +1 -0
- package/cards/WidgetDigitalInput/slots/WidgetDigitalInputEnum.js +4 -0
- package/cards/WidgetDigitalInput/slots/WidgetDigitalInputSlots.d.ts +7 -0
- package/cards/WidgetDigitalInput/slots/WidgetDigitalInputSlots.d.ts.map +1 -0
- package/cards/WidgetDigitalInput/slots/WidgetDigitalInputSlots.js +16 -0
- package/cards/WidgetDigitalInput/types.d.ts +36 -0
- package/cards/WidgetDigitalInput/types.d.ts.map +1 -0
- package/charts/ChartPie/ChartPie.d.ts +10 -0
- package/charts/ChartPie/ChartPie.d.ts.map +1 -0
- package/charts/{PieChart/PieChart.js → ChartPie/ChartPie.js} +3 -3
- package/charts/ChartPie/ChartPie.styles.d.ts +3 -0
- package/charts/ChartPie/ChartPie.styles.d.ts.map +1 -0
- package/charts/{PieChart/PieChart.styles.js → ChartPie/ChartPie.styles.js} +3 -3
- package/charts/ChartPie/__tests__/helpers/data.d.ts +14 -0
- package/charts/{PieChart → ChartPie}/__tests__/helpers/data.d.ts.map +1 -1
- package/charts/ChartPie/__tests__/helpers/index.d.ts +7 -0
- package/charts/{PieChart → ChartPie}/__tests__/helpers/index.d.ts.map +1 -1
- package/charts/{PieChart → ChartPie}/__tests__/helpers/theme.d.ts +1 -1
- package/charts/{PieChart → ChartPie}/__tests__/helpers/theme.d.ts.map +1 -1
- package/charts/ChartPie/__tests__/helpers/values.d.ts +14 -0
- package/charts/{PieChart → ChartPie}/__tests__/helpers/values.d.ts.map +1 -1
- package/charts/ChartPie/constants.d.ts +2 -0
- package/charts/{PieChart → ChartPie}/constants.d.ts.map +1 -1
- package/charts/ChartPie/constants.js +4 -0
- package/charts/{PieChart → ChartPie}/helpers/options.d.ts +3 -3
- package/charts/{PieChart → ChartPie}/helpers/options.d.ts.map +1 -1
- package/charts/ChartPie/helpers/remap.d.ts +6 -0
- package/charts/{PieChart → ChartPie}/helpers/remap.d.ts.map +1 -1
- package/charts/{PieChart/hooks/usePieChartData.d.ts → ChartPie/hooks/useChartPieData.d.ts} +5 -5
- package/charts/ChartPie/hooks/useChartPieData.d.ts.map +1 -0
- package/charts/{PieChart/hooks/usePieChartData.js → ChartPie/hooks/useChartPieData.js} +1 -1
- package/charts/{PieChart → ChartPie}/hooks/useChartResize.d.ts.map +1 -1
- package/charts/ChartPie/index.d.ts +3 -0
- package/charts/{PieChart → ChartPie}/index.d.ts.map +1 -1
- package/charts/{PieChart/slots/PieChartEnum.d.ts → ChartPie/slots/ChartPieEnum.d.ts} +6 -6
- package/charts/ChartPie/slots/ChartPieEnum.d.ts.map +1 -0
- package/charts/{PieChart/slots/PieChartEnum.js → ChartPie/slots/ChartPieEnum.js} +2 -2
- package/charts/{PieChart/slots/PieChartSlots.d.ts → ChartPie/slots/ChartPieSlots.d.ts} +11 -11
- package/charts/{PieChart/slots/PieChartSlots.d.ts.map → ChartPie/slots/ChartPieSlots.d.ts.map} +1 -1
- package/charts/ChartPie/slots/ChartPieSlots.js +52 -0
- package/charts/{PieChart → ChartPie}/subcomponents/CustomLegend/CustomLegend.d.ts.map +1 -1
- package/charts/{PieChart → ChartPie}/subcomponents/CustomLegend/CustomLegend.js +1 -1
- package/charts/{PieChart → ChartPie}/subcomponents/CustomLegend/types.d.ts +2 -2
- package/charts/{PieChart → ChartPie}/subcomponents/CustomLegend/types.d.ts.map +1 -1
- package/charts/{PieChart → ChartPie}/types.d.ts +15 -15
- package/charts/{PieChart → ChartPie}/types.d.ts.map +1 -1
- package/charts/ChartSeries/ChartSeries.d.ts +10 -0
- package/charts/ChartSeries/ChartSeries.d.ts.map +1 -0
- package/charts/{SeriesChart/SeriesChart.js → ChartSeries/ChartSeries.js} +2 -2
- package/charts/ChartSeries/ChartSeries.styles.d.ts +3 -0
- package/charts/ChartSeries/ChartSeries.styles.d.ts.map +1 -0
- package/charts/{SeriesChart/SeriesChart.styles.js → ChartSeries/ChartSeries.styles.js} +3 -3
- package/charts/{SeriesChart → ChartSeries}/__tests__/helpers/index.d.ts +1 -1
- package/charts/{SeriesChart → ChartSeries}/__tests__/helpers/index.d.ts.map +1 -1
- package/charts/{SeriesChart → ChartSeries}/__tests__/helpers/theme.d.ts.map +1 -1
- package/charts/{SeriesChart → ChartSeries}/__tests__/helpers/tooltip.d.ts.map +1 -1
- package/charts/{SeriesChart → ChartSeries}/__tests__/helpers/types.d.ts.map +1 -1
- package/charts/{SeriesChart → ChartSeries}/__tests__/helpers/values.d.ts +11 -11
- package/charts/{SeriesChart → ChartSeries}/__tests__/helpers/values.d.ts.map +1 -1
- package/charts/ChartSeries/constants.d.ts +2 -0
- package/charts/ChartSeries/constants.d.ts.map +1 -0
- package/charts/ChartSeries/constants.js +4 -0
- package/charts/{SeriesChart → ChartSeries}/helpers/options.d.ts +2 -2
- package/charts/{SeriesChart → ChartSeries}/helpers/options.d.ts.map +1 -1
- package/charts/ChartSeries/helpers/tooltipFormatter.d.ts +6 -0
- package/charts/{SeriesChart → ChartSeries}/helpers/tooltipFormatter.d.ts.map +1 -1
- package/charts/ChartSeries/hooks/useChartResize.d.ts.map +1 -0
- package/charts/ChartSeries/index.d.ts +3 -0
- package/charts/{SeriesChart → ChartSeries}/index.d.ts.map +1 -1
- package/charts/{SeriesChart/slots/SeriesChartEnum.d.ts → ChartSeries/slots/ChartSeriesEnum.d.ts} +6 -6
- package/charts/ChartSeries/slots/ChartSeriesEnum.d.ts.map +1 -0
- package/charts/ChartSeries/slots/ChartSeriesEnum.js +4 -0
- package/charts/{SeriesChart/slots/SeriesChartSlots.d.ts → ChartSeries/slots/ChartSeriesSlots.d.ts} +11 -11
- package/charts/ChartSeries/slots/ChartSeriesSlots.d.ts.map +1 -0
- package/charts/{SeriesChart/slots/SeriesChartSlots.js → ChartSeries/slots/ChartSeriesSlots.js} +8 -8
- package/charts/{SeriesChart → ChartSeries}/types.d.ts +8 -8
- package/charts/{SeriesChart → ChartSeries}/types.d.ts.map +1 -1
- package/charts/index.d.ts +2 -2
- package/index.d.ts +3 -0
- package/index.d.ts.map +1 -1
- package/index.js +10 -4
- package/package.json +1 -1
- package/charts/PieChart/PieChart.d.ts +0 -10
- package/charts/PieChart/PieChart.d.ts.map +0 -1
- package/charts/PieChart/PieChart.styles.d.ts +0 -3
- package/charts/PieChart/PieChart.styles.d.ts.map +0 -1
- package/charts/PieChart/__tests__/helpers/data.d.ts +0 -14
- package/charts/PieChart/__tests__/helpers/index.d.ts +0 -7
- package/charts/PieChart/__tests__/helpers/values.d.ts +0 -14
- package/charts/PieChart/constants.d.ts +0 -2
- package/charts/PieChart/constants.js +0 -4
- package/charts/PieChart/helpers/remap.d.ts +0 -6
- package/charts/PieChart/hooks/usePieChartData.d.ts.map +0 -1
- package/charts/PieChart/index.d.ts +0 -3
- package/charts/PieChart/slots/PieChartEnum.d.ts.map +0 -1
- package/charts/PieChart/slots/PieChartSlots.js +0 -52
- package/charts/SeriesChart/SeriesChart.d.ts +0 -10
- package/charts/SeriesChart/SeriesChart.d.ts.map +0 -1
- package/charts/SeriesChart/SeriesChart.styles.d.ts +0 -3
- package/charts/SeriesChart/SeriesChart.styles.d.ts.map +0 -1
- package/charts/SeriesChart/constants.d.ts +0 -2
- package/charts/SeriesChart/constants.d.ts.map +0 -1
- package/charts/SeriesChart/constants.js +0 -4
- package/charts/SeriesChart/helpers/tooltipFormatter.d.ts +0 -6
- package/charts/SeriesChart/hooks/useChartResize.d.ts.map +0 -1
- package/charts/SeriesChart/index.d.ts +0 -3
- package/charts/SeriesChart/slots/SeriesChartEnum.d.ts.map +0 -1
- package/charts/SeriesChart/slots/SeriesChartEnum.js +0 -4
- package/charts/SeriesChart/slots/SeriesChartSlots.d.ts.map +0 -1
- /package/charts/{PieChart → ChartPie}/helpers/options.js +0 -0
- /package/charts/{PieChart → ChartPie}/helpers/remap.js +0 -0
- /package/charts/{PieChart → ChartPie}/hooks/useChartResize.d.ts +0 -0
- /package/charts/{PieChart → ChartPie}/hooks/useChartResize.js +0 -0
- /package/charts/{PieChart → ChartPie}/subcomponents/CustomLegend/CustomLegend.d.ts +0 -0
- /package/charts/{SeriesChart → ChartSeries}/__tests__/helpers/theme.d.ts +0 -0
- /package/charts/{SeriesChart → ChartSeries}/__tests__/helpers/tooltip.d.ts +0 -0
- /package/charts/{SeriesChart → ChartSeries}/__tests__/helpers/types.d.ts +0 -0
- /package/charts/{SeriesChart → ChartSeries}/helpers/options.js +0 -0
- /package/charts/{SeriesChart → ChartSeries}/helpers/tooltipFormatter.js +0 -0
- /package/charts/{SeriesChart → ChartSeries}/hooks/useChartResize.d.ts +0 -0
- /package/charts/{SeriesChart → ChartSeries}/hooks/useChartResize.js +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { WidgetBaseProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* WidgetBase component.
|
|
4
|
+
* @param title - Title of the widget.
|
|
5
|
+
* @param children - Children of the widget.
|
|
6
|
+
* @param size - Size of the widget.
|
|
7
|
+
* @param tooltip - Tooltip of the widget.
|
|
8
|
+
* @param isAlarm - Is alarm of the widget.
|
|
9
|
+
* @param menuActions - Menu actions of the widget.
|
|
10
|
+
*/
|
|
11
|
+
export declare function WidgetBase({ title, children, size, tooltip, isAlarm, menuActions }: WidgetBaseProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default WidgetBase;
|
|
13
|
+
//# sourceMappingURL=WidgetBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetBase.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetBase/WidgetBase.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAWrE;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,eAAe,oDA6DnG;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as t, jsxs as o } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { WidgetBaseRootStyled as s, WidgetBaseHeaderStyled as c, WidgetBaseHeaderTitleStyled as l, WidgetBaseHeaderActionsStyled as m, WidgetBaseContentStyled as f } from "./slots/WidgetBaseSlots.js";
|
|
3
|
+
import { Card as p, Icon as g, IconButton as u, MenuActions as B } from "@m4l/components";
|
|
4
|
+
import { NotificationInformationOutlined as S } from "@m4l/icons";
|
|
5
|
+
function v({ title: i, children: a, size: e, tooltip: n, isAlarm: d, menuActions: r }) {
|
|
6
|
+
return /* @__PURE__ */ t(s, { children: /* @__PURE__ */ o(p, { variant: "outlined", direction: "column", children: [
|
|
7
|
+
/* @__PURE__ */ o(c, { children: [
|
|
8
|
+
/* @__PURE__ */ t(l, { ownerState: {
|
|
9
|
+
size: e
|
|
10
|
+
}, children: i }),
|
|
11
|
+
/* @__PURE__ */ o(m, { children: [
|
|
12
|
+
n && /* @__PURE__ */ t(
|
|
13
|
+
g,
|
|
14
|
+
{
|
|
15
|
+
src: /* @__PURE__ */ t(S, {}),
|
|
16
|
+
tooltipContent: n,
|
|
17
|
+
"aria-label": "Información",
|
|
18
|
+
size: e,
|
|
19
|
+
color: "info.enabled"
|
|
20
|
+
}
|
|
21
|
+
),
|
|
22
|
+
d && /* @__PURE__ */ t(
|
|
23
|
+
u,
|
|
24
|
+
{
|
|
25
|
+
tooltip: "Alarma",
|
|
26
|
+
icon: "https://s3.us-east-1.amazonaws.com/static.made4labs/environments/d1/frontend/components/Widgets/assets/icons/siren.svg",
|
|
27
|
+
color: "error",
|
|
28
|
+
size: e
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
r && /* @__PURE__ */ t(
|
|
32
|
+
B,
|
|
33
|
+
{
|
|
34
|
+
menuActions: r,
|
|
35
|
+
toolTip: "Más acciones",
|
|
36
|
+
size: e
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
] })
|
|
40
|
+
] }),
|
|
41
|
+
/* @__PURE__ */ t(f, { children: a })
|
|
42
|
+
] }) });
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
v as WidgetBase,
|
|
46
|
+
v as default
|
|
47
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetBase.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetBase/WidgetBase.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,gBAAgB,EAAE,gBAoF9B,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { getSizeStyles as a, getTypographyStyles as s } from "@m4l/components";
|
|
2
|
+
const n = {
|
|
3
|
+
/**
|
|
4
|
+
* Root container: container query context for responsive layout.
|
|
5
|
+
*/
|
|
6
|
+
widgetBaseRoot: ({ theme: e }) => ({
|
|
7
|
+
display: "flex",
|
|
8
|
+
flexDirection: "column",
|
|
9
|
+
alignItems: "flex-start",
|
|
10
|
+
alignSelf: "stretch",
|
|
11
|
+
containerName: "root",
|
|
12
|
+
containerType: "size",
|
|
13
|
+
width: "100%",
|
|
14
|
+
height: "100%",
|
|
15
|
+
gap: e.vars.size.baseSpacings.sp2,
|
|
16
|
+
backgroundColor: e.vars.palette.background.default,
|
|
17
|
+
borderRadius: e.vars.size.borderRadius.r3
|
|
18
|
+
}),
|
|
19
|
+
/**
|
|
20
|
+
* Styles for the header of the widget base component.
|
|
21
|
+
*/
|
|
22
|
+
widgetBaseHeader: ({ theme: e, ownerState: t }) => ({
|
|
23
|
+
display: "flex",
|
|
24
|
+
flex: "row nowrap",
|
|
25
|
+
alignItems: "center",
|
|
26
|
+
justifyContent: "flex-start",
|
|
27
|
+
width: "100%",
|
|
28
|
+
...a(
|
|
29
|
+
e,
|
|
30
|
+
t?.size || "medium",
|
|
31
|
+
"action",
|
|
32
|
+
(i) => ({
|
|
33
|
+
height: i
|
|
34
|
+
})
|
|
35
|
+
),
|
|
36
|
+
alignSelf: "stretch",
|
|
37
|
+
gap: e.vars.size.baseSpacings.sp2
|
|
38
|
+
}),
|
|
39
|
+
/**
|
|
40
|
+
* Styles for the title of the header of the widget base component.
|
|
41
|
+
*/
|
|
42
|
+
widgetBaseHeaderTitle: ({ theme: e, ownerState: t }) => ({
|
|
43
|
+
...s(e?.generalSettings?.isMobile, t?.size || "medium", "captionDens"),
|
|
44
|
+
color: e.vars.palette.text.primary,
|
|
45
|
+
flexGrow: 1,
|
|
46
|
+
flexShrink: 1,
|
|
47
|
+
minWidth: 0,
|
|
48
|
+
textOverflow: "ellipsis",
|
|
49
|
+
overflow: "hidden",
|
|
50
|
+
fontFamily: "Inter",
|
|
51
|
+
display: "-webkit-box",
|
|
52
|
+
WebkitBoxOrient: "vertical",
|
|
53
|
+
WebkitLineClamp: 2,
|
|
54
|
+
flex: "1 0 0"
|
|
55
|
+
}),
|
|
56
|
+
/**
|
|
57
|
+
* Styles for the actions of the header of the widget base component.
|
|
58
|
+
*/
|
|
59
|
+
widgetBaseHeaderActions: ({ theme: e }) => ({
|
|
60
|
+
display: "flex",
|
|
61
|
+
flex: "row nowrap",
|
|
62
|
+
alignItems: "center",
|
|
63
|
+
justifyContent: "center",
|
|
64
|
+
alignSelf: "center",
|
|
65
|
+
flexShrink: 0,
|
|
66
|
+
flexBasis: "auto",
|
|
67
|
+
gap: e.vars.size.baseSpacings.sp2
|
|
68
|
+
}),
|
|
69
|
+
/**
|
|
70
|
+
* Styles for the content of the widget base component.
|
|
71
|
+
*/
|
|
72
|
+
widgetBaseContent: (e) => ({
|
|
73
|
+
display: "flex",
|
|
74
|
+
justifyContent: "space-between",
|
|
75
|
+
alignItems: "center",
|
|
76
|
+
alignSelf: "stretch",
|
|
77
|
+
width: "100%",
|
|
78
|
+
height: "100%"
|
|
79
|
+
})
|
|
80
|
+
};
|
|
81
|
+
export {
|
|
82
|
+
n as widgetBaseStyles
|
|
83
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetBase/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EACV,eAAe,GAChB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slot names for the WidgetBase component.
|
|
3
|
+
* Must match the keys in WidgetBase.styles.ts.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum WidgetBaseSlots {
|
|
6
|
+
widgetBaseRoot = "widgetBaseRoot",
|
|
7
|
+
widgetBaseHeader = "widgetBaseHeader",
|
|
8
|
+
widgetBaseHeaderTitle = "widgetBaseHeaderTitle",
|
|
9
|
+
widgetBaseHeaderActions = "widgetBaseHeaderActions",
|
|
10
|
+
widgetBaseContent = "widgetBaseContent"
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=WidgetBaseEnum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetBaseEnum.d.ts","sourceRoot":"","sources":["../../../../../../../packages/widgets/src/cards/WidgetBase/slots/WidgetBaseEnum.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,eAAe;IACzB,cAAc,mBAAmB;IACjC,gBAAgB,qBAAqB;IACrC,qBAAqB,0BAA0B;IAC/C,uBAAuB,4BAA4B;IACnD,iBAAiB,sBAAsB;CACxC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var t = /* @__PURE__ */ ((e) => (e.widgetBaseRoot = "widgetBaseRoot", e.widgetBaseHeader = "widgetBaseHeader", e.widgetBaseHeaderTitle = "widgetBaseHeaderTitle", e.widgetBaseHeaderActions = "widgetBaseHeaderActions", e.widgetBaseContent = "widgetBaseContent", e))(t || {});
|
|
2
|
+
export {
|
|
3
|
+
t as WidgetBaseSlots
|
|
4
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const WidgetBaseRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
2
|
+
ownerState?: (Partial<import('../types').WidgetBaseOwnerState> & Record<string, unknown>) | undefined;
|
|
3
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
4
|
+
export declare const WidgetBaseHeaderStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
5
|
+
ownerState?: (Partial<import('../types').WidgetBaseOwnerState> & Record<string, unknown>) | undefined;
|
|
6
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
7
|
+
export declare const WidgetBaseHeaderTitleStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "paragraph" | "p" | "style" | "className" | "children" | "sx" | "classes" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY" | "typography" | "align" | "gutterBottom" | "noWrap" | "variant" | "variantMapping">, "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "content" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "translate" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "hidden" | "paragraph" | "p" | "slot" | "style" | "title" | "ref" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "sx" | "classes" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY" | "typography" | "align" | "gutterBottom" | "noWrap" | "variant" | "variantMapping"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
8
|
+
ownerState?: (Partial<import('../types').WidgetBaseOwnerState> & Record<string, unknown>) | undefined;
|
|
9
|
+
}, {}, {}>;
|
|
10
|
+
export declare const WidgetBaseHeaderActionsStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
11
|
+
ownerState?: (Partial<import('../types').WidgetBaseOwnerState> & Record<string, unknown>) | undefined;
|
|
12
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
13
|
+
export declare const WidgetBaseContentStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
14
|
+
ownerState?: (Partial<import('../types').WidgetBaseOwnerState> & Record<string, unknown>) | undefined;
|
|
15
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
16
|
+
//# sourceMappingURL=WidgetBaseSlots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetBaseSlots.d.ts","sourceRoot":"","sources":["../../../../../../../packages/widgets/src/cards/WidgetBase/slots/WidgetBaseSlots.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,oBAAoB;;6NAGE,CAAC;AAEpC,eAAO,MAAM,sBAAsB;;6NAGE,CAAC;AAEtC,eAAO,MAAM,2BAA2B;;UAGE,CAAC;AAE3C,eAAO,MAAM,6BAA6B;;6NAGE,CAAC;AAE7C,eAAO,MAAM,uBAAuB;;6NAGE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { styled as e } from "@mui/material/styles";
|
|
2
|
+
import { widgetBaseStyles as t } from "../WidgetBase.styles.js";
|
|
3
|
+
import { WidgetBaseSlots as d } from "./WidgetBaseEnum.js";
|
|
4
|
+
import { WIDGET_BASE_KEY_COMPONENT as o } from "../constants.js";
|
|
5
|
+
import { Typography as s } from "@mui/material";
|
|
6
|
+
const B = e("div", {
|
|
7
|
+
name: o,
|
|
8
|
+
slot: d.widgetBaseRoot
|
|
9
|
+
})(t.widgetBaseRoot), l = e("div", {
|
|
10
|
+
name: o,
|
|
11
|
+
slot: d.widgetBaseHeader
|
|
12
|
+
})(t.widgetBaseHeader), m = e(s, {
|
|
13
|
+
name: o,
|
|
14
|
+
slot: d.widgetBaseHeaderTitle
|
|
15
|
+
})(t.widgetBaseHeaderTitle), w = e("div", {
|
|
16
|
+
name: o,
|
|
17
|
+
slot: d.widgetBaseHeaderActions
|
|
18
|
+
})(t.widgetBaseHeaderActions), y = e("div", {
|
|
19
|
+
name: o,
|
|
20
|
+
slot: d.widgetBaseContent
|
|
21
|
+
})(t.widgetBaseContent);
|
|
22
|
+
export {
|
|
23
|
+
y as WidgetBaseContentStyled,
|
|
24
|
+
w as WidgetBaseHeaderActionsStyled,
|
|
25
|
+
l as WidgetBaseHeaderStyled,
|
|
26
|
+
m as WidgetBaseHeaderTitleStyled,
|
|
27
|
+
B as WidgetBaseRootStyled
|
|
28
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { WidgetBaseSlots } from './slots/WidgetBaseEnum';
|
|
2
|
+
import { WIDGET_BASE_KEY_COMPONENT } from './constants';
|
|
3
|
+
import { M4LOverridesStyleRules, MenuAction } from '@m4l/components';
|
|
4
|
+
import { Theme } from '@mui/material/styles';
|
|
5
|
+
import { ReactNode } from 'react';
|
|
6
|
+
import { Sizes } from '@m4l/styles';
|
|
7
|
+
/**
|
|
8
|
+
* Props for the WidgetBase component.
|
|
9
|
+
*/
|
|
10
|
+
export interface WidgetBaseProps {
|
|
11
|
+
title: string;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
14
|
+
tooltip?: string;
|
|
15
|
+
isAlarm?: boolean;
|
|
16
|
+
menuActions?: MenuAction[];
|
|
17
|
+
}
|
|
18
|
+
export type WidgetBaseOwnerState = {
|
|
19
|
+
size?: WidgetBaseProps['size'];
|
|
20
|
+
};
|
|
21
|
+
export type WidgetBaseSlotsType = keyof typeof WidgetBaseSlots;
|
|
22
|
+
export type WidgetBaseStyles = M4LOverridesStyleRules<WidgetBaseSlotsType, typeof WIDGET_BASE_KEY_COMPONENT, Theme>;
|
|
23
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetBase/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;CAC5B;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;CAChC,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,eAAe,CAAC;AAC/D,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,CAAC,mBAAmB,EAAE,OAAO,yBAAyB,EAAE,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { WidgetBaseThreeValuesProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* WidgetBaseThreeValues component.
|
|
4
|
+
* @param title - Title of the widget.
|
|
5
|
+
* @param leftValue - Left value of the widget.
|
|
6
|
+
* @param firstValue - First value of the widget.
|
|
7
|
+
* @param secondValue - Second value of the widget.
|
|
8
|
+
* @param valueColor - Value color of the widget.
|
|
9
|
+
* @param size - Size of the widget.
|
|
10
|
+
* @param tooltip - Tooltip of the widget.
|
|
11
|
+
* @param isAlarm - Is alarm of the widget.
|
|
12
|
+
* @param menuActions - Menu actions of the widget.
|
|
13
|
+
*/
|
|
14
|
+
export declare function WidgetBaseThreeValues({ title, leftValue, firstValue, secondValue, size, tooltip, isAlarm, menuActions, }: WidgetBaseThreeValuesProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default WidgetBaseThreeValues;
|
|
16
|
+
//# sourceMappingURL=WidgetBaseThreeValues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetBaseThreeValues.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetBaseThreeValues/WidgetBaseThreeValues.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAW1D;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,SAAS,EACT,UAAU,EACV,WAAW,EACX,IAAI,EACJ,OAAO,EACP,OAAO,EACP,WAAW,GACZ,EAAE,0BAA0B,oDA0B5B;AAED,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as e, jsxs as t } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { WidgetBaseThreeValuesRootStyled as o, WidgetBaseThreeValuesContainerStyled as u, WidgetBaseThreeValuesLeftValueStyled as V, WidgetBaseThreeValuesRigthContainerStyled as c, WidgetBaseThreeValuesFirstValueStyled as g, WidgetBaseThreeValuesSecondValueStyled as B } from "./slots/WidgetBaseThreeValuesSlots.js";
|
|
3
|
+
import { WidgetBase as W } from "../WidgetBase/WidgetBase.js";
|
|
4
|
+
function m({
|
|
5
|
+
title: r,
|
|
6
|
+
leftValue: l,
|
|
7
|
+
firstValue: d,
|
|
8
|
+
secondValue: i,
|
|
9
|
+
size: a,
|
|
10
|
+
tooltip: s,
|
|
11
|
+
isAlarm: h,
|
|
12
|
+
menuActions: n
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(W, { title: r, size: a, tooltip: s, isAlarm: h, menuActions: n, children: /* @__PURE__ */ t(u, { children: [
|
|
15
|
+
/* @__PURE__ */ e(V, { children: l }),
|
|
16
|
+
/* @__PURE__ */ t(c, { children: [
|
|
17
|
+
/* @__PURE__ */ e(g, { children: d }),
|
|
18
|
+
/* @__PURE__ */ e(B, { children: i })
|
|
19
|
+
] })
|
|
20
|
+
] }) }) });
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
m as WidgetBaseThreeValues,
|
|
24
|
+
m as default
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetBaseThreeValues.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetBaseThreeValues/WidgetBaseThreeValues.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAE3D,eAAO,MAAM,2BAA2B,EAAE,2BA0EzC,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
const t = {
|
|
2
|
+
/**
|
|
3
|
+
* Root container: container query context for responsive layout.
|
|
4
|
+
*/
|
|
5
|
+
widgetBaseRoot: () => ({
|
|
6
|
+
display: "flex",
|
|
7
|
+
flexDirection: "column",
|
|
8
|
+
justifyContent: "space-between",
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
alignSelf: "stretch",
|
|
11
|
+
width: "100%",
|
|
12
|
+
minHeight: 0,
|
|
13
|
+
flex: 1
|
|
14
|
+
}),
|
|
15
|
+
/**
|
|
16
|
+
* Container for the three values.
|
|
17
|
+
*/
|
|
18
|
+
widgetBaseThreeValuesContainer: () => ({
|
|
19
|
+
display: "flex",
|
|
20
|
+
flexDirection: "row",
|
|
21
|
+
alignItems: "center",
|
|
22
|
+
justifyContent: "space-between",
|
|
23
|
+
width: "100%",
|
|
24
|
+
height: "100%"
|
|
25
|
+
}),
|
|
26
|
+
/**
|
|
27
|
+
* Left value container.
|
|
28
|
+
*/
|
|
29
|
+
widgetBaseThreeValuesLeftValue: () => ({
|
|
30
|
+
display: "flex",
|
|
31
|
+
flex: 0,
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
justifyContent: "center",
|
|
34
|
+
height: "100%"
|
|
35
|
+
}),
|
|
36
|
+
/**
|
|
37
|
+
* Right container.
|
|
38
|
+
*/
|
|
39
|
+
widgetBaseThreeValuesRigthContainer: ({ theme: e }) => ({
|
|
40
|
+
display: "flex",
|
|
41
|
+
flexDirection: "column",
|
|
42
|
+
flex: 1,
|
|
43
|
+
height: "100%",
|
|
44
|
+
alignItems: "flex-end",
|
|
45
|
+
justifyContent: "center",
|
|
46
|
+
padding: "0 " + e.vars.size.baseSpacings.sp0 + " 0 0",
|
|
47
|
+
gap: e.vars.size.baseSpacings["sp1-5"]
|
|
48
|
+
}),
|
|
49
|
+
/**
|
|
50
|
+
* First value container.
|
|
51
|
+
*/
|
|
52
|
+
widgetBaseThreeValuesFirstValue: ({ theme: e }) => ({
|
|
53
|
+
display: "flex",
|
|
54
|
+
flex: 0,
|
|
55
|
+
alignItems: "center",
|
|
56
|
+
justifyContent: "center",
|
|
57
|
+
paddingRight: e.vars.size.baseSpacings.sp1
|
|
58
|
+
}),
|
|
59
|
+
/**
|
|
60
|
+
* Second value container.
|
|
61
|
+
*/
|
|
62
|
+
widgetBaseThreeValuesSecondValue: ({ theme: e }) => ({
|
|
63
|
+
display: "flex",
|
|
64
|
+
flex: 0,
|
|
65
|
+
alignItems: "center",
|
|
66
|
+
justifyContent: "center",
|
|
67
|
+
paddingRight: e.vars.size.baseSpacings.sp1
|
|
68
|
+
})
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
t as widgetBaseThreeValuesStyles
|
|
72
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetBaseThreeValues/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sCAAsC,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetBaseThreeValues/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EACV,0BAA0B,GAC3B,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slot names for the WidgetBaseThreeValues component.
|
|
3
|
+
* Must match the keys in WidgetBaseThreeValues.styles.ts.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum WidgetBaseThreeValuesSlots {
|
|
6
|
+
widgetBaseRoot = "widgetBaseRoot",
|
|
7
|
+
widgetBaseThreeValuesContainer = "widgetBaseThreeValuesContainer",
|
|
8
|
+
widgetBaseThreeValuesLeftValue = "widgetBaseThreeValuesLeftValue",
|
|
9
|
+
widgetBaseThreeValuesRigthContainer = "widgetBaseThreeValuesRigthContainer",
|
|
10
|
+
widgetBaseThreeValuesFirstValue = "widgetBaseThreeValuesFirstValue",
|
|
11
|
+
widgetBaseThreeValuesSecondValue = "widgetBaseThreeValuesSecondValue"
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=WidgetBaseThreeValuesEnum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetBaseThreeValuesEnum.d.ts","sourceRoot":"","sources":["../../../../../../../packages/widgets/src/cards/WidgetBaseThreeValues/slots/WidgetBaseThreeValuesEnum.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,0BAA0B;IACpC,cAAc,mBAAmB;IACjC,8BAA8B,mCAAmC;IACjE,8BAA8B,mCAAmC;IACjE,mCAAmC,wCAAwC;IAC3E,+BAA+B,oCAAoC;IACnE,gCAAgC,qCAAqC;CACtE"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var a = /* @__PURE__ */ ((e) => (e.widgetBaseRoot = "widgetBaseRoot", e.widgetBaseThreeValuesContainer = "widgetBaseThreeValuesContainer", e.widgetBaseThreeValuesLeftValue = "widgetBaseThreeValuesLeftValue", e.widgetBaseThreeValuesRigthContainer = "widgetBaseThreeValuesRigthContainer", e.widgetBaseThreeValuesFirstValue = "widgetBaseThreeValuesFirstValue", e.widgetBaseThreeValuesSecondValue = "widgetBaseThreeValuesSecondValue", e))(a || {});
|
|
2
|
+
export {
|
|
3
|
+
a as WidgetBaseThreeValuesSlots
|
|
4
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const WidgetBaseThreeValuesRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
2
|
+
ownerState?: (Partial<import('../types').WidgetBaseThreeValuesOwnerState> & Record<string, unknown>) | undefined;
|
|
3
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
4
|
+
export declare const WidgetBaseThreeValuesContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
5
|
+
ownerState?: (Partial<import('../types').WidgetBaseThreeValuesOwnerState> & Record<string, unknown>) | undefined;
|
|
6
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
7
|
+
export declare const WidgetBaseThreeValuesLeftValueStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
8
|
+
ownerState?: (Partial<import('../types').WidgetBaseThreeValuesOwnerState> & Record<string, unknown>) | undefined;
|
|
9
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
10
|
+
export declare const WidgetBaseThreeValuesRigthContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
11
|
+
ownerState?: (Partial<import('../types').WidgetBaseThreeValuesOwnerState> & Record<string, unknown>) | undefined;
|
|
12
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
13
|
+
export declare const WidgetBaseThreeValuesFirstValueStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
14
|
+
ownerState?: (Partial<import('../types').WidgetBaseThreeValuesOwnerState> & Record<string, unknown>) | undefined;
|
|
15
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
16
|
+
export declare const WidgetBaseThreeValuesSecondValueStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
17
|
+
ownerState?: (Partial<import('../types').WidgetBaseThreeValuesOwnerState> & Record<string, unknown>) | undefined;
|
|
18
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
19
|
+
//# sourceMappingURL=WidgetBaseThreeValuesSlots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetBaseThreeValuesSlots.d.ts","sourceRoot":"","sources":["../../../../../../../packages/widgets/src/cards/WidgetBaseThreeValues/slots/WidgetBaseThreeValuesSlots.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,+BAA+B;;6NAGE,CAAC;AAE/C,eAAO,MAAM,oCAAoC;;6NAGa,CAAC;AAE/D,eAAO,MAAM,oCAAoC;;6NAGa,CAAC;AAE/D,eAAO,MAAM,yCAAyC;;6NAGa,CAAC;AAEpE,eAAO,MAAM,qCAAqC;;6NAGa,CAAC;AAEhE,eAAO,MAAM,sCAAsC;;6NAGa,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { styled as e } from "@mui/material/styles";
|
|
2
|
+
import { widgetBaseThreeValuesStyles as t } from "../WidgetBaseThreeValues.styles.js";
|
|
3
|
+
import { WidgetBaseThreeValuesSlots as a } from "./WidgetBaseThreeValuesEnum.js";
|
|
4
|
+
import { WIDGET_BASE_THREE_VALUES_KEY_COMPONENT as s } from "../constants.js";
|
|
5
|
+
const r = e("div", {
|
|
6
|
+
name: s,
|
|
7
|
+
slot: a.widgetBaseRoot
|
|
8
|
+
})(t.widgetBaseRoot), V = e("div", {
|
|
9
|
+
name: s,
|
|
10
|
+
slot: a.widgetBaseThreeValuesContainer
|
|
11
|
+
})(t.widgetBaseThreeValuesContainer), n = e("div", {
|
|
12
|
+
name: s,
|
|
13
|
+
slot: a.widgetBaseThreeValuesLeftValue
|
|
14
|
+
})(t.widgetBaseThreeValuesLeftValue), u = e("div", {
|
|
15
|
+
name: s,
|
|
16
|
+
slot: a.widgetBaseThreeValuesRigthContainer
|
|
17
|
+
})(t.widgetBaseThreeValuesRigthContainer), g = e("div", {
|
|
18
|
+
name: s,
|
|
19
|
+
slot: a.widgetBaseThreeValuesFirstValue
|
|
20
|
+
})(t.widgetBaseThreeValuesFirstValue), h = e("div", {
|
|
21
|
+
name: s,
|
|
22
|
+
slot: a.widgetBaseThreeValuesSecondValue
|
|
23
|
+
})(t.widgetBaseThreeValuesSecondValue);
|
|
24
|
+
export {
|
|
25
|
+
V as WidgetBaseThreeValuesContainerStyled,
|
|
26
|
+
g as WidgetBaseThreeValuesFirstValueStyled,
|
|
27
|
+
n as WidgetBaseThreeValuesLeftValueStyled,
|
|
28
|
+
u as WidgetBaseThreeValuesRigthContainerStyled,
|
|
29
|
+
r as WidgetBaseThreeValuesRootStyled,
|
|
30
|
+
h as WidgetBaseThreeValuesSecondValueStyled
|
|
31
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { WidgetBaseThreeValuesSlots } from './slots/WidgetBaseThreeValuesEnum';
|
|
2
|
+
import { WIDGET_BASE_THREE_VALUES_KEY_COMPONENT } from './constants';
|
|
3
|
+
import { M4LOverridesStyleRules, MenuAction } from '@m4l/components';
|
|
4
|
+
import { Theme } from '@mui/material/styles';
|
|
5
|
+
import { ReactNode } from 'react';
|
|
6
|
+
import { Sizes } from '@m4l/styles';
|
|
7
|
+
/**
|
|
8
|
+
* Props for the WidgetBaseThreeValues component.
|
|
9
|
+
*/
|
|
10
|
+
export interface WidgetBaseThreeValuesProps {
|
|
11
|
+
title: string;
|
|
12
|
+
leftValue: ReactNode;
|
|
13
|
+
firstValue: ReactNode;
|
|
14
|
+
secondValue: ReactNode;
|
|
15
|
+
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
16
|
+
tooltip?: string;
|
|
17
|
+
isAlarm?: boolean;
|
|
18
|
+
menuActions?: MenuAction[];
|
|
19
|
+
}
|
|
20
|
+
export type WidgetBaseThreeValuesOwnerState = {
|
|
21
|
+
size?: WidgetBaseThreeValuesProps['size'];
|
|
22
|
+
};
|
|
23
|
+
export type WidgetBaseThreeValuesSlotsType = keyof typeof WidgetBaseThreeValuesSlots;
|
|
24
|
+
export type WidgetBaseThreeValuesStyles = M4LOverridesStyleRules<WidgetBaseThreeValuesSlotsType, typeof WIDGET_BASE_THREE_VALUES_KEY_COMPONENT, Theme>;
|
|
25
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetBaseThreeValues/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,sCAAsC,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,SAAS,CAAC;IACtB,WAAW,EAAE,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;CAC5B;AAED,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,CAAC,EAAE,0BAA0B,CAAC,MAAM,CAAC,CAAC;CAC3C,CAAC;AACF,MAAM,MAAM,8BAA8B,GAAG,MAAM,OAAO,0BAA0B,CAAC;AACrF,MAAM,MAAM,2BAA2B,GAAG,sBAAsB,CAAC,8BAA8B,EAAE,OAAO,sCAAsC,EAAE,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { WidgetDigitalInputProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* WidgetDigitalInput component.
|
|
4
|
+
* @param title - Title of the widget.
|
|
5
|
+
* @param isOpen - Is open of the widget.
|
|
6
|
+
* @param titleOpen - Title open of the widget.
|
|
7
|
+
* @param titleClosed - Title closed of the widget.
|
|
8
|
+
* @param imageUrlOpen - Image url open of the widget.
|
|
9
|
+
* @param imageUrlClosed - Image url closed of the widget.
|
|
10
|
+
* @param secondValue - Second value of the widget.
|
|
11
|
+
* @param chipColorOpen - Chip color open of the widget.
|
|
12
|
+
* @param chipColorClosed - Chip color closed of the widget.
|
|
13
|
+
* @param size - Size of the widget.
|
|
14
|
+
* @param tooltip - Tooltip of the widget.
|
|
15
|
+
* @param isAlarm - Is alarm of the widget.
|
|
16
|
+
* @param menuActions - Menu actions of the widget.
|
|
17
|
+
*/
|
|
18
|
+
export declare function WidgetDigitalInput({ title, isOpen, titleOpen, titleClosed, imageUrlOpen, imageUrlClosed, value, chipColorOpen, size, tooltip, isAlarm, menuActions, }: WidgetDigitalInputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
19
|
+
export default WidgetDigitalInput;
|
|
20
|
+
//# sourceMappingURL=WidgetDigitalInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetDigitalInput.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetDigitalInput/WidgetDigitalInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAQrF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,MAAM,EACN,SAAS,EACT,WAAW,EACX,YAAY,EACZ,cAAc,EACd,KAAK,EACL,aAAsB,EACtB,IAAI,EACJ,OAAO,EACP,OAAO,EACP,WAAW,GACZ,EAAE,uBAAuB,oDAsCzB;AAED,eAAe,kBAAkB,CAAC"}
|