@gitlab/ui 114.1.0 → 114.1.1

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 (136) hide show
  1. package/package.json +7 -26
  2. package/CHANGELOG.md +0 -13139
  3. package/src/vendor/bootstrap/LICENSE +0 -11
  4. package/src/vendor/bootstrap-vue/LICENSE +0 -11
  5. package/src/vendor/bootstrap-vue/package.json +0 -144
  6. package/src/vendor/bootstrap-vue/src/components/button/MODIFICATIONS.md +0 -16
  7. package/src/vendor/bootstrap-vue/src/components/button/README.md +0 -240
  8. package/src/vendor/bootstrap-vue/src/components/button/button-close.spec.js +0 -210
  9. package/src/vendor/bootstrap-vue/src/components/button/button.spec.js +0 -349
  10. package/src/vendor/bootstrap-vue/src/components/button/package.json +0 -105
  11. package/src/vendor/bootstrap-vue/src/components/dropdown/README.md +0 -730
  12. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.spec.js +0 -58
  13. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.spec.js +0 -110
  14. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.spec.js +0 -94
  15. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.spec.js +0 -73
  16. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.spec.js +0 -117
  17. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.spec.js +0 -147
  18. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.spec.js +0 -59
  19. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown.spec.js +0 -1121
  20. package/src/vendor/bootstrap-vue/src/components/dropdown/package.json +0 -368
  21. package/src/vendor/bootstrap-vue/src/components/form/README.md +0 -365
  22. package/src/vendor/bootstrap-vue/src/components/form/form-invalid-feedback.spec.js +0 -170
  23. package/src/vendor/bootstrap-vue/src/components/form/form-text.spec.js +0 -93
  24. package/src/vendor/bootstrap-vue/src/components/form/form-valid-feedback.spec.js +0 -157
  25. package/src/vendor/bootstrap-vue/src/components/form/form.spec.js +0 -97
  26. package/src/vendor/bootstrap-vue/src/components/form/package.json +0 -112
  27. package/src/vendor/bootstrap-vue/src/components/form-checkbox/README.md +0 -691
  28. package/src/vendor/bootstrap-vue/src/components/form-checkbox/form-checkbox-group.spec.js +0 -525
  29. package/src/vendor/bootstrap-vue/src/components/form-checkbox/form-checkbox.spec.js +0 -922
  30. package/src/vendor/bootstrap-vue/src/components/form-checkbox/package.json +0 -172
  31. package/src/vendor/bootstrap-vue/src/components/form-group/README.md +0 -339
  32. package/src/vendor/bootstrap-vue/src/components/form-group/form-group.spec.js +0 -477
  33. package/src/vendor/bootstrap-vue/src/components/form-group/package.json +0 -183
  34. package/src/vendor/bootstrap-vue/src/components/form-radio/README.md +0 -437
  35. package/src/vendor/bootstrap-vue/src/components/form-radio/form-radio-group.spec.js +0 -357
  36. package/src/vendor/bootstrap-vue/src/components/form-radio/form-radio.spec.js +0 -587
  37. package/src/vendor/bootstrap-vue/src/components/form-radio/package.json +0 -162
  38. package/src/vendor/bootstrap-vue/src/components/form-select/README.md +0 -504
  39. package/src/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.spec.js +0 -138
  40. package/src/vendor/bootstrap-vue/src/components/form-select/form-select-option.spec.js +0 -75
  41. package/src/vendor/bootstrap-vue/src/components/form-select/form-select.spec.js +0 -723
  42. package/src/vendor/bootstrap-vue/src/components/form-select/package.json +0 -132
  43. package/src/vendor/bootstrap-vue/src/components/form-textarea/README.md +0 -453
  44. package/src/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.spec.js +0 -1000
  45. package/src/vendor/bootstrap-vue/src/components/form-textarea/package.json +0 -122
  46. package/src/vendor/bootstrap-vue/src/components/layout/README.md +0 -791
  47. package/src/vendor/bootstrap-vue/src/components/layout/col.spec.js +0 -192
  48. package/src/vendor/bootstrap-vue/src/components/layout/form-row.spec.js +0 -45
  49. package/src/vendor/bootstrap-vue/src/components/layout/package.json +0 -99
  50. package/src/vendor/bootstrap-vue/src/components/link/README.md +0 -76
  51. package/src/vendor/bootstrap-vue/src/components/link/link.spec.js +0 -434
  52. package/src/vendor/bootstrap-vue/src/components/link/package.json +0 -57
  53. package/src/vendor/bootstrap-vue/src/components/modal/MODIFICATIONS.md +0 -30
  54. package/src/vendor/bootstrap-vue/src/components/modal/README.md +0 -1067
  55. package/src/vendor/bootstrap-vue/src/components/modal/helpers/bv-modal-event.class.spec.js +0 -82
  56. package/src/vendor/bootstrap-vue/src/components/modal/modal.spec.js +0 -1418
  57. package/src/vendor/bootstrap-vue/src/components/modal/package.json +0 -544
  58. package/src/vendor/bootstrap-vue/src/components/nav/README.md +0 -362
  59. package/src/vendor/bootstrap-vue/src/components/nav/nav-item.spec.js +0 -127
  60. package/src/vendor/bootstrap-vue/src/components/nav/nav.spec.js +0 -177
  61. package/src/vendor/bootstrap-vue/src/components/nav/package.json +0 -73
  62. package/src/vendor/bootstrap-vue/src/components/popover/README.md +0 -919
  63. package/src/vendor/bootstrap-vue/src/components/popover/package.json +0 -261
  64. package/src/vendor/bootstrap-vue/src/components/popover/popover.spec.js +0 -198
  65. package/src/vendor/bootstrap-vue/src/components/table/README.md +0 -3157
  66. package/src/vendor/bootstrap-vue/src/components/table/helpers/default-sort-compare.spec.js +0 -112
  67. package/src/vendor/bootstrap-vue/src/components/table/helpers/normalize-fields.spec.js +0 -93
  68. package/src/vendor/bootstrap-vue/src/components/table/package.json +0 -1763
  69. package/src/vendor/bootstrap-vue/src/components/table/table-busy.spec.js +0 -150
  70. package/src/vendor/bootstrap-vue/src/components/table/table-caption.spec.js +0 -176
  71. package/src/vendor/bootstrap-vue/src/components/table/table-colgroup.spec.js +0 -81
  72. package/src/vendor/bootstrap-vue/src/components/table/table-filtering.spec.js +0 -409
  73. package/src/vendor/bootstrap-vue/src/components/table/table-item-formatter.spec.js +0 -56
  74. package/src/vendor/bootstrap-vue/src/components/table/table-lite.spec.js +0 -682
  75. package/src/vendor/bootstrap-vue/src/components/table/table-pagination.spec.js +0 -133
  76. package/src/vendor/bootstrap-vue/src/components/table/table-primarykey.spec.js +0 -83
  77. package/src/vendor/bootstrap-vue/src/components/table/table-provider.spec.js +0 -411
  78. package/src/vendor/bootstrap-vue/src/components/table/table-row-details.spec.js +0 -459
  79. package/src/vendor/bootstrap-vue/src/components/table/table-selectable.spec.js +0 -1182
  80. package/src/vendor/bootstrap-vue/src/components/table/table-simple.spec.js +0 -206
  81. package/src/vendor/bootstrap-vue/src/components/table/table-sorting.spec.js +0 -858
  82. package/src/vendor/bootstrap-vue/src/components/table/table-sticky-column.spec.js +0 -377
  83. package/src/vendor/bootstrap-vue/src/components/table/table-tbody-bottom-row.spec.js +0 -94
  84. package/src/vendor/bootstrap-vue/src/components/table/table-tbody-row-events.spec.js +0 -529
  85. package/src/vendor/bootstrap-vue/src/components/table/table-tbody-top-row.spec.js +0 -88
  86. package/src/vendor/bootstrap-vue/src/components/table/table-tbody-transition.spec.js +0 -83
  87. package/src/vendor/bootstrap-vue/src/components/table/table-tfoot-custom.spec.js +0 -91
  88. package/src/vendor/bootstrap-vue/src/components/table/table-tfoot-events.spec.js +0 -137
  89. package/src/vendor/bootstrap-vue/src/components/table/table-thead-events.spec.js +0 -155
  90. package/src/vendor/bootstrap-vue/src/components/table/table-thead-top.spec.js +0 -96
  91. package/src/vendor/bootstrap-vue/src/components/table/table.spec.js +0 -692
  92. package/src/vendor/bootstrap-vue/src/components/tabs/README.md +0 -433
  93. package/src/vendor/bootstrap-vue/src/components/tabs/package.json +0 -205
  94. package/src/vendor/bootstrap-vue/src/components/tabs/tab.spec.js +0 -330
  95. package/src/vendor/bootstrap-vue/src/components/tabs/tabs.spec.js +0 -778
  96. package/src/vendor/bootstrap-vue/src/components/toast/README.md +0 -655
  97. package/src/vendor/bootstrap-vue/src/components/toast/helpers/bv-toast.spec.js +0 -117
  98. package/src/vendor/bootstrap-vue/src/components/toast/package.json +0 -184
  99. package/src/vendor/bootstrap-vue/src/components/toast/toast.spec.js +0 -294
  100. package/src/vendor/bootstrap-vue/src/components/toast/toaster.spec.js +0 -77
  101. package/src/vendor/bootstrap-vue/src/components/tooltip/README.md +0 -559
  102. package/src/vendor/bootstrap-vue/src/components/tooltip/package.json +0 -258
  103. package/src/vendor/bootstrap-vue/src/components/tooltip/tooltip.spec.js +0 -1240
  104. package/src/vendor/bootstrap-vue/src/components/transition/package.json +0 -5
  105. package/src/vendor/bootstrap-vue/src/components/transporter/package.json +0 -5
  106. package/src/vendor/bootstrap-vue/src/components/transporter/transporter.spec.js +0 -85
  107. package/src/vendor/bootstrap-vue/src/directives/modal/modal.spec.js +0 -191
  108. package/src/vendor/bootstrap-vue/src/directives/tooltip/README.md +0 -521
  109. package/src/vendor/bootstrap-vue/src/directives/tooltip/package.json +0 -131
  110. package/src/vendor/bootstrap-vue/src/directives/tooltip/tooltip.spec.js +0 -190
  111. package/src/vendor/bootstrap-vue/src/directives/visible/README.md +0 -244
  112. package/src/vendor/bootstrap-vue/src/directives/visible/package.json +0 -24
  113. package/src/vendor/bootstrap-vue/src/mixins/attrs.spec.js +0 -194
  114. package/src/vendor/bootstrap-vue/src/mixins/click-out.spec.js +0 -52
  115. package/src/vendor/bootstrap-vue/src/mixins/focus-in.spec.js +0 -53
  116. package/src/vendor/bootstrap-vue/src/mixins/listen-on-document.spec.js +0 -117
  117. package/src/vendor/bootstrap-vue/src/mixins/listen-on-root.spec.js +0 -77
  118. package/src/vendor/bootstrap-vue/src/mixins/listen-on-window.spec.js +0 -115
  119. package/src/vendor/bootstrap-vue/src/mixins/listeners.spec.js +0 -245
  120. package/src/vendor/bootstrap-vue/src/utils/bv-event.class.spec.js +0 -66
  121. package/src/vendor/bootstrap-vue/src/utils/clone-deep.spec.js +0 -70
  122. package/src/vendor/bootstrap-vue/src/utils/config.spec.js +0 -169
  123. package/src/vendor/bootstrap-vue/src/utils/css-escape.spec.js +0 -82
  124. package/src/vendor/bootstrap-vue/src/utils/dom.spec.js +0 -291
  125. package/src/vendor/bootstrap-vue/src/utils/events.spec.js +0 -41
  126. package/src/vendor/bootstrap-vue/src/utils/get.spec.js +0 -109
  127. package/src/vendor/bootstrap-vue/src/utils/inspect.spec.js +0 -251
  128. package/src/vendor/bootstrap-vue/src/utils/loose-equal.spec.js +0 -203
  129. package/src/vendor/bootstrap-vue/src/utils/normalize-slot.spec.js +0 -63
  130. package/src/vendor/bootstrap-vue/src/utils/number.spec.js +0 -72
  131. package/src/vendor/bootstrap-vue/src/utils/object.spec.js +0 -61
  132. package/src/vendor/bootstrap-vue/src/utils/props.spec.js +0 -112
  133. package/src/vendor/bootstrap-vue/src/utils/router.spec.js +0 -248
  134. package/src/vendor/bootstrap-vue/src/utils/string.spec.js +0 -65
  135. package/src/vendor/bootstrap-vue/src/utils/stringify-object-values.spec.js +0 -47
  136. package/src/vendor/bootstrap-vue/src/utils/warn.spec.js +0 -54
