@als-tp/als-react-ts-ui 0.5.3 → 0.5.4
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 +133 -10
- package/dist/als-react-ts-ui.js +9474 -9410
- package/dist/components/ALSAccordion/ALSAccordion.d.ts +66 -0
- package/dist/components/ALSAccordion/ALSAccordion.d.ts.map +1 -0
- package/dist/components/ALSAccordion/index.d.ts +6 -63
- package/dist/components/ALSAccordion/index.d.ts.map +1 -1
- package/dist/components/ALSAlertDialog/ALSAlertDialog.d.ts +1 -1
- package/dist/components/ALSAlertDialog/ALSAlertDialog.d.ts.map +1 -1
- package/dist/components/ALSAlertDialog/index.d.ts +1 -1
- package/dist/components/ALSCombobox/ALSCombobox.d.ts +2 -2
- package/dist/components/ALSCombobox/ALSCombobox.d.ts.map +1 -1
- package/dist/components/ALSCombobox/index.d.ts +2 -2
- package/dist/components/ALSContextMenu/ALSContextMenu.d.ts +2 -2
- package/dist/components/ALSContextMenu/ALSContextMenu.d.ts.map +1 -1
- package/dist/components/ALSContextMenu/index.d.ts +2 -2
- package/dist/components/ALSDialog/ALSDialog.d.ts +79 -0
- package/dist/components/ALSDialog/ALSDialog.d.ts.map +1 -0
- package/dist/components/ALSDialog/index.d.ts +9 -75
- package/dist/components/ALSDialog/index.d.ts.map +1 -1
- package/dist/components/ALSPopover/ALSPopover.d.ts +25 -0
- package/dist/components/ALSPopover/ALSPopover.d.ts.map +1 -0
- package/dist/components/ALSPopover/index.d.ts +14 -38
- package/dist/components/ALSPopover/index.d.ts.map +1 -1
- package/dist/components/ALSSelect/ALSSelect.d.ts +30 -0
- package/dist/components/ALSSelect/ALSSelect.d.ts.map +1 -0
- package/dist/components/ALSSelect/index.d.ts +9 -35
- package/dist/components/ALSSelect/index.d.ts.map +1 -1
- package/dist/components/ALSToast/ALSToast.d.ts +91 -0
- package/dist/components/ALSToast/ALSToast.d.ts.map +1 -0
- package/dist/components/ALSToast/index.d.ts +10 -87
- package/dist/components/ALSToast/index.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/layout/MainLayout/index.d.ts +0 -12
- package/dist/layout/MainLayout/index.d.ts.map +1 -1
- package/dist/layout/MainLayout/useLayout.d.ts +15 -0
- package/dist/layout/MainLayout/useLayout.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Select } from "@base-ui-components/react/select";
|
|
3
|
+
type ALSSelectRootProps<Value, Multiple extends boolean = boolean> = Select.Root.Props<Value, Multiple>;
|
|
4
|
+
declare function ALSSelectRoot<Value>(props: ALSSelectRootProps<Value>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
interface ALSSelectTriggerProps extends Select.Trigger.Props {
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Custom render function for the selected value(s).
|
|
9
|
+
* Useful for formatting multiple selections or object values.
|
|
10
|
+
*/
|
|
11
|
+
renderValue?: Select.Value.Props["render"];
|
|
12
|
+
}
|
|
13
|
+
declare const ALSSelectTrigger: React.ForwardRefExoticComponent<ALSSelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
type ALSSelectPortalProps = Select.Portal.Props;
|
|
15
|
+
declare function ALSSelectPortal(props: ALSSelectPortalProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
type ALSSelectPositionerProps = Select.Positioner.Props;
|
|
17
|
+
declare const ALSSelectPositioner: React.ForwardRefExoticComponent<import("@base-ui-components/react/select").SelectPositionerProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
type ALSSelectPopupProps = Select.Popup.Props;
|
|
19
|
+
declare const ALSSelectPopup: React.ForwardRefExoticComponent<import("@base-ui-components/react/select").SelectPopupProps & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
type ALSSelectItemProps = Select.Item.Props;
|
|
21
|
+
declare const ALSSelectItem: React.ForwardRefExoticComponent<import("@base-ui-components/react/select").SelectItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
type ALSSelectGroupProps = Select.Group.Props;
|
|
23
|
+
declare const ALSSelectGroup: React.ForwardRefExoticComponent<import("@base-ui-components/react/select").SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
type ALSSelectLabelProps = Select.GroupLabel.Props;
|
|
25
|
+
declare const ALSSelectLabel: React.ForwardRefExoticComponent<import("@base-ui-components/react/select").SelectGroupLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
type ALSSelectSeparatorProps = Select.Separator.Props;
|
|
27
|
+
declare const ALSSelectSeparator: React.ForwardRefExoticComponent<import("@base-ui-components/react/separator").SeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
export { ALSSelectRoot, ALSSelectTrigger, ALSSelectPortal, ALSSelectPositioner, ALSSelectPopup, ALSSelectItem, ALSSelectGroup, ALSSelectLabel, ALSSelectSeparator, };
|
|
29
|
+
export type { ALSSelectRootProps, ALSSelectTriggerProps, ALSSelectPortalProps, ALSSelectPositionerProps, ALSSelectPopupProps, ALSSelectItemProps, ALSSelectGroupProps, ALSSelectLabelProps, ALSSelectSeparatorProps, };
|
|
30
|
+
//# sourceMappingURL=ALSSelect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ALSSelect.d.ts","sourceRoot":"","sources":["../../../src/components/ALSSelect/ALSSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAS1D,KAAK,kBAAkB,CACnB,KAAK,EACL,QAAQ,SAAS,OAAO,GAAG,OAAO,IAClC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AAEvC,iBAAS,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,kBAAkB,CAAC,KAAK,CAAC,2CAG7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B,uBAAuB,GAC1B,CAAC"}
|
|
@@ -1,41 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
interface ALSSelectRootProps<Value> extends Select.Root.Props<Value> {
|
|
4
|
-
}
|
|
5
|
-
declare function ALSSelectRoot<Value>(props: ALSSelectRootProps<Value>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
interface ALSSelectTriggerProps extends Select.Trigger.Props {
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
/**
|
|
9
|
-
* Custom render function for the selected value(s).
|
|
10
|
-
* Useful for formatting multiple selections or object values.
|
|
11
|
-
*/
|
|
12
|
-
renderValue?: Select.Value.Props["render"];
|
|
13
|
-
}
|
|
14
|
-
interface ALSSelectPortalProps extends Select.Portal.Props {
|
|
15
|
-
}
|
|
16
|
-
declare function ALSSelectPortal(props: ALSSelectPortalProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
interface ALSSelectPositionerProps extends Select.Positioner.Props {
|
|
18
|
-
}
|
|
19
|
-
interface ALSSelectPopupProps extends Select.Popup.Props {
|
|
20
|
-
}
|
|
21
|
-
interface ALSSelectItemProps extends Select.Item.Props {
|
|
22
|
-
}
|
|
23
|
-
interface ALSSelectGroupProps extends Select.Group.Props {
|
|
24
|
-
}
|
|
25
|
-
interface ALSSelectLabelProps extends Select.GroupLabel.Props {
|
|
26
|
-
}
|
|
27
|
-
interface ALSSelectSeparatorProps extends Select.Separator.Props {
|
|
28
|
-
}
|
|
1
|
+
import { ALSSelectRoot, ALSSelectPortal } from "./ALSSelect";
|
|
2
|
+
import type { ALSSelectRootProps, ALSSelectTriggerProps, ALSSelectPortalProps, ALSSelectPositionerProps, ALSSelectPopupProps, ALSSelectItemProps, ALSSelectGroupProps, ALSSelectLabelProps, ALSSelectSeparatorProps } from "./ALSSelect";
|
|
29
3
|
export declare const ALSSelect: {
|
|
30
4
|
Root: typeof ALSSelectRoot;
|
|
31
|
-
Trigger:
|
|
5
|
+
Trigger: import("react").ForwardRefExoticComponent<ALSSelectTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
32
6
|
Portal: typeof ALSSelectPortal;
|
|
33
|
-
Positioner:
|
|
34
|
-
Popup:
|
|
35
|
-
Item:
|
|
36
|
-
Group:
|
|
37
|
-
Label:
|
|
38
|
-
Separator:
|
|
7
|
+
Positioner: import("react").ForwardRefExoticComponent<import("@base-ui-components/react/select").SelectPositionerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
Popup: import("react").ForwardRefExoticComponent<import("@base-ui-components/react/select").SelectPopupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
+
Item: import("react").ForwardRefExoticComponent<import("@base-ui-components/react/select").SelectItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
Group: import("react").ForwardRefExoticComponent<import("@base-ui-components/react/select").SelectGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
+
Label: import("react").ForwardRefExoticComponent<import("@base-ui-components/react/select").SelectGroupLabelProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
Separator: import("react").ForwardRefExoticComponent<import("@base-ui-components/react/separator").SeparatorProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
39
13
|
};
|
|
40
14
|
export type { ALSSelectRootProps, ALSSelectTriggerProps, ALSSelectPortalProps, ALSSelectPositionerProps, ALSSelectPopupProps, ALSSelectItemProps, ALSSelectGroupProps, ALSSelectLabelProps, ALSSelectSeparatorProps, };
|
|
41
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ALSSelect/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ALSSelect/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,aAAa,EAEb,eAAe,EAOlB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EACR,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EAC1B,MAAM,aAAa,CAAC;AAOrB,eAAO,MAAM,SAAS;;;;;;;;;;CAUrB,CAAC;AAEF,YAAY,EACR,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,GAC1B,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Toast } from "@base-ui-components/react/toast";
|
|
3
|
+
export type ToastType = "success" | "error" | "warning" | "info" | "default";
|
|
4
|
+
interface ALSToastProviderProps {
|
|
5
|
+
/** Maximum number of toasts that can be displayed at once */
|
|
6
|
+
limit?: number;
|
|
7
|
+
/** Default timeout in ms before auto-dismiss (0 = no auto-dismiss) */
|
|
8
|
+
timeout?: number;
|
|
9
|
+
/** Global toast manager for use outside React components */
|
|
10
|
+
toastManager?: ReturnType<typeof Toast.createToastManager>;
|
|
11
|
+
/** Children */
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
declare const ALSToastProvider: React.FC<ALSToastProviderProps>;
|
|
15
|
+
interface ALSToastPortalProps {
|
|
16
|
+
/** Container element to portal into */
|
|
17
|
+
container?: HTMLElement | null;
|
|
18
|
+
/** Children */
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
declare const ALSToastPortal: React.FC<ALSToastPortalProps>;
|
|
22
|
+
interface ALSToastViewportProps {
|
|
23
|
+
/** Additional class name */
|
|
24
|
+
className?: string;
|
|
25
|
+
/** Inline styles */
|
|
26
|
+
style?: React.CSSProperties;
|
|
27
|
+
}
|
|
28
|
+
declare const ALSToastViewport: React.ForwardRefExoticComponent<ALSToastViewportProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
interface ALSToastRootProps {
|
|
30
|
+
/** The toast object to render (required) */
|
|
31
|
+
toast: any;
|
|
32
|
+
/** Direction(s) in which the toast can be swiped to dismiss */
|
|
33
|
+
swipeDirection?: "left" | "right" | "up" | "down" | ("left" | "right" | "up" | "down")[];
|
|
34
|
+
/** Additional class name */
|
|
35
|
+
className?: string;
|
|
36
|
+
/** Inline styles */
|
|
37
|
+
style?: React.CSSProperties;
|
|
38
|
+
/** Children */
|
|
39
|
+
children: React.ReactNode;
|
|
40
|
+
}
|
|
41
|
+
declare const ALSToastRoot: React.ForwardRefExoticComponent<ALSToastRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
42
|
+
interface ALSToastContentProps {
|
|
43
|
+
/** Additional class name */
|
|
44
|
+
className?: string;
|
|
45
|
+
/** Inline styles */
|
|
46
|
+
style?: React.CSSProperties;
|
|
47
|
+
/** Children */
|
|
48
|
+
children: React.ReactNode;
|
|
49
|
+
}
|
|
50
|
+
declare const ALSToastContent: React.ForwardRefExoticComponent<ALSToastContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
51
|
+
interface ALSToastTitleProps {
|
|
52
|
+
/** Additional class name */
|
|
53
|
+
className?: string;
|
|
54
|
+
/** Inline styles */
|
|
55
|
+
style?: React.CSSProperties;
|
|
56
|
+
/** Children */
|
|
57
|
+
children: React.ReactNode;
|
|
58
|
+
}
|
|
59
|
+
declare const ALSToastTitle: React.ForwardRefExoticComponent<ALSToastTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
60
|
+
interface ALSToastDescriptionProps {
|
|
61
|
+
/** Additional class name */
|
|
62
|
+
className?: string;
|
|
63
|
+
/** Inline styles */
|
|
64
|
+
style?: React.CSSProperties;
|
|
65
|
+
/** Children */
|
|
66
|
+
children: React.ReactNode;
|
|
67
|
+
}
|
|
68
|
+
declare const ALSToastDescription: React.ForwardRefExoticComponent<ALSToastDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
69
|
+
interface ALSToastActionProps {
|
|
70
|
+
/** Additional class name */
|
|
71
|
+
className?: string;
|
|
72
|
+
/** Inline styles */
|
|
73
|
+
style?: React.CSSProperties;
|
|
74
|
+
/** Children */
|
|
75
|
+
children?: React.ReactNode;
|
|
76
|
+
/** Click handler */
|
|
77
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
78
|
+
}
|
|
79
|
+
declare const ALSToastAction: React.ForwardRefExoticComponent<ALSToastActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
80
|
+
interface ALSToastCloseProps {
|
|
81
|
+
/** Additional class name */
|
|
82
|
+
className?: string;
|
|
83
|
+
/** Inline styles */
|
|
84
|
+
style?: React.CSSProperties;
|
|
85
|
+
/** Children (optional, defaults to X icon) */
|
|
86
|
+
children?: React.ReactNode;
|
|
87
|
+
}
|
|
88
|
+
declare const ALSToastClose: React.ForwardRefExoticComponent<ALSToastCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
89
|
+
export { ALSToastProvider, ALSToastPortal, ALSToastViewport, ALSToastRoot, ALSToastContent, ALSToastTitle, ALSToastDescription, ALSToastAction, ALSToastClose, };
|
|
90
|
+
export type { ALSToastProviderProps, ALSToastPortalProps, ALSToastViewportProps, ALSToastRootProps, ALSToastContentProps, ALSToastTitleProps, ALSToastDescriptionProps, ALSToastActionProps, ALSToastCloseProps, };
|
|
91
|
+
//# sourceMappingURL=ALSToast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ALSToast.d.ts","sourceRoot":"","sources":["../../../src/components/ALSToast/ALSToast.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAOxD,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAM7E,UAAU,qBAAqB;IAC3B,6DAA6D;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,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,aAAa,GAChB,CAAC;AAEF,YAAY,EACR,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,GACrB,CAAC"}
|
|
@@ -1,92 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ALSToastProviderProps, ALSToastPortalProps, ALSToastViewportProps, ALSToastRootProps, ALSToastContentProps, ALSToastTitleProps, ALSToastDescriptionProps, ALSToastActionProps, ALSToastCloseProps } from "./ALSToast";
|
|
2
2
|
import { Toast } from "@base-ui-components/react/toast";
|
|
3
|
-
export type ToastType = "success" | "error" | "warning" | "info" | "default";
|
|
4
|
-
interface ALSToastProviderProps {
|
|
5
|
-
/** Maximum number of toasts that can be displayed at once */
|
|
6
|
-
limit?: number;
|
|
7
|
-
/** Default timeout in ms before auto-dismiss (0 = no auto-dismiss) */
|
|
8
|
-
timeout?: number;
|
|
9
|
-
/** Global toast manager for use outside React components */
|
|
10
|
-
toastManager?: ReturnType<typeof Toast.createToastManager>;
|
|
11
|
-
/** Children */
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
}
|
|
14
|
-
interface ALSToastPortalProps {
|
|
15
|
-
/** Container element to portal into */
|
|
16
|
-
container?: HTMLElement | null;
|
|
17
|
-
/** Children */
|
|
18
|
-
children: React.ReactNode;
|
|
19
|
-
}
|
|
20
|
-
interface ALSToastViewportProps {
|
|
21
|
-
/** Additional class name */
|
|
22
|
-
className?: string;
|
|
23
|
-
/** Inline styles */
|
|
24
|
-
style?: React.CSSProperties;
|
|
25
|
-
}
|
|
26
|
-
interface ALSToastRootProps {
|
|
27
|
-
/** The toast object to render (required) */
|
|
28
|
-
toast: any;
|
|
29
|
-
/** Direction(s) in which the toast can be swiped to dismiss */
|
|
30
|
-
swipeDirection?: "left" | "right" | "up" | "down" | ("left" | "right" | "up" | "down")[];
|
|
31
|
-
/** Additional class name */
|
|
32
|
-
className?: string;
|
|
33
|
-
/** Inline styles */
|
|
34
|
-
style?: React.CSSProperties;
|
|
35
|
-
/** Children */
|
|
36
|
-
children: React.ReactNode;
|
|
37
|
-
}
|
|
38
|
-
interface ALSToastContentProps {
|
|
39
|
-
/** Additional class name */
|
|
40
|
-
className?: string;
|
|
41
|
-
/** Inline styles */
|
|
42
|
-
style?: React.CSSProperties;
|
|
43
|
-
/** Children */
|
|
44
|
-
children: React.ReactNode;
|
|
45
|
-
}
|
|
46
|
-
interface ALSToastTitleProps {
|
|
47
|
-
/** Additional class name */
|
|
48
|
-
className?: string;
|
|
49
|
-
/** Inline styles */
|
|
50
|
-
style?: React.CSSProperties;
|
|
51
|
-
/** Children */
|
|
52
|
-
children: React.ReactNode;
|
|
53
|
-
}
|
|
54
|
-
interface ALSToastDescriptionProps {
|
|
55
|
-
/** Additional class name */
|
|
56
|
-
className?: string;
|
|
57
|
-
/** Inline styles */
|
|
58
|
-
style?: React.CSSProperties;
|
|
59
|
-
/** Children */
|
|
60
|
-
children: React.ReactNode;
|
|
61
|
-
}
|
|
62
|
-
interface ALSToastActionProps {
|
|
63
|
-
/** Additional class name */
|
|
64
|
-
className?: string;
|
|
65
|
-
/** Inline styles */
|
|
66
|
-
style?: React.CSSProperties;
|
|
67
|
-
/** Children */
|
|
68
|
-
children?: React.ReactNode;
|
|
69
|
-
/** Click handler */
|
|
70
|
-
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
71
|
-
}
|
|
72
|
-
interface ALSToastCloseProps {
|
|
73
|
-
/** Additional class name */
|
|
74
|
-
className?: string;
|
|
75
|
-
/** Inline styles */
|
|
76
|
-
style?: React.CSSProperties;
|
|
77
|
-
/** Children (optional, defaults to X icon) */
|
|
78
|
-
children?: React.ReactNode;
|
|
79
|
-
}
|
|
80
3
|
export declare const ALSToast: {
|
|
81
|
-
Provider:
|
|
82
|
-
Portal:
|
|
83
|
-
Viewport:
|
|
84
|
-
Root:
|
|
85
|
-
Content:
|
|
86
|
-
Title:
|
|
87
|
-
Description:
|
|
88
|
-
Action:
|
|
89
|
-
Close:
|
|
4
|
+
Provider: import("react").FC<ALSToastProviderProps>;
|
|
5
|
+
Portal: import("react").FC<ALSToastPortalProps>;
|
|
6
|
+
Viewport: import("react").ForwardRefExoticComponent<ALSToastViewportProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
Root: import("react").ForwardRefExoticComponent<ALSToastRootProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
Content: import("react").ForwardRefExoticComponent<ALSToastContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
+
Title: import("react").ForwardRefExoticComponent<ALSToastTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
10
|
+
Description: import("react").ForwardRefExoticComponent<ALSToastDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
11
|
+
Action: import("react").ForwardRefExoticComponent<ALSToastActionProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
Close: import("react").ForwardRefExoticComponent<ALSToastCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
90
13
|
useToastManager: typeof Toast.useToastManager;
|
|
91
14
|
createToastManager: typeof Toast.createToastManager;
|
|
92
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ALSToast/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ALSToast/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACR,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EACrB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAMxD,eAAO,MAAM,QAAQ;;;;;;;;;;;;CAYpB,CAAC;AAEF,YAAY,EACR,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,GACrB,CAAC"}
|