@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/Select.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 { FormControl, InputLabel, Select as Select$1, MenuItem, FormHelperText } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const useSelect = /* @__PURE__ */ __name((params) => {
|
|
7
|
+
let c;
|
|
8
|
+
let m;
|
|
9
|
+
const def = {
|
|
7
10
|
regType: "Select",
|
|
8
11
|
props: {
|
|
9
12
|
value: "",
|
|
10
|
-
onChange: () => {
|
|
11
|
-
},
|
|
13
|
+
onChange: /* @__PURE__ */ __name(() => {
|
|
14
|
+
}, "onChange"),
|
|
12
15
|
options: [],
|
|
13
16
|
label: void 0,
|
|
14
17
|
helperText: void 0,
|
|
15
|
-
error:
|
|
16
|
-
fullWidth:
|
|
18
|
+
error: false,
|
|
19
|
+
fullWidth: false,
|
|
17
20
|
variant: "outlined",
|
|
18
21
|
size: "medium",
|
|
19
22
|
color: "primary",
|
|
20
23
|
sx: void 0
|
|
21
24
|
},
|
|
22
|
-
view: () => {
|
|
23
|
-
const
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
|
|
25
|
+
view: /* @__PURE__ */ __name(() => {
|
|
26
|
+
const labelId = `${c.id}-label`;
|
|
27
|
+
return /* @__PURE__ */ React.createElement(
|
|
28
|
+
FormControl,
|
|
26
29
|
{
|
|
27
|
-
fullWidth:
|
|
28
|
-
variant:
|
|
29
|
-
size:
|
|
30
|
-
error:
|
|
31
|
-
disabled:
|
|
32
|
-
sx:
|
|
30
|
+
fullWidth: m.fullWidth,
|
|
31
|
+
variant: m.variant,
|
|
32
|
+
size: m.size,
|
|
33
|
+
error: m.error,
|
|
34
|
+
disabled: m.$.isDisabled,
|
|
35
|
+
sx: m.sx
|
|
33
36
|
},
|
|
34
|
-
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
|
|
37
|
+
m.label && /* @__PURE__ */ React.createElement(InputLabel, { id: labelId }, m.label),
|
|
38
|
+
/* @__PURE__ */ React.createElement(
|
|
39
|
+
Select$1,
|
|
37
40
|
{
|
|
38
|
-
labelId:
|
|
39
|
-
label:
|
|
40
|
-
value:
|
|
41
|
-
onChange: (
|
|
42
|
-
color:
|
|
43
|
-
inputProps: { readOnly:
|
|
41
|
+
labelId: m.label ? labelId : void 0,
|
|
42
|
+
label: m.label,
|
|
43
|
+
value: m.value,
|
|
44
|
+
onChange: /* @__PURE__ */ __name((e) => m.onChange(e.target.value), "onChange"),
|
|
45
|
+
color: m.color,
|
|
46
|
+
inputProps: { readOnly: m.$.isReadOnly }
|
|
44
47
|
},
|
|
45
|
-
|
|
48
|
+
m.options.map((opt) => /* @__PURE__ */ React.createElement(MenuItem, { key: opt.value, value: opt.value }, opt.label))
|
|
46
49
|
),
|
|
47
|
-
|
|
50
|
+
m.helperText && /* @__PURE__ */ React.createElement(FormHelperText, null, m.helperText)
|
|
48
51
|
);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
}, "view")
|
|
53
|
+
};
|
|
54
|
+
c = useComponent(def, params);
|
|
55
|
+
m = c.model;
|
|
56
|
+
return c;
|
|
57
|
+
}, "useSelect");
|
|
58
|
+
const Select = toReact(useSelect);
|
|
59
|
+
Select.displayName = "Select";
|
|
53
60
|
export {
|
|
54
|
-
|
|
55
|
-
|
|
61
|
+
Select,
|
|
62
|
+
useSelect
|
|
56
63
|
};
|
|
57
64
|
//# sourceMappingURL=Select.es.js.map
|
package/dist/Select.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Select.tsx"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"Select.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Select.tsx"],"sourcesContent":["import React from 'react';\nimport {\n FormControl,\n FormHelperText,\n InputLabel,\n MenuItem,\n Select as MuiSelect,\n type SelectProps as MuiSelectProps,\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 SelectOption = {\n value: string;\n label: string;\n};\n\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n value: string;\n onChange: (value: string) => void;\n options: SelectOption[];\n label?: string;\n helperText?: string;\n error?: boolean;\n fullWidth?: boolean;\n variant?: MuiSelectProps['variant'];\n size?: MuiSelectProps['size'];\n color?: MuiSelectProps['color'];\n sx?: MuiSelectProps['sx'];\n };\n }\n>;\n\nexport const useSelect = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Select',\n props: {\n value: '',\n onChange: () => {},\n options: [],\n label: undefined,\n helperText: undefined,\n error: false,\n fullWidth: false,\n variant: 'outlined',\n size: 'medium',\n color: 'primary',\n sx: undefined,\n },\n view: () => {\n const labelId = `${c.id}-label`;\n return (\n <FormControl\n fullWidth={m.fullWidth}\n variant={m.variant}\n size={m.size}\n error={m.error}\n disabled={m.$.isDisabled}\n sx={m.sx}\n >\n {m.label && <InputLabel id={labelId}>{m.label}</InputLabel>}\n <MuiSelect\n labelId={m.label ? labelId : undefined}\n label={m.label}\n value={m.value}\n onChange={(e) => m.onChange(e.target.value as string)}\n color={m.color}\n inputProps={{ readOnly: m.$.isReadOnly }}\n >\n {m.options.map((opt) => (\n <MenuItem key={opt.value} value={opt.value}>\n {opt.label}\n </MenuItem>\n ))}\n </MuiSelect>\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 SelectStruct = Struct;\n\nexport const Select = toReact(useSelect);\nSelect.displayName = 'Select';\n"],"names":["MuiSelect"],"mappings":";;;;;AA2CO,MAAM,YAAY,wBAAC,WAAuD;AAC7E,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,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,OAAO;AAAA,MACP,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BAAM;AACR,YAAM,UAAU,GAAG,EAAE,EAAE;AACvB,aACI,sBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,WAAW,EAAE;AAAA,UACb,SAAS,EAAE;AAAA,UACX,MAAM,EAAE;AAAA,UACR,OAAO,EAAE;AAAA,UACT,UAAU,EAAE,EAAE;AAAA,UACd,IAAI,EAAE;AAAA,QAAA;AAAA,QAEL,EAAE,SAAS,sBAAA,cAAC,cAAW,IAAI,QAAA,GAAU,EAAE,KAAM;AAAA,QAC9C,sBAAA;AAAA,UAACA;AAAAA,UAAA;AAAA,YACG,SAAS,EAAE,QAAQ,UAAU;AAAA,YAC7B,OAAO,EAAE;AAAA,YACT,OAAO,EAAE;AAAA,YACT,UAAU,wBAAC,MAAM,EAAE,SAAS,EAAE,OAAO,KAAe,GAA1C;AAAA,YACV,OAAO,EAAE;AAAA,YACT,YAAY,EAAE,UAAU,EAAE,EAAE,WAAA;AAAA,UAAW;AAAA,UAEtC,EAAE,QAAQ,IAAI,CAAC,QACZ,sBAAA,cAAC,UAAA,EAAS,KAAK,IAAI,OAAO,OAAO,IAAI,MAAA,GAChC,IAAI,KACT,CACH;AAAA,QAAA;AAAA,QAEJ,EAAE,cAAc,sBAAA,cAAC,gBAAA,MAAgB,EAAE,UAAW;AAAA,MAAA;AAAA,IAG3D,GA7BM;AAAA,EA6BN;AAGJ,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAtDyB;AA0DlB,MAAM,SAAS,QAAQ,SAAS;AACvC,OAAO,cAAc;"}
|
package/dist/Skeleton.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 { Skeleton as Skeleton$1 } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const useSkeleton = /* @__PURE__ */ __name((params) => {
|
|
7
|
+
let c;
|
|
8
|
+
let m;
|
|
9
|
+
const def = {
|
|
7
10
|
regType: "Skeleton",
|
|
8
11
|
props: {
|
|
9
12
|
variant: "text",
|
|
@@ -12,21 +15,25 @@ const m = (o) => {
|
|
|
12
15
|
animation: "pulse",
|
|
13
16
|
sx: void 0
|
|
14
17
|
},
|
|
15
|
-
view: () => /* @__PURE__ */
|
|
16
|
-
|
|
18
|
+
view: /* @__PURE__ */ __name(() => /* @__PURE__ */ React.createElement(
|
|
19
|
+
Skeleton$1,
|
|
17
20
|
{
|
|
18
|
-
variant:
|
|
19
|
-
width:
|
|
20
|
-
height:
|
|
21
|
-
animation:
|
|
22
|
-
sx:
|
|
21
|
+
variant: m.variant,
|
|
22
|
+
width: m.width,
|
|
23
|
+
height: m.height,
|
|
24
|
+
animation: m.animation,
|
|
25
|
+
sx: m.sx
|
|
23
26
|
}
|
|
24
|
-
)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
), "view")
|
|
28
|
+
};
|
|
29
|
+
c = useComponent(def, params);
|
|
30
|
+
m = c.model;
|
|
31
|
+
return c;
|
|
32
|
+
}, "useSkeleton");
|
|
33
|
+
const Skeleton = toReact(useSkeleton);
|
|
34
|
+
Skeleton.displayName = "Skeleton";
|
|
28
35
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
36
|
+
Skeleton,
|
|
37
|
+
useSkeleton
|
|
31
38
|
};
|
|
32
39
|
//# sourceMappingURL=Skeleton.es.js.map
|
package/dist/Skeleton.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Skeleton.tsx"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"Skeleton.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Skeleton.tsx"],"sourcesContent":["import React from 'react';\nimport { Skeleton as MuiSkeleton, type SkeletonProps as MuiSkeletonProps } 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?: MuiSkeletonProps['variant'];\n width?: number | string;\n height?: number | string;\n animation?: MuiSkeletonProps['animation'];\n sx?: MuiSkeletonProps['sx'];\n };\n }\n>;\n\nexport const useSkeleton = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Skeleton',\n props: {\n variant: 'text',\n width: undefined,\n height: undefined,\n animation: 'pulse',\n sx: undefined,\n },\n view: () => (\n <MuiSkeleton\n variant={m.variant}\n width={m.width}\n height={m.height}\n animation={m.animation}\n sx={m.sx}\n />\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type SkeletonStruct = Struct;\n\nexport const Skeleton = toReact(useSkeleton);\nSkeleton.displayName = 'Skeleton';\n"],"names":["MuiSkeleton"],"mappings":";;;;;AAyBO,MAAM,cAAc,wBAAC,WAAuD;AAC/E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,SAAS;AAAA,MACT,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,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,QAAQ,EAAE;AAAA,QACV,WAAW,EAAE;AAAA,QACb,IAAI,EAAE;AAAA,MAAA;AAAA,IAAA,GANR;AAAA,EAOF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA3B2B;AA+BpB,MAAM,WAAW,QAAQ,WAAW;AAC3C,SAAS,cAAc;"}
|
package/dist/Slider.es.js
CHANGED
|
@@ -1,46 +1,53 @@
|
|
|
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 { Slider as Slider$1 } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const useSlider = /* @__PURE__ */ __name((params) => {
|
|
7
|
+
let c;
|
|
8
|
+
let m;
|
|
9
|
+
const def = {
|
|
7
10
|
regType: "Slider",
|
|
8
11
|
props: {
|
|
9
12
|
value: 0,
|
|
10
|
-
onChange: () => {
|
|
11
|
-
},
|
|
13
|
+
onChange: /* @__PURE__ */ __name(() => {
|
|
14
|
+
}, "onChange"),
|
|
12
15
|
min: 0,
|
|
13
16
|
max: 100,
|
|
14
17
|
step: 1,
|
|
15
|
-
marks:
|
|
18
|
+
marks: false,
|
|
16
19
|
color: "primary",
|
|
17
20
|
size: "medium",
|
|
18
21
|
valueLabelDisplay: "auto",
|
|
19
22
|
track: "normal",
|
|
20
23
|
sx: void 0
|
|
21
24
|
},
|
|
22
|
-
view: () => /* @__PURE__ */
|
|
23
|
-
|
|
25
|
+
view: /* @__PURE__ */ __name(() => /* @__PURE__ */ React.createElement(
|
|
26
|
+
Slider$1,
|
|
24
27
|
{
|
|
25
|
-
value:
|
|
26
|
-
onChange: (
|
|
27
|
-
min:
|
|
28
|
-
max:
|
|
29
|
-
step:
|
|
30
|
-
marks:
|
|
31
|
-
color:
|
|
32
|
-
size:
|
|
33
|
-
valueLabelDisplay:
|
|
34
|
-
track:
|
|
35
|
-
disabled:
|
|
36
|
-
sx:
|
|
28
|
+
value: m.value,
|
|
29
|
+
onChange: /* @__PURE__ */ __name((_, newValue) => m.onChange(newValue), "onChange"),
|
|
30
|
+
min: m.min,
|
|
31
|
+
max: m.max,
|
|
32
|
+
step: m.step,
|
|
33
|
+
marks: m.marks,
|
|
34
|
+
color: m.color,
|
|
35
|
+
size: m.size,
|
|
36
|
+
valueLabelDisplay: m.valueLabelDisplay,
|
|
37
|
+
track: m.track,
|
|
38
|
+
disabled: m.$.isDisabled,
|
|
39
|
+
sx: m.sx
|
|
37
40
|
}
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
), "view")
|
|
42
|
+
};
|
|
43
|
+
c = useComponent(def, params);
|
|
44
|
+
m = c.model;
|
|
45
|
+
return c;
|
|
46
|
+
}, "useSlider");
|
|
47
|
+
const Slider = toReact(useSlider);
|
|
48
|
+
Slider.displayName = "Slider";
|
|
42
49
|
export {
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
Slider,
|
|
51
|
+
useSlider
|
|
45
52
|
};
|
|
46
53
|
//# sourceMappingURL=Slider.es.js.map
|
package/dist/Slider.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Slider.tsx"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"Slider.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Slider.tsx"],"sourcesContent":["import React from 'react';\nimport { Slider as MuiSlider, type SliderProps as MuiSliderProps } 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: number;\n onChange: (value: number) => void;\n min?: number;\n max?: number;\n step?: number;\n marks?: boolean;\n color?: MuiSliderProps['color'];\n size?: MuiSliderProps['size'];\n valueLabelDisplay?: MuiSliderProps['valueLabelDisplay'];\n track?: MuiSliderProps['track'];\n sx?: MuiSliderProps['sx'];\n };\n }\n>;\n\nexport const useSlider = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Slider',\n props: {\n value: 0,\n onChange: () => {},\n min: 0,\n max: 100,\n step: 1,\n marks: false,\n color: 'primary',\n size: 'medium',\n valueLabelDisplay: 'auto',\n track: 'normal',\n sx: undefined,\n },\n view: () => (\n <MuiSlider\n value={m.value}\n onChange={(_, newValue) => m.onChange(newValue as number)}\n min={m.min}\n max={m.max}\n step={m.step}\n marks={m.marks}\n color={m.color}\n size={m.size}\n valueLabelDisplay={m.valueLabelDisplay}\n track={m.track}\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 SliderStruct = Struct;\n\nexport const Slider = toReact(useSlider);\nSlider.displayName = 'Slider';\n"],"names":["MuiSlider"],"mappings":";;;;;AA+BO,MAAM,YAAY,wBAAC,WAAuD;AAC7E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,OAAO;AAAA,MACP,UAAU,6BAAM;AAAA,MAAC,GAAP;AAAA,MACV,KAAK;AAAA,MACL,KAAK;AAAA,MACL,MAAM;AAAA,MACN,OAAO;AAAA,MACP,OAAO;AAAA,MACP,MAAM;AAAA,MACN,mBAAmB;AAAA,MACnB,OAAO;AAAA,MACP,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,OAAO,EAAE;AAAA,QACT,UAAU,wBAAC,GAAG,aAAa,EAAE,SAAS,QAAkB,GAA9C;AAAA,QACV,KAAK,EAAE;AAAA,QACP,KAAK,EAAE;AAAA,QACP,MAAM,EAAE;AAAA,QACR,OAAO,EAAE;AAAA,QACT,OAAO,EAAE;AAAA,QACT,MAAM,EAAE;AAAA,QACR,mBAAmB,EAAE;AAAA,QACrB,OAAO,EAAE;AAAA,QACT,UAAU,EAAE,EAAE;AAAA,QACd,IAAI,EAAE;AAAA,MAAA;AAAA,IAAA,GAbR;AAAA,EAcF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAxCyB;AA4ClB,MAAM,SAAS,QAAQ,SAAS;AACvC,OAAO,cAAc;"}
|
package/dist/Snackbar.es.js
CHANGED
|
@@ -1,37 +1,44 @@
|
|
|
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 { Snackbar as Snackbar$1 } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const useSnackbar = /* @__PURE__ */ __name((params) => {
|
|
7
|
+
let c;
|
|
8
|
+
let m;
|
|
9
|
+
const def = {
|
|
7
10
|
regType: "Snackbar",
|
|
8
11
|
props: {
|
|
9
|
-
open:
|
|
10
|
-
onClose: () => {
|
|
11
|
-
},
|
|
12
|
+
open: false,
|
|
13
|
+
onClose: /* @__PURE__ */ __name(() => {
|
|
14
|
+
}, "onClose"),
|
|
12
15
|
message: "",
|
|
13
16
|
autoHideDuration: 4e3,
|
|
14
17
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
15
18
|
action: void 0,
|
|
16
19
|
sx: void 0
|
|
17
20
|
},
|
|
18
|
-
view: () => /* @__PURE__ */
|
|
19
|
-
|
|
21
|
+
view: /* @__PURE__ */ __name(() => /* @__PURE__ */ React.createElement(
|
|
22
|
+
Snackbar$1,
|
|
20
23
|
{
|
|
21
|
-
open:
|
|
22
|
-
onClose:
|
|
23
|
-
message:
|
|
24
|
-
autoHideDuration:
|
|
25
|
-
anchorOrigin:
|
|
26
|
-
action:
|
|
27
|
-
sx:
|
|
24
|
+
open: m.open,
|
|
25
|
+
onClose: m.onClose,
|
|
26
|
+
message: m.message,
|
|
27
|
+
autoHideDuration: m.autoHideDuration,
|
|
28
|
+
anchorOrigin: m.anchorOrigin,
|
|
29
|
+
action: m.action,
|
|
30
|
+
sx: m.sx
|
|
28
31
|
}
|
|
29
|
-
)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
), "view")
|
|
33
|
+
};
|
|
34
|
+
c = useComponent(def, params);
|
|
35
|
+
m = c.model;
|
|
36
|
+
return c;
|
|
37
|
+
}, "useSnackbar");
|
|
38
|
+
const Snackbar = toReact(useSnackbar);
|
|
39
|
+
Snackbar.displayName = "Snackbar";
|
|
33
40
|
export {
|
|
34
|
-
|
|
35
|
-
|
|
41
|
+
Snackbar,
|
|
42
|
+
useSnackbar
|
|
36
43
|
};
|
|
37
44
|
//# sourceMappingURL=Snackbar.es.js.map
|
package/dist/Snackbar.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Snackbar.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Snackbar.tsx"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"Snackbar.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Snackbar.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Snackbar as MuiSnackbar,\n type SnackbarProps as MuiSnackbarProps,\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 message: string;\n autoHideDuration?: number | null;\n anchorOrigin?: MuiSnackbarProps['anchorOrigin'];\n action?: React.ReactNode;\n sx?: MuiSnackbarProps['sx'];\n };\n }\n>;\n\nexport const useSnackbar = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Snackbar',\n props: {\n open: false,\n onClose: () => {},\n message: '',\n autoHideDuration: 4000,\n anchorOrigin: { vertical: 'bottom', horizontal: 'left' },\n action: undefined,\n sx: undefined,\n },\n view: () => (\n <MuiSnackbar\n open={m.open}\n onClose={m.onClose}\n message={m.message}\n autoHideDuration={m.autoHideDuration}\n anchorOrigin={m.anchorOrigin}\n action={m.action}\n sx={m.sx}\n />\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type SnackbarStruct = Struct;\n\nexport const Snackbar = toReact(useSnackbar);\nSnackbar.displayName = 'Snackbar';\n"],"names":["MuiSnackbar"],"mappings":";;;;;AA8BO,MAAM,cAAc,wBAAC,WAAuD;AAC/E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,MAAM;AAAA,MACN,SAAS,6BAAM;AAAA,MAAC,GAAP;AAAA,MACT,SAAS;AAAA,MACT,kBAAkB;AAAA,MAClB,cAAc,EAAE,UAAU,UAAU,YAAY,OAAA;AAAA,MAChD,QAAQ;AAAA,MACR,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,MAAM,EAAE;AAAA,QACR,SAAS,EAAE;AAAA,QACX,SAAS,EAAE;AAAA,QACX,kBAAkB,EAAE;AAAA,QACpB,cAAc,EAAE;AAAA,QAChB,QAAQ,EAAE;AAAA,QACV,IAAI,EAAE;AAAA,MAAA;AAAA,IAAA,GARR;AAAA,EASF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA/B2B;AAmCpB,MAAM,WAAW,QAAQ,WAAW;AAC3C,SAAS,cAAc;"}
|
package/dist/SpeedDial.es.js
CHANGED
|
@@ -1,42 +1,49 @@
|
|
|
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 { SpeedDial as SpeedDial$1, SpeedDialIcon, SpeedDialAction } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const useSpeedDial = /* @__PURE__ */ __name((params) => {
|
|
7
|
+
let c;
|
|
8
|
+
let m;
|
|
9
|
+
const def = {
|
|
7
10
|
regType: "SpeedDial",
|
|
8
11
|
props: {
|
|
9
12
|
ariaLabel: "",
|
|
10
13
|
actions: [],
|
|
11
14
|
icon: void 0,
|
|
12
15
|
direction: "up",
|
|
13
|
-
hidden:
|
|
16
|
+
hidden: false,
|
|
14
17
|
sx: void 0
|
|
15
18
|
},
|
|
16
|
-
view: () => /* @__PURE__ */
|
|
17
|
-
|
|
19
|
+
view: /* @__PURE__ */ __name(() => /* @__PURE__ */ React.createElement(
|
|
20
|
+
SpeedDial$1,
|
|
18
21
|
{
|
|
19
|
-
ariaLabel:
|
|
20
|
-
icon:
|
|
21
|
-
direction:
|
|
22
|
-
hidden:
|
|
23
|
-
sx:
|
|
22
|
+
ariaLabel: m.ariaLabel,
|
|
23
|
+
icon: m.icon ? /* @__PURE__ */ React.createElement(m.icon, null) : /* @__PURE__ */ React.createElement(SpeedDialIcon, null),
|
|
24
|
+
direction: m.direction,
|
|
25
|
+
hidden: m.hidden,
|
|
26
|
+
sx: m.sx
|
|
24
27
|
},
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
m.actions.map((action) => /* @__PURE__ */ React.createElement(
|
|
29
|
+
SpeedDialAction,
|
|
27
30
|
{
|
|
28
|
-
key:
|
|
29
|
-
icon: /* @__PURE__ */
|
|
30
|
-
title:
|
|
31
|
-
onClick:
|
|
31
|
+
key: action.name,
|
|
32
|
+
icon: /* @__PURE__ */ React.createElement(action.icon, null),
|
|
33
|
+
title: action.name,
|
|
34
|
+
onClick: action.onClick
|
|
32
35
|
}
|
|
33
36
|
))
|
|
34
|
-
)
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
m
|
|
37
|
+
), "view")
|
|
38
|
+
};
|
|
39
|
+
c = useComponent(def, params);
|
|
40
|
+
m = c.model;
|
|
41
|
+
return c;
|
|
42
|
+
}, "useSpeedDial");
|
|
43
|
+
const SpeedDial = toReact(useSpeedDial);
|
|
44
|
+
SpeedDial.displayName = "SpeedDial";
|
|
38
45
|
export {
|
|
39
|
-
|
|
40
|
-
|
|
46
|
+
SpeedDial,
|
|
47
|
+
useSpeedDial
|
|
41
48
|
};
|
|
42
49
|
//# sourceMappingURL=SpeedDial.es.js.map
|
package/dist/SpeedDial.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpeedDial.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/SpeedDial.tsx"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"SpeedDial.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/SpeedDial.tsx"],"sourcesContent":["import React from 'react';\nimport {\n SpeedDial as MuiSpeedDial,\n SpeedDialAction,\n SpeedDialIcon,\n type SpeedDialProps as MuiSpeedDialProps,\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 SpeedDialActionDef = {\n name: string;\n icon: React.FC;\n onClick?: () => void;\n};\n\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n ariaLabel: string;\n actions: SpeedDialActionDef[];\n icon?: React.FC;\n direction?: MuiSpeedDialProps['direction'];\n hidden?: boolean;\n sx?: MuiSpeedDialProps['sx'];\n };\n }\n>;\n\nexport const useSpeedDial = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'SpeedDial',\n props: {\n ariaLabel: '',\n actions: [],\n icon: undefined,\n direction: 'up',\n hidden: false,\n sx: undefined,\n },\n view: () => (\n <MuiSpeedDial\n ariaLabel={m.ariaLabel}\n icon={m.icon ? <m.icon /> : <SpeedDialIcon />}\n direction={m.direction}\n hidden={m.hidden}\n sx={m.sx}\n >\n {m.actions.map((action) => (\n <SpeedDialAction\n key={action.name}\n icon={<action.icon />}\n title={action.name}\n onClick={action.onClick}\n />\n ))}\n </MuiSpeedDial>\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type SpeedDialStruct = Struct;\n\nexport const SpeedDial = toReact(useSpeedDial);\nSpeedDial.displayName = 'SpeedDial';\n"],"names":["MuiSpeedDial"],"mappings":";;;;;AAqCO,MAAM,eAAe,wBAAC,WAAuD;AAChF,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,WAAW;AAAA,MACX,SAAS,CAAA;AAAA,MACT,MAAM;AAAA,MACN,WAAW;AAAA,MACX,QAAQ;AAAA,MACR,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,WAAW,EAAE;AAAA,QACb,MAAM,EAAE,OAAO,sBAAA,cAAC,EAAE,MAAF,IAAO,IAAK,sBAAA,cAAC,eAAA,IAAc;AAAA,QAC3C,WAAW,EAAE;AAAA,QACb,QAAQ,EAAE;AAAA,QACV,IAAI,EAAE;AAAA,MAAA;AAAA,MAEL,EAAE,QAAQ,IAAI,CAAC,WACZ,sBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,KAAK,OAAO;AAAA,UACZ,MAAM,sBAAA,cAAC,OAAO,MAAP,IAAY;AAAA,UACnB,OAAO,OAAO;AAAA,UACd,SAAS,OAAO;AAAA,QAAA;AAAA,MAAA,CAEvB;AAAA,IAAA,GAfH;AAAA,EAgBF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GArC4B;AAyCrB,MAAM,YAAY,QAAQ,YAAY;AAC7C,UAAU,cAAc;"}
|
package/dist/Stepper.es.js
CHANGED
|
@@ -1,40 +1,47 @@
|
|
|
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 { Stepper as Stepper$1, Step, StepLabel, Typography } from "@mui/material";
|
|
5
|
+
import { toReact, useComponent } from "@actdim/dynstruct/componentModel/react/hooks";
|
|
6
|
+
const useStepper = /* @__PURE__ */ __name((params) => {
|
|
7
|
+
let c;
|
|
8
|
+
let m;
|
|
9
|
+
const def = {
|
|
7
10
|
regType: "Stepper",
|
|
8
11
|
props: {
|
|
9
12
|
activeStep: 0,
|
|
10
13
|
steps: [],
|
|
11
14
|
orientation: "horizontal",
|
|
12
|
-
alternativeLabel:
|
|
13
|
-
nonLinear:
|
|
15
|
+
alternativeLabel: false,
|
|
16
|
+
nonLinear: false,
|
|
14
17
|
sx: void 0
|
|
15
18
|
},
|
|
16
|
-
view: () => /* @__PURE__ */
|
|
17
|
-
|
|
19
|
+
view: /* @__PURE__ */ __name(() => /* @__PURE__ */ React.createElement(
|
|
20
|
+
Stepper$1,
|
|
18
21
|
{
|
|
19
|
-
activeStep:
|
|
20
|
-
orientation:
|
|
21
|
-
alternativeLabel:
|
|
22
|
-
nonLinear:
|
|
23
|
-
sx:
|
|
22
|
+
activeStep: m.activeStep,
|
|
23
|
+
orientation: m.orientation,
|
|
24
|
+
alternativeLabel: m.alternativeLabel,
|
|
25
|
+
nonLinear: m.nonLinear,
|
|
26
|
+
sx: m.sx
|
|
24
27
|
},
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
m.steps.map((step, i) => /* @__PURE__ */ React.createElement(Step, { key: i }, /* @__PURE__ */ React.createElement(
|
|
29
|
+
StepLabel,
|
|
27
30
|
{
|
|
28
|
-
optional:
|
|
31
|
+
optional: step.optional ? /* @__PURE__ */ React.createElement(Typography, { variant: "caption" }, step.optional) : void 0
|
|
29
32
|
},
|
|
30
|
-
|
|
33
|
+
step.label
|
|
31
34
|
)))
|
|
32
|
-
)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
), "view")
|
|
36
|
+
};
|
|
37
|
+
c = useComponent(def, params);
|
|
38
|
+
m = c.model;
|
|
39
|
+
return c;
|
|
40
|
+
}, "useStepper");
|
|
41
|
+
const Stepper = toReact(useStepper);
|
|
42
|
+
Stepper.displayName = "Stepper";
|
|
36
43
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
Stepper,
|
|
45
|
+
useStepper
|
|
39
46
|
};
|
|
40
47
|
//# sourceMappingURL=Stepper.es.js.map
|
package/dist/Stepper.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Stepper.tsx"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"Stepper.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Stepper.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Stepper as MuiStepper,\n Step,\n StepLabel,\n Typography,\n type StepperProps as MuiStepperProps,\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 StepDef = {\n label: string;\n optional?: string;\n};\n\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n activeStep: number;\n steps: StepDef[];\n orientation?: MuiStepperProps['orientation'];\n alternativeLabel?: boolean;\n nonLinear?: boolean;\n sx?: MuiStepperProps['sx'];\n };\n }\n>;\n\nexport const useStepper = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Stepper',\n props: {\n activeStep: 0,\n steps: [],\n orientation: 'horizontal',\n alternativeLabel: false,\n nonLinear: false,\n sx: undefined,\n },\n view: () => (\n <MuiStepper\n activeStep={m.activeStep}\n orientation={m.orientation}\n alternativeLabel={m.alternativeLabel}\n nonLinear={m.nonLinear}\n sx={m.sx}\n >\n {m.steps.map((step, i) => (\n <Step key={i}>\n <StepLabel\n optional={\n step.optional ? (\n <Typography variant=\"caption\">{step.optional}</Typography>\n ) : undefined\n }\n >\n {step.label}\n </StepLabel>\n </Step>\n ))}\n </MuiStepper>\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type StepperStruct = Struct;\n\nexport const Stepper = toReact(useStepper);\nStepper.displayName = 'Stepper';\n"],"names":["MuiStepper"],"mappings":";;;;;AAqCO,MAAM,aAAa,wBAAC,WAAuD;AAC9E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,YAAY;AAAA,MACZ,OAAO,CAAA;AAAA,MACP,aAAa;AAAA,MACb,kBAAkB;AAAA,MAClB,WAAW;AAAA,MACX,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,YAAY,EAAE;AAAA,QACd,aAAa,EAAE;AAAA,QACf,kBAAkB,EAAE;AAAA,QACpB,WAAW,EAAE;AAAA,QACb,IAAI,EAAE;AAAA,MAAA;AAAA,MAEL,EAAE,MAAM,IAAI,CAAC,MAAM,MAChB,sBAAA,cAAC,MAAA,EAAK,KAAK,EAAA,GACP,sBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,UACI,KAAK,WACD,sBAAA,cAAC,cAAW,SAAQ,UAAA,GAAW,KAAK,QAAS,IAC7C;AAAA,QAAA;AAAA,QAGP,KAAK;AAAA,MAAA,CAEd,CACH;AAAA,IAAA,GApBH;AAAA,EAqBF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA1C0B;AA8CnB,MAAM,UAAU,QAAQ,UAAU;AACzC,QAAQ,cAAc;"}
|