fis-component 0.0.79 → 0.0.81

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.
@@ -2,7 +2,7 @@ import React from "react";
2
2
  export type ThemeType = "neutral" | "info" | "positive" | "caution" | "negative";
3
3
  export type ToastType = "link" | "button" | "no-action";
4
4
  export type PositionType = "inline" | "bottom";
5
- export type ToastPositionType = "top-center" | "bottom-center";
5
+ export type ToastPositionType = "top-center" | "bottom-center" | "top-right" | "bottom-right" | "top-left" | "bottom-left";
6
6
  export type ToastProps = {
7
7
  className?: string;
8
8
  theme?: ThemeType;
@@ -10,6 +10,6 @@ export declare const PTitleSC: import("styled-components/dist/types").IStyledCom
10
10
  export declare const LinkSC: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>> & string;
11
11
  export declare const DivTitleWrap: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ToastProps>> & string;
12
12
  export declare const ToastWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
13
- $position?: "top-center" | "bottom-center";
13
+ $position?: "top-center" | "bottom-center" | "top-right" | "bottom-right" | "top-left" | "bottom-left";
14
14
  }>> & string;
15
15
  export {};
@@ -23,6 +23,8 @@ interface TooltipProps extends Omit<TooltipPropsAntd, "variant" | "title"> {
23
23
  size?: TooltipSize;
24
24
  /** Child elements that the tooltip wraps (optional) */
25
25
  children?: React.ReactNode;
26
+ /** Enable smart placement (auto left/right) */
27
+ smartPlacement?: boolean;
26
28
  }
27
29
  declare const FISTooltip: FC<TooltipProps>;
28
30
  export default FISTooltip;
@@ -0,0 +1,5 @@
1
+ export type TooltipPlacement = "left" | "right";
2
+ export declare const useSmartTooltipPlacement: () => {
3
+ placement: TooltipPlacement;
4
+ calculatePlacement: (triggerEl: HTMLElement | null) => void;
5
+ };
package/dist/index.d.ts CHANGED
@@ -3847,6 +3847,8 @@ interface TooltipProps extends Omit<TooltipProps$1, "variant" | "title"> {
3847
3847
  size?: TooltipSize;
3848
3848
  /** Child elements that the tooltip wraps (optional) */
3849
3849
  children?: React.ReactNode;
3850
+ /** Enable smart placement (auto left/right) */
3851
+ smartPlacement?: boolean;
3850
3852
  }
3851
3853
  declare const FISTooltip: FC<TooltipProps>;
3852
3854
 
@@ -3974,7 +3976,7 @@ declare const FISCollapse: React.FC<CustomCollapseProps>;
3974
3976
  type ThemeType$1 = "neutral" | "info" | "positive" | "caution" | "negative";
3975
3977
  type ToastType = "link" | "button" | "no-action";
3976
3978
  type PositionType = "inline" | "bottom";
3977
- type ToastPositionType = "top-center" | "bottom-center";
3979
+ type ToastPositionType = "top-center" | "bottom-center" | "top-right" | "bottom-right" | "top-left" | "bottom-left";
3978
3980
  type ToastProps = {
3979
3981
  className?: string;
3980
3982
  theme?: ThemeType$1;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "homepage": "https://vietdiemtran.github.io/fis-component/",
3
3
  "name": "fis-component",
4
- "version": "0.0.79",
4
+ "version": "0.0.81",
5
5
  "description": "",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/esm/index.js",