@arkyn/components 3.0.1-beta.142 → 3.0.1-beta.144
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/bundle.css +1 -1
- package/dist/components/alert/alertContainer/index.d.ts +27 -43
- package/dist/components/alert/alertContainer/index.d.ts.map +1 -1
- package/dist/components/alert/alertContainer/index.js +20 -40
- package/dist/components/alert/alertContent/index.d.ts +11 -36
- package/dist/components/alert/alertContent/index.d.ts.map +1 -1
- package/dist/components/alert/alertContent/index.js +11 -31
- package/dist/components/alert/alertDescription/index.d.ts +10 -38
- package/dist/components/alert/alertDescription/index.d.ts.map +1 -1
- package/dist/components/alert/alertDescription/index.js +10 -33
- package/dist/components/alert/alertIcon/index.d.ts +14 -38
- package/dist/components/alert/alertIcon/index.d.ts.map +1 -1
- package/dist/components/alert/alertIcon/index.js +14 -32
- package/dist/components/alert/alertTitle/index.d.ts +12 -35
- package/dist/components/alert/alertTitle/index.d.ts.map +1 -1
- package/dist/components/alert/alertTitle/index.js +12 -27
- package/dist/components/audioPlayer/index.d.ts +24 -32
- package/dist/components/audioPlayer/index.d.ts.map +1 -1
- package/dist/components/audioPlayer/index.js +15 -18
- package/dist/components/audioUpload/index.d.ts +37 -48
- package/dist/components/audioUpload/index.d.ts.map +1 -1
- package/dist/components/audioUpload/index.js +23 -48
- package/dist/components/badge/index.d.ts +31 -22
- package/dist/components/badge/index.d.ts.map +1 -1
- package/dist/components/badge/index.js +14 -22
- package/dist/components/button/index.d.ts +38 -28
- package/dist/components/button/index.d.ts.map +1 -1
- package/dist/components/button/index.js +18 -28
- package/dist/components/cardTab/cardTabButton/index.d.ts +14 -52
- package/dist/components/cardTab/cardTabButton/index.d.ts.map +1 -1
- package/dist/components/cardTab/cardTabButton/index.js +12 -52
- package/dist/components/cardTab/cardTabContainer/index.d.ts +16 -58
- package/dist/components/cardTab/cardTabContainer/index.d.ts.map +1 -1
- package/dist/components/cardTab/cardTabContainer/index.js +12 -58
- package/dist/components/checkbox/index.d.ts +38 -37
- package/dist/components/checkbox/index.d.ts.map +1 -1
- package/dist/components/checkbox/index.js +21 -37
- package/dist/components/clientOnly.d.ts +13 -66
- package/dist/components/clientOnly.d.ts.map +1 -1
- package/dist/components/clientOnly.js +11 -66
- package/dist/components/currencyInput/index.d.ts +67 -50
- package/dist/components/currencyInput/index.d.ts.map +1 -1
- package/dist/components/currencyInput/index.js +28 -50
- package/dist/components/divider/index.d.ts +12 -25
- package/dist/components/divider/index.d.ts.map +1 -1
- package/dist/components/divider/index.js +8 -25
- package/dist/components/drawer/drawerContainer/index.d.ts +16 -50
- package/dist/components/drawer/drawerContainer/index.d.ts.map +1 -1
- package/dist/components/drawer/drawerContainer/index.js +13 -50
- package/dist/components/drawer/drawerHeader/index.d.ts +9 -33
- package/dist/components/drawer/drawerHeader/index.d.ts.map +1 -1
- package/dist/components/drawer/drawerHeader/index.js +8 -33
- package/dist/components/facebookPixel/index.d.ts +47 -0
- package/dist/components/facebookPixel/index.d.ts.map +1 -1
- package/dist/components/facebookPixel/index.js +35 -0
- package/dist/components/fieldError/index.d.ts +4 -11
- package/dist/components/fieldError/index.d.ts.map +1 -1
- package/dist/components/fieldError/index.js +4 -11
- package/dist/components/fieldLabel/index.d.ts +6 -21
- package/dist/components/fieldLabel/index.d.ts.map +1 -1
- package/dist/components/fieldLabel/index.js +5 -21
- package/dist/components/fieldWrapper/index.d.ts +12 -22
- package/dist/components/fieldWrapper/index.d.ts.map +1 -1
- package/dist/components/fieldWrapper/index.js +7 -22
- package/dist/components/fileUpload/index.d.ts +36 -61
- package/dist/components/fileUpload/index.d.ts.map +1 -1
- package/dist/components/fileUpload/index.js +23 -61
- package/dist/components/googleAnalytics/index.d.ts +11 -7
- package/dist/components/googleAnalytics/index.d.ts.map +1 -1
- package/dist/components/googleAnalytics/index.js +9 -7
- package/dist/components/googleTagManager/index.d.ts +27 -21
- package/dist/components/googleTagManager/index.d.ts.map +1 -1
- package/dist/components/googleTagManager/index.js +20 -21
- package/dist/components/iconButton/index.d.ts +31 -15
- package/dist/components/iconButton/index.d.ts.map +1 -1
- package/dist/components/iconButton/index.js +12 -15
- package/dist/components/imageUpload/index.d.ts +47 -75
- package/dist/components/imageUpload/index.d.ts.map +1 -1
- package/dist/components/imageUpload/index.js +27 -75
- package/dist/components/input/index.d.ts +51 -44
- package/dist/components/input/index.d.ts.map +1 -1
- package/dist/components/input/index.js +24 -44
- package/dist/components/mapView/index.d.ts +44 -0
- package/dist/components/mapView/index.d.ts.map +1 -1
- package/dist/components/mapView/index.js +35 -0
- package/dist/components/maskedInput/index.d.ts +66 -51
- package/dist/components/maskedInput/index.d.ts.map +1 -1
- package/dist/components/maskedInput/index.js +28 -51
- package/dist/components/modal/modalContainer/index.d.ts +17 -57
- package/dist/components/modal/modalContainer/index.d.ts.map +1 -1
- package/dist/components/modal/modalContainer/index.js +15 -57
- package/dist/components/modal/modalFooter/index.d.ts +17 -50
- package/dist/components/modal/modalFooter/index.d.ts.map +1 -1
- package/dist/components/modal/modalFooter/index.js +10 -50
- package/dist/components/modal/modalHeader/index.d.ts +13 -47
- package/dist/components/modal/modalHeader/index.d.ts.map +1 -1
- package/dist/components/modal/modalHeader/index.js +12 -47
- package/dist/components/multiSelect/index.d.ts +67 -62
- package/dist/components/multiSelect/index.d.ts.map +1 -1
- package/dist/components/multiSelect/index.js +28 -62
- package/dist/components/pagination/index.d.ts +18 -9
- package/dist/components/pagination/index.d.ts.map +1 -1
- package/dist/components/pagination/index.js +18 -9
- package/dist/components/phoneInput/index.d.ts +65 -30
- package/dist/components/phoneInput/index.d.ts.map +1 -1
- package/dist/components/phoneInput/index.js +35 -30
- package/dist/components/popover/index.d.ts +34 -114
- package/dist/components/popover/index.d.ts.map +1 -1
- package/dist/components/popover/index.js +25 -114
- package/dist/components/radio/radioBox/index.d.ts +17 -65
- package/dist/components/radio/radioBox/index.d.ts.map +1 -1
- package/dist/components/radio/radioBox/index.js +14 -65
- package/dist/components/radio/radioGroup/index.d.ts +36 -67
- package/dist/components/radio/radioGroup/index.d.ts.map +1 -1
- package/dist/components/radio/radioGroup/index.js +25 -67
- package/dist/components/richText/index.d.ts +33 -47
- package/dist/components/richText/index.d.ts.map +1 -1
- package/dist/components/richText/index.js +30 -44
- package/dist/components/searchPlaces.d.ts +52 -50
- package/dist/components/searchPlaces.d.ts.map +1 -1
- package/dist/components/searchPlaces.js +23 -30
- package/dist/components/select/index.d.ts +68 -63
- package/dist/components/select/index.d.ts.map +1 -1
- package/dist/components/select/index.js +29 -63
- package/dist/components/slider/index.d.ts +20 -34
- package/dist/components/slider/index.d.ts.map +1 -1
- package/dist/components/slider/index.js +15 -33
- package/dist/components/switch/index.d.ts +42 -58
- package/dist/components/switch/index.d.ts.map +1 -1
- package/dist/components/switch/index.js +24 -58
- package/dist/components/tab/tabButton/index.d.ts +14 -52
- package/dist/components/tab/tabButton/index.d.ts.map +1 -1
- package/dist/components/tab/tabButton/index.js +12 -52
- package/dist/components/tab/tabContainer/index.d.ts +16 -58
- package/dist/components/tab/tabContainer/index.d.ts.map +1 -1
- package/dist/components/tab/tabContainer/index.js +12 -58
- package/dist/components/table/tableBody/index.d.ts +13 -47
- package/dist/components/table/tableBody/index.d.ts.map +1 -1
- package/dist/components/table/tableBody/index.js +12 -47
- package/dist/components/table/tableCaption/index.d.ts +6 -46
- package/dist/components/table/tableCaption/index.d.ts.map +1 -1
- package/dist/components/table/tableCaption/index.js +6 -46
- package/dist/components/table/tableContainer/index.d.ts +12 -41
- package/dist/components/table/tableContainer/index.d.ts.map +1 -1
- package/dist/components/table/tableContainer/index.js +12 -41
- package/dist/components/table/tableFooter/index.d.ts +5 -29
- package/dist/components/table/tableFooter/index.d.ts.map +1 -1
- package/dist/components/table/tableFooter/index.js +5 -29
- package/dist/components/table/tableHeader/index.d.ts +4 -25
- package/dist/components/table/tableHeader/index.d.ts.map +1 -1
- package/dist/components/table/tableHeader/index.js +4 -25
- package/dist/components/textarea/index.d.ts +32 -64
- package/dist/components/textarea/index.d.ts.map +1 -1
- package/dist/components/textarea/index.js +16 -64
- package/dist/components/tooltip/index.d.ts +27 -55
- package/dist/components/tooltip/index.d.ts.map +1 -1
- package/dist/components/tooltip/index.js +16 -55
- package/dist/hooks/useAutomation.d.ts +18 -26
- package/dist/hooks/useAutomation.d.ts.map +1 -1
- package/dist/hooks/useAutomation.js +18 -26
- package/dist/hooks/useDrawer.d.ts +19 -64
- package/dist/hooks/useDrawer.d.ts.map +1 -1
- package/dist/hooks/useForm.d.ts +12 -29
- package/dist/hooks/useForm.d.ts.map +1 -1
- package/dist/hooks/useForm.js +12 -29
- package/dist/hooks/useHydrated.d.ts +8 -63
- package/dist/hooks/useHydrated.d.ts.map +1 -1
- package/dist/hooks/useHydrated.js +8 -63
- package/dist/hooks/useModal.d.ts +19 -59
- package/dist/hooks/useModal.d.ts.map +1 -1
- package/dist/hooks/useScopedParams.d.ts +17 -69
- package/dist/hooks/useScopedParams.d.ts.map +1 -1
- package/dist/hooks/useScopedParams.js +17 -69
- package/dist/hooks/useScrollLock.d.ts +11 -27
- package/dist/hooks/useScrollLock.d.ts.map +1 -1
- package/dist/hooks/useScrollLock.js +11 -33
- package/dist/hooks/useSearchAutomation.d.ts +16 -34
- package/dist/hooks/useSearchAutomation.d.ts.map +1 -1
- package/dist/hooks/useSearchAutomation.js +16 -34
- package/dist/hooks/useSlider.d.ts +5 -19
- package/dist/hooks/useSlider.d.ts.map +1 -1
- package/dist/hooks/useSlider.js +5 -19
- package/dist/hooks/useToast.d.ts +8 -52
- package/dist/hooks/useToast.d.ts.map +1 -1
- package/dist/hooks/useToast.js +8 -52
- package/dist/providers/drawerProvider.d.ts +15 -81
- package/dist/providers/drawerProvider.d.ts.map +1 -1
- package/dist/providers/drawerProvider.js +15 -81
- package/dist/providers/formProvider.d.ts +17 -53
- package/dist/providers/formProvider.d.ts.map +1 -1
- package/dist/providers/formProvider.js +17 -53
- package/dist/providers/modalProvider.d.ts +16 -77
- package/dist/providers/modalProvider.d.ts.map +1 -1
- package/dist/providers/modalProvider.js +16 -77
- package/dist/providers/placesProvider.d.ts +16 -11
- package/dist/providers/placesProvider.d.ts.map +1 -1
- package/dist/providers/placesProvider.js +16 -11
- package/dist/providers/toastProvider.d.ts +10 -21
- package/dist/providers/toastProvider.d.ts.map +1 -1
- package/dist/providers/toastProvider.js +10 -21
- package/dist/services/toHtml.d.ts +11 -10
- package/dist/services/toHtml.d.ts.map +1 -1
- package/dist/services/toHtml.js +11 -10
- package/dist/services/toRichTextValue.d.ts +11 -17
- package/dist/services/toRichTextValue.d.ts.map +1 -1
- package/dist/services/toRichTextValue.js +11 -17
- package/package.json +1 -1
|
@@ -2,61 +2,41 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
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
|
-
*/
|
|
9
5
|
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
|
+
/** @internal Accesses the schema and HTML props of the enclosing `AlertContainer`. */
|
|
21
7
|
function useAlertContainer() {
|
|
22
8
|
return useContext(AlertContainerContext);
|
|
23
9
|
}
|
|
24
10
|
/**
|
|
25
|
-
* AlertContainer
|
|
26
|
-
*
|
|
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.
|
|
11
|
+
* AlertContainer — root wrapper for the Alert component set. Provides schema context to child components.
|
|
30
12
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
13
|
+
* Automatically detects whether an `AlertTitle` is present among children and adjusts layout:
|
|
14
|
+
* centered when no title, left-aligned when a title is present.
|
|
33
15
|
*
|
|
34
|
-
* @param
|
|
35
|
-
* @param
|
|
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
|
|
16
|
+
* @param props.schema - Visual style variant. Required.
|
|
17
|
+
* @param props.children - Alert sub-components: `AlertIcon`, `AlertContent`, `AlertTitle`, `AlertDescription`.
|
|
38
18
|
*
|
|
39
|
-
*
|
|
19
|
+
* **...Other valid HTML properties for `<div>`**
|
|
40
20
|
*
|
|
41
|
-
* @
|
|
21
|
+
* @returns AlertContainer JSX element.
|
|
42
22
|
*
|
|
43
23
|
* @example
|
|
44
|
-
*
|
|
24
|
+
* ```tsx
|
|
25
|
+
* // Inline alert — no title, centered layout
|
|
45
26
|
* <AlertContainer schema="success">
|
|
46
|
-
*
|
|
27
|
+
* <AlertIcon />
|
|
28
|
+
* <AlertContent>Your subscription has been activated.</AlertContent>
|
|
47
29
|
* </AlertContainer>
|
|
48
30
|
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* You are premium user now!
|
|
57
|
-
* </AlertDescription>
|
|
58
|
-
* </AlertContent>
|
|
31
|
+
* // Full alert with title and description — left-aligned layout
|
|
32
|
+
* <AlertContainer schema="danger">
|
|
33
|
+
* <AlertIcon />
|
|
34
|
+
* <AlertContent>
|
|
35
|
+
* <AlertTitle>Payment failed</AlertTitle>
|
|
36
|
+
* <AlertDescription>Please check your card details and try again.</AlertDescription>
|
|
37
|
+
* </AlertContent>
|
|
59
38
|
* </AlertContainer>
|
|
39
|
+
* ```
|
|
60
40
|
*/
|
|
61
41
|
function AlertContainer(props) {
|
|
62
42
|
const { schema, children, className: baseClassName, ...rest } = props;
|
|
@@ -1,48 +1,23 @@
|
|
|
1
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
|
-
*/
|
|
8
3
|
type AlertContentProps = HTMLAttributes<HTMLDivElement>;
|
|
9
4
|
/**
|
|
10
|
-
* AlertContent
|
|
11
|
-
*
|
|
12
|
-
* @component
|
|
13
|
-
* @memberof Alert
|
|
14
|
-
*
|
|
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.
|
|
5
|
+
* AlertContent — text/content area inside an `AlertContainer`. Wraps `AlertTitle` and `AlertDescription`.
|
|
18
6
|
*
|
|
19
|
-
*
|
|
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
|
|
7
|
+
* Accepts all standard `<div>` HTML attributes.
|
|
22
8
|
*
|
|
23
|
-
* @returns
|
|
24
|
-
*
|
|
25
|
-
* @requires react
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* // Basic usage
|
|
29
|
-
* <AlertContainer schema="success">
|
|
30
|
-
* <AlertContent>
|
|
31
|
-
* {children}
|
|
32
|
-
* </AlertContent>
|
|
33
|
-
* </AlertContainer>
|
|
9
|
+
* @returns AlertContent JSX element.
|
|
34
10
|
*
|
|
35
11
|
* @example
|
|
36
|
-
*
|
|
37
|
-
* <AlertContainer schema="
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* </AlertDescription>
|
|
44
|
-
* </AlertContent>
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <AlertContainer schema="warning">
|
|
14
|
+
* <AlertIcon />
|
|
15
|
+
* <AlertContent>
|
|
16
|
+
* <AlertTitle>Session expiring</AlertTitle>
|
|
17
|
+
* <AlertDescription>You will be logged out in 5 minutes.</AlertDescription>
|
|
18
|
+
* </AlertContent>
|
|
45
19
|
* </AlertContainer>
|
|
20
|
+
* ```
|
|
46
21
|
*/
|
|
47
22
|
declare function AlertContent(props: AlertContentProps): JSX.Element;
|
|
48
23
|
export { AlertContent };
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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,KAAK,iBAAiB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAExD;;;;;;;;;;;;;;;;;GAiBG;AAEH,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAK3D;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,42 +1,22 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import "./styles.css";
|
|
3
3
|
/**
|
|
4
|
-
* AlertContent
|
|
4
|
+
* AlertContent — text/content area inside an `AlertContainer`. Wraps `AlertTitle` and `AlertDescription`.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* @memberof Alert
|
|
6
|
+
* Accepts all standard `<div>` HTML attributes.
|
|
8
7
|
*
|
|
9
|
-
* @
|
|
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.
|
|
12
|
-
*
|
|
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
|
|
16
|
-
*
|
|
17
|
-
* @returns {JSX.Element} A div element with the alert content styling
|
|
18
|
-
*
|
|
19
|
-
* @requires react
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* // Basic usage
|
|
23
|
-
* <AlertContainer schema="success">
|
|
24
|
-
* <AlertContent>
|
|
25
|
-
* {children}
|
|
26
|
-
* </AlertContent>
|
|
27
|
-
* </AlertContainer>
|
|
8
|
+
* @returns AlertContent JSX element.
|
|
28
9
|
*
|
|
29
10
|
* @example
|
|
30
|
-
*
|
|
31
|
-
* <AlertContainer schema="
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* </AlertDescription>
|
|
38
|
-
* </AlertContent>
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <AlertContainer schema="warning">
|
|
13
|
+
* <AlertIcon />
|
|
14
|
+
* <AlertContent>
|
|
15
|
+
* <AlertTitle>Session expiring</AlertTitle>
|
|
16
|
+
* <AlertDescription>You will be logged out in 5 minutes.</AlertDescription>
|
|
17
|
+
* </AlertContent>
|
|
39
18
|
* </AlertContainer>
|
|
19
|
+
* ```
|
|
40
20
|
*/
|
|
41
21
|
function AlertContent(props) {
|
|
42
22
|
const { className: baseClassName, ...rest } = props;
|
|
@@ -1,50 +1,22 @@
|
|
|
1
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
|
-
*/
|
|
8
3
|
type AlertDescriptionProps = HTMLAttributes<HTMLDivElement>;
|
|
9
4
|
/**
|
|
10
|
-
* AlertDescription
|
|
11
|
-
*
|
|
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.
|
|
15
|
-
*
|
|
16
|
-
* @component
|
|
17
|
-
* @memberof Alert
|
|
5
|
+
* AlertDescription — body text for an alert. Place inside `AlertContent`.
|
|
18
6
|
*
|
|
19
|
-
*
|
|
20
|
-
* @param {string} [props.className] - Additional CSS classes to apply to the description
|
|
21
|
-
* @param {React.ReactNode} [props.children] - The description content to display
|
|
7
|
+
* Accepts all standard `<div>` HTML attributes.
|
|
22
8
|
*
|
|
23
|
-
* @returns
|
|
24
|
-
*
|
|
25
|
-
* @requires react
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* // Basic usage
|
|
29
|
-
* <AlertContainer schema="success">
|
|
30
|
-
* <AlertContent>
|
|
31
|
-
* <AlertDescription>
|
|
32
|
-
* Your are premium user now!
|
|
33
|
-
* </AlertDescription>
|
|
34
|
-
* </AlertContent>
|
|
35
|
-
* </AlertContainer>
|
|
9
|
+
* @returns AlertDescription JSX element.
|
|
36
10
|
*
|
|
37
11
|
* @example
|
|
38
|
-
*
|
|
39
|
-
* <AlertContainer schema="
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* You are premium user now!
|
|
45
|
-
* </AlertDescription>
|
|
46
|
-
* </AlertContent>
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <AlertContainer schema="info">
|
|
14
|
+
* <AlertContent>
|
|
15
|
+
* <AlertTitle>Maintenance scheduled</AlertTitle>
|
|
16
|
+
* <AlertDescription>The service will be unavailable on Sunday from 2–4 AM UTC.</AlertDescription>
|
|
17
|
+
* </AlertContent>
|
|
47
18
|
* </AlertContainer>
|
|
19
|
+
* ```
|
|
48
20
|
*/
|
|
49
21
|
declare function AlertDescription(props: AlertDescriptionProps): JSX.Element;
|
|
50
22
|
export { AlertDescription };
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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,KAAK,qBAAqB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAE5D;;;;;;;;;;;;;;;;GAgBG;AAEH,iBAAS,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,GAAG,CAAC,OAAO,CAKnE;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,44 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import "./styles.css";
|
|
3
3
|
/**
|
|
4
|
-
* AlertDescription
|
|
4
|
+
* AlertDescription — body text for an alert. Place inside `AlertContent`.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* through the `arkynAlertDescription` CSS class. It extends all standard HTML div attributes,
|
|
8
|
-
* making it flexible for various content and accessibility requirements.
|
|
6
|
+
* Accepts all standard `<div>` HTML attributes.
|
|
9
7
|
*
|
|
10
|
-
* @
|
|
11
|
-
* @memberof Alert
|
|
12
|
-
*
|
|
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
|
|
16
|
-
*
|
|
17
|
-
* @returns {JSX.Element} A div element with alert description styling
|
|
18
|
-
*
|
|
19
|
-
* @requires react
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* // Basic usage
|
|
23
|
-
* <AlertContainer schema="success">
|
|
24
|
-
* <AlertContent>
|
|
25
|
-
* <AlertDescription>
|
|
26
|
-
* Your are premium user now!
|
|
27
|
-
* </AlertDescription>
|
|
28
|
-
* </AlertContent>
|
|
29
|
-
* </AlertContainer>
|
|
8
|
+
* @returns AlertDescription JSX element.
|
|
30
9
|
*
|
|
31
10
|
* @example
|
|
32
|
-
*
|
|
33
|
-
* <AlertContainer schema="
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* You are premium user now!
|
|
39
|
-
* </AlertDescription>
|
|
40
|
-
* </AlertContent>
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <AlertContainer schema="info">
|
|
13
|
+
* <AlertContent>
|
|
14
|
+
* <AlertTitle>Maintenance scheduled</AlertTitle>
|
|
15
|
+
* <AlertDescription>The service will be unavailable on Sunday from 2–4 AM UTC.</AlertDescription>
|
|
16
|
+
* </AlertContent>
|
|
41
17
|
* </AlertContainer>
|
|
18
|
+
* ```
|
|
42
19
|
*/
|
|
43
20
|
function AlertDescription(props) {
|
|
44
21
|
const { className: baseClassName, ...rest } = props;
|
|
@@ -1,53 +1,29 @@
|
|
|
1
1
|
import { LucideProps } from "lucide-react";
|
|
2
2
|
import { JSX } from "react";
|
|
3
3
|
import "./styles.css";
|
|
4
|
-
/**
|
|
5
|
-
* Props for the AlertIcon component.
|
|
6
|
-
* Extends all props from Lucide's icon components.
|
|
7
|
-
*
|
|
8
|
-
* @typedef {LucideProps} AlertIconProps
|
|
9
|
-
*/
|
|
10
4
|
type AlertIconProps = LucideProps;
|
|
11
5
|
/**
|
|
12
|
-
* AlertIcon
|
|
13
|
-
*
|
|
14
|
-
* @component
|
|
15
|
-
* @memberof Alert
|
|
6
|
+
* AlertIcon — renders a schema-appropriate icon from `AlertContainer` context.
|
|
16
7
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* -
|
|
21
|
-
* - danger: Renders an XCircle icon
|
|
22
|
-
* - warning: Renders an AlertTriangle icon
|
|
23
|
-
* - info: Renders an Info icon
|
|
8
|
+
* - `success` → `CheckCircle2`
|
|
9
|
+
* - `danger` → `XCircle`
|
|
10
|
+
* - `warning` → `AlertTriangle`
|
|
11
|
+
* - `info` → `Info`
|
|
24
12
|
*
|
|
25
|
-
*
|
|
26
|
-
* @param {string} [props.className] - Additional CSS class names to apply to the icon
|
|
13
|
+
* Must be placed inside an `AlertContainer`. Accepts all Lucide icon props.
|
|
27
14
|
*
|
|
28
|
-
* @returns
|
|
29
|
-
*
|
|
30
|
-
* @requires lucide-react - For icon components (CheckCircle2, XCircle, AlertTriangle, Info)
|
|
31
|
-
* @requires useAlertContainer - Hook to access the alert schema from context
|
|
15
|
+
* @returns The schema-matched Lucide icon element.
|
|
32
16
|
*
|
|
33
17
|
* @example
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* <AlertContainer schema="success">
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <AlertContainer schema="danger">
|
|
37
20
|
* <AlertIcon />
|
|
21
|
+
* <AlertContent>
|
|
22
|
+
* <AlertTitle>Payment failed</AlertTitle>
|
|
23
|
+
* <AlertDescription>Please check your card details.</AlertDescription>
|
|
24
|
+
* </AlertContent>
|
|
38
25
|
* </AlertContainer>
|
|
39
|
-
*
|
|
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>
|
|
50
|
-
* </AlertContainer>
|
|
26
|
+
* ```
|
|
51
27
|
*/
|
|
52
28
|
declare function AlertIcon(props: AlertIconProps): JSX.Element;
|
|
53
29
|
export { AlertIcon };
|
|
@@ -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;AAEtB,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,cAAc,CAAC;AAEtB
|
|
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,KAAK,cAAc,GAAG,WAAW,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,iBAAS,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CAgBrD;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -3,45 +3,27 @@ import { AlertTriangle, CheckCircle2, Info, XCircle, } from "lucide-react";
|
|
|
3
3
|
import { useAlertContainer } from "../alertContainer";
|
|
4
4
|
import "./styles.css";
|
|
5
5
|
/**
|
|
6
|
-
* AlertIcon
|
|
6
|
+
* AlertIcon — renders a schema-appropriate icon from `AlertContainer` context.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* - `success` → `CheckCircle2`
|
|
9
|
+
* - `danger` → `XCircle`
|
|
10
|
+
* - `warning` → `AlertTriangle`
|
|
11
|
+
* - `info` → `Info`
|
|
10
12
|
*
|
|
11
|
-
*
|
|
12
|
-
* This component automatically selects and renders the appropriate icon based on the
|
|
13
|
-
* alert schema from the AlertContainer context. It supports four schemas:
|
|
14
|
-
* - success: Renders a CheckCircle2 icon
|
|
15
|
-
* - danger: Renders an XCircle icon
|
|
16
|
-
* - warning: Renders an AlertTriangle icon
|
|
17
|
-
* - info: Renders an Info icon
|
|
13
|
+
* Must be placed inside an `AlertContainer`. Accepts all Lucide icon props.
|
|
18
14
|
*
|
|
19
|
-
* @
|
|
20
|
-
* @param {string} [props.className] - Additional CSS class names to apply to the icon
|
|
21
|
-
*
|
|
22
|
-
* @returns {JSX.Element} The rendered icon component based on the alert schema
|
|
23
|
-
*
|
|
24
|
-
* @requires lucide-react - For icon components (CheckCircle2, XCircle, AlertTriangle, Info)
|
|
25
|
-
* @requires useAlertContainer - Hook to access the alert schema from context
|
|
15
|
+
* @returns The schema-matched Lucide icon element.
|
|
26
16
|
*
|
|
27
17
|
* @example
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* <AlertContainer schema="success">
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <AlertContainer schema="danger">
|
|
31
20
|
* <AlertIcon />
|
|
21
|
+
* <AlertContent>
|
|
22
|
+
* <AlertTitle>Payment failed</AlertTitle>
|
|
23
|
+
* <AlertDescription>Please check your card details.</AlertDescription>
|
|
24
|
+
* </AlertContent>
|
|
32
25
|
* </AlertContainer>
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* // Complete alert example
|
|
36
|
-
* <AlertContainer schema="success">
|
|
37
|
-
* <AlertIcon />
|
|
38
|
-
* <AlertContent>
|
|
39
|
-
* <AlertTitle>Success!</AlertTitle>
|
|
40
|
-
* <AlertDescription>
|
|
41
|
-
* You are premium user now!
|
|
42
|
-
* </AlertDescription>
|
|
43
|
-
* </AlertContent>
|
|
44
|
-
* </AlertContainer>
|
|
26
|
+
* ```
|
|
45
27
|
*/
|
|
46
28
|
function AlertIcon(props) {
|
|
47
29
|
const { className: baseClassName, ...rest } = props;
|
|
@@ -1,47 +1,24 @@
|
|
|
1
1
|
import { HTMLAttributes, JSX } from "react";
|
|
2
2
|
import "./styles.css";
|
|
3
|
-
/**
|
|
4
|
-
* Props for the AlertTitle component.
|
|
5
|
-
* Extends all standard HTML div element attributes.
|
|
6
|
-
*
|
|
7
|
-
* @typedef {Object} AlertTitleProps
|
|
8
|
-
* @property {string} [className] - Additional CSS class names to apply to the alert title
|
|
9
|
-
* @extends {HTMLAttributes<HTMLDivElement>}
|
|
10
|
-
*/
|
|
11
3
|
type AlertTitleProps = HTMLAttributes<HTMLDivElement>;
|
|
12
4
|
/**
|
|
13
|
-
* AlertTitle
|
|
14
|
-
*
|
|
15
|
-
* This component renders a styled title for alert components, providing semantic structure
|
|
16
|
-
* and consistent styling across the application.
|
|
17
|
-
*
|
|
18
|
-
* @component
|
|
19
|
-
* @memberof Alert
|
|
5
|
+
* AlertTitle — bold heading for an alert. Place inside `AlertContent`.
|
|
20
6
|
*
|
|
21
|
-
*
|
|
7
|
+
* Its presence is detected by `AlertContainer` to switch the layout from centered to left-aligned.
|
|
8
|
+
* Accepts all standard `<div>` HTML attributes.
|
|
22
9
|
*
|
|
23
|
-
* @returns
|
|
24
|
-
*
|
|
25
|
-
* @requires react
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* // Basic usage
|
|
29
|
-
* <AlertContainer schema="success">
|
|
30
|
-
* <AlertTitle>Success!</AlertTitle>
|
|
31
|
-
* <AlertDescription>Your changes have been saved.</AlertDescription>
|
|
32
|
-
* </AlertContainer>
|
|
10
|
+
* @returns AlertTitle JSX element.
|
|
33
11
|
*
|
|
34
12
|
* @example
|
|
35
|
-
*
|
|
36
|
-
* <AlertContainer schema="
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* </AlertDescription>
|
|
43
|
-
* </AlertContent>
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <AlertContainer schema="danger">
|
|
15
|
+
* <AlertIcon />
|
|
16
|
+
* <AlertContent>
|
|
17
|
+
* <AlertTitle>Access denied</AlertTitle>
|
|
18
|
+
* <AlertDescription>You don't have permission to view this page.</AlertDescription>
|
|
19
|
+
* </AlertContent>
|
|
44
20
|
* </AlertContainer>
|
|
21
|
+
* ```
|
|
45
22
|
*/
|
|
46
23
|
declare function AlertTitle(props: AlertTitleProps): JSX.Element;
|
|
47
24
|
export { AlertTitle };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/alert/alertTitle/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,cAAc,CAAC;AAEtB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/alert/alertTitle/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,cAAc,CAAC;AAEtB,KAAK,eAAe,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEtD;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAKvD;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1,38 +1,23 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import "./styles.css";
|
|
3
3
|
/**
|
|
4
|
-
* AlertTitle
|
|
4
|
+
* AlertTitle — bold heading for an alert. Place inside `AlertContent`.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* Its presence is detected by `AlertContainer` to switch the layout from centered to left-aligned.
|
|
7
|
+
* Accepts all standard `<div>` HTML attributes.
|
|
8
8
|
*
|
|
9
|
-
* @
|
|
10
|
-
* @memberof Alert
|
|
11
|
-
*
|
|
12
|
-
* @param {AlertTitleProps} props - Component props extending HTML div attributes
|
|
13
|
-
*
|
|
14
|
-
* @returns {JSX.Element} A div element with alert title styling
|
|
15
|
-
*
|
|
16
|
-
* @requires react
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* // Basic usage
|
|
20
|
-
* <AlertContainer schema="success">
|
|
21
|
-
* <AlertTitle>Success!</AlertTitle>
|
|
22
|
-
* <AlertDescription>Your changes have been saved.</AlertDescription>
|
|
23
|
-
* </AlertContainer>
|
|
9
|
+
* @returns AlertTitle JSX element.
|
|
24
10
|
*
|
|
25
11
|
* @example
|
|
26
|
-
*
|
|
27
|
-
* <AlertContainer schema="
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* </AlertDescription>
|
|
34
|
-
* </AlertContent>
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <AlertContainer schema="danger">
|
|
14
|
+
* <AlertIcon />
|
|
15
|
+
* <AlertContent>
|
|
16
|
+
* <AlertTitle>Access denied</AlertTitle>
|
|
17
|
+
* <AlertDescription>You don't have permission to view this page.</AlertDescription>
|
|
18
|
+
* </AlertContent>
|
|
35
19
|
* </AlertContainer>
|
|
20
|
+
* ```
|
|
36
21
|
*/
|
|
37
22
|
function AlertTitle(props) {
|
|
38
23
|
const { className: baseClassName, ...rest } = props;
|