@dartcom/ui-kit 10.2.5 → 10.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/buttons/delete/delete.d.ts.map +1 -1
- package/dist/components/buttons/delete/delete.stories.d.ts.map +1 -1
- package/dist/components/buttons/icon/constants.d.ts +3 -0
- package/dist/components/buttons/icon/constants.d.ts.map +1 -1
- package/dist/components/buttons/icon/icon.stories.d.ts +2 -0
- package/dist/components/buttons/icon/icon.stories.d.ts.map +1 -1
- package/dist/index.cjs +31 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/delete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAW5C,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/delete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAW5C,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAmF7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/delete.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC;AAEjC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,
|
|
1
|
+
{"version":3,"file":"delete.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/delete.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC;AAEjC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CASnC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAS9B,CAAC"}
|
|
@@ -11,5 +11,8 @@ export declare const icons: {
|
|
|
11
11
|
save: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
12
12
|
muiName: string;
|
|
13
13
|
};
|
|
14
|
+
delete: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
15
|
+
muiName: string;
|
|
16
|
+
};
|
|
14
17
|
};
|
|
15
18
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/icon/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/icon/constants.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;CAMjB,CAAC"}
|
|
@@ -11,4 +11,6 @@ export declare const Move: Story;
|
|
|
11
11
|
export declare const MoveWithTitle: Story;
|
|
12
12
|
export declare const Reset: Story;
|
|
13
13
|
export declare const ResetWithTitle: Story;
|
|
14
|
+
export declare const Delete: Story;
|
|
15
|
+
export declare const DeleteWithTitle: Story;
|
|
14
16
|
//# sourceMappingURL=icon.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/icon/icon.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;AAE/B,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,
|
|
1
|
+
{"version":3,"file":"icon.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/icon/icon.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;AAE/B,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CASjC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,IAAI,EAAE,KAMlB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAMlB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAMlB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAQ5B,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAMpB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAQ7B,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -12003,41 +12003,12 @@ const Button = (props) => {
|
|
|
12003
12003
|
}, loading: loading, loadingPosition: "start", variant: variant, ...restProps, children: children }));
|
|
12004
12004
|
};
|
|
12005
12005
|
|
|
12006
|
-
const Transition = React__namespace.forwardRef(function Transition(props, ref) {
|
|
12007
|
-
return jsxRuntime.jsx(material.Slide, { direction: "up", ref: ref, ...props });
|
|
12008
|
-
});
|
|
12009
|
-
const DeleteButton = ({ notification, onDelete, }) => {
|
|
12010
|
-
const id = React__namespace.useId();
|
|
12011
|
-
const [openNotification, setOpenNotification] = React__namespace.useState(false);
|
|
12012
|
-
const handleOpenNotification = () => {
|
|
12013
|
-
setOpenNotification(true);
|
|
12014
|
-
};
|
|
12015
|
-
const handleCloseNotification = () => {
|
|
12016
|
-
setOpenNotification(false);
|
|
12017
|
-
};
|
|
12018
|
-
return (jsxRuntime.jsxs(React__namespace.Fragment, { children: [notification ? (jsxRuntime.jsx(material.Tooltip, { title: notification.title, children: jsxRuntime.jsx(material.IconButton, { onClick: (event) => {
|
|
12019
|
-
event.stopPropagation();
|
|
12020
|
-
handleOpenNotification();
|
|
12021
|
-
}, children: jsxRuntime.jsx(DeleteIcon, { fontSize: "small", color: "error" }) }) })) : (jsxRuntime.jsx(material.IconButton, { onClick: (event) => {
|
|
12022
|
-
event.stopPropagation();
|
|
12023
|
-
onDelete();
|
|
12024
|
-
}, children: jsxRuntime.jsx(DeleteIcon, { fontSize: "small", color: "error" }) })), notification ? (jsxRuntime.jsxs(material.Dialog, { slots: {
|
|
12025
|
-
transition: Transition,
|
|
12026
|
-
}, open: openNotification, onClose: handleCloseNotification, children: [jsxRuntime.jsx(material.DialogTitle, { id: `${id}-dialog-title`, children: notification.title }), jsxRuntime.jsx(material.DialogContent, { children: jsxRuntime.jsx(material.DialogContentText, { id: `${id}-dialog-text`, children: notification.description }) }), jsxRuntime.jsxs(material.DialogActions, { children: [jsxRuntime.jsx(material.Button, { variant: "contained", color: "error", sx: {
|
|
12027
|
-
textTransform: 'none',
|
|
12028
|
-
}, onClick: handleCloseNotification, children: "\u041E\u0442\u043C\u0435\u043D\u0430" }), jsxRuntime.jsx(material.Button, { variant: "contained", sx: {
|
|
12029
|
-
textTransform: 'none',
|
|
12030
|
-
}, onClick: () => {
|
|
12031
|
-
onDelete();
|
|
12032
|
-
handleCloseNotification();
|
|
12033
|
-
}, children: "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C" })] })] })) : null] }));
|
|
12034
|
-
};
|
|
12035
|
-
|
|
12036
12006
|
const icons = {
|
|
12037
12007
|
reset: RestartAltIcon,
|
|
12038
12008
|
edit: EditIcon,
|
|
12039
12009
|
move: MovingIcon,
|
|
12040
12010
|
save: SaveIcon,
|
|
12011
|
+
delete: DeleteIcon,
|
|
12041
12012
|
};
|
|
12042
12013
|
|
|
12043
12014
|
const IconButton = ({ title, iconProps, ...props }) => {
|
|
@@ -12056,6 +12027,36 @@ const IconButton = ({ title, iconProps, ...props }) => {
|
|
|
12056
12027
|
}, children: jsxRuntime.jsx(Icon, { fontSize: "medium", color: iconColor }) }));
|
|
12057
12028
|
};
|
|
12058
12029
|
|
|
12030
|
+
const Transition = React__namespace.forwardRef(function Transition(props, ref) {
|
|
12031
|
+
return jsxRuntime.jsx(material.Slide, { direction: "up", ref: ref, ...props });
|
|
12032
|
+
});
|
|
12033
|
+
const DeleteButton = ({ notification, onDelete, }) => {
|
|
12034
|
+
const id = React__namespace.useId();
|
|
12035
|
+
const [openNotification, setOpenNotification] = React__namespace.useState(false);
|
|
12036
|
+
const handleOpenNotification = () => {
|
|
12037
|
+
setOpenNotification(true);
|
|
12038
|
+
};
|
|
12039
|
+
const handleCloseNotification = () => {
|
|
12040
|
+
setOpenNotification(false);
|
|
12041
|
+
};
|
|
12042
|
+
return (jsxRuntime.jsxs(React__namespace.Fragment, { children: [notification ? (jsxRuntime.jsx(material.Tooltip, { title: notification.title, children: jsxRuntime.jsx(IconButton, { iconProps: {
|
|
12043
|
+
name: 'delete',
|
|
12044
|
+
color: 'error',
|
|
12045
|
+
}, onClick: handleOpenNotification }) })) : (jsxRuntime.jsx(IconButton, { iconProps: {
|
|
12046
|
+
name: 'delete',
|
|
12047
|
+
color: 'error',
|
|
12048
|
+
}, onClick: onDelete })), notification ? (jsxRuntime.jsxs(material.Dialog, { slots: {
|
|
12049
|
+
transition: Transition,
|
|
12050
|
+
}, open: openNotification, onClose: handleCloseNotification, children: [jsxRuntime.jsx(material.DialogTitle, { id: `${id}-dialog-title`, children: notification.title }), jsxRuntime.jsx(material.DialogContent, { children: jsxRuntime.jsx(material.DialogContentText, { id: `${id}-dialog-text`, children: notification.description }) }), jsxRuntime.jsxs(material.DialogActions, { children: [jsxRuntime.jsx(material.Button, { variant: "contained", color: "error", sx: {
|
|
12051
|
+
textTransform: 'none',
|
|
12052
|
+
}, onClick: handleCloseNotification, children: "\u041E\u0442\u043C\u0435\u043D\u0430" }), jsxRuntime.jsx(material.Button, { variant: "contained", sx: {
|
|
12053
|
+
textTransform: 'none',
|
|
12054
|
+
}, onClick: () => {
|
|
12055
|
+
onDelete();
|
|
12056
|
+
handleCloseNotification();
|
|
12057
|
+
}, children: "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C" })] })] })) : null] }));
|
|
12058
|
+
};
|
|
12059
|
+
|
|
12059
12060
|
const VisuallyHiddenInput = material.styled('input')({
|
|
12060
12061
|
clip: 'rect(0 0 0 0)',
|
|
12061
12062
|
clipPath: 'inset(50%)',
|