gd-bs 5.2.2 → 5.2.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gd-bs",
3
- "version": "5.2.2",
3
+ "version": "5.2.3",
4
4
  "description": "Bootstrap JavaScript, TypeScript and Web Components library.",
5
5
  "main": "build/index.js",
6
6
  "typings": "src/index.d.ts",
package/src/bs.scss CHANGED
@@ -234,30 +234,18 @@ table.dataTable thead .sorting_desc {
234
234
  background-color: #0078d4;
235
235
  }
236
236
 
237
-
238
- /* Tippy Tooltip primary theme color */
239
-
240
237
  .tippy-box[data-theme~='primary'][data-placement^='top']>.tippy-arrow::before {
241
238
  border-top-color: #0078d4;
242
239
  }
243
240
 
244
-
245
- /* Tippy Tooltip primary theme color */
246
-
247
241
  .tippy-box[data-theme~='primary'][data-placement^='bottom']>.tippy-arrow::before {
248
242
  border-bottom-color: #0078d4;
249
243
  }
250
244
 
251
-
252
- /* Tippy Tooltip primary theme color */
253
-
254
245
  .tippy-box[data-theme~='primary'][data-placement^='left']>.tippy-arrow::before {
255
246
  border-left-color: #0078d4;
256
247
  }
257
248
 
258
-
259
- /* Tippy Tooltip primary theme color */
260
-
261
249
  .tippy-box[data-theme~='primary'][data-placement^='right']>.tippy-arrow::before {
262
250
  border-right-color: #0078d4;
263
251
  }
@@ -269,30 +257,159 @@ table.dataTable thead .sorting_desc {
269
257
  background-color: #6c757d;
270
258
  }
271
259
 
272
-
273
- /* Tippy Tooltip secondary theme color */
274
-
275
260
  .tippy-box[data-theme~='secondary'][data-placement^='top']>.tippy-arrow::before {
276
261
  border-top-color: #6c757d;
277
262
  }
278
263
 
279
-
280
- /* Tippy Tooltip secondary theme color */
281
-
282
264
  .tippy-box[data-theme~='secondary'][data-placement^='bottom']>.tippy-arrow::before {
283
265
  border-bottom-color: #6c757d;
284
266
  }
285
267
 
286
-
287
- /* Tippy Tooltip secondary theme color */
288
-
289
268
  .tippy-box[data-theme~='secondary'][data-placement^='left']>.tippy-arrow::before {
290
269
  border-left-color: #6c757d;
291
270
  }
292
271
 
