@momo-webplatform/mobase 0.0.39 → 0.0.40

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 (35) hide show
  1. package/package.json +1 -1
  2. package/publish/cjs/components/Callout/Callout.js +46 -0
  3. package/publish/cjs/components/Callout/index.js +5 -0
  4. package/publish/cjs/components/SearchBar/SearchBar.js +48 -0
  5. package/publish/cjs/components/SearchBar/index.js +5 -0
  6. package/publish/cjs/components/TextButton/TextButton.js +63 -0
  7. package/publish/cjs/components/TextButton/index.js +5 -0
  8. package/publish/cjs/components/Toast/Toast.js +12 -11
  9. package/publish/cjs/components/Toast/index.js +4 -12
  10. package/publish/cjs/components/Toast/toaster.js +4 -4
  11. package/publish/cjs/components/Toast/{use-toast.js → useToast.js} +4 -2
  12. package/publish/cjs/index.js +4 -0
  13. package/publish/cjs/tsconfig.lib.tsbuildinfo +1 -1
  14. package/publish/esm/components/Callout/Callout.d.ts +19 -0
  15. package/publish/esm/components/Callout/Callout.js +43 -0
  16. package/publish/esm/components/Callout/index.d.ts +1 -0
  17. package/publish/esm/components/Callout/index.js +1 -0
  18. package/publish/esm/components/SearchBar/SearchBar.d.ts +7 -0
  19. package/publish/esm/components/SearchBar/SearchBar.js +45 -0
  20. package/publish/esm/components/SearchBar/index.d.ts +1 -0
  21. package/publish/esm/components/SearchBar/index.js +1 -0
  22. package/publish/esm/components/TextButton/TextButton.d.ts +22 -0
  23. package/publish/esm/components/TextButton/TextButton.js +36 -0
  24. package/publish/esm/components/TextButton/index.d.ts +2 -0
  25. package/publish/esm/components/TextButton/index.js +1 -0
  26. package/publish/esm/components/Toast/Toast.d.ts +1 -1
  27. package/publish/esm/components/Toast/Toast.js +13 -12
  28. package/publish/esm/components/Toast/index.d.ts +1 -2
  29. package/publish/esm/components/Toast/index.js +1 -2
  30. package/publish/esm/components/Toast/toaster.js +3 -3
  31. package/publish/esm/components/Toast/{use-toast.d.ts → useToast.d.ts} +1 -1
  32. package/publish/esm/components/Toast/{use-toast.js → useToast.js} +4 -2
  33. package/publish/esm/index.d.ts +4 -0
  34. package/publish/esm/index.js +4 -0
  35. package/publish/esm/tsconfig.lib.tsbuildinfo +1 -1
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import { type VariantProps } from "class-variance-authority";
3
+ interface CalloutProps {
4
+ message: string;
5
+ type: "neutral" | "error" | "success" | "warning" | "info";
6
+ withAction?: string;
7
+ onClickAction?: () => void;
8
+ className?: string;
9
+ disabled?: boolean;
10
+ actionClassName?: string;
11
+ }
12
+ export declare const Callout: import("react").ForwardRefExoticComponent<CalloutProps & VariantProps<(props?: ({
13
+ typeDiv?: "warning" | "error" | "neutral" | "success" | "info" | null | undefined;
14
+ disabled?: boolean | null | undefined;
15
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & VariantProps<(props?: ({
16
+ typeIcon?: "warning" | "error" | "neutral" | "success" | "info" | null | undefined;
17
+ disabled?: boolean | null | undefined;
18
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & import("react").RefAttributes<HTMLDivElement>>;
19
+ export {};
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { forwardRef } from "react";
4
+ import { cn } from "../../helpers/utils";
5
+ import { InformationCircleIcon } from "@heroicons/react/24/outline";
6
+ import { TextButton } from "../TextButton";
7
+ const calloutVariants = cva("px-3 py-2 rounded-md border flex items-center space-x-2 text-gray-700 text-sm ", {
8
+ variants: {
9
+ typeDiv: {
10
+ neutral: "bg-gray-50 border-gray-300 ",
11
+ error: "bg-red-50 border-red-300",
12
+ success: "bg-green-50 border-green-300",
13
+ warning: "bg-yellow-50 border-yellow-300",
14
+ info: "bg-blue-50 border-blue-300",
15
+ },
16
+ disabled: {
17
+ true: "text-gray-400 bg-gray-50 opacity-55 pointer-events-none border-gray-300",
18
+ },
19
+ },
20
+ defaultVariants: {
21
+ typeDiv: "neutral",
22
+ },
23
+ });
24
+ const iconVariants = cva("w-5 h-5 shrink-0 border-none p-0 ", {
25
+ variants: {
26
+ typeIcon: {
27
+ neutral: "text-gray-700",
28
+ error: "text-red-700",
29
+ success: "text-green-700",
30
+ warning: "text-yellow-700",
31
+ info: "text-blue-700",
32
+ },
33
+ disabled: {
34
+ true: "text-gray-400",
35
+ },
36
+ },
37
+ defaultVariants: {
38
+ typeIcon: "neutral",
39
+ },
40
+ });
41
+ export const Callout = forwardRef(({ type = "neutral", message = "", withAction = false, onClickAction, className, disabled, actionClassName, ...props }, ref) => {
42
+ return (_jsxs("div", { ref: ref, className: cn("", className, calloutVariants({ typeDiv: type, disabled })), ...props, children: [_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(InformationCircleIcon, { className: cn(iconVariants({ typeIcon: type, disabled })), width: 20, height: 20 }), _jsx("div", { children: "B\u1EA1n c\u1EA7n cho ph\u00E9p website s\u1EED d\u1EE5ng th\u00F4ng tin v\u1ECB tr\u00ED \u0111\u1EC3 s\u1EED d\u1EE5ng t\u00EDnh n\u0103ng n\u00E0y" })] }), withAction && (_jsx(TextButton, { variant: "primary", onClick: () => onClickAction?.(), className: cn("", actionClassName), isDisabled: disabled, children: withAction }))] }));
43
+ });
@@ -0,0 +1 @@
1
+ export { Callout } from "./Callout";
@@ -0,0 +1 @@
1
+ export { Callout } from "./Callout";
@@ -0,0 +1,7 @@
1
+ import { InputHTMLAttributes } from "react";
2
+ export interface SearchBarProps extends InputHTMLAttributes<HTMLInputElement> {
3
+ inputClassName?: string;
4
+ size?: 1 | 2;
5
+ onClickClear?: (inputValue: string) => void;
6
+ }
7
+ export declare const SearchBar: import("react").ForwardRefExoticComponent<SearchBarProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,45 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef, useEffect, useRef, useState, } from "react";
3
+ import { MagnifyingGlassIcon } from "@heroicons/react/20/solid";
4
+ import { XCircleIcon } from "@heroicons/react/24/outline";
5
+ import { cn } from "../../helpers/utils";
6
+ export const SearchBar = forwardRef(({ disabled, className, inputClassName, size, onChange, onFocus, onClickClear, value, defaultValue, type = "text", ...restProps }, ref) => {
7
+ const [clearable, setClearable] = useState(false);
8
+ const rootRef = useRef(null);
9
+ const handleShowClearButton = (inputValue) => {
10
+ if (inputValue && !clearable) {
11
+ setClearable(true);
12
+ }
13
+ if (!inputValue && clearable) {
14
+ setClearable(false);
15
+ }
16
+ };
17
+ const onChangeFactory = (event) => {
18
+ handleShowClearButton(event.target.value);
19
+ onChange?.(event);
20
+ };
21
+ const onFocusFactory = (event) => {
22
+ handleShowClearButton(event.target.value);
23
+ onFocus?.(event);
24
+ };
25
+ const handleClear = () => {
26
+ const inputTarget = rootRef.current?.querySelector("input");
27
+ if (!inputTarget)
28
+ return;
29
+ onClickClear?.(inputTarget.value);
30
+ inputTarget.value = "";
31
+ inputTarget.focus();
32
+ setClearable(false);
33
+ };
34
+ useEffect(() => {
35
+ handleShowClearButton(defaultValue || value);
36
+ }, [value, defaultValue]);
37
+ return (_jsxs("div", { className: cn(className), ref: rootRef, children: [_jsxs("div", { className: "relative flex items-center", children: [_jsx("div", { className: "absolute left-3 top-1/2 -translate-y-1/2 shrink-0 text-gray-500 duration-200 ", children: _jsx(MagnifyingGlassIcon, { className: "w-4 h-4 text-gray-500" }) }), _jsx("input", { disabled: disabled, type: type, ref: ref, className: cn("mobase-text-input-box text-gray-900 h-10 bg-white w-full transition-all text-sm rounded-md border border-gray-400 placeholder:text-gray-500 px-9 focus:border-pink-500 disabled:bg-gray-50 disabled:border-gray-300 disabled:pointer-events-none block disabled:opacity-50", inputClassName), onChange: onChangeFactory, onFocus: onFocusFactory, value: value, defaultValue: defaultValue, ...restProps }), clearable && (_jsx("button", { "aria-label": "button", type: "button", className: "absolute right-3 top-1/2 -translate-y-1/2 shrink-0 cursor-pointer text-gray-500 duration-200 hover:opacity-70 disabled:pointer-events-none", disabled: disabled, onClick: handleClear, children: _jsx(XCircleIcon, { strokeWidth: 2, width: 20, height: 20 }) }))] }), _jsx("style", { children: `
38
+ .mobase-text-input-box:hover {
39
+ box-shadow: 0px 0px 0px 1px rgb(var(--mobase-gray-400) / 1) inset;
40
+ }
41
+ .mobase-text-input-box:focus {
42
+ box-shadow: 0px 0px 0px 1px rgb(var(--mobase-pink-500) / 1) inset;
43
+ }
44
+ ` })] }));
45
+ });
@@ -0,0 +1 @@
1
+ export { SearchBar } from "./SearchBar";
@@ -0,0 +1 @@
1
+ export { SearchBar } from "./SearchBar";
@@ -0,0 +1,22 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const textButtonVariants: (props?: ({
4
+ variant?: "default" | "primary" | "secondary" | null | undefined;
5
+ size?: "default" | "lg" | null | undefined;
6
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
+ export interface TextButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof textButtonVariants> {
8
+ /**
9
+ * CSS class to be appended to the root element.
10
+ */
11
+ className?: string;
12
+ /**
13
+ * Change the default rendered element for the one passed as a child, merging their props and behavior.
14
+ */
15
+ asChild?: boolean;
16
+ /**
17
+ * Disabled interaction and applies disabled styles
18
+ */
19
+ isDisabled?: boolean;
20
+ }
21
+ declare const TextButton: React.ForwardRefExoticComponent<TextButtonProps & React.RefAttributes<HTMLButtonElement>>;
22
+ export { TextButton, textButtonVariants };
@@ -0,0 +1,36 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Slot } from "@radix-ui/react-slot";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../../helpers/utils";
6
+ // /dwd
7
+ const textButtonVariants = cva("inline-flex items-center justify-center whitespace-nowrap font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed border border-transparent flex-nowrap", {
8
+ variants: {
9
+ /**
10
+ * Determines style variation of Button component.
11
+ */
12
+ variant: {
13
+ default: "text-blue-700 hover:underline hover:bg-blue-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline",
14
+ primary: "text-pink-500 hover:underline hover:bg-pink-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline",
15
+ secondary: "text-gray-700 hover:underline hover:text-blue-700 hover:bg-blue-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline",
16
+ },
17
+ /**
18
+ * Determines size variation of Button component.
19
+ */
20
+ size: {
21
+ default: "text-sm",
22
+ lg: "text-base",
23
+ },
24
+ },
25
+ defaultVariants: {
26
+ variant: "default",
27
+ size: "default",
28
+ },
29
+ });
30
+ const TextButton = React.forwardRef(({ className, variant = "default", size = "default", asChild = false, isDisabled = false, ...props }, ref) => {
31
+ const Comp = asChild ? Slot : "button";
32
+ const buttonClassName = cn(textButtonVariants({ variant, size, className }));
33
+ return (_jsx(Comp, { className: buttonClassName, disabled: isDisabled, ref: ref, ...props, children: props.children }));
34
+ });
35
+ TextButton.displayName = "TextButton";
36
+ export { TextButton, textButtonVariants };
@@ -0,0 +1,2 @@
1
+ export { TextButton } from "./TextButton";
2
+ export type { TextButtonProps } from "./TextButton";
@@ -0,0 +1 @@
1
+ export { TextButton } from "./TextButton";
@@ -4,7 +4,7 @@ import { type VariantProps } from "class-variance-authority";
4
4
  declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
5
5
  declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
6
6
  declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
7
- variant?: "default" | "destructive" | null | undefined;
7
+ variant?: "sucess" | "warning" | "error" | null | undefined;
8
8
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLLIElement>>;
9
9
  declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
10
10
  declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
@@ -1,32 +1,33 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import * as ToastPrimitives from "@radix-ui/react-toast";
4
4
  import { cva } from "class-variance-authority";
5
- import { X } from "lucide-react";
6
5
  import { cn } from "../../helpers/utils";
6
+ import { XMarkIcon, CheckCircleIcon, ExclamationTriangleIcon, InformationCircleIcon, } from "@heroicons/react/20/solid";
7
7
  const ToastProvider = ToastPrimitives.Provider;
8
- const ToastViewport = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Viewport, { ref: ref, className: cn("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]", className), ...props })));
8
+ const ToastViewport = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Viewport, { ref: ref, className: cn("fixed bottom-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 left-0 sm:right-0 sm:left-auto sm:top-0 sm:bottom-auto sm:flex-col md:max-w-[420px]", className), ...props })));
9
9
  ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