@@ -1,162 +0,0 @@
1
- {
2
- "name": "@bootstrap-vue/form-radio",
3
- "version": "1.0.0",
4
- "meta": {
5
- "title": "Form Radio",
6
- "description": "Cross browser consistent radio inputs and radio groups, using Bootstrap's custom radio input to replace the browser default radio input.",
7
- "components": [
8
- {
9
- "component": "BFormRadioGroup",
10
- "aliases": [
11
- "BRadioGroup"
12
- ],
13
- "props": [
14
- {
15
- "prop": "ariaInvalid",
16
- "description": "Sets the 'aria-invalid' attribute value on the wrapper element. When not provided, the 'state' prop will control the attribute"
17
- },
18
- {
19
- "prop": "buttonVariant",
20
- "description": "Specifies the Bootstrap contextual color theme variant the apply to the button style radios"
21
- },
22
- {
23
- "prop": "buttons",
24
- "description": "When set, renderes the radios in this group with button styling"
25
- },
26
- {
27
- "prop": "checked",
28
- "description": "The current value of the checked radio in the group"
29
- },
30
- {
31
- "prop": "size",
32
- "description": "Set the size of the component's appearance. 'sm', 'md' (default), or 'lg'"
33
- },
34
- {
35
- "prop": "stacked",
36
- "description": "When set, renders the radio group in stacked mode"
37
- },
38
- {
39
- "prop": "validated",
40
- "description": "When set, adds the Bootstrap class 'was-validated' to the group wrapper"
41
- }
42
- ],
43
- "events": [
44
- {
45
- "event": "change",
46
- "description": "Emitted when selected value is changed due to user interaction",
47
- "args": [
48
- {
49
- "arg": "checked",
50
- "type": [
51
- "Boolean",
52
- "String",
53
- "Number",
54
- "Object"
55
- ],
56
- "description": "Current selected Value of radio group"
57
- }
58
- ]
59
- },
60
- {
61
- "event": "input",
62
- "description": "Emitted when the selected value is changed",
63
- "args": [
64
- {
65
- "arg": "checked",
66
- "type": [
67
- "Boolean",
68
- "String",
69
- "Number",
70
- "Object"
71
- ],
72
- "description": "Current selected Value of radio group"
73
- }
74
- ]
75
- }
76
- ],
77
- "slots": [
78
- {
79
- "name": "default",
80
- "description": "Content (form radios) to place in the form radio group"
81
- },
82
- {
83
- "name": "first",
84
- "description": "Slot to place b-form-radio's so that they appear before radios generated from options prop"
85
- }
86
- ]
87
- },
88
- {
89
- "component": "BFormRadio",
90
- "aliases": [
91
- "BRadio"
92
- ],
93
- "props": [
94
- {
95
- "prop": "button",
96
- "description": "When set, renders the radio with the appearance of a button"
97
- },
98
- {
99
- "prop": "buttonVariant",
100
- "description": "Applies on of Bootstrap's theme colors when in 'button' mode"
101
- },
102
- {
103
- "prop": "checked",
104
- "description": "The current value of the radio(s)"
105
- },
106
- {
107
- "prop": "inline",
108
- "description": "When set, renders the radio as an inline element rather than as a 100% width block"
109
- },
110
- {
111
- "prop": "size",
112
- "description": "Set the size of the component's appearance. 'sm', 'md' (default), or 'lg'"
113
- },
114
- {
115
- "prop": "value",
116
- "description": "Value returned when this radio is checked"
117
- }
118
- ],
119
- "events": [
120
- {
121
- "event": "change",
122
- "description": "Emitted when selected value is changed due to user interaction",
123
- "args": [
124
- {
125
- "arg": "checked",
126
- "type": [
127
- "Boolean",
128
- "String",
129
- "Number",
130
- "Object"
131
- ],
132
- "description": "Current selected Value of radio group"
133
- }
134
- ]
135
- },
136
- {
137
- "event": "input",
138
- "description": "Emitted when the selected value is changed",
139
- "args": [
140
- {
141
- "arg": "checked",
142
- "type": [
143
- "Boolean",
144
- "String",
145
- "Number",
146
- "Object"
147
- ],
148
- "description": "Current selected Value of radio group"
149
- }
150
- ]
151
- }
152
- ],
153
- "slots": [
154
- {
155
- "name": "default",
156
- "description": "Content to place in the form radio"
157
- }
158
- ]
159
- }
160
- ]
161
- }
162
- }
@@ -1,504 +0,0 @@
1
- # Form Select
2
-
3
- > Bootstrap custom `<select>` using custom styles. Optionally specify options based on an array,
4
- > array of objects, or an object.
5
-
6
- Generate your select options by passing an array or object to the `options` props:
7
-
8
- ```html
9
- <template>
10
- <div>
11
- <b-form-select v-model="selected" :options="options"></b-form-select>
12
- <b-form-select v-model="selected" :options="options" size="sm" class="mt-3"></b-form-select>
13
- <div class="mt-3">Selected: <strong>{{ selected }}</strong></div>
14
- </div>
15
- </template>
16
-
17
- <script>
18
- export default {
19
- data() {
20
- return {
21
- selected: null,
22
- options: [
23
- { value: null, text: 'Please select an option' },
24
- { value: 'a', text: 'This is First option' },
25
- { value: 'b', text: 'Selected Option' },
26
- { value: { C: '3PO' }, text: 'This is an option with object value' },
27
- { value: 'd', text: 'This one is disabled', disabled: true }
28
- ]
29
- }
30
- }
31
- }
32
- </script>
33
-
34
- <!-- b-form-select-options.vue -->
35
- ```
36
-
37
- You can even define option groups with the `options` prop:
38
-
39
- ```html
40
- <template>
41
- <div>
42
- <b-form-select v-model="selected" :options="options"></b-form-select>
43
- <div class="mt-3">Selected: <strong>{{ selected }}</strong></div>
44
- </div>
45
- </template>
46
-
47
- <script>
48
- export default {
49
- data() {
50
- return {
51
- selected: null,
52
- options: [
53
- { value: null, text: 'Please select an option' },
54
- { value: 'a', text: 'This is First option' },
55
- { value: 'b', text: 'Selected Option', disabled: true },
56
- {
57
- label: 'Grouped options',
58
- options: [
59
- { value: { C: '3PO' }, text: 'Option with object value' },
60
- { value: { R: '2D2' }, text: 'Another option with object value' }
61
- ]
62
- }
63
- ]
64
- }
65
- }
66
- }
67
- </script>
68
-
69
- <!-- b-form-select-options.vue -->
70
- ```
71
-
72
- Or manually provide your options and option groups:
73
-
74
- ```html
75
- <template>
76
- <div>
77
- <b-form-select v-model="selected" class="mb-3">
78
- <b-form-select-option :value="null">Please select an option</b-form-select-option>
79
- <b-form-select-option value="a">Option A</b-form-select-option>
80
- <b-form-select-option value="b" disabled>Option B (disabled)</b-form-select-option>
81
- <b-form-select-option-group label="Grouped options">
82
- <b-form-select-option :value="{ C: '3PO' }">Option with object value</b-form-select-option>
83
- <b-form-select-option :value="{ R: '2D2' }">Another option with object value</b-form-select-option>
84
- </b-form-select-option-group>
85
- </b-form-select>
86
-
87
- <div class="mt-2">Selected: <strong>{{ selected }}</strong></div>
88
- </div>
89
- </template>
90
-
91
- <script>
92
- export default {
93
- data() {
94
- return {
95
- selected: null
96
- }
97
- }
98
- }
99
- </script>
100
-
101
- <!-- b-form-select-manual.vue -->
102
- ```
103
-
104
- Feel free to mix the `options` prop with `<b-form-select-option>` and
105
- `<b-form-select-option-group>`. Manually placed options and option groups will appear _below_ the
106
- options generated via the `options` prop. To place manual options and option groups _above_ the
107
- options specified by the `options` prop, use the named slot `first`.
108
-
109
- ```html
110
- <template>
111
- <div>
112
- <b-form-select v-model="selected" :options="options" class="mb-3">
113
- <!-- This slot appears above the options from 'options' prop -->
114
- <template #first>
115
- <b-form-select-option :value="null" disabled>-- Please select an option --</b-form-select-option>
116
- </template>
117
-
118
- <!-- These options will appear after the ones from 'options' prop -->
119
- <b-form-select-option value="C">Option C</b-form-select-option>
120
- <b-form-select-option value="D">Option D</b-form-select-option>
121
- </b-form-select>
122
-
123
- <div class="mt-3">Selected: <strong>{{ selected }}</strong></div>
124
- </div>
125
- </template>
126
-
127
- <script>
128
- export default {
129
- data() {
130
- return {
131
- selected: null,
132
- options: [
133
- { value: 'A', text: 'Option A (from options prop)' },
134
- { value: 'B', text: 'Option B (from options prop)' }
135
- ]
136
- }
137
- }
138
- }
139
- </script>
140
-
141
- <!-- b-form-select-both.vue -->
142
- ```
143
-
144
- ## Options property
145
-
146
- `options` can be an array of strings or objects, or a key-value object. Available fields:
147
-
148
- - **`value`** The selected value which will be set on `v-model`
149
- - **`disabled`** Disables item for selection
150
- - **`text`** Display text, or **`html`** Display basic inline html
151
-
152
- `value` can be a string, number, or simple object. Avoid using complex types in values.
153
-
154
- If both `html` and `text` are provided, `html` will take precedence. Only basic/native HTML is
155
- supported in the `html` field (components will not work). Note that not all browsers will render
156
- inline html (i.e. `<i>`, `<strong>`, etc.) inside `<option>` elements of a `<select>`.
157
-
158
- <p class="alert alert-danger">
159
- <strong>Be cautious</strong> of placing user supplied content in the <code>html</code> field,
160
- as it may make you vulnerable to
161
- <a class="alert-link" href="https://en.wikipedia.org/wiki/Cross-site_scripting">
162
- <abbr title="Cross Site Scripting Attacks">XSS attacks</abbr></a>, if you do not first
163
- <a class="alert-link" href="https://en.wikipedia.org/wiki/HTML_sanitization">sanitize</a> the
164
- user supplied string.
165
- </p>
166
-
167
- ### Options as an array
168
-
169
- <!-- eslint-disable no-unused-vars -->
170
-
171
- ```js
172
- const options = ['A', 'B', 'C', { text: 'D', value: { d: 1 }, disabled: true }, 'E', 'F']
173
- ```
174
-
175
- If an array entry is a string, it will be used for both the generated `value` and `text` fields.
176
-
177
- You can mix using strings and [objects](#options-as-an-array-of-objects) in the array.
178
-
179
- Internally, BootstrapVue will convert the above array to the following array (the
180
- [array of objects](#options-as-an-array-of-objects)) format:
181
-
182
- <!-- eslint-disable no-unused-vars -->
183
-
184
- ```js
185
- const options = [
186
- { text: 'A', value: 'A', disabled: false },
187
- { text: 'B', value: 'B', disabled: false },
188
- { text: 'C', value: 'C', disabled: false },
189
- { text: 'D', value: { d: 1 }, disabled: true },
190
- { text: 'E', value: 'E', disabled: false },
191
- { text: 'F', value: 'F', disabled: false }
192
- ]
193
- ```
194
-
195
- ### Options as an array of objects
196
-
197
- <!-- eslint-disable no-unused-vars -->
198
-
199
- ```js
200
- const options = [
201
- { text: 'Item 1', value: 'first' },
202
- { text: 'Item 2', value: 'second' },
203
- { html: '<b>Item</b> 3', value: 'third', disabled: true },
204
- { text: 'Item 4' },
205
- { text: 'Item 5', value: { foo: 'bar', baz: true } }
206
- ]
207
- ```
208
-
209
- If `value` is missing, then `text` will be used as both the `value` and `text` fields. If you use
210
- the `html` property, you **must** supply a `value` property.
211
-
212
- <span class="badge badge-info">New in v2.2.0</span> To define option groups, just add an object with
213
- a `label` prop as the groups name and a `options` property with the array of options of the group.
214
-
215
- <!-- eslint-disable no-unused-vars -->
216
-
217
- ```js
218
- const options = [
219
- { text: 'Item 1', value: 'first' },
220
- { text: 'Item 2', value: 'second' },
221
- {
222
- label: 'Grouped options',
223
- options: [{ html: '<b>Item</b> 3', value: 'third', disabled: true }, { text: 'Item 4' }]
224
- },
225
- { text: 'Item 5', value: { foo: 'bar', baz: true } }
226
- ]
227
- ```
228
-
229
- ### Options as an object
230
-
231
- <span class="badge badge-warning">Deprecated</span>
232
-
233
- Keys are mapped to `value` and values are mapped to option `text`.
234
-
235
- <!-- eslint-disable no-unused-vars -->
236
-
237
- ```js
238
- const options = {
239
- a: 'Item A',
240
- b: 'Item B',
241
- c: { html: 'Item C', disabled: true },
242
- d: { text: 'Item D', value: 'overridden_value' },
243
- e: { text: 'Item E', value: { foo: 'bar', baz: true } }
244
- }
245
- ```
246
-
247
- Internally, BootstrapVue will convert the above object to the following array (the
248
- [array of objects](#options-as-an-array-of-objects)) format:
249
-
250
- <!-- eslint-disable no-unused-vars -->
251
-
252
- ```js
253
- const options = [
254
- { text: 'Item A', value: 'a', disabled: false },
255
- { text: 'Item B', value: 'b', disabled: false },
256
- { html: 'Item C', value: 'c', disabled: false },
257
- { text: 'Item D', value: 'overridden_value', disabled: true },
258
- { text: 'Item E', value: { foo: 'bar', baz: true }, disabled: false }
259
- ]
260
- ```
261
-
262
- **Note:** When using the Object format, the order of the final array is **not** guaranteed. For this
263
- reason, it is recommended to use either of the previously mentioned array formats.
264
-
265
- ### Changing the option field names
266
-
267
- If you want to customize the field property names (for example using `name` field for display
268
- `text`) you can easily change them by setting the `text-field`, `html-field`, `value-field`, and
269
- `disabled-field` props to a string that contains the property name you would like to use:
270
-
271
- ```html
272
- <template>
273
- <div>
274
- <b-form-select
275
- v-model="selected"
276
- :options="options"
277
- class="mb-3"
278
- value-field="item"
279
- text-field="name"
280
- disabled-field="notEnabled"
281
- ></b-form-select>
282
-
283
- <div class="mt-3">Selected: <strong>{{ selected }}</strong></div>
284
- </div>
285
- </template>
286
-
287
- <script>
288
- export default {
289
- data() {
290
- return {
291
- selected: 'A',
292
- options: [
293
- { item: 'A', name: 'Option A' },
294
- { item: 'B', name: 'Option B' },
295
- { item: 'D', name: 'Option C', notEnabled: true },
296
- { item: { d: 1 }, name: 'Option D' }
297
- ]
298
- }
299
- }
300
- }
301
- </script>
302
-
303
- <!-- b-form-select-options-fields.vue -->
304
- ```
305
-
306
- ### Option notes
307
-
308
- If the initial value of your `v-model` expression does not match any of the options, the
309
- `<b-form-select>` component (which is a native HTML5 `<select>` under the hood) will render in an
310
- _unselected_ state. On iOS this will cause the user not being able to select the first item because
311
- iOS does not fire a change event in this case. It is therefore recommended to provide a disabled
312
- option with an empty value as your first option.
313
-
314
- ```html
315
- <b-form-select v-model="selected" :options="options">
316
- <template #first>
317
- <b-form-select-option value="" disabled>-- Please select an option --</b-form-select-option>
318
- </template>
319
- </b-form-select>
320
- ```
321
-
322
- See the [Vue select](https://vuejs.org/v2/guide/forms.html#Select) documentation for more details.
323
-
324
- ## Standard (single) select
325
-
326
- By default, Bootstrap v4's custom select styling is applied.
327
-
328
- ### Value in single mode
329
-
330
- In non `multiple` mode, `<b-form-select>` returns the a single `value` of the currently selected
331
- option.
332
-
333
- ```html
334
- <template>
335
- <div>
336
- <b-form-select v-model="selected" :options="options"></b-form-select>
337
- <div class="mt-3">Selected: <strong>{{ selected }}</strong></div>
338
- </div>
339
- </template>
340
-
341
- <script>
342
- export default {
343
- data() {
344
- return {
345
- selected: null,
346
- options: [
347
- { value: null, text: 'Please select some item' },
348
- { value: 'a', text: 'This is First option' },
349
- { value: 'b', text: 'Default Selected Option' },
350
- { value: 'c', text: 'This is another option' },
351
- { value: 'd', text: 'This one is disabled', disabled: true }
352
- ]
353
- }
354
- }
355
- }
356
- </script>
357
-
358
- <!-- b-form-select-single.vue -->
359
- ```
360
-
361
- ### Select sizing (displayed rows)
362
-
363
- You can use the `select-size` prop to switch the custom select into a select list-box, rather than a
364
- dropdown. Set the `select-size` prop to a numerical value greater than 1 to control how many rows of
365
- options are visible.
366
-
367
- Note when `select-size` is set to a value greater than 1, the Bootstrap v4 custom styling will
368
- **not** be applied, unless the `multiple` prop is also set.
369
-
370
- Note that not all mobile browsers will show the select as a list-box.
371
-
372
- ```html
373
- <template>
374
- <div>
375
- <b-form-select v-model="selected" :options="options" :select-size="4"></b-form-select>
376
- <div class="mt-3">Selected: <strong>{{ selected }}</strong></div>
377
- </div>
378
- </template>
379
-
380
- <script>
381
- export default {
382
- data() {
383
- return {
384
- selected: null,
385
- options: [
386
- { value: null, text: 'Please select some item' },
387
- { value: 'a', text: 'This is option a' },
388
- { value: 'b', text: 'Default Selected Option b' },
389
- { value: 'c', text: 'This is option c' },
390
- { value: 'd', text: 'This one is disabled', disabled: true },
391
- { value: 'e', text: 'This is option e' },
392
- { value: 'e', text: 'This is option f' }
393
- ]
394
- }
395
- }
396
- }
397
- </script>
398
-
399
- <!-- b-form-select-size.vue -->
400
- ```
401
-
402
- ## Multiple select support
403
-
404
- Enable multiple select mode by setting the prop `multiple`, and control how many rows are displayed
405
- in the multiple select list-box by setting `select-size` to the number of rows to display. The
406
- default is to let the browser use its default (typically 4).
407
-
408
- ### Value in multiple mode
409
-
410
- In `multiple` mode, `<b-form-select>` always returns an array of option values. You **must** provide
411
- an array reference as your `v-model` when in `multiple` mode.
412
-
413
- ```html
414
- <template>
415
- <div>
416
- <b-form-select v-model="selected" :options="options" multiple :select-size="4"></b-form-select>
417
- <div class="mt-3">Selected: <strong>{{ selected }}</strong></div>
418
- </div>
419
- </template>
420
-
421
- <script>
422
- export default {
423
- data() {
424
- return {
425
- selected: ['b'], // Array reference
426
- options: [
427
- { value: 'a', text: 'This is First option' },
428
- { value: 'b', text: 'Default Selected Option' },
429
- { value: 'c', text: 'This is another option' },
430
- { value: 'd', text: 'This one is disabled', disabled: true },
431
- { value: 'e', text: 'This is option e' },
432
- { value: 'f', text: 'This is option f' },
433
- { value: 'g', text: 'This is option g' }
434
- ]
435
- }
436
- }
437
- }
438
- </script>
439
-
440
- <!-- b-form-select-multiple-mode.vue -->
441
- ```
442
-
443
- ## Control sizing
444
-
445
- Set the form-control text size using the `size` prop to `sm` or `lg` for small or large
446
- respectively.
447
-
448
- By default `<b-form-select>` will occupy the full width of the container that it appears in. To
449
- control the select width, place the input inside standard Bootstrap grid column.
450
-
451
- ## Autofocus
452
-
453
- When the `autofocus` prop is set on `<b-form-select>`, the select will be auto-focused when it is
454
- inserted (i.e. **mounted**) into the document or re-activated when inside a Vue `<keep-alive>`
455
- component. Note that this prop **does not** set the `autofocus` attribute on the select, nor can it
456
- tell when the select becomes visible.
457
-
458
- ## Contextual states
459
-
460
- Bootstrap includes validation styles for `valid` and `invalid` states on most form controls.
461
-
462
- Generally speaking, you'll want to use a particular state for specific types of feedback:
463
-
464
- - `false` (denotes invalid state) is great for when there's a blocking or required field. A user
465
- must fill in this field properly to submit the form.
466
- - `true` (denotes valid state) is ideal for situations when you have per-field validation throughout
467
- a form and want to encourage a user through the rest of the fields.
468
- - `null` Displays no validation state (neither valid nor invalid)
469
-
470
- To apply one of the contextual state icons on `<b-form-select>`, set the `state` prop to `false`
471
- (for invalid), `true` (for valid), or `null` (no validation state).
472
-
473
- ### Conveying contextual validation state to assistive technologies and colorblind users
474
-
475
- Using these contextual states to denote the state of a form control only provides a visual,
476
- color-based indication, which will not be conveyed to users of assistive technologies - such as
477
- screen readers - or to colorblind users.
478
-
479
- Ensure that an alternative indication of state is also provided. For instance, you could include a
480
- hint about state in the form control's `<label>` text itself, or by providing an additional help
481
- text block (via `<b-form-group>` or `<b-form-*-feedback>`). Specifically for assistive technologies,
482
- invalid form controls can also be assigned an `aria-invalid="true"` attribute (see below).
483
-
484
- ### ARIA `aria-invalid` attribute:
485
-
486
- When `<b-form-select>` has an invalid contextual state (i.e. state = `false`) you may also want to
487
- set the `<b-form-select>` prop `aria-invalid` to `true`.
488
-
489
- Supported `invalid` values are:
490
-
491
- - `false` (default) No errors detected
492
- - `true` The value has failed validation.
493
-
494
- When `state` is set to `false`, aria-invalid will also be set to true.
495
-
496
- ## Non custom select
497
-
498
- Set the prop `plain` to have a native browser `<select>` rendered (although the class
499
- `.form-control` will always be placed on the select).
500
-
501
- A `plain` select will always be rendered for non `multiple` selects which have the `select-size`
502
- prop set to a value greater than 1.
503
-
504
- <!-- Component reference added automatically from component package.json -->