@gitlab/ui 121.0.1 → 122.0.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 (26) hide show
  1. package/bin/migrate_custom_utils_to_tw.bundled.mjs +1 -1
  2. package/dist/components/base/avatar_labeled/avatar_labeled.js +11 -1
  3. package/dist/index.css +1 -1
  4. package/dist/index.css.map +1 -1
  5. package/dist/vendor/bootstrap-vue/src/components/modal/helpers/modal-manager.js +1 -1
  6. package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +25 -17
  7. package/dist/vendor/bootstrap-vue/src/constants/components.js +1 -3
  8. package/package.json +6 -6
  9. package/src/components/base/avatar_labeled/avatar_labeled.vue +11 -0
  10. package/src/vendor/bootstrap/scss/_card.scss +0 -110
  11. package/src/vendor/bootstrap/scss/_dropdown.scss +7 -13
  12. package/src/vendor/bootstrap/scss/_list-group.scss +0 -41
  13. package/src/vendor/bootstrap/scss/_variables.scss +0 -14
  14. package/src/vendor/bootstrap/scss/bootstrap.scss +0 -1
  15. package/src/vendor/bootstrap-vue/src/components/modal/helpers/modal-manager.js +1 -1
  16. package/src/vendor/bootstrap-vue/src/components/tabs/tabs.js +27 -15
  17. package/src/vendor/bootstrap-vue/src/constants/components.js +0 -2
  18. package/dist/vendor/bootstrap-vue/src/components/nav/index.js +0 -2
  19. package/dist/vendor/bootstrap-vue/src/components/nav/nav-item.js +0 -43
  20. package/dist/vendor/bootstrap-vue/src/components/nav/nav.js +0 -62
  21. package/src/components/dashboards/dashboard_layout/dashboard_layout.md +0 -145
  22. package/src/components/dashboards/dashboard_panel/dashboard_panel.md +0 -66
  23. package/src/vendor/bootstrap/scss/_jumbotron.scss +0 -17
  24. package/src/vendor/bootstrap-vue/src/components/nav/index.js +0 -4
  25. package/src/vendor/bootstrap-vue/src/components/nav/nav-item.js +0 -49
  26. package/src/vendor/bootstrap-vue/src/components/nav/nav.js +0 -58
@@ -159,7 +159,7 @@ const ModalManager = /*#__PURE__*/extend({
159
159
  setStyle(el, 'marginRight', `${toFloat(getCS(el).marginRight, 0) - scrollbarWidth}px`);
160
160
  body._marginChangedForModal.push(el);
161
161
  });
162
- // Adjust <b-navbar-toggler> margin
162
+ // Adjust .navbar-toggler margin
163
163
  /* istanbul ignore next: difficult to test in JSDOM */