10
- const toastVariants = cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full", {
10
+ const toastVariants = cva("group pointer-events-auto relative w-full overflow-hidden rounded-md border py-4 pr-10 pl-10 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-bottom-full data-[state=open]:sm:slide-in-from-top-full bg-white text-gray-900 border border-gray-200 border-l-4", {
11
11
  variants: {
12
12
  variant: {
13
- default: "border bg-background text-foreground",
14
- destructive: "destructive group border-destructive bg-destructive text-destructive-foreground",
13
+ sucess: "border-l-green-500",
14
+ warning: "border-l-yellow-500",
15
+ error: "border-l-red-500",
15
16
  },
16
17
  },
17
18
  defaultVariants: {
18
- variant: "default",
19
+ variant: "sucess",
19
20
  },
20
21
  });
21
- const Toast = React.forwardRef(({ className, variant, ...props }, ref) => {
22
- return (_jsx(ToastPrimitives.Root, { ref: ref, className: cn(toastVariants({ variant }), className), ...props }));
22
+ const Toast = React.forwardRef(({ className, variant = "sucess", children, ...props }, ref) => {
23
+ return (_jsxs(ToastPrimitives.Root, { ref: ref, className: cn(toastVariants({ variant }), className), ...props, children: [_jsxs("div", { className: "w-5 h-5 flex items-center justify-center absolute top-4 left-3", children: [variant === "sucess" && (_jsx(CheckCircleIcon, { className: "w-5 h-5 text-green-500" })), variant === "warning" && (_jsx(ExclamationTriangleIcon, { className: "w-5 h-5 text-yellow-500" })), variant === "error" && (_jsx(InformationCircleIcon, { className: "w-5 h-5 text-red-500" }))] }), children] }));
23
24
  });
24
25
  Toast.displayName = ToastPrimitives.Root.displayName;
25
- const ToastAction = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Action, { ref: ref, className: cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive", className), ...props })));
26
+ const ToastAction = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Action, { ref: ref, className: cn("inline-flex shrink-0 items-center justify-center bg-transparent text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-0 focus:ring-ring focus:ring-offset-0 disabled:pointer-events-none disabled:opacity-50 text-blue-600 hover:underline mt-2", className), ...props })));
26
27
  ToastAction.displayName = ToastPrimitives.Action.displayName;
