gd-bs 5.2.1 → 5.2.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.
@@ -40,3 +40,4 @@ __exportStar(require("./table"), exports);
40
40
  __exportStar(require("./toast"), exports);
41
41
  __exportStar(require("./toolbar"), exports);
42
42
  __exportStar(require("./tooltip"), exports);
43
+ __exportStar(require("./tooltipGroup"), exports);
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ extendStatics(d, b);
11
+ function __() { this.constructor = d; }
12
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
+ };
14
+ })();
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.TooltipGroup = void 0;
17
+ var base_1 = require("../base");
18
+ var tooltip_1 = require("../tooltip");
19
+ var templates_1 = require("./templates");
20
+ /**
21
+ * Tooltip Group
22
+ * @property props - The tooltip group properties.
23
+ */
24
+ var _TooltipGroup = /** @class */ (function (_super) {
25
+ __extends(_TooltipGroup, _super);
26
+ // Constructor
27
+ function _TooltipGroup(props, template, btnTemplate) {
28
+ if (template === void 0) { template = templates_1.HTML; }
29
+ var _this = _super.call(this, template, props) || this;
30
+ _this._tooltips = null;
31
+ // Configure the tooltip group
32
+ _this.configure(btnTemplate);
33
+ // Configure the parent
34
+ _this.configureParent();
35
+ return _this;
36
+ }
37
+ // Configure the tooltip group
38
+ _TooltipGroup.prototype.configure = function (btnTemplate) {
39
+ // Set the attributes
40
+ this.props.id ? this.el.id = this.props.id : null;
41
+ this.props.label ? this.el.setAttribute("aria-label", this.props.label) : null;
42
+ // Set the class names
43
+ this.el.classList.add(this.props.isVertical ? "btn-group-vertical" : "btn-group");
44
+ this.props.isLarge ? this.el.classList.add("btn-group-lg") : null;
45
+ this.props.isSmall ? this.el.classList.add("btn-group-sm") : null;
46
+ // Render the tooltips
47
+ this.renderTooltips(btnTemplate);
48
+ };
49
+ // Render the tooltips
50
+ _TooltipGroup.prototype.renderTooltips = function (tooltipTemplate) {
51
+ // Clear the tooltips
52
+ this._tooltips = [];
53
+ // Parse the tooltips
54
+ var tooltips = this.props.tooltips || [];
55
+ for (var i = 0; i < tooltips.length; i++) {
56
+ var tooltipProps = tooltips[i];
57
+ // Set the property
58
+ tooltipProps.type = tooltipProps.type || this.props.tooltipType;
59
+ // See if the button props exists
60
+ if (tooltipProps.btnProps) {
61
+ // Set the button type
62
+ tooltipProps.btnProps.type = tooltipProps.btnProps.type || this.props.buttonType;
63
+ }
64
+ // Create the tooltip
65
+ var tooltip = tooltip_1.Tooltip(tooltipProps, tooltipTemplate);
66
+ this._tooltips.push(tooltip);
67
+ // Append the tooltip to the group
68
+ this.el.appendChild(tooltip.el);
69
+ }
70
+ };
71
+ Object.defineProperty(_TooltipGroup.prototype, "tooltips", {
72
+ /**
73
+ * Public Interface
74
+ */
75
+ // Reference to the tooltips
76
+ get: function () { return this._tooltips; },
77
+ enumerable: false,
78
+ configurable: true
79
+ });
80
+ return _TooltipGroup;
81
+ }(base_1.Base));
82
+ exports.TooltipGroup = function (props, template, tooltipTemplate) { return new _TooltipGroup(props, template, tooltipTemplate); };
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HTML = void 0;
4
+ exports.HTML = "<div class=\"btn-group\" role=\"group\"></div>";
@@ -1105,7 +1105,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));
1105
1105
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1106
1106
 
1107
1107
  "use strict";
