@actdim/dynstruct-mui 0.9.2 → 1.5.6
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 +91 -91
- package/dist/Accordion.d.ts +19 -0
- package/dist/Accordion.d.ts.map +1 -0
- package/dist/Accordion.es.js.map +1 -1
- package/dist/Alert.d.ts +18 -0
- package/dist/Alert.d.ts.map +1 -0
- package/dist/Alert.es.js.map +1 -1
- package/dist/Autocomplete.d.ts +26 -0
- package/dist/Autocomplete.d.ts.map +1 -0
- package/dist/Autocomplete.es.js.map +1 -1
- package/dist/Avatar.d.ts +18 -0
- package/dist/Avatar.d.ts.map +1 -0
- package/dist/Avatar.es.js.map +1 -1
- package/dist/Badge.d.ts +21 -0
- package/dist/Badge.d.ts.map +1 -0
- package/dist/Badge.es.js.map +1 -1
- package/dist/Breadcrumbs.d.ts +22 -0
- package/dist/Breadcrumbs.d.ts.map +1 -0
- package/dist/Breadcrumbs.es.js.map +1 -1
- package/dist/Button.d.ts +23 -0
- package/dist/Button.d.ts.map +1 -0
- package/dist/Button.es.js.map +1 -1
- package/dist/Card.d.ts +21 -0
- package/dist/Card.d.ts.map +1 -0
- package/dist/Card.es.js.map +1 -1
- package/dist/Checkbox.d.ts +22 -0
- package/dist/Checkbox.d.ts.map +1 -0
- package/dist/Checkbox.es.js.map +1 -1
- package/dist/Chip.d.ts +21 -0
- package/dist/Chip.d.ts.map +1 -0
- package/dist/Chip.es.js.map +1 -1
- package/dist/CircularProgress.d.ts +19 -0
- package/dist/CircularProgress.d.ts.map +1 -0
- package/dist/CircularProgress.es.js.map +1 -1
- package/dist/Dialog.d.ts +22 -0
- package/dist/Dialog.d.ts.map +1 -0
- package/dist/Dialog.es.js.map +1 -1
- package/dist/Drawer.d.ts +19 -0
- package/dist/Drawer.d.ts.map +1 -0
- package/dist/Drawer.es.js.map +1 -1
- package/dist/Fab.d.ts +21 -0
- package/dist/Fab.d.ts.map +1 -0
- package/dist/Fab.es.js.map +1 -1
- package/dist/IconButton.d.ts +21 -0
- package/dist/IconButton.d.ts.map +1 -0
- package/dist/IconButton.es.js.map +1 -1
- package/dist/LinearProgress.d.ts +18 -0
- package/dist/LinearProgress.d.ts.map +1 -0
- package/dist/LinearProgress.es.js.map +1 -1
- package/dist/List.d.ts +25 -0
- package/dist/List.d.ts.map +1 -0
- package/dist/List.es.js.map +1 -1
- package/dist/Menu.d.ts +24 -0
- package/dist/Menu.d.ts.map +1 -0
- package/dist/Menu.es.js.map +1 -1
- package/dist/Pagination.d.ts +21 -0
- package/dist/Pagination.d.ts.map +1 -0
- package/dist/Pagination.es.js.map +1 -1
- package/dist/RadioGroup.d.ts +27 -0
- package/dist/RadioGroup.d.ts.map +1 -0
- package/dist/RadioGroup.es.js.map +1 -1
- package/dist/Rating.d.ts +20 -0
- package/dist/Rating.d.ts.map +1 -0
- package/dist/Rating.es.js.map +1 -1
- package/dist/Select.d.ts +28 -0
- package/dist/Select.d.ts.map +1 -0
- package/dist/Select.es.js.map +1 -1
- package/dist/Skeleton.d.ts +18 -0
- package/dist/Skeleton.d.ts.map +1 -0
- package/dist/Skeleton.es.js.map +1 -1
- package/dist/Slider.d.ts +24 -0
- package/dist/Slider.d.ts.map +1 -0
- package/dist/Slider.es.js.map +1 -1
- package/dist/Snackbar.d.ts +20 -0
- package/dist/Snackbar.d.ts.map +1 -0
- package/dist/Snackbar.es.js.map +1 -1
- package/dist/SpeedDial.d.ts +24 -0
- package/dist/SpeedDial.d.ts.map +1 -0
- package/dist/SpeedDial.es.js.map +1 -1
- package/dist/Stepper.d.ts +23 -0
- package/dist/Stepper.d.ts.map +1 -0
- package/dist/Stepper.es.js.map +1 -1
- package/dist/Switch.d.ts +21 -0
- package/dist/Switch.d.ts.map +1 -0
- package/dist/Switch.es.js.map +1 -1
- package/dist/Table.d.ts +24 -0
- package/dist/Table.d.ts.map +1 -0
- package/dist/Table.es.js.map +1 -1
- package/dist/Tabs.d.ts +25 -0
- package/dist/Tabs.d.ts.map +1 -0
- package/dist/Tabs.es.js.map +1 -1
- package/dist/TextField.d.ts +27 -0
- package/dist/TextField.d.ts.map +1 -0
- package/dist/TextField.es.js.map +1 -1
- package/dist/Toast.d.ts +36 -0
- package/dist/Toast.d.ts.map +1 -0
- package/dist/Toast.es.js +135 -0
- package/dist/Toast.es.js.map +1 -0
- package/dist/ToggleButtonGroup.d.ts +28 -0
- package/dist/ToggleButtonGroup.d.ts.map +1 -0
- package/dist/ToggleButtonGroup.es.js.map +1 -1
- package/dist/Tooltip.d.ts +17 -0
- package/dist/Tooltip.d.ts.map +1 -0
- package/dist/Tooltip.es.js.map +1 -1
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es.js +3 -0
- package/dist/index.es.js.map +1 -1
- package/package.json +132 -133
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../src/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAKH,KAAK,aAAa,IAAI,gBAAgB,EACtC,KAAK,UAAU,IAAI,aAAa,EACnC,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,KAAK,eAAe,EAEpB,KAAK,eAAe,EACpB,KAAK,SAAS,EAEjB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,MAAM,MAAM,SAAS,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,OAAO,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;CACjC,CAAC;AAEF,KAAK,MAAM,CAAC,UAAU,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,eAAe,CACjF,UAAU,EACV;IACI,KAAK,EAAE;QAEH,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;QACpB,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;QAGjC,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;QACrC,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;QACnC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACjC,YAAY,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;QAChD,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACzB,EAAE,CAAC,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC5B,OAAO,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;KACjC,CAAC;CACL,CACJ,CAAC;AA8CF,eAAO,MAAM,QAAQ,GAAI,QAAQ,eAAe,CAAC,MAAM,CAAC,KAAG,SAAS,CAAC,MAAM,CA8F1E,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC,eAAO,MAAM,KAAK,qDAAoB,CAAC"}
|
package/dist/Toast.es.js
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Snackbar, Alert, AlertTitle, Collapse } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const ToastItemView = /* @__PURE__ */ __name(({ item, onDismiss }) => {
|
|
7
|
+
React.useEffect(() => {
|
|
8
|
+
const duration = item.autoHideDuration ?? 5e3;
|
|
9
|
+
if (duration > 0) {
|
|
10
|
+
const timer = setTimeout(() => {
|
|
11
|
+
onDismiss(item.id);
|
|
12
|
+
}, duration);
|
|
13
|
+
return () => {
|
|
14
|
+
clearTimeout(timer);
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
return void 0;
|
|
18
|
+
}, [item.id, item.autoHideDuration, onDismiss]);
|
|
19
|
+
return /* @__PURE__ */ React.createElement(Collapse, { in: true }, /* @__PURE__ */ React.createElement("div", { style: { pointerEvents: "auto" } }, /* @__PURE__ */ React.createElement(
|
|
20
|
+
Alert,
|
|
21
|
+
{
|
|
22
|
+
onClose: /* @__PURE__ */ __name(() => {
|
|
23
|
+
onDismiss(item.id);
|
|
24
|
+
}, "onClose"),
|
|
25
|
+
severity: item.severity || "info",
|
|
26
|
+
variant: item.variant || "filled",
|
|
27
|
+
sx: {
|
|
28
|
+
width: "100%",
|
|
29
|
+
minWidth: "300px",
|
|
30
|
+
boxShadow: 4,
|
|
31
|
+
...item.alertSx
|
|
32
|
+
},
|
|
33
|
+
action: item.action
|
|
34
|
+
},
|
|
35
|
+
item.title ? /* @__PURE__ */ React.createElement(AlertTitle, null, item.title) : null,
|
|
36
|
+
item.message
|
|
37
|
+
)));
|
|
38
|
+
}, "ToastItemView");
|
|
39
|
+
const useToast = /* @__PURE__ */ __name((params) => {
|
|
40
|
+
let c;
|
|
41
|
+
let m;
|
|
42
|
+
const def = {
|
|
43
|
+
regType: "Toast",
|
|
44
|
+
props: {
|
|
45
|
+
items: void 0,
|
|
46
|
+
onDismiss: void 0,
|
|
47
|
+
open: false,
|
|
48
|
+
onClose: /* @__PURE__ */ __name(() => {
|
|
49
|
+
}, "onClose"),
|
|
50
|
+
message: "",
|
|
51
|
+
title: void 0,
|
|
52
|
+
severity: "info",
|
|
53
|
+
variant: "filled",
|
|
54
|
+
autoHideDuration: 5e3,
|
|
55
|
+
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
56
|
+
action: void 0,
|
|
57
|
+
sx: void 0,
|
|
58
|
+
alertSx: void 0
|
|
59
|
+
},
|
|
60
|
+
view: /* @__PURE__ */ __name(() => {
|
|
61
|
+
if (m.items && m.items.length > 0) {
|
|
62
|
+
const vertical = m.anchorOrigin?.vertical || "bottom";
|
|
63
|
+
const horizontal = m.anchorOrigin?.horizontal || "right";
|
|
64
|
+
const positionStyle = {
|
|
65
|
+
position: "fixed",
|
|
66
|
+
zIndex: 2e3,
|
|
67
|
+
display: "flex",
|
|
68
|
+
flexDirection: vertical === "top" ? "column" : "column-reverse",
|
|
69
|
+
gap: 8,
|
|
70
|
+
maxWidth: "420px",
|
|
71
|
+
width: "calc(100% - 32px)",
|
|
72
|
+
pointerEvents: "none",
|
|
73
|
+
top: vertical === "top" ? 16 : void 0,
|
|
74
|
+
bottom: vertical === "bottom" ? 16 : void 0,
|
|
75
|
+
left: horizontal === "left" ? 16 : horizontal === "center" ? "50%" : void 0,
|
|
76
|
+
right: horizontal === "right" ? 16 : void 0,
|
|
77
|
+
transform: horizontal === "center" ? "translateX(-50%)" : void 0
|
|
78
|
+
};
|
|
79
|
+
return /* @__PURE__ */ React.createElement("div", { style: positionStyle }, m.items.map((item) => {
|
|
80
|
+
return /* @__PURE__ */ React.createElement(
|
|
81
|
+
ToastItemView,
|
|
82
|
+
{
|
|
83
|
+
key: item.id,
|
|
84
|
+
item,
|
|
85
|
+
onDismiss: /* @__PURE__ */ __name((id) => {
|
|
86
|
+
if (m.onDismiss) {
|
|
87
|
+
m.onDismiss(id);
|
|
88
|
+
}
|
|
89
|
+
}, "onDismiss")
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
return /* @__PURE__ */ React.createElement(
|
|
95
|
+
Snackbar,
|
|
96
|
+
{
|
|
97
|
+
open: m.open,
|
|
98
|
+
onClose: /* @__PURE__ */ __name((_, reason) => {
|
|
99
|
+
if (reason === "clickaway") {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (m.onClose) {
|
|
103
|
+
m.onClose();
|
|
104
|
+
}
|
|
105
|
+
}, "onClose"),
|
|
106
|
+
autoHideDuration: m.autoHideDuration,
|
|
107
|
+
anchorOrigin: m.anchorOrigin,
|
|
108
|
+
action: m.action,
|
|
109
|
+
sx: m.sx
|
|
110
|
+
},
|
|
111
|
+
/* @__PURE__ */ React.createElement(
|
|
112
|
+
Alert,
|
|
113
|
+
{
|
|
114
|
+
onClose: m.onClose,
|
|
115
|
+
severity: m.severity,
|
|
116
|
+
variant: m.variant,
|
|
117
|
+
sx: { width: "100%", minWidth: "280px", ...m.alertSx }
|
|
118
|
+
},
|
|
119
|
+
m.title ? /* @__PURE__ */ React.createElement(AlertTitle, null, m.title) : null,
|
|
120
|
+
m.message
|
|
121
|
+
)
|
|
122
|
+
);
|
|
123
|
+
}, "view")
|
|
124
|
+
};
|
|
125
|
+
c = useComponent(def, params);
|
|
126
|
+
m = c.model;
|
|
127
|
+
return c;
|
|
128
|
+
}, "useToast");
|
|
129
|
+
const Toast = toReact(useToast);
|
|
130
|
+
Toast.displayName = "Toast";
|
|
131
|
+
export {
|
|
132
|
+
Toast,
|
|
133
|
+
useToast
|
|
134
|
+
};
|
|
135
|
+
//# sourceMappingURL=Toast.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toast.es.js","sources":["../src/Toast.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Snackbar as MuiSnackbar,\n Alert as MuiAlert,\n AlertTitle as MuiAlertTitle,\n Collapse,\n type SnackbarProps as MuiSnackbarProps,\n type AlertProps as MuiAlertProps,\n} from '@mui/material';\nimport {\n type ComponentStruct,\n type ComponentDef,\n type ComponentParams,\n type Component,\n type ComponentModel,\n} from '@actdim/dynstruct/componentModel/contracts';\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\n\nexport type ToastItem = {\n id: string;\n message: string;\n title?: string;\n severity?: MuiAlertProps['severity'];\n variant?: MuiAlertProps['variant'];\n autoHideDuration?: number | null;\n action?: React.ReactNode;\n alertSx?: MuiAlertProps['sx'];\n};\n\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n // Stack mode\n items?: ToastItem[];\n onDismiss?: (id: string) => void;\n\n // Single toast mode\n open?: boolean;\n onClose?: () => void;\n message?: string;\n title?: string;\n severity?: MuiAlertProps['severity'];\n variant?: MuiAlertProps['variant'];\n autoHideDuration?: number | null;\n anchorOrigin?: MuiSnackbarProps['anchorOrigin'];\n action?: React.ReactNode;\n sx?: MuiSnackbarProps['sx'];\n alertSx?: MuiAlertProps['sx'];\n };\n }\n>;\n\ntype ToastItemProps = {\n item: ToastItem;\n onDismiss: (id: string) => void;\n};\n\nconst ToastItemView: React.FC<ToastItemProps> = ({ item, onDismiss }) => {\n React.useEffect(() => {\n const duration = item.autoHideDuration ?? 5000;\n if (duration > 0) {\n const timer = setTimeout(() => {\n onDismiss(item.id);\n }, duration);\n return () => {\n clearTimeout(timer);\n };\n }\n return undefined;\n }, [item.id, item.autoHideDuration, onDismiss]);\n\n return (\n <Collapse in={true}>\n <div style={{ pointerEvents: 'auto' }}>\n <MuiAlert\n onClose={() => {\n onDismiss(item.id);\n }}\n severity={item.severity || 'info'}\n variant={item.variant || 'filled'}\n sx={{\n width: '100%',\n minWidth: '300px',\n boxShadow: 4,\n ...item.alertSx,\n }}\n action={item.action}\n >\n {item.title ? <MuiAlertTitle>{item.title}</MuiAlertTitle> : null}\n {item.message}\n </MuiAlert>\n </div>\n </Collapse>\n );\n};\n\nexport const useToast = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Toast',\n props: {\n items: undefined,\n onDismiss: undefined,\n open: false,\n onClose: () => {},\n message: '',\n title: undefined,\n severity: 'info',\n variant: 'filled',\n autoHideDuration: 5000,\n anchorOrigin: { vertical: 'bottom', horizontal: 'right' },\n action: undefined,\n sx: undefined,\n alertSx: undefined,\n },\n view: () => {\n if (m.items && m.items.length > 0) {\n const vertical = m.anchorOrigin?.vertical || 'bottom';\n const horizontal = m.anchorOrigin?.horizontal || 'right';\n\n const positionStyle: React.CSSProperties = {\n position: 'fixed',\n zIndex: 2000,\n display: 'flex',\n flexDirection: vertical === 'top' ? 'column' : 'column-reverse',\n gap: 8,\n maxWidth: '420px',\n width: 'calc(100% - 32px)',\n pointerEvents: 'none',\n top: vertical === 'top' ? 16 : undefined,\n bottom: vertical === 'bottom' ? 16 : undefined,\n left: horizontal === 'left' ? 16 : horizontal === 'center' ? '50%' : undefined,\n right: horizontal === 'right' ? 16 : undefined,\n transform: horizontal === 'center' ? 'translateX(-50%)' : undefined,\n };\n\n return (\n <div style={positionStyle}>\n {m.items.map((item) => {\n return (\n <ToastItemView\n key={item.id}\n item={item}\n onDismiss={(id) => {\n if (m.onDismiss) {\n m.onDismiss(id);\n }\n }}\n />\n );\n })}\n </div>\n );\n }\n\n return (\n <MuiSnackbar\n open={m.open}\n onClose={(_, reason) => {\n if (reason === 'clickaway') {\n return;\n }\n if (m.onClose) {\n m.onClose();\n }\n }}\n autoHideDuration={m.autoHideDuration}\n anchorOrigin={m.anchorOrigin}\n action={m.action}\n sx={m.sx}\n >\n <MuiAlert\n onClose={m.onClose}\n severity={m.severity}\n variant={m.variant}\n sx={{ width: '100%', minWidth: '280px', ...m.alertSx }}\n >\n {m.title ? <MuiAlertTitle>{m.title}</MuiAlertTitle> : null}\n {m.message}\n </MuiAlert>\n </MuiSnackbar>\n );\n },\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type ToastStruct = Struct;\n\nexport const Toast = toReact(useToast);\nToast.displayName = 'Toast';\r\n"],"names":["MuiAlert","MuiAlertTitle","MuiSnackbar"],"mappings":";;;;;AA2DA,MAAM,gBAA0C,wBAAC,EAAE,MAAM,gBAAgB;AACrE,QAAM,UAAU,MAAM;AAClB,UAAM,WAAW,KAAK,oBAAoB;AAC1C,QAAI,WAAW,GAAG;AACd,YAAM,QAAQ,WAAW,MAAM;AAC3B,kBAAU,KAAK,EAAE;AAAA,MACrB,GAAG,QAAQ;AACX,aAAO,MAAM;AACT,qBAAa,KAAK;AAAA,MACtB;AAAA,IACJ;AACA,WAAO;AAAA,EACX,GAAG,CAAC,KAAK,IAAI,KAAK,kBAAkB,SAAS,CAAC;AAE9C,SACI,sBAAA,cAAC,UAAA,EAAS,IAAI,KAAA,GACV,sBAAA,cAAC,SAAI,OAAO,EAAE,eAAe,OAAA,EAAO,GAChC,sBAAA;AAAA,IAACA;AAAAA,IAAA;AAAA,MACG,SAAS,6BAAM;AACX,kBAAU,KAAK,EAAE;AAAA,MACrB,GAFS;AAAA,MAGT,UAAU,KAAK,YAAY;AAAA,MAC3B,SAAS,KAAK,WAAW;AAAA,MACzB,IAAI;AAAA,QACA,OAAO;AAAA,QACP,UAAU;AAAA,QACV,WAAW;AAAA,QACX,GAAG,KAAK;AAAA,MAAA;AAAA,MAEZ,QAAQ,KAAK;AAAA,IAAA;AAAA,IAEZ,KAAK,QAAQ,sBAAA,cAACC,YAAA,MAAe,KAAK,KAAM,IAAmB;AAAA,IAC3D,KAAK;AAAA,EAAA,CAEd,CACJ;AAER,GArCgD;AAuCzC,MAAM,WAAW,wBAAC,WAAuD;AAC5E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,OAAO;AAAA,MACP,WAAW;AAAA,MACX,MAAM;AAAA,MACN,SAAS,6BAAM;AAAA,MAAC,GAAP;AAAA,MACT,SAAS;A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QAAA;AAAA,YACN;AAAA,UACJ,GAPS;AAAA,UAQT,kBAAkB,EAAE;AAAA,UACpB,cAAc,EAAE;AAAA,UAChB,QAAQ,EAAE;AAAA,UACV,IAAI,EAAE;AAAA,QAAA;AAAA,QAEN,sBAAA;AAAA,UAACF;AAAAA,UAAA;AAAA,YACG,SAAS,EAAE;AAAA,YACX,UAAU,EAAE;AAAA,YACZ,SAAS,EAAE;AAAA,YACX,IAAI,EAAE,OAAO,QAAQ,UAAU,SAAS,GAAG,EAAE,QAAA;AAAA,UAAQ;AAAA,UAEpD,EAAE,QAAQ,sBAAA,cAACC,YAAA,MAAe,EAAE,KAAM,IAAmB;AAAA,UACrD,EAAE;AAAA,QAAA;AAAA,MACP;AAAA,IAGZ,GAnEM;AAAA,EAmEN;AAGJ,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA9FwB;AAkGjB,MAAM,QAAQ,QAAQ,QAAQ;AACrC,MAAM,cAAc;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ToggleButtonGroupProps as MuiToggleButtonGroupProps } from '@mui/material';
|
|
3
|
+
import { ComponentStruct, ComponentParams, Component } from '@actdim/dynstruct/componentModel/contracts';
|
|
4
|
+
import { BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';
|
|
5
|
+
export type ToggleItem = {
|
|
6
|
+
value: string;
|
|
7
|
+
label?: React.ReactNode;
|
|
8
|
+
icon?: React.FC;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
};
|
|
11
|
+
type Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<TMsgStruct, {
|
|
12
|
+
props: {
|
|
13
|
+
value: string | string[];
|
|
14
|
+
onChange: (value: string | string[]) => void;
|
|
15
|
+
items: ToggleItem[];
|
|
16
|
+
exclusive?: boolean;
|
|
17
|
+
size?: MuiToggleButtonGroupProps['size'];
|
|
18
|
+
color?: MuiToggleButtonGroupProps['color'];
|
|
19
|
+
orientation?: MuiToggleButtonGroupProps['orientation'];
|
|
20
|
+
fullWidth?: boolean;
|
|
21
|
+
sx?: MuiToggleButtonGroupProps['sx'];
|
|
22
|
+
};
|
|
23
|
+
}>;
|
|
24
|
+
export declare const useToggleButtonGroup: (params: ComponentParams<Struct>) => Component<Struct>;
|
|
25
|
+
export type ToggleButtonGroupStruct = Struct;
|
|
26
|
+
export declare const ToggleButtonGroup: React.FC<ComponentParams<Struct<BaseAppMsgStruct>>>;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=ToggleButtonGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToggleButtonGroup.d.ts","sourceRoot":"","sources":["../src/ToggleButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAGH,KAAK,sBAAsB,IAAI,yBAAyB,EAC3D,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,KAAK,eAAe,EAEpB,KAAK,eAAe,EACpB,KAAK,SAAS,EAEjB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,MAAM,MAAM,UAAU,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,KAAK,MAAM,CAAC,UAAU,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,eAAe,CACjF,UAAU,EACV;IACI,KAAK,EAAE;QACH,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC;QAC7C,KAAK,EAAE,UAAU,EAAE,CAAC;QACpB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,IAAI,CAAC,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAC;QACzC,KAAK,CAAC,EAAE,yBAAyB,CAAC,OAAO,CAAC,CAAC;QAC3C,WAAW,CAAC,EAAE,yBAAyB,CAAC,aAAa,CAAC,CAAC;QACvD,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,EAAE,CAAC,EAAE,yBAAyB,CAAC,IAAI,CAAC,CAAC;KACxC,CAAC;CACL,CACJ,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,QAAQ,eAAe,CAAC,MAAM,CAAC,KAAG,SAAS,CAAC,MAAM,CA4CtF,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,eAAO,MAAM,iBAAiB,qDAAgC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleButtonGroup.es.js","sources":["
|
|
1
|
+
{"version":3,"file":"ToggleButtonGroup.es.js","sources":["../src/ToggleButtonGroup.tsx"],"sourcesContent":["import React from 'react';\r\nimport {\r\n ToggleButtonGroup as MuiToggleButtonGroup,\r\n ToggleButton as MuiToggleButton,\r\n type ToggleButtonGroupProps as MuiToggleButtonGroupProps,\r\n} from '@mui/material';\r\nimport {\r\n type ComponentStruct,\r\n type ComponentDef,\r\n type ComponentParams,\r\n type Component,\r\n type ComponentModel,\r\n} from '@actdim/dynstruct/componentModel/contracts';\r\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\r\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\r\n\r\nexport type ToggleItem = {\r\n value: string;\r\n label?: React.ReactNode;\r\n icon?: React.FC;\r\n disabled?: boolean;\r\n};\r\n\r\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\r\n TMsgStruct,\r\n {\r\n props: {\r\n value: string | string[];\r\n onChange: (value: string | string[]) => void;\r\n items: ToggleItem[];\r\n exclusive?: boolean;\r\n size?: MuiToggleButtonGroupProps['size'];\r\n color?: MuiToggleButtonGroupProps['color'];\r\n orientation?: MuiToggleButtonGroupProps['orientation'];\r\n fullWidth?: boolean;\r\n sx?: MuiToggleButtonGroupProps['sx'];\r\n };\r\n }\r\n>;\r\n\r\nexport const useToggleButtonGroup = (params: ComponentParams<Struct>): Component<Struct> => {\r\n let c: Component<Struct>;\r\n let m: ComponentModel<Struct>;\r\n\r\n const def: ComponentDef<Struct> = {\r\n regType: 'ToggleButtonGroup',\r\n props: {\r\n value: [],\r\n onChange: () => {},\r\n items: [],\r\n exclusive: false,\r\n size: 'medium',\r\n color: 'standard',\r\n orientation: 'horizontal',\r\n fullWidth: false,\r\n sx: undefined,\r\n },\r\n view: () => (\r\n <MuiToggleButtonGroup\r\n value={m.value}\r\n onChange={(_, newValue) => {\r\n if (newValue !== null) m.onChange(newValue);\r\n }}\r\n exclusive={m.exclusive}\r\n size={m.size}\r\n color={m.color}\r\n orientation={m.orientation}\r\n fullWidth={m.fullWidth}\r\n disabled={m.$.isDisabled}\r\n sx={m.sx}\r\n >\r\n {m.items.map((item) => (\r\n <MuiToggleButton key={item.value} value={item.value} disabled={item.disabled}>\r\n {item.icon && <item.icon />}\r\n {item.label}\r\n </MuiToggleButton>\r\n ))}\r\n </MuiToggleButtonGroup>\r\n ),\r\n };\r\n\r\n c = useComponent(def, params);\r\n m = c.model;\r\n return c;\r\n};\r\n\r\nexport type ToggleButtonGroupStruct = Struct;\r\n\r\nexport const ToggleButtonGroup = toReact(useToggleButtonGroup);\r\nToggleButtonGroup.displayName = 'ToggleButtonGroup';\r\n"],"names":["MuiToggleButtonGroup","MuiToggleButton"],"mappings":";;;;;AAwCO,MAAM,uBAAuB,wBAAC,WAAuD;AACxF,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,OAAO,CAAA;AAAA,MACP,UAAU,6BAAM;AAAA,MAAC,GAAP;AAAA,MACV,OAAO,CAAA;AAAA,MACP,WAAW;AAAA,MACX,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,MACb,WAAW;AAAA,MACX,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,OAAO,EAAE;AAAA,QACT,UAAU,wBAAC,GAAG,aAAa;AACvB,cAAI,aAAa,KAAM,GAAE,SAAS,QAAQ;AAAA,QAC9C,GAFU;AAAA,QAGV,WAAW,EAAE;AAAA,QACb,MAAM,EAAE;AAAA,QACR,OAAO,EAAE;AAAA,QACT,aAAa,EAAE;AAAA,QACf,WAAW,EAAE;AAAA,QACb,UAAU,EAAE,EAAE;AAAA,QACd,IAAI,EAAE;AAAA,MAAA;AAAA,MAEL,EAAE,MAAM,IAAI,CAAC,6CACTC,cAAA,EAAgB,KAAK,KAAK,OAAO,OAAO,KAAK,OAAO,UAAU,KAAK,YAC/D,KAAK,QAAQ,sBAAA,cAAC,KAAK,MAAL,IAAU,GACxB,KAAK,KACV,CACH;AAAA,IAAA,GAnBH;AAAA,EAoBF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA5CoC;AAgD7B,MAAM,oBAAoB,QAAQ,oBAAoB;AAC7D,kBAAkB,cAAc;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TooltipProps as MuiTooltipProps } from '@mui/material';
|
|
3
|
+
import { ComponentStruct, ComponentParams, Component } from '@actdim/dynstruct/componentModel/contracts';
|
|
4
|
+
import { BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';
|
|
5
|
+
type Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<TMsgStruct, {
|
|
6
|
+
props: {
|
|
7
|
+
title: React.ReactNode;
|
|
8
|
+
children: React.FC;
|
|
9
|
+
placement?: MuiTooltipProps['placement'];
|
|
10
|
+
arrow?: boolean;
|
|
11
|
+
};
|
|
12
|
+
}>;
|
|
13
|
+
export declare const useTooltip: (params: ComponentParams<Struct>) => Component<Struct>;
|
|
14
|
+
export type TooltipStruct = Struct;
|
|
15
|
+
export declare const Tooltip: React.FC<ComponentParams<Struct<BaseAppMsgStruct>>>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../src/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAyB,KAAK,YAAY,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAC5F,OAAO,EACH,KAAK,eAAe,EAEpB,KAAK,eAAe,EACpB,KAAK,SAAS,EAEjB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAGjF,KAAK,MAAM,CAAC,UAAU,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,eAAe,CACjF,UAAU,EACV;IACI,KAAK,EAAE;QACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC;QACnB,SAAS,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;QACzC,KAAK,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;CACL,CACJ,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,QAAQ,eAAe,CAAC,MAAM,CAAC,KAAG,SAAS,CAAC,MAAM,CAwB5E,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC,eAAO,MAAM,OAAO,qDAAsB,CAAC"}
|
package/dist/Tooltip.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.es.js","sources":["
|
|
1
|
+
{"version":3,"file":"Tooltip.es.js","sources":["../src/Tooltip.tsx"],"sourcesContent":["import React from 'react';\r\nimport { Tooltip as MuiTooltip, type TooltipProps as MuiTooltipProps } from '@mui/material';\r\nimport {\r\n type ComponentStruct,\r\n type ComponentDef,\r\n type ComponentParams,\r\n type Component,\r\n type ComponentModel,\r\n} from '@actdim/dynstruct/componentModel/contracts';\r\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\r\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\r\nimport { KeyPath } from '@actdim/utico/typeCore';\r\n\r\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\r\n TMsgStruct,\r\n {\r\n props: {\r\n title: React.ReactNode;\r\n children: React.FC;\r\n placement?: MuiTooltipProps['placement'];\r\n arrow?: boolean;\r\n };\r\n }\r\n>;\r\n\r\nexport const useTooltip = (params: ComponentParams<Struct>): Component<Struct> => {\r\n let c: Component<Struct>;\r\n let m: ComponentModel<Struct>;\r\n\r\n const def: ComponentDef<Struct> = {\r\n regType: 'Tooltip',\r\n props: {\r\n title: '',\r\n children: () => null,\r\n placement: 'bottom',\r\n arrow: false,\r\n },\r\n view: () => (\r\n <MuiTooltip title={m.title} placement={m.placement} arrow={m.arrow}>\r\n <span>\r\n <m.children />\r\n </span>\r\n </MuiTooltip>\r\n ),\r\n };\r\n\r\n c = useComponent(def, params);\r\n m = c.model;\r\n return c;\r\n};\r\n\r\nexport type TooltipStruct = Struct;\r\n\r\nexport const Tooltip = toReact(useTooltip);\r\nTooltip.displayName = 'Tooltip';\r\n"],"names":["MuiTooltip"],"mappings":";;;;;AAyBO,MAAM,aAAa,wBAAC,WAAuD;AAC9E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,OAAO;AAAA,MACP,UAAU,6BAAM,MAAN;AAAA,MACV,WAAW;AAAA,MACX,OAAO;AAAA,IAAA;AAAA,IAEX,MAAM,6BACF,sBAAA,cAACA,WAAA,EAAW,OAAO,EAAE,OAAO,WAAW,EAAE,WAAW,OAAO,EAAE,MAAA,uCACxD,QAAA,MACG,sBAAA,cAAC,EAAE,UAAF,IAAW,CAChB,CACJ,GALE;AAAA,EAKF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAxB0B;AA4BnB,MAAM,UAAU,QAAQ,UAAU;AACzC,QAAQ,cAAc;"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export { useAccordion, type AccordionStruct, Accordion } from './Accordion';
|
|
2
|
+
export { useAlert, type AlertStruct, Alert } from './Alert';
|
|
3
|
+
export { useAutocomplete, type AutocompleteStruct, Autocomplete } from './Autocomplete';
|
|
4
|
+
export { useAvatar, type AvatarStruct, Avatar } from './Avatar';
|
|
5
|
+
export { useBadge, type BadgeStruct, Badge } from './Badge';
|
|
6
|
+
export { useBreadcrumbs, type BreadcrumbsStruct, Breadcrumbs } from './Breadcrumbs';
|
|
7
|
+
export { useButton, type ButtonStruct, Button } from './Button';
|
|
8
|
+
export { useCard, type CardStruct, Card } from './Card';
|
|
9
|
+
export { useCheckbox, type CheckboxStruct, Checkbox } from './Checkbox';
|
|
10
|
+
export { useChip, type ChipStruct, Chip } from './Chip';
|
|
11
|
+
export { useCircularProgress, type CircularProgressStruct, CircularProgress } from './CircularProgress';
|
|
12
|
+
export { useDialog, type DialogStruct, Dialog } from './Dialog';
|
|
13
|
+
export { useDrawer, type DrawerStruct, Drawer } from './Drawer';
|
|
14
|
+
export { useFab, type FabStruct, Fab } from './Fab';
|
|
15
|
+
export { useIconButton, type IconButtonStruct, IconButton } from './IconButton';
|
|
16
|
+
export { useLinearProgress, type LinearProgressStruct, LinearProgress } from './LinearProgress';
|
|
17
|
+
export { useList, type ListStruct, List } from './List';
|
|
18
|
+
export { useMenu, type MenuStruct, Menu } from './Menu';
|
|
19
|
+
export { usePagination, type PaginationStruct, Pagination } from './Pagination';
|
|
20
|
+
export { useRadioGroup, type RadioGroupStruct, RadioGroup } from './RadioGroup';
|
|
21
|
+
export { useRating, type RatingStruct, Rating } from './Rating';
|
|
22
|
+
export { useSelect, type SelectStruct, Select } from './Select';
|
|
23
|
+
export { useSkeleton, type SkeletonStruct, Skeleton } from './Skeleton';
|
|
24
|
+
export { useSlider, type SliderStruct, Slider } from './Slider';
|
|
25
|
+
export { useSnackbar, type SnackbarStruct, Snackbar } from './Snackbar';
|
|
26
|
+
export { useSpeedDial, type SpeedDialStruct, SpeedDial } from './SpeedDial';
|
|
27
|
+
export { useStepper, type StepperStruct, Stepper } from './Stepper';
|
|
28
|
+
export { useSwitch, type SwitchStruct, Switch } from './Switch';
|
|
29
|
+
export { useTable, type TableStruct, Table } from './Table';
|
|
30
|
+
export { useTabs, type TabsStruct, Tabs } from './Tabs';
|
|
31
|
+
export { useTextField, type TextFieldStruct, TextField } from './TextField';
|
|
32
|
+
export { useToast, type ToastStruct, type ToastItem, Toast } from './Toast';
|
|
33
|
+
export { useToggleButtonGroup, type ToggleButtonGroupStruct, ToggleButtonGroup } from './ToggleButtonGroup';
|
|
34
|
+
export { useTooltip, type TooltipStruct, Tooltip } from './Tooltip';
|
|
35
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,eAAe,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,KAAK,WAAW,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,KAAK,kBAAkB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACxF,OAAO,EAAE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MAAM,WAAW,CAAC"}
|
package/dist/index.es.js
CHANGED
|
@@ -29,6 +29,7 @@ import { Switch, useSwitch } from "./Switch.es.js";
|
|
|
29
29
|
import { Table, useTable } from "./Table.es.js";
|
|
30
30
|
import { Tabs, useTabs } from "./Tabs.es.js";
|
|
31
31
|
import { TextField, useTextField } from "./TextField.es.js";
|
|
32
|
+
import { Toast, useToast } from "./Toast.es.js";
|
|
32
33
|
import { ToggleButtonGroup, useToggleButtonGroup } from "./ToggleButtonGroup.es.js";
|
|
33
34
|
import { Tooltip, useTooltip } from "./Tooltip.es.js";
|
|
34
35
|
export {
|
|
@@ -63,6 +64,7 @@ export {
|
|
|
63
64
|
Table,
|
|
64
65
|
Tabs,
|
|
65
66
|
TextField,
|
|
67
|
+
Toast,
|
|
66
68
|
ToggleButtonGroup,
|
|
67
69
|
Tooltip,
|
|
68
70
|
useAccordion,
|
|
@@ -96,6 +98,7 @@ export {
|
|
|
96
98
|
useTable,
|
|
97
99
|
useTabs,
|
|
98
100
|
useTextField,
|
|
101
|
+
useToast,
|
|
99
102
|
useToggleButtonGroup,
|
|
100
103
|
useTooltip
|
|
101
104
|
};
|
package/dist/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,133 +1,132 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@actdim/dynstruct-mui",
|
|
3
|
+
"version": "1.5.6",
|
|
4
|
+
"description": "MUI component wrappers for @actdim/dynstruct",
|
|
5
|
+
"author": "Pavel Borodaev",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/actdim/dynstruct-mui.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/actdim/dynstruct-mui/issues"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/actdim/dynstruct-mui/#readme",
|
|
16
|
+
"keywords": [
|
|
17
|
+
"typescript",
|
|
18
|
+
"components",
|
|
19
|
+
"react",
|
|
20
|
+
"component-model",
|
|
21
|
+
"architecture",
|
|
22
|
+
"modularity",
|
|
23
|
+
"structure",
|
|
24
|
+
"communication"
|
|
25
|
+
],
|
|
26
|
+
"files": [
|
|
27
|
+
"dist",
|
|
28
|
+
"docs",
|
|
29
|
+
"README.md",
|
|
30
|
+
"LICENSE"
|
|
31
|
+
],
|
|
32
|
+
"files(src)": [
|
|
33
|
+
"src",
|
|
34
|
+
"docs",
|
|
35
|
+
"README.md",
|
|
36
|
+
"LICENSE"
|
|
37
|
+
],
|
|
38
|
+
"exports": {
|
|
39
|
+
"./*": {
|
|
40
|
+
"types": "./dist/*.d.ts",
|
|
41
|
+
"import": "./dist/*.es.js"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"typesVersions": {
|
|
45
|
+
"*": {
|
|
46
|
+
"*": [
|
|
47
|
+
"dist/*.d.ts"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public"
|
|
53
|
+
},
|
|
54
|
+
"sideEffects": false,
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"@emotion/react": ">=11.14.0",
|
|
57
|
+
"@emotion/styled": ">=11.14.1",
|
|
58
|
+
"@mui/material": ">=9.0.1",
|
|
59
|
+
"http-status": ">=2.1.0",
|
|
60
|
+
"jwt-decode": ">=4.0.0",
|
|
61
|
+
"mobx": ">=6.15.0",
|
|
62
|
+
"mobx-react-lite": ">=4.1.1",
|
|
63
|
+
"mobx-utils": ">=6.1.1",
|
|
64
|
+
"path-to-regexp": ">=8.3.0",
|
|
65
|
+
"react": ">=19.2.0",
|
|
66
|
+
"react-dom": ">=19.2.0",
|
|
67
|
+
"react-router": ">=7.9.3",
|
|
68
|
+
"react-router-dom": ">=7.9.4",
|
|
69
|
+
"rxjs": ">=7.8.2",
|
|
70
|
+
"uuid": ">=13.0.0",
|
|
71
|
+
"@actdim/dynstruct": "1.5.6",
|
|
72
|
+
"@actdim/msgmesh": "1.5.6",
|
|
73
|
+
"@actdim/utico": "1.5.6"
|
|
74
|
+
},
|
|
75
|
+
"devDependencies": {
|
|
76
|
+
"@faker-js/faker": "^10.4.0",
|
|
77
|
+
"@storybook/addon-docs": "10.0.7",
|
|
78
|
+
"@storybook/addon-onboarding": "10.0.7",
|
|
79
|
+
"@storybook/react-vite": "10.0.7",
|
|
80
|
+
"@swc/core": "^1.15.1",
|
|
81
|
+
"@types/chai": "^5.2.3",
|
|
82
|
+
"@types/mocha": "^10.0.10",
|
|
83
|
+
"@types/node": "^24.10.0",
|
|
84
|
+
"@types/react": "^19.2.14",
|
|
85
|
+
"@types/react-dom": "^19.2.3",
|
|
86
|
+
"@typescript-eslint/eslint-plugin": "^8.46.3",
|
|
87
|
+
"@typescript-eslint/parser": "^8.46.3",
|
|
88
|
+
"@vitejs/plugin-react-swc": "^4.2.1",
|
|
89
|
+
"chai": "^6.2.0",
|
|
90
|
+
"eslint": "^9.39.1",
|
|
91
|
+
"eslint-config-prettier": "^10.1.8",
|
|
92
|
+
"eslint-formatter-visualstudio": "^9.0.1",
|
|
93
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
94
|
+
"eslint-plugin-react": "^7.37.5",
|
|
95
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
96
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
97
|
+
"eslint-plugin-storybook": "10.0.7",
|
|
98
|
+
"globals": "^16.5.0",
|
|
99
|
+
"mocha": "^11.7.5",
|
|
100
|
+
"npm-check-updates": "^19.1.2",
|
|
101
|
+
"prettier": "^3.6.2",
|
|
102
|
+
"prettier-plugin-classnames": "^0.8.5",
|
|
103
|
+
"shx": "^0.4.0",
|
|
104
|
+
"storybook": "10.0.7",
|
|
105
|
+
"typescript": "^5.9.3",
|
|
106
|
+
"typescript-eslint": "^8.46.3",
|
|
107
|
+
"vite": "^7.2.2",
|
|
108
|
+
"vite-plugin-dts": "^4.5.4",
|
|
109
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
110
|
+
"vitest": "^4.0.8"
|
|
111
|
+
},
|
|
112
|
+
"dependencies": {},
|
|
113
|
+
"scripts": {
|
|
114
|
+
"test": "npx vitest --config=vitest.node.config.ts --no-cache",
|
|
115
|
+
"test:w": "npx vitest --config=vitest.node.config.ts --watch",
|
|
116
|
+
"test:v8": "npx vite",
|
|
117
|
+
"lint": "eslint \"./**/*.{ts,tsx}\" -f visualstudio --ext .ts,.tsx --report-unused-disable-directives --max-warnings 0",
|
|
118
|
+
"build": "tsc -b tsconfig.json --noEmit && vite build",
|
|
119
|
+
"pnpm:u": "pnpm update",
|
|
120
|
+
"pnpm:ou": "pnpm outdated",
|
|
121
|
+
"ncu:l": "ncu",
|
|
122
|
+
"ncu:u": "ncu -u",
|
|
123
|
+
"ncu:ud": "ncu -u --dev",
|
|
124
|
+
"nvm:la": "nvm list available",
|
|
125
|
+
"nvm:il": "nvm install lts",
|
|
126
|
+
"format": "prettier --write .",
|
|
127
|
+
"format:check": "prettier --check .",
|
|
128
|
+
"storybook": "storybook dev -p 6006",
|
|
129
|
+
"build-storybook": "storybook build",
|
|
130
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
131
|
+
}
|
|
132
|
+
}
|