@arkyn/components 3.0.1-beta.94 → 3.0.1-beta.99

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.
Files changed (30) hide show
  1. package/README.md +6 -236
  2. package/dist/bundle.js +180 -174
  3. package/dist/bundle.umd.cjs +5 -5
  4. package/dist/components/alert/alertContainer/index.d.ts +46 -26
  5. package/dist/components/alert/alertContainer/index.d.ts.map +1 -1
  6. package/dist/components/alert/alertContainer/index.js +42 -25
  7. package/dist/components/alert/alertContent/index.d.ts +34 -30
  8. package/dist/components/alert/alertContent/index.d.ts.map +1 -1
  9. package/dist/components/alert/alertContent/index.js +27 -28
  10. package/dist/components/alert/alertDescription/index.d.ts +36 -34
  11. package/dist/components/alert/alertDescription/index.d.ts.map +1 -1
  12. package/dist/components/alert/alertDescription/index.js +29 -32
  13. package/dist/components/alert/alertIcon/index.d.ts +36 -34
  14. package/dist/components/alert/alertIcon/index.d.ts.map +1 -1
  15. package/dist/components/alert/alertIcon/index.js +28 -33
  16. package/dist/components/alert/alertTitle/index.d.ts +31 -29
  17. package/dist/components/alert/alertTitle/index.d.ts.map +1 -1
  18. package/dist/components/alert/alertTitle/index.js +21 -27
  19. package/dist/components/audioPlayer/index.d.ts +33 -34
  20. package/dist/components/audioPlayer/index.d.ts.map +1 -1
  21. package/dist/components/audioPlayer/index.js +17 -32
  22. package/dist/components/richText/index.d.ts +1 -1
  23. package/dist/components/richText/index.d.ts.map +1 -1
  24. package/dist/components/richText/index.js +3 -3
  25. package/dist/components/searchPlaces.d.ts.map +1 -1
  26. package/dist/components/searchPlaces.js +1 -1
  27. package/dist/providers/placesProvider.d.ts.map +1 -1
  28. package/dist/providers/placesProvider.js +6 -1
  29. package/dist/style.css +1 -1
  30. package/package.json +1 -1
@@ -1,44 +1,64 @@
1
- import { HTMLAttributes } from "react";
1
+ import { HTMLAttributes, JSX } from "react";
2
2
  import "./styles.css";
3
+ /**
4
+ * @typedef {Object} AlertContainerProps
5
+ * @property {"success" | "danger" | "warning" | "info"} schema - The visual style schema for the alert (success: green, danger: red, warning: yellow, info: blue)
6
+ * @property {ReactNode} children - The content to be displayed inside the alert container
7
+ * @property {string} [className] - Optional additional CSS classes to apply to the container
8
+ * @extends {HTMLAttributes<HTMLDivElement>}
9
+ */
3
10
  type AlertContainerProps = {
4
11
  schema: "success" | "danger" | "warning" | "info";
5
12
  } & HTMLAttributes<HTMLDivElement>;
13
+ /**
14
+ * Custom hook to access the AlertContainer context
15
+ *
16
+ * @returns {AlertContainerProps} The current alert container properties including schema and HTML attributes
17
+ *
18
+ * @example
19
+ * function CustomAlertContent() {
20
+ * const { schema } = useAlertContainer();
21
+ * return <div>Current schema: {schema}</div>;
22
+ * }
23
+ */
6
24
  declare function useAlertContainer(): AlertContainerProps;
