@actdim/dynstruct-mui 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion.es.js +28 -21
- package/dist/Accordion.es.js.map +1 -1
- package/dist/Alert.es.js +26 -19
- package/dist/Alert.es.js.map +1 -1
- package/dist/Autocomplete.es.js +46 -39
- package/dist/Autocomplete.es.js.map +1 -1
- package/dist/Avatar.es.js +19 -12
- package/dist/Avatar.es.js.map +1 -1
- package/dist/Badge.es.js +31 -24
- package/dist/Badge.es.js.map +1 -1
- package/dist/Breadcrumbs.es.js +32 -25
- package/dist/Breadcrumbs.es.js.map +1 -1
- package/dist/Button.es.js +36 -29
- package/dist/Button.es.js.map +1 -1
- package/dist/Card.es.js +27 -20
- package/dist/Card.es.js.map +1 -1
- package/dist/Checkbox.es.js +39 -32
- package/dist/Checkbox.es.js.map +1 -1
- package/dist/Chip.es.js +30 -23
- package/dist/Chip.es.js.map +1 -1
- package/dist/CircularProgress.es.js +27 -20
- package/dist/CircularProgress.es.js.map +1 -1
- package/dist/Dialog.es.js +35 -28
- package/dist/Dialog.es.js.map +1 -1
- package/dist/Drawer.es.js +31 -24
- package/dist/Drawer.es.js.map +1 -1
- package/dist/Fab.es.js +33 -26
- package/dist/Fab.es.js.map +1 -1
- package/dist/IconButton.es.js +34 -27
- package/dist/IconButton.es.js.map +1 -1
- package/dist/LinearProgress.es.js +26 -19
- package/dist/LinearProgress.es.js.map +1 -1
- package/dist/List.es.js +23 -16
- package/dist/List.es.js.map +1 -1
- package/dist/Menu.es.js +32 -24
- package/dist/Menu.es.js.map +1 -1
- package/dist/Pagination.es.js +32 -25
- package/dist/Pagination.es.js.map +1 -1
- package/dist/RadioGroup.es.js +39 -32
- package/dist/RadioGroup.es.js.map +1 -1
- package/dist/Rating.es.js +30 -23
- package/dist/Rating.es.js.map +1 -1
- package/dist/Select.es.js +44 -37
- package/dist/Select.es.js.map +1 -1
- package/dist/Skeleton.es.js +26 -19
- package/dist/Skeleton.es.js.map +1 -1
- package/dist/Slider.es.js +36 -29
- package/dist/Slider.es.js.map +1 -1
- package/dist/Snackbar.es.js +31 -24
- package/dist/Snackbar.es.js.map +1 -1
- package/dist/SpeedDial.es.js +33 -26
- package/dist/SpeedDial.es.js.map +1 -1
- package/dist/Stepper.es.js +32 -25
- package/dist/Stepper.es.js.map +1 -1
- package/dist/Switch.es.js +37 -30
- package/dist/Switch.es.js.map +1 -1
- package/dist/Table.es.js +26 -19
- package/dist/Table.es.js.map +1 -1
- package/dist/Tabs.es.js +35 -28
- package/dist/Tabs.es.js.map +1 -1
- package/dist/TextField.es.js +42 -35
- package/dist/TextField.es.js.map +1 -1
- package/dist/ToggleButtonGroup.es.js +37 -30
- package/dist/ToggleButtonGroup.es.js.map +1 -1
- package/dist/Tooltip.es.js +21 -14
- package/dist/Tooltip.es.js.map +1 -1
- package/dist/index.es.js +101 -1
- package/dist/index.es.js.map +1 -1
- package/package.json +6 -7
- package/dist/Accordion.d.ts +0 -19
- package/dist/Accordion.d.ts.map +0 -1
- package/dist/Alert.d.ts +0 -18
- package/dist/Alert.d.ts.map +0 -1
- package/dist/Autocomplete.d.ts +0 -26
- package/dist/Autocomplete.d.ts.map +0 -1
- package/dist/Avatar.d.ts +0 -18
- package/dist/Avatar.d.ts.map +0 -1
- package/dist/Badge.d.ts +0 -21
- package/dist/Badge.d.ts.map +0 -1
- package/dist/Breadcrumbs.d.ts +0 -22
- package/dist/Breadcrumbs.d.ts.map +0 -1
- package/dist/Button.d.ts +0 -23
- package/dist/Button.d.ts.map +0 -1
- package/dist/Card.d.ts +0 -21
- package/dist/Card.d.ts.map +0 -1
- package/dist/Checkbox.d.ts +0 -22
- package/dist/Checkbox.d.ts.map +0 -1
- package/dist/Chip.d.ts +0 -21
- package/dist/Chip.d.ts.map +0 -1
- package/dist/CircularProgress.d.ts +0 -19
- package/dist/CircularProgress.d.ts.map +0 -1
- package/dist/Dialog.d.ts +0 -22
- package/dist/Dialog.d.ts.map +0 -1
- package/dist/Drawer.d.ts +0 -19
- package/dist/Drawer.d.ts.map +0 -1
- package/dist/Fab.d.ts +0 -21
- package/dist/Fab.d.ts.map +0 -1
- package/dist/IconButton.d.ts +0 -21
- package/dist/IconButton.d.ts.map +0 -1
- package/dist/LinearProgress.d.ts +0 -18
- package/dist/LinearProgress.d.ts.map +0 -1
- package/dist/List.d.ts +0 -25
- package/dist/List.d.ts.map +0 -1
- package/dist/Menu.d.ts +0 -24
- package/dist/Menu.d.ts.map +0 -1
- package/dist/Pagination.d.ts +0 -21
- package/dist/Pagination.d.ts.map +0 -1
- package/dist/RadioGroup.d.ts +0 -27
- package/dist/RadioGroup.d.ts.map +0 -1
- package/dist/Rating.d.ts +0 -20
- package/dist/Rating.d.ts.map +0 -1
- package/dist/Select.d.ts +0 -28
- package/dist/Select.d.ts.map +0 -1
- package/dist/Skeleton.d.ts +0 -18
- package/dist/Skeleton.d.ts.map +0 -1
- package/dist/Slider.d.ts +0 -24
- package/dist/Slider.d.ts.map +0 -1
- package/dist/Snackbar.d.ts +0 -20
- package/dist/Snackbar.d.ts.map +0 -1
- package/dist/SpeedDial.d.ts +0 -24
- package/dist/SpeedDial.d.ts.map +0 -1
- package/dist/Stepper.d.ts +0 -23
- package/dist/Stepper.d.ts.map +0 -1
- package/dist/Switch.d.ts +0 -21
- package/dist/Switch.d.ts.map +0 -1
- package/dist/Table.d.ts +0 -24
- package/dist/Table.d.ts.map +0 -1
- package/dist/Tabs.d.ts +0 -25
- package/dist/Tabs.d.ts.map +0 -1
- package/dist/TextField.d.ts +0 -27
- package/dist/TextField.d.ts.map +0 -1
- package/dist/ToggleButtonGroup.d.ts +0 -28
- package/dist/ToggleButtonGroup.d.ts.map +0 -1
- package/dist/Tooltip.d.ts +0 -17
- package/dist/Tooltip.d.ts.map +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +0 -1
package/dist/Accordion.es.js
CHANGED
|
@@ -1,34 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Accordion as Accordion$1, AccordionSummary, AccordionDetails } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const useAccordion = /* @__PURE__ */ __name((params) => {
|
|
7
|
+
let c;
|
|
8
|
+
let m;
|
|
9
|
+
const def = {
|
|
7
10
|
regType: "Accordion",
|
|
8
11
|
props: {
|
|
9
12
|
summary: "",
|
|
10
|
-
content: () => null,
|
|
13
|
+
content: /* @__PURE__ */ __name(() => null, "content"),
|
|
11
14
|
expanded: void 0,
|
|
12
15
|
onChange: void 0,
|
|
13
16
|
expandIcon: void 0,
|
|
14
17
|
sx: void 0
|
|
15
18
|
},
|
|
16
|
-
view: () => /* @__PURE__ */
|
|
17
|
-
|
|
19
|
+
view: /* @__PURE__ */ __name(() => /* @__PURE__ */ React.createElement(
|
|
20
|
+
Accordion$1,
|
|
18
21
|
{
|
|
19
|
-
expanded:
|
|
20
|
-
onChange:
|
|
21
|
-
disabled:
|
|
22
|
-
sx:
|
|
22
|
+
expanded: m.expanded,
|
|
23
|
+
onChange: m.onChange ? (_, v) => m.onChange(v) : void 0,
|
|
24
|
+
disabled: m.$.isDisabled,
|
|
25
|
+
sx: m.sx
|
|
23
26
|
},
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
/* @__PURE__ */ React.createElement(AccordionSummary, { expandIcon: m.expandIcon }, m.summary),
|
|
28
|
+
/* @__PURE__ */ React.createElement(AccordionDetails, null, /* @__PURE__ */ React.createElement(m.content, null))
|
|
29
|
+
), "view")
|
|
30
|
+
};
|
|
31
|
+
c = useComponent(def, params);
|
|
32
|
+
m = c.model;
|
|
33
|
+
return c;
|
|
34
|
+
}, "useAccordion");
|
|
35
|
+
const Accordion = toReact(useAccordion);
|
|
36
|
+
Accordion.displayName = "Accordion";
|
|
30
37
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
38
|
+
Accordion,
|
|
39
|
+
useAccordion
|
|
33
40
|
};
|
|
34
41
|
//# sourceMappingURL=Accordion.es.js.map
|
package/dist/Accordion.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Accordion.tsx"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"Accordion.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Accordion.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Accordion as MuiAccordion,\n AccordionSummary,\n AccordionDetails,\n type AccordionProps as MuiAccordionProps,\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\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n summary: React.ReactNode;\n content: React.FC;\n expanded?: boolean;\n onChange?: (expanded: boolean) => void;\n expandIcon?: React.ReactNode;\n sx?: MuiAccordionProps['sx'];\n };\n }\n>;\n\nexport const useAccordion = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Accordion',\n props: {\n summary: '',\n content: () => null,\n expanded: undefined,\n onChange: undefined,\n expandIcon: undefined,\n sx: undefined,\n },\n view: () => (\n <MuiAccordion\n expanded={m.expanded}\n onChange={m.onChange ? (_, v) => m.onChange!(v) : undefined}\n disabled={m.$.isDisabled}\n sx={m.sx}\n >\n <AccordionSummary expandIcon={m.expandIcon}>\n {m.summary}\n </AccordionSummary>\n <AccordionDetails>\n <m.content />\n </AccordionDetails>\n </MuiAccordion>\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type AccordionStruct = Struct;\n\nexport const Accordion = toReact(useAccordion);\nAccordion.displayName = 'Accordion';\n"],"names":["MuiAccordion"],"mappings":";;;;;AA+BO,MAAM,eAAe,wBAAC,WAAuD;AAChF,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,SAAS;AAAA,MACT,SAAS,6BAAM,MAAN;AAAA,MACT,UAAU;AAAA,MACV,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,UAAU,EAAE;AAAA,QACZ,UAAU,EAAE,WAAW,CAAC,GAAG,MAAM,EAAE,SAAU,CAAC,IAAI;AAAA,QAClD,UAAU,EAAE,EAAE;AAAA,QACd,IAAI,EAAE;AAAA,MAAA;AAAA,0CAEL,kBAAA,EAAiB,YAAY,EAAE,WAAA,GAC3B,EAAE,OACP;AAAA,0CACC,kBAAA,MACG,sBAAA,cAAC,EAAE,SAAF,IAAU,CACf;AAAA,IAAA,GAZF;AAAA,EAaF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAlC4B;AAsCrB,MAAM,YAAY,QAAQ,YAAY;AAC7C,UAAU,cAAc;"}
|
package/dist/Alert.es.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Alert as Alert$1 } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const useAlert = /* @__PURE__ */ __name((params) => {
|
|
7
|
+
let c;
|
|
8
|
+
let m;
|
|
9
|
+
const def = {
|
|
7
10
|
regType: "Alert",
|
|
8
11
|
props: {
|
|
9
12
|
message: "",
|
|
@@ -12,21 +15,25 @@ const i = (r) => {
|
|
|
12
15
|
onClose: void 0,
|
|
13
16
|
sx: void 0
|
|
14
17
|
},
|
|
15
|
-
view: () => /* @__PURE__ */
|
|
16
|
-
|
|
18
|
+
view: /* @__PURE__ */ __name(() => /* @__PURE__ */ React.createElement(
|
|
19
|
+
Alert$1,
|
|
17
20
|
{
|
|
18
|
-
severity:
|
|
19
|
-
variant:
|
|
20
|
-
onClose:
|
|
21
|
-
sx:
|
|
21
|
+
severity: m.severity,
|
|
22
|
+
variant: m.variant,
|
|
23
|
+
onClose: m.onClose,
|
|
24
|
+
sx: m.sx
|
|
22
25
|
},
|
|
23
|
-
|
|
24
|
-
)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
m.message
|
|
27
|
+
), "view")
|
|
28
|
+
};
|
|
29
|
+
c = useComponent(def, params);
|
|
30
|
+
m = c.model;
|
|
31
|
+
return c;
|
|
32
|
+
}, "useAlert");
|
|
33
|
+
const Alert = toReact(useAlert);
|
|
34
|
+
Alert.displayName = "Alert";
|
|
28
35
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
36
|
+
Alert,
|
|
37
|
+
useAlert
|
|
31
38
|
};
|
|
32
39
|
//# sourceMappingURL=Alert.es.js.map
|
package/dist/Alert.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Alert.tsx"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"Alert.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Alert.tsx"],"sourcesContent":["import React from 'react';\nimport { Alert as MuiAlert, type AlertProps as MuiAlertProps } 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\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n message: string;\n severity?: MuiAlertProps['severity'];\n variant?: MuiAlertProps['variant'];\n onClose?: () => void;\n sx?: MuiAlertProps['sx'];\n };\n }\n>;\n\nexport const useAlert = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Alert',\n props: {\n message: '',\n severity: 'info',\n variant: 'standard',\n onClose: undefined,\n sx: undefined,\n },\n view: () => (\n <MuiAlert\n severity={m.severity}\n variant={m.variant}\n onClose={m.onClose}\n sx={m.sx}\n >\n {m.message}\n </MuiAlert>\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type AlertStruct = Struct;\n\nexport const Alert = toReact(useAlert);\nAlert.displayName = 'Alert';\n"],"names":["MuiAlert"],"mappings":";;;;;AAyBO,MAAM,WAAW,wBAAC,WAAuD;AAC5E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,SAAS;AAAA,MACT,UAAU;AAAA,MACV,SAAS;AAAA,MACT,SAAS;AAAA,MACT,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,UAAU,EAAE;AAAA,QACZ,SAAS,EAAE;AAAA,QACX,SAAS,EAAE;AAAA,QACX,IAAI,EAAE;AAAA,MAAA;AAAA,MAEL,EAAE;AAAA,IAAA,GAPL;AAAA,EAQF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA5BwB;AAgCjB,MAAM,QAAQ,QAAQ,QAAQ;AACrC,MAAM,cAAc;"}
|
package/dist/Autocomplete.es.js
CHANGED
|
@@ -1,57 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Autocomplete as Autocomplete$1, TextField } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const useAutocomplete = /* @__PURE__ */ __name((params) => {
|
|
7
|
+
let c;
|
|
8
|
+
let m;
|
|
9
|
+
const def = {
|
|
7
10
|
regType: "Autocomplete",
|
|
8
11
|
props: {
|
|
9
12
|
value: null,
|
|
10
|
-
onChange: () => {
|
|
11
|
-
},
|
|
13
|
+
onChange: /* @__PURE__ */ __name(() => {
|
|
14
|
+
}, "onChange"),
|
|
12
15
|
options: [],
|
|
13
16
|
label: void 0,
|
|
14
17
|
placeholder: void 0,
|
|
15
18
|
helperText: void 0,
|
|
16
|
-
error:
|
|
17
|
-
loading:
|
|
18
|
-
freeSolo:
|
|
19
|
-
fullWidth:
|
|
19
|
+
error: false,
|
|
20
|
+
loading: false,
|
|
21
|
+
freeSolo: false,
|
|
22
|
+
fullWidth: false,
|
|
20
23
|
variant: "outlined",
|
|
21
24
|
size: "medium",
|
|
22
25
|
sx: void 0
|
|
23
26
|
},
|
|
24
|
-
view: () => /* @__PURE__ */
|
|
25
|
-
|
|
27
|
+
view: /* @__PURE__ */ __name(() => /* @__PURE__ */ React.createElement(
|
|
28
|
+
Autocomplete$1,
|
|
26
29
|
{
|
|
27
|
-
value:
|
|
28
|
-
onChange: (
|
|
29
|
-
options:
|
|
30
|
-
loading:
|
|
31
|
-
freeSolo:
|
|
32
|
-
fullWidth:
|
|
33
|
-
size:
|
|
34
|
-
disabled:
|
|
35
|
-
readOnly:
|
|
36
|
-
sx:
|
|
37
|
-
renderInput: (
|
|
38
|
-
|
|
30
|
+
value: m.value,
|
|
31
|
+
onChange: /* @__PURE__ */ __name((_, newValue) => m.onChange(newValue), "onChange"),
|
|
32
|
+
options: m.options,
|
|
33
|
+
loading: m.loading,
|
|
34
|
+
freeSolo: m.freeSolo,
|
|
35
|
+
fullWidth: m.fullWidth,
|
|
36
|
+
size: m.size,
|
|
37
|
+
disabled: m.$.isDisabled,
|
|
38
|
+
readOnly: m.$.isReadOnly,
|
|
39
|
+
sx: m.sx,
|
|
40
|
+
renderInput: /* @__PURE__ */ __name((params2) => /* @__PURE__ */ React.createElement(
|
|
41
|
+
TextField,
|
|
39
42
|
{
|
|
40
|
-
...
|
|
41
|
-
label:
|
|
42
|
-
placeholder:
|
|
43
|
-
error:
|
|
44
|
-
helperText:
|
|
45
|
-
variant:
|
|
43
|
+
...params2,
|
|
44
|
+
label: m.label,
|
|
45
|
+
placeholder: m.placeholder,
|
|
46
|
+
error: m.error,
|
|
47
|
+
helperText: m.helperText,
|
|
48
|
+
variant: m.variant
|
|
46
49
|
}
|
|
47
|
-
)
|
|
50
|
+
), "renderInput")
|
|
48
51
|
}
|
|
49
|
-
)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
m
|
|
52
|
+
), "view")
|
|
53
|
+
};
|
|
54
|
+
c = useComponent(def, params);
|
|
55
|
+
m = c.model;
|
|
56
|
+
return c;
|
|
57
|
+
}, "useAutocomplete");
|
|
58
|
+
const Autocomplete = toReact(useAutocomplete);
|
|
59
|
+
Autocomplete.displayName = "Autocomplete";
|
|
53
60
|
export {
|
|
54
|
-
|
|
55
|
-
|
|
61
|
+
Autocomplete,
|
|
62
|
+
useAutocomplete
|
|
56
63
|
};
|
|
57
64
|
//# sourceMappingURL=Autocomplete.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Autocomplete.tsx"],"sourcesContent":null,
|
|
1
|
+
{"version":3,"file":"Autocomplete.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Autocomplete.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Autocomplete as MuiAutocomplete,\n TextField as MuiTextField,\n type AutocompleteProps as MuiAutocompleteProps,\n type TextFieldProps as MuiTextFieldProps,\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\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n value: string | null;\n onChange: (value: string | null) => void;\n options: string[];\n label?: string;\n placeholder?: string;\n helperText?: string;\n error?: boolean;\n loading?: boolean;\n freeSolo?: boolean;\n fullWidth?: boolean;\n variant?: MuiTextFieldProps['variant'];\n size?: MuiAutocompleteProps<string, false, false, false>['size'];\n sx?: MuiAutocompleteProps<string, false, false, false>['sx'];\n };\n }\n>;\n\nexport const useAutocomplete = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Autocomplete',\n props: {\n value: null,\n onChange: () => {},\n options: [],\n label: undefined,\n placeholder: undefined,\n helperText: undefined,\n error: false,\n loading: false,\n freeSolo: false,\n fullWidth: false,\n variant: 'outlined',\n size: 'medium',\n sx: undefined,\n },\n view: () => (\n <MuiAutocomplete\n value={m.value}\n onChange={(_, newValue) => m.onChange(newValue)}\n options={m.options}\n loading={m.loading}\n freeSolo={m.freeSolo}\n fullWidth={m.fullWidth}\n size={m.size}\n disabled={m.$.isDisabled}\n readOnly={m.$.isReadOnly}\n sx={m.sx}\n renderInput={(params) => (\n <MuiTextField\n {...params}\n label={m.label}\n placeholder={m.placeholder}\n error={m.error}\n helperText={m.helperText}\n variant={m.variant}\n />\n )}\n />\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type AutocompleteStruct = Struct;\n\nexport const Autocomplete = toReact(useAutocomplete);\nAutocomplete.displayName = 'Autocomplete';\n"],"names":["MuiAutocomplete","params","MuiTextField"],"mappings":";;;;;AAsCO,MAAM,kBAAkB,wBAAC,WAAuD;AACnF,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,OAAO;AAAA,MACP,UAAU,6BAAM;AAAA,MAAC,GAAP;AAAA,MACV,SAAS,CAAA;AAAA,MACT,OAAO;AAAA,MACP,aAAa;AAAA,MACb,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,SAAS;AAAA,MACT,UAAU;AAAA,MACV,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,OAAO,EAAE;AAAA,QACT,UAAU,wBAAC,GAAG,aAAa,EAAE,SAAS,QAAQ,GAApC;AAAA,QACV,SAAS,EAAE;AAAA,QACX,SAAS,EAAE;AAAA,QACX,UAAU,EAAE;AAAA,QACZ,WAAW,EAAE;AAAA,QACb,MAAM,EAAE;AAAA,QACR,UAAU,EAAE,EAAE;AAAA,QACd,UAAU,EAAE,EAAE;AAAA,QACd,IAAI,EAAE;AAAA,QACN,aAAa,wBAACC,YACV,sBAAA;AAAA,UAACC;AAAAA,UAAA;AAAA,YACI,GAAGD;AAAAA,YACJ,OAAO,EAAE;AAAA,YACT,aAAa,EAAE;AAAA,YACf,OAAO,EAAE;AAAA,YACT,YAAY,EAAE;AAAA,YACd,SAAS,EAAE;AAAA,UAAA;AAAA,QAAA,GAPN;AAAA,MAQT;AAAA,IAAA,GApBN;AAAA,EAsBF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAlD+B;AAsDxB,MAAM,eAAe,QAAQ,eAAe;AACnD,aAAa,cAAc;"}
|
package/dist/Avatar.es.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Avatar as Avatar$1 } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const useAvatar = /* @__PURE__ */ __name((params) => {
|
|
7
|
+
let c;
|
|
8
|
+
let m;
|
|
9
|
+
const def = {
|
|
7
10
|
regType: "Avatar",
|
|
8
11
|
props: {
|
|
9
12
|
src: void 0,
|
|
@@ -12,12 +15,16 @@ const s = (t) => {
|
|
|
12
15
|
variant: "circular",
|
|
13
16
|
sx: void 0
|
|
14
17
|
},
|
|
15
|
-
view: () => /* @__PURE__ */
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
view: /* @__PURE__ */ __name(() => /* @__PURE__ */ React.createElement(Avatar$1, { src: m.src, alt: m.alt, variant: m.variant, sx: m.sx }, m.children), "view")
|
|
19
|
+
};
|
|
20
|
+
c = useComponent(def, params);
|
|
21
|
+
m = c.model;
|
|
22
|
+
return c;
|
|
23
|
+
}, "useAvatar");
|
|
24
|
+
const Avatar = toReact(useAvatar);
|
|
25
|
+
Avatar.displayName = "Avatar";
|
|
19
26
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
27
|
+
Avatar,
|
|
28
|
+
useAvatar
|
|
22
29
|
};
|
|
23
30
|
//# sourceMappingURL=Avatar.es.js.map
|
package/dist/Avatar.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Avatar.tsx"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"Avatar.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Avatar.tsx"],"sourcesContent":["import React from 'react';\nimport { Avatar as MuiAvatar, type AvatarProps as MuiAvatarProps } 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\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n src?: string;\n alt?: string;\n children?: React.ReactNode;\n variant?: MuiAvatarProps['variant'];\n sx?: MuiAvatarProps['sx'];\n };\n }\n>;\n\nexport const useAvatar = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Avatar',\n props: {\n src: undefined,\n alt: undefined,\n children: undefined,\n variant: 'circular',\n sx: undefined,\n },\n view: () => (\n <MuiAvatar src={m.src} alt={m.alt} variant={m.variant} sx={m.sx}>\n {m.children}\n </MuiAvatar>\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type AvatarStruct = Struct;\n\nexport const Avatar = toReact(useAvatar);\nAvatar.displayName = 'Avatar';\n"],"names":["MuiAvatar"],"mappings":";;;;;AAyBO,MAAM,YAAY,wBAAC,WAAuD;AAC7E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,KAAK;AAAA,MACL,KAAK;AAAA,MACL,UAAU;AAAA,MACV,SAAS;AAAA,MACT,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA,cAACA,UAAA,EAAU,KAAK,EAAE,KAAK,KAAK,EAAE,KAAK,SAAS,EAAE,SAAS,IAAI,EAAE,MACxD,EAAE,QACP,GAHE;AAAA,EAGF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAvByB;AA2BlB,MAAM,SAAS,QAAQ,SAAS;AACvC,OAAO,cAAc;"}
|
package/dist/Badge.es.js
CHANGED
|
@@ -1,38 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Badge as Badge$1 } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const useBadge = /* @__PURE__ */ __name((params) => {
|
|
7
|
+
let c;
|
|
8
|
+
let m;
|
|
9
|
+
const def = {
|
|
7
10
|
regType: "Badge",
|
|
8
11
|
props: {
|
|
9
|
-
children: () => null,
|
|
12
|
+
children: /* @__PURE__ */ __name(() => null, "children"),
|
|
10
13
|
badgeContent: void 0,
|
|
11
14
|
color: "default",
|
|
12
15
|
variant: "standard",
|
|
13
16
|
max: 99,
|
|
14
|
-
invisible:
|
|
17
|
+
invisible: false,
|
|
15
18
|
anchorOrigin: void 0,
|
|
16
19
|
sx: void 0
|
|
17
20
|
},
|
|
18
|
-
view: () => /* @__PURE__ */
|
|
19
|
-
|
|
21
|
+
view: /* @__PURE__ */ __name(() => /* @__PURE__ */ React.createElement(
|
|
22
|
+
Badge$1,
|
|
20
23
|
{
|
|
21
|
-
badgeContent:
|
|
22
|
-
color:
|
|
23
|
-
variant:
|
|
24
|
-
max:
|
|
25
|
-
invisible:
|
|
26
|
-
anchorOrigin:
|
|
27
|
-
sx:
|
|
24
|
+
badgeContent: m.badgeContent,
|
|
25
|
+
color: m.color,
|
|
26
|
+
variant: m.variant,
|
|
27
|
+
max: m.max,
|
|
28
|
+
invisible: m.invisible,
|
|
29
|
+
anchorOrigin: m.anchorOrigin,
|
|
30
|
+
sx: m.sx
|
|
28
31
|
},
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
/* @__PURE__ */ React.createElement(m.children, null)
|
|
33
|
+
), "view")
|
|
34
|
+
};
|
|
35
|
+
c = useComponent(def, params);
|
|
36
|
+
m = c.model;
|
|
37
|
+
return c;
|
|
38
|
+
}, "useBadge");
|
|
39
|
+
const Badge = toReact(useBadge);
|
|
40
|
+
Badge.displayName = "Badge";
|
|
34
41
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
42
|
+
Badge,
|
|
43
|
+
useBadge
|
|
37
44
|
};
|
|
38
45
|
//# sourceMappingURL=Badge.es.js.map
|
package/dist/Badge.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Badge.tsx"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"Badge.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Badge.tsx"],"sourcesContent":["import React from 'react';\nimport { Badge as MuiBadge, type BadgeProps as MuiBadgeProps } 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\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n children: React.FC;\n badgeContent?: React.ReactNode;\n color?: MuiBadgeProps['color'];\n variant?: MuiBadgeProps['variant'];\n max?: number;\n invisible?: boolean;\n anchorOrigin?: MuiBadgeProps['anchorOrigin'];\n sx?: MuiBadgeProps['sx'];\n };\n }\n>;\n\nexport const useBadge = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Badge',\n props: {\n children: () => null,\n badgeContent: undefined,\n color: 'default',\n variant: 'standard',\n max: 99,\n invisible: false,\n anchorOrigin: undefined,\n sx: undefined,\n },\n view: () => (\n <MuiBadge\n badgeContent={m.badgeContent}\n color={m.color}\n variant={m.variant}\n max={m.max}\n invisible={m.invisible}\n anchorOrigin={m.anchorOrigin}\n sx={m.sx}\n >\n <m.children />\n </MuiBadge>\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type BadgeStruct = Struct;\n\nexport const Badge = toReact(useBadge);\nBadge.displayName = 'Badge';\n"],"names":["MuiBadge"],"mappings":";;;;;AA4BO,MAAM,WAAW,wBAAC,WAAuD;AAC5E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,UAAU,6BAAM,MAAN;AAAA,MACV,cAAc;AAAA,MACd,OAAO;AAAA,MACP,SAAS;AAAA,MACT,KAAK;AAAA,MACL,WAAW;AAAA,MACX,cAAc;AAAA,MACd,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,cAAc,EAAE;AAAA,QAChB,OAAO,EAAE;AAAA,QACT,SAAS,EAAE;AAAA,QACX,KAAK,EAAE;AAAA,QACP,WAAW,EAAE;AAAA,QACb,cAAc,EAAE;AAAA,QAChB,IAAI,EAAE;AAAA,MAAA;AAAA,MAEN,sBAAA,cAAC,EAAE,UAAF,IAAW;AAAA,IAAA,GAVd;AAAA,EAWF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAlCwB;AAsCjB,MAAM,QAAQ,QAAQ,QAAQ;AACrC,MAAM,cAAc;"}
|
package/dist/Breadcrumbs.es.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Breadcrumbs as Breadcrumbs$1, Typography, Link } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const useBreadcrumbs = /* @__PURE__ */ __name((params) => {
|
|
7
|
+
let c;
|
|
8
|
+
let m;
|
|
9
|
+
const def = {
|
|
7
10
|
regType: "Breadcrumbs",
|
|
8
11
|
props: {
|
|
9
12
|
items: [],
|
|
@@ -11,34 +14,38 @@ const d = (t) => {
|
|
|
11
14
|
maxItems: 8,
|
|
12
15
|
sx: void 0
|
|
13
16
|
},
|
|
14
|
-
view: () => /* @__PURE__ */
|
|
15
|
-
|
|
17
|
+
view: /* @__PURE__ */ __name(() => /* @__PURE__ */ React.createElement(
|
|
18
|
+
Breadcrumbs$1,
|
|
16
19
|
{
|
|
17
|
-
separator:
|
|
18
|
-
maxItems:
|
|
20
|
+
separator: m.separator,
|
|
21
|
+
maxItems: m.maxItems,
|
|
19
22
|
"aria-label": "breadcrumb",
|
|
20
|
-
sx:
|
|
23
|
+
sx: m.sx
|
|
21
24
|
},
|
|
22
|
-
|
|
23
|
-
(
|
|
24
|
-
|
|
25
|
+
m.items.map(
|
|
26
|
+
(item, i) => i === m.items.length - 1 ? /* @__PURE__ */ React.createElement(Typography, { key: i, sx: { color: "text.primary" } }, item.label) : /* @__PURE__ */ React.createElement(
|
|
27
|
+
Link,
|
|
25
28
|
{
|
|
26
|
-
key:
|
|
29
|
+
key: i,
|
|
27
30
|
underline: "hover",
|
|
28
31
|
color: "inherit",
|
|
29
|
-
href:
|
|
30
|
-
onClick:
|
|
31
|
-
sx: { cursor:
|
|
32
|
+
href: item.href,
|
|
33
|
+
onClick: item.onClick,
|
|
34
|
+
sx: { cursor: item.onClick && !item.href ? "pointer" : void 0 }
|
|
32
35
|
},
|
|
33
|
-
|
|
36
|
+
item.label
|
|
34
37
|
)
|
|
35
38
|
)
|
|
36
|
-
)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
), "view")
|
|
40
|
+
};
|
|
41
|
+
c = useComponent(def, params);
|
|
42
|
+
m = c.model;
|
|
43
|
+
return c;
|
|
44
|
+
}, "useBreadcrumbs");
|
|
45
|
+
const Breadcrumbs = toReact(useBreadcrumbs);
|
|
46
|
+
Breadcrumbs.displayName = "Breadcrumbs";
|
|
40
47
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
48
|
+
Breadcrumbs,
|
|
49
|
+
useBreadcrumbs
|
|
43
50
|
};
|
|
44
51
|
//# sourceMappingURL=Breadcrumbs.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Breadcrumbs.tsx"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Breadcrumbs.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Breadcrumbs as MuiBreadcrumbs,\n Link,\n Typography,\n type BreadcrumbsProps as MuiBreadcrumbsProps,\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 BreadcrumbItem = {\n label: string;\n href?: string;\n onClick?: () => void;\n};\n\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n items: BreadcrumbItem[];\n separator?: React.ReactNode;\n maxItems?: number;\n sx?: MuiBreadcrumbsProps['sx'];\n };\n }\n>;\n\nexport const useBreadcrumbs = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Breadcrumbs',\n props: {\n items: [],\n separator: undefined,\n maxItems: 8,\n sx: undefined,\n },\n view: () => (\n <MuiBreadcrumbs\n separator={m.separator}\n maxItems={m.maxItems}\n aria-label=\"breadcrumb\"\n sx={m.sx}\n >\n {m.items.map((item, i) =>\n i === m.items.length - 1 ? (\n <Typography key={i} sx={{ color: 'text.primary' }}>\n {item.label}\n </Typography>\n ) : (\n <Link\n key={i}\n underline=\"hover\"\n color=\"inherit\"\n href={item.href}\n onClick={item.onClick}\n sx={{ cursor: item.onClick && !item.href ? 'pointer' : undefined }}\n >\n {item.label}\n </Link>\n ),\n )}\n </MuiBreadcrumbs>\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type BreadcrumbsStruct = Struct;\n\nexport const Breadcrumbs = toReact(useBreadcrumbs);\nBreadcrumbs.displayName = 'Breadcrumbs';\n"],"names":["MuiBreadcrumbs"],"mappings":";;;;;AAmCO,MAAM,iBAAiB,wBAAC,WAAuD;AAClF,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,OAAO,CAAA;AAAA,MACP,WAAW;AAAA,MACX,UAAU;AAAA,MACV,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,WAAW,EAAE;AAAA,QACb,UAAU,EAAE;AAAA,QACZ,cAAW;AAAA,QACX,IAAI,EAAE;AAAA,MAAA;AAAA,MAEL,EAAE,MAAM;AAAA,QAAI,CAAC,MAAM,MAChB,MAAM,EAAE,MAAM,SAAS,IACnB,sBAAA,cAAC,cAAW,KAAK,GAAG,IAAI,EAAE,OAAO,iBAAe,GAC3C,KAAK,KACV,IAEA,sBAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACG,KAAK;AAAA,YACL,WAAU;AAAA,YACV,OAAM;AAAA,YACN,MAAM,KAAK;AAAA,YACX,SAAS,KAAK;AAAA,YACd,IAAI,EAAE,QAAQ,KAAK,WAAW,CAAC,KAAK,OAAO,YAAY,OAAA;AAAA,UAAU;AAAA,UAEhE,KAAK;AAAA,QAAA;AAAA,MACV;AAAA,IAER,GAxBF;AAAA,EAyBF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA5C8B;AAgDvB,MAAM,cAAc,QAAQ,cAAc;AACjD,YAAY,cAAc;"}
|
package/dist/Button.es.js
CHANGED
|
@@ -1,44 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Button as Button$1 } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const useButton = /* @__PURE__ */ __name((params) => {
|
|
7
|
+
let c;
|
|
8
|
+
let m;
|
|
9
|
+
const def = {
|
|
7
10
|
regType: "Button",
|
|
8
11
|
props: {
|
|
9
12
|
label: "",
|
|
10
|
-
onClick: () => {
|
|
11
|
-
},
|
|
13
|
+
onClick: /* @__PURE__ */ __name(() => {
|
|
14
|
+
}, "onClick"),
|
|
12
15
|
variant: "contained",
|
|
13
16
|
color: "primary",
|
|
14
17
|
size: "medium",
|
|
15
|
-
fullWidth:
|
|
18
|
+
fullWidth: false,
|
|
16
19
|
startIcon: void 0,
|
|
17
20
|
endIcon: void 0,
|
|
18
|
-
loading:
|
|
21
|
+
loading: false,
|
|
19
22
|
sx: void 0
|
|
20
23
|
},
|
|
21
|
-
view: () => /* @__PURE__ */
|
|
22
|
-
|
|
24
|
+
view: /* @__PURE__ */ __name(() => /* @__PURE__ */ React.createElement(
|
|
25
|
+
Button$1,
|
|
23
26
|
{
|
|
24
|
-
variant:
|
|
25
|
-
color:
|
|
26
|
-
size:
|
|
27
|
-
fullWidth:
|
|
28
|
-
disabled:
|
|
29
|
-
loading:
|
|
30
|
-
startIcon:
|
|
31
|
-
endIcon:
|
|
32
|
-
sx:
|
|
33
|
-
onClick:
|
|
27
|
+
variant: m.variant,
|
|
28
|
+
color: m.color,
|
|
29
|
+
size: m.size,
|
|
30
|
+
fullWidth: m.fullWidth,
|
|
31
|
+
disabled: m.$.isDisabled,
|
|
32
|
+
loading: m.loading,
|
|
33
|
+
startIcon: m.startIcon,
|
|
34
|
+
endIcon: m.endIcon,
|
|
35
|
+
sx: m.sx,
|
|
36
|
+
onClick: m.onClick
|
|
34
37
|
},
|
|
35
|
-
|
|
36
|
-
)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
m.label
|
|
39
|
+
), "view")
|
|
40
|
+
};
|
|
41
|
+
c = useComponent(def, params);
|
|
42
|
+
m = c.model;
|
|
43
|
+
return c;
|
|
44
|
+
}, "useButton");
|
|
45
|
+
const Button = toReact(useButton);
|
|
46
|
+
Button.displayName = "Button";
|
|
40
47
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
48
|
+
Button,
|
|
49
|
+
useButton
|
|
43
50
|
};
|
|
44
51
|
//# sourceMappingURL=Button.es.js.map
|
package/dist/Button.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Button.tsx"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"Button.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Button.tsx"],"sourcesContent":["import React from 'react';\nimport { Button as MuiButton, type ButtonProps as MuiButtonProps } 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\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n label: string;\n onClick: () => void;\n variant?: MuiButtonProps['variant'];\n color?: MuiButtonProps['color'];\n size?: MuiButtonProps['size'];\n fullWidth?: boolean;\n startIcon?: React.ReactNode;\n endIcon?: React.ReactNode;\n loading?: boolean;\n sx?: MuiButtonProps['sx'];\n };\n }\n>;\n\nexport const useButton = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Button',\n props: {\n label: '',\n onClick: () => {},\n variant: 'contained',\n color: 'primary',\n size: 'medium',\n fullWidth: false,\n startIcon: undefined,\n endIcon: undefined,\n loading: false,\n sx: undefined,\n },\n view: () => (\n <MuiButton\n variant={m.variant}\n color={m.color}\n size={m.size}\n fullWidth={m.fullWidth}\n disabled={m.$.isDisabled}\n loading={m.loading}\n startIcon={m.startIcon}\n endIcon={m.endIcon}\n sx={m.sx}\n onClick={m.onClick}\n >\n {m.label}\n </MuiButton>\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type ButtonStruct = Struct;\n\nexport const Button = toReact(useButton);\nButton.displayName = 'Button';\n"],"names":["MuiButton"],"mappings":";;;;;AA8BO,MAAM,YAAY,wBAAC,WAAuD;AAC7E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,OAAO;AAAA,MACP,SAAS,6BAAM;AAAA,MAAC,GAAP;AAAA,MACT,SAAS;AAAA,MACT,OAAO;AAAA,MACP,MAAM;AAAA,MACN,WAAW;AAAA,MACX,WAAW;AAAA,MACX,SAAS;AAAA,MACT,SAAS;AAAA,MACT,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,SAAS,EAAE;AAAA,QACX,OAAO,EAAE;AAAA,QACT,MAAM,EAAE;AAAA,QACR,WAAW,EAAE;AAAA,QACb,UAAU,EAAE,EAAE;AAAA,QACd,SAAS,EAAE;AAAA,QACX,WAAW,EAAE;AAAA,QACb,SAAS,EAAE;AAAA,QACX,IAAI,EAAE;AAAA,QACN,SAAS,EAAE;AAAA,MAAA;AAAA,MAEV,EAAE;AAAA,IAAA,GAbL;AAAA,EAcF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAvCyB;AA2ClB,MAAM,SAAS,QAAQ,SAAS;AACvC,OAAO,cAAc;"}
|