gd-bs 5.7.1 → 5.7.4
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.
- package/build/bs.js +1 -1
- package/build/components/popover/index.js +1 -1
- package/build/components/tooltip/index.js +1 -1
- package/build/index-icons.js +1 -1
- package/build/index.js +3 -3
- package/build/tippy.js +2 -0
- package/clean.js +9 -0
- package/dist/gd-bs-icons.js +1090 -1695
- package/dist/gd-bs-icons.min.js +2 -1
- package/dist/gd-bs-icons.min.js.LICENSE.txt +5 -0
- package/dist/gd-bs.d.ts +51 -55
- package/dist/gd-bs.js +1022 -1022
- package/dist/gd-bs.min.js +2 -1
- package/dist/gd-bs.min.js.LICENSE.txt +1 -0
- package/package.json +4 -2
- package/pnpm-lock.yaml +3324 -0
- package/post-build.js +7 -1
- package/pre-build.js +30 -0
- package/src/components/popover/index.ts +4 -4
- package/src/components/popover/types.d.ts +4 -5
- package/src/components/tooltip/index.ts +4 -4
- package/src/components/tooltip/types.d.ts +1 -2
- package/src/components/tooltipGroup/types.d.ts +1 -2
- package/src/components/types.d.ts +47 -0
- package/src/index-icons.ts +1 -1
- package/src/index.ts +1 -1
- package/src/tippy.js/index.ts +14 -0
- package/src/tippy.js/popper.js +1991 -0
- package/src/tippy.js/tippy.js +2497 -0
- package/src/types.d.ts +0 -45
package/post-build.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
var fs = require('fs');
|
|
2
2
|
|
|
3
|
-
//
|
|
3
|
+
// Delete the txt file
|
|
4
|
+
fs.rmSync("./build/tippy.js.LICENSE.txt");
|
|
5
|
+
|
|
6
|
+
// Log
|
|
7
|
+
console.log("Successfully removed the webpack output txt file.");
|
|
8
|
+
|
|
9
|
+
// Copy the type definition file
|
|
4
10
|
fs.copyFileSync("src/icons/svgs/index.d.ts", "build/icons/svgs/index.d.ts");
|
|
5
11
|
|
|
6
12
|
// Log
|
package/pre-build.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var fs = require('fs');
|
|
2
|
+
|
|
3
|
+
// Deletes a directory
|
|
4
|
+
function deleteDirectory(src) {
|
|
5
|
+
// Ensure the directory exists
|
|
6
|
+
if (fs.existsSync(src) && fs.lstatSync(src).isDirectory()) {
|
|
7
|
+
// Get each item in the directory
|
|
8
|
+
fs.readdirSync(src).forEach(function(item) {
|
|
9
|
+
var srcPath = src + "/" + item;
|
|
10
|
+
|
|
11
|
+
// See if this is a directory
|
|
12
|
+
if (fs.lstatSync(srcPath).isDirectory()) {
|
|
13
|
+
// Delete the folder recursively
|
|
14
|
+
deleteDirectory(srcPath);
|
|
15
|
+
} else {
|
|
16
|
+
// Delete the file
|
|
17
|
+
fs.unlinkSync(srcPath);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Delete the directory
|
|
22
|
+
fs.rmdirSync(src);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// Log
|
|
27
|
+
console.log("Removing the tippy.js build directory");
|
|
28
|
+
|
|
29
|
+
// Delete the folders
|
|
30
|
+
deleteDirectory("./build/tippy.js");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import tippy, {
|
|
2
|
-
import { ITippyProps } from "
|
|
1
|
+
import tippy, { animateFill, followCursor, inlinePositioning, sticky } from "../../tippy.js";
|
|
2
|
+
import { ITippyProps } from "../types";
|
|
3
3
|
import { IPopover, IPopoverProps } from "./types";
|
|
4
4
|
import { Button } from "../button";
|
|
5
5
|
import { Base } from "../base";
|
|
@@ -48,7 +48,7 @@ export enum PopoverPlacements {
|
|
|
48
48
|
*/
|
|
49
49
|
class _Popover extends Base<IPopoverProps> implements IPopover {
|
|
50
50
|
private _elContent: HTMLDivElement = null;
|
|
51
|
-
private _tippy
|
|
51
|
+
private _tippy = null;
|
|
52
52
|
|
|
53
53
|
// Constructor
|
|
54
54
|
constructor(props: IPopoverProps, template: string = "") {
|
|
@@ -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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
127
|
+
export type IPopoverPlacements = {
|
|
129
128
|
Auto: number;
|
|
130
129
|
AutoStart: number;
|
|
131
130
|
AutoEnd: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import tippy, {
|
|
2
|
-
import { ITippyProps } from "
|
|
1
|
+
import tippy, { animateFill, followCursor, inlinePositioning, sticky } from "../../tippy.js";
|
|
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";
|
|
@@ -50,7 +50,7 @@ export enum TooltipPlacements {
|
|
|
50
50
|
class _Tooltip extends Base<ITooltipProps> {
|
|
51
51
|
private _btn: IButton = null;
|
|
52
52
|
private _elContent: HTMLElement = null;
|
|
53
|
-
private _tippy
|
|
53
|
+
private _tippy = null;
|
|
54
54
|
|
|
55
55
|
// Constructor
|
|
56
56
|
constructor(props: ITooltipProps, template: string = "") {
|
|
@@ -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
|
|
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 "
|
|
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
|
}
|
package/src/index-icons.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const tippy = require("./tippy.js");
|
|
2
|
+
|
|
3
|
+
// Plugins
|
|
4
|
+
export const animateFill = tippy.animateFill;
|
|
5
|
+
export const createSingleton = tippy.createSingleton;
|
|
6
|
+
export const delegate = tippy.delegate;
|
|
7
|
+
export const followCursor = tippy.followCursor;
|
|
8
|
+
export const hideAll = tippy.hideAll;
|
|
9
|
+
export const inlinePositioning = tippy.inlinePositioning;
|
|
10
|
+
export const roundArrow = tippy.roundArrow;
|
|
11
|
+
export const sticky = tippy.sticky;
|
|
12
|
+
|
|
13
|
+
// Default
|
|
14
|
+
export default tippy;
|