293
-
294
- /* Tippy Tooltip secondary theme color */
295
-
296
272
  .tippy-box[data-theme~='secondary'][data-placement^='right']>.tippy-arrow::before {
297
273
  border-right-color: #6c757d;
274
+ }
275
+
276
+
277
+ /* Tippy Tooltip success theme color */
278
+
279
+ .tippy-box[data-theme~='success'] {
280
+ background-color: #198754;
281
+ }
282
+
283
+ .tippy-box[data-theme~='success'][data-placement^='top']>.tippy-arrow::before {
284
+ border-top-color: #198754;
285
+ }
286
+
287
+ .tippy-box[data-theme~='success'][data-placement^='bottom']>.tippy-arrow::before {
288
+ border-bottom-color: #198754;
289
+ }
290
+
291
+ .tippy-box[data-theme~='success'][data-placement^='left']>.tippy-arrow::before {
292
+ border-left-color: #198754;
293
+ }
294
+
295
+ .tippy-box[data-theme~='success'][data-placement^='right']>.tippy-arrow::before {
296
+ border-right-color: #198754;
297
+ }
298
+
299
+
300
+ /* Tippy Tooltip info theme color */
301
+
302
+ .tippy-box[data-theme~='info'] {
303
+ background-color: #0dcaf0;
304
+ color: #000;
305
+ }
306
+
307
+ .tippy-box[data-theme~='info'][data-placement^='top']>.tippy-arrow::before {
308
+ border-top-color: #0dcaf0;
309
+ }
310
+
311
+ .tippy-box[data-theme~='info'][data-placement^='bottom']>.tippy-arrow::before {
312
+ border-bottom-color: #0dcaf0;
313
+ }
314
+
315
+ .tippy-box[data-theme~='info'][data-placement^='left']>.tippy-arrow::before {
316
+ border-left-color: #0dcaf0;
317
+ }
318
+
319
+ .tippy-box[data-theme~='info'][data-placement^='right']>.tippy-arrow::before {
320
+ border-right-color: #0dcaf0;
321
+ }
322
+
323
+
324
+ /* Tippy Tooltip warning theme color */
325
+
326
+ .tippy-box[data-theme~='warning'] {
327
+ background-color: #ffc107;
328
+ color: #000;
329
+ }
330
+
331
+ .tippy-box[data-theme~='warning'][data-placement^='top']>.tippy-arrow::before {
332
+ border-top-color: #ffc107;
333
+ }
334
+
335
+ .tippy-box[data-theme~='warning'][data-placement^='bottom']>.tippy-arrow::before {
336
+ border-bottom-color: #ffc107;
337
+ }
338
+
339
+ .tippy-box[data-theme~='warning'][data-placement^='left']>.tippy-arrow::before {
340
+ border-left-color: #ffc107;
341
+ }
342
+
343
+ .tippy-box[data-theme~='warning'][data-placement^='right']>.tippy-arrow::before {
344
+ border-right-color: #ffc107;
345
+ }
346
+
347
+
348
+ /* Tippy Tooltip danger theme color */
349
+
350
+ .tippy-box[data-theme~='danger'] {
351
+ background-color: #dc3545;
352
+ }
353
+
354
+ .tippy-box[data-theme~='danger'][data-placement^='top']>.tippy-arrow::before {
355
+ border-top-color: #dc3545;
356
+ }
357
+
358
+ .tippy-box[data-theme~='danger'][data-placement^='bottom']>.tippy-arrow::before {
359
+ border-bottom-color: #dc3545;
360
+ }
361
+
362
+ .tippy-box[data-theme~='danger'][data-placement^='left']>.tippy-arrow::before {
363
+ border-left-color: #dc3545;
364
+ }
365
+
366
+ .tippy-box[data-theme~='danger'][data-placement^='right']>.tippy-arrow::before {
367
+ border-right-color: #dc3545;
368
+ }
369
+
370
+
371
+ /* Tippy Tooltip light theme color - override Tippy default to match Bootstrap */
372
+
373
+ .tippy-box[data-theme~='light'] {
374
+ background-color: #f8f9fa !important;
375
+ color: #000 !important;
376
+ }
377
+
378
+ .tippy-box[data-theme~='light'][data-placement^='top']>.tippy-arrow::before {
379
+ border-top-color: #f8f9fa !important;
380
+ }
381
+
382
+ .tippy-box[data-theme~='light'][data-placement^='bottom']>.tippy-arrow::before {
383
+ border-bottom-color: #f8f9fa !important;
384
+ }
385
+
386
+ .tippy-box[data-theme~='light'][data-placement^='left']>.tippy-arrow::before {
387
+ border-left-color: #f8f9fa !important;
388
+ }
389
+
390
+ .tippy-box[data-theme~='light'][data-placement^='right']>.tippy-arrow::before {
391
+ border-right-color: #f8f9fa !important;
392
+ }
393
+
394
+
395
+ /* Tippy Tooltip dark theme color */
396
+
397
+ .tippy-box[data-theme~='dark'] {
398
+ background-color: #212529;
399
+ }
400
+
401
+ .tippy-box[data-theme~='dark'][data-placement^='top']>.tippy-arrow::before {
402
+ border-top-color: #212529;
403
+ }
404
+
405
+ .tippy-box[data-theme~='dark'][data-placement^='bottom']>.tippy-arrow::before {
406
+ border-bottom-color: #212529;
407
+ }
408
+
409
+ .tippy-box[data-theme~='dark'][data-placement^='left']>.tippy-arrow::before {
410
+ border-left-color: #212529;
411
+ }
412
+
413
+ .tippy-box[data-theme~='dark'][data-placement^='right']>.tippy-arrow::before {
414
+ border-right-color: #212529;
298
415
  }