7
25
  /**
8
- * AlertContainer component - used to display alert messages with different schemas
26
+ * AlertContainer - A flexible alert component that displays messages with different visual styles
9
27
  *
10
- * @param props - AlertContainer component properties
11
- * @param props.schema - Alert color scheme and semantic meaning: "success" | "danger" | "warning" | "info"
28
+ * This component automatically adjusts its layout based on whether an AlertTitle component
29
+ * is present among its children. When AlertTitle is detected, the content is left-aligned;
30
+ * otherwise, it's centered.
12
31
  *
13
- * **...Other valid HTML properties for div**
32
+ * @component
33
+ * @memberof Alert
14
34
  *
15
- * @returns AlertContainer JSX element with context provider
35
+ * @param {AlertContainerProps} props - Component properties
36
+ * @param {"success" | "danger" | "warning" | "info"} props.schema - Determines the visual styling and semantic meaning of the alert
37
+ * @param {ReactNode} props.children - Content to be rendered inside the alert, can include AlertTitle and other components
38
+ * @param {string} [props.className] - Additional CSS classes to customize the alert appearance
16
39
  *
17
- * @example
18
- * ```tsx
19
- * // Basic alert
20
- * <AlertContainer schema="info">
21
- * Alert message content
22
- * </AlertContainer>
40
+ * @returns {JSX.Element} A styled alert container with context provider for child components
23
41
  *
24
- * // Success alert
25
- * <AlertContainer schema="success">
26
- * Operation completed successfully!
27
- * </AlertContainer>
42
+ * @requires react - For createContext, useContext, ReactNode
28
43
  *
29
- * // Alert with title
30
- * <AlertContainer schema="warning">
31
- * <AlertTitle>Warning</AlertTitle>
32
- * Please check your input data.
44
+ * @example
45
+ * // Basic usage
46
+ * <AlertContainer schema="success">
47
+ * {children}
33
48
  * </AlertContainer>
34
49
  *
35
- * // Danger alert
36
- * <AlertContainer schema="danger">
37
- * <AlertTitle>Error</AlertTitle>
38
- * Something went wrong. Please try again.
50
+ * @example
51
+ * // Complete alert example
52
+ * <AlertContainer schema="success">
53
+ * <AlertIcon />
54
+ * <AlertContent>
55
+ * <AlertTitle>Success!</AlertTitle>
56
+ * <AlertDescription>
57
+ * You are premium user now!
58
+ * </AlertDescription>
59
+ * </AlertContent>
39
60
  * </AlertContainer>
40
- * ```
41
61
  */
42
- declare function AlertContainer(props: AlertContainerProps): import("react/jsx-runtime").JSX.Element;
62
+ declare function AlertContainer(props: AlertContainerProps): JSX.Element;
43
63
  export { AlertContainer, useAlertContainer };
44
64
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/alert/alertContainer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAyB,MAAM,OAAO,CAAC;AAE7E,OAAO,cAAc,CAAC;AAEtB,KAAK,mBAAmB,GAAG;IACzB,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;CACnD,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAInC,iBAAS,iBAAiB,wBAEzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,iBAAS,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAuCjD;AAED,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/alert/alertContainer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EACd,GAAG,EAGJ,MAAM,OAAO,CAAC;AAEf,OAAO,cAAc,CAAC;AAEtB;;;;;;GAMG;AACH,KAAK,mBAAmB,GAAG;IACzB,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;CACnD,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAQnC;;;;;;;;;;GAUG;AACH,iBAAS,iBAAiB,IAAI,mBAAmB,CAEhD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,iBAAS,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAuC/D;AAED,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC"}
@@ -1,45 +1,62 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { createContext, useContext } from "react";
2
+ import { createContext, useContext, } from "react";
3
3
  import { AlertTitle } from "../alertTitle";
4
4
  import "./styles.css";
5
+ /**
6
+ * Context for sharing alert container properties with child components
7
+ * @internal
8
+ */
5
9
  const AlertContainerContext = createContext({});
10
+ /**
11
+ * Custom hook to access the AlertContainer context
12
+ *
13
+ * @returns {AlertContainerProps} The current alert container properties including schema and HTML attributes
14
+ *
15
+ * @example
16
+ * function CustomAlertContent() {
17
+ * const { schema } = useAlertContainer();
18
+ * return <div>Current schema: {schema}</div>;
19
+ * }
20
+ */
6
21
  function useAlertContainer() {
7
22
  return useContext(AlertContainerContext);
8
23
  }
