@actdim/dynstruct-mui 0.9.1 → 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 +99 -99
- 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 -34
- package/dist/index.d.ts.map +0 -1
package/dist/Card.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 { Card as Card$1, CardHeader, CardContent, CardActions } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const useCard = /* @__PURE__ */ __name((params) => {
|
|
7
|
+
let c;
|
|
8
|
+
let m;
|
|
9
|
+
const def = {
|
|
7
10
|
regType: "Card",
|
|
8
11
|
props: {
|
|
9
|
-
content: () => null,
|
|
12
|
+
content: /* @__PURE__ */ __name(() => null, "content"),
|
|
10
13
|
title: void 0,
|
|
11
14
|
subheader: void 0,
|
|
12
15
|
avatar: void 0,
|
|
13
16
|
headerAction: void 0,
|
|
14
17
|
actions: void 0,
|
|
15
|
-
raised:
|
|
18
|
+
raised: false,
|
|
16
19
|
sx: void 0
|
|
17
20
|
},
|
|
18
|
-
view: () => /* @__PURE__ */
|
|
19
|
-
|
|
21
|
+
view: /* @__PURE__ */ __name(() => /* @__PURE__ */ React.createElement(Card$1, { raised: m.raised, sx: m.sx }, (m.title || m.subheader || m.avatar || m.headerAction) && /* @__PURE__ */ React.createElement(
|
|
22
|
+
CardHeader,
|
|
20
23
|
{
|
|
21
|
-
title:
|
|
22
|
-
subheader:
|
|
23
|
-
avatar:
|
|
24
|
-
action:
|
|
24
|
+
title: m.title,
|
|
25
|
+
subheader: m.subheader,
|
|
26
|
+
avatar: m.avatar,
|
|
27
|
+
action: m.headerAction ? /* @__PURE__ */ React.createElement(m.headerAction, null) : void 0
|
|
25
28
|
}
|
|
26
|
-
), /* @__PURE__ */
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
m
|
|
29
|
+
), /* @__PURE__ */ React.createElement(CardContent, null, /* @__PURE__ */ React.createElement(m.content, null)), m.actions && /* @__PURE__ */ React.createElement(CardActions, null, /* @__PURE__ */ React.createElement(m.actions, null))), "view")
|
|
30
|
+
};
|
|
31
|
+
c = useComponent(def, params);
|
|
32
|
+
m = c.model;
|
|
33
|
+
return c;
|
|
34
|
+
}, "useCard");
|
|
35
|
+
const Card = toReact(useCard);
|
|
36
|
+
Card.displayName = "Card";
|
|
30
37
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
38
|
+
Card,
|
|
39
|
+
useCard
|
|
33
40
|
};
|
|
34
41
|
//# sourceMappingURL=Card.es.js.map
|
package/dist/Card.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Card.tsx"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"Card.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Card.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Card as MuiCard,\n CardHeader,\n CardContent,\n CardActions,\n type CardProps as MuiCardProps,\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 content: React.FC;\n title?: React.ReactNode;\n subheader?: React.ReactNode;\n avatar?: React.ReactNode;\n headerAction?: React.FC;\n actions?: React.FC;\n raised?: boolean;\n sx?: MuiCardProps['sx'];\n };\n }\n>;\n\nexport const useCard = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Card',\n props: {\n content: () => null,\n title: undefined,\n subheader: undefined,\n avatar: undefined,\n headerAction: undefined,\n actions: undefined,\n raised: false,\n sx: undefined,\n },\n view: () => (\n <MuiCard raised={m.raised} sx={m.sx}>\n {(m.title || m.subheader || m.avatar || m.headerAction) && (\n <CardHeader\n title={m.title}\n subheader={m.subheader}\n avatar={m.avatar}\n action={m.headerAction ? <m.headerAction /> : undefined}\n />\n )}\n <CardContent>\n <m.content />\n </CardContent>\n {m.actions && (\n <CardActions>\n <m.actions />\n </CardActions>\n )}\n </MuiCard>\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type CardStruct = Struct;\n\nexport const Card = toReact(useCard);\nCard.displayName = 'Card';\n"],"names":["MuiCard"],"mappings":";;;;;AAkCO,MAAM,UAAU,wBAAC,WAAuD;AAC3E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,SAAS,6BAAM,MAAN;AAAA,MACT,OAAO;AAAA,MACP,WAAW;AAAA,MACX,QAAQ;AAAA,MACR,cAAc;AAAA,MACd,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA,cAACA,QAAA,EAAQ,QAAQ,EAAE,QAAQ,IAAI,EAAE,GAAA,IAC3B,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,iBACtC,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,OAAO,EAAE;AAAA,QACT,WAAW,EAAE;AAAA,QACb,QAAQ,EAAE;AAAA,QACV,QAAQ,EAAE,mDAAgB,EAAE,cAAF,IAAe,IAAK;AAAA,MAAA;AAAA,IAAA,GAGtD,sBAAA,cAAC,aAAA,0CACI,EAAE,SAAF,IAAU,CACf,GACC,EAAE,+CACE,aAAA,MACG,sBAAA,cAAC,EAAE,SAAF,IAAU,CACf,CAER,GAlBE;AAAA,EAkBF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAzCuB;AA6ChB,MAAM,OAAO,QAAQ,OAAO;AACnC,KAAK,cAAc;"}
|
package/dist/Checkbox.es.js
CHANGED
|
@@ -1,49 +1,56 @@
|
|
|
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 { Checkbox as Checkbox$1, FormControl, FormControlLabel, FormHelperText } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const useCheckbox = /* @__PURE__ */ __name((params) => {
|
|
7
|
+
let c;
|
|
8
|
+
let m;
|
|
9
|
+
const def = {
|
|
7
10
|
regType: "Checkbox",
|
|
8
11
|
props: {
|
|
9
|
-
checked:
|
|
10
|
-
onChange: () => {
|
|
11
|
-
},
|
|
12
|
+
checked: false,
|
|
13
|
+
onChange: /* @__PURE__ */ __name(() => {
|
|
14
|
+
}, "onChange"),
|
|
12
15
|
label: void 0,
|
|
13
16
|
helperText: void 0,
|
|
14
|
-
error:
|
|
17
|
+
error: false,
|
|
15
18
|
color: "primary",
|
|
16
19
|
size: "medium",
|
|
17
|
-
indeterminate:
|
|
20
|
+
indeterminate: false,
|
|
18
21
|
sx: void 0
|
|
19
22
|
},
|
|
20
|
-
view: () => {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
+
view: /* @__PURE__ */ __name(() => {
|
|
24
|
+
const checkbox = /* @__PURE__ */ React.createElement(
|
|
25
|
+
Checkbox$1,
|
|
23
26
|
{
|
|
24
|
-
checked:
|
|
25
|
-
onChange: (
|
|
26
|
-
color:
|
|
27
|
-
size:
|
|
28
|
-
indeterminate:
|
|
27
|
+
checked: m.checked,
|
|
28
|
+
onChange: /* @__PURE__ */ __name((e) => m.onChange(e.target.checked), "onChange"),
|
|
29
|
+
color: m.color,
|
|
30
|
+
size: m.size,
|
|
31
|
+
indeterminate: m.indeterminate
|
|
29
32
|
}
|
|
30
33
|
);
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
|
|
34
|
+
return /* @__PURE__ */ React.createElement(
|
|
35
|
+
FormControl,
|
|
33
36
|
{
|
|
34
|
-
error:
|
|
35
|
-
disabled:
|
|
36
|
-
sx:
|
|
37
|
+
error: m.error,
|
|
38
|
+
disabled: m.$.isDisabled,
|
|
39
|
+
sx: m.sx
|
|
37
40
|
},
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
m.label != null ? /* @__PURE__ */ React.createElement(FormControlLabel, { control: checkbox, label: m.label }) : checkbox,
|
|
42
|
+
m.helperText && /* @__PURE__ */ React.createElement(FormHelperText, null, m.helperText)
|
|
40
43
|
);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
}, "view")
|
|
45
|
+
};
|
|
46
|
+
c = useComponent(def, params);
|
|
47
|
+
m = c.model;
|
|
48
|
+
return c;
|
|
49
|
+
}, "useCheckbox");
|
|
50
|
+
const Checkbox = toReact(useCheckbox);
|
|
51
|
+
Checkbox.displayName = "Checkbox";
|
|
45
52
|
export {
|
|
46
|
-
|
|
47
|
-
|
|
53
|
+
Checkbox,
|
|
54
|
+
useCheckbox
|
|
48
55
|
};
|
|
49
56
|
//# sourceMappingURL=Checkbox.es.js.map
|
package/dist/Checkbox.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Checkbox.tsx"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"Checkbox.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Checkbox.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Checkbox as MuiCheckbox,\n FormControl,\n FormControlLabel,\n FormHelperText,\n type CheckboxProps as MuiCheckboxProps,\n type FormControlProps as MuiFormControlProps,\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 checked: boolean;\n onChange: (checked: boolean) => void;\n label?: string;\n helperText?: string;\n error?: boolean;\n color?: MuiCheckboxProps['color'];\n size?: MuiCheckboxProps['size'];\n indeterminate?: boolean;\n sx?: MuiFormControlProps['sx'];\n };\n }\n>;\n\nexport const useCheckbox = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Checkbox',\n props: {\n checked: false,\n onChange: () => {},\n label: undefined,\n helperText: undefined,\n error: false,\n color: 'primary',\n size: 'medium',\n indeterminate: false,\n sx: undefined,\n },\n view: () => {\n const checkbox = (\n <MuiCheckbox\n checked={m.checked}\n onChange={(e) => m.onChange(e.target.checked)}\n color={m.color}\n size={m.size}\n indeterminate={m.indeterminate}\n />\n );\n return (\n <FormControl\n error={m.error}\n disabled={m.$.isDisabled}\n sx={m.sx}\n >\n {m.label != null ? (\n <FormControlLabel control={checkbox} label={m.label} />\n ) : (\n checkbox\n )}\n {m.helperText && <FormHelperText>{m.helperText}</FormHelperText>}\n </FormControl>\n );\n },\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type CheckboxStruct = Struct;\n\nexport const Checkbox = toReact(useCheckbox);\nCheckbox.displayName = 'Checkbox';\n"],"names":["MuiCheckbox"],"mappings":";;;;;AAoCO,MAAM,cAAc,wBAAC,WAAuD;AAC/E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,SAAS;AAAA,MACT,UAAU,6BAAM;AAAA,MAAC,GAAP;AAAA,MACV,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,OAAO;AAAA,MACP,MAAM;AAAA,MACN,eAAe;AAAA,MACf,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BAAM;AACR,YAAM,WACF,sBAAA;AAAA,QAACA;AAAAA,QAAA;AAAA,UACG,SAAS,EAAE;AAAA,UACX,UAAU,wBAAC,MAAM,EAAE,SAAS,EAAE,OAAO,OAAO,GAAlC;AAAA,UACV,OAAO,EAAE;AAAA,UACT,MAAM,EAAE;AAAA,UACR,eAAe,EAAE;AAAA,QAAA;AAAA,MAAA;AAGzB,aACI,sBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,OAAO,EAAE;AAAA,UACT,UAAU,EAAE,EAAE;AAAA,UACd,IAAI,EAAE;AAAA,QAAA;AAAA,QAEL,EAAE,SAAS,OACR,sBAAA,cAAC,kBAAA,EAAiB,SAAS,UAAU,OAAO,EAAE,MAAA,CAAO,IAErD;AAAA,QAEH,EAAE,cAAc,sBAAA,cAAC,gBAAA,MAAgB,EAAE,UAAW;AAAA,MAAA;AAAA,IAG3D,GAxBM;AAAA,EAwBN;AAGJ,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA/C2B;AAmDpB,MAAM,WAAW,QAAQ,WAAW;AAC3C,SAAS,cAAc;"}
|
package/dist/Chip.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 { Chip as Chip$1 } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const useChip = /* @__PURE__ */ __name((params) => {
|
|
7
|
+
let c;
|
|
8
|
+
let m;
|
|
9
|
+
const def = {
|
|
7
10
|
regType: "Chip",
|
|
8
11
|
props: {
|
|
9
12
|
label: "",
|
|
@@ -15,25 +18,29 @@ const r = (i) => {
|
|
|
15
18
|
icon: void 0,
|
|
16
19
|
sx: void 0
|
|
17
20
|
},
|
|
18
|
-
view: () => /* @__PURE__ */
|
|
19
|
-
|
|
21
|
+
view: /* @__PURE__ */ __name(() => /* @__PURE__ */ React.createElement(
|
|
22
|
+
Chip$1,
|
|
20
23
|
{
|
|
21
|
-
label:
|
|
22
|
-
onClick:
|
|
23
|
-
onDelete:
|
|
24
|
-
variant:
|
|
25
|
-
color:
|
|
26
|
-
size:
|
|
27
|
-
icon:
|
|
28
|
-
disabled:
|
|
29
|
-
sx:
|
|
24
|
+
label: m.label,
|
|
25
|
+
onClick: m.onClick,
|
|
26
|
+
onDelete: m.onDelete,
|
|
27
|
+
variant: m.variant,
|
|
28
|
+
color: m.color,
|
|
29
|
+
size: m.size,
|
|
30
|
+
icon: m.icon,
|
|
31
|
+
disabled: m.$.isDisabled,
|
|
32
|
+
sx: m.sx
|
|
30
33
|
}
|
|
31
|
-
)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
), "view")
|
|
35
|
+
};
|
|
36
|
+
c = useComponent(def, params);
|
|
37
|
+
m = c.model;
|
|
38
|
+
return c;
|
|
39
|
+
}, "useChip");
|
|
40
|
+
const Chip = toReact(useChip);
|
|
41
|
+
Chip.displayName = "Chip";
|
|
35
42
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
Chip,
|
|
44
|
+
useChip
|
|
38
45
|
};
|
|
39
46
|
//# sourceMappingURL=Chip.es.js.map
|
package/dist/Chip.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chip.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Chip.tsx"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"Chip.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Chip.tsx"],"sourcesContent":["import React from 'react';\nimport { Chip as MuiChip, type ChipProps as MuiChipProps } 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 onDelete?: () => void;\n variant?: MuiChipProps['variant'];\n color?: MuiChipProps['color'];\n size?: MuiChipProps['size'];\n icon?: React.ReactNode;\n sx?: MuiChipProps['sx'];\n };\n }\n>;\n\nexport const useChip = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Chip',\n props: {\n label: '',\n onClick: undefined,\n onDelete: undefined,\n variant: 'filled',\n color: 'default',\n size: 'medium',\n icon: undefined,\n sx: undefined,\n },\n view: () => (\n <MuiChip\n label={m.label}\n onClick={m.onClick}\n onDelete={m.onDelete}\n variant={m.variant}\n color={m.color}\n size={m.size}\n icon={m.icon as React.ReactElement | undefined}\n disabled={m.$.isDisabled}\n sx={m.sx}\n />\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type ChipStruct = Struct;\n\nexport const Chip = toReact(useChip);\nChip.displayName = 'Chip';\n"],"names":["MuiChip"],"mappings":";;;;;AA4BO,MAAM,UAAU,wBAAC,WAAuD;AAC3E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,OAAO;AAAA,MACP,SAAS;AAAA,MACT,UAAU;AAAA,MACV,SAAS;AAAA,MACT,OAAO;AAAA,MACP,MAAM;AAAA,MACN,MAAM;AAAA,MACN,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,OAAO,EAAE;AAAA,QACT,SAAS,EAAE;AAAA,QACX,UAAU,EAAE;AAAA,QACZ,SAAS,EAAE;AAAA,QACX,OAAO,EAAE;AAAA,QACT,MAAM,EAAE;AAAA,QACR,MAAM,EAAE;AAAA,QACR,UAAU,EAAE,EAAE;AAAA,QACd,IAAI,EAAE;AAAA,MAAA;AAAA,IAAA,GAVR;AAAA,EAWF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAlCuB;AAsChB,MAAM,OAAO,QAAQ,OAAO;AACnC,KAAK,cAAc;"}
|
|
@@ -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 { CircularProgress as CircularProgress$1 } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const useCircularProgress = /* @__PURE__ */ __name((params) => {
|
|
7
|
+
let c;
|
|
8
|
+
let m;
|
|
9
|
+
const def = {
|
|
7
10
|
regType: "CircularProgress",
|
|
8
11
|
props: {
|
|
9
12
|
variant: "indeterminate",
|
|
@@ -13,22 +16,26 @@ const c = (s) => {
|
|
|
13
16
|
thickness: 3.6,
|
|
14
17
|
sx: void 0
|
|
15
18
|
},
|
|
16
|
-
view: () => /* @__PURE__ */
|
|
17
|
-
|
|
19
|
+
view: /* @__PURE__ */ __name(() => /* @__PURE__ */ React.createElement(
|
|
20
|
+
CircularProgress$1,
|
|
18
21
|
{
|
|
19
|
-
variant:
|
|
20
|
-
value:
|
|
21
|
-
color:
|
|
22
|
-
size:
|
|
23
|
-
thickness:
|
|
24
|
-
sx:
|
|
22
|
+
variant: m.variant,
|
|
23
|
+
value: m.value,
|
|
24
|
+
color: m.color,
|
|
25
|
+
size: m.size,
|
|
26
|
+
thickness: m.thickness,
|
|
27
|
+
sx: m.sx
|
|
25
28
|
}
|
|
26
|
-
)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
), "view")
|
|
30
|
+
};
|
|
31
|
+
c = useComponent(def, params);
|
|
32
|
+
m = c.model;
|
|
33
|
+
return c;
|
|
34
|
+
}, "useCircularProgress");
|
|
35
|
+
const CircularProgress = toReact(useCircularProgress);
|
|
36
|
+
CircularProgress.displayName = "CircularProgress";
|
|
30
37
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
38
|
+
CircularProgress,
|
|
39
|
+
useCircularProgress
|
|
33
40
|
};
|
|
34
41
|
//# sourceMappingURL=CircularProgress.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CircularProgress.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/CircularProgress.tsx"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"CircularProgress.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/CircularProgress.tsx"],"sourcesContent":["import React from 'react';\nimport {\n CircularProgress as MuiCircularProgress,\n type CircularProgressProps as MuiCircularProgressProps,\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 variant?: MuiCircularProgressProps['variant'];\n value?: number;\n color?: MuiCircularProgressProps['color'];\n size?: number | string;\n thickness?: number;\n sx?: MuiCircularProgressProps['sx'];\n };\n }\n>;\n\nexport const useCircularProgress = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'CircularProgress',\n props: {\n variant: 'indeterminate',\n value: undefined,\n color: 'primary',\n size: 40,\n thickness: 3.6,\n sx: undefined,\n },\n view: () => (\n <MuiCircularProgress\n variant={m.variant}\n value={m.value}\n color={m.color}\n size={m.size}\n thickness={m.thickness}\n sx={m.sx}\n />\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type CircularProgressStruct = Struct;\n\nexport const CircularProgress = toReact(useCircularProgress);\nCircularProgress.displayName = 'CircularProgress';\n"],"names":["MuiCircularProgress"],"mappings":";;;;;AA6BO,MAAM,sBAAsB,wBAAC,WAAuD;AACvF,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,SAAS;AAAA,MACT,OAAO;AAAA,MACP,OAAO;AAAA,MACP,MAAM;AAAA,MACN,WAAW;AAAA,MACX,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,SAAS,EAAE;AAAA,QACX,OAAO,EAAE;AAAA,QACT,OAAO,EAAE;AAAA,QACT,MAAM,EAAE;AAAA,QACR,WAAW,EAAE;AAAA,QACb,IAAI,EAAE;AAAA,MAAA;AAAA,IAAA,GAPR;AAAA,EAQF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA7BmC;AAiC5B,MAAM,mBAAmB,QAAQ,mBAAmB;AAC3D,iBAAiB,cAAc;"}
|
package/dist/Dialog.es.js
CHANGED
|
@@ -1,41 +1,48 @@
|
|
|
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 { Dialog as Dialog$1, DialogTitle, DialogContent, DialogActions } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const useDialog = /* @__PURE__ */ __name((params) => {
|
|
7
|
+
let c;
|
|
8
|
+
let m;
|
|
9
|
+
const def = {
|
|
7
10
|
regType: "Dialog",
|
|
8
11
|
props: {
|
|
9
|
-
open:
|
|
10
|
-
onClose: () => {
|
|
11
|
-
},
|
|
12
|
+
open: false,
|
|
13
|
+
onClose: /* @__PURE__ */ __name(() => {
|
|
14
|
+
}, "onClose"),
|
|
12
15
|
title: void 0,
|
|
13
16
|
content: void 0,
|
|
14
17
|
actions: void 0,
|
|
15
18
|
maxWidth: "sm",
|
|
16
|
-
fullWidth:
|
|
17
|
-
fullScreen:
|
|
19
|
+
fullWidth: true,
|
|
20
|
+
fullScreen: false,
|
|
18
21
|
sx: void 0
|
|
19
22
|
},
|
|
20
|
-
view: () => /* @__PURE__ */
|
|
21
|
-
|
|
23
|
+
view: /* @__PURE__ */ __name(() => /* @__PURE__ */ React.createElement(
|
|
24
|
+
Dialog$1,
|
|
22
25
|
{
|
|
23
|
-
open:
|
|
24
|
-
onClose:
|
|
25
|
-
maxWidth:
|
|
26
|
-
fullWidth:
|
|
27
|
-
fullScreen:
|
|
28
|
-
sx:
|
|
26
|
+
open: m.open,
|
|
27
|
+
onClose: m.onClose,
|
|
28
|
+
maxWidth: m.maxWidth,
|
|
29
|
+
fullWidth: m.fullWidth,
|
|
30
|
+
fullScreen: m.fullScreen,
|
|
31
|
+
sx: m.sx
|
|
29
32
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
m.title && /* @__PURE__ */ React.createElement(DialogTitle, null, m.title),
|
|
34
|
+
m.content && /* @__PURE__ */ React.createElement(DialogContent, null, /* @__PURE__ */ React.createElement(m.content, null)),
|
|
35
|
+
m.actions && /* @__PURE__ */ React.createElement(DialogActions, null, /* @__PURE__ */ React.createElement(m.actions, null))
|
|
36
|
+
), "view")
|
|
37
|
+
};
|
|
38
|
+
c = useComponent(def, params);
|
|
39
|
+
m = c.model;
|
|
40
|
+
return c;
|
|
41
|
+
}, "useDialog");
|
|
42
|
+
const Dialog = toReact(useDialog);
|
|
43
|
+
Dialog.displayName = "Dialog";
|
|
37
44
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
45
|
+
Dialog,
|
|
46
|
+
useDialog
|
|
40
47
|
};
|
|
41
48
|
//# sourceMappingURL=Dialog.es.js.map
|
package/dist/Dialog.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Dialog.tsx"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"Dialog.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Dialog.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Dialog as MuiDialog,\n DialogTitle,\n DialogContent,\n DialogActions,\n type DialogProps as MuiDialogProps,\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 open: boolean;\n onClose: () => void;\n title?: string;\n content?: React.FC;\n actions?: React.FC;\n maxWidth?: MuiDialogProps['maxWidth'];\n fullWidth?: boolean;\n fullScreen?: boolean;\n sx?: MuiDialogProps['sx'];\n };\n }\n>;\n\nexport const useDialog = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Dialog',\n props: {\n open: false,\n onClose: () => {},\n title: undefined,\n content: undefined,\n actions: undefined,\n maxWidth: 'sm',\n fullWidth: true,\n fullScreen: false,\n sx: undefined,\n },\n view: () => (\n <MuiDialog\n open={m.open}\n onClose={m.onClose}\n maxWidth={m.maxWidth}\n fullWidth={m.fullWidth}\n fullScreen={m.fullScreen}\n sx={m.sx}\n >\n {m.title && <DialogTitle>{m.title}</DialogTitle>}\n {m.content && (\n <DialogContent>\n <m.content />\n </DialogContent>\n )}\n {m.actions && (\n <DialogActions>\n <m.actions />\n </DialogActions>\n )}\n </MuiDialog>\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type DialogStruct = Struct;\n\nexport const Dialog = toReact(useDialog);\nDialog.displayName = 'Dialog';\n"],"names":["MuiDialog"],"mappings":";;;;;AAmCO,MAAM,YAAY,wBAAC,WAAuD;AAC7E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,MAAM;AAAA,MACN,SAAS,6BAAM;AAAA,MAAC,GAAP;AAAA,MACT,OAAO;AAAA,MACP,SAAS;AAAA,MACT,SAAS;AAAA,MACT,UAAU;AAAA,MACV,WAAW;AAAA,MACX,YAAY;AAAA,MACZ,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,MAAM,EAAE;AAAA,QACR,SAAS,EAAE;AAAA,QACX,UAAU,EAAE;AAAA,QACZ,WAAW,EAAE;AAAA,QACb,YAAY,EAAE;AAAA,QACd,IAAI,EAAE;AAAA,MAAA;AAAA,MAEL,EAAE,SAAS,sBAAA,cAAC,aAAA,MAAa,EAAE,KAAM;AAAA,MACjC,EAAE,WACC,sBAAA,cAAC,eAAA,0CACI,EAAE,SAAF,IAAU,CACf;AAAA,MAEH,EAAE,WACC,sBAAA,cAAC,eAAA,0CACI,EAAE,SAAF,IAAU,CACf;AAAA,IAAA,GAlBN;AAAA,EAoBF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA5CyB;AAgDlB,MAAM,SAAS,QAAQ,SAAS;AACvC,OAAO,cAAc;"}
|
package/dist/Drawer.es.js
CHANGED
|
@@ -1,35 +1,42 @@
|
|
|
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 { Drawer as Drawer$1 } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const useDrawer = /* @__PURE__ */ __name((params) => {
|
|
7
|
+
let c;
|
|
8
|
+
let m;
|
|
9
|
+
const def = {
|
|
7
10
|
regType: "Drawer",
|
|
8
11
|
props: {
|
|
9
|
-
open:
|
|
10
|
-
onClose: () => {
|
|
11
|
-
},
|
|
12
|
-
children: () => null,
|
|
12
|
+
open: false,
|
|
13
|
+
onClose: /* @__PURE__ */ __name(() => {
|
|
14
|
+
}, "onClose"),
|
|
15
|
+
children: /* @__PURE__ */ __name(() => null, "children"),
|
|
13
16
|
anchor: "left",
|
|
14
17
|
variant: "temporary",
|
|
15
18
|
sx: void 0
|
|
16
19
|
},
|
|
17
|
-
view: () => /* @__PURE__ */
|
|
18
|
-
|
|
20
|
+
view: /* @__PURE__ */ __name(() => /* @__PURE__ */ React.createElement(
|
|
21
|
+
Drawer$1,
|
|
19
22
|
{
|
|
20
|
-
open:
|
|
21
|
-
onClose:
|
|
22
|
-
anchor:
|
|
23
|
-
variant:
|
|
24
|
-
sx:
|
|
23
|
+
open: m.open,
|
|
24
|
+
onClose: m.onClose,
|
|
25
|
+
anchor: m.anchor,
|
|
26
|
+
variant: m.variant,
|
|
27
|
+
sx: m.sx
|
|
25
28
|
},
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
/* @__PURE__ */ React.createElement(m.children, null)
|
|
30
|
+
), "view")
|
|
31
|
+
};
|
|
32
|
+
c = useComponent(def, params);
|
|
33
|
+
m = c.model;
|
|
34
|
+
return c;
|
|
35
|
+
}, "useDrawer");
|
|
36
|
+
const Drawer = toReact(useDrawer);
|
|
37
|
+
Drawer.displayName = "Drawer";
|
|
31
38
|
export {
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
Drawer,
|
|
40
|
+
useDrawer
|
|
34
41
|
};
|
|
35
42
|
//# sourceMappingURL=Drawer.es.js.map
|
package/dist/Drawer.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Drawer.tsx"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"Drawer.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Drawer.tsx"],"sourcesContent":["import React from 'react';\nimport { Drawer as MuiDrawer, type DrawerProps as MuiDrawerProps } 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 open: boolean;\n onClose: () => void;\n children: React.FC;\n anchor?: MuiDrawerProps['anchor'];\n variant?: MuiDrawerProps['variant'];\n sx?: MuiDrawerProps['sx'];\n };\n }\n>;\n\nexport const useDrawer = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Drawer',\n props: {\n open: false,\n onClose: () => {},\n children: () => null,\n anchor: 'left',\n variant: 'temporary',\n sx: undefined,\n },\n view: () => (\n <MuiDrawer\n open={m.open}\n onClose={m.onClose}\n anchor={m.anchor}\n variant={m.variant}\n sx={m.sx}\n >\n <m.children />\n </MuiDrawer>\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type DrawerStruct = Struct;\n\nexport const Drawer = toReact(useDrawer);\nDrawer.displayName = 'Drawer';\n"],"names":["MuiDrawer"],"mappings":";;;;;AA0BO,MAAM,YAAY,wBAAC,WAAuD;AAC7E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,MAAM;AAAA,MACN,SAAS,6BAAM;AAAA,MAAC,GAAP;AAAA,MACT,UAAU,6BAAM,MAAN;AAAA,MACV,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,MAAM,EAAE;AAAA,QACR,SAAS,EAAE;AAAA,QACX,QAAQ,EAAE;AAAA,QACV,SAAS,EAAE;AAAA,QACX,IAAI,EAAE;AAAA,MAAA;AAAA,MAEN,sBAAA,cAAC,EAAE,UAAF,IAAW;AAAA,IAAA,GARd;AAAA,EASF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA9ByB;AAkClB,MAAM,SAAS,QAAQ,SAAS;AACvC,OAAO,cAAc;"}
|
package/dist/Fab.es.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
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 { Fab as Fab$1 } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const useFab = /* @__PURE__ */ __name((params) => {
|
|
7
|
+
let c;
|
|
8
|
+
let m;
|
|
9
|
+
const def = {
|
|
7
10
|
regType: "Fab",
|
|
8
11
|
props: {
|
|
9
|
-
icon: () => null,
|
|
10
|
-
onClick: () => {
|
|
11
|
-
},
|
|
12
|
+
icon: /* @__PURE__ */ __name(() => null, "icon"),
|
|
13
|
+
onClick: /* @__PURE__ */ __name(() => {
|
|
14
|
+
}, "onClick"),
|
|
12
15
|
ariaLabel: "",
|
|
13
16
|
color: "primary",
|
|
14
17
|
size: "large",
|
|
@@ -16,25 +19,29 @@ const n = (o) => {
|
|
|
16
19
|
label: void 0,
|
|
17
20
|
sx: void 0
|
|
18
21
|
},
|
|
19
|
-
view: () => /* @__PURE__ */
|
|
20
|
-
|
|
22
|
+
view: /* @__PURE__ */ __name(() => /* @__PURE__ */ React.createElement(
|
|
23
|
+
Fab$1,
|
|
21
24
|
{
|
|
22
|
-
color:
|
|
23
|
-
size:
|
|
24
|
-
variant:
|
|
25
|
-
"aria-label":
|
|
26
|
-
disabled:
|
|
27
|
-
onClick:
|
|
28
|
-
sx:
|
|
25
|
+
color: m.color,
|
|
26
|
+
size: m.size,
|
|
27
|
+
variant: m.variant,
|
|
28
|
+
"aria-label": m.ariaLabel,
|
|
29
|
+
disabled: m.$.isDisabled,
|
|
30
|
+
onClick: m.onClick,
|
|
31
|
+
sx: m.sx
|
|
29
32
|
},
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
|
|
32
|
-
)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
/* @__PURE__ */ React.createElement(m.icon, null),
|
|
34
|
+
m.variant === "extended" && m.label
|
|
35
|
+
), "view")
|
|
36
|
+
};
|
|
37
|
+
c = useComponent(def, params);
|
|
38
|
+
m = c.model;
|
|
39
|
+
return c;
|
|
40
|
+
}, "useFab");
|
|
41
|
+
const Fab = toReact(useFab);
|
|
42
|
+
Fab.displayName = "Fab";
|
|
36
43
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
Fab,
|
|
45
|
+
useFab
|
|
39
46
|
};
|
|
40
47
|
//# sourceMappingURL=Fab.es.js.map
|
package/dist/Fab.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fab.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Fab.tsx"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"Fab.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Fab.tsx"],"sourcesContent":["import React from 'react';\nimport { Fab as MuiFab, type FabProps as MuiFabProps } 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 icon: React.FC;\n onClick: () => void;\n ariaLabel: string;\n color?: MuiFabProps['color'];\n size?: MuiFabProps['size'];\n variant?: MuiFabProps['variant'];\n label?: string;\n sx?: MuiFabProps['sx'];\n };\n }\n>;\n\nexport const useFab = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Fab',\n props: {\n icon: () => null,\n onClick: () => {},\n ariaLabel: '',\n color: 'primary',\n size: 'large',\n variant: 'circular',\n label: undefined,\n sx: undefined,\n },\n view: () => (\n <MuiFab\n color={m.color}\n size={m.size}\n variant={m.variant}\n aria-label={m.ariaLabel}\n disabled={m.$.isDisabled}\n onClick={m.onClick}\n sx={m.sx}\n >\n <m.icon />\n {m.variant === 'extended' && m.label}\n </MuiFab>\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type FabStruct = Struct;\n\nexport const Fab = toReact(useFab);\nFab.displayName = 'Fab';\n"],"names":["MuiFab"],"mappings":";;;;;AA4BO,MAAM,SAAS,wBAAC,WAAuD;AAC1E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,MAAM,6BAAM,MAAN;AAAA,MACN,SAAS,6BAAM;AAAA,MAAC,GAAP;AAAA,MACT,WAAW;AAAA,MACX,OAAO;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,MACT,OAAO;AAAA,MACP,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,OAAO,EAAE;AAAA,QACT,MAAM,EAAE;AAAA,QACR,SAAS,EAAE;AAAA,QACX,cAAY,EAAE;AAAA,QACd,UAAU,EAAE,EAAE;AAAA,QACd,SAAS,EAAE;AAAA,QACX,IAAI,EAAE;AAAA,MAAA;AAAA,MAEN,sBAAA,cAAC,EAAE,MAAF,IAAO;AAAA,MACP,EAAE,YAAY,cAAc,EAAE;AAAA,IAAA,GAXjC;AAAA,EAYF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAnCsB;AAuCf,MAAM,MAAM,QAAQ,MAAM;AACjC,IAAI,cAAc;"}
|