mainstack-design-system 0.4.7 → 0.4.8

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.
@@ -7,9 +7,9 @@ export interface IAccordionItem extends AccordionItemProps {
7
7
  subtitle?: React.ReactNode;
8
8
  isDraggable?: boolean;
9
9
  error?: boolean;
10
- maxWidthTitle?: string;
10
+ maxWidthTitle?: any;
11
11
  actionButton?: React.ReactNode;
12
12
  titleTag?: React.ReactNode;
13
13
  }
14
- declare const AccordionItem: ({ children, title, subtitle, isDraggable, error, maxWidthTitle, actionButton, titleTag, ...props }: IAccordionItem) => import("react/jsx-runtime").JSX.Element;
14
+ declare const AccordionItem: import("react").ForwardRefExoticComponent<IAccordionItem & import("react").RefAttributes<import("@chakra-ui/system/dist/system.types").ComponentWithAs<"div", AccordionItemProps>>>;
15
15
  export default AccordionItem;
@@ -9,5 +9,5 @@ export interface IconButtonProps extends ButtonProps {
9
9
  variant: "primary" | "secondary" | "tertiary" | "outline" | "link";
10
10
  disabled?: boolean;
11
11
  }
12
- declare const IconButton: ({ children, size, bgColor, variant, disabled, textColor, onClick, ...props }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
12
+ declare const IconButton: ({ children, size, bgColor, variant, disabled, textColor, onClick, isLoading, ...props }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
13
13
  export default IconButton;
@@ -0,0 +1,12 @@
1
+ /** @format */
2
+ import { InputProps } from "@chakra-ui/react";
3
+ interface TUrlInput extends InputProps {
4
+ label?: string;
5
+ urlLabel: string;
6
+ status?: "loading" | "error" | "success" | null;
7
+ statusMessage?: string;
8
+ success?: boolean;
9
+ variant?: "left" | "right";
10
+ }
11
+ declare const UrlInput: ({ fontFamily, urlLabel, status, statusMessage, label, variant, ...rest }: TUrlInput) => import("react/jsx-runtime").JSX.Element;
12
+ export default UrlInput;
@@ -1,6 +1,6 @@
1
1
  /** @format */
2
- /// <reference types="react" />
3
2
  import { BoxProps } from "@chakra-ui/react";
3
+ import { ReactNode } from "react";
4
4
  export interface TileProps extends BoxProps {
5
5
  isSelected?: boolean;
6
6
  title: string;
@@ -8,7 +8,8 @@ export interface TileProps extends BoxProps {
8
8
  icon?: JSX.Element;
9
9
  iconPosition?: "leading" | "trailing" | "top";
10
10
  hasRadioButton?: boolean;
11
+ bottomComponent?: ReactNode;
11
12
  onClick?: () => void;
12
13
  }
13
- declare const Tile: ({ icon, iconPosition, hasRadioButton, isSelected, title, subText, onClick, width, ...props }: TileProps) => import("react/jsx-runtime").JSX.Element;
14
+ declare const Tile: ({ icon, iconPosition, hasRadioButton, isSelected, title, subText, onClick, width, bottomComponent, ...props }: TileProps) => import("react/jsx-runtime").JSX.Element;
14
15
  export default Tile;
@@ -3,7 +3,7 @@ export { ChakraProvider as MainstackProvider } from "@chakra-ui/react";
3
3
  export { default as Button } from "./Button";
4
4
  export { default as IconButton } from "./Button/IconButton";
5
5
  export { default as AccordionItem } from "./AccordionItem";
6
- export { Accordion } from "@chakra-ui/react";
6
+ export { Accordion, AccordionPanel } from "@chakra-ui/react";
7
7
  export { default as Avatars } from "./Avatars";
8
8
  export { default as Chip } from "./controls/Chip";
9
9
  export { default as DoubleTab } from "./controls/DoubleTab";
@@ -23,7 +23,6 @@ export { default as UsernameInput } from "./InputFields/UsernameInput";
23
23
  export { default as Banner } from "./notifications/Banner";
24
24
  export { default as ClickTooltip } from "./notifications/ClickTooltip";
25
25
  export { default as HoverTooltip } from "./notifications/HoverTooltip";
26
- export { default as Snackbar } from "./notifications/Snackbar";
27
26
  export { default as Colors } from "./styleGuide/Colors";
28
27
  export { default as Tiles } from "./Tiles";
29
28
  export { default as Display } from "./Typography/Display";
@@ -33,3 +32,4 @@ export { default as Subtitle } from "./Typography/Subtitle";
33
32
  export { default as FileUploader } from "./Uploader/FileUploader";
34
33
  export { default as ImageUploader } from "./Uploader/ImageUploader";
35
34
  export { default as Loader } from "./Animations/Loader";
35
+ export { customSnackbar, CustomSnackbarContainer, SnackbarType, } from "./notifications/Snackbar";
@@ -5,9 +5,19 @@ export interface ICustomTooltip {
5
5
  triggerComponent: JSX.Element;
6
6
  body: string | JSX.Element;
7
7
  label: string;
8
+ confirmButtonLabel?: string;
9
+ unConfirmButtonLabel?: string;
8
10
  hasSpecialArrow?: boolean;
9
11
  placement?: PlacementWithLogical;
10
12
  fontFamily?: string;
13
+ hasSteppers?: boolean;
14
+ steppersRange?: number;
15
+ activeStepperIndex?: number;
16
+ closeToolTipOnStepperShuttle?: boolean;
17
+ onStepperCancel?: () => void;
18
+ onStepperForward?: () => void;
19
+ onStepperBackward?: () => void;
20
+ getOnToggleTooltipVisibility?: (cb: Function) => void;
11
21
  }
12
- declare const ClickTooltip: ({ label, body, hasSpecialArrow, triggerComponent, placement, fontFamily, ...props }: ICustomTooltip) => import("react/jsx-runtime").JSX.Element;
22
+ declare const ClickTooltip: ({ label, body, hasSpecialArrow, triggerComponent, placement, fontFamily, confirmButtonLabel, unConfirmButtonLabel, hasSteppers, steppersRange, activeStepperIndex, closeToolTipOnStepperShuttle, onStepperCancel, onStepperForward, onStepperBackward, getOnToggleTooltipVisibility, ...props }: ICustomTooltip) => import("react/jsx-runtime").JSX.Element;
13
23
  export default ClickTooltip;
@@ -1,10 +1,12 @@
1
1
  /** @format */
2
2
  import { TypeOptions } from "react-toastify";
3
- export declare enum SnackbarType {
3
+ declare enum SnackbarType {
4
4
  info = "info",
5
5
  success = "success",
6
6
  warning = "warning",
7
7
  error = "error",
8
8
  default = "default"
9
9
  }
10
- export default function customSnackbar(title: string, type: TypeOptions, subtext?: string, showUndoButton?: boolean, handleUndo?: () => void): void;
10
+ declare const CustomSnackbarContainer: () => import("react/jsx-runtime").JSX.Element;
11
+ declare function customSnackbar(title: string, type: TypeOptions, subtext?: string, showUndoButton?: boolean, handleUndo?: () => void): void;
12
+ export { customSnackbar, CustomSnackbarContainer, SnackbarType };
@@ -0,0 +1,8 @@
1
+ /** @format */
2
+ import { ReactNode } from "react";
3
+ export interface ITagsUpdate {
4
+ status: "Successful" | "Pending" | "Failed";
5
+ icon?: ReactNode;
6
+ }
7
+ declare const TagsUpdate: ({ status, icon }: ITagsUpdate) => import("react/jsx-runtime").JSX.Element;
8
+ export default TagsUpdate;
@@ -0,0 +1,4 @@
1
+ /** @format */
2
+ import { IconProps } from "@chakra-ui/icons";
3
+ declare const KeyIcon: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default KeyIcon;
@@ -0,0 +1,4 @@
1
+ /** @format */
2
+ import { IconProps } from "@chakra-ui/icons";
3
+ declare const KeyOffIcon: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default KeyOffIcon;
@@ -178,6 +178,8 @@ export { default as InsertChartIcon } from "./InsertChartIcon";
178
178
  export { default as InventoryIcon } from "./InventoryIcon";
179
179
  export { default as IosShareIcon } from "./IosShareIcon";
180
180
  export { default as KeyboardBackspaceIcon } from "./KeyboardBackspaceIcon";
181
+ export { default as KeyIcon } from "./KeyIcon";
182
+ export { default as KeyOffIcon } from "./KeyOffIcon";
181
183
  export { default as LabelIcon } from "./LabelIcon";
182
184
  export { default as LanguageIcon } from "./LanguageIcon";
183
185
  export { default as LibraryMusicIcon } from "./LibraryMusicIcon";
@@ -0,0 +1,14 @@
1
+ /** @format */
2
+ import UrlInput from "components/InputFields/UrlInput";
3
+ import type { Meta, StoryObj } from "@storybook/react";
4
+ declare const meta: Meta<typeof UrlInput>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof UrlInput>;
7
+ export declare const Default: Story;
8
+ export declare const UrlInputError: Story;
9
+ export declare const UrlInputLoading: Story;
10
+ export declare const UrlInputSuccess: Story;
11
+ export declare const UrlInputLeftVariantDefault: Story;
12
+ export declare const UrlInputLeftVariantError: Story;
13
+ export declare const UrlInputLeftVariantLoading: Story;
14
+ export declare const UrlInputLeftVariantSuccess: Story;
@@ -10,3 +10,4 @@ export declare const TileWithTopIconAndSubtext: Story;
10
10
  export declare const TileWithTopIcon: Story;
11
11
  export declare const TileWithSubtext: Story;
12
12
  export declare const TileWithLeadingRadioIconAndSubtext: Story;
13
+ export declare const TileWithBottomComponent: Story;
@@ -179,6 +179,8 @@ declare const IconsObject: {
179
179
  InventoryIcon: (props: import("@chakra-ui/icon/dist/icon").IconProps) => import("react/jsx-runtime").JSX.Element;
180
180
  IosShareIcon: (props: import("@chakra-ui/icon/dist/icon").IconProps) => import("react/jsx-runtime").JSX.Element;
181
181
  KeyboardBackspaceIcon: (props: import("@chakra-ui/icon/dist/icon").IconProps) => import("react/jsx-runtime").JSX.Element;
182
+ KeyIcon: (props: import("@chakra-ui/icon/dist/icon").IconProps) => import("react/jsx-runtime").JSX.Element;
183
+ KeyOffIcon: (props: import("@chakra-ui/icon/dist/icon").IconProps) => import("react/jsx-runtime").JSX.Element;
182
184
  LanguageIcon: (props: import("@chakra-ui/icon/dist/icon").IconProps) => import("react/jsx-runtime").JSX.Element;
183
185
  LocalActivityIcon: (props: import("@chakra-ui/icon/dist/icon").IconProps) => import("react/jsx-runtime").JSX.Element;
184
186
  LibraryMusicIcon: (props: import("@chakra-ui/icon/dist/icon").IconProps) => import("react/jsx-runtime").JSX.Element;
@@ -4,4 +4,11 @@ import type { Meta } from "@storybook/react";
4
4
  declare const meta: Meta<typeof ClickTooltipWrapper>;
5
5
  export default meta;
6
6
  type Story = typeof meta;
7
+ /**
8
+ * Tooltip default usage
9
+ */
7
10
  export declare const Default: Story;
11
+ /**
12
+ * Tooltip usage with steppers enabled
13
+ */
14
+ export declare const WithSteppers: Story;
@@ -1,4 +1,4 @@
1
1
  /** @format */
2
2
  import { ICustomTooltip } from "components/notifications/ClickTooltip";
3
- declare const ClickTooltipWrapper: ({ label, body }: ICustomTooltip) => import("react/jsx-runtime").JSX.Element;
3
+ declare const ClickTooltipWrapper: ({ label, body, triggerComponent, ...rest }: ICustomTooltip) => import("react/jsx-runtime").JSX.Element;
4
4
  export default ClickTooltipWrapper;
@@ -1,7 +1,22 @@
1
1
  /** @format */
2
- import SnackbarWrapper from "./SnackbarWrapper";
2
+ import { CustomSnackbarContainer } from "components/notifications/Snackbar";
3
3
  import type { Meta } from "@storybook/react";
4
- declare const meta: Meta<typeof SnackbarWrapper>;
4
+ /**
5
+ * Please Note: That `<CustomSnackbarContainer />` only needs to be placed once at the root layout or route in your project E.g in your `App.tsx` file in react or root `layout.tsx` file when using Next14 App Router.
6
+ * You don't need to use `<CustomSnackbarContainer />` in each component file where you want to trigger a toast.
7
+ */
8
+ declare const meta: Meta<typeof CustomSnackbarContainer>;
5
9
  export default meta;
6
10
  type Story = typeof meta;
7
11
  export declare const Default: Story;
12
+ export declare const Success: Story;
13
+ export declare const Warning: Story;
14
+ export declare const Error: Story;
15
+ export declare const WithUndoButton: Story;
16
+ export declare const DefaultWithSubtext: Story;
17
+ export declare const SuccessWithSubtext: Story;
18
+ export declare const WarningWithSubtext: Story;
19
+ export declare const ErrorWithSubtext: Story;
20
+ export declare const SuccessWithSubtextAndUndoButton: Story;
21
+ export declare const WarningWithSubtextAndUndoButton: Story;
22
+ export declare const ErrorWithSubtextAndUndoButton: Story;
@@ -1,3 +1,2 @@
1
1
  /** @format */
2
- declare const SnackbarWrapper: () => import("react/jsx-runtime").JSX.Element;
3
- export default SnackbarWrapper;
2
+ export declare const SnackbarWrapper: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ /** @format */
2
+ import TagsUpdate from "components/notifications/TagsUpdate";
3
+ import type { Meta } from "@storybook/react";
4
+ declare const meta: Meta<typeof TagsUpdate>;
5
+ export default meta;
6
+ type Story = typeof meta;
7
+ export declare const Default: Story;
8
+ export declare const WithIcon: Story;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mainstack-design-system",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "type": "module",
5
5
  "main": "build/mainstack-design-system.js",
6
6
  "types": "build/src/index.d.ts",
@@ -47,6 +47,7 @@
47
47
  "@emotion/react": "^11.10.6",
48
48
  "@emotion/styled": "^11.10.6",
49
49
  "@storybook/preview-api": "^7.6.3",
50
+ "@storybook/test": "^8.1.6",
50
51
  "eslint-config-prettier": "^8.6.0",
51
52
  "eslint-plugin-prettier": "^4.2.1",
52
53
  "framer-motion": "^10.0.1",