27
- const ToastClose = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Close, { ref: ref, className: cn("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", className), "toast-close": "", ...props, children: _jsx(X, { className: "h-4 w-4" }) })));
28
+ const ToastClose = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Close, { ref: ref, className: cn("absolute right-2 top-2 rounded-md transition-opacity hover:opacity-70 focus:opacity-100 focus:outline-none focus:ring-2 text-gray-800 w-8 h-8 flex items-center justify-center", className), "toast-close": "", ...props, children: _jsx(XMarkIcon, { className: "h-5 w-5" }) })));
28
29
  ToastClose.displayName = ToastPrimitives.Close.displayName;
29
- const ToastTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Title, { ref: ref, className: cn("text-sm font-semibold", className), ...props })));
30
+ const ToastTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Title, { ref: ref, className: cn("text-base font-semibold leading-tight", className), ...props })));
30
31
  ToastTitle.displayName = ToastPrimitives.Title.displayName;
31
32
  const ToastDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Description, { ref: ref, className: cn("text-sm opacity-90", className), ...props })));
32
33
  ToastDescription.displayName = ToastPrimitives.Description.displayName;
@@ -1,3 +1,2 @@
1
- export { type ToastProps, type ToastActionElement, ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, } from "./Toast";
2
- export { useToast, toast } from "./use-toast";
1
+ export { useToast, toast } from "./useToast";
3
2
  export { Toaster } from "./toaster";
