@dartcom/ui-kit 10.2.4 → 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.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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAwCzC,CAAC;AAEF,eAAe,UAAU,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,6 +12003,30 @@ const Button = (props) => {
|
|
|
12003
12003
|
}, loading: loading, loadingPosition: "start", variant: variant, ...restProps, children: children }));
|
|
12004
12004
|
};
|
|
12005
12005
|
|
|
12006
|
+
const icons = {
|
|
12007
|
+
reset: RestartAltIcon,
|
|
12008
|
+
edit: EditIcon,
|
|
12009
|
+
move: MovingIcon,
|
|
12010
|
+
save: SaveIcon,
|
|
12011
|
+
delete: DeleteIcon,
|
|
12012
|
+
};
|
|
12013
|
+
|
|
12014
|
+
const IconButton = ({ title, iconProps, ...props }) => {
|
|
12015
|
+
const buttonId = React__namespace.useId();
|
|
12016
|
+
const Icon = icons[iconProps.name];
|
|
12017
|
+
const iconColor = iconProps.color ?? 'primary';
|
|
12018
|
+
if (title) {
|
|
12019
|
+
return (jsxRuntime.jsx(material.Tooltip, { title: title, children: jsxRuntime.jsx(material.IconButton, { id: buttonId, ...props, onClick: (event) => {
|
|
12020
|
+
event.stopPropagation();
|
|
12021
|
+
props.onClick?.(event);
|
|
12022
|
+
}, children: jsxRuntime.jsx(Icon, { fontSize: "medium", color: iconColor }) }) }));
|
|
12023
|
+
}
|
|
12024
|
+
return (jsxRuntime.jsx(material.IconButton, { id: buttonId, ...props, onClick: (event) => {
|
|
12025
|
+
event.stopPropagation();
|
|
12026
|
+
props.onClick?.(event);
|
|
12027
|
+
}, children: jsxRuntime.jsx(Icon, { fontSize: "medium", color: iconColor }) }));
|
|
12028
|
+
};
|
|
12029
|
+
|
|
12006
12030
|
const Transition = React__namespace.forwardRef(function Transition(props, ref) {
|
|
12007
12031
|
return jsxRuntime.jsx(material.Slide, { direction: "up", ref: ref, ...props });
|
|
12008
12032
|
});
|
|
@@ -12015,13 +12039,13 @@ const DeleteButton = ({ notification, onDelete, }) => {
|
|
|
12015
12039
|
const handleCloseNotification = () => {
|
|
12016
12040
|
setOpenNotification(false);
|
|
12017
12041
|
};
|
|
12018
|
-
return (jsxRuntime.jsxs(React__namespace.Fragment, { children: [notification ? (jsxRuntime.jsx(material.Tooltip, { title: notification.title, children: jsxRuntime.jsx(
|
|
12019
|
-
|
|
12020
|
-
|
|
12021
|
-
},
|
|
12022
|
-
|
|
12023
|
-
|
|
12024
|
-
},
|
|
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: {
|
|
12025
12049
|
transition: Transition,
|
|
12026
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: {
|
|
12027
12051
|
textTransform: 'none',
|
|
@@ -12033,29 +12057,6 @@ const DeleteButton = ({ notification, onDelete, }) => {
|
|
|
12033
12057
|
}, children: "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C" })] })] })) : null] }));
|
|
12034
12058
|
};
|
|
12035
12059
|
|
|
12036
|
-
const icons = {
|
|
12037
|
-
reset: RestartAltIcon,
|
|
12038
|
-
edit: EditIcon,
|
|
12039
|
-
move: MovingIcon,
|
|
12040
|
-
save: SaveIcon,
|
|
12041
|
-
};
|
|
12042
|
-
|
|
12043
|
-
const IconButton = ({ title, iconProps, ...props }) => {
|
|
12044
|
-
const buttonId = React__namespace.useId();
|
|
12045
|
-
const Icon = icons[iconProps.name];
|
|
12046
|
-
const iconColor = iconProps.color ?? 'primary';
|
|
12047
|
-
if (title) {
|
|
12048
|
-
return (jsxRuntime.jsx(material.Tooltip, { title: title, children: jsxRuntime.jsx(material.IconButton, { id: buttonId, ...props, onClick: (event) => {
|
|
12049
|
-
event.stopPropagation();
|
|
12050
|
-
props.onClick?.(event);
|
|
12051
|
-
}, children: jsxRuntime.jsx(Icon, { fontSize: "medium", color: iconColor }) }) }));
|
|
12052
|
-
}
|
|
12053
|
-
return (jsxRuntime.jsx(material.IconButton, { id: buttonId, onClick: (event) => {
|
|
12054
|
-
event.stopPropagation();
|
|
12055
|
-
props.onClick?.(event);
|
|
12056
|
-
}, children: jsxRuntime.jsx(Icon, { fontSize: "medium", color: iconColor }) }));
|
|
12057
|
-
};
|
|
12058
|
-
|
|
12059
12060
|
const VisuallyHiddenInput = material.styled('input')({
|
|
12060
12061
|
clip: 'rect(0 0 0 0)',
|
|
12061
12062
|
clipPath: 'inset(50%)',
|