9
24
  /**
10
- * AlertContainer component - used to display alert messages with different schemas
25
+ * AlertContainer - A flexible alert component that displays messages with different visual styles
11
26
  *
12
- * @param props - AlertContainer component properties
13
- * @param props.schema - Alert color scheme and semantic meaning: "success" | "danger" | "warning" | "info"
27
+ * This component automatically adjusts its layout based on whether an AlertTitle component
28
+ * is present among its children. When AlertTitle is detected, the content is left-aligned;
29
+ * otherwise, it's centered.
14
30
  *
15
- * **...Other valid HTML properties for div**
31
+ * @component
32
+ * @memberof Alert
16
33
  *
17
- * @returns AlertContainer JSX element with context provider
34
+ * @param {AlertContainerProps} props - Component properties
35
+ * @param {"success" | "danger" | "warning" | "info"} props.schema - Determines the visual styling and semantic meaning of the alert
36
+ * @param {ReactNode} props.children - Content to be rendered inside the alert, can include AlertTitle and other components
37
+ * @param {string} [props.className] - Additional CSS classes to customize the alert appearance
18
38
  *
19
- * @example
20
- * ```tsx
21
- * // Basic alert
22
- * <AlertContainer schema="info">
23
- * Alert message content
24
- * </AlertContainer>
39
+ * @returns {JSX.Element} A styled alert container with context provider for child components
25
40
  *
26
- * // Success alert
27
- * <AlertContainer schema="success">
28
- * Operation completed successfully!
29
- * </AlertContainer>
41
+ * @requires react - For createContext, useContext, ReactNode
30
42
  *
31
- * // Alert with title
32
- * <AlertContainer schema="warning">
33
- * <AlertTitle>Warning</AlertTitle>
34
- * Please check your input data.
43
+ * @example
44
+ * // Basic usage
45
+ * <AlertContainer schema="success">
46
+ * {children}
35
47
  * </AlertContainer>
36
48
  *
37
- * // Danger alert
38
- * <AlertContainer schema="danger">
39
- * <AlertTitle>Error</AlertTitle>
40
- * Something went wrong. Please try again.
49
+ * @example
50
+ * // Complete alert example
51
+ * <AlertContainer schema="success">
52
+ * <AlertIcon />
53
+ * <AlertContent>
54
+ * <AlertTitle>Success!</AlertTitle>
55
+ * <AlertDescription>
56
+ * You are premium user now!
57
+ * </AlertDescription>
58
+ * </AlertContent>
41
59
  * </AlertContainer>
42
- * ```
43
60
  */
