@gitlab/ui 97.3.0 → 98.1.0

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.
Files changed (72) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/index.css +1 -1
  3. package/dist/index.css.map +1 -1
  4. package/dist/index.js +0 -1
  5. package/dist/tokens/build/js/tokens.dark.js +84 -84
  6. package/dist/tokens/css/tokens.css +1 -1
  7. package/dist/tokens/css/tokens.dark.css +47 -47
  8. package/dist/tokens/js/tokens.dark.js +84 -84
  9. package/dist/tokens/json/tokens.dark.json +148 -133
  10. package/dist/tokens/json/tokens.json +64 -49
  11. package/dist/tokens/scss/_tokens.dark.scss +47 -47
  12. package/dist/tokens/scss/_tokens.scss +1 -1
  13. package/dist/vendor/bootstrap-vue/src/components/collapse/collapse.js +3 -36
  14. package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +1 -1
  15. package/dist/vendor/bootstrap-vue/src/components/transition/bv-transition.js +12 -2
  16. package/dist/vendor/bootstrap-vue/src/constants/components.js +1 -3
  17. package/dist/vendor/bootstrap-vue/src/constants/env.js +1 -2
  18. package/dist/vendor/bootstrap-vue/src/index.js +0 -2
  19. package/dist/vendor/bootstrap-vue/src/mixins/dropdown.js +12 -39
  20. package/package.json +2 -1
  21. package/src/index.js +0 -1
  22. package/src/scss/bootstrap_vue.scss +0 -1
  23. package/src/scss/components.scss +0 -1
  24. package/src/tokens/action.tokens.json +21 -12
  25. package/src/tokens/build/css/tokens.css +1 -1
  26. package/src/tokens/build/css/tokens.dark.css +47 -47
  27. package/src/tokens/build/js/tokens.dark.js +84 -84
  28. package/src/tokens/build/json/tokens.dark.json +148 -133
  29. package/src/tokens/build/json/tokens.json +64 -49
  30. package/src/tokens/build/scss/_tokens.dark.scss +47 -47
  31. package/src/tokens/build/scss/_tokens.scss +1 -1
  32. package/src/tokens/contextual/button.tokens.json +43 -37
  33. package/src/vendor/bootstrap-vue/package.json +3 -20
  34. package/src/vendor/bootstrap-vue/src/components/collapse/MODIFICATIONS.md +14 -0
  35. package/src/vendor/bootstrap-vue/src/components/collapse/collapse.js +3 -37
  36. package/src/vendor/bootstrap-vue/src/components/collapse/collapse.spec.js +0 -132
  37. package/src/vendor/bootstrap-vue/src/components/collapse/package.json +0 -4
  38. package/src/vendor/bootstrap-vue/src/components/dropdown/README.md +1 -1
  39. package/src/vendor/bootstrap-vue/src/components/form-input/form-input.spec.js +3 -0
  40. package/src/vendor/bootstrap-vue/src/components/index.d.ts +0 -1
  41. package/src/vendor/bootstrap-vue/src/components/index.scss +0 -1
  42. package/src/vendor/bootstrap-vue/src/components/modal/MODIFICATIONS.md +8 -5
  43. package/src/vendor/bootstrap-vue/src/components/nav/package.json +1 -1
  44. package/src/vendor/bootstrap-vue/src/components/popover/popover.spec.js +0 -1
  45. package/src/vendor/bootstrap-vue/src/components/table/table-filtering.spec.js +1 -1
  46. package/src/vendor/bootstrap-vue/src/components/tabs/tabs.js +1 -1
  47. package/src/vendor/bootstrap-vue/src/components/toast/toast.spec.js +6 -18
  48. package/src/vendor/bootstrap-vue/src/components/tooltip/tooltip.spec.js +67 -356
  49. package/src/vendor/bootstrap-vue/src/components/transition/bv-transition.js +15 -2
  50. package/src/vendor/bootstrap-vue/src/constants/components.js +0 -2
  51. package/src/vendor/bootstrap-vue/src/constants/env.js +0 -3
  52. package/src/vendor/bootstrap-vue/src/directives/tooltip/tooltip.spec.js +46 -79
  53. package/src/vendor/bootstrap-vue/src/index.js +0 -4
  54. package/src/vendor/bootstrap-vue/src/mixins/dropdown.js +12 -36
  55. package/src/vendor/bootstrap-vue/src/utils/config.spec.js +20 -2
  56. package/dist/components/base/navbar/navbar.js +0 -48
  57. package/dist/vendor/bootstrap-vue/src/components/navbar/index.js +0 -2
  58. package/dist/vendor/bootstrap-vue/src/components/navbar/navbar-brand.js +0 -40
  59. package/dist/vendor/bootstrap-vue/src/components/navbar/navbar.js +0 -72
  60. package/src/components/base/navbar/navbar.md +0 -4
  61. package/src/components/base/navbar/navbar.scss +0 -0
  62. package/src/components/base/navbar/navbar.vue +0 -17
  63. package/src/vendor/bootstrap-vue/src/components/navbar/README.md +0 -332
  64. package/src/vendor/bootstrap-vue/src/components/navbar/_navbar.scss +0 -1
  65. package/src/vendor/bootstrap-vue/src/components/navbar/index.d.ts +0 -10
  66. package/src/vendor/bootstrap-vue/src/components/navbar/index.js +0 -4
  67. package/src/vendor/bootstrap-vue/src/components/navbar/index.scss +0 -1
  68. package/src/vendor/bootstrap-vue/src/components/navbar/navbar-brand.js +0 -42
  69. package/src/vendor/bootstrap-vue/src/components/navbar/navbar-brand.spec.js +0 -50
  70. package/src/vendor/bootstrap-vue/src/components/navbar/navbar.js +0 -78
  71. package/src/vendor/bootstrap-vue/src/components/navbar/navbar.spec.js +0 -130
  72. package/src/vendor/bootstrap-vue/src/components/navbar/package.json +0 -54