@@ -1,3 +1,2 @@
1
- export { ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, } from "./Toast";
2
- export { useToast, toast } from "./use-toast";
1
+ export { useToast, toast } from "./useToast";
3
2
  export { Toaster } from "./toaster";
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Toast, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, } from "../..//components/Toast/Toast";
4
- import { useToast } from "../../components/Toast/use-toast";
3
+ import { Toast, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, } from "./Toast";
4
+ import { useToast } from "./useToast";
5
5
  export function Toaster() {
6
6
  const { toasts } = useToast();
7
7
  return (_jsxs(ToastProvider, { children: [toasts.map(function ({ id, title, description, action, ...props }) {
8
- return (_jsxs(Toast, { ...props, children: [_jsxs("div", { className: "grid gap-1", children: [title && _jsx(ToastTitle, { children: title }), description && (_jsx(ToastDescription, { children: description }))] }), action, _jsx(ToastClose, {})] }, id));
8
+ return (_jsxs(Toast, { ...props, children: [_jsxs("div", { className: "grid gap-2", children: [title && _jsx(ToastTitle, { children: title }), description && (_jsx(ToastDescription, { children: description }))] }), action, _jsx(ToastClose, {})] }, id));
9
9
  }), _jsx(ToastViewport, {})] }));
10
10
  }
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import type { ToastActionElement, ToastProps } from "../..//components/Toast/Toast";
2
+ import type { ToastActionElement, ToastProps } from "./Toast";
3
3
  type ToasterToast = ToastProps & {
4
4
  id: string;
5
5
  title?: React.ReactNode;
@@ -22,7 +22,7 @@ const addToRemoveQueue = (toastId) => {
22
22
  toastTimeouts.delete(toastId);
23
23
  dispatch({
24
24
  type: "REMOVE_TOAST",
25
- toastId: toastId,
25
+ toastId,
26
26
  });
27
27
  }, TOAST_REMOVE_DELAY);
