gd-bs 5.7.1 → 5.7.2

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.
@@ -1,5 +1,5 @@
1
- import tippy, { Instance, animateFill, followCursor, inlinePositioning, sticky } from "tippy.js";
2
- import { ITippyProps } from "../../types";
1
+ import tippy, { Instance, animateFill, followCursor, inlinePositioning, sticky } from "../tippy";
2
+ import { ITippyProps } from "../types";
3
3
  import { IPopover, IPopoverProps } from "./types";
4
4
  import { Button } from "../button";
5
5
  import { Base } from "../base";
@@ -243,7 +243,7 @@ class _Popover extends Base<IPopoverProps> implements IPopover {
243
243
  }
244
244
 
245
245
  // Create the tippy
246
- this._tippy = tippy(this.el, options as any) as any;
246
+ this._tippy = tippy(this.el, options);
247
247
  }
248
248
 
249
249
  /**
@@ -55,15 +55,14 @@ export const Popover: (props: IPopoverProps, template?: string) => IPopover;
55
55
  /**
56
56
  * Popover Placements
57
57
  */
58
- export const PopoverPlacements: IPopoverPlacements;
58
+ export const PopoverPlacements: IPopoverPlacements;
59
59
 
60
60
  /**
61
61
  * Popover Types
62
62
  */
63
63
  export const PopoverTypes: IPopoverTypes;
64
64
 
65
- import { IBaseProps } from "../types";
66
- import { ITippyProps } from "../../types";
65
+ import { IBaseProps, ITippyProps } from "../types";
67
66
  import { IButtonProps } from "../button/types";
68
67
 
69
68
  /**
@@ -108,7 +107,7 @@ export interface IPopoverProps extends IBaseProps<IPopover> {
108
107
  /**
109
108
  * Popover Types
110
109
  */