164
164
  selectAll(SELECTOR_NAVBAR_TOGGLER).forEach(el => /* istanbul ignore next */{
165
165
  const actualMargin = getStyle(el, 'marginRight') || '';
@@ -15,14 +15,13 @@ import { looseEqual } from '../../utils/loose-equal';
15
15
  import { mathMax } from '../../utils/math';
16
16
  import { makeModelMixin } from '../../utils/model';
17
17
  import { toInteger } from '../../utils/number';
18
- import { omit, sortKeys } from '../../utils/object';
18
+ import { sortKeys } from '../../utils/object';
19
19
  import { observeDom } from '../../utils/observe-dom';
20
20
  import { makeProp, makePropsConfigurable } from '../../utils/props';
21
21
  import { stableSort } from '../../utils/stable-sort';
22
- import { props as props$2, idMixin } from '../../mixins/id';
22
+ import { props as props$1, idMixin } from '../../mixins/id';
23
23
  import { normalizeSlotMixin } from '../../mixins/normalize-slot';
24
24
  import { BLink } from '../link/link';
25
- import { props as props$1, BNav } from '../nav/nav';
26
25
 
27
26
  // --- Constants ---
28
27
 
@@ -164,13 +163,18 @@ const BVTabButton = /*#__PURE__*/extend({
164
163
  });
165
164
 
166
165
  // --- Props ---
167
-
168
- const navProps = omit(props$1, ['tabs', 'cardHeader']);
166
+ const navProps = {
167
+ align: makeProp(PROP_TYPE_STRING),
168
+ fill: makeProp(PROP_TYPE_BOOLEAN, false),
169
+ justified: makeProp(PROP_TYPE_BOOLEAN, false),
170
+ pills: makeProp(PROP_TYPE_BOOLEAN, false),
171
+ small: makeProp(PROP_TYPE_BOOLEAN, false)
172
+ };
169
173
  const props = makePropsConfigurable(sortKeys({
170
- ...props$2,
174
+ ...props$1,
171
175
  ...modelProps,
172
176
  ...navProps,
173
- // Only applied to the currently active `<b-nav-item>`
177
+ // Only applied to the currently active `li`
174
178
  activeNavItemClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
175
179
  // Only applied to the currently active `<b-tab>`
176
180
  // This prop is sniffed by the `<b-tab>` child
@@ -542,20 +546,24 @@ const BTabs = /*#__PURE__*/extend({
542
546
  [REF_FOR_KEY]: true
543
547
  });
544
548
  });
545
- let $nav = h(BNav, {
546
- class: this.navClass,
549
+ const computeJustifyContent = value => {
550
+ value = value === 'left' ? 'start' : value === 'right' ? 'end' : value;
551
+ return `justify-content-${value}`;
552
+ };
553
+ let $nav = h('ul', {
554
+ staticClass: 'nav',
555
+ class: [this.navClass, {
556
+ 'nav-tabs': !noNavStyle && !pills,
557
+ 'nav-pills': !noNavStyle && pills,
558
+ 'nav-fill': fill,
559
+ 'nav-justified': justified,
560
+ [computeJustifyContent(align)]: align,
561
+ small
562
+ }],
547
563
  attrs: {
548
564
  role: 'tablist',
549
565
  id: this.safeId('_BV_tab_controls_')
550
566
  },
551
- props: {
552
- fill,
553
- justified,
554
- align,
555
- tabs: !noNavStyle && !pills,
556
- pills: !noNavStyle && pills,
557
- small
558
- },
559
567
  ref: 'nav'
560
568
  }, [this.normalizeSlot(SLOT_NAME_TABS_START) || h(), $buttons, this.normalizeSlot(SLOT_NAME_TABS_END) || h()]);
561
569
  $nav = h('div', {
@@ -26,8 +26,6 @@ const NAME_FORM_TEXTAREA = 'BFormTextarea';
26
26
  const NAME_FORM_VALID_FEEDBACK = 'BFormValidFeedback';
27
27
  const NAME_LINK = 'BLink';
28
28
  const NAME_MODAL = 'BModal';
29
- const NAME_NAV = 'BNav';
30
- const NAME_NAV_ITEM = 'BNavItem';
31
29
  const NAME_POPOVER = 'BPopover';
32
30
  const NAME_TAB = 'BTab';
33
31
  const NAME_TABLE = 'BTable';
@@ -58,4 +56,4 @@ const NAME_TRANSITION = 'BVTransition';
58
56
  const NAME_TRANSPORTER = 'BVTransporter';
59
57
  const NAME_TRANSPORTER_TARGET = 'BVTransporterTarget';
60
58
 
61
- export { NAME_BUTTON, NAME_BUTTON_CLOSE, NAME_COL, NAME_DROPDOWN, NAME_DROPDOWN_DIVIDER, NAME_DROPDOWN_FORM, NAME_DROPDOWN_GROUP, NAME_DROPDOWN_HEADER, NAME_DROPDOWN_ITEM, NAME_DROPDOWN_ITEM_BUTTON, NAME_DROPDOWN_TEXT, NAME_FORM, NAME_FORM_BUTTON_LABEL_CONTROL, NAME_FORM_CHECKBOX, NAME_FORM_CHECKBOX_GROUP, NAME_FORM_GROUP, NAME_FORM_INVALID_FEEDBACK, NAME_FORM_RADIO, NAME_FORM_RADIO_GROUP, NAME_FORM_RATING_STAR, NAME_FORM_ROW, NAME_FORM_SELECT, NAME_FORM_SELECT_OPTION, NAME_FORM_SELECT_OPTION_GROUP, NAME_FORM_TEXT, NAME_FORM_TEXTAREA, NAME_FORM_VALID_FEEDBACK, NAME_LINK, NAME_MODAL, NAME_NAV, NAME_NAV_ITEM, NAME_POPOVER, NAME_POPOVER_HELPER, NAME_POPOVER_TEMPLATE, NAME_POPPER, NAME_TAB, NAME_TABLE, NAME_TABLE_CELL, NAME_TABLE_LITE, NAME_TABLE_SIMPLE, NAME_TABS, NAME_TAB_BUTTON_HELPER, NAME_TBODY, NAME_TFOOT, NAME_TH, NAME_THEAD, NAME_TOAST, NAME_TOASTER, NAME_TOAST_POP, NAME_TOOLTIP, NAME_TOOLTIP_HELPER, NAME_TOOLTIP_TEMPLATE, NAME_TR, NAME_TRANSITION, NAME_TRANSPORTER, NAME_TRANSPORTER_TARGET };
59
+ export { NAME_BUTTON, NAME_BUTTON_CLOSE, NAME_COL, NAME_DROPDOWN, NAME_DROPDOWN_DIVIDER, NAME_DROPDOWN_FORM, NAME_DROPDOWN_GROUP, NAME_DROPDOWN_HEADER, NAME_DROPDOWN_ITEM, NAME_DROPDOWN_ITEM_BUTTON, NAME_DROPDOWN_TEXT, NAME_FORM, NAME_FORM_BUTTON_LABEL_CONTROL, NAME_FORM_CHECKBOX, NAME_FORM_CHECKBOX_GROUP, NAME_FORM_GROUP, NAME_FORM_INVALID_FEEDBACK, NAME_FORM_RADIO, NAME_FORM_RADIO_GROUP, NAME_FORM_RATING_STAR, NAME_FORM_ROW, NAME_FORM_SELECT, NAME_FORM_SELECT_OPTION, NAME_FORM_SELECT_OPTION_GROUP, NAME_FORM_TEXT, NAME_FORM_TEXTAREA, NAME_FORM_VALID_FEEDBACK, NAME_LINK, NAME_MODAL, NAME_POPOVER, NAME_POPOVER_HELPER, NAME_POPOVER_TEMPLATE, NAME_POPPER, NAME_TAB, NAME_TABLE, NAME_TABLE_CELL, NAME_TABLE_LITE, NAME_TABLE_SIMPLE, NAME_TABS, NAME_TAB_BUTTON_HELPER, NAME_TBODY, NAME_TFOOT, NAME_TH, NAME_THEAD, NAME_TOAST, NAME_TOASTER, NAME_TOAST_POP, NAME_TOOLTIP, NAME_TOOLTIP_HELPER, NAME_TOOLTIP_TEMPLATE, NAME_TR, NAME_TRANSITION, NAME_TRANSPORTER, NAME_TRANSPORTER_TARGET };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "121.0.1",
3
+ "version": "122.0.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -103,8 +103,8 @@
103
103
  "@babel/preset-react": "^7.27.1",
104
104
  "@cypress/grep": "^4.1.1",
105
105
  "@gitlab/fonts": "^1.3.1",
106
- "@gitlab/svgs": "3.145.0",
107
- "@jest/test-sequencer": "30.0.5",
106
+ "@gitlab/svgs": "3.146.0",
107
+ "@jest/test-sequencer": "30.1.2",
108
108
  "@rollup/plugin-commonjs": "^28.0.6",
109
109
  "@rollup/plugin-node-resolve": "^16.0.1",
110
110
  "@rollup/plugin-replace": "^6.0.2",
@@ -138,7 +138,7 @@
138
138
  "cypress": "14.5.4",
139
139
  "cypress-real-events": "^1.14.0",
140
140
  "dompurify": "^3.1.2",
141
- "emoji-regex": "^10.4.0",
141
+ "emoji-regex": "^10.5.0",
142
142
  "esbuild": "^0.25.9",
143
143
  "gitlab-api-async-iterator": "^1.3.1",
144
144
  "glob": "11.0.3",
@@ -155,7 +155,7 @@
155
155
  "playwright": "^1.55.0",
156
156
  "playwright-core": "^1.55.0",
157
157
  "postcss": "8.5.6",
158
- "postcss-loader": "8.1.1",
158
+ "postcss-loader": "8.2.0",
159
159
  "postcss-scss": "4.0.9",
160
160
  "react": "18.3.1",
161
161
  "react-dom": "18.3.1",
@@ -171,7 +171,7 @@
171
171
  "start-server-and-test": "^2.0.13",
172
172
  "storybook": "^7.6.20",
173
173
  "storybook-dark-mode": "4.0.2",
174
- "style-dictionary": "^5.0.2",
174
+ "style-dictionary": "^5.0.4",
175
175
  "style-loader": "^4",
176
176
  "tailwind-config-viewer": "2.0.4",
177
177
  "tailwindcss": "3.4.17",
@@ -23,6 +23,16 @@ export default {
23
23
  required: false,
24
24
  default: '',
25
25
  },
26
+ /**
27
+ * Attributes to pass to the label link
28
+ */
29
+ labelLinkAttrs: {
30
+ type: Object,
31
+ required: false,
32
+ default() {
33
+ return {};
34
+ },
35
+ },
26
36
  subLabelLink: {
27
37
  type: String,
28
38
  required: false,
@@ -76,6 +86,7 @@ export default {
76
86
  <div class="-gl-mx-1 -gl-my-1 gl-flex gl-flex-wrap gl-items-center !gl-text-left">
77
87
  <gl-link
78
88
  v-if="hasLabelLink"
89
+ v-bind="labelLinkAttrs"
79
90
  ref="labelLink"
80
91
  :href="labelLink"
81
92
  class="gl-avatar-link"
@@ -149,116 +149,6 @@
149
149
  }
150
150
 
151
151
 
152
- // Card deck
153
-
154
- .card-deck {
155
- .card {
156
- margin-bottom: $card-deck-margin;
157
- }
158
-
159
- @include media-breakpoint-up(sm) {
160
- display: flex;
161
- flex-flow: row wrap;
162
- margin-right: -$card-deck-margin;
163
- margin-left: -$card-deck-margin;
164
-
165
- .card {
166
- // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
167
- flex: 1 0 0%;
168
- margin-right: $card-deck-margin;
169
- margin-bottom: 0; // Override the default
170
- margin-left: $card-deck-margin;
171
- }
172
- }
173
- }
174
-
175
-
176
- //
177
- // Card groups
178
- //
179
-
180
- .card-group {
181
- // The child selector allows nested `.card` within `.card-group`
182
- // to display properly.
183
- > .card {
184
- margin-bottom: $card-group-margin;
185
- }
186
-
187
- @include media-breakpoint-up(sm) {
188
- display: flex;
189
- flex-flow: row wrap;
190
- // The child selector allows nested `.card` within `.card-group`
191
- // to display properly.
192
- > .card {
193
- // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
194
- flex: 1 0 0%;
195
- margin-bottom: 0;
196
-
197
- + .card {
198
- margin-left: 0;
199
- border-left: 0;
200
- }
201
-
202
- // Handle rounded corners
203
- @if $enable-rounded {
204
- &:not(:last-child) {
205
- @include border-right-radius(0);
206
-
207
- .card-img-top,
208
- .card-header {
209
- // stylelint-disable-next-line property-disallowed-list
210
- border-top-right-radius: 0;
211
- }
212
- .card-img-bottom,
213
- .card-footer {
214
- // stylelint-disable-next-line property-disallowed-list
215
- border-bottom-right-radius: 0;
216
- }
217
- }
218
-
219
- &:not(:first-child) {
220
- @include border-left-radius(0);
221
-
222
- .card-img-top,
223
- .card-header {
224
- // stylelint-disable-next-line property-disallowed-list
225
- border-top-left-radius: 0;
226
- }
227
- .card-img-bottom,
228
- .card-footer {
229
- // stylelint-disable-next-line property-disallowed-list
230
- border-bottom-left-radius: 0;
231
- }
232
- }
233
- }
234
- }
235
- }
236
- }
237
-
238
-
239
- //
240
- // Columns
241
- //
242
-
243
- .card-columns {
244
- .card {
245
- margin-bottom: $card-columns-margin;
246
- }
247
-
248
- @include media-breakpoint-up(sm) {
249
- column-count: $card-columns-count;
250
- column-gap: $card-columns-gap;
251
- orphans: 1;
252
- widows: 1;
253
-
254
- .card {
255
- display: inline-block; // Don't let them vertically span multiple columns
256
- width: 100%; // Don't let their width change
257
- }
258
- }
259
- }
260
-
261
-
262
152
  //
263
153
  // Accordion
264
154
  //
@@ -36,20 +36,14 @@
36
36
  @include box-shadow($dropdown-box-shadow);
37
37
  }
38
38
 
39
- @each $breakpoint in map.keys($grid-breakpoints) {
40
- @include media-breakpoint-up($breakpoint) {
41
- $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
42
-
43
- .dropdown-menu#{$infix}-left {
44
- right: auto;
45
- left: 0;
46
- }
39
+ .dropdown-menu-left {
40
+ right: auto;
41
+ left: 0;
42
+ }
47
43
 
48
- .dropdown-menu#{$infix}-right {
49
- right: 0;
50
- left: auto;
51
- }
52
- }
44
+ .dropdown-menu-right {
45
+ right: 0;
46
+ left: auto;
53
47
  }
54
48
 
55
49
  // Allow for dropdowns to go bottom up (aka, dropup-menu)
@@ -86,47 +86,6 @@
86
86
  }
87
87
 
88
88
 
89
- // Horizontal
90
- //
91
- // Change the layout of list group items from vertical (default) to horizontal.
92
-
93
- @each $breakpoint in map.keys($grid-breakpoints) {
94
- @include media-breakpoint-up($breakpoint) {
95
- $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
96
-
97
- .list-group-horizontal#{$infix} {
98
- flex-direction: row;
99
-
100
- > .list-group-item {
101
- &:first-child {
102
- @include border-bottom-left-radius($list-group-border-radius);
103
- @include border-top-right-radius(0);
104
- }
105
-
106
- &:last-child {
107
- @include border-top-right-radius($list-group-border-radius);
108
- @include border-bottom-left-radius(0);
109
- }
110
-
111
- &.active {
112
- margin-top: 0;
113
- }
114
-
115
- + .list-group-item {
116
- border-top-width: $list-group-border-width;
117
- border-left-width: 0;
118
-
119
- &.active {
120
- margin-left: -$list-group-border-width;
121
- border-left-width: $list-group-border-width;
122
- }
123
- }
124
- }
125
- }
126
- }
127
- }
128
-
129
-
130
89
  // Flush list items
131
90
  //
132
91
  // Remove borders and border-radius to keep list group items edge-to-edge. Most
@@ -826,13 +826,6 @@ $pagination-border-radius-sm: $border-radius-sm !default;
826
826
  $pagination-border-radius-lg: $border-radius-lg !default;
827
827
 
828
828
 
829
- // Jumbotron
830
-
831
- $jumbotron-padding: 2rem !default;
832
- $jumbotron-color: null !default;
833
- $jumbotron-bg: $gray-200 !default;
834
-
835
-
836
829
  // Cards
837
830
 
838
831
  $card-spacer-y: .75rem !default;
@@ -849,13 +842,6 @@ $card-bg: $white !default;
849
842
 
850
843
  $card-img-overlay-padding: 1.25rem !default;
851
844
 
852
- $card-group-margin: $grid-gutter-width * .5 !default;
853
- $card-deck-margin: $card-group-margin !default;
854
-
855
- $card-columns-count: 3 !default;
856
- $card-columns-gap: 1.25rem !default;
857
- $card-columns-margin: $card-spacer-y !default;
858
-
859
845
 
860
846
  // Tooltips
861
847
 
@@ -28,7 +28,6 @@
28
28
  @import "breadcrumb";
29
29
  @import "pagination";
30
30
  @import "badge";
31
- @import "jumbotron";
32
31
  @import "alert";
33
32
  @import "progress";
34
33
  @import "media";
@@ -168,7 +168,7 @@ const ModalManager = /*#__PURE__*/ extend({
168
168
  setStyle(el, 'marginRight', `${toFloat(getCS(el).marginRight, 0) - scrollbarWidth}px`)
169
169
  body._marginChangedForModal.push(el)
170
170
  })
171
- // Adjust <b-navbar-toggler> margin
171
+ // Adjust .navbar-toggler margin
172
172
  /* istanbul ignore next: difficult to test in JSDOM */
173
173
  selectAll(SELECTOR_NAVBAR_TOGGLER).forEach(el => /* istanbul ignore next */ {
174
174
  const actualMargin = getStyle(el, 'marginRight') || ''
@@ -43,14 +43,13 @@ import { looseEqual } from '../../utils/loose-equal'
43
43
  import { mathMax } from '../../utils/math'
44
44
  import { makeModelMixin } from '../../utils/model'
45
45
  import { toInteger } from '../../utils/number'
46
- import { omit, sortKeys } from '../../utils/object'
46
+ import { sortKeys } from '../../utils/object'
47
47
  import { observeDom } from '../../utils/observe-dom'
48
48
  import { makeProp, makePropsConfigurable } from '../../utils/props'
49
49
  import { stableSort } from '../../utils/stable-sort'
50
50
  import { idMixin, props as idProps } from '../../mixins/id'
51
51
  import { normalizeSlotMixin } from '../../mixins/normalize-slot'
52
52
  import { BLink } from '../link/link'
53
- import { BNav, props as BNavProps } from '../nav/nav'
54
53
 
55
54
  // --- Constants ---
56
55
 
@@ -188,15 +187,20 @@ const BVTabButton = /*#__PURE__*/ extend({
188
187
  })
189
188
 
190
189
  // --- Props ---
191
-
192
- const navProps = omit(BNavProps, ['tabs', 'cardHeader'])
190
+ const navProps = {
191
+ align: makeProp(PROP_TYPE_STRING),
192
+ fill: makeProp(PROP_TYPE_BOOLEAN, false),
193
+ justified: makeProp(PROP_TYPE_BOOLEAN, false),
194
+ pills: makeProp(PROP_TYPE_BOOLEAN, false),
195
+ small: makeProp(PROP_TYPE_BOOLEAN, false)
196
+ }
193
197
 
194
198
  export const props = makePropsConfigurable(
195
199
  sortKeys({
196
200
  ...idProps,
197
201
  ...modelProps,
198
202
  ...navProps,
199
- // Only applied to the currently active `<b-nav-item>`
203
+ // Only applied to the currently active `li`
200
204
  activeNavItemClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
201
205
  // Only applied to the currently active `<b-tab>`
202
206
  // This prop is sniffed by the `<b-tab>` child
@@ -594,22 +598,30 @@ export const BTabs = /*#__PURE__*/ extend({
594
598
  })
595
599
  })
596
600
 
601
+ const computeJustifyContent = value => {
602
+ value = value === 'left' ? 'start' : value === 'right' ? 'end' : value
603
+ return `justify-content-${value}`
604
+ }
605
+
597
606
  let $nav = h(
598
- BNav,
607
+ 'ul',
599
608
  {
600
- class: this.navClass,
609
+ staticClass: 'nav',
610
+ class: [
611
+ this.navClass,
612
+ {
613
+ 'nav-tabs': !noNavStyle && !pills,
614
+ 'nav-pills': !noNavStyle && pills,
615
+ 'nav-fill': fill,
616
+ 'nav-justified': justified,
617
+ [computeJustifyContent(align)]: align,
618
+ small
619
+ }
620
+ ],
601
621
  attrs: {
602
622
  role: 'tablist',
603
623
  id: this.safeId('_BV_tab_controls_')
604
624
  },
605
- props: {
606
- fill,
607
- justified,
608
- align,
609
- tabs: !noNavStyle && !pills,
610
- pills: !noNavStyle && pills,
611
- small
612
- },
613
625
  ref: 'nav'
614
626
  },
615
627
  [
@@ -26,8 +26,6 @@ export const NAME_FORM_TEXTAREA = 'BFormTextarea'
26
26
  export const NAME_FORM_VALID_FEEDBACK = 'BFormValidFeedback'
27
27
  export const NAME_LINK = 'BLink'
28
28
  export const NAME_MODAL = 'BModal'
29
- export const NAME_NAV = 'BNav'
30
- export const NAME_NAV_ITEM = 'BNavItem'
31
29
  export const NAME_POPOVER = 'BPopover'
32
30
  export const NAME_TAB = 'BTab'
33
31
  export const NAME_TABLE = 'BTable'
@@ -1,2 +0,0 @@
1
- export { BNav } from './nav';
2
- export { BNavItem } from './nav-item';
@@ -1,43 +0,0 @@
1
- import { extend, mergeData } from '../../vue';
2
- import { NAME_NAV_ITEM } from '../../constants/components';
3
- import { PROP_TYPE_OBJECT, PROP_TYPE_ARRAY_OBJECT_STRING } from '../../constants/props';
4
- import { omit, sortKeys } from '../../utils/object';
5
- import { makePropsConfigurable, makeProp, pluckProps } from '../../utils/props';
6
- import { props as props$1, BLink } from '../link/link';
7
-
8
- // --- Props ---
9
-
10
- const linkProps = omit(props$1, ['event', 'routerTag']);
11
- const props = makePropsConfigurable(sortKeys({
12
- ...linkProps,
13
- linkAttrs: makeProp(PROP_TYPE_OBJECT, {}),
14
- linkClasses: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING)
15
- }), NAME_NAV_ITEM);
16
-
17
- // --- Main component ---
18
-
19
- // @vue/component
20
- const BNavItem = /*#__PURE__*/extend({
21
- name: NAME_NAV_ITEM,
22
- functional: true,
23
- props,
24
- render(h, _ref) {
25
- let {
26
- props,
27
- data,
28
- listeners,
29
- children
30
- } = _ref;
31
- return h('li', mergeData(omit(data, ['on']), {
32
- staticClass: 'nav-item'
33
- }), [h(BLink, {
34
- staticClass: 'nav-link',
35
- class: props.linkClasses,
36
- attrs: props.linkAttrs,
37
- props: pluckProps(linkProps, props),
38
- on: listeners
39
- }, children)]);
40
- }
41
- });
42
-
43
- export { BNavItem, props };
@@ -1,62 +0,0 @@
1
- import { extend, mergeData } from '../../vue';
2
- import { NAME_NAV } from '../../constants/components';
3
- import { PROP_TYPE_STRING, PROP_TYPE_BOOLEAN } from '../../constants/props';
4
- import { makePropsConfigurable, makeProp } from '../../utils/props';
5
-
6
- // --- Helper methods ---
7
-
8
- const computeJustifyContent = value => {
9
- value = value === 'left' ? 'start' : value === 'right' ? 'end' : value;
10
- return `justify-content-${value}`;
11
- };
12
-
13
- // --- Props ---
14
-
15
- const props = makePropsConfigurable({
16
- align: makeProp(PROP_TYPE_STRING),
17
- // Set to `true` if placing in a card header
18
- cardHeader: makeProp(PROP_TYPE_BOOLEAN, false),
19
- fill: makeProp(PROP_TYPE_BOOLEAN, false),
20
- justified: makeProp(PROP_TYPE_BOOLEAN, false),
21
- pills: makeProp(PROP_TYPE_BOOLEAN, false),
22
- small: makeProp(PROP_TYPE_BOOLEAN, false),
23
- tabs: makeProp(PROP_TYPE_BOOLEAN, false),
24
- tag: makeProp(PROP_TYPE_STRING, 'ul')
25
- }, NAME_NAV);
26
-
27
- // --- Main component ---
28
-
29
- // @vue/component
30
- const BNav = /*#__PURE__*/extend({
31
- name: NAME_NAV,
32
- functional: true,
33
- props,
34
- render(h, _ref) {
35
- let {
36
- props,
37
- data,
38
- children
39
- } = _ref;
40
- const {
41
- tabs,
42
- pills,
43
- align,
44
- cardHeader
45
- } = props;
46
- return h(props.tag, mergeData(data, {
47
- staticClass: 'nav',
48
- class: {
49
- 'nav-tabs': tabs,
50
- 'nav-pills': pills && !tabs,
51
- 'card-header-tabs': cardHeader && tabs,
52
- 'card-header-pills': cardHeader && pills && !tabs,
53
- 'nav-fill': props.fill,
54
- 'nav-justified': props.justified,
55
- [computeJustifyContent(align)]: align,
56
- small: props.small
57
- }
58
- }), children);
59
- }
60
- });
61
-
62
- export { BNav, props };