@@ -207,11 +207,50 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
207
207
  // Get the toggle
208
208
  let toggle = this.el.querySelector(".dropdown-toggle") as HTMLElement;
209
209
  if (toggle && this._elMenu) {
210
+ // Set the type, based on the current dropdown type
211
+ let popoverType = PopoverTypes.Light;
212
+ switch (this.props.type) {
213
+ case DropdownTypes.Danger:
214
+ case DropdownTypes.OutlineDanger:
215
+ popoverType = PopoverTypes.Danger;
216
+ break;
217
+ case DropdownTypes.Dark:
218
+ case DropdownTypes.OutlineDark:
219
+ popoverType = PopoverTypes.Dark;
220
+ break;
221
+ case DropdownTypes.Info:
222
+ case DropdownTypes.OutlineInfo:
223
+ popoverType = PopoverTypes.Info;
224
+ break;
225
+ case DropdownTypes.Light:
226
+ case DropdownTypes.OutlineLight:
227
+ case DropdownTypes.Link:
228
+ case DropdownTypes.OutlineLink:
229
+ popoverType = PopoverTypes.Light;
230
+ break;
231
+ case DropdownTypes.Primary:
232
+ case DropdownTypes.OutlinePrimary:
233
+ popoverType = PopoverTypes.Primary;
234
+ break;
235
+ case DropdownTypes.Secondary:
236
+ case DropdownTypes.OutlineSecondary:
237
+ popoverType = PopoverTypes.Secondary;
238
+ break;
239
+ case DropdownTypes.Success:
240
+ case DropdownTypes.OutlineSuccess:
241
+ popoverType = PopoverTypes.Success;
242
+ break;
243
+ case DropdownTypes.Warning:
244
+ case DropdownTypes.OutlineWarning:
245
+ popoverType = PopoverTypes.Warning;
246
+ break;
247
+ }
248
+
210
249
  // Create the props
211
250
  let props: IPopoverProps = {
212
251
  target: toggle,
213
252
  placement: PopoverPlacements.LeftEnd,
214
- type: PopoverTypes.Light,
253
+ type: popoverType,
215
254
  options: {
216
255
  arrow: false,
217
256
  trigger: "click",
@@ -10,12 +10,17 @@ import { appendContent } from "../common";
10
10
  * Popover Types
11
11
  */
12
12
  export enum PopoverTypes {
13
- Light = 1,
14
- LightBorder = 2,
15
- Material = 3,
16
- Primary = 4,
17
- Secondary = 5,
18
- Translucent = 6
13
+ Danger = 1,
14
+ Dark = 2,
15
+ Info = 3,
16
+ Light = 4,
17
+ LightBorder = 5,
18
+ Material = 6,
19
+ Primary = 7,
20
+ Secondary = 8,
21
+ Success = 9,
22
+ Translucent = 10,
23
+ Warning = 11
19
24
  }
20
25
 
21
26
  /**
@@ -121,6 +126,18 @@ class _Popover extends Base<IPopoverProps> implements IPopover {
121
126
  // Set the theme
122
127
  let theme = null;
123
128
  switch (this.props.type) {
129
+ // Dark
130
+ case PopoverTypes.Dark:
131
+ theme = "dark";
132
+ break;
133
+ // Danger
134
+ case PopoverTypes.Danger:
135
+ theme = "danger";
136
+ break;
137
+ // Info
138
+ case PopoverTypes.Info:
139
+ theme = "info";
140
+ break;
124
141
  // Light
125
142
  case PopoverTypes.Light:
126
143
  theme = "light";
@@ -140,10 +157,18 @@ class _Popover extends Base<IPopoverProps> implements IPopover {
140
157
  case PopoverTypes.Secondary:
141
158
  theme = "secondary";
142
159
  break;
160
+ // Success
161
+ case PopoverTypes.Success:
162
+ theme = "success";
163
+ break;
143
164
  // Translucent
144
165
  case PopoverTypes.Translucent:
145
166
  theme = "translucent";
146
167
  break;
168
+ // Warning
169
+ case PopoverTypes.Warning:
170
+ theme = "warning";
171
+ break;
147
172
  // Default - Light Border
148
173
  default:
149
174
  theme = "light-border";
@@ -106,12 +106,17 @@ export interface IPopoverProps extends IBaseProps<IPopover> {
106
106
  * Popover Types
107
107
  */
108
108
  export type IPopoverTypes = {
109
+ Danger: number;
110
+ Dark: number;
111
+ Info: number;
109
112
  Light: number;
110
113
  LightBorder: number;
111
114
  Material: number;
112
115
  Primary: number;
113
116
  Secondary: number;
117
+ Success: number;
114
118
  Translucent: number;
119
+ Warning: number;
115
120
  }
116
121
 
117
122
  /**
@@ -11,12 +11,17 @@ import { appendContent } from "../common";
11
11
  * Tooltip Types
12
12
  */
13
13
  export enum TooltipTypes {
14
- Light = 1,
15
- LightBorder = 2,
16
- Material = 3,
17
- Primary = 4,
18
- Secondary = 5,
19
- Translucent = 6
14
+ Danger = 1,
15
+ Dark = 2,
16
+ Info = 3,
17
+ Light = 4,
18
+ LightBorder = 5,
19
+ Material = 6,
20
+ Primary = 7,
21
+ Secondary = 8,
22
+ Success = 9,
23
+ Translucent = 10,
24
+ Warning = 11
20
25
  }
21
26
 
22
27
  /**
@@ -142,6 +147,18 @@ class _Tooltip extends Base<ITooltipProps> {
142
147
  // Set the theme
143
148
  let theme = null;
144
149
  switch (this.props.type) {
150
+ // Dark
151
+ case TooltipTypes.Dark:
152
+ theme = "dark";
153
+ break;
154
+ // Danger
155
+ case TooltipTypes.Danger:
156
+ theme = "danger";
157
+ break;
158
+ // Info
159
+ case TooltipTypes.Info:
160
+ theme = "info";
161
+ break;
145
162
  // Light
146
163
  case TooltipTypes.Light:
147
164
  theme = "light";
@@ -161,10 +178,18 @@ class _Tooltip extends Base<ITooltipProps> {
161
178
  case TooltipTypes.Secondary:
162
179
  theme = "secondary";
163
180
  break;
181
+ // Success
182
+ case TooltipTypes.Success:
183
+ theme = "success";
184
+ break;
164
185
  // Translucent
165
186
  case TooltipTypes.Translucent:
166
187
  theme = "translucent";
167
188
  break;
189
+ // Warning
190
+ case TooltipTypes.Warning:
191
+ theme = "warning";
192
+ break;
168
193
  // Default - Secondary
169
194
  default:
170
195
  theme = "secondary";
@@ -97,12 +97,17 @@ export interface ITooltipProps extends IBaseProps<ITooltip> {
97
97
  * Tooltip Types
98
98
  */
99
99
  export type ITooltipTypes = {
100
+ Danger: number;
101
+ Dark: number;
102
+ Info: number;
100
103
  Light: number;
101
104
  LightBorder: number;
102
105
  Material: number;
103
106
  Primary: number;
104
107
  Secondary: number;
108
+ Success: number;
105
109
  Translucent: number;
110
+ Warning: number;
106
111
  }
107
112
 
108
113
  /**