44
61
  function AlertContainer(props) {
45
62
  const { schema, children, className: baseClassName, ...rest } = props;
@@ -1,45 +1,49 @@
1
- import { HTMLAttributes } from "react";
1
+ import { HTMLAttributes, JSX } from "react";
2
2
  import "./styles.css";
3
+ /**
4
+ * @typedef {Object} AlertContentProps
5
+ * @extends {HTMLAttributes<HTMLDivElement>}
6
+ * @description Props for the AlertContent component, extending standard HTML div attributes.
7
+ */
3
8
  type AlertContentProps = HTMLAttributes<HTMLDivElement>;
4
9
  /**
5
- * AlertContent component - used to wrap and style the main content area of alerts
10
+ * AlertContent component that renders the main content area of an alert.
6
11
  *
7
- * @param props - AlertContent component properties
12
+ * @component
13
+ * @memberof Alert
8
14
  *
9
- * **...Other valid HTML properties for div**
15
+ * @description
16
+ * This component serves as a container for the main content within an Alert component.
17
+ * Supports all standard HTML div attributes for maximum flexibility.
10
18
  *
11
- * @returns AlertContent JSX element
19
+ * @param {AlertContentProps} props - Component props extending HTMLDivElement attributes
20
+ * @param {string} [props.className] - Additional CSS classes to apply to the content container
21
+ * @param {React.ReactNode} [props.children] - Content to be displayed inside the alert
12
22
  *
13
- * @example
14
- * ```tsx
15
- * // Basic alert content
16
- * <AlertContainer schema="info">
17
- * <AlertContent>
18
- * This is the main alert message content.
19
- * </AlertContent>
20
- * </AlertContainer>
23
+ * @returns {JSX.Element} A div element with the alert content styling
21
24
  *
22
- * // Alert with title and content
25
+ * @requires react
26
+ *
27
+ * @example
28
+ * // Basic usage
23
29
  * <AlertContainer schema="success">
24
- * <AlertContent>
25
- * <AlertTitle>Success</AlertTitle>
26
- * Your operation has been completed successfully.
27
- * </AlertContent>
30
+ * <AlertContent>
31
+ * {children}
32
+ * </AlertContent>
28
33
  * </AlertContainer>
29
34
  *
30
- * // Multiple content sections
31
- * <AlertContainer schema="warning">
32
- * <AlertContent>
33
- * <AlertTitle>Warning</AlertTitle>
34
- * <p>Please review the following items:</p>
35
- * <ul>
36
- * <li>Check your input data</li>
37
- * <li>Verify permissions</li>
38
- * </ul>
39
- * </AlertContent>
35
+ * @example
36
+ * // Complete alert example
37
+ * <AlertContainer schema="success">
38
+ * <AlertIcon />
39
+ * <AlertContent>
40
+ * <AlertTitle>Success!</AlertTitle>
41
+ * <AlertDescription>
42
+ * You are premium user now!
43
+ * </AlertDescription>
44
+ * </AlertContent>
40
45
  * </AlertContainer>
41
- * ```
42
46
  */
43
- declare function AlertContent(props: AlertContentProps): import("react/jsx-runtime").JSX.Element;
47
+ declare function AlertContent(props: AlertContentProps): JSX.Element;
44
48
  export { AlertContent };
45
49
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/alert/alertContent/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,cAAc,CAAC;AAEtB,KAAK,iBAAiB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAK7C;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/alert/alertContent/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,cAAc,CAAC;AAEtB;;;;GAIG;AACH,KAAK,iBAAiB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAK3D;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -1,43 +1,42 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "./styles.css";
3
3
  /**
4
- * AlertContent component - used to wrap and style the main content area of alerts
4
+ * AlertContent component that renders the main content area of an alert.
5
5
  *
6
- * @param props - AlertContent component properties
6
+ * @component
7
+ * @memberof Alert
7
8
  *
8
- * **...Other valid HTML properties for div**
9
+ * @description
10
+ * This component serves as a container for the main content within an Alert component.
11
+ * Supports all standard HTML div attributes for maximum flexibility.
9
12
  *
10
- * @returns AlertContent JSX element
13
+ * @param {AlertContentProps} props - Component props extending HTMLDivElement attributes
14
+ * @param {string} [props.className] - Additional CSS classes to apply to the content container
15
+ * @param {React.ReactNode} [props.children] - Content to be displayed inside the alert
11
16
  *
12
- * @example
13
- * ```tsx
14
- * // Basic alert content
15
- * <AlertContainer schema="info">
16
- * <AlertContent>
17
- * This is the main alert message content.
18
- * </AlertContent>
19
- * </AlertContainer>
17
+ * @returns {JSX.Element} A div element with the alert content styling
18
+ *
19
+ * @requires react
20
20
  *
21
- * // Alert with title and content
21
+ * @example
22
+ * // Basic usage
22
23
  * <AlertContainer schema="success">
23
- * <AlertContent>
24
- * <AlertTitle>Success</AlertTitle>
25
- * Your operation has been completed successfully.
26
- * </AlertContent>
24
+ * <AlertContent>
25
+ * {children}
26
+ * </AlertContent>
27
27
  * </AlertContainer>
28
28
  *
29
- * // Multiple content sections
30
- * <AlertContainer schema="warning">
31
- * <AlertContent>
32
- * <AlertTitle>Warning</AlertTitle>
33
- * <p>Please review the following items:</p>
34
- * <ul>
35
- * <li>Check your input data</li>
36
- * <li>Verify permissions</li>
37
- * </ul>
38
- * </AlertContent>
29
+ * @example
30
+ * // Complete alert example
31
+ * <AlertContainer schema="success">
32
+ * <AlertIcon />
33
+ * <AlertContent>
34
+ * <AlertTitle>Success!</AlertTitle>
35
+ * <AlertDescription>
36
+ * You are premium user now!
37
+ * </AlertDescription>
38
+ * </AlertContent>
39
39
  * </AlertContainer>
40
- * ```
41
40
  */
42
41
  function AlertContent(props) {
43
42
  const { className: baseClassName, ...rest } = props;
@@ -1,49 +1,51 @@
1
- import { HTMLAttributes } from "react";
1
+ import { HTMLAttributes, JSX } from "react";
2
2
  import "./styles.css";
3
+ /**
4
+ * Props for the AlertDescription component.
5
+ * @typedef {Object} AlertDescriptionProps
6
+ * @extends {HTMLAttributes<HTMLDivElement>}
7
+ */
3
8
  type AlertDescriptionProps = HTMLAttributes<HTMLDivElement>;
4
9
  /**
5
- * AlertDescription component - used to display additional descriptive text in alerts
10
+ * AlertDescription component displays descriptive text content within an Alert component.
6
11
  *
7
- * @param props - AlertDescription component properties
12
+ * This component provides a semantic wrapper for alert descriptions with appropriate styling
13
+ * through the `arkynAlertDescription` CSS class. It extends all standard HTML div attributes,
14
+ * making it flexible for various content and accessibility requirements.
8
15
  *
9
- * **...Other valid HTML properties for div**
16
+ * @component
17
+ * @memberof Alert
10
18
  *
11
- * @returns AlertDescription JSX element
19
+ * @param {AlertDescriptionProps} props - Component props extending HTML div attributes
20
+ * @param {string} [props.className] - Additional CSS classes to apply to the description
21
+ * @param {React.ReactNode} [props.children] - The description content to display
12
22
  *
13
- * @example
14
- * ```tsx
15
- * // Basic alert with description
16
- * <AlertContainer schema="info">
17
- * <AlertContent>
18
- * <AlertTitle>Information</AlertTitle>
19
- * <AlertDescription>
20
- * This is additional information to help you understand the context.
21
- * </AlertDescription>
22
- * </AlertContent>
23
- * </AlertContainer>
23
+ * @returns {JSX.Element} A div element with alert description styling
24
24
  *
25
- * // Success alert with description
25
+ * @requires react
26
+ *
27
+ * @example
28
+ * // Basic usage
26
29
  * <AlertContainer schema="success">
27
- * <AlertContent>
28
- * <AlertTitle>Upload Complete</AlertTitle>
29
- * <AlertDescription>
30
- * Your file has been successfully uploaded and processed.
31
- * </AlertDescription>
32
- * </AlertContent>
30
+ * <AlertContent>
31
+ * <AlertDescription>
32
+ * Your are premium user now!
33
+ * </AlertDescription>
34
+ * </AlertContent>
33
35
  * </AlertContainer>
34
36
  *
35
- * // Warning with detailed description
36
- * <AlertContainer schema="warning">
37
- * <AlertContent>
38
- * <AlertTitle>Storage Limit</AlertTitle>
39
- * <AlertDescription>
40
- * You have used 90% of your storage quota. Consider upgrading your plan
41
- * or removing unused files.
42
- * </AlertDescription>
43
- * </AlertContent>
37
+ * @example
38
+ * // Complete alert example
39
+ * <AlertContainer schema="success">
40
+ * <AlertIcon />
41
+ * <AlertContent>
42
+ * <AlertTitle>Success!</AlertTitle>
43
+ * <AlertDescription>
44
+ * You are premium user now!
45
+ * </AlertDescription>
46
+ * </AlertContent>
44
47
  * </AlertContainer>
45
- * ```
46
48
  */
47
- declare function AlertDescription(props: AlertDescriptionProps): import("react/jsx-runtime").JSX.Element;
49
+ declare function AlertDescription(props: AlertDescriptionProps): JSX.Element;
48
50
  export { AlertDescription };
49
51
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/alert/alertDescription/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,cAAc,CAAC;AAEtB,KAAK,qBAAqB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,iBAAS,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CAKrD;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/alert/alertDescription/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,cAAc,CAAC;AAEtB;;;;GAIG;AACH,KAAK,qBAAqB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,iBAAS,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,GAAG,CAAC,OAAO,CAKnE;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1,47 +1,44 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "./styles.css";
3
3
  /**
4
- * AlertDescription component - used to display additional descriptive text in alerts
4
+ * AlertDescription component displays descriptive text content within an Alert component.
5
5
  *
6
- * @param props - AlertDescription component properties
6
+ * This component provides a semantic wrapper for alert descriptions with appropriate styling
7
+ * through the `arkynAlertDescription` CSS class. It extends all standard HTML div attributes,
8
+ * making it flexible for various content and accessibility requirements.
7
9
  *
8
- * **...Other valid HTML properties for div**
10
+ * @component
11
+ * @memberof Alert
9
12
  *
10
- * @returns AlertDescription JSX element
13
+ * @param {AlertDescriptionProps} props - Component props extending HTML div attributes
14
+ * @param {string} [props.className] - Additional CSS classes to apply to the description
15
+ * @param {React.ReactNode} [props.children] - The description content to display
11
16
  *
12
- * @example
13
- * ```tsx
14
- * // Basic alert with description
15
- * <AlertContainer schema="info">
16
- * <AlertContent>
17
- * <AlertTitle>Information</AlertTitle>
18
- * <AlertDescription>
19
- * This is additional information to help you understand the context.
20
- * </AlertDescription>
21
- * </AlertContent>
22
- * </AlertContainer>
17
+ * @returns {JSX.Element} A div element with alert description styling
18
+ *
19
+ * @requires react
23
20
  *
24
- * // Success alert with description
21
+ * @example
22
+ * // Basic usage
25
23
  * <AlertContainer schema="success">
26
- * <AlertContent>
27
- * <AlertTitle>Upload Complete</AlertTitle>
28
- * <AlertDescription>
29
- * Your file has been successfully uploaded and processed.
30
- * </AlertDescription>
31
- * </AlertContent>
24
+ * <AlertContent>
25
+ * <AlertDescription>
26
+ * Your are premium user now!
27
+ * </AlertDescription>
28
+ * </AlertContent>
32
29
  * </AlertContainer>
33
30
  *
34
- * // Warning with detailed description
35
- * <AlertContainer schema="warning">
36
- * <AlertContent>
37
- * <AlertTitle>Storage Limit</AlertTitle>
38
- * <AlertDescription>
39
- * You have used 90% of your storage quota. Consider upgrading your plan
40
- * or removing unused files.
41
- * </AlertDescription>
42
- * </AlertContent>
31
+ * @example
32
+ * // Complete alert example
33
+ * <AlertContainer schema="success">
34
+ * <AlertIcon />
35
+ * <AlertContent>
36
+ * <AlertTitle>Success!</AlertTitle>
37
+ * <AlertDescription>
38
+ * You are premium user now!
39
+ * </AlertDescription>
40
+ * </AlertContent>
43
41
  * </AlertContainer>
44
- * ```
45
42
  */
46
43
  function AlertDescription(props) {
47
44
  const { className: baseClassName, ...rest } = props;
@@ -1,52 +1,54 @@
1
1
  import { LucideProps } from "lucide-react";
2
+ import { JSX } from "react";
2
3
  import "./styles.css";
3
- type AlertIconProps = LucideProps;
4
4
  /**
5
- * AlertIcon component - automatically displays the appropriate icon based on the alert schema
6
- *
7
- * @param props - AlertIcon component properties
5
+ * Props for the AlertIcon component.
6
+ * Extends all props from Lucide's icon components.
8
7
  *
9
- * **...Other valid Lucide icon properties**
8
+ * @typedef {LucideProps} AlertIconProps
9
+ */
10
+ type AlertIconProps = LucideProps;
11
+ /**
12
+ * AlertIcon component that renders different icons based on the alert schema.
10
13
  *
11
- * @returns AlertIcon JSX element with schema-specific icon
14
+ * @component
15
+ * @memberof Alert
12
16
  *
13
17
  * @description
14
18
  * This component automatically selects and renders the appropriate icon based on the
15
- * AlertContainer's schema context:
16
- * - success: CheckCircle2 icon
17
- * - danger: XCircle icon
18
- * - warning: AlertTriangle icon
19
- * - info: Info icon
19
+ * alert schema from the AlertContainer context. It supports four schemas:
20
+ * - success: Renders a CheckCircle2 icon
21
+ * - danger: Renders an XCircle icon
22
+ * - warning: Renders an AlertTriangle icon
23
+ * - info: Renders an Info icon
24
+ *
25
+ * @param {AlertIconProps} props - Component props extending LucideProps
26
+ * @param {string} [props.className] - Additional CSS class names to apply to the icon
27
+ *
28
+ * @returns {JSX.Element} The rendered icon component based on the alert schema
29
+ *
30
+ * @requires lucide-react - For icon components (CheckCircle2, XCircle, AlertTriangle, Info)
31
+ * @requires useAlertContainer - Hook to access the alert schema from context
20
32
  *
21
33
  * @example
22
- * ```tsx
23
- * // Basic usage - icon automatically matches container schema
34
+ * // This component is used internally within an Alert component
35
+ * // and should not be used standalone as it depends on AlertContainer context
24
36
  * <AlertContainer schema="success">
25
37
  * <AlertIcon />
26
- * <AlertContent>
27
- * <AlertTitle>Success</AlertTitle>
28
- * <AlertDescription>Operation completed successfully.</AlertDescription>
29
- * </AlertContent>
30
- * </AlertContainer>
31
- *
32
- * // Warning alert with icon
33
- * <AlertContainer schema="warning">
34
- * <AlertIcon />
35
- * <AlertContent>
36
- * Please review your input before proceeding.
37
- * </AlertContent>
38
38
  * </AlertContainer>
39
39
  *
40
- * // Custom icon size
41
- * <AlertContainer schema="danger">
42
- * <AlertIcon size={24} />
43
- * <AlertContent>
44
- * <AlertTitle>Error</AlertTitle>
45
- * <AlertDescription>Something went wrong.</AlertDescription>
46
- * </AlertContent>
40
+ * @example
41
+ * // Complete alert example
42
+ * <AlertContainer schema="success">
43
+ * <AlertIcon />
44
+ * <AlertContent>
45
+ * <AlertTitle>Success!</AlertTitle>
46
+ * <AlertDescription>
47
+ * You are premium user now!
48
+ * </AlertDescription>
49
+ * </AlertContent>
47
50
  * </AlertContainer>
48
- * ```
49
51
  */
50
- declare function AlertIcon(props: AlertIconProps): import("react/jsx-runtime").JSX.Element;
52
+ declare function AlertIcon(props: AlertIconProps): JSX.Element;
51
53
  export { AlertIcon };
52
54
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/alert/alertIcon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,WAAW,EAEZ,MAAM,cAAc,CAAC;AAGtB,OAAO,cAAc,CAAC;AAEtB,KAAK,cAAc,GAAG,WAAW,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,iBAAS,SAAS,CAAC,KAAK,EAAE,cAAc,2CAgBvC;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/alert/alertIcon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,WAAW,EAEZ,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,cAAc,CAAC;AAEtB;;;;;GAKG;AACH,KAAK,cAAc,GAAG,WAAW,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,iBAAS,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CAgBrD;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}