28
28
  toastTimeouts.set(toastId, timeout);
@@ -72,6 +72,8 @@ export const reducer = (state, action) => {
72
72
  ...state,
73
73
  toasts: state.toasts.filter((t) => t.id !== action.toastId),
74
74
  };
75
+ default:
76
+ return state;
75
77
  }
76
78
  };
77
79
  const listeners = [];
@@ -102,7 +104,7 @@ function toast({ ...props }) {
102
104
  },
103
105
  });
104
106
  return {
105
- id: id,
107
+ id,
106
108
  dismiss,
107
109
  update,
108
110
  };
@@ -10,6 +10,8 @@ export * from "./components/Pagination";
10
10
  export * from "./components/Popover";
11
11
  export * from "./components/Tabs";
12
12
  export * from "./components/TextArea";
13
+ export * from "./components/Toast";
14
+ export * from "./components/TextButton";
13
15
  export * from "./components/Tooltip";
14
16
  export * from "./components/TextInput";
15
17
  export * from "./components/Stepper";
@@ -22,5 +24,7 @@ export * from "./components/Footer";
22
24
  export * from "./components/Card";
23
25
  export * from "./components/Command";
24
26
  export * from "./components/Combobox";
27
+ export * from "./components/Callout";
28
+ export * from "./components/SearchBar";
25
29
  export * from "./mobase-tw-plugin";
26
30
  export * from "./site";
@@ -10,6 +10,8 @@ export * from "./components/Pagination";
10
10
  export * from "./components/Popover";
11
11
  export * from "./components/Tabs";
12
12
  export * from "./components/TextArea";
13
+ export * from "./components/Toast";
14
+ export * from "./components/TextButton";
13
15
  export * from "./components/Tooltip";
14
16
  export * from "./components/TextInput";
15
17
  export * from "./components/Stepper";
@@ -22,5 +24,7 @@ export * from "./components/Footer";
22
24
  export * from "./components/Card";
23
25
  export * from "./components/Command";
24
26
  export * from "./components/Combobox";
27
+ export * from "./components/Callout";
28
+ export * from "./components/SearchBar";
25
29
  export * from "./mobase-tw-plugin";
26
30
  export * from "./site";