@cloudwick/astral-ui 1.0.0 → 2.1.0

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 (49) hide show
  1. package/README.md +4 -4
  2. package/dist/components/adpIcon/svgObjects.d.ts +22 -13
  3. package/dist/components/avatar/index.d.ts +27 -0
  4. package/dist/components/avatarGroup/index.d.ts +32 -0
  5. package/dist/components/badge/index.d.ts +20 -16
  6. package/dist/components/button/index.d.ts +42 -16
  7. package/dist/components/card/cardBody.d.ts +13 -0
  8. package/dist/components/card/cardFooter.d.ts +13 -0
  9. package/dist/components/card/cardHeader.d.ts +22 -0
  10. package/dist/components/card/index.d.ts +14 -4
  11. package/dist/components/checkbox/index.d.ts +2 -2
  12. package/dist/components/checkboxGroup/index.d.ts +12 -9
  13. package/dist/components/ctaGroup/index.d.ts +46 -0
  14. package/dist/components/dataTable/advancedFilters.d.ts +10 -0
  15. package/dist/components/dataTable/dataTableStoryHelpers.d.ts +1098 -0
  16. package/dist/components/dataTable/index.d.ts +147 -0
  17. package/dist/components/dataTable/pageSizeModal.d.ts +9 -0
  18. package/dist/components/dataTable/selectedFilterList.d.ts +20 -0
  19. package/dist/components/dataTable/settings.d.ts +10 -0
  20. package/dist/components/dataTable/table.d.ts +41 -0
  21. package/dist/components/dropdown/dropdownItem.d.ts +1 -3
  22. package/dist/components/dropdown/index.d.ts +1 -1
  23. package/dist/components/emptyState/index.d.ts +2 -1
  24. package/dist/components/modal/index.d.ts +1 -1
  25. package/dist/components/modal/modalBody.d.ts +1 -5
  26. package/dist/components/pagination/index.d.ts +1 -1
  27. package/dist/components/panel/index.d.ts +30 -0
  28. package/dist/components/panel/panelBody.d.ts +13 -0
  29. package/dist/components/panel/panelFooter.d.ts +13 -0
  30. package/dist/components/panel/panelHeader.d.ts +39 -0
  31. package/dist/components/panel/panelStoryHelpers.d.ts +7 -0
  32. package/dist/components/panelGroup/index.d.ts +23 -0
  33. package/dist/components/passwordField/index.d.ts +4 -0
  34. package/dist/components/radioGroup/index.d.ts +48 -0
  35. package/dist/components/scrollbar/index.d.ts +34 -0
  36. package/dist/components/scrollbar/storyUtils.d.ts +8 -0
  37. package/dist/components/select/index.d.ts +35 -8
  38. package/dist/components/select/utils.d.ts +3 -0
  39. package/dist/components/tabs/tab.d.ts +17 -10
  40. package/dist/components/textCopy/index.d.ts +29 -0
  41. package/dist/components/textField/index.d.ts +17 -13
  42. package/dist/components/toast/index.d.ts +4 -2
  43. package/dist/components/toggle/index.d.ts +1 -1
  44. package/dist/components/truncate/index.d.ts +21 -0
  45. package/dist/css/index.min.css +1 -1
  46. package/dist/index.cjs.js +13 -2
  47. package/dist/index.d.ts +11 -0
  48. package/dist/index.esm.js +23 -2
  49. package/package.json +5 -10
