@gitlab/ui 128.17.0 → 129.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.
- package/dist/components/base/form/form_checkbox/form_checkbox.js +4 -2
- package/dist/components/base/form/form_radio/form_radio.js +209 -11
- package/dist/components/base/tooltip/tooltip.js +1 -3
- package/dist/config.js +0 -37
- package/dist/utils/constants.js +1 -7
- package/dist/vendor/bootstrap-vue/src/components/button/button-close.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/button/button.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/form/form-invalid-feedback.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/form/form-text.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/form/form-valid-feedback.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/form/form.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/form-group/form-group.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/form-radio/form-radio-group.js +1 -2
- package/dist/vendor/bootstrap-vue/src/components/form-radio/form-radio.js +1 -2
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/form-select/helpers/mixin-options.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/layout/col.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/layout/form-row.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/modal/modal.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/popover/popover.js +8 -4
- package/dist/vendor/bootstrap-vue/src/components/table/table-lite.js +2 -3
- package/dist/vendor/bootstrap-vue/src/components/table/table-simple.js +2 -3
- package/dist/vendor/bootstrap-vue/src/components/table/table.js +2 -3
- package/dist/vendor/bootstrap-vue/src/components/table/tbody.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/table/td.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/table/tfoot.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/table/th.js +1 -2
- package/dist/vendor/bootstrap-vue/src/components/table/thead.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/table/tr.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/tabs/tab.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/toast/toast.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/toast/toaster.js +3 -3
- package/dist/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +7 -6
- package/dist/vendor/bootstrap-vue/src/constants/config.js +7 -1
- package/dist/vendor/bootstrap-vue/src/directives/tooltip/tooltip.js +6 -7
- package/dist/vendor/bootstrap-vue/src/mixins/dropdown.js +3 -3
- package/dist/vendor/bootstrap-vue/src/mixins/form-control.js +3 -3
- package/dist/vendor/bootstrap-vue/src/mixins/form-custom.js +3 -3
- package/dist/vendor/bootstrap-vue/src/mixins/form-options.js +3 -3
- package/dist/vendor/bootstrap-vue/src/mixins/form-radio-check-group.js +3 -3
- package/dist/vendor/bootstrap-vue/src/mixins/form-radio-check.js +3 -3
- package/dist/vendor/bootstrap-vue/src/mixins/form-size.js +3 -3
- package/dist/vendor/bootstrap-vue/src/mixins/form-state.js +3 -3
- package/dist/vendor/bootstrap-vue/src/mixins/form-text.js +3 -3
- package/package.json +1 -1
- package/src/components/base/form/form_checkbox/form_checkbox.vue +4 -2
- package/src/components/base/form/form_radio/form_radio.vue +220 -31
- package/src/components/base/tooltip/tooltip.vue +0 -3
- package/src/config.js +0 -40
- package/src/utils/constants.js +0 -6
- package/src/vendor/bootstrap-vue/src/components/button/button-close.js +7 -10
- package/src/vendor/bootstrap-vue/src/components/button/button.js +13 -16
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.js +4 -7
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.js +6 -9
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.js +9 -12
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.js +6 -9
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.js +9 -12
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +6 -9
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +6 -9
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +27 -30
- package/src/vendor/bootstrap-vue/src/components/form/form-invalid-feedback.js +11 -14
- package/src/vendor/bootstrap-vue/src/components/form/form-text.js +7 -10
- package/src/vendor/bootstrap-vue/src/components/form/form-valid-feedback.js +11 -14
- package/src/vendor/bootstrap-vue/src/components/form/form.js +7 -10
- package/src/vendor/bootstrap-vue/src/components/form-group/form-group.js +27 -30
- package/src/vendor/bootstrap-vue/src/components/form-radio/form-radio-group.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/form-radio/form-radio.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.js +5 -8
- package/src/vendor/bootstrap-vue/src/components/form-select/form-select-option.js +5 -8
- package/src/vendor/bootstrap-vue/src/components/form-select/form-select.js +14 -17
- package/src/vendor/bootstrap-vue/src/components/form-select/helpers/mixin-options.js +6 -9
- package/src/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.js +17 -20
- package/src/vendor/bootstrap-vue/src/components/layout/col.js +16 -19
- package/src/vendor/bootstrap-vue/src/components/layout/form-row.js +4 -7
- package/src/vendor/bootstrap-vue/src/components/modal/modal.js +59 -62
- package/src/vendor/bootstrap-vue/src/components/popover/popover.js +13 -11
- package/src/vendor/bootstrap-vue/src/components/table/table-lite.js +11 -15
- package/src/vendor/bootstrap-vue/src/components/table/table-simple.js +5 -9
- package/src/vendor/bootstrap-vue/src/components/table/table.js +20 -24
- package/src/vendor/bootstrap-vue/src/components/table/tbody.js +5 -8
- package/src/vendor/bootstrap-vue/src/components/table/td.js +8 -11
- package/src/vendor/bootstrap-vue/src/components/table/tfoot.js +5 -8
- package/src/vendor/bootstrap-vue/src/components/table/th.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/table/thead.js +6 -9
- package/src/vendor/bootstrap-vue/src/components/table/tr.js +4 -7
- package/src/vendor/bootstrap-vue/src/components/tabs/tab.js +16 -19
- package/src/vendor/bootstrap-vue/src/components/tabs/tabs.js +22 -25
- package/src/vendor/bootstrap-vue/src/components/toast/toast.js +23 -26
- package/src/vendor/bootstrap-vue/src/components/toast/toaster.js +9 -12
- package/src/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +36 -38
- package/src/vendor/bootstrap-vue/src/constants/config.js +6 -0
- package/src/vendor/bootstrap-vue/src/directives/tooltip/tooltip.js +6 -7
- package/src/vendor/bootstrap-vue/src/mixins/dropdown.js +22 -25
- package/src/vendor/bootstrap-vue/src/mixins/form-control.js +9 -12
- package/src/vendor/bootstrap-vue/src/mixins/form-custom.js +4 -7
- package/src/vendor/bootstrap-vue/src/mixins/form-options.js +8 -11
- package/src/vendor/bootstrap-vue/src/mixins/form-radio-check-group.js +13 -16
- package/src/vendor/bootstrap-vue/src/mixins/form-radio-check.js +13 -16
- package/src/vendor/bootstrap-vue/src/mixins/form-size.js +4 -7
- package/src/vendor/bootstrap-vue/src/mixins/form-state.js +5 -8
- package/src/vendor/bootstrap-vue/src/mixins/form-text.js +17 -20
|
@@ -93,7 +93,8 @@ var script = {
|
|
|
93
93
|
* Value returned when this checkbox is checked.
|
|
94
94
|
*/
|
|
95
95
|
value: {
|
|
96
|
-
|
|
96
|
+
// `value` prop can be any type
|
|
97
|
+
type: undefined,
|
|
97
98
|
required: false,
|
|
98
99
|
default: true
|
|
99
100
|
},
|
|
@@ -101,7 +102,8 @@ var script = {
|
|
|
101
102
|
* Value returned when this checkbox is unchecked. Note not applicable when multiple checkboxes bound to the same v-model array.
|
|
102
103
|
*/
|
|
103
104
|
uncheckedValue: {
|
|
104
|
-
|
|
105
|
+
// `uncheckedValue` prop can be any type
|
|
106
|
+
type: undefined,
|
|
105
107
|
required: false,
|
|
106
108
|
default: false
|
|
107
109
|
}
|
|
@@ -1,27 +1,225 @@
|
|
|
1
|
-
import
|
|
1
|
+
import uniqueId from 'lodash/uniqueId';
|
|
2
|
+
import isBoolean from 'lodash/isBoolean';
|
|
3
|
+
import { looseEqual } from '../../../../vendor/bootstrap-vue/src/utils/loose-equal';
|
|
2
4
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
3
5
|
|
|
4
|
-
const {
|
|
5
|
-
model
|
|
6
|
-
} = BFormRadio.options;
|
|
7
6
|
var script = {
|
|
8
7
|
name: 'GlFormRadio',
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
inject: {
|
|
9
|
+
getGroup: {
|
|
10
|
+
// When we remove BFormRadioGroup from GlFormRadioGroup, we can rename
|
|
11
|
+
// the `getBvRadioGroup` provide to `getRadioGroup`.
|
|
12
|
+
from: 'getBvRadioGroup',
|
|
13
|
+
default: () => () => null
|
|
14
|
+
}
|
|
11
15
|
},
|
|
12
16
|
inheritAttrs: false,
|
|
13
17
|
model: {
|
|
14
|
-
prop:
|
|
15
|
-
event:
|
|
18
|
+
prop: 'checked',
|
|
19
|
+
event: 'input'
|
|
16
20
|
},
|
|
17
21
|
props: {
|
|
18
22
|
/**
|
|
19
|
-
*
|
|
23
|
+
* Used to set the `id` attribute on the rendered content, and used as the base to generate any additional element IDs as needed.
|
|
24
|
+
*/
|
|
25
|
+
id: {
|
|
26
|
+
type: String,
|
|
27
|
+
required: false,
|
|
28
|
+
default: undefined
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* The current value of the radio. When bound to multiple radios, this is the value of the currently selected radio.
|
|
20
32
|
*/
|
|
21
33
|
checked: {
|
|
22
|
-
|
|
34
|
+
// `checked` prop can be any type
|
|
35
|
+
type: undefined,
|
|
36
|
+
required: false,
|
|
37
|
+
default: null
|
|
38
|
+
},
|
|
39
|
+
/**
|
|
40
|
+
* When set to `true`, disables the component's functionality and places it in a disabled state.
|
|
41
|
+
*/
|
|
42
|
+
disabled: {
|
|
43
|
+
type: Boolean,
|
|
23
44
|
required: false,
|
|
24
45
|
default: false
|
|
46
|
+
},
|
|
47
|
+
/**
|
|
48
|
+
* Sets the value of the `name` attribute on the form control.
|
|
49
|
+
*/
|
|
50
|
+
name: {
|
|
51
|
+
type: String,
|
|
52
|
+
required: false,
|
|
53
|
+
default: undefined
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* Adds the `required` attribute to the form control.
|
|
57
|
+
*/
|
|
58
|
+
required: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
required: false,
|
|
61
|
+
default: false
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* Controls the validation state appearance of the component. `true` for valid, `false` for invalid, or `null` for no validation state.
|
|
65
|
+
*/
|
|
66
|
+
state: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
required: false,
|
|
69
|
+
default: null
|
|
70
|
+
},
|
|
71
|
+
/**
|
|
72
|
+
* Value returned when this radio is selected.
|
|
73
|
+
*/
|
|
74
|
+
value: {
|
|
75
|
+
// `value` prop can be any type
|
|
76
|
+
type: undefined,
|
|
77
|
+
required: false,
|
|
78
|
+
default: true
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
data() {
|
|
82
|
+
const group = this.getGroup();
|
|
83
|
+
return {
|
|
84
|
+
internalId: this.id ? this.id : uniqueId('gitlab_ui_radio_'),
|
|
85
|
+
localChecked: group ? group.checked : this.checked
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
computed: {
|
|
89
|
+
computedLocalChecked: {
|
|
90
|
+
get() {
|
|
91
|
+
return this.isGroup ? this.group.localChecked : this.localChecked;
|
|
92
|
+
},
|
|
93
|
+
set(value) {
|
|
94
|
+
if (this.isGroup) {
|
|
95
|
+
this.group.localChecked = value;
|
|
96
|
+
} else {
|
|
97
|
+
this.localChecked = value;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
group() {
|
|
102
|
+
return this.getGroup();
|
|
103
|
+
},
|
|
104
|
+
isGroup() {
|
|
105
|
+
// Is this radio a child of radio-group?
|
|
106
|
+
return Boolean(this.group);
|
|
107
|
+
},
|
|
108
|
+
computedState() {
|
|
109
|
+
if (this.isGroup) return this.group.computedState;
|
|
110
|
+
return isBoolean(this.state) ? this.state : null;
|
|
111
|
+
},
|
|
112
|
+
stateClass() {
|
|
113
|
+
if (this.computedState === true) return 'is-valid';
|
|
114
|
+
if (this.computedState === false) return 'is-invalid';
|
|
115
|
+
return null;
|
|
116
|
+
},
|
|
117
|
+
computedAriaInvalid() {
|
|
118
|
+
return this.computedState === false ? 'true' : null;
|
|
119
|
+
},
|
|
120
|
+
isChecked() {
|
|
121
|
+
return looseEqual(this.computedLocalChecked, this.value);
|
|
122
|
+
},
|
|
123
|
+
isDisabled() {
|
|
124
|
+
// Child can be disabled while parent isn't, but is always disabled if group is
|
|
125
|
+
return this.isGroup ? this.group.disabled || this.disabled : this.disabled;
|
|
126
|
+
},
|
|
127
|
+
isRequired() {
|
|
128
|
+
// Required only works when a name is provided for the input(s)
|
|
129
|
+
// Child can only be required when parent is
|
|
130
|
+
// Groups will always have a name (either user supplied or auto generated)
|
|
131
|
+
return this.computedName && (this.isGroup ? this.group.required : this.required);
|
|
132
|
+
},
|
|
133
|
+
computedName() {
|
|
134
|
+
// Group name preferred over local name
|
|
135
|
+
return (this.isGroup ? this.group.groupName : this.name) || null;
|
|
136
|
+
},
|
|
137
|
+
computedAttrs() {
|
|
138
|
+
const {
|
|
139
|
+
isDisabled: disabled,
|
|
140
|
+
isRequired: required,
|
|
141
|
+
value,
|
|
142
|
+
isChecked: checked
|
|
143
|
+
} = this;
|
|
144
|
+
return {
|
|
145
|
+
...this.$attrs,
|
|
146
|
+
id: this.internalId,
|
|
147
|
+
name: this.computedName,
|
|
148
|
+
disabled,
|
|
149
|
+
required,
|
|
150
|
+
value,
|
|
151
|
+
checked,
|
|
152
|
+
'aria-required': required || null,
|
|
153
|
+
'aria-invalid': this.computedAriaInvalid
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
watch: {
|
|
158
|
+
checked() {
|
|
159
|
+
this.checkedWatcher(...arguments);
|
|
160
|
+
},
|
|
161
|
+
computedLocalChecked() {
|
|
162
|
+
this.computedLocalCheckedWatcher(...arguments);
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
methods: {
|
|
166
|
+
checkedWatcher(newValue) {
|
|
167
|
+
if (!looseEqual(newValue, this.computedLocalChecked)) {
|
|
168
|
+
this.computedLocalChecked = newValue;
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
computedLocalCheckedWatcher(newValue, oldValue) {
|
|
172
|
+
if (!looseEqual(newValue, oldValue)) {
|
|
173
|
+
/**
|
|
174
|
+
* Emitted when the selected value is changed
|
|
175
|
+
*
|
|
176
|
+
* @event input
|
|
177
|
+
* @type {boolean} current selected value of radio group
|
|
178
|
+
*/
|
|
179
|
+
this.$emit('input', newValue);
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
handleChange() {
|
|
183
|
+
const {
|
|
184
|
+
value
|
|
185
|
+
} = this;
|
|
186
|
+
|
|
187
|
+
// Update `computedLocalChecked`
|
|
188
|
+
this.computedLocalChecked = value;
|
|
189
|
+
|
|
190
|
+
// Fire events in a `$nextTick()` to ensure the `v-model` is updated
|
|
191
|
+
this.$nextTick(() => {
|
|
192
|
+
/**
|
|
193
|
+
* Emitted when the selected value is changed due to user interaction
|
|
194
|
+
*
|
|
195
|
+
* @event change
|
|
196
|
+
* @type {boolean} current selected value of radio group
|
|
197
|
+
*/
|
|
198
|
+
this.$emit('change', value);
|
|
199
|
+
|
|
200
|
+
// If this is a child of a group, we emit a change event on it as well
|
|
201
|
+
if (this.isGroup) {
|
|
202
|
+
/**
|
|
203
|
+
* Emitted when the selected value is changed due to user interaction
|
|
204
|
+
*
|
|
205
|
+
* @event change
|
|
206
|
+
* @type {boolean} current selected value of radio group
|
|
207
|
+
*/
|
|
208
|
+
this.group.$emit('change', value);
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
},
|
|
212
|
+
focus() {
|
|
213
|
+
if (!this.disabled) {
|
|
214
|
+
var _this$$refs$input;
|
|
215
|
+
(_this$$refs$input = this.$refs.input) === null || _this$$refs$input === void 0 ? void 0 : _this$$refs$input.focus();
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
blur() {
|
|
219
|
+
if (!this.disabled) {
|
|
220
|
+
var _this$$refs$input2;
|
|
221
|
+
(_this$$refs$input2 = this.$refs.input) === null || _this$$refs$input2 === void 0 ? void 0 : _this$$refs$input2.blur();
|
|
222
|
+
}
|
|
25
223
|
}
|
|
26
224
|
}
|
|
27
225
|
};
|
|
@@ -30,7 +228,7 @@ var script = {
|
|
|
30
228
|
const __vue_script__ = script;
|
|
31
229
|
|
|
32
230
|
/* template */
|
|
33
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('
|
|
231
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-form-radio custom-radio custom-control"},[_c('input',_vm._b({key:"input",ref:"input",staticClass:"custom-control-input",class:_vm.stateClass,attrs:{"type":"radio"},on:{"change":_vm.handleChange}},'input',_vm.computedAttrs,false)),_vm._v(" "),_c('label',{staticClass:"custom-control-label",attrs:{"for":_vm.internalId}},[_vm._t("default"),_vm._v(" "),(Boolean(_vm.$scopedSlots.help))?_c('p',{staticClass:"help-text"},[_vm._t("help")],2):_vm._e()],2)])};
|
|
34
232
|
var __vue_staticRenderFns__ = [];
|
|
35
233
|
|
|
36
234
|
/* style */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BTooltip } from '../../../vendor/bootstrap-vue/src/components/tooltip/tooltip';
|
|
2
|
-
import { tooltipDelay } from '../../../utils/constants';
|
|
3
2
|
import tooltipMixin from '../../mixins/tooltip_mixin';
|
|
4
3
|
import { getGlTooltipDefaultContainer } from '../../../directives/tooltip/container';
|
|
5
4
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
@@ -7,7 +6,6 @@ import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
|
7
6
|
const tooltipRefName = 'bvTooltip';
|
|
8
7
|
var script = {
|
|
9
8
|
name: 'GlTooltip',
|
|
10
|
-
tooltipDelay,
|
|
11
9
|
components: {
|
|
12
10
|
BTooltip
|
|
13
11
|
},
|
|
@@ -21,7 +19,7 @@ var script = {
|
|
|
21
19
|
const __vue_script__ = script;
|
|
22
20
|
|
|
23
21
|
/* template */
|
|
24
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-tooltip',_vm._g(_vm._b({ref:_vm.$options.tooltipRefName,attrs:{"container":_vm.$attrs.container || _vm.$options.getGlTooltipDefaultContainer()
|
|
22
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-tooltip',_vm._g(_vm._b({ref:_vm.$options.tooltipRefName,attrs:{"container":_vm.$attrs.container || _vm.$options.getGlTooltipDefaultContainer()}},'b-tooltip',_vm.$attrs,false),_vm.$listeners),[_vm._t("default")],2)};
|
|
25
23
|
var __vue_staticRenderFns__ = [];
|
|
26
24
|
|
|
27
25
|
/* style */
|
package/dist/config.js
CHANGED
|
@@ -1,36 +1,5 @@
|
|
|
1
|
-
import Vue from 'vue';
|
|
2
1
|
import translationKeys from '../translations';
|
|
3
|
-
import { BVConfigPlugin } from './vendor/bootstrap-vue/src/bv-config';
|
|
4
|
-
import { tooltipDelay } from './utils/constants';
|
|
5
2
|
|
|
6
|
-
const tooltipGlobalConfig = {
|
|
7
|
-
// Work around for https://github.com/bootstrap-vue/bootstrap-vue/issues/6507
|
|
8
|
-
boundaryPadding: 5,
|
|
9
|
-
customClass: 'gl-tooltip',
|
|
10
|
-
delay: tooltipDelay
|
|
11
|
-
};
|
|
12
|
-
const popoverDelayConfig = {
|
|
13
|
-
show: 50,
|
|
14
|
-
// BootstrapVue's default delay on show.
|
|
15
|
-
hide: 150 // Increased hide delay so that it doesn't disappear to quickly when user attempts to interact with the content.
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Guard against nonexistent localStorage,
|
|
20
|
-
* or corrupted localStorage
|
|
21
|
-
*
|
|
22
|
-
* localStorage access is not possible in certain environments like
|
|
23
|
-
* - in iframe usage in Chrome if embedded on another domain
|
|
24
|
-
* - tests / node
|
|
25
|
-
*/
|
|
26
|
-
try {
|
|
27
|
-
const glTooltipDelay = localStorage.getItem('gl-tooltip-delay');
|
|
28
|
-
if (glTooltipDelay) {
|
|
29
|
-
tooltipGlobalConfig.delay = JSON.parse(glTooltipDelay);
|
|
30
|
-
}
|
|
31
|
-
} catch {
|
|
32
|
-
// localStorage doesn't exist (or the value is not properly formatted)
|
|
33
|
-
}
|
|
34
3
|
const i18n = translationKeys;
|
|
35
4
|
const defaultConfig = {
|
|
36
5
|
firstDayOfWeek: 0 // Defaults to 0 (Sunday)
|
|
@@ -59,12 +28,6 @@ const setConfigs = function () {
|
|
|
59
28
|
return;
|
|
60
29
|
}
|
|
61
30
|
configured = true;
|
|
62
|
-
Vue.use(BVConfigPlugin, {
|
|
63
|
-
BTooltip: tooltipGlobalConfig,
|
|
64
|
-
BPopover: {
|
|
65
|
-
delay: popoverDelayConfig
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
31
|
if (typeof firstDayOfWeek === 'number' && firstDayOfWeek >= 0 && firstDayOfWeek <= 6) {
|
|
69
32
|
defaultConfig.firstDayOfWeek = firstDayOfWeek;
|
|
70
33
|
}
|
package/dist/utils/constants.js
CHANGED
|
@@ -206,12 +206,6 @@ const tooltipPlacements = {
|
|
|
206
206
|
right: 'right',
|
|
207
207
|
bottom: 'bottom'
|
|
208
208
|
};
|
|
209
|
-
|
|
210
|
-
// in milliseconds
|
|
211
|
-
const tooltipDelay = {
|
|
212
|
-
show: 500,
|
|
213
|
-
hide: 0
|
|
214
|
-
};
|
|
215
209
|
const popoverPlacements = {
|
|
216
210
|
top: 'top',
|
|
217
211
|
right: 'right',
|
|
@@ -336,4 +330,4 @@ const loadingIconVariants = {
|
|
|
336
330
|
};
|
|
337
331
|
const isVue3 = Boolean(Vue.Fragment);
|
|
338
332
|
|
|
339
|
-
export { COMMA, CONTRAST_LEVELS, HEX_REGEX, LEFT_MOUSE_BUTTON, alertVariantIconMap, alertVariantOptions, alignOptions, animatedIconVariantOptions, avatarShapeOptions, avatarSizeOptions, avatarsInlineSizeOptions, badgeForButtonOptions, badgeIconSizeOptions, badgeSizeOptions, badgeVariantOptions, badgeVariantToIconVariantMap, bannerVariants, breadCrumbSizeOptions, buttonCategoryOptions, buttonSizeOptions, buttonVariantOptions, colorThemes, datepickerWidthOptionsMap, defaultDateFormat, drawerVariants, dropdownAllowedAutoPlacements, dropdownItemVariantOptions, dropdownPlacements, dropdownVariantOptions, focusableTags, formInputWidths, formStateOptions, iconSizeOptions, iconVariantOptions, isVue3, keyboard, labelColorOptions, linkVariantInline, linkVariantMention, linkVariantMentionCurrent, linkVariantMeta, linkVariantOptions, linkVariantUnstyled, loadingIconSizes, loadingIconVariants, maxZIndex, modalButtonDefaults, modalSizeOptions, popoverPlacements, progressBarVariantOptions, resizeDebounceTime, stackedPresentationOptions, tabsButtonDefaults, targetOptions, toggleLabelPosition, tokenVariants, tooltipActionEvents,
|
|
333
|
+
export { COMMA, CONTRAST_LEVELS, HEX_REGEX, LEFT_MOUSE_BUTTON, alertVariantIconMap, alertVariantOptions, alignOptions, animatedIconVariantOptions, avatarShapeOptions, avatarSizeOptions, avatarsInlineSizeOptions, badgeForButtonOptions, badgeIconSizeOptions, badgeSizeOptions, badgeVariantOptions, badgeVariantToIconVariantMap, bannerVariants, breadCrumbSizeOptions, buttonCategoryOptions, buttonSizeOptions, buttonVariantOptions, colorThemes, datepickerWidthOptionsMap, defaultDateFormat, drawerVariants, dropdownAllowedAutoPlacements, dropdownItemVariantOptions, dropdownPlacements, dropdownVariantOptions, focusableTags, formInputWidths, formStateOptions, iconSizeOptions, iconVariantOptions, isVue3, keyboard, labelColorOptions, linkVariantInline, linkVariantMention, linkVariantMentionCurrent, linkVariantMeta, linkVariantOptions, linkVariantUnstyled, loadingIconSizes, loadingIconVariants, maxZIndex, modalButtonDefaults, modalSizeOptions, popoverPlacements, progressBarVariantOptions, resizeDebounceTime, stackedPresentationOptions, tabsButtonDefaults, targetOptions, toggleLabelPosition, tokenVariants, tooltipActionEvents, tooltipPlacements, triggerVariantOptions, truncateOptions, variantCssColorMap, viewModeOptions };
|
|
@@ -4,17 +4,17 @@ import { PROP_TYPE_STRING, PROP_TYPE_BOOLEAN } from '../../constants/props';
|
|
|
4
4
|
import { SLOT_NAME_DEFAULT } from '../../constants/slots';
|
|
5
5
|
import { stopEvent } from '../../utils/events';
|
|
6
6
|
import { isEvent } from '../../utils/inspect';
|
|
7
|
-
import {
|
|
7
|
+
import { makeProp } from '../../utils/props';
|
|
8
8
|
import { hasNormalizedSlot, normalizeSlot } from '../../utils/normalize-slot';
|
|
9
9
|
|
|
10
10
|
// --- Props ---
|
|
11
11
|
|
|
12
|
-
const props =
|
|
12
|
+
const props = {
|
|
13
13
|
ariaLabel: makeProp(PROP_TYPE_STRING, 'Close'),
|
|
14
14
|
content: makeProp(PROP_TYPE_STRING, '×'),
|
|
15
15
|
disabled: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
16
16
|
textVariant: makeProp(PROP_TYPE_STRING)
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
18
|
|
|
19
19
|
// --- Main component ---
|
|
20
20
|
|
|
@@ -7,7 +7,7 @@ import { isTag, addClass, removeClass } from '../../utils/dom';
|
|
|
7
7
|
import { stopEvent } from '../../utils/events';
|
|
8
8
|
import { isBoolean, isEvent, isFunction } from '../../utils/inspect';
|
|
9
9
|
import { omit, sortKeys } from '../../utils/object';
|
|
10
|
-
import {
|
|
10
|
+
import { makeProp, pluckProps } from '../../utils/props';
|
|
11
11
|
import { isLink as isLink$1 } from '../../utils/router';
|
|
12
12
|
import { props as props$1, BLink } from '../link/link';
|
|
13
13
|
|
|
@@ -16,7 +16,7 @@ import { props as props$1, BLink } from '../link/link';
|
|
|
16
16
|
const linkProps = omit(props$1, ['event', 'routerTag']);
|
|
17
17
|
delete linkProps.href.default;
|
|
18
18
|
delete linkProps.to.default;
|
|
19
|
-
const props =
|
|
19
|
+
const props = sortKeys({
|
|
20
20
|
...linkProps,
|
|
21
21
|
block: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
22
22
|
disabled: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
@@ -27,7 +27,7 @@ const props = makePropsConfigurable(sortKeys({
|
|
|
27
27
|
tag: makeProp(PROP_TYPE_STRING, 'button'),
|
|
28
28
|
type: makeProp(PROP_TYPE_STRING, 'button'),
|
|
29
29
|
variant: makeProp(PROP_TYPE_STRING, 'secondary')
|
|
30
|
-
})
|
|
30
|
+
});
|
|
31
31
|
|
|
32
32
|
// --- Helper methods ---
|
|
33
33
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { extend, mergeData } from '../../vue';
|
|
2
2
|
import { NAME_DROPDOWN_DIVIDER } from '../../constants/components';
|
|
3
3
|
import { PROP_TYPE_STRING } from '../../constants/props';
|
|
4
|
-
import {
|
|
4
|
+
import { makeProp } from '../../utils/props';
|
|
5
5
|
import { omit } from '../../utils/object';
|
|
6
6
|
|
|
7
7
|
// --- Props ---
|
|
8
8
|
|
|
9
|
-
const props =
|
|
9
|
+
const props = {
|
|
10
10
|
tag: makeProp(PROP_TYPE_STRING, 'hr')
|
|
11
|
-
}
|
|
11
|
+
};
|
|
12
12
|
|
|
13
13
|
// --- Main component ---
|
|
14
14
|
|
|
@@ -2,16 +2,16 @@ import { extend, mergeData } from '../../vue';
|
|
|
2
2
|
import { NAME_DROPDOWN_FORM } from '../../constants/components';
|
|
3
3
|
import { PROP_TYPE_BOOLEAN, PROP_TYPE_ARRAY_OBJECT_STRING } from '../../constants/props';
|
|
4
4
|
import { sortKeys, omit } from '../../utils/object';
|
|
5
|
-
import {
|
|
5
|
+
import { makeProp } from '../../utils/props';
|
|
6
6
|
import { props as props$1, BForm } from '../form/form';
|
|
7
7
|
|
|
8
8
|
// --- Props ---
|
|
9
9
|
|
|
10
|
-
const props =
|
|
10
|
+
const props = sortKeys({
|
|
11
11
|
...props$1,
|
|
12
12
|
disabled: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
13
13
|
formClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING)
|
|
14
|
-
})
|
|
14
|
+
});
|
|
15
15
|
|
|
16
16
|
// --- Main component ---
|
|
17
17
|
|
|
@@ -6,18 +6,18 @@ import { isTag } from '../../utils/dom';
|
|
|
6
6
|
import { identity } from '../../utils/identity';
|
|
7
7
|
import { hasNormalizedSlot, normalizeSlot } from '../../utils/normalize-slot';
|
|
8
8
|
import { omit } from '../../utils/object';
|
|
9
|
-
import {
|
|
9
|
+
import { makeProp } from '../../utils/props';
|
|
10
10
|
|
|
11
11
|
// --- Props ---
|
|
12
12
|
|
|
13
|
-
const props =
|
|
13
|
+
const props = {
|
|
14
14
|
ariaDescribedby: makeProp(PROP_TYPE_STRING),
|
|
15
15
|
header: makeProp(PROP_TYPE_STRING),
|
|
16
16
|
headerClasses: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
|
|
17
17
|
headerTag: makeProp(PROP_TYPE_STRING, 'header'),
|
|
18
18
|
headerVariant: makeProp(PROP_TYPE_STRING),
|
|
19
19
|
id: makeProp(PROP_TYPE_STRING)
|
|
20
|
-
}
|
|
20
|
+
};
|
|
21
21
|
|
|
22
22
|
// --- Main component ---
|
|
23
23
|
|
|
@@ -3,15 +3,15 @@ import { NAME_DROPDOWN_HEADER } from '../../constants/components';
|
|
|
3
3
|
import { PROP_TYPE_STRING } from '../../constants/props';
|
|
4
4
|
import { isTag } from '../../utils/dom';
|
|
5
5
|
import { omit } from '../../utils/object';
|
|
6
|
-
import {
|
|
6
|
+
import { makeProp } from '../../utils/props';
|
|
7
7
|
|
|
8
8
|
// --- Props ---
|
|
9
9
|
|
|
10
|
-
const props =
|
|
10
|
+
const props = {
|
|
11
11
|
id: makeProp(PROP_TYPE_STRING),
|
|
12
12
|
tag: makeProp(PROP_TYPE_STRING, 'header'),
|
|
13
13
|
variant: makeProp(PROP_TYPE_STRING)
|
|
14
|
-
}
|
|
14
|
+
};
|
|
15
15
|
|
|
16
16
|
// --- Main component ---
|
|
17
17
|
|
|
@@ -2,20 +2,20 @@ import { extend } from '../../vue';
|
|
|
2
2
|
import { NAME_DROPDOWN_ITEM_BUTTON } from '../../constants/components';
|
|
3
3
|
import { EVENT_NAME_CLICK } from '../../constants/events';
|
|
4
4
|
import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING, PROP_TYPE_ARRAY_OBJECT_STRING } from '../../constants/props';
|
|
5
|
-
import {
|
|
5
|
+
import { makeProp } from '../../utils/props';
|
|
6
6
|
import { attrsMixin } from '../../mixins/attrs';
|
|
7
7
|
import { normalizeSlotMixin } from '../../mixins/normalize-slot';
|
|
8
8
|
|
|
9
9
|
// --- Props ---
|
|
10
10
|
|
|
11
|
-
const props =
|
|
11
|
+
const props = {
|
|
12
12
|
active: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
13
13
|
activeClass: makeProp(PROP_TYPE_STRING, 'active'),
|
|
14
14
|
buttonClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
|
|
15
15
|
disabled: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
16
16
|
variant: makeProp(PROP_TYPE_STRING),
|
|
17
17
|
role: makeProp(PROP_TYPE_STRING, 'menuitem')
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
19
|
|
|
20
20
|
// --- Main component ---
|
|
21
21
|
|
|
@@ -4,7 +4,7 @@ import { EVENT_NAME_CLICK } from '../../constants/events';
|
|
|
4
4
|
import { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_STRING } from '../../constants/props';
|
|
5
5
|
import { requestAF } from '../../utils/dom';
|
|
6
6
|
import { omit, sortKeys } from '../../utils/object';
|
|
7
|
-
import {
|
|
7
|
+
import { makeProp, pluckProps } from '../../utils/props';
|
|
8
8
|
import { attrsMixin } from '../../mixins/attrs';
|
|
9
9
|
import { normalizeSlotMixin } from '../../mixins/normalize-slot';
|
|
10
10
|
import { props as props$1, BLink } from '../link/link';
|
|
@@ -12,11 +12,11 @@ import { props as props$1, BLink } from '../link/link';
|
|
|
12
12
|
// --- Props ---
|
|
13
13
|
|
|
14
14
|
const linkProps = omit(props$1, ['event', 'routerTag']);
|
|
15
|
-
const props =
|
|
15
|
+
const props = sortKeys({
|
|
16
16
|
...linkProps,
|
|
17
17
|
linkClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
|
|
18
18
|
variant: makeProp(PROP_TYPE_STRING)
|
|
19
|
-
})
|
|
19
|
+
});
|
|
20
20
|
|
|
21
21
|
// --- Main component ---
|
|
22
22
|
|
|
@@ -2,15 +2,15 @@ import { extend, mergeData } from '../../vue';
|
|
|
2
2
|
import { NAME_DROPDOWN_TEXT } from '../../constants/components';
|
|
3
3
|
import { PROP_TYPE_STRING, PROP_TYPE_ARRAY_OBJECT_STRING } from '../../constants/props';
|
|
4
4
|
import { omit } from '../../utils/object';
|
|
5
|
-
import {
|
|
5
|
+
import { makeProp } from '../../utils/props';
|
|
6
6
|
|
|
7
7
|
// --- Props ---
|
|
8
8
|
|
|
9
|
-
const props =
|
|
9
|
+
const props = {
|
|
10
10
|
tag: makeProp(PROP_TYPE_STRING, 'p'),
|
|
11
11
|
textClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
|
|
12
12
|
variant: makeProp(PROP_TYPE_STRING)
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
14
|
|
|
15
15
|
// --- Main component ---
|
|
16
16
|
|
|
@@ -4,7 +4,7 @@ import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING, PROP_TYPE_ARRAY_OBJECT_STRING, PRO
|
|
|
4
4
|
import { SLOT_NAME_BUTTON_CONTENT, SLOT_NAME_DEFAULT } from '../../constants/slots';
|
|
5
5
|
import { arrayIncludes } from '../../utils/array';
|
|
6
6
|
import { htmlOrText } from '../../utils/html';
|
|
7
|
-
import {
|
|
7
|
+
import { makeProp } from '../../utils/props';
|
|
8
8
|
import { toString } from '../../utils/string';
|
|
9
9
|
import { props as props$2, dropdownMixin } from '../../mixins/dropdown';
|
|
10
10
|
import { props as props$1, idMixin } from '../../mixins/id';
|
|
@@ -14,7 +14,7 @@ import { sortKeys } from '../../utils/object';
|
|
|
14
14
|
|
|
15
15
|
// --- Props ---
|
|
16
16
|
|
|
17
|
-
const props =
|
|
17
|
+
const props = sortKeys({
|
|
18
18
|
...props$1,
|
|
19
19
|
...props$2,
|
|
20
20
|
block: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
@@ -40,7 +40,7 @@ const props = makePropsConfigurable(sortKeys({
|
|
|
40
40
|
// TODO: This really should be `toggleLabel`
|
|
41
41
|
toggleText: makeProp(PROP_TYPE_STRING, 'Toggle dropdown'),
|
|
42
42
|
variant: makeProp(PROP_TYPE_STRING, 'secondary')
|
|
43
|
-
})
|
|
43
|
+
});
|
|
44
44
|
|
|
45
45
|
// --- Main component ---
|
|
46
46
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { extend, mergeData } from '../../vue';
|
|
2
2
|
import { NAME_FORM_INVALID_FEEDBACK } from '../../constants/components';
|
|
3
3
|
import { PROP_TYPE_STRING, PROP_TYPE_BOOLEAN } from '../../constants/props';
|
|
4
|
-
import {
|
|
4
|
+
import { makeProp } from '../../utils/props';
|
|
5
5
|
|
|
6
6
|
// --- Props ---
|
|
7
7
|
|
|
8
|
-
const props =
|
|
8
|
+
const props = {
|
|
9
9
|
ariaLive: makeProp(PROP_TYPE_STRING),
|
|
10
10
|
forceShow: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
11
11
|
id: makeProp(PROP_TYPE_STRING),
|
|
@@ -14,7 +14,7 @@ const props = makePropsConfigurable({
|
|
|
14
14
|
state: makeProp(PROP_TYPE_BOOLEAN, null),
|
|
15
15
|
tag: makeProp(PROP_TYPE_STRING, 'div'),
|
|
16
16
|
tooltip: makeProp(PROP_TYPE_BOOLEAN, false)
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
18
|
|
|
19
19
|
// --- Main component ---
|
|
20
20
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { extend, mergeData } from '../../vue';
|
|
2
2
|
import { NAME_FORM_TEXT } from '../../constants/components';
|
|
3
3
|
import { PROP_TYPE_STRING, PROP_TYPE_BOOLEAN } from '../../constants/props';
|
|
4
|
-
import {
|
|
4
|
+
import { makeProp } from '../../utils/props';
|
|
5
5
|
|
|
6
6
|
// --- Props ---
|
|
7
7
|
|
|
8
|
-
const props =
|
|
8
|
+
const props = {
|
|
9
9
|
id: makeProp(PROP_TYPE_STRING),
|
|
10
10
|
inline: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
11
11
|
tag: makeProp(PROP_TYPE_STRING, 'small'),
|
|
12
12
|
textVariant: makeProp(PROP_TYPE_STRING, 'muted')
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
14
|
|
|
15
15
|
// --- Main component ---
|
|
16
16
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { extend, mergeData } from '../../vue';
|
|
2
2
|
import { NAME_FORM_VALID_FEEDBACK } from '../../constants/components';
|
|
3
3
|
import { PROP_TYPE_STRING, PROP_TYPE_BOOLEAN } from '../../constants/props';
|
|
4
|
-
import {
|
|
4
|
+
import { makeProp } from '../../utils/props';
|
|
5
5
|
|
|
6
6
|
// --- Props ---
|
|
7
7
|
|
|
8
|
-
const props =
|
|
8
|
+
const props = {
|
|
9
9
|
ariaLive: makeProp(PROP_TYPE_STRING),
|
|
10
10
|
forceShow: makeProp(PROP_TYPE_BOOLEAN, false),
|
|
11
11
|
id: makeProp(PROP_TYPE_STRING),
|
|
@@ -14,7 +14,7 @@ const props = makePropsConfigurable({
|
|
|
14
14
|
state: makeProp(PROP_TYPE_BOOLEAN, null),
|
|
15
15
|
tag: makeProp(PROP_TYPE_STRING, 'div'),
|
|
16
16
|
tooltip: makeProp(PROP_TYPE_BOOLEAN, false)
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
18
|
|
|
19
19
|
// --- Main component ---
|
|
20
20
|
|