gd-bs 5.7.3 → 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/components/popover/index.js +2 -2
- package/build/components/tooltip/index.js +2 -2
- package/build/index-icons.js +1 -1
- package/build/index.js +1 -1
- package/build/tippy.js +2 -0
- package/clean.js +9 -0
- package/dist/gd-bs-icons.js +31 -636
- package/dist/gd-bs-icons.min.js +2 -1
- package/dist/gd-bs-icons.min.js.LICENSE.txt +5 -0
- package/dist/gd-bs.js +13 -23
- package/dist/gd-bs.min.js +2 -1
- package/dist/gd-bs.min.js.LICENSE.txt +1 -0
- package/package.json +3 -2
- package/post-build.js +7 -1
- package/pre-build.js +30 -0
- package/src/components/popover/index.ts +3 -3
- package/src/components/tooltip/index.ts +3 -3
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! For license information please see tippy.js.LICENSE.txt */
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gd-bs",
|
|
3
|
-
"version": "5.7.
|
|
3
|
+
"version": "5.7.4",
|
|
4
4
|
"description": "Bootstrap JavaScript, TypeScript and Web Components library.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"typings": "src/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"all": "npm run clean && npm run generate-icons && npm run build && npm run build-icons && npm run prod && npm run prod-icons && npm run typings && npm run docs",
|
|
9
|
-
"build": "tsc && npm run build-bs && webpack --mode=development && npm run post-build",
|
|
9
|
+
"build": "tsc && npm run build-tippy && npm run build-bs && webpack --mode=development && npm run post-build",
|
|
10
10
|
"build-bs": "webpack --mode=production --config webpack.sass.js",
|
|
11
11
|
"build-icons": "webpack --mode=development --config webpack.icons.js",
|
|
12
|
+
"build-tippy": "node ./pre-build.js && webpack --mode=production --config webpack.tippy.js",
|
|
12
13
|
"post-build": "node ./post-build",
|
|
13
14
|
"clean": "node ./clean.js",
|
|
14
15
|
"docs": "typedoc",
|
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,4 +1,4 @@
|
|
|
1
|
-
import tippy, {
|
|
1
|
+
import tippy, { animateFill, followCursor, inlinePositioning, sticky } from "../../tippy.js";
|
|
2
2
|
import { ITippyProps } from "../types";
|
|
3
3
|
import { IPopover, IPopoverProps } from "./types";
|
|
4
4
|
import { Button } from "../button";
|
|
@@ -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 =
|
|
246
|
+
this._tippy = tippy(this.el, options);
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import tippy, {
|
|
1
|
+
import tippy, { animateFill, followCursor, inlinePositioning, sticky } from "../../tippy.js";
|
|
2
2
|
import { ITippyProps } from "../types";
|
|
3
3
|
import { ITooltip, ITooltipProps } from "./types";
|
|
4
4
|
import { IButton } from "../button/types";
|
|
@@ -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 =
|
|
297
|
+
this._tippy = tippy(this.props.target || this.el, options);
|
|
298
298
|
}
|
|
299
299
|
|
|
300
300
|
/**
|
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;
|