@@ -0,0 +1,29 @@
1
+ import React from "react";
2
+ export interface ITextCopyProps {
3
+ /**
4
+ * Pass the text prop if you want to copy something other than children string
5
+ */
6
+ text?: string;
7
+ /**
8
+ * Pass comma separated classes to style the textCopy component
9
+ */
10
+ className?: string;
11
+ /**
12
+ * Pass the children to display the text or element to be copied.
13
+ * When passing children as non-string, make sure to pass text prop as well
14
+ */
15
+ children?: React.ReactElement | string;
16
+ /**
17
+ * To display icon on hover of the text
18
+ */
19
+ displayOnHover?: boolean;
20
+ /**
21
+ * Title for the copy button
22
+ */
23
+ copyButtonTitle?: string;
24
+ /**
25
+ * Confirmation message to be shown after the text gets copied
26
+ */
27
+ confirmationMessage?: string;
28
+ }
29
+ export declare const TextCopy: ({ text, className, children, displayOnHover, copyButtonTitle, confirmationMessage }: ITextCopyProps) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode } from "react";
2
- import { IconType } from "../adpIcon";
2
+ import { type IconType } from "../adpIcon";
3
3
  export declare enum sizes {
4
4
  MD = "md",
5
5
  LG = "lg"
@@ -10,23 +10,11 @@ export interface Props extends Omit<React.ComponentPropsWithoutRef<"input">, "cs
10
10
  * Regular static label.
11
11
  */
12
12
  label?: string | ReactNode;
13
- /**
14
- * Icon click handler
15
- */
16
- onIconClick?: () => void;
17
- /**
18
- * Placement of the icon
19
- */
20
- iconPlacement?: "start" | "end";
21
13
  /**
22
14
  * Size of the Textfield.
23
15
  * @default md
24
16
  */
25
17
  size?: Size;
26
- /**
27
- * Prefix the input with an icon.
28
- */
29
- icon?: IconType;
30
18
  /**
31
19
  * Pass a ref to the inner input element
32
20
  */
@@ -39,5 +27,21 @@ export interface Props extends Omit<React.ComponentPropsWithoutRef<"input">, "cs
39
27
  * Pass a boolean value to indicate if the text field is in an error state.
40
28
  */
41
29
  error?: boolean;
30
+ /**
31
+ * Icon to be displayed before the input.
32
+ * @description
33
+ * This prop accepts either an IconType (string) or a ReactNode.
34
+ * - If an IconType is provided, it will render an ADPIcon component.
35
+ * - If a ReactNode is provided, it will be rendered as-is.
36
+ */
37
+ prefixIcon?: IconType | ReactNode;
38
+ /**
39
+ * Icon to be displayed after the input.
40
+ * @description
41
+ * This prop accepts either an IconType (string) or a ReactNode.
42
+ * - If an IconType is provided, it will render an ADPIcon component.
43
+ * - If a ReactNode is provided, it will be rendered as-is.
44
+ */
45
+ suffixIcon?: IconType | ReactNode;
42
46
  }
43
47
  export declare const TextField: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -1,11 +1,12 @@
1
1
  import React, { ReactElement } from "react";
2
- export type TToastVariant = "success" | "info" | "warning" | "error";
2
+ export declare const variants: readonly ["success", "info", "warning", "error"];
3
+ type Variant = typeof variants[number];
3
4
  export interface IToastProps {
4
5
  /**
5
6
  * Accepts a variant value
6
7
  * @default info
7
8
  */
8
- variant: TToastVariant;
9
+ variant: Variant;
9
10
  /**
10
11
  * Show/hide the toast component
11
12
  * @default true
@@ -39,3 +40,4 @@ export interface IToastProps {
39
40
  className?: string;
40
41
  }
41
42
  export declare const Toast: ({ variant, display, children, autoHideDelay, hideCloseButton, onClose, condensed, className }: IToastProps) => ReactElement | null;
43
+ export {};
@@ -1,5 +1,5 @@
1
1
  import React, { RefObject } from "react";
2
- import { IconType } from "../adpIcon";
2
+ import { type IconType } from "../adpIcon";
3
3
  export interface ToggleProps extends Omit<React.HTMLProps<HTMLInputElement>, "label" | "size"> {
4
4
  /**
5
5
  * id for the Toggle
@@ -0,0 +1,21 @@
1
+ import type { TVoidElements } from "../../types/custom";
2
+ export type Props = {
3
+ /**
4
+ * The type of tag to render for the scroll container, the default value is "div".
5
+ * @default div
6
+ */
7
+ as?: keyof Omit<JSX.IntrinsicElements, TVoidElements>;
8
+ children?: string;
9
+ /**
10
+ * Maximum number of characters to display before truncating.
11
+ * If the text exceeds this limit, it will be truncated with an ellipsis,
12
+ * and a "Show more" button will be displayed.
13
+ * The full text can be viewed in a modal by clicking the "Show more" button.
14
+ */
15
+ limit: number;
16
+ /**
17
+ * Overwrite the styles for the Truncate component by passing space separated class names
18
+ */
19
+ className?: string;
20
+ };
21
+ export declare const Truncate: ({ as, children, limit, className }: Props) => JSX.Element | null;