1108
- eval("\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nvar __exportStar = this && this.__exportStar || function (m, exports) {\n for (var p in m) {\n if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n }\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\n__exportStar(__webpack_require__(/*! ./accordion */ \"./src/components/accordion/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./alert */ \"./src/components/alert/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./badge */ \"./src/components/badge/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./breadcrumb */ \"./src/components/breadcrumb/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./button */ \"./src/components/button/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./buttonGroup */ \"./src/components/buttonGroup/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./card */ \"./src/components/card/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./cardGroup */ \"./src/components/cardGroup/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./carousel */ \"./src/components/carousel/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./checkboxGroup */ \"./src/components/checkboxGroup/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./collapse */ \"./src/components/collapse/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./dropdown */ \"./src/components/dropdown/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./form */ \"./src/components/form/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./inputGroup */ \"./src/components/inputGroup/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./jumbotron */ \"./src/components/jumbotron/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./listBox */ \"./src/components/listBox/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./listGroup */ \"./src/components/listGroup/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./modal */ \"./src/components/modal/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./offcanvas */ \"./src/components/offcanvas/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./nav */ \"./src/components/nav/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./navbar */ \"./src/components/navbar/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./pagination */ \"./src/components/pagination/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./popover */ \"./src/components/popover/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./progress */ \"./src/components/progress/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./progressGroup */ \"./src/components/progressGroup/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./spinner */ \"./src/components/spinner/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./table */ \"./src/components/table/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./toast */ \"./src/components/toast/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./toolbar */ \"./src/components/toolbar/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./tooltip */ \"./src/components/tooltip/index.ts\"), exports);\n\n//# sourceURL=webpack://gd-bs/./src/components/index.ts?");
1108
+ eval("\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nvar __exportStar = this && this.__exportStar || function (m, exports) {\n for (var p in m) {\n if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n }\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\n__exportStar(__webpack_require__(/*! ./accordion */ \"./src/components/accordion/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./alert */ \"./src/components/alert/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./badge */ \"./src/components/badge/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./breadcrumb */ \"./src/components/breadcrumb/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./button */ \"./src/components/button/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./buttonGroup */ \"./src/components/buttonGroup/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./card */ \"./src/components/card/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./cardGroup */ \"./src/components/cardGroup/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./carousel */ \"./src/components/carousel/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./checkboxGroup */ \"./src/components/checkboxGroup/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./collapse */ \"./src/components/collapse/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./dropdown */ \"./src/components/dropdown/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./form */ \"./src/components/form/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./inputGroup */ \"./src/components/inputGroup/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./jumbotron */ \"./src/components/jumbotron/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./listBox */ \"./src/components/listBox/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./listGroup */ \"./src/components/listGroup/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./modal */ \"./src/components/modal/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./offcanvas */ \"./src/components/offcanvas/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./nav */ \"./src/components/nav/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./navbar */ \"./src/components/navbar/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./pagination */ \"./src/components/pagination/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./popover */ \"./src/components/popover/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./progress */ \"./src/components/progress/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./progressGroup */ \"./src/components/progressGroup/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./spinner */ \"./src/components/spinner/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./table */ \"./src/components/table/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./toast */ \"./src/components/toast/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./toolbar */ \"./src/components/toolbar/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./tooltip */ \"./src/components/tooltip/index.ts\"), exports);\n\n__exportStar(__webpack_require__(/*! ./tooltipGroup */ \"./src/components/tooltipGroup/index.ts\"), exports);\n\n//# sourceURL=webpack://gd-bs/./src/components/index.ts?");
1109
1109
 
1110
1110
  /***/ }),
1111
1111
 
@@ -1483,6 +1483,28 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));
1483
1483
 
1484
1484
  /***/ }),
1485
1485
 
