@dartcom/ui-kit 10.2.11 → 10.2.12
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/__test__/types.d.ts +4 -0
- package/dist/__test__/types.d.ts.map +1 -0
- package/dist/components/buttons/delete/button.spec.d.ts +2 -0
- package/dist/components/buttons/delete/button.spec.d.ts.map +1 -0
- package/dist/components/buttons/delete/delete.d.ts.map +1 -1
- package/dist/components/buttons/delete/delete.stories.d.ts +2 -0
- package/dist/components/buttons/delete/delete.stories.d.ts.map +1 -1
- package/dist/components/buttons/delete/types.d.ts +3 -1
- package/dist/components/buttons/delete/types.d.ts.map +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/__test__/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.spec.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/button.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -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,CA4F7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -4,5 +4,7 @@ declare const meta: Meta<typeof DeleteButton>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
6
|
export declare const Primary: Story;
|
|
7
|
+
export declare const Disabled: Story;
|
|
7
8
|
export declare const WithNotification: Story;
|
|
9
|
+
export declare const DisabledWithNotification: Story;
|
|
8
10
|
//# sourceMappingURL=delete.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/delete.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/delete.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC;AAEjC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAK5D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAcnC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAgBrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAS9B,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAUtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG;IAC7C,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,YAAY,CAAC,EAAE;QACb,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -14803,7 +14803,7 @@ const IconButton = ({ title, iconProps, ...props }) => {
|
|
|
14803
14803
|
const Transition = React__namespace.forwardRef(function Transition(props, ref) {
|
|
14804
14804
|
return jsxRuntime.jsx(material.Slide, { direction: "up", ref: ref, ...props });
|
|
14805
14805
|
});
|
|
14806
|
-
const DeleteButton = ({ notification, onDelete, }) => {
|
|
14806
|
+
const DeleteButton = ({ notification, onDelete, disabled = false, ...props }) => {
|
|
14807
14807
|
const id = React__namespace.useId();
|
|
14808
14808
|
const [openNotification, setOpenNotification] = React__namespace.useState(false);
|
|
14809
14809
|
const handleOpenNotification = () => {
|
|
@@ -14812,13 +14812,13 @@ const DeleteButton = ({ notification, onDelete, }) => {
|
|
|
14812
14812
|
const handleCloseNotification = () => {
|
|
14813
14813
|
setOpenNotification(false);
|
|
14814
14814
|
};
|
|
14815
|
-
|
|
14816
|
-
|
|
14817
|
-
|
|
14818
|
-
|
|
14819
|
-
|
|
14820
|
-
|
|
14821
|
-
|
|
14815
|
+
const iconProps = React__namespace.useMemo(() => {
|
|
14816
|
+
return {
|
|
14817
|
+
name: 'delete',
|
|
14818
|
+
color: disabled ? 'disabled' : 'error',
|
|
14819
|
+
};
|
|
14820
|
+
}, [disabled]);
|
|
14821
|
+
return (jsxRuntime.jsxs(React__namespace.Fragment, { children: [notification ? (jsxRuntime.jsx(material.Tooltip, { title: notification.title, children: jsxRuntime.jsx(IconButton, { ...props, iconProps: iconProps, onClick: handleOpenNotification, disabled: disabled }) })) : (jsxRuntime.jsx(IconButton, { ...props, iconProps: iconProps, onClick: onDelete, disabled: disabled })), notification ? (jsxRuntime.jsxs(material.Dialog, { slots: {
|
|
14822
14822
|
transition: Transition,
|
|
14823
14823
|
}, 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: {
|
|
14824
14824
|
textTransform: 'none',
|