@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.
- package/README.md +6 -236
- package/dist/bundle.js +180 -174
- package/dist/bundle.umd.cjs +5 -5
- package/dist/components/alert/alertContainer/index.d.ts +46 -26
- package/dist/components/alert/alertContainer/index.d.ts.map +1 -1
- package/dist/components/alert/alertContainer/index.js +42 -25
- package/dist/components/alert/alertContent/index.d.ts +34 -30
- package/dist/components/alert/alertContent/index.d.ts.map +1 -1
- package/dist/components/alert/alertContent/index.js +27 -28
- package/dist/components/alert/alertDescription/index.d.ts +36 -34
- package/dist/components/alert/alertDescription/index.d.ts.map +1 -1
- package/dist/components/alert/alertDescription/index.js +29 -32
- package/dist/components/alert/alertIcon/index.d.ts +36 -34
- package/dist/components/alert/alertIcon/index.d.ts.map +1 -1
- package/dist/components/alert/alertIcon/index.js +28 -33
- package/dist/components/alert/alertTitle/index.d.ts +31 -29
- package/dist/components/alert/alertTitle/index.d.ts.map +1 -1
- package/dist/components/alert/alertTitle/index.js +21 -27
- package/dist/components/audioPlayer/index.d.ts +33 -34
- package/dist/components/audioPlayer/index.d.ts.map +1 -1
- package/dist/components/audioPlayer/index.js +17 -32
- package/dist/components/richText/index.d.ts +1 -1
- package/dist/components/richText/index.d.ts.map +1 -1
- package/dist/components/richText/index.js +3 -3
- package/dist/components/searchPlaces.d.ts.map +1 -1
- package/dist/components/searchPlaces.js +1 -1
- package/dist/providers/placesProvider.d.ts.map +1 -1
- package/dist/providers/placesProvider.js +6 -1
- package/dist/style.css +1 -1
- 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
|
|
26
|
+
* AlertContainer - A flexible alert component that displays messages with different visual styles
|
|
9
27
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
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
|
-
*
|
|
32
|
+
* @component
|
|
33
|
+
* @memberof Alert
|
|
14
34
|
*
|
|
15
|
-
* @
|
|
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
|
-
* @
|
|
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
|
-
*
|
|
25
|
-
* <AlertContainer schema="success">
|
|
26
|
-
* Operation completed successfully!
|
|
27
|
-
* </AlertContainer>
|
|
42
|
+
* @requires react - For createContext, useContext, ReactNode
|
|
28
43
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
44
|
+
* @example
|
|
45
|
+
* // Basic usage
|
|
46
|
+
* <AlertContainer schema="success">
|
|
47
|
+
* {children}
|
|
33
48
|
* </AlertContainer>
|
|
34
49
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
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):
|
|
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,
|
|
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
|
|
25
|
+
* AlertContainer - A flexible alert component that displays messages with different visual styles
|
|
11
26
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
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
|
-
*
|
|
31
|
+
* @component
|
|
32
|
+
* @memberof Alert
|
|
16
33
|
*
|
|
17
|
-
* @
|
|
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
|
-
* @
|
|
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
|
-
*
|
|
27
|
-
* <AlertContainer schema="success">
|
|
28
|
-
* Operation completed successfully!
|
|
29
|
-
* </AlertContainer>
|
|
41
|
+
* @requires react - For createContext, useContext, ReactNode
|
|
30
42
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
43
|
+
* @example
|
|
44
|
+
* // Basic usage
|
|
45
|
+
* <AlertContainer schema="success">
|
|
46
|
+
* {children}
|
|
35
47
|
* </AlertContainer>
|
|
36
48
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
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
|
|
10
|
+
* AlertContent component that renders the main content area of an alert.
|
|
6
11
|
*
|
|
7
|
-
* @
|
|
12
|
+
* @component
|
|
13
|
+
* @memberof Alert
|
|
8
14
|
*
|
|
9
|
-
*
|
|
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
|
-
* @
|
|
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
|
-
* @
|
|
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
|
-
*
|
|
25
|
+
* @requires react
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* // Basic usage
|
|
23
29
|
* <AlertContainer schema="success">
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* </AlertContent>
|
|
30
|
+
* <AlertContent>
|
|
31
|
+
* {children}
|
|
32
|
+
* </AlertContent>
|
|
28
33
|
* </AlertContainer>
|
|
29
34
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
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):
|
|
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;
|
|
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
|
|
4
|
+
* AlertContent component that renders the main content area of an alert.
|
|
5
5
|
*
|
|
6
|
-
* @
|
|
6
|
+
* @component
|
|
7
|
+
* @memberof Alert
|
|
7
8
|
*
|
|
8
|
-
*
|
|
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
|
-
* @
|
|
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
|
-
* @
|
|
13
|
-
*
|
|
14
|
-
*
|
|
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
|
-
*
|
|
21
|
+
* @example
|
|
22
|
+
* // Basic usage
|
|
22
23
|
* <AlertContainer schema="success">
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* </AlertContent>
|
|
24
|
+
* <AlertContent>
|
|
25
|
+
* {children}
|
|
26
|
+
* </AlertContent>
|
|
27
27
|
* </AlertContainer>
|
|
28
28
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
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
|
|
10
|
+
* AlertDescription component displays descriptive text content within an Alert component.
|
|
6
11
|
*
|
|
7
|
-
*
|
|
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
|
-
*
|
|
16
|
+
* @component
|
|
17
|
+
* @memberof Alert
|
|
10
18
|
*
|
|
11
|
-
* @
|
|
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
|
-
* @
|
|
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
|
-
*
|
|
25
|
+
* @requires react
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* // Basic usage
|
|
26
29
|
* <AlertContainer schema="success">
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* </AlertContent>
|
|
30
|
+
* <AlertContent>
|
|
31
|
+
* <AlertDescription>
|
|
32
|
+
* Your are premium user now!
|
|
33
|
+
* </AlertDescription>
|
|
34
|
+
* </AlertContent>
|
|
33
35
|
* </AlertContainer>
|
|
34
36
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
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):
|
|
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;
|
|
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
|
|
4
|
+
* AlertDescription component displays descriptive text content within an Alert component.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
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
|
-
*
|
|
10
|
+
* @component
|
|
11
|
+
* @memberof Alert
|
|
9
12
|
*
|
|
10
|
-
* @
|
|
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
|
-
* @
|
|
13
|
-
*
|
|
14
|
-
*
|
|
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
|
-
*
|
|
21
|
+
* @example
|
|
22
|
+
* // Basic usage
|
|
25
23
|
* <AlertContainer schema="success">
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* </AlertContent>
|
|
24
|
+
* <AlertContent>
|
|
25
|
+
* <AlertDescription>
|
|
26
|
+
* Your are premium user now!
|
|
27
|
+
* </AlertDescription>
|
|
28
|
+
* </AlertContent>
|
|
32
29
|
* </AlertContainer>
|
|
33
30
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
* @
|
|
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
|
-
*
|
|
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
|
-
*
|
|
23
|
-
* //
|
|
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
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
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):
|
|
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;
|
|
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"}
|