gd-bs 5.2.5 → 5.2.9
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/breadcrumb/item.js +3 -0
- package/build/components/tooltip/index.js +56 -4
- package/build/components/tooltipGroup/index.js +3 -1
- package/dist/gd-bs-icons.js +3 -3
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +6 -0
- package/dist/gd-bs.js +3 -3
- package/dist/gd-bs.min.js +1 -1
- package/package.json +1 -1
- package/src/components/breadcrumb/item.ts +4 -0
- package/src/components/breadcrumb/types.d.ts +3 -0
- package/src/components/tooltip/index.ts +57 -4
- package/src/components/tooltipGroup/index.ts +3 -1
- package/src/components/tooltipGroup/types.d.ts +3 -0
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { setClassNames } from "../common";
|
|
1
2
|
import { IBreadcrumbItem } from "./types";
|
|
2
3
|
import { HTMLItem, HTMLLink } from "./templates";
|
|
3
4
|
|
|
@@ -28,6 +29,9 @@ export class BreadcrumbItem {
|
|
|
28
29
|
|
|
29
30
|
// Configure the item
|
|
30
31
|
private configure() {
|
|
32
|
+
// Set the class names
|
|
33
|
+
setClassNames(this._el, this._props.className);
|
|
34
|
+
|
|
31
35
|
// See if this item is active
|
|
32
36
|
if (this._props.isActive) {
|
|
33
37
|
// Add the class name
|
|
@@ -147,14 +147,14 @@ class _Tooltip extends Base<ITooltipProps> {
|
|
|
147
147
|
// Set the theme
|
|
148
148
|
let theme = null;
|
|
149
149
|
switch (this.props.type) {
|
|
150
|
-
// Dark
|
|
151
|
-
case TooltipTypes.Dark:
|
|
152
|
-
theme = "dark";
|
|
153
|
-
break;
|
|
154
150
|
// Danger
|
|
155
151
|
case TooltipTypes.Danger:
|
|
156
152
|
theme = "danger";
|
|
157
153
|
break;
|
|
154
|
+
// Dark
|
|
155
|
+
case TooltipTypes.Dark:
|
|
156
|
+
theme = "dark";
|
|
157
|
+
break;
|
|
158
158
|
// Info
|
|
159
159
|
case TooltipTypes.Info:
|
|
160
160
|
theme = "info";
|
|
@@ -192,7 +192,60 @@ class _Tooltip extends Base<ITooltipProps> {
|
|
|
192
192
|
break;
|
|
193
193
|
// Default - Secondary
|
|
194
194
|
default:
|
|
195
|
+
// Set the default theme
|
|
195
196
|
theme = "secondary";
|
|
197
|
+
|
|
198
|
+
// See if a button exists
|
|
199
|
+
if (this.props.btnProps && this.props.btnProps.type > 0) {
|
|
200
|
+
// Match the theme to the button type
|
|
201
|
+
switch (this.props.btnProps.type) {
|
|
202
|
+
// Danger
|
|
203
|
+
case ButtonTypes.Danger:
|
|
204
|
+
case ButtonTypes.OutlineDanger:
|
|
205
|
+
theme = "danger";
|
|
206
|
+
break;
|
|
207
|
+
// Dark
|
|
208
|
+
case ButtonTypes.Dark:
|
|
209
|
+
case ButtonTypes.OutlineDark:
|
|
210
|
+
theme = "dark";
|
|
211
|
+
break;
|
|
212
|
+
// Info
|
|
213
|
+
case ButtonTypes.Info:
|
|
214
|
+
case ButtonTypes.OutlineInfo:
|
|
215
|
+
theme = "info";
|
|
216
|
+
break;
|
|
217
|
+
// Light
|
|
218
|
+
case ButtonTypes.Light:
|
|
219
|
+
case ButtonTypes.OutlineLight:
|
|
220
|
+
theme = "light";
|
|
221
|
+
break;
|
|
222
|
+
// Link
|
|
223
|
+
case ButtonTypes.Link:
|
|
224
|
+
case ButtonTypes.OutlineLink:
|
|
225
|
+
theme = "light-border";
|
|
226
|
+
break;
|
|
227
|
+
// Primary
|
|
228
|
+
case ButtonTypes.Primary:
|
|
229
|
+
case ButtonTypes.OutlinePrimary:
|
|
230
|
+
theme = "primary";
|
|
231
|
+
break;
|
|
232
|
+
// Secondary
|
|
233
|
+
case ButtonTypes.Secondary:
|
|
234
|
+
case ButtonTypes.OutlineSecondary:
|
|
235
|
+
theme = "secondary";
|
|
236
|
+
break;
|
|
237
|
+
// Success
|
|
238
|
+
case ButtonTypes.Success:
|
|
239
|
+
case ButtonTypes.OutlineSuccess:
|
|
240
|
+
theme = "success";
|
|
241
|
+
break;
|
|
242
|
+
// Warning
|
|
243
|
+
case ButtonTypes.Warning:
|
|
244
|
+
case ButtonTypes.OutlineWarning:
|
|
245
|
+
theme = "warning";
|
|
246
|
+
break;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
196
249
|
break;
|
|
197
250
|
}
|
|
198
251
|
|
|
@@ -47,7 +47,9 @@ class _TooltipGroup extends Base<ITooltipGroupProps> implements ITooltipGroup {
|
|
|
47
47
|
for (let i = 0; i < tooltips.length; i++) {
|
|
48
48
|
let tooltipProps = tooltips[i];
|
|
49
49
|
|
|
50
|
-
// Set the
|
|
50
|
+
// Set the properties
|
|
51
|
+
tooltipProps.options = tooltipProps.options || this.props.tooltipOptions;
|
|
52
|
+
tooltipProps.placement = tooltipProps.placement || this.props.tooltipPlacement;
|
|
51
53
|
tooltipProps.type = tooltipProps.type || this.props.tooltipType;
|
|
52
54
|
|
|
53
55
|
// See if the button props exists
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
*/
|
|
41
41
|
export const TooltipGroup: (props: ITooltipGroupProps, template?: string, btnTemplate?: string) => ITooltipGroup;
|
|
42
42
|
|
|
43
|
+
import { ITippyProps } from "../../types";
|
|
43
44
|
import { IBaseProps } from "../types";
|
|
44
45
|
import { ITooltip, ITooltipProps } from "../tooltip/types";
|
|
45
46
|
|
|
@@ -71,5 +72,7 @@ export interface ITooltipGroupProps extends IBaseProps<ITooltipGroup> {
|
|
|
71
72
|
isSmall?: boolean;
|
|
72
73
|
isVertical?: boolean;
|
|
73
74
|
label?: string;
|
|
75
|
+
tooltipOptions?: ITippyProps;
|
|
76
|
+
tooltipPlacement?: number;
|
|
74
77
|
tooltipType?: number;
|
|
75
78
|
}
|