dgz-ui-shared 1.1.27 → 1.1.28

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.
@@ -2,28 +2,40 @@ import type { ReactNode } from 'react';
2
2
  import type { DialogProps } from '@radix-ui/react-dialog';
3
3
  /**
4
4
  * Props for the MyModal component.
5
+ * Extends Radix UI's DialogProps.
6
+ *
7
+ * @typedef {Object} MyModalProps
8
+ * @property {ReactNode} [header] - The content to be displayed in the modal header.
9
+ * @property {ReactNode} [trigger] - The element that triggers the modal when clicked.
10
+ * @property {ReactNode} [children] - The main content of the modal.
11
+ * @property {ReactNode} [footer] - The content to be displayed in the modal footer.
12
+ * @property {string} [className] - Additional CSS classes for the modal content.
13
+ * @property {'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | 'full'} [size='lg'] - The maximum width size of the modal.
5
14
  */
6
15
  export type MyModalProps = DialogProps & {
7
- /** Header content. */
8
16
  header?: ReactNode;
9
- /** Optional trigger element. */
10
17
  trigger?: ReactNode;
11
- /** Modal content. */
12
18
  children?: ReactNode;
13
- /** Footer content. */
14
19
  footer?: ReactNode;
15
- /** Custom CSS class name. */
16
20
  className?: string;
17
- /** Content max width size. */
18
21
  size?: 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | 'full';
19
22
  };
20
23
  /**
21
- * MyModal is a convenience wrapper around Dialog with a header, content and optional footer.
24
+ * A reusable modal component that wraps the Dialog component from dgz-ui.
25
+ * It provides a structured layout with a header, scrollable content area, and optional footer.
26
+ *
27
+ * @component
28
+ * @param {MyModalProps} props - The props for the MyModal component.
29
+ * @returns {JSX.Element} The rendered MyModal component.
22
30
  *
23
- * @param props.header - Header content.
24
- * @param props.trigger - Optional trigger element.
25
- * @param props.footer - Footer content.
26
- * @param props.size - Content max width size.
31
+ * @example
32
+ * <MyModal
33
+ * header="User Settings"
34
+ * trigger={<button>Open Settings</button>}
35
+ * footer={<button onClick={save}>Save</button>}
36
+ * >
37
+ * <p>Settings content goes here...</p>
38
+ * </MyModal>
27
39
  */
28
40
  export declare const MyModal: ({ header, footer, trigger, children, size, className, ...props }: MyModalProps) => import("react/jsx-runtime").JSX.Element;
29
41
  //# sourceMappingURL=MyModal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MyModal.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/MyModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG;IACvC,sBAAsB;IACtB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,gCAAgC;IAChC,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,sBAAsB;IACtB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8BAA8B;IAC9B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;CAC7E,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO,GAAI,kEAQrB,YAAY,4CA2Bd,CAAC"}
1
+ {"version":3,"file":"MyModal.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/MyModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG;IACvC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;CAC7E,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,OAAO,GAAI,kEAQrB,YAAY,4CA2Bd,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dgz-ui-shared",
3
- "version": "1.1.27",
3
+ "version": "1.1.28",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"