@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.
@@ -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;;AAiF3C,wBAAqC"}
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 Base: Story;
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":"AAMA,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,eAAe,IAAI,CAAC"}
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
- buttonsText?: {
10
- agree?: string;
11
- disagree?: string;
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,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH,CAAC"}
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', buttonsText, }) => {
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.jsx(material.DialogContent, { children: jsxRuntime.jsx(material.DialogContentText, { id: descriptionId, children: description }) }), jsxRuntime.jsx(material.Divider, {}), jsxRuntime.jsxs(material.DialogActions, { children: [jsxRuntime.jsx(Button, { color: "error", onClick: handleClose, children: buttonsText?.disagree ?? 'Закрыть' }), jsxRuntime.jsx(Button, { color: "success", onClick: () => {
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: buttonsText?.agree ?? 'Подтвердить' })] })] }));
14886
+ }, disabled: agreeButton?.disabled, children: agreeButton?.text ?? 'Подтвердить' })] })] }));
14884
14887
  };
14885
14888
  var alertDialog = observer(AlertDialog);
14886
14889