@gitlab/ui 111.5.0 → 111.7.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 (45) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/components/base/accordion/accordion.js +4 -5
  3. package/dist/components/base/accordion/accordion_item.js +45 -17
  4. package/dist/components/base/accordion/constants.js +3 -0
  5. package/dist/components/base/datepicker/datepicker.js +2 -1
  6. package/dist/components/base/link/link.js +18 -9
  7. package/dist/components/charts/chart/chart.js +29 -23
  8. package/dist/config.js +10 -2
  9. package/dist/utils/charts/config.js +1 -4
  10. package/dist/vendor/bootstrap-vue/src/constants/components.js +1 -7
  11. package/package.json +3 -3
  12. package/src/components/base/accordion/accordion.vue +4 -6
  13. package/src/components/base/accordion/accordion_item.vue +57 -26
  14. package/src/components/base/accordion/constants.js +1 -0
  15. package/src/components/base/datepicker/datepicker.vue +2 -1
  16. package/src/components/base/link/link.vue +17 -5
  17. package/src/components/charts/chart/chart.vue +17 -20
  18. package/src/config.js +10 -1
  19. package/src/utils/charts/config.js +0 -3
  20. package/src/vendor/bootstrap-vue/src/constants/components.js +0 -6
  21. package/dist/vendor/bootstrap-vue/src/components/form-input/form-input.js +0 -157
  22. package/dist/vendor/bootstrap-vue/src/components/form-input/index.js +0 -1
  23. package/dist/vendor/bootstrap-vue/src/components/input-group/index.js +0 -5
  24. package/dist/vendor/bootstrap-vue/src/components/input-group/input-group-addon.js +0 -44
  25. package/dist/vendor/bootstrap-vue/src/components/input-group/input-group-append.js +0 -34
  26. package/dist/vendor/bootstrap-vue/src/components/input-group/input-group-prepend.js +0 -34
  27. package/dist/vendor/bootstrap-vue/src/components/input-group/input-group-text.js +0 -31
  28. package/dist/vendor/bootstrap-vue/src/components/input-group/input-group.js +0 -75
  29. package/src/vendor/bootstrap-vue/src/components/form-input/README.md +0 -612
  30. package/src/vendor/bootstrap-vue/src/components/form-input/form-input.js +0 -168
  31. package/src/vendor/bootstrap-vue/src/components/form-input/form-input.spec.js +0 -989
  32. package/src/vendor/bootstrap-vue/src/components/form-input/index.js +0 -3
  33. package/src/vendor/bootstrap-vue/src/components/form-input/package.json +0 -135
  34. package/src/vendor/bootstrap-vue/src/components/input-group/README.md +0 -329
  35. package/src/vendor/bootstrap-vue/src/components/input-group/index.js +0 -7
  36. package/src/vendor/bootstrap-vue/src/components/input-group/input-group-addon.js +0 -43
  37. package/src/vendor/bootstrap-vue/src/components/input-group/input-group-append.js +0 -31
  38. package/src/vendor/bootstrap-vue/src/components/input-group/input-group-append.spec.js +0 -84
  39. package/src/vendor/bootstrap-vue/src/components/input-group/input-group-prepend.js +0 -31
  40. package/src/vendor/bootstrap-vue/src/components/input-group/input-group-prepend.spec.js +0 -84
  41. package/src/vendor/bootstrap-vue/src/components/input-group/input-group-text.js +0 -31
  42. package/src/vendor/bootstrap-vue/src/components/input-group/input-group-text.spec.js +0 -45
  43. package/src/vendor/bootstrap-vue/src/components/input-group/input-group.js +0 -73
  44. package/src/vendor/bootstrap-vue/src/components/input-group/input-group.spec.js +0 -153
  45. package/src/vendor/bootstrap-vue/src/components/input-group/package.json +0 -109
