gd-bs 5.7.3 → 5.7.6
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 +1 -1
- package/build/components/tooltip/index.js +1 -1
- package/dist/gd-bs-icons.js +2 -2
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.js +659 -13
- package/dist/gd-bs.min.js +1 -1
- package/package.json +3 -2
- package/post-build.js +1 -1
- package/src/components/popover/index.ts +3 -3
- package/src/components/tooltip/index.ts +3 -3
|
@@ -255,7 +255,7 @@ var _Popover = /** @class */ (function (_super) {
|
|
|
255
255
|
_this.props.options && _this.props.options.onCreate ? _this.props.options.onCreate(tippyObj) : null;
|
|
256
256
|
};
|
|
257
257
|
// Create the tippy
|
|
258
|
-
this._tippy = tippy_js_1.default(this.el, options);
|
|
258
|
+
this._tippy = (0, tippy_js_1.default)(this.el, options);
|
|
259
259
|
};
|
|
260
260
|
/**
|
|
261
261
|
* Public Interface
|
|
@@ -303,7 +303,7 @@ var _Tooltip = /** @class */ (function (_super) {
|
|
|
303
303
|
_this.props.options && _this.props.options.onCreate ? _this.props.options.onCreate(tippyObj) : null;
|
|
304
304
|
};
|
|
305
305
|
// Create the tippy
|
|
306
|
-
this._tippy = tippy_js_1.default(this.props.target || this.el, options);
|
|
306
|
+
this._tippy = (0, tippy_js_1.default)(this.props.target || this.el, options);
|
|
307
307
|
};
|
|
308
308
|
Object.defineProperty(_Tooltip.prototype, "button", {
|
|
309
309
|
/**
|
package/dist/gd-bs-icons.js
CHANGED
|
@@ -1347,7 +1347,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));
|
|
|
1347
1347
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1348
1348
|
|
|
1349
1349
|
"use strict";
|
|
1350
|
-
eval("\n\nvar __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n };\n\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.Popover = exports.PopoverPlacements = exports.PopoverTypes = void 0;\n\nvar tippy_js_1 = __webpack_require__(/*! tippy.js */ \"./node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/dist/tippy.esm.js\");\n\nvar button_1 = __webpack_require__(/*! ../button */ \"./src/components/button/index.ts\");\n\nvar base_1 = __webpack_require__(/*! ../base */ \"./src/components/base.ts\");\n\nvar common_1 = __webpack_require__(/*! ../common */ \"./src/components/common.ts\");\n/**\r\n * Popover Types\r\n */\n\n\nvar PopoverTypes;\n\n(function (PopoverTypes) {\n PopoverTypes[PopoverTypes[\"Danger\"] = 1] = \"Danger\";\n PopoverTypes[PopoverTypes[\"Dark\"] = 2] = \"Dark\";\n PopoverTypes[PopoverTypes[\"Info\"] = 3] = \"Info\";\n PopoverTypes[PopoverTypes[\"Light\"] = 4] = \"Light\";\n PopoverTypes[PopoverTypes[\"LightBorder\"] = 5] = \"LightBorder\";\n PopoverTypes[PopoverTypes[\"Material\"] = 6] = \"Material\";\n PopoverTypes[PopoverTypes[\"Primary\"] = 7] = \"Primary\";\n PopoverTypes[PopoverTypes[\"Secondary\"] = 8] = \"Secondary\";\n PopoverTypes[PopoverTypes[\"Success\"] = 9] = \"Success\";\n PopoverTypes[PopoverTypes[\"Translucent\"] = 10] = \"Translucent\";\n PopoverTypes[PopoverTypes[\"Warning\"] = 11] = \"Warning\";\n})(PopoverTypes = exports.PopoverTypes || (exports.PopoverTypes = {}));\n/**\r\n * Popover Placements\r\n */\n\n\nvar PopoverPlacements;\n\n(function (PopoverPlacements) {\n PopoverPlacements[PopoverPlacements[\"Auto\"] = 1] = \"Auto\";\n PopoverPlacements[PopoverPlacements[\"AutoStart\"] = 2] = \"AutoStart\";\n PopoverPlacements[PopoverPlacements[\"AutoEnd\"] = 3] = \"AutoEnd\";\n PopoverPlacements[PopoverPlacements[\"Bottom\"] = 4] = \"Bottom\";\n PopoverPlacements[PopoverPlacements[\"BottomStart\"] = 5] = \"BottomStart\";\n PopoverPlacements[PopoverPlacements[\"BottomEnd\"] = 6] = \"BottomEnd\";\n PopoverPlacements[PopoverPlacements[\"Left\"] = 7] = \"Left\";\n PopoverPlacements[PopoverPlacements[\"LeftStart\"] = 8] = \"LeftStart\";\n PopoverPlacements[PopoverPlacements[\"LeftEnd\"] = 9] = \"LeftEnd\";\n PopoverPlacements[PopoverPlacements[\"Right\"] = 10] = \"Right\";\n PopoverPlacements[PopoverPlacements[\"RightStart\"] = 11] = \"RightStart\";\n PopoverPlacements[PopoverPlacements[\"RightEnd\"] = 12] = \"RightEnd\";\n PopoverPlacements[PopoverPlacements[\"Top\"] = 13] = \"Top\";\n PopoverPlacements[PopoverPlacements[\"TopStart\"] = 14] = \"TopStart\";\n PopoverPlacements[PopoverPlacements[\"TopEnd\"] = 15] = \"TopEnd\";\n})(PopoverPlacements = exports.PopoverPlacements || (exports.PopoverPlacements = {}));\n/**\r\n * Popover\r\n */\n\n\nvar _Popover =\n/** @class */\nfunction (_super) {\n __extends(_Popover, _super); // Constructor\n\n\n function _Popover(props, template) {\n if (template === void 0) {\n template = \"\";\n }\n\n var _this = _super.call(this, template, props) || this;\n\n _this._elContent = null;\n _this._tippy = null; // Configure the collapse\n\n _this.configure(); // Configure the parent, if the target wasn't specified\n\n\n _this.props.target ? null : _this.configureParent();\n return _this;\n } // Configure the card group\n\n\n _Popover.prototype.configure = function () {\n var _this = this; // Set the placements\n\n\n var placement = null;\n\n switch (this.props.placement) {\n // Auto\n case PopoverPlacements.Auto:\n placement = \"auto\";\n break;\n\n case PopoverPlacements.AutoEnd:\n placement = \"auto-end\";\n break;\n\n case PopoverPlacements.AutoStart:\n placement = \"auto-start\";\n break;\n // Bottom\n\n case PopoverPlacements.Bottom:\n placement = \"bottom\";\n break;\n\n case PopoverPlacements.BottomEnd:\n placement = \"bottom-end\";\n break;\n\n case PopoverPlacements.BottomStart:\n placement = \"bottom-start\";\n break;\n // Left\n\n case PopoverPlacements.Left:\n placement = \"left\";\n break;\n\n case PopoverPlacements.LeftEnd:\n placement = \"left-end\";\n break;\n\n case PopoverPlacements.LeftStart:\n placement = \"left-start\";\n break;\n // Right\n\n case PopoverPlacements.Right:\n placement = \"right\";\n break;\n\n case PopoverPlacements.RightEnd:\n placement = \"right-end\";\n break;\n\n case PopoverPlacements.RightStart:\n placement = \"right-start\";\n break;\n // Top\n\n case PopoverPlacements.Top:\n placement = \"top\";\n break;\n\n case PopoverPlacements.TopEnd:\n placement = \"top-end\";\n break;\n\n case PopoverPlacements.TopStart:\n placement = \"top-start\";\n break;\n // Default - Auto\n\n default:\n placement = \"top\";\n break;\n } // Set the theme\n\n\n var theme = null;\n\n switch (this.props.type) {\n // Dark\n case PopoverTypes.Dark:\n theme = \"dark\";\n break;\n // Danger\n\n case PopoverTypes.Danger:\n theme = \"danger\";\n break;\n // Info\n\n case PopoverTypes.Info:\n theme = \"info\";\n break;\n // Light\n\n case PopoverTypes.Light:\n theme = \"light\";\n break;\n\n case PopoverTypes.LightBorder:\n theme = \"light-border\";\n break;\n // Material\n\n case PopoverTypes.Material:\n theme = \"material\";\n break;\n // Primary\n\n case PopoverTypes.Primary:\n theme = \"primary\";\n break;\n // Secondary\n\n case PopoverTypes.Secondary:\n theme = \"secondary\";\n break;\n // Success\n\n case PopoverTypes.Success:\n theme = \"success\";\n break;\n // Translucent\n\n case PopoverTypes.Translucent:\n theme = \"translucent\";\n break;\n // Warning\n\n case PopoverTypes.Warning:\n theme = \"warning\";\n break;\n // Default - Light Border\n\n default:\n theme = \"light-border\";\n break;\n } // Set the options\n\n\n var options = __assign({\n allowHTML: true,\n animation: \"scale\",\n arrow: true,\n delay: 100,\n inertia: true,\n interactive: true,\n placement: placement,\n plugins: [tippy_js_1.animateFill, tippy_js_1.followCursor, tippy_js_1.inlinePositioning, tippy_js_1.sticky],\n theme: theme\n }, this.props.options); // See if we are targeting an element\n\n\n var elPopover = null;\n\n if (this.props.target) {\n // Set the popover to the target element\n elPopover = this.props.target; // Ensure the attributes are set in the target element\n\n elPopover.setAttribute(\"tabindex\", \"0\"); // Update this element\n\n this.el = elPopover;\n } else {\n // Create the button\n var btnProps = this.props.btnProps || {};\n btnProps.isLink = this.props.isDismissible ? true : false;\n btnProps.tabIndex = btnProps.tabIndex || 0;\n this.el = (0, button_1.Button)(btnProps).el;\n } // Create the popover content element\n\n\n this._elContent = document.createElement(\"div\");\n\n this._elContent.classList.add(\"popover-content\");\n\n this._elContent.innerHTML = '<h5 class=\"popover-header m-0\"></h5><div class=\"popover-body\"></div>';\n (0, common_1.appendContent)(this._elContent.querySelector(\".popover-header\"), this.props.title);\n (0, common_1.appendContent)(this._elContent.querySelector(\".popover-body\"), options.content);\n options.content = this._elContent; // Set the on create event\n\n options[\"onCreate\"] = function (tippyObj) {\n // Get the content element\n var elContent = tippyObj.popper.querySelector(\".tippy-content\");\n\n if (elContent) {\n // Set the class\n elContent.classList.add(\"bs\"); // Set the styling\n\n elContent.style.padding = \"0\"; // Get the custom class name(s)\n\n var custom = (_this.props.className || \"\").trim().split(\" \");\n\n for (var i = 0; i < custom.length; i++) {\n var className = custom[i]; // Add the custom class name\n\n className ? elContent.classList.add(custom[i]) : null;\n }\n } // Call the custom event if it's defined\n\n\n _this.props.options && _this.props.options.onCreate ? _this.props.options.onCreate(tippyObj) : null;\n }; // Create the tippy\n\n\n this._tippy = tippy_js_1[\"default\"](this.el, options);\n };\n /**\r\n * Public Interface\r\n */\n // Disables the popover\n\n\n _Popover.prototype.disable = function () {\n // Disable the target element\n this.el.disabled = true;\n }; // Enables the popover\n\n\n _Popover.prototype.enable = function () {\n // Enable the target element\n this.el.disabled = false;\n }; // Hides the popover\n\n\n _Popover.prototype.hide = function () {\n // See if it's visible\n if (this.isVisible) {\n this._tippy.hide();\n }\n };\n\n Object.defineProperty(_Popover.prototype, \"isVisible\", {\n // Determines if the popover is visible\n get: function get() {\n return this._tippy.state.isVisible;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(_Popover.prototype, \"tippy\", {\n // The tippy instance\n get: function get() {\n return this._tippy;\n },\n enumerable: false,\n configurable: true\n }); // Sets the tippy content\n\n _Popover.prototype.setContent = function (content) {\n // Set the tippy content\n this.tippy.setContent(content);\n }; // Shows the popover\n\n\n _Popover.prototype.show = function () {\n // See if it's hidden\n if (!this.isVisible) {\n this._tippy.show();\n }\n }; // Toggles the popover\n\n\n _Popover.prototype.toggle = function () {\n // Toggle the element\n if (this.isVisible) {\n // Hide the element\n this.hide();\n } else {\n // Show the element\n this.show();\n }\n };\n\n return _Popover;\n}(base_1.Base);\n\nvar Popover = function Popover(props, template) {\n return new _Popover(props, template);\n};\n\nexports.Popover = Popover;\n\n//# sourceURL=webpack://gd-bs/./src/components/popover/index.ts?");
|
|
1350
|
+
eval("\n\nvar __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n };\n\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.Popover = exports.PopoverPlacements = exports.PopoverTypes = void 0;\n\nvar tippy_js_1 = __webpack_require__(/*! tippy.js */ \"./node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/dist/tippy.esm.js\");\n\nvar button_1 = __webpack_require__(/*! ../button */ \"./src/components/button/index.ts\");\n\nvar base_1 = __webpack_require__(/*! ../base */ \"./src/components/base.ts\");\n\nvar common_1 = __webpack_require__(/*! ../common */ \"./src/components/common.ts\");\n/**\r\n * Popover Types\r\n */\n\n\nvar PopoverTypes;\n\n(function (PopoverTypes) {\n PopoverTypes[PopoverTypes[\"Danger\"] = 1] = \"Danger\";\n PopoverTypes[PopoverTypes[\"Dark\"] = 2] = \"Dark\";\n PopoverTypes[PopoverTypes[\"Info\"] = 3] = \"Info\";\n PopoverTypes[PopoverTypes[\"Light\"] = 4] = \"Light\";\n PopoverTypes[PopoverTypes[\"LightBorder\"] = 5] = \"LightBorder\";\n PopoverTypes[PopoverTypes[\"Material\"] = 6] = \"Material\";\n PopoverTypes[PopoverTypes[\"Primary\"] = 7] = \"Primary\";\n PopoverTypes[PopoverTypes[\"Secondary\"] = 8] = \"Secondary\";\n PopoverTypes[PopoverTypes[\"Success\"] = 9] = \"Success\";\n PopoverTypes[PopoverTypes[\"Translucent\"] = 10] = \"Translucent\";\n PopoverTypes[PopoverTypes[\"Warning\"] = 11] = \"Warning\";\n})(PopoverTypes = exports.PopoverTypes || (exports.PopoverTypes = {}));\n/**\r\n * Popover Placements\r\n */\n\n\nvar PopoverPlacements;\n\n(function (PopoverPlacements) {\n PopoverPlacements[PopoverPlacements[\"Auto\"] = 1] = \"Auto\";\n PopoverPlacements[PopoverPlacements[\"AutoStart\"] = 2] = \"AutoStart\";\n PopoverPlacements[PopoverPlacements[\"AutoEnd\"] = 3] = \"AutoEnd\";\n PopoverPlacements[PopoverPlacements[\"Bottom\"] = 4] = \"Bottom\";\n PopoverPlacements[PopoverPlacements[\"BottomStart\"] = 5] = \"BottomStart\";\n PopoverPlacements[PopoverPlacements[\"BottomEnd\"] = 6] = \"BottomEnd\";\n PopoverPlacements[PopoverPlacements[\"Left\"] = 7] = \"Left\";\n PopoverPlacements[PopoverPlacements[\"LeftStart\"] = 8] = \"LeftStart\";\n PopoverPlacements[PopoverPlacements[\"LeftEnd\"] = 9] = \"LeftEnd\";\n PopoverPlacements[PopoverPlacements[\"Right\"] = 10] = \"Right\";\n PopoverPlacements[PopoverPlacements[\"RightStart\"] = 11] = \"RightStart\";\n PopoverPlacements[PopoverPlacements[\"RightEnd\"] = 12] = \"RightEnd\";\n PopoverPlacements[PopoverPlacements[\"Top\"] = 13] = \"Top\";\n PopoverPlacements[PopoverPlacements[\"TopStart\"] = 14] = \"TopStart\";\n PopoverPlacements[PopoverPlacements[\"TopEnd\"] = 15] = \"TopEnd\";\n})(PopoverPlacements = exports.PopoverPlacements || (exports.PopoverPlacements = {}));\n/**\r\n * Popover\r\n */\n\n\nvar _Popover =\n/** @class */\nfunction (_super) {\n __extends(_Popover, _super); // Constructor\n\n\n function _Popover(props, template) {\n if (template === void 0) {\n template = \"\";\n }\n\n var _this = _super.call(this, template, props) || this;\n\n _this._elContent = null;\n _this._tippy = null; // Configure the collapse\n\n _this.configure(); // Configure the parent, if the target wasn't specified\n\n\n _this.props.target ? null : _this.configureParent();\n return _this;\n } // Configure the card group\n\n\n _Popover.prototype.configure = function () {\n var _this = this; // Set the placements\n\n\n var placement = null;\n\n switch (this.props.placement) {\n // Auto\n case PopoverPlacements.Auto:\n placement = \"auto\";\n break;\n\n case PopoverPlacements.AutoEnd:\n placement = \"auto-end\";\n break;\n\n case PopoverPlacements.AutoStart:\n placement = \"auto-start\";\n break;\n // Bottom\n\n case PopoverPlacements.Bottom:\n placement = \"bottom\";\n break;\n\n case PopoverPlacements.BottomEnd:\n placement = \"bottom-end\";\n break;\n\n case PopoverPlacements.BottomStart:\n placement = \"bottom-start\";\n break;\n // Left\n\n case PopoverPlacements.Left:\n placement = \"left\";\n break;\n\n case PopoverPlacements.LeftEnd:\n placement = \"left-end\";\n break;\n\n case PopoverPlacements.LeftStart:\n placement = \"left-start\";\n break;\n // Right\n\n case PopoverPlacements.Right:\n placement = \"right\";\n break;\n\n case PopoverPlacements.RightEnd:\n placement = \"right-end\";\n break;\n\n case PopoverPlacements.RightStart:\n placement = \"right-start\";\n break;\n // Top\n\n case PopoverPlacements.Top:\n placement = \"top\";\n break;\n\n case PopoverPlacements.TopEnd:\n placement = \"top-end\";\n break;\n\n case PopoverPlacements.TopStart:\n placement = \"top-start\";\n break;\n // Default - Auto\n\n default:\n placement = \"top\";\n break;\n } // Set the theme\n\n\n var theme = null;\n\n switch (this.props.type) {\n // Dark\n case PopoverTypes.Dark:\n theme = \"dark\";\n break;\n // Danger\n\n case PopoverTypes.Danger:\n theme = \"danger\";\n break;\n // Info\n\n case PopoverTypes.Info:\n theme = \"info\";\n break;\n // Light\n\n case PopoverTypes.Light:\n theme = \"light\";\n break;\n\n case PopoverTypes.LightBorder:\n theme = \"light-border\";\n break;\n // Material\n\n case PopoverTypes.Material:\n theme = \"material\";\n break;\n // Primary\n\n case PopoverTypes.Primary:\n theme = \"primary\";\n break;\n // Secondary\n\n case PopoverTypes.Secondary:\n theme = \"secondary\";\n break;\n // Success\n\n case PopoverTypes.Success:\n theme = \"success\";\n break;\n // Translucent\n\n case PopoverTypes.Translucent:\n theme = \"translucent\";\n break;\n // Warning\n\n case PopoverTypes.Warning:\n theme = \"warning\";\n break;\n // Default - Light Border\n\n default:\n theme = \"light-border\";\n break;\n } // Set the options\n\n\n var options = __assign({\n allowHTML: true,\n animation: \"scale\",\n arrow: true,\n delay: 100,\n inertia: true,\n interactive: true,\n placement: placement,\n plugins: [tippy_js_1.animateFill, tippy_js_1.followCursor, tippy_js_1.inlinePositioning, tippy_js_1.sticky],\n theme: theme\n }, this.props.options); // See if we are targeting an element\n\n\n var elPopover = null;\n\n if (this.props.target) {\n // Set the popover to the target element\n elPopover = this.props.target; // Ensure the attributes are set in the target element\n\n elPopover.setAttribute(\"tabindex\", \"0\"); // Update this element\n\n this.el = elPopover;\n } else {\n // Create the button\n var btnProps = this.props.btnProps || {};\n btnProps.isLink = this.props.isDismissible ? true : false;\n btnProps.tabIndex = btnProps.tabIndex || 0;\n this.el = (0, button_1.Button)(btnProps).el;\n } // Create the popover content element\n\n\n this._elContent = document.createElement(\"div\");\n\n this._elContent.classList.add(\"popover-content\");\n\n this._elContent.innerHTML = '<h5 class=\"popover-header m-0\"></h5><div class=\"popover-body\"></div>';\n (0, common_1.appendContent)(this._elContent.querySelector(\".popover-header\"), this.props.title);\n (0, common_1.appendContent)(this._elContent.querySelector(\".popover-body\"), options.content);\n options.content = this._elContent; // Set the on create event\n\n options[\"onCreate\"] = function (tippyObj) {\n // Get the content element\n var elContent = tippyObj.popper.querySelector(\".tippy-content\");\n\n if (elContent) {\n // Set the class\n elContent.classList.add(\"bs\"); // Set the styling\n\n elContent.style.padding = \"0\"; // Get the custom class name(s)\n\n var custom = (_this.props.className || \"\").trim().split(\" \");\n\n for (var i = 0; i < custom.length; i++) {\n var className = custom[i]; // Add the custom class name\n\n className ? elContent.classList.add(custom[i]) : null;\n }\n } // Call the custom event if it's defined\n\n\n _this.props.options && _this.props.options.onCreate ? _this.props.options.onCreate(tippyObj) : null;\n }; // Create the tippy\n\n\n this._tippy = (0, tippy_js_1[\"default\"])(this.el, options);\n };\n /**\r\n * Public Interface\r\n */\n // Disables the popover\n\n\n _Popover.prototype.disable = function () {\n // Disable the target element\n this.el.disabled = true;\n }; // Enables the popover\n\n\n _Popover.prototype.enable = function () {\n // Enable the target element\n this.el.disabled = false;\n }; // Hides the popover\n\n\n _Popover.prototype.hide = function () {\n // See if it's visible\n if (this.isVisible) {\n this._tippy.hide();\n }\n };\n\n Object.defineProperty(_Popover.prototype, \"isVisible\", {\n // Determines if the popover is visible\n get: function get() {\n return this._tippy.state.isVisible;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(_Popover.prototype, \"tippy\", {\n // The tippy instance\n get: function get() {\n return this._tippy;\n },\n enumerable: false,\n configurable: true\n }); // Sets the tippy content\n\n _Popover.prototype.setContent = function (content) {\n // Set the tippy content\n this.tippy.setContent(content);\n }; // Shows the popover\n\n\n _Popover.prototype.show = function () {\n // See if it's hidden\n if (!this.isVisible) {\n this._tippy.show();\n }\n }; // Toggles the popover\n\n\n _Popover.prototype.toggle = function () {\n // Toggle the element\n if (this.isVisible) {\n // Hide the element\n this.hide();\n } else {\n // Show the element\n this.show();\n }\n };\n\n return _Popover;\n}(base_1.Base);\n\nvar Popover = function Popover(props, template) {\n return new _Popover(props, template);\n};\n\nexports.Popover = Popover;\n\n//# sourceURL=webpack://gd-bs/./src/components/popover/index.ts?");
|
|
1351
1351
|
|
|
1352
1352
|
/***/ }),
|
|
1353
1353
|
|
|
@@ -1512,7 +1512,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));
|
|
|
1512
1512
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1513
1513
|
|
|
1514
1514
|
"use strict";
|
|
1515
|
-
eval("\n\nvar __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n };\n\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.Tooltip = exports.TooltipPlacements = exports.TooltipTypes = void 0;\n\nvar tippy_js_1 = __webpack_require__(/*! tippy.js */ \"./node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/dist/tippy.esm.js\");\n\nvar base_1 = __webpack_require__(/*! ../base */ \"./src/components/base.ts\");\n\nvar button_1 = __webpack_require__(/*! ../button */ \"./src/components/button/index.ts\");\n\nvar common_1 = __webpack_require__(/*! ../common */ \"./src/components/common.ts\");\n/**\r\n * Tooltip Types\r\n */\n\n\nvar TooltipTypes;\n\n(function (TooltipTypes) {\n TooltipTypes[TooltipTypes[\"Danger\"] = 1] = \"Danger\";\n TooltipTypes[TooltipTypes[\"Dark\"] = 2] = \"Dark\";\n TooltipTypes[TooltipTypes[\"Info\"] = 3] = \"Info\";\n TooltipTypes[TooltipTypes[\"Light\"] = 4] = \"Light\";\n TooltipTypes[TooltipTypes[\"LightBorder\"] = 5] = \"LightBorder\";\n TooltipTypes[TooltipTypes[\"Material\"] = 6] = \"Material\";\n TooltipTypes[TooltipTypes[\"Primary\"] = 7] = \"Primary\";\n TooltipTypes[TooltipTypes[\"Secondary\"] = 8] = \"Secondary\";\n TooltipTypes[TooltipTypes[\"Success\"] = 9] = \"Success\";\n TooltipTypes[TooltipTypes[\"Translucent\"] = 10] = \"Translucent\";\n TooltipTypes[TooltipTypes[\"Warning\"] = 11] = \"Warning\";\n})(TooltipTypes = exports.TooltipTypes || (exports.TooltipTypes = {}));\n/**\r\n * Tooltip Placements\r\n */\n\n\nvar TooltipPlacements;\n\n(function (TooltipPlacements) {\n TooltipPlacements[TooltipPlacements[\"Auto\"] = 1] = \"Auto\";\n TooltipPlacements[TooltipPlacements[\"AutoStart\"] = 2] = \"AutoStart\";\n TooltipPlacements[TooltipPlacements[\"AutoEnd\"] = 3] = \"AutoEnd\";\n TooltipPlacements[TooltipPlacements[\"Bottom\"] = 4] = \"Bottom\";\n TooltipPlacements[TooltipPlacements[\"BottomStart\"] = 5] = \"BottomStart\";\n TooltipPlacements[TooltipPlacements[\"BottomEnd\"] = 6] = \"BottomEnd\";\n TooltipPlacements[TooltipPlacements[\"Left\"] = 7] = \"Left\";\n TooltipPlacements[TooltipPlacements[\"LeftStart\"] = 8] = \"LeftStart\";\n TooltipPlacements[TooltipPlacements[\"LeftEnd\"] = 9] = \"LeftEnd\";\n TooltipPlacements[TooltipPlacements[\"Right\"] = 10] = \"Right\";\n TooltipPlacements[TooltipPlacements[\"RightStart\"] = 11] = \"RightStart\";\n TooltipPlacements[TooltipPlacements[\"RightEnd\"] = 12] = \"RightEnd\";\n TooltipPlacements[TooltipPlacements[\"Top\"] = 13] = \"Top\";\n TooltipPlacements[TooltipPlacements[\"TopStart\"] = 14] = \"TopStart\";\n TooltipPlacements[TooltipPlacements[\"TopEnd\"] = 15] = \"TopEnd\";\n})(TooltipPlacements = exports.TooltipPlacements || (exports.TooltipPlacements = {}));\n/**\r\n * Tooltip\r\n */\n\n\nvar _Tooltip =\n/** @class */\nfunction (_super) {\n __extends(_Tooltip, _super); // Constructor\n\n\n function _Tooltip(props, template) {\n if (template === void 0) {\n template = \"\";\n }\n\n var _this = _super.call(this, template, props) || this;\n\n _this._btn = null;\n _this._elContent = null;\n _this._tippy = null; // Configure the collapse\n\n _this.configure(); // Configure the parent\n\n\n _this.configureParent();\n\n return _this;\n } // Configure the tooltip\n\n\n _Tooltip.prototype.configure = function () {\n // See if the target element was not defined\n if (this.props.target == null) {\n // Default the toggle property for the button\n var btnProps = this.props.btnProps || {};\n btnProps.type = btnProps.type || button_1.ButtonTypes.OutlineSecondary; // Create the button\n\n this._btn = (0, button_1.Button)(btnProps); // Update the element\n\n this.el = this._btn.el;\n } // Configure the options\n\n\n this.configureOptions();\n }; // Configure the options\n\n\n _Tooltip.prototype.configureOptions = function () {\n var _this = this; // Set the placements\n\n\n var placement = null;\n\n switch (this.props.placement) {\n // Auto\n case TooltipPlacements.Auto:\n placement = \"auto\";\n break;\n\n case TooltipPlacements.AutoEnd:\n placement = \"auto-end\";\n break;\n\n case TooltipPlacements.AutoStart:\n placement = \"auto-start\";\n break;\n // Bottom\n\n case TooltipPlacements.Bottom:\n placement = \"bottom\";\n break;\n\n case TooltipPlacements.BottomEnd:\n placement = \"bottom-end\";\n break;\n\n case TooltipPlacements.BottomStart:\n placement = \"bottom-start\";\n break;\n // Left\n\n case TooltipPlacements.Left:\n placement = \"left\";\n break;\n\n case TooltipPlacements.LeftEnd:\n placement = \"left-end\";\n break;\n\n case TooltipPlacements.LeftStart:\n placement = \"left-start\";\n break;\n // Right\n\n case TooltipPlacements.Right:\n placement = \"right\";\n break;\n\n case TooltipPlacements.RightEnd:\n placement = \"right-end\";\n break;\n\n case TooltipPlacements.RightStart:\n placement = \"right-start\";\n break;\n // Top\n\n case TooltipPlacements.Top:\n placement = \"top\";\n break;\n\n case TooltipPlacements.TopEnd:\n placement = \"top-end\";\n break;\n\n case TooltipPlacements.TopStart:\n placement = \"top-start\";\n break;\n // Default - Auto\n\n default:\n placement = \"top\";\n break;\n } // Set the theme\n\n\n var theme = null;\n\n switch (this.props.type) {\n // Danger\n case TooltipTypes.Danger:\n theme = \"danger\";\n break;\n // Dark\n\n case TooltipTypes.Dark:\n theme = \"dark\";\n break;\n // Info\n\n case TooltipTypes.Info:\n theme = \"info\";\n break;\n // Light\n\n case TooltipTypes.Light:\n theme = \"light\";\n break;\n\n case TooltipTypes.LightBorder:\n theme = \"light-border\";\n break;\n // Material\n\n case TooltipTypes.Material:\n theme = \"material\";\n break;\n // Primary\n\n case TooltipTypes.Primary:\n theme = \"primary\";\n break;\n // Secondary\n\n case TooltipTypes.Secondary:\n theme = \"secondary\";\n break;\n // Success\n\n case TooltipTypes.Success:\n theme = \"success\";\n break;\n // Translucent\n\n case TooltipTypes.Translucent:\n theme = \"translucent\";\n break;\n // Warning\n\n case TooltipTypes.Warning:\n theme = \"warning\";\n break;\n // Default - Secondary\n\n default:\n // Set the default theme\n theme = \"secondary\"; // See if a button exists\n\n if (this.props.btnProps && this.props.btnProps.type > 0) {\n // Match the theme to the button type\n switch (this.props.btnProps.type) {\n // Danger\n case button_1.ButtonTypes.Danger:\n case button_1.ButtonTypes.OutlineDanger:\n theme = \"danger\";\n break;\n // Dark\n\n case button_1.ButtonTypes.Dark:\n case button_1.ButtonTypes.OutlineDark:\n theme = \"dark\";\n break;\n // Info\n\n case button_1.ButtonTypes.Info:\n case button_1.ButtonTypes.OutlineInfo:\n theme = \"info\";\n break;\n // Light\n\n case button_1.ButtonTypes.Light:\n case button_1.ButtonTypes.OutlineLight:\n theme = \"light\";\n break;\n // Link\n\n case button_1.ButtonTypes.Link:\n case button_1.ButtonTypes.OutlineLink:\n theme = \"light-border\";\n break;\n // Primary\n\n case button_1.ButtonTypes.Primary:\n case button_1.ButtonTypes.OutlinePrimary:\n theme = \"primary\";\n break;\n // Secondary\n\n case button_1.ButtonTypes.Secondary:\n case button_1.ButtonTypes.OutlineSecondary:\n theme = \"secondary\";\n break;\n // Success\n\n case button_1.ButtonTypes.Success:\n case button_1.ButtonTypes.OutlineSuccess:\n theme = \"success\";\n break;\n // Warning\n\n case button_1.ButtonTypes.Warning:\n case button_1.ButtonTypes.OutlineWarning:\n theme = \"warning\";\n break;\n }\n }\n\n break;\n } // Set the options\n\n\n var options = __assign({\n allowHTML: false,\n animation: \"scale\",\n arrow: true,\n content: this.props.content,\n delay: 100,\n inertia: true,\n interactive: false,\n placement: placement,\n plugins: [tippy_js_1.animateFill, tippy_js_1.followCursor, tippy_js_1.inlinePositioning, tippy_js_1.sticky],\n theme: theme\n }, this.props.options); // Create the tooltip content element\n\n\n this._elContent = document.createElement(\"div\");\n\n this._elContent.classList.add(\"tooltip-content\");\n\n (0, common_1.appendContent)(this._elContent, options.content);\n options.content = this._elContent; // Set the on create event\n\n options[\"onCreate\"] = function (tippyObj) {\n // Get the content element\n var elContent = tippyObj.popper.querySelector(\".tippy-content\");\n\n if (elContent) {\n // Set the class\n elContent.classList.add(\"bs\"); // Get the custom class name(s)\n\n var custom = (_this.props.className || \"\").trim().split(\" \");\n\n for (var i = 0; i < custom.length; i++) {\n var className = custom[i]; // Add the custom class name\n\n className ? elContent.classList.add(custom[i]) : null;\n }\n } // Call the custom event if it's defined\n\n\n _this.props.options && _this.props.options.onCreate ? _this.props.options.onCreate(tippyObj) : null;\n }; // Create the tippy\n\n\n this._tippy = tippy_js_1[\"default\"](this.props.target || this.el, options);\n };\n\n Object.defineProperty(_Tooltip.prototype, \"button\", {\n /**\r\n * Public Interface\r\n */\n // Reference to the button\n get: function get() {\n return this._btn;\n },\n enumerable: false,\n configurable: true\n }); // Disbles the tooltip\n\n _Tooltip.prototype.disable = function () {\n // Disable the button\n this._btn ? this._btn.disable() : null;\n }; // Enables the tooltip\n\n\n _Tooltip.prototype.enable = function () {\n // Enable the button\n this._btn ? this._btn.enable() : null;\n }; // Hides the tooltip\n\n\n _Tooltip.prototype.hide = function () {\n // See if it's visible\n if (this.isVisible) {\n this._tippy.hide();\n }\n };\n\n Object.defineProperty(_Tooltip.prototype, \"isVisible\", {\n // Determines if the tooltip is visible\n get: function get() {\n return this._tippy.state.isVisible;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(_Tooltip.prototype, \"tippy\", {\n // The tippy instance\n get: function get() {\n return this._tippy;\n },\n enumerable: false,\n configurable: true\n }); // Sets the tippy content\n\n _Tooltip.prototype.setContent = function (content) {\n // Set the tippy content\n this.tippy.setContent(content);\n }; // Shows the tooltip\n\n\n _Tooltip.prototype.show = function () {\n // See if it's hidden\n if (!this.isVisible) {\n this._tippy.show();\n }\n }; // Toggles the tooltip\n\n\n _Tooltip.prototype.toggle = function () {\n // Toggle the element\n if (this.isVisible) {\n // Hide the element\n this.hide();\n } else {\n // Show the element\n this.show();\n }\n };\n\n return _Tooltip;\n}(base_1.Base);\n\nvar Tooltip = function Tooltip(props, template) {\n return new _Tooltip(props, template);\n};\n\nexports.Tooltip = Tooltip;\n\n//# sourceURL=webpack://gd-bs/./src/components/tooltip/index.ts?");
|
|
1515
|
+
eval("\n\nvar __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n };\n\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.Tooltip = exports.TooltipPlacements = exports.TooltipTypes = void 0;\n\nvar tippy_js_1 = __webpack_require__(/*! tippy.js */ \"./node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/dist/tippy.esm.js\");\n\nvar base_1 = __webpack_require__(/*! ../base */ \"./src/components/base.ts\");\n\nvar button_1 = __webpack_require__(/*! ../button */ \"./src/components/button/index.ts\");\n\nvar common_1 = __webpack_require__(/*! ../common */ \"./src/components/common.ts\");\n/**\r\n * Tooltip Types\r\n */\n\n\nvar TooltipTypes;\n\n(function (TooltipTypes) {\n TooltipTypes[TooltipTypes[\"Danger\"] = 1] = \"Danger\";\n TooltipTypes[TooltipTypes[\"Dark\"] = 2] = \"Dark\";\n TooltipTypes[TooltipTypes[\"Info\"] = 3] = \"Info\";\n TooltipTypes[TooltipTypes[\"Light\"] = 4] = \"Light\";\n TooltipTypes[TooltipTypes[\"LightBorder\"] = 5] = \"LightBorder\";\n TooltipTypes[TooltipTypes[\"Material\"] = 6] = \"Material\";\n TooltipTypes[TooltipTypes[\"Primary\"] = 7] = \"Primary\";\n TooltipTypes[TooltipTypes[\"Secondary\"] = 8] = \"Secondary\";\n TooltipTypes[TooltipTypes[\"Success\"] = 9] = \"Success\";\n TooltipTypes[TooltipTypes[\"Translucent\"] = 10] = \"Translucent\";\n TooltipTypes[TooltipTypes[\"Warning\"] = 11] = \"Warning\";\n})(TooltipTypes = exports.TooltipTypes || (exports.TooltipTypes = {}));\n/**\r\n * Tooltip Placements\r\n */\n\n\nvar TooltipPlacements;\n\n(function (TooltipPlacements) {\n TooltipPlacements[TooltipPlacements[\"Auto\"] = 1] = \"Auto\";\n TooltipPlacements[TooltipPlacements[\"AutoStart\"] = 2] = \"AutoStart\";\n TooltipPlacements[TooltipPlacements[\"AutoEnd\"] = 3] = \"AutoEnd\";\n TooltipPlacements[TooltipPlacements[\"Bottom\"] = 4] = \"Bottom\";\n TooltipPlacements[TooltipPlacements[\"BottomStart\"] = 5] = \"BottomStart\";\n TooltipPlacements[TooltipPlacements[\"BottomEnd\"] = 6] = \"BottomEnd\";\n TooltipPlacements[TooltipPlacements[\"Left\"] = 7] = \"Left\";\n TooltipPlacements[TooltipPlacements[\"LeftStart\"] = 8] = \"LeftStart\";\n TooltipPlacements[TooltipPlacements[\"LeftEnd\"] = 9] = \"LeftEnd\";\n TooltipPlacements[TooltipPlacements[\"Right\"] = 10] = \"Right\";\n TooltipPlacements[TooltipPlacements[\"RightStart\"] = 11] = \"RightStart\";\n TooltipPlacements[TooltipPlacements[\"RightEnd\"] = 12] = \"RightEnd\";\n TooltipPlacements[TooltipPlacements[\"Top\"] = 13] = \"Top\";\n TooltipPlacements[TooltipPlacements[\"TopStart\"] = 14] = \"TopStart\";\n TooltipPlacements[TooltipPlacements[\"TopEnd\"] = 15] = \"TopEnd\";\n})(TooltipPlacements = exports.TooltipPlacements || (exports.TooltipPlacements = {}));\n/**\r\n * Tooltip\r\n */\n\n\nvar _Tooltip =\n/** @class */\nfunction (_super) {\n __extends(_Tooltip, _super); // Constructor\n\n\n function _Tooltip(props, template) {\n if (template === void 0) {\n template = \"\";\n }\n\n var _this = _super.call(this, template, props) || this;\n\n _this._btn = null;\n _this._elContent = null;\n _this._tippy = null; // Configure the collapse\n\n _this.configure(); // Configure the parent\n\n\n _this.configureParent();\n\n return _this;\n } // Configure the tooltip\n\n\n _Tooltip.prototype.configure = function () {\n // See if the target element was not defined\n if (this.props.target == null) {\n // Default the toggle property for the button\n var btnProps = this.props.btnProps || {};\n btnProps.type = btnProps.type || button_1.ButtonTypes.OutlineSecondary; // Create the button\n\n this._btn = (0, button_1.Button)(btnProps); // Update the element\n\n this.el = this._btn.el;\n } // Configure the options\n\n\n this.configureOptions();\n }; // Configure the options\n\n\n _Tooltip.prototype.configureOptions = function () {\n var _this = this; // Set the placements\n\n\n var placement = null;\n\n switch (this.props.placement) {\n // Auto\n case TooltipPlacements.Auto:\n placement = \"auto\";\n break;\n\n case TooltipPlacements.AutoEnd:\n placement = \"auto-end\";\n break;\n\n case TooltipPlacements.AutoStart:\n placement = \"auto-start\";\n break;\n // Bottom\n\n case TooltipPlacements.Bottom:\n placement = \"bottom\";\n break;\n\n case TooltipPlacements.BottomEnd:\n placement = \"bottom-end\";\n break;\n\n case TooltipPlacements.BottomStart:\n placement = \"bottom-start\";\n break;\n // Left\n\n case TooltipPlacements.Left:\n placement = \"left\";\n break;\n\n case TooltipPlacements.LeftEnd:\n placement = \"left-end\";\n break;\n\n case TooltipPlacements.LeftStart:\n placement = \"left-start\";\n break;\n // Right\n\n case TooltipPlacements.Right:\n placement = \"right\";\n break;\n\n case TooltipPlacements.RightEnd:\n placement = \"right-end\";\n break;\n\n case TooltipPlacements.RightStart:\n placement = \"right-start\";\n break;\n // Top\n\n case TooltipPlacements.Top:\n placement = \"top\";\n break;\n\n case TooltipPlacements.TopEnd:\n placement = \"top-end\";\n break;\n\n case TooltipPlacements.TopStart:\n placement = \"top-start\";\n break;\n // Default - Auto\n\n default:\n placement = \"top\";\n break;\n } // Set the theme\n\n\n var theme = null;\n\n switch (this.props.type) {\n // Danger\n case TooltipTypes.Danger:\n theme = \"danger\";\n break;\n // Dark\n\n case TooltipTypes.Dark:\n theme = \"dark\";\n break;\n // Info\n\n case TooltipTypes.Info:\n theme = \"info\";\n break;\n // Light\n\n case TooltipTypes.Light:\n theme = \"light\";\n break;\n\n case TooltipTypes.LightBorder:\n theme = \"light-border\";\n break;\n // Material\n\n case TooltipTypes.Material:\n theme = \"material\";\n break;\n // Primary\n\n case TooltipTypes.Primary:\n theme = \"primary\";\n break;\n // Secondary\n\n case TooltipTypes.Secondary:\n theme = \"secondary\";\n break;\n // Success\n\n case TooltipTypes.Success:\n theme = \"success\";\n break;\n // Translucent\n\n case TooltipTypes.Translucent:\n theme = \"translucent\";\n break;\n // Warning\n\n case TooltipTypes.Warning:\n theme = \"warning\";\n break;\n // Default - Secondary\n\n default:\n // Set the default theme\n theme = \"secondary\"; // See if a button exists\n\n if (this.props.btnProps && this.props.btnProps.type > 0) {\n // Match the theme to the button type\n switch (this.props.btnProps.type) {\n // Danger\n case button_1.ButtonTypes.Danger:\n case button_1.ButtonTypes.OutlineDanger:\n theme = \"danger\";\n break;\n // Dark\n\n case button_1.ButtonTypes.Dark:\n case button_1.ButtonTypes.OutlineDark:\n theme = \"dark\";\n break;\n // Info\n\n case button_1.ButtonTypes.Info:\n case button_1.ButtonTypes.OutlineInfo:\n theme = \"info\";\n break;\n // Light\n\n case button_1.ButtonTypes.Light:\n case button_1.ButtonTypes.OutlineLight:\n theme = \"light\";\n break;\n // Link\n\n case button_1.ButtonTypes.Link:\n case button_1.ButtonTypes.OutlineLink:\n theme = \"light-border\";\n break;\n // Primary\n\n case button_1.ButtonTypes.Primary:\n case button_1.ButtonTypes.OutlinePrimary:\n theme = \"primary\";\n break;\n // Secondary\n\n case button_1.ButtonTypes.Secondary:\n case button_1.ButtonTypes.OutlineSecondary:\n theme = \"secondary\";\n break;\n // Success\n\n case button_1.ButtonTypes.Success:\n case button_1.ButtonTypes.OutlineSuccess:\n theme = \"success\";\n break;\n // Warning\n\n case button_1.ButtonTypes.Warning:\n case button_1.ButtonTypes.OutlineWarning:\n theme = \"warning\";\n break;\n }\n }\n\n break;\n } // Set the options\n\n\n var options = __assign({\n allowHTML: false,\n animation: \"scale\",\n arrow: true,\n content: this.props.content,\n delay: 100,\n inertia: true,\n interactive: false,\n placement: placement,\n plugins: [tippy_js_1.animateFill, tippy_js_1.followCursor, tippy_js_1.inlinePositioning, tippy_js_1.sticky],\n theme: theme\n }, this.props.options); // Create the tooltip content element\n\n\n this._elContent = document.createElement(\"div\");\n\n this._elContent.classList.add(\"tooltip-content\");\n\n (0, common_1.appendContent)(this._elContent, options.content);\n options.content = this._elContent; // Set the on create event\n\n options[\"onCreate\"] = function (tippyObj) {\n // Get the content element\n var elContent = tippyObj.popper.querySelector(\".tippy-content\");\n\n if (elContent) {\n // Set the class\n elContent.classList.add(\"bs\"); // Get the custom class name(s)\n\n var custom = (_this.props.className || \"\").trim().split(\" \");\n\n for (var i = 0; i < custom.length; i++) {\n var className = custom[i]; // Add the custom class name\n\n className ? elContent.classList.add(custom[i]) : null;\n }\n } // Call the custom event if it's defined\n\n\n _this.props.options && _this.props.options.onCreate ? _this.props.options.onCreate(tippyObj) : null;\n }; // Create the tippy\n\n\n this._tippy = (0, tippy_js_1[\"default\"])(this.props.target || this.el, options);\n };\n\n Object.defineProperty(_Tooltip.prototype, \"button\", {\n /**\r\n * Public Interface\r\n */\n // Reference to the button\n get: function get() {\n return this._btn;\n },\n enumerable: false,\n configurable: true\n }); // Disbles the tooltip\n\n _Tooltip.prototype.disable = function () {\n // Disable the button\n this._btn ? this._btn.disable() : null;\n }; // Enables the tooltip\n\n\n _Tooltip.prototype.enable = function () {\n // Enable the button\n this._btn ? this._btn.enable() : null;\n }; // Hides the tooltip\n\n\n _Tooltip.prototype.hide = function () {\n // See if it's visible\n if (this.isVisible) {\n this._tippy.hide();\n }\n };\n\n Object.defineProperty(_Tooltip.prototype, \"isVisible\", {\n // Determines if the tooltip is visible\n get: function get() {\n return this._tippy.state.isVisible;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(_Tooltip.prototype, \"tippy\", {\n // The tippy instance\n get: function get() {\n return this._tippy;\n },\n enumerable: false,\n configurable: true\n }); // Sets the tippy content\n\n _Tooltip.prototype.setContent = function (content) {\n // Set the tippy content\n this.tippy.setContent(content);\n }; // Shows the tooltip\n\n\n _Tooltip.prototype.show = function () {\n // See if it's hidden\n if (!this.isVisible) {\n this._tippy.show();\n }\n }; // Toggles the tooltip\n\n\n _Tooltip.prototype.toggle = function () {\n // Toggle the element\n if (this.isVisible) {\n // Hide the element\n this.hide();\n } else {\n // Show the element\n this.show();\n }\n };\n\n return _Tooltip;\n}(base_1.Base);\n\nvar Tooltip = function Tooltip(props, template) {\n return new _Tooltip(props, template);\n};\n\nexports.Tooltip = Tooltip;\n\n//# sourceURL=webpack://gd-bs/./src/components/tooltip/index.ts?");
|
|
1516
1516
|
|
|
1517
1517
|
/***/ }),
|
|
1518
1518
|
|