@dartcom/ui-kit 10.2.8 → 10.2.9
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/alert-dialog/alert-dialog.d.ts.map +1 -1
- package/dist/components/alert-dialog/alert-dialog.stories.d.ts +5 -1
- package/dist/components/alert-dialog/alert-dialog.stories.d.ts.map +1 -1
- package/dist/components/alert-dialog/types.d.ts +8 -3
- package/dist/components/alert-dialog/types.d.ts.map +1 -1
- package/dist/index.cjs +6 -3
- 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 +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/alert-dialog/alert-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;;
|
|
1
|
+
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/alert-dialog/alert-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;;AAqG3C,wBAAqC"}
|
|
@@ -3,7 +3,11 @@ import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
|
3
3
|
type FormType = typeof AlertDialog;
|
|
4
4
|
declare const meta: Meta<FormType>;
|
|
5
5
|
type Story = StoryObj<FormType>;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const Info: Story;
|
|
7
7
|
export declare const Delete: Story;
|
|
8
|
+
export declare const Warning: Story;
|
|
9
|
+
export declare const WithContent: Story;
|
|
10
|
+
export declare const DisabledAgreeButton: Story;
|
|
11
|
+
export declare const DisabledDisagreeButton: Story;
|
|
8
12
|
export default meta;
|
|
9
13
|
//# sourceMappingURL=alert-dialog.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-dialog.stories.d.ts","sourceRoot":"","sources":["../../../src/components/alert-dialog/alert-dialog.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"alert-dialog.stories.d.ts","sourceRoot":"","sources":["../../../src/components/alert-dialog/alert-dialog.stories.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC;AAEhC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,KAAK,QAAQ,GAAG,OAAO,WAAW,CAAC;AAInC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,QAAQ,CAgCxB,CAAC;AAEF,KAAK,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAEhC,eAAO,MAAM,IAAI,EAAE,KAAU,CAAC;AAE9B,eAAO,MAAM,MAAM,EAAE,KAIpB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAUzB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAMjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAMpC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -6,9 +6,14 @@ export type AlertDialogProps = {
|
|
|
6
6
|
onSuccess: () => void;
|
|
7
7
|
onOpen?: () => void;
|
|
8
8
|
onClose?: () => void;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
content?: React.JSX.Element;
|
|
10
|
+
agreeButton?: {
|
|
11
|
+
text?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
disagreeButton?: {
|
|
15
|
+
text?: string;
|
|
16
|
+
disabled?: boolean;
|
|
12
17
|
};
|
|
13
18
|
};
|
|
14
19
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/alert-dialog/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IAEpB,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAErC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,WAAW,CAAC,EAAE;QACZ,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/alert-dialog/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IAEpB,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAErC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IAE5B,WAAW,CAAC,EAAE;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC;IAEF,cAAc,CAAC,EAAE;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC;CACH,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -14854,7 +14854,7 @@ const UploadButton = ({ children, accept, onFilesLoad, ...props }) => {
|
|
|
14854
14854
|
}, multiple: true })] }));
|
|
14855
14855
|
};
|
|
14856
14856
|
|
|
14857
|
-
const AlertDialog = ({ name, title, description, onSuccess, onOpen, onClose, theme = 'info',
|
|
14857
|
+
const AlertDialog = ({ name, title, description, onSuccess, onOpen, onClose, theme = 'info', agreeButton, disagreeButton, content, }) => {
|
|
14858
14858
|
const dialogId = React__namespace.useId();
|
|
14859
14859
|
const titleId = React__namespace.useId();
|
|
14860
14860
|
const descriptionId = React__namespace.useId();
|
|
@@ -14877,10 +14877,13 @@ const AlertDialog = ({ name, title, description, onSuccess, onOpen, onClose, the
|
|
|
14877
14877
|
background,
|
|
14878
14878
|
color,
|
|
14879
14879
|
};
|
|
14880
|
-
}, children: title }), jsxRuntime.jsx(material.Divider, {}), jsxRuntime.
|
|
14880
|
+
}, children: title }), jsxRuntime.jsx(material.Divider, {}), jsxRuntime.jsxs(material.DialogContent, { sx: ({ spacing }) => ({
|
|
14881
|
+
display: 'grid',
|
|
14882
|
+
gap: spacing(2),
|
|
14883
|
+
}), children: [jsxRuntime.jsx(material.DialogContentText, { id: descriptionId, children: description }), content ? (jsxRuntime.jsxs(React__namespace.Fragment, { children: [jsxRuntime.jsx(material.Divider, {}), content] })) : null] }), jsxRuntime.jsx(material.Divider, {}), jsxRuntime.jsxs(material.DialogActions, { children: [jsxRuntime.jsx(Button, { color: "error", onClick: handleClose, disabled: disagreeButton?.disabled, children: disagreeButton?.text ?? 'Закрыть' }), jsxRuntime.jsx(Button, { color: "success", onClick: () => {
|
|
14881
14884
|
onSuccess();
|
|
14882
14885
|
handleClose();
|
|
14883
|
-
}, children:
|
|
14886
|
+
}, disabled: agreeButton?.disabled, children: agreeButton?.text ?? 'Подтвердить' })] })] }));
|
|
14884
14887
|
};
|
|
14885
14888
|
var alertDialog = observer(AlertDialog);
|
|
14886
14889
|
|