@@ -1,168 +0,0 @@
1
- import { extend } from '../../vue'
2
- import { NAME_FORM_INPUT } from '../../constants/components'
3
- import { PROP_TYPE_BOOLEAN, PROP_TYPE_NUMBER_STRING, PROP_TYPE_STRING } from '../../constants/props'
4
- import { arrayIncludes } from '../../utils/array'
5
- import { attemptBlur } from '../../utils/dom'
6
- import { eventOn, eventOff, eventOnOff, stopEvent } from '../../utils/events'
7
- import { sortKeys } from '../../utils/object'
8
- import { makeProp, makePropsConfigurable } from '../../utils/props'
9
- import { formControlMixin, props as formControlProps } from '../../mixins/form-control'
10
- import { formSelectionMixin } from '../../mixins/form-selection'
11
- import { formSizeMixin, props as formSizeProps } from '../../mixins/form-size'
12
- import { formStateMixin, props as formStateProps } from '../../mixins/form-state'
13
- import { formTextMixin, props as formTextProps } from '../../mixins/form-text'
14
- import { formValidityMixin } from '../../mixins/form-validity'
15
- import { idMixin, props as idProps } from '../../mixins/id'
16
- import { listenersMixin } from '../../mixins/listeners'
17
-
18
- // --- Constants ---
19
-
20
- // Valid supported input types
21
- const TYPES = [
22
- 'text',
23
- 'password',
24
- 'email',
25
- 'number',
26
- 'url',
27
- 'tel',
28
- 'search',
29
- 'range',
30
- 'color',
31
- 'date',
32
- 'time',
33
- 'datetime',
34
- 'datetime-local',
35
- 'month',
36
- 'week'
37
- ]
38
-
39
- // --- Props ---
40
-
41
- export const props = makePropsConfigurable(
42
- sortKeys({
43
- ...idProps,
44
- ...formControlProps,
45
- ...formSizeProps,
46
- ...formStateProps,
47
- ...formTextProps,
48
- list: makeProp(PROP_TYPE_STRING),
49
- max: makeProp(PROP_TYPE_NUMBER_STRING),
50
- min: makeProp(PROP_TYPE_NUMBER_STRING),
51
- // Disable mousewheel to prevent wheel from changing values (i.e. number/date)
52
- noWheel: makeProp(PROP_TYPE_BOOLEAN, false),
53
- step: makeProp(PROP_TYPE_NUMBER_STRING),
54
- type: makeProp(PROP_TYPE_STRING, 'text', type => {
55
- return arrayIncludes(TYPES, type)
56
- })
57
- }),
58
- NAME_FORM_INPUT
59
- )
60
-
61
- // --- Main component ---
62
-
63
- // @vue/component
64
- export const BFormInput = /*#__PURE__*/ extend({
65
- name: NAME_FORM_INPUT,
66
- // Mixin order is important!
67
- mixins: [
68
- listenersMixin,
69
- idMixin,
70
- formControlMixin,
71
- formSizeMixin,
72
- formStateMixin,
73
- formTextMixin,
74
- formSelectionMixin,
75
- formValidityMixin
76
- ],
77
- props,
78
- computed: {
79
- localType() {
80
- // We only allow certain types
81
- const { type } = this
82
- return arrayIncludes(TYPES, type) ? type : 'text'
83
- },
84
- computedAttrs() {
85
- const { localType: type, name, form, disabled, placeholder, required, min, max, step } = this
86
-
87
- return {
88
- id: this.safeId(),
89
- name,
90
- form,
91
- type,
92
- disabled,
93
- placeholder,
94
- required,
95
- autocomplete: this.autocomplete || null,
96
- readonly: this.readonly || this.plaintext,
97
- min,
98
- max,
99
- step,
100
- list: type !== 'password' ? this.list : null,
101
- 'aria-required': required ? 'true' : null,
102
- 'aria-invalid': this.computedAriaInvalid
103
- }
104
- },
105
- computedListeners() {
106
- return {
107
- ...this.bvListeners,
108
- input: this.onInput,
109
- change: this.onChange,
110
- blur: this.onBlur
111
- }
112
- }
113
- },
114
- watch: {
115
- noWheel(newValue) {
116
- this.setWheelStopper(newValue)
117
- }
118
- },
119
- mounted() {
120
- this.setWheelStopper(this.noWheel)
121
- },
122
- /* istanbul ignore next */
123
- deactivated() {
124
- // Turn off listeners when keep-alive component deactivated
125
- /* istanbul ignore next */
126
- this.setWheelStopper(false)
127
- },
128
- /* istanbul ignore next */
129
- activated() {
130
- // Turn on listeners (if no-wheel) when keep-alive component activated
131
- /* istanbul ignore next */
132
- this.setWheelStopper(this.noWheel)
133
- },
134
- beforeDestroy() {
135
- /* istanbul ignore next */
136
- this.setWheelStopper(false)
137
- },
138
- methods: {
139
- setWheelStopper(on) {
140
- const input = this.$el
141
- // We use native events, so that we don't interfere with propagation
142
- eventOnOff(on, input, 'focus', this.onWheelFocus)
143
- eventOnOff(on, input, 'blur', this.onWheelBlur)
144
- if (!on) {
145
- eventOff(document, 'wheel', this.stopWheel)
146
- }
147
- },
148
- onWheelFocus() {
149
- eventOn(document, 'wheel', this.stopWheel)
150
- },
151
- onWheelBlur() {
152
- eventOff(document, 'wheel', this.stopWheel)
153
- },
154
- stopWheel(event) {
155
- stopEvent(event, { propagation: false })
156
- attemptBlur(this.$el)
157
- }
158
- },
159
- render(h) {
160
- return h('input', {
161
- class: this.computedClass,
162
- attrs: this.computedAttrs,
163
- domProps: { value: this.localValue },
164
- on: this.computedListeners,
165
- ref: 'input'
166
- })
167
- }
168
- })