@@ -34,7 +34,7 @@
34
34
  "default": {
35
35
  "$value": {
36
36
  "default": "{color.neutral.0}",
37
- "dark": "{color.neutral.900}"
37
+ "dark": "rgba(137, 136, 141, 0.4)"
38
38
  },
39
39
  "$type": "color",
40
40
  "$description": "Used for the background of an default primary button in the default state."
@@ -42,7 +42,7 @@
42
42
  "hover": {
43
43
  "$value": {
44
44
  "default": "{color.neutral.50}",
45
- "dark": "{color.neutral.900}"
45
+ "dark": "rgba(137, 136, 141, 0.64)"
46
46
  },
47
47
  "$type": "color",
48
48
  "$description": "Used for the background of an default primary button in the hover state."
@@ -55,7 +55,7 @@
55
55
  "active": {
56
56
  "$value": {
57
57
  "default": "{color.neutral.100}",
58
- "dark": "{color.neutral.800}"
58
+ "dark": "rgba(137, 136, 141, 0.32)"
59
59
  },
60
60
  "$type": "color",
61
61
  "$description": "Used for the background of an default primary button in the active state."
@@ -67,7 +67,7 @@
67
67
  "default": {
68
68
  "$value": {
69
69
  "default": "{color.neutral.200}",
70
- "dark": "{color.neutral.700}"
70
+ "dark": "{color.alpha.0}"
71
71
  },
72
72
  "$type": "color",
73
73
  "$description": "Used for the border of an default primary button in the default state."
@@ -75,7 +75,7 @@
75
75
  "hover": {
76
76
  "$value": {
77
77
  "default": "{color.neutral.400}",
78
- "dark": "{color.neutral.500}"
78
+ "dark": "{color.alpha.0}"
79
79
  },
80
80
  "$type": "color",
81
81
  "$description": "Used for the border of an default primary button in the hover state."
@@ -88,7 +88,7 @@
88
88
  "active": {
89
89
  "$value": {
90
90
  "default": "{color.neutral.600}",
91
- "dark": "{color.neutral.300}"
91
+ "dark": "{color.alpha.0}"
92
92
  },
93
93
  "$type": "color",
94
94
  "$description": "Used for the border of an default primary button in the active state."
@@ -176,7 +176,10 @@
176
176
  "foreground": {
177
177
  "color": {
178
178
  "default": {
179
- "$value": "{action.strong.confirm.foreground.color.default}",
179
+ "$value": {
180
+ "default": "{color.neutral.0}",
181
+ "dark": "{color.neutral.950}"
182
+ },
180
183
  "$type": "color",
181
184
  "$description": "Used for the foreground of a confirm (positive) primary button in the default state."
182
185
  },
@@ -226,7 +229,7 @@
226
229
  "default": {
227
230
  "$value": {
228
231
  "default": "{color.blue.600}",
229
- "dark": "{color.blue.300}"
232
+ "dark": "{color.alpha.0}"
230
233
  },
231
234
  "$type": "color",
232
235
  "$description": "Used for the border of a confirm (positive) primary button in the default state."
@@ -234,7 +237,7 @@
234
237
  "hover": {
235
238
  "$value": {
236
239
  "default": "{color.blue.800}",
237
- "dark": "{color.blue.100}"
240
+ "dark": "{color.alpha.0}"
238
241
  },
239
242
  "$type": "color",
240
243
  "$description": "Used for the border of a confirm (positive) primary button in the hover state."
@@ -247,7 +250,7 @@
247
250
  "active": {
248
251
  "$value": {
249
252
  "default": "{color.blue.900}",
250
- "dark": "{color.blue.50}"
253
+ "dark": "{color.alpha.0}"
251
254
  },
252
255
  "$type": "color",
253
256
  "$description": "Used for the border of a confirm (positive) primary button in the active state."
@@ -261,7 +264,7 @@
261
264
  "default": {
262
265
  "$value": {
263
266
  "default": "{color.blue.500}",
264
- "dark": "{color.blue.400}"
267
+ "dark": "{color.blue.100}"
265
268
  },
266
269
  "$type": "color",
267
270
  "$description": "Used for the foreground of a confirm (positive) button in the default state."
@@ -269,7 +272,7 @@
269
272
  "hover": {
270
273
  "$value": {
271
274
  "default": "{color.blue.700}",
272
- "dark": "{color.blue.200}"
275
+ "dark": "{color.blue.100}"
273
276
  },
274
277
  "$type": "color",
275
278
  "$description": "Used for the foreground of a confirm (positive) button in the hover state."
@@ -282,7 +285,7 @@
282
285
  "active": {
283
286
  "$value": {
284
287
  "default": "{color.blue.900}",
285
- "dark": "{color.blue.50}"
288
+ "dark": "{color.blue.100}"
286
289
  },
287
290
  "$type": "color",
288
291
  "$description": "Used for the foreground of a confirm (positive) button in the active state."
@@ -294,7 +297,7 @@
294
297
  "default": {
295
298
  "$value": {
296
299
  "default": "{color.neutral.0}",
297
- "dark": "{color.neutral.900}"
300
+ "dark": "rgba(66, 143, 220, 0.4)"
298
301
  },
299
302
  "$type": "color",
300
303
  "$description": "Used for the background of an outlined confirm (positive) button in the default state."
@@ -302,7 +305,7 @@
302
305
  "hover": {
303
306
  "$value": {
304
307
  "default": "{color.blue.50}",
305
- "dark": "{color.blue.900}"
308
+ "dark": "rgba(66, 143, 220, 0.64)"
306
309
  },
307
310
  "$type": "color",
308
311
  "$description": "Used for the background of an outlined confirm (positive) button in the hover state."
@@ -315,7 +318,7 @@
315
318
  "active": {
316
319
  "$value": {
317
320
  "default": "{color.blue.100}",
318
- "dark": "{color.blue.800}"
321
+ "dark": "rgba(66, 143, 220, 0.32)"
319
322
  },
320
323
  "$type": "color",
321
324
  "$description": "Used for the background of an outlined confirm (positive) button in the active state."
@@ -327,7 +330,7 @@
327
330
  "default": {
328
331
  "$value": {
329
332
  "default": "{color.blue.500}",
330
- "dark": "{color.blue.400}"
333
+ "dark": "{color.alpha.0}"
331
334
  },
332
335
  "$type": "color",
333
336
  "$description": "Used for the border of an outlined confirm (positive) button in the default state."
@@ -335,7 +338,7 @@
335
338
  "hover": {
336
339
  "$value": {
337
340
  "default": "{color.blue.700}",
338
- "dark": "{color.blue.200}"
341
+ "dark": "{color.alpha.0}"
339
342
  },
340
343
  "$type": "color",
341
344
  "$description": "Used for the border of an outlined confirm (positive) button in the hover state."
@@ -348,7 +351,7 @@
348
351
  "active": {
349
352
  "$value": {
350
353
  "default": "{color.blue.900}",
351
- "dark": "{color.blue.50}"
354
+ "dark": "{color.alpha.0}"
352
355
  },
353
356
  "$type": "color",
354
357
  "$description": "Used for the border of an outlined confirm (positive) button in the active state."
@@ -436,7 +439,10 @@
436
439
  "foreground": {
437
440
  "color": {
438
441
  "default": {
439
- "$value": "{color.neutral.0}",
442
+ "$value": {
443
+ "default": "{color.neutral.0}",
444
+ "dark": "{color.neutral.950}"
445
+ },
440
446
  "$type": "color",
441
447
  "$description": "Used for the foreground of a danger (destructive) primary button in the default state."
442
448
  },
@@ -462,7 +468,7 @@
462
468
  "default": {
463
469
  "$value": {
464
470
  "default": "{color.red.500}",
465
- "dark": "{color.red.400}"
471
+ "dark": "{color.red.300}"
466
472
  },
467
473
  "$type": "color",
468
474
  "$description": "Used for the background of a danger (destructive) primary button in the default state."
@@ -470,7 +476,7 @@
470
476
  "hover": {
471
477
  "$value": {
472
478
  "default": "{color.red.600}",
473
- "dark": "{color.red.300}"
479
+ "dark": "{color.red.200}"
474
480
  },
475
481
  "$type": "color",
476
482
  "$description": "Used for the background of a danger (destructive) primary button in the hover state."
@@ -483,7 +489,7 @@
483
489
  "active": {
484
490
  "$value": {
485
491
  "default": "{color.red.800}",
486
- "dark": "{color.red.100}"
492
+ "dark": "{color.red.400}"
487
493
  },
488
494
  "$type": "color",
489
495
  "$description": "Used for the background of a danger (destructive) primary button in the active state."
@@ -495,7 +501,7 @@
495
501
  "default": {
496
502
  "$value": {
497
503
  "default": "{color.red.600}",
498
- "dark": "{color.red.300}"
504
+ "dark": "{color.alpha.0}"
499
505
  },
500
506
  "$type": "color",
501
507
  "$description": "Used for the border of a danger (destructive) primary button in the default state."
@@ -503,7 +509,7 @@
503
509
  "hover": {
504
510
  "$value": {
505
511
  "default": "{color.red.800}",
506
- "dark": "{color.red.100}"
512
+ "dark": "{color.alpha.0}"
507
513
  },
508
514
  "$type": "color",
509
515
  "$description": "Used for the border of a danger (destructive) primary button in the hover state."
@@ -516,7 +522,7 @@
516
522
  "active": {
517
523
  "$value": {
518
524
  "default": "{color.red.900}",
519
- "dark": "{color.red.50}"
525
+ "dark": "{color.alpha.0}"
520
526
  },
521
527
  "$type": "color",
522
528
  "$description": "Used for the border of a danger (destructive) primary button in the active state."
@@ -530,7 +536,7 @@
530
536
  "default": {
531
537
  "$value": {
532
538
  "default": "{color.red.500}",
533
- "dark": "{color.red.400}"
539
+ "dark": "{color.red.100}"
534
540
  },
535
541
  "$type": "color",
536
542
  "$description": "Used for the foreground of a danger (destructive) button in the default state."
@@ -538,7 +544,7 @@
538
544
  "hover": {
539
545
  "$value": {
540
546
  "default": "{color.red.700}",
541
- "dark": "{color.red.200}"
547
+ "dark": "{color.red.50}"
542
548
  },
543
549
  "$type": "color",
544
550
  "$description": "Used for the foreground of a danger (destructive) button in the hover state."
@@ -551,7 +557,7 @@
551
557
  "active": {
552
558
  "$value": {
553
559
  "default": "{color.red.900}",
554
- "dark": "{color.red.50}"
560
+ "dark": "{button.danger.secondary.foreground.color.focus}"
555
561
  },
556
562
  "$type": "color",
557
563
  "$description": "Used for the foreground of a danger (destructive) button in the active state."
@@ -563,7 +569,7 @@
563
569
  "default": {
564
570
  "$value": {
565
571
  "default": "{color.neutral.0}",
566
- "dark": "{color.neutral.900}"
572
+ "dark": "rgba(236, 89, 65, 0.40)"
567
573
  },
568
574
  "$type": "color",
569
575
  "$description": "Used for the background of an outlined danger (destructive) button in the default state."
@@ -571,7 +577,7 @@
571
577
  "hover": {
572
578
  "$value": {
573
579
  "default": "{color.red.50}",
574
- "dark": "{color.red.900}"
580
+ "dark": "rgba(236, 89, 65, 0.64)"
575
581
  },
576
582
  "$type": "color",
577
583
  "$description": "Used for the background of an outlined danger (destructive) button in the hover state."
@@ -584,7 +590,7 @@
584
590
  "active": {
585
591
  "$value": {
586
592
  "default": "{color.red.100}",
587
- "dark": "{color.red.800}"
593
+ "dark": "rgba(236, 89, 65, 0.32)"
588
594
  },
589
595
  "$type": "color",
590
596
  "$description": "Used for the background of an outlined danger (destructive) button in the active state."
@@ -596,7 +602,7 @@
596
602
  "default": {
597
603
  "$value": {
598
604
  "default": "{color.red.500}",
599
- "dark": "{color.red.400}"
605
+ "dark": "{color.alpha.0}"
600
606
  },
601
607
  "$type": "color",
602
608
  "$description": "Used for the border of an outlined danger (destructive) button in the default state."
@@ -604,7 +610,7 @@
604
610
  "hover": {
605
611
  "$value": {
606
612
  "default": "{color.red.700}",
607
- "dark": "{color.red.200}"
613
+ "dark": "{color.alpha.0}"
608
614
  },
609
615
  "$type": "color",
610
616
  "$description": "Used for the border of an outlined danger (destructive) button in the hover state."
@@ -617,7 +623,7 @@
617
623
  "active": {
618
624
  "$value": {
619
625
  "default": "{color.red.900}",
620
- "dark": "{color.red.50}"
626
+ "dark": "{color.alpha.0}"
621
627
  },
622
628
  "$type": "color",
623
629
  "$description": "Used for the border of an outlined danger (destructive) button in the active state."
@@ -853,7 +859,7 @@
853
859
  "color": {
854
860
  "$value": {
855
861
  "default": "{color.neutral.10}",
856
- "dark": "{color.neutral.950}"
862
+ "dark": "rgba(137, 136, 141, 0.16)"
857
863
  },
858
864
  "$type": "color",
859
865
  "$description": "Used for the background of a disabled button."
@@ -863,7 +869,7 @@
863
869
  "color": {
864
870
  "$value": {
865
871
  "default": "{color.neutral.100}",
866
- "dark": "{color.neutral.800}"
872
+ "dark": "{color.alpha.0}"
867
873
  },
868
874
  "$type": "color",
869
875
  "$description": "Used for the border of a disabled button."
@@ -59,10 +59,9 @@
59
59
  "audit": "improved-yarn-audit --ignore-dev-deps --min-severity moderate -e 1488",
60
60
  "lint": "eslint --ext .js,.md,.vue ./",
61
61
  "prettify": "prettier --write '**/*.{js,json,md,scss,ts,vue}'",
62
- "test": "yarn run test:meta && yarn run test:lint && yarn run test:unit",
62
+ "test": "yarn run test:meta && yarn run test:lint",
63
63
  "test:lint": "yarn run lint",
64
- "test:meta": "scripts/check-meta.sh",
65
- "test:unit": "jest"
64
+ "test:meta": "scripts/check-meta.sh"
66
65
  },
67
66
  "dependencies": {
68
67
  "bootstrap": "^4.6.1",
@@ -71,15 +70,6 @@
71
70
  "vue-functional-data-merge": "^3.1.0"
72
71
  },
73
72
  "devDependencies": {
74
- "@babel/core": "^7.16.5",
75
- "@babel/preset-env": "^7.14.2",
76
- "@testing-library/jest-dom": "^5.12.0",
77
- "@vue/compat": "^3.2.40",
78
- "@vue/compiler-dom": "^3.2.40",
79
- "@vue/test-utils": "^1.3.0",
80
- "@vue/test-utils-vue3": "npm:@vue/test-utils@2.2.0",
81
- "babel-jest": "^26.6.3",
82
- "core-js": "^3.12.1",
83
73
  "eslint": "^7.26.0",
84
74
  "eslint-config-prettier": "^8.3.0",
85
75
  "eslint-config-standard": "^16.0.2",
@@ -92,14 +82,8 @@
92
82
  "eslint-plugin-promise": "^5.1.0",
93
83
  "eslint-plugin-vue": "^7.9.0",
94
84
  "improved-yarn-audit": "^3.0.0",
95
- "jest": "^26.6.3",
96
85
  "lodash": "^4.17.21",
97
- "prettier": "1.14.3",
98
- "vue": "^2.6.12",
99
- "vue-router": "^3.5.1",
100
- "vue-server-renderer": "^2.6.12",
101
- "vue-template-compiler": "^2.6.12",
102
- "vue-test-utils-compat": "0.0.6"
86
+ "prettier": "1.14.3"
103
87
  },
104
88
  "keywords": [
105
89
  "Bootstrap",
@@ -138,7 +122,6 @@
138
122
  "List",
139
123
  "Modal",
140
124
  "Nav",
141
- "Navbar",
142
125
  "Option",
143
126
  "Overlay",
144
127
  "Pagination",
@@ -0,0 +1,14 @@
1
+ # Modifications to Vendored Code
2
+
3
+ **Library**: BootstrapVue
4
+ **Version**: 2.23.1 **Link:** https://bootstrap-vue.org **Source:**
5
+ https://github.com/bootstrap-vue/bootstrap-vue **Copyright:** (c) 2016-2024 BootstrapVue
6
+ **License:** (c)
7
+ [2016-2024 BootstrapVue](https://github.com/bootstrap-vue/bootstrap-vue/blob/master/LICENSE)
8
+
9
+ This file documents modifications made to the original BootstrapVue component files.
10
+
11
+ ## Removed props
12
+
13
+ The property `isNav` and code executed based on this property has been removed, as we removed the
14
+ Navbar logic.
@@ -1,18 +1,16 @@
1
1
  import { extend } from '../../vue'
2
2
  import { NAME_COLLAPSE } from '../../constants/components'
3
3
  import { CLASS_NAME_SHOW } from '../../constants/classes'
4
- import { IS_BROWSER } from '../../constants/env'
5
4
  import {
6
5
  EVENT_NAME_HIDDEN,
7
6
  EVENT_NAME_HIDE,
8
7
  EVENT_NAME_SHOW,
9
- EVENT_NAME_SHOWN,
10
- EVENT_OPTIONS_NO_CAPTURE
8
+ EVENT_NAME_SHOWN
11
9
  } from '../../constants/events'
12
10
  import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props'
13
11
  import { SLOT_NAME_DEFAULT } from '../../constants/slots'
14
12
  import { addClass, hasClass, removeClass, closest, matches, getCS } from '../../utils/dom'
15
- import { getRootActionEventName, getRootEventName, eventOnOff } from '../../utils/events'
13
+ import { getRootActionEventName, getRootEventName } from '../../utils/events'
16
14
  import { makeModelMixin } from '../../utils/model'
17
15
  import { sortKeys } from '../../utils/object'
18
16
  import { makeProp, makePropsConfigurable } from '../../utils/props'
@@ -46,7 +44,6 @@ export const props = makePropsConfigurable(
46
44
  // If `true` (and `visible` is `true` on mount), animate initially visible
47
45
  accordion: makeProp(PROP_TYPE_STRING),
48
46
  appear: makeProp(PROP_TYPE_BOOLEAN, false),
49
- isNav: makeProp(PROP_TYPE_BOOLEAN, false),
50
47
  tag: makeProp(PROP_TYPE_STRING, 'div')
51
48
  }),
52
49
  NAME_COLLAPSE
@@ -70,7 +67,6 @@ export const BCollapse = /*#__PURE__*/ extend({
70
67
  const { transitioning } = this
71
68
 
72
69
  return {
73
- 'navbar-collapse': this.isNav,
74
70
  collapse: !transitioning,
75
71
  show: this.show && !transitioning
76
72
  }
@@ -105,11 +101,6 @@ export const BCollapse = /*#__PURE__*/ extend({
105
101
  this.listenOnRoot(ROOT_ACTION_EVENT_NAME_TOGGLE, this.handleToggleEvent)
106
102
  // Listen to other collapses for accordion events
107
103
  this.listenOnRoot(ROOT_EVENT_NAME_ACCORDION, this.handleAccordionEvent)
108
- if (this.isNav) {
109
- // Set up handlers
110
- this.setWindowEvents(true)
111
- this.handleResize()
112
- }
113
104
  this.$nextTick(() => {
114
105
  this.emitState()
115
106
  })
@@ -126,31 +117,11 @@ export const BCollapse = /*#__PURE__*/ extend({
126
117
  // It is emitted regardless if the visible state changes
127
118
  this.emitSync()
128
119
  },
129
- /* istanbul ignore next */
130
- deactivated() {
131
- if (this.isNav) {
132
- this.setWindowEvents(false)
133
- }
134
- },
135
- /* istanbul ignore next */
136
- activated() {
137
- if (this.isNav) {
138
- this.setWindowEvents(true)
139
- }
140
- this.emitSync()
141
- },
142
120
  beforeDestroy() {
143
121
  // Trigger state emit if needed
144
122
  this.show = false
145
- if (this.isNav && IS_BROWSER) {
146
- this.setWindowEvents(false)
147
- }
148
123
  },
149
124
  methods: {
150
- setWindowEvents(on) {
151
- eventOnOff(on, window, 'resize', this.handleResize, EVENT_OPTIONS_NO_CAPTURE)
152
- eventOnOff(on, window, 'orientationchange', this.handleResize, EVENT_OPTIONS_NO_CAPTURE)
153
- },
154
125
  toggle() {
155
126
  this.show = !this.show
156
127
  },
@@ -206,9 +177,8 @@ export const BCollapse = /*#__PURE__*/ extend({
206
177
  },
207
178
  clickHandler(event) {
208
179
  const { target: el } = event
209
- // If we are in a nav/navbar, close the collapse when non-disabled link clicked
210
180
  /* istanbul ignore next: can't test `getComputedStyle()` in JSDOM */
211
- if (!this.isNav || !el || getCS(this.$el).display !== 'block') {
181
+ if (!el || getCS(this.$el).display !== 'block') {
212
182
  return
213
183
  }
214
184
  // Only close the collapse if it is not forced to be `display: block !important`
@@ -235,10 +205,6 @@ export const BCollapse = /*#__PURE__*/ extend({
235
205
  if ((isThis && !show) || (!isThis && show)) {
236
206
  this.toggle()
237
207
  }
238
- },
239
- handleResize() {
240
- // Handler for orientation/resize to set collapsed state in nav/navbar
241
- this.show = getCS(this.$el).display === 'block'
242
208
  }
243
209
  },
244
210
  render(h) {
@@ -46,32 +46,6 @@ describe('collapse', () => {
46
46
  expect(wrapper.attributes('id')).toBeDefined()
47
47
  expect(wrapper.attributes('id')).toEqual('test')
48
48
  expect(wrapper.classes()).toContain('collapse')
49
- expect(wrapper.classes()).not.toContain('navbar-collapse')
50
- expect(wrapper.classes()).not.toContain('show')
51
- expect(wrapper.element.style.display).toEqual('none')
52
- expect(wrapper.text()).toEqual('')
53
-
54
- wrapper.destroy()
55
- })
56
-
57
- it('should have expected structure when prop is-nav is set', async () => {
58
- const wrapper = mount(BCollapse, {
59
- attachTo: document.body,
60
- propsData: {
61
- // 'id' is a required prop
62
- id: 'test',
63
- isNav: true
64
- }
65
- })
66
- // const rootWrapper = createWrapper(wrapper.vm.$root)
67
- expect(wrapper.vm).toBeDefined()
68
- await waitNT(wrapper.vm)
69
- await waitRAF()
70
- expect(wrapper.element.tagName).toBe('DIV')
71
- expect(wrapper.attributes('id')).toBeDefined()
72
- expect(wrapper.attributes('id')).toEqual('test')
73
- expect(wrapper.classes()).toContain('collapse')
74
- expect(wrapper.classes()).toContain('navbar-collapse')
75
49
  expect(wrapper.classes()).not.toContain('show')
76
50
  expect(wrapper.element.style.display).toEqual('none')
77
51
  expect(wrapper.text()).toEqual('')
@@ -369,112 +343,6 @@ describe('collapse', () => {
369
343
  wrapper.destroy()
370
344
  })
371
345
 
372
- it('should close when clicking on contained nav-link prop is-nav is set', async () => {
373
- const App = {
374
- render(h) {
375
- return h('div', [
376
- // JSDOM supports `getComputedStyle()` when using stylesheets (non responsive)
377
- // https://github.com/jsdom/jsdom/blob/master/Changelog.md#030
378
- h('style', { attrs: { type: 'text/css' } }, '.collapse:not(.show) { display: none; }'),
379
- h(
380
- BCollapse,
381
- {
382
- props: {
383
- id: 'test',
384
- isNav: true,
385
- visible: true
386
- }
387
- },
388
- [h('a', { class: 'nav-link', attrs: { href: '#' } }, 'nav link')]
389
- )
390
- ])
391
- }
392
- }
393
- const wrapper = mount(App, {
394
- attachTo: document.body
395
- })
396
-
397
- expect(wrapper.vm).toBeDefined()
398
- const $collapse = wrapper.findComponent(BCollapse)
399
- expect($collapse.vm).toBeDefined()
400
-
401
- expect(wrapper.find('style').exists()).toBe(true)
402
-
403
- await waitNT(wrapper.vm)
404
- await waitRAF()
405
- await waitNT(wrapper.vm)
406
- await waitRAF()
407
-
408
- expect($collapse.classes()).toContain('show')
409
- expect($collapse.element.style.display).toEqual('')
410
- expect($collapse.find('.nav-link').exists()).toBe(true)
411
-
412
- // Click on link
413
- await wrapper.find('.nav-link').trigger('click')
414
- await waitRAF()
415
- await waitRAF()
416
- expect($collapse.classes()).not.toContain('show')
417
- expect($collapse.element.style.display).toEqual('none')
418
-
419
- wrapper.destroy()
420
- })
421
-
422
- it('should not close when clicking on nav-link prop is-nav is set & collapse is display block important', async () => {
423
- const App = {
424
- render(h) {
425
- return h('div', [
426
- // JSDOM supports `getComputedStyle()` when using stylesheets (non responsive)
427
- // Although it appears to be picky about CSS definition ordering
428
- // https://github.com/jsdom/jsdom/blob/master/Changelog.md#030
429
- h(
430
- 'style',
431
- { attrs: { type: 'text/css' } },
432
- '.collapse:not(.show) { display: none; } .d-block { display: block !important; }'
433
- ),
434
- h(
435
- BCollapse,
436
- {
437
- class: 'd-block',
438
- props: {
439
- id: 'test',
440
- isNav: true,
441
- visible: true
442
- }
443
- },
444
- [h('a', { class: 'nav-link', attrs: { href: '#' } }, 'nav link')]
445
- )
446
- ])
447
- }
448
- }
449
- const wrapper = mount(App, {
450
- attachTo: document.body
451
- })
452
-
453
- expect(wrapper.vm).toBeDefined()
454
- const $collapse = wrapper.findComponent(BCollapse)
455
- expect($collapse.vm).toBeDefined()
456
-
457
- expect(wrapper.find('style').exists()).toBe(true)
458
-
459
- await waitNT(wrapper.vm)
460
- await waitRAF()
461
- await waitNT(wrapper.vm)
462
- await waitRAF()
463
-
464
- expect($collapse.classes()).toContain('show')
465
- expect($collapse.element.style.display).toEqual('')
466
- expect($collapse.find('.nav-link').exists()).toBe(true)
467
-
468
- // Click on link
469
- await wrapper.find('.nav-link').trigger('click')
470
- await waitRAF()
471
- await waitRAF()
472
- expect($collapse.classes()).toContain('show')
473
- expect($collapse.element.style.display).toEqual('')
474
-
475
- wrapper.destroy()
476
- })
477
-
478
346
  it('should not respond to root toggle event that does not match ID', async () => {
479
347
  const wrapper = mount(BCollapse, {
480
348
  attachTo: document.body,
@@ -20,10 +20,6 @@
20
20
  "version": "2.2.0",
21
21
  "description": "When set, and prop 'visible' is true on mount, will animate on initial mount"
22
22
  },
23
- {
24
- "prop": "isNav",
25
- "description": "When set, signifies that the collapse is part of a navbar, enabling certain features for navbar support"
26
- },
27
23
  {
28
24
  "prop": "visible",
29
25
  "description": "When 'true', expands the collapse"
@@ -723,7 +723,7 @@ the dropdown menu, ensure they are wrapped with a plain `<li>`.
723
723
  ## See also
724
724
 
725
725
  - [`<b-nav-item-dropdown>`](?path=/docs/base-nav--docs#dropdown-support) for dropdown support inside
726
- `<b-nav>` and `<n-navbar>`
726
+ `<b-nav>`
727
727
  - [Router Link Support](?path=/docs/base-link--docs#router-link-support) reference for information
728
728
  about router-link specific props available on `<b-dropdown-item>`
729
729