1486
+ /***/ "./src/components/tooltipGroup/index.ts":
1487
+ /*!**********************************************!*\
1488
+ !*** ./src/components/tooltipGroup/index.ts ***!
1489
+ \**********************************************/
1490
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1491
+
1492
+ "use strict";
1493
+ 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 _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\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.TooltipGroup = void 0;\n\nvar base_1 = __webpack_require__(/*! ../base */ \"./src/components/base.ts\");\n\nvar tooltip_1 = __webpack_require__(/*! ../tooltip */ \"./src/components/tooltip/index.ts\");\n\nvar templates_1 = __webpack_require__(/*! ./templates */ \"./src/components/tooltipGroup/templates.ts\");\n/**\r\n * Tooltip Group\r\n * @property props - The tooltip group properties.\r\n */\n\n\nvar _TooltipGroup =\n/** @class */\nfunction (_super) {\n __extends(_TooltipGroup, _super); // Constructor\n\n\n function _TooltipGroup(props, template, btnTemplate) {\n if (template === void 0) {\n template = templates_1.HTML;\n }\n\n var _this = _super.call(this, template, props) || this;\n\n _this._tooltips = null; // Configure the tooltip group\n\n _this.configure(btnTemplate); // Configure the parent\n\n\n _this.configureParent();\n\n return _this;\n } // Configure the tooltip group\n\n\n _TooltipGroup.prototype.configure = function (btnTemplate) {\n // Set the attributes\n this.props.id ? this.el.id = this.props.id : null;\n this.props.label ? this.el.setAttribute(\"aria-label\", this.props.label) : null; // Set the class names\n\n this.el.classList.add(this.props.isVertical ? \"btn-group-vertical\" : \"btn-group\");\n this.props.isLarge ? this.el.classList.add(\"btn-group-lg\") : null;\n this.props.isSmall ? this.el.classList.add(\"btn-group-sm\") : null; // Render the tooltips\n\n this.renderTooltips(btnTemplate);\n }; // Render the tooltips\n\n\n _TooltipGroup.prototype.renderTooltips = function (tooltipTemplate) {\n // Clear the tooltips\n this._tooltips = []; // Parse the tooltips\n\n var tooltips = this.props.tooltips || [];\n\n for (var i = 0; i < tooltips.length; i++) {\n var tooltipProps = tooltips[i]; // Set the property\n\n tooltipProps.type = tooltipProps.type || this.props.tooltipType; // See if the button props exists\n\n if (tooltipProps.btnProps) {\n // Set the button type\n tooltipProps.btnProps.type = tooltipProps.btnProps.type || this.props.buttonType;\n } // Create the tooltip\n\n\n var tooltip = tooltip_1.Tooltip(tooltipProps, tooltipTemplate);\n\n this._tooltips.push(tooltip); // Append the tooltip to the group\n\n\n this.el.appendChild(tooltip.el);\n }\n };\n\n Object.defineProperty(_TooltipGroup.prototype, \"tooltips\", {\n /**\r\n * Public Interface\r\n */\n // Reference to the tooltips\n get: function get() {\n return this._tooltips;\n },\n enumerable: false,\n configurable: true\n });\n return _TooltipGroup;\n}(base_1.Base);\n\nexports.TooltipGroup = function (props, template, tooltipTemplate) {\n return new _TooltipGroup(props, template, tooltipTemplate);\n};\n\n//# sourceURL=webpack://gd-bs/./src/components/tooltipGroup/index.ts?");
1494
+
1495
+ /***/ }),
1496
+
1497
+ /***/ "./src/components/tooltipGroup/templates.ts":
1498
+ /*!**************************************************!*\
1499
+ !*** ./src/components/tooltipGroup/templates.ts ***!
1500
+ \**************************************************/
1501
+ /***/ (function(__unused_webpack_module, exports) {
1502
+
1503
+ "use strict";
1504
+ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.HTML = void 0;\nexports.HTML = \"<div class=\\\"btn-group\\\" role=\\\"group\\\"></div>\";\n\n//# sourceURL=webpack://gd-bs/./src/components/tooltipGroup/templates.ts?");
1505
+
1506
+ /***/ }),
1507
+
1486
1508
  /***/ "./src/components/tooltip/index.ts":
1487
1509
  /*!*****************************************!*\
1488
1510
  !*** ./src/components/tooltip/index.ts ***!