111
- export type IPopoverTypes = {
110
+ export type IPopoverTypes = {
112
111
  Danger: number;
113
112
  Dark: number;
114
113
  Info: number;
@@ -125,7 +124,7 @@ export interface IPopoverProps extends IBaseProps<IPopover> {
125
124
  /**
126
125
  * Popover Placements
127
126
  */
128
- export type IPopoverPlacements = {
127
+ export type IPopoverPlacements = {
129
128
  Auto: number;
130
129
  AutoStart: number;
131
130
  AutoEnd: number;
@@ -0,0 +1,12 @@
1
+ import { Instance } from "tippy.js/index.d";
2
+ export { Instance }
3
+
4
+ import * as tippyJS from "tippy.js";
5
+ export const animateFill = tippyJS.animateFill;
6
+ export const followCursor = tippyJS.followCursor;
7
+ export const inlinePositioning = tippyJS.inlinePositioning;
8
+ export const sticky = tippyJS.sticky;
9
+
10
+ import { ITippyProps } from "./types";
11
+ const tippy: (el: HTMLElement, options: ITippyProps) => Instance = (tippyJS.default || tippyJS) as any;
12
+ export default tippy;
@@ -1,5 +1,5 @@
1
- import tippy, { Instance, animateFill, followCursor, inlinePositioning, sticky } from "tippy.js";
2
- import { ITippyProps } from "../../types";
1
+ import tippy, { Instance, animateFill, followCursor, inlinePositioning, sticky } from "../tippy";
2
+ import { ITippyProps } from "../types";
3
3
  import { ITooltip, ITooltipProps } from "./types";
4
4
  import { IButton } from "../button/types";
5
5
  import { Base } from "../base";
@@ -294,7 +294,7 @@ class _Tooltip extends Base<ITooltipProps> {
294
294
  }
295
295
 
296
296
  // Create the tippy
297
- this._tippy = tippy(this.props.target || this.el, options as any) as any;
297
+ this._tippy = tippy(this.props.target || this.el, options);
298
298
  }
299
299
 
300
300
  /**
@@ -51,8 +51,7 @@ export const TooltipPlacements: ITooltipPlacements;
51
51
  */
52
52
  export const TooltipTypes: ITooltipTypes;
53
53
 
54
- import { IBaseProps } from "../types";
55
- import { ITippyProps } from "../../types";
54
+ import { IBaseProps, ITippyProps } from "../types";
56
55
  import { IButtonProps, IButton } from "../button/types";
57
56
 
58
57
  /**
@@ -40,8 +40,7 @@
40
40
  */
41
41
  export const TooltipGroup: (props: ITooltipGroupProps, template?: string, btnTemplate?: string) => ITooltipGroup;
42
42
 
43
- import { ITippyProps } from "../../types";
44
- import { IBaseProps } from "../types";
43
+ import { IBaseProps, ITippyProps } from "../types";
45
44
  import { ITooltip, ITooltipProps } from "../tooltip/types";
46
45
 
47
46
  /**
@@ -30,4 +30,51 @@ export interface IBaseProps<IBaseObj = any> {
30
30
 
31
31
  /** The element to render the component to. */
32
32
  el?: Element | HTMLElement;
33
+ }
34
+
35
+ /** Tippy Options */
36
+ export interface ITippyProps {
37
+ allowHTML?: boolean;
38
+ animateFill?: boolean;
39
+ animation?: string | boolean;
40
+ appendTo?: Element;
41
+ aria?: object;
42
+ arrow?: boolean | string | SVGElement | DocumentFragment;
43
+ content?: string | Element;
44
+ delay?: number | [number | null, number | null];
45
+ duration?: number | [number | null, number | null];
46
+ followCursor?: boolean | 'horizontal' | 'vertical' | 'initial';
47
+ hideOnClick?: boolean | 'toggle';
48
+ ignoreAttributes?: boolean;
49
+ inertia?: boolean;
50
+ inlinePositioning?: boolean;
51
+ interactive?: boolean;
52
+ interactiveBorder?: number;
53
+ interactiveDebounce?: number;
54
+ maxWidth?: number | string;
55
+ moveTransition?: string;
56
+ offset?: number[];
57
+ onAfterUpdate?: (tippyObj?, props?) => void;
58
+ onBeforeUpdate?: (tippyObj?, props?) => void;
59
+ onClickOutside?: (tippyObj?, ev?) => void;
60
+ onCreate?: (tippyObj?) => void;
61
+ onDestroy?: (tippyObj?) => void;
62
+ onHidden?: (tippyObj?) => void;
63
+ onHide?: (tippyObj?) => void;
64
+ onMount?: (tippyObj?) => void;
65
+ onShow?: (tippyObj?) => void;
66
+ onShown?: (tippyObj?) => void;
67
+ onTrigger?: (tippyObj?, ev?) => void;
68
+ onUntrigger?: (tippyObj?, ev?) => void;
69
+ placement?: string;
70
+ plugins?: any[];
71
+ popperOptions?: object;
72
+ role?: string;
73
+ showOnCreate?: boolean;
74
+ sticky?: boolean | 'reference' | 'popper';
75
+ theme?: string;
76
+ touch?: boolean | 'hold' | ['hold', number];
77
+ trigger?: string;
78
+ triggerTarget?: Element | Element[] | null;
79
+ zIndex?: number;
33
80
  }
@@ -9,7 +9,7 @@ import * as Components from "./components";
9
9
  export { Components }
10
10
 
11
11
  // TippyJS library
12
- import tippy from "tippy.js";
12
+ import tippy from "./components/tippy";
13
13
  export { tippy }
14
14
 
15
15
  // Icons
package/src/index.ts CHANGED
@@ -9,7 +9,7 @@ import * as Components from "./components";
9
9
  export { Components }
10
10
 
11
11
  // TippyJS library
12
- import * as tippy from "tippy.js";
12
+ import tippy from "./components/tippy";
13
13
  export { tippy }
14
14
 
15
15
  // Bootstrap Global library
package/src/types.d.ts DELETED
@@ -1,45 +0,0 @@
1
- export interface ITippyProps {
2
- allowHTML?: boolean;
3
- animateFill?: boolean;
4
- animation?: string | boolean;
5
- appendTo?: Element;
6
- aria?: object;
7
- arrow?: boolean | string | SVGElement | DocumentFragment;
8
- content?: string | Element;
9
- delay?: number | [number | null, number | null];
10
- duration?: number | [number | null, number | null];
11
- followCursor?: boolean | 'horizontal' | 'vertical' | 'initial';
12
- hideOnClick?: boolean | 'toggle';
13
- ignoreAttributes?: boolean;
14
- inertia?: boolean;
15
- inlinePositioning?: boolean;
16
- interactive?: boolean;
17
- interactiveBorder?: number;
18
- interactiveDebounce?: number;
19
- maxWidth?: number | string;
20
- moveTransition?: string;
21
- offset?: number[];
22
- onAfterUpdate?: (tippyObj?, props?) => void;
23
- onBeforeUpdate?: (tippyObj?, props?) => void;
24
- onClickOutside?: (tippyObj?, ev?) => void;
25
- onCreate?: (tippyObj?) => void;
26
- onDestroy?: (tippyObj?) => void;
27
- onHidden?: (tippyObj?) => void;
28
- onHide?: (tippyObj?) => void;
29
- onMount?: (tippyObj?) => void;
30
- onShow?: (tippyObj?) => void;
31
- onShown?: (tippyObj?) => void;
32
- onTrigger?: (tippyObj?, ev?) => void;
33
- onUntrigger?: (tippyObj?, ev?) => void;
34
- placement?: string;
35
- plugins?: any[];
36
- popperOptions?: object;
37
- role?: string;
38
- showOnCreate?: boolean;
39
- sticky?: boolean | 'reference' | 'popper';
40
- theme?: string;
41
- touch?: boolean | 'hold' | ['hold', number];
42
- trigger?: string;
43
- triggerTarget?: Element | Element[] | null;
44
- zIndex?: number;
45
- }