buefy 0.9.13 → 0.9.14
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/buefy.css +1 -1
- package/dist/buefy.esm.js +167 -117
- package/dist/buefy.esm.min.js +2 -2
- package/dist/buefy.js +168 -116
- package/dist/buefy.min.css +1 -1
- package/dist/buefy.min.js +2 -2
- package/dist/cjs/autocomplete.js +5 -5
- package/dist/cjs/breadcrumb.js +1 -1
- package/dist/cjs/button.js +3 -3
- package/dist/cjs/carousel.js +4 -4
- package/dist/cjs/{chunk-c6fbc7b4.js → chunk-02406b6a.js} +2 -2
- package/dist/cjs/{chunk-d0f8ea39.js → chunk-0cc2e136.js} +6 -6
- package/dist/cjs/{chunk-114191ae.js → chunk-0d901f36.js} +2 -2
- package/dist/cjs/{chunk-9e4cf4c5.js → chunk-1061ac68.js} +1 -1
- package/dist/cjs/{chunk-2c7de785.js → chunk-1d2f05e0.js} +0 -0
- package/dist/cjs/{chunk-30670fac.js → chunk-2a2403f9.js} +78 -62
- package/dist/cjs/{chunk-d54e40f6.js → chunk-2cdb1a89.js} +2 -9
- package/dist/cjs/{chunk-34949503.js → chunk-4a3a5cf7.js} +1 -1
- package/dist/cjs/{chunk-fe2f57ee.js → chunk-4ebee779.js} +2 -2
- package/dist/cjs/{chunk-2062216d.js → chunk-5a7e385c.js} +1 -1
- package/dist/cjs/{chunk-f5106717.js → chunk-74fb31db.js} +3 -3
- package/dist/cjs/{chunk-7da0c017.js → chunk-a267720d.js} +21 -21
- package/dist/cjs/{chunk-a11294f9.js → chunk-a268cb3d.js} +2 -2
- package/dist/cjs/{chunk-c7b2aa4b.js → chunk-bb7da16a.js} +1 -1
- package/dist/cjs/{chunk-2ae50815.js → chunk-bebdaf0b.js} +3 -3
- package/dist/cjs/{chunk-9103eeda.js → chunk-c0adb618.js} +1 -1
- package/dist/cjs/{chunk-d120e215.js → chunk-d7d30e52.js} +1 -1
- package/dist/cjs/{chunk-fefd7b77.js → chunk-ddd15f05.js} +0 -0
- package/dist/cjs/{chunk-2911aa4b.js → chunk-e8dc6270.js} +14 -11
- package/dist/cjs/{chunk-3cc5d9a6.js → chunk-eb8d954b.js} +0 -0
- package/dist/cjs/{chunk-6cb902f8.js → chunk-f536c03f.js} +1 -1
- package/dist/cjs/{chunk-61023b09.js → chunk-fbf3566e.js} +2 -2
- package/dist/cjs/clockpicker.js +8 -8
- package/dist/cjs/config.js +1 -1
- package/dist/cjs/datepicker.js +9 -9
- package/dist/cjs/datetimepicker.js +11 -11
- package/dist/cjs/dialog.js +4 -4
- package/dist/cjs/dropdown.js +3 -3
- package/dist/cjs/field.js +2 -2
- package/dist/cjs/helpers.js +20 -0
- package/dist/cjs/icon.js +2 -2
- package/dist/cjs/image.js +2 -2
- package/dist/cjs/index.js +24 -22
- package/dist/cjs/input.js +4 -4
- package/dist/cjs/loading.js +2 -2
- package/dist/cjs/menu.js +2 -2
- package/dist/cjs/message.js +3 -3
- package/dist/cjs/modal.js +2 -2
- package/dist/cjs/navbar.js +3 -0
- package/dist/cjs/notification.js +4 -4
- package/dist/cjs/numberinput.js +4 -4
- package/dist/cjs/pagination.js +3 -3
- package/dist/cjs/progress.js +2 -2
- package/dist/cjs/rate.js +2 -2
- package/dist/cjs/select.js +4 -4
- package/dist/cjs/sidebar.js +1 -1
- package/dist/cjs/slider.js +2 -2
- package/dist/cjs/snackbar.js +4 -3
- package/dist/cjs/steps.js +5 -5
- package/dist/cjs/switch.js +1 -1
- package/dist/cjs/table.js +24 -22
- package/dist/cjs/tabs.js +7 -7
- package/dist/cjs/taginput.js +5 -5
- package/dist/cjs/timepicker.js +10 -10
- package/dist/cjs/toast.js +2 -2
- package/dist/cjs/tooltip.js +2 -2
- package/dist/cjs/upload.js +21 -7
- package/dist/components/autocomplete/index.js +78 -62
- package/dist/components/autocomplete/index.min.js +2 -2
- package/dist/components/breadcrumb/index.js +2 -2
- package/dist/components/breadcrumb/index.min.js +1 -1
- package/dist/components/button/index.js +2 -2
- package/dist/components/button/index.min.js +2 -2
- package/dist/components/carousel/index.js +2 -2
- package/dist/components/carousel/index.min.js +2 -2
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/index.min.js +1 -1
- package/dist/components/clockpicker/index.js +22 -22
- package/dist/components/clockpicker/index.min.js +2 -2
- package/dist/components/collapse/index.js +1 -1
- package/dist/components/collapse/index.min.js +1 -1
- package/dist/components/datepicker/index.js +29 -26
- package/dist/components/datepicker/index.min.js +2 -2
- package/dist/components/datetimepicker/index.js +29 -26
- package/dist/components/datetimepicker/index.min.js +2 -2
- package/dist/components/dialog/index.js +2 -2
- package/dist/components/dialog/index.min.js +2 -2
- package/dist/components/dropdown/index.js +2 -2
- package/dist/components/dropdown/index.min.js +1 -1
- package/dist/components/field/index.js +22 -22
- package/dist/components/field/index.min.js +1 -1
- package/dist/components/icon/index.js +2 -2
- package/dist/components/icon/index.min.js +2 -2
- package/dist/components/image/index.js +2 -2
- package/dist/components/image/index.min.js +2 -2
- package/dist/components/input/index.js +2 -2
- package/dist/components/input/index.min.js +2 -2
- package/dist/components/loading/index.js +1 -1
- package/dist/components/loading/index.min.js +1 -1
- package/dist/components/menu/index.js +2 -2
- package/dist/components/menu/index.min.js +2 -2
- package/dist/components/message/index.js +2 -2
- package/dist/components/message/index.min.js +2 -2
- package/dist/components/modal/index.js +2 -2
- package/dist/components/modal/index.min.js +2 -2
- package/dist/components/navbar/index.js +4 -1
- package/dist/components/navbar/index.min.js +2 -2
- package/dist/components/notification/index.js +3 -10
- package/dist/components/notification/index.min.js +2 -2
- package/dist/components/numberinput/index.js +2 -2
- package/dist/components/numberinput/index.min.js +2 -2
- package/dist/components/pagination/index.js +2 -2
- package/dist/components/pagination/index.min.js +2 -2
- package/dist/components/progress/index.js +2 -2
- package/dist/components/progress/index.min.js +2 -2
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio/index.min.js +1 -1
- package/dist/components/rate/index.js +2 -2
- package/dist/components/rate/index.min.js +2 -2
- package/dist/components/select/index.js +2 -2
- package/dist/components/select/index.min.js +2 -2
- package/dist/components/sidebar/index.js +2 -2
- package/dist/components/sidebar/index.min.js +1 -1
- package/dist/components/skeleton/index.js +1 -1
- package/dist/components/skeleton/index.min.js +1 -1
- package/dist/components/slider/index.js +2 -2
- package/dist/components/slider/index.min.js +2 -2
- package/dist/components/snackbar/index.js +5 -11
- package/dist/components/snackbar/index.min.js +2 -2
- package/dist/components/steps/index.js +2 -2
- package/dist/components/steps/index.min.js +2 -2
- package/dist/components/switch/index.js +2 -2
- package/dist/components/switch/index.min.js +1 -1
- package/dist/components/table/index.js +36 -16
- package/dist/components/table/index.min.js +2 -2
- package/dist/components/tabs/index.js +4 -4
- package/dist/components/tabs/index.min.js +2 -2
- package/dist/components/tag/index.js +1 -1
- package/dist/components/tag/index.min.js +1 -1
- package/dist/components/taginput/index.js +78 -62
- package/dist/components/taginput/index.min.js +2 -2
- package/dist/components/timepicker/index.js +22 -22
- package/dist/components/timepicker/index.min.js +2 -2
- package/dist/components/toast/index.js +3 -10
- package/dist/components/toast/index.min.js +2 -2
- package/dist/components/tooltip/index.js +2 -2
- package/dist/components/tooltip/index.min.js +1 -1
- package/dist/components/upload/index.js +21 -7
- package/dist/components/upload/index.min.js +2 -2
- package/dist/esm/autocomplete.js +6 -6
- package/dist/esm/breadcrumb.js +1 -1
- package/dist/esm/button.js +4 -4
- package/dist/esm/carousel.js +4 -4
- package/dist/esm/{chunk-21fc0948.js → chunk-03f0ac1a.js} +6 -6
- package/dist/esm/{chunk-b0c0c6b0.js → chunk-0c4e4e90.js} +0 -0
- package/dist/esm/{chunk-ae8ab23a.js → chunk-113685dc.js} +3 -3
- package/dist/esm/{chunk-71a547bc.js → chunk-1b63211c.js} +1 -1
- package/dist/esm/{chunk-d7f92d97.js → chunk-1f41edb4.js} +1 -1
- package/dist/esm/{chunk-3773c62d.js → chunk-2229e354.js} +1 -1
- package/dist/esm/{chunk-83eb0d37.js → chunk-40f06d9c.js} +2 -2
- package/dist/esm/{chunk-75a5af93.js → chunk-590a6902.js} +1 -1
- package/dist/esm/{chunk-22e9f916.js → chunk-5f0c3fc4.js} +14 -11
- package/dist/esm/{chunk-6019fd7a.js → chunk-79ac4d01.js} +79 -63
- package/dist/esm/{chunk-8ed29c41.js → chunk-8cad1844.js} +1 -1
- package/dist/esm/{chunk-29ca0df8.js → chunk-91404fa9.js} +0 -0
- package/dist/esm/{chunk-b07e3182.js → chunk-97f201e0.js} +21 -21
- package/dist/esm/{chunk-c9c58d0c.js → chunk-9e0ae963.js} +0 -0
- package/dist/esm/{chunk-ece062a7.js → chunk-a8516afd.js} +2 -2
- package/dist/esm/{chunk-4b67a181.js → chunk-b66a83ce.js} +2 -2
- package/dist/esm/{chunk-9f7f7441.js → chunk-b99e83bd.js} +1 -1
- package/dist/esm/{chunk-18e8b067.js → chunk-bbf5d78a.js} +2 -2
- package/dist/esm/{chunk-8d0f95b8.js → chunk-e01e9ef0.js} +3 -3
- package/dist/esm/{chunk-799e084d.js → chunk-e7eb83d8.js} +2 -9
- package/dist/esm/{chunk-d92f0cd9.js → chunk-ea9bc877.js} +1 -1
- package/dist/esm/{chunk-e7c9b2cb.js → chunk-efec59b6.js} +2 -2
- package/dist/esm/clockpicker.js +8 -8
- package/dist/esm/config.js +1 -1
- package/dist/esm/datepicker.js +10 -10
- package/dist/esm/datetimepicker.js +11 -11
- package/dist/esm/dialog.js +4 -4
- package/dist/esm/dropdown.js +4 -4
- package/dist/esm/field.js +3 -3
- package/dist/esm/helpers.js +19 -1
- package/dist/esm/icon.js +3 -3
- package/dist/esm/image.js +3 -3
- package/dist/esm/index.js +23 -23
- package/dist/esm/input.js +5 -5
- package/dist/esm/loading.js +3 -3
- package/dist/esm/menu.js +2 -2
- package/dist/esm/message.js +3 -3
- package/dist/esm/modal.js +3 -3
- package/dist/esm/navbar.js +3 -0
- package/dist/esm/notification.js +4 -4
- package/dist/esm/numberinput.js +4 -4
- package/dist/esm/pagination.js +4 -4
- package/dist/esm/progress.js +2 -2
- package/dist/esm/rate.js +2 -2
- package/dist/esm/select.js +5 -5
- package/dist/esm/sidebar.js +1 -1
- package/dist/esm/slider.js +2 -2
- package/dist/esm/snackbar.js +4 -3
- package/dist/esm/steps.js +5 -5
- package/dist/esm/switch.js +1 -1
- package/dist/esm/table.js +25 -23
- package/dist/esm/tabs.js +7 -7
- package/dist/esm/taginput.js +5 -5
- package/dist/esm/timepicker.js +11 -11
- package/dist/esm/toast.js +2 -2
- package/dist/esm/tooltip.js +3 -3
- package/dist/esm/upload.js +21 -7
- package/dist/vetur/attributes.json +4 -0
- package/dist/vetur/tags.json +1 -0
- package/package.json +1 -1
- package/src/components/autocomplete/Autocomplete.vue +711 -701
- package/src/components/breadcrumb/__snapshots__/BreadcrumbItem.spec.js.snap +1 -5
- package/src/components/carousel/__snapshots__/CarouselList.spec.js.snap +48 -48
- package/src/components/datepicker/DatepickerTableRow.spec.js +26 -0
- package/src/components/datepicker/DatepickerTableRow.vue +4 -5
- package/src/components/field/Field.vue +271 -271
- package/src/components/navbar/NavbarDropdown.vue +4 -0
- package/src/components/snackbar/index.js +2 -1
- package/src/components/table/Table.spec.js +17 -3
- package/src/components/table/Table.vue +8 -9
- package/src/components/tabs/Tabs.vue +185 -183
- package/src/components/timepicker/__snapshots__/Timepicker.spec.js.snap +18 -47
- package/src/components/upload/Upload.vue +19 -7
- package/src/utils/NoticeMixin.js +1 -5
- package/src/utils/config.js +1 -1
- package/src/utils/helpers.js +16 -0
- package/types/components.d.ts +5 -0
|
@@ -1,183 +1,185 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="b-tabs" :class="mainClasses">
|
|
3
|
-
<nav
|
|
4
|
-
class="tabs"
|
|
5
|
-
:class="navClasses"
|
|
6
|
-
role="tablist"
|
|
7
|
-
:aria-orientation="vertical ? 'vertical' : 'horizontal'"
|
|
8
|
-
@keydown="manageTablistKeydown"
|
|
9
|
-
>
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
:
|
|
28
|
-
:aria-
|
|
29
|
-
:
|
|
30
|
-
|
|
31
|
-
@
|
|
32
|
-
@
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
:
|
|
40
|
-
:aria-
|
|
41
|
-
:
|
|
42
|
-
|
|
43
|
-
@
|
|
44
|
-
@
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
:
|
|
50
|
-
:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
</
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
'is-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
tab.focus()
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
prevIdx
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
this.
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
nextIdx
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
this.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
case '
|
|
174
|
-
case '
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="b-tabs" :class="mainClasses">
|
|
3
|
+
<nav
|
|
4
|
+
class="tabs"
|
|
5
|
+
:class="navClasses"
|
|
6
|
+
role="tablist"
|
|
7
|
+
:aria-orientation="vertical ? 'vertical' : 'horizontal'"
|
|
8
|
+
@keydown="manageTablistKeydown"
|
|
9
|
+
>
|
|
10
|
+
<slot name="start" />
|
|
11
|
+
<ul>
|
|
12
|
+
<li
|
|
13
|
+
v-for="(childItem, childIdx) in items"
|
|
14
|
+
:key="childItem.value"
|
|
15
|
+
v-show="childItem.visible"
|
|
16
|
+
:class="[ childItem.headerClass, { 'is-active': childItem.isActive,
|
|
17
|
+
'is-disabled': childItem.disabled }]"
|
|
18
|
+
role="presentation"
|
|
19
|
+
>
|
|
20
|
+
<b-slot-component
|
|
21
|
+
ref="tabLink"
|
|
22
|
+
v-if="childItem.$scopedSlots.header"
|
|
23
|
+
:component="childItem"
|
|
24
|
+
name="header"
|
|
25
|
+
tag="a"
|
|
26
|
+
role="tab"
|
|
27
|
+
:id="`${childItem.value}-label`"
|
|
28
|
+
:aria-controls="`${childItem.value}-content`"
|
|
29
|
+
:aria-selected="`${childItem.isActive}`"
|
|
30
|
+
:tabindex="childItem.isActive ? 0 : -1"
|
|
31
|
+
@focus.native="currentFocus = childIdx"
|
|
32
|
+
@click.native="childClick(childItem)"
|
|
33
|
+
@keydown="manageTabKeydown($event, childItem)"
|
|
34
|
+
/>
|
|
35
|
+
<a
|
|
36
|
+
ref="tabLink"
|
|
37
|
+
v-else
|
|
38
|
+
role="tab"
|
|
39
|
+
:id="`${childItem.value}-tab`"
|
|
40
|
+
:aria-controls="`${childItem.value}-content`"
|
|
41
|
+
:aria-selected="`${childItem.isActive}`"
|
|
42
|
+
:tabindex="childItem.isActive ? 0 : -1"
|
|
43
|
+
@focus="currentFocus = childIdx"
|
|
44
|
+
@click="childClick(childItem)"
|
|
45
|
+
@keydown="manageTabKeydown($event, childItem)"
|
|
46
|
+
>
|
|
47
|
+
<b-icon
|
|
48
|
+
v-if="childItem.icon"
|
|
49
|
+
:icon="childItem.icon"
|
|
50
|
+
:pack="childItem.iconPack"
|
|
51
|
+
:size="size"/>
|
|
52
|
+
<span>{{ childItem.label }}</span>
|
|
53
|
+
</a>
|
|
54
|
+
</li>
|
|
55
|
+
</ul>
|
|
56
|
+
<slot name="end" />
|
|
57
|
+
</nav>
|
|
58
|
+
<section class="tab-content" :class="{'is-transitioning': isTransitioning}">
|
|
59
|
+
<slot/>
|
|
60
|
+
</section>
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
|
|
64
|
+
<script>
|
|
65
|
+
import config from '../../utils/config'
|
|
66
|
+
import TabbedMixin from '../../utils/TabbedMixin.js'
|
|
67
|
+
|
|
68
|
+
export default {
|
|
69
|
+
name: 'BTabs',
|
|
70
|
+
mixins: [TabbedMixin('tab')],
|
|
71
|
+
props: {
|
|
72
|
+
expanded: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: () => {
|
|
75
|
+
return config.defaultTabsExpanded
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
type: {
|
|
79
|
+
type: [String, Object],
|
|
80
|
+
default: () => {
|
|
81
|
+
return config.defaultTabsType
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
animated: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: () => {
|
|
87
|
+
return config.defaultTabsAnimated
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
multiline: Boolean
|
|
91
|
+
},
|
|
92
|
+
data() {
|
|
93
|
+
return {
|
|
94
|
+
currentFocus: this.value
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
computed: {
|
|
98
|
+
mainClasses() {
|
|
99
|
+
return {
|
|
100
|
+
'is-fullwidth': this.expanded,
|
|
101
|
+
'is-vertical': this.vertical,
|
|
102
|
+
'is-multiline': this.multiline,
|
|
103
|
+
[this.position]: this.position && this.vertical
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
navClasses() {
|
|
107
|
+
return [
|
|
108
|
+
this.type,
|
|
109
|
+
this.size,
|
|
110
|
+
{
|
|
111
|
+
[this.position]: this.position && !this.vertical,
|
|
112
|
+
'is-fullwidth': this.expanded,
|
|
113
|
+
'is-toggle': this.type === 'is-toggle-rounded'
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
methods: {
|
|
119
|
+
giveFocusToTab(tab) {
|
|
120
|
+
if (tab.$el && tab.$el.focus) {
|
|
121
|
+
tab.$el.focus()
|
|
122
|
+
} else if (tab.focus) {
|
|
123
|
+
tab.focus()
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
manageTablistKeydown(event) {
|
|
127
|
+
// https://developer.mozilla.org/fr/docs/Web/API/KeyboardEvent/key/Key_Values#Navigation_keys
|
|
128
|
+
const { key } = event
|
|
129
|
+
switch (key) {
|
|
130
|
+
case this.vertical ? 'ArrowUp' : 'ArrowLeft':
|
|
131
|
+
case this.vertical ? 'Up' : 'Left': {
|
|
132
|
+
let prevIdx = this.getPrevItemIdx(this.currentFocus, true)
|
|
133
|
+
if (prevIdx === null) {
|
|
134
|
+
// We try to give focus back to the last visible element
|
|
135
|
+
prevIdx = this.getPrevItemIdx(this.items.length, true)
|
|
136
|
+
}
|
|
137
|
+
if (
|
|
138
|
+
prevIdx !== null &&
|
|
139
|
+
this.$refs.tabLink &&
|
|
140
|
+
prevIdx < this.$refs.tabLink.length &&
|
|
141
|
+
!this.items[prevIdx].disabled
|
|
142
|
+
) {
|
|
143
|
+
this.giveFocusToTab(this.$refs.tabLink[prevIdx])
|
|
144
|
+
}
|
|
145
|
+
event.preventDefault()
|
|
146
|
+
break
|
|
147
|
+
}
|
|
148
|
+
case this.vertical ? 'ArrowDown' : 'ArrowRight':
|
|
149
|
+
case this.vertical ? 'Down' : 'Right': {
|
|
150
|
+
let nextIdx = this.getNextItemIdx(this.currentFocus, true)
|
|
151
|
+
if (nextIdx === null) {
|
|
152
|
+
// We try to give focus back to the first visible element
|
|
153
|
+
nextIdx = this.getNextItemIdx(-1, true)
|
|
154
|
+
}
|
|
155
|
+
if (
|
|
156
|
+
nextIdx !== null &&
|
|
157
|
+
this.$refs.tabLink &&
|
|
158
|
+
nextIdx < this.$refs.tabLink.length &&
|
|
159
|
+
!this.items[nextIdx].disabled
|
|
160
|
+
) {
|
|
161
|
+
this.giveFocusToTab(this.$refs.tabLink[nextIdx])
|
|
162
|
+
}
|
|
163
|
+
event.preventDefault()
|
|
164
|
+
break
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
|
|
169
|
+
manageTabKeydown(event, childItem) {
|
|
170
|
+
// https://developer.mozilla.org/fr/docs/Web/API/KeyboardEvent/key/Key_Values#Navigation_keys
|
|
171
|
+
const { key } = event
|
|
172
|
+
switch (key) {
|
|
173
|
+
case ' ':
|
|
174
|
+
case 'Space':
|
|
175
|
+
case 'Spacebar':
|
|
176
|
+
case 'Enter': {
|
|
177
|
+
this.childClick(childItem)
|
|
178
|
+
event.preventDefault()
|
|
179
|
+
break
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
</script>
|
|
@@ -6,35 +6,32 @@ exports[`BTimepicker render correctly 1`] = `
|
|
|
6
6
|
<b-dropdown-item-stub custom="true" focusable="true" ariarole="">
|
|
7
7
|
<b-field-stub grouped="true" position="is-centered" addons="true">
|
|
8
8
|
<b-select-stub usehtml5validation="true" statusicon="true" placeholder="00">
|
|
9
|
-
<option value="0">
|
|
10
|
-
00
|
|
11
|
-
</option>
|
|
12
9
|
<option value="1">
|
|
13
|
-
|
|
10
|
+
1
|
|
14
11
|
</option>
|
|
15
12
|
<option value="2">
|
|
16
|
-
|
|
13
|
+
2
|
|
17
14
|
</option>
|
|
18
15
|
<option value="3">
|
|
19
|
-
|
|
16
|
+
3
|
|
20
17
|
</option>
|
|
21
18
|
<option value="4">
|
|
22
|
-
|
|
19
|
+
4
|
|
23
20
|
</option>
|
|
24
21
|
<option value="5">
|
|
25
|
-
|
|
22
|
+
5
|
|
26
23
|
</option>
|
|
27
24
|
<option value="6">
|
|
28
|
-
|
|
25
|
+
6
|
|
29
26
|
</option>
|
|
30
27
|
<option value="7">
|
|
31
|
-
|
|
28
|
+
7
|
|
32
29
|
</option>
|
|
33
30
|
<option value="8">
|
|
34
|
-
|
|
31
|
+
8
|
|
35
32
|
</option>
|
|
36
33
|
<option value="9">
|
|
37
|
-
|
|
34
|
+
9
|
|
38
35
|
</option>
|
|
39
36
|
<option value="10">
|
|
40
37
|
10
|
|
@@ -42,42 +39,9 @@ exports[`BTimepicker render correctly 1`] = `
|
|
|
42
39
|
<option value="11">
|
|
43
40
|
11
|
|
44
41
|
</option>
|
|
45
|
-
<option value="
|
|
42
|
+
<option value="0">
|
|
46
43
|
12
|
|
47
44
|
</option>
|
|
48
|
-
<option value="13">
|
|
49
|
-
13
|
|
50
|
-
</option>
|
|
51
|
-
<option value="14">
|
|
52
|
-
14
|
|
53
|
-
</option>
|
|
54
|
-
<option value="15">
|
|
55
|
-
15
|
|
56
|
-
</option>
|
|
57
|
-
<option value="16">
|
|
58
|
-
16
|
|
59
|
-
</option>
|
|
60
|
-
<option value="17">
|
|
61
|
-
17
|
|
62
|
-
</option>
|
|
63
|
-
<option value="18">
|
|
64
|
-
18
|
|
65
|
-
</option>
|
|
66
|
-
<option value="19">
|
|
67
|
-
19
|
|
68
|
-
</option>
|
|
69
|
-
<option value="20">
|
|
70
|
-
20
|
|
71
|
-
</option>
|
|
72
|
-
<option value="21">
|
|
73
|
-
21
|
|
74
|
-
</option>
|
|
75
|
-
<option value="22">
|
|
76
|
-
22
|
|
77
|
-
</option>
|
|
78
|
-
<option value="23">
|
|
79
|
-
23
|
|
80
|
-
</option>
|
|
81
45
|
</b-select-stub> <span class="control is-colon">:</span>
|
|
82
46
|
<b-select-stub usehtml5validation="true" statusicon="true" placeholder="00">
|
|
83
47
|
<option value="0">
|
|
@@ -262,7 +226,14 @@ exports[`BTimepicker render correctly 1`] = `
|
|
|
262
226
|
</option>
|
|
263
227
|
</b-select-stub>
|
|
264
228
|
<!---->
|
|
265
|
-
|
|
229
|
+
<b-select-stub usehtml5validation="true" statusicon="true" value="AM">
|
|
230
|
+
<option value="AM">
|
|
231
|
+
AM
|
|
232
|
+
</option>
|
|
233
|
+
<option value="PM">
|
|
234
|
+
PM
|
|
235
|
+
</option>
|
|
236
|
+
</b-select-stub>
|
|
266
237
|
</b-field-stub>
|
|
267
238
|
<!---->
|
|
268
239
|
</b-dropdown-item-stub>
|
|
@@ -75,7 +75,7 @@ export default {
|
|
|
75
75
|
/**
|
|
76
76
|
* When v-model is changed:
|
|
77
77
|
* 1. Set internal value.
|
|
78
|
-
* 2. Reset
|
|
78
|
+
* 2. Reset internal input file value
|
|
79
79
|
* 3. If it's invalid, validate again.
|
|
80
80
|
*/
|
|
81
81
|
value(value) {
|
|
@@ -104,8 +104,15 @@ export default {
|
|
|
104
104
|
else {
|
|
105
105
|
const file = value[0]
|
|
106
106
|
if (this.checkType(file)) this.newValue = file
|
|
107
|
-
else if (this.newValue)
|
|
108
|
-
|
|
107
|
+
else if (this.newValue) {
|
|
108
|
+
this.newValue = null
|
|
109
|
+
this.clearInput()
|
|
110
|
+
} else {
|
|
111
|
+
// Force input back to empty state and recheck validity
|
|
112
|
+
this.clearInput()
|
|
113
|
+
this.checkHtml5Validity()
|
|
114
|
+
return
|
|
115
|
+
}
|
|
109
116
|
}
|
|
110
117
|
} else {
|
|
111
118
|
// always new values if native or undefined local
|
|
@@ -127,6 +134,13 @@ export default {
|
|
|
127
134
|
!this.dragDrop && this.checkHtml5Validity()
|
|
128
135
|
},
|
|
129
136
|
|
|
137
|
+
/*
|
|
138
|
+
* Reset file input value
|
|
139
|
+
*/
|
|
140
|
+
clearInput() {
|
|
141
|
+
this.$refs.input.value = null
|
|
142
|
+
},
|
|
143
|
+
|
|
130
144
|
/**
|
|
131
145
|
* Listen drag-drop to update internal variable
|
|
132
146
|
*/
|
|
@@ -149,10 +163,8 @@ export default {
|
|
|
149
163
|
if (type) {
|
|
150
164
|
if (type.substring(0, 1) === '.') {
|
|
151
165
|
// check extension
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
? file.name.substring(extIndex) : ''
|
|
155
|
-
if (extension.toLowerCase() === type.toLowerCase()) {
|
|
166
|
+
const extension = file.name.toLowerCase().slice(-type.length)
|
|
167
|
+
if (extension === type.toLowerCase()) {
|
|
156
168
|
valid = true
|
|
157
169
|
}
|
|
158
170
|
} else {
|
package/src/utils/NoticeMixin.js
CHANGED
|
@@ -126,11 +126,7 @@ export default {
|
|
|
126
126
|
},
|
|
127
127
|
|
|
128
128
|
showNotice() {
|
|
129
|
-
if (this.shouldQueue())
|
|
130
|
-
// Call recursively if should queue
|
|
131
|
-
setTimeout(() => this.showNotice(), 250)
|
|
132
|
-
return
|
|
133
|
-
}
|
|
129
|
+
if (this.shouldQueue()) this.correctParent.innerHTML = ''
|
|
134
130
|
this.correctParent.insertAdjacentElement('afterbegin', this.$el)
|
|
135
131
|
this.isActive = true
|
|
136
132
|
|
package/src/utils/config.js
CHANGED
|
@@ -31,7 +31,7 @@ let config = {
|
|
|
31
31
|
defaultModalScroll: null,
|
|
32
32
|
defaultDatepickerMobileNative: true,
|
|
33
33
|
defaultTimepickerMobileNative: true,
|
|
34
|
-
defaultNoticeQueue:
|
|
34
|
+
defaultNoticeQueue: false,
|
|
35
35
|
defaultInputHasCounter: true,
|
|
36
36
|
defaultTaginputHasCounter: true,
|
|
37
37
|
defaultUseHtml5Validation: true,
|
package/src/utils/helpers.js
CHANGED
|
@@ -174,6 +174,15 @@ export function escapeRegExpChars(value) {
|
|
|
174
174
|
// eslint-disable-next-line
|
|
175
175
|
return value.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&')
|
|
176
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
* Remove accents/diacritics in a string in JavaScript
|
|
179
|
+
* https://stackoverflow.com/a/37511463
|
|
180
|
+
*/
|
|
181
|
+
export function removeDiacriticsFromString(value) {
|
|
182
|
+
if (!value) return value
|
|
183
|
+
|
|
184
|
+
return value.normalize('NFD').replace(/[\u0300-\u036f]/g, '')
|
|
185
|
+
}
|
|
177
186
|
|
|
178
187
|
export function multiColumnSort(inputArray, sortingPriority) {
|
|
179
188
|
// clone it to prevent the any watchers from triggering every sorting iteration
|
|
@@ -289,3 +298,10 @@ export function isCustomElement(vm) {
|
|
|
289
298
|
}
|
|
290
299
|
|
|
291
300
|
export const isDefined = (d) => d !== undefined
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Checks if a value is null or undefined.
|
|
304
|
+
* Based on
|
|
305
|
+
* https://github.com/lodash/lodash/blob/master/isNil.js
|
|
306
|
+
*/
|
|
307
|
+
export const isNil = (value) => value !== null || value !== undefined
|
package/types/components.d.ts
CHANGED
|
@@ -303,6 +303,11 @@ declare type BModalConfig = {
|
|
|
303
303
|
*/
|
|
304
304
|
ariaModal?: boolean;
|
|
305
305
|
|
|
306
|
+
/**
|
|
307
|
+
* Aria label attribute to be passed to the close button for better accessibility.
|
|
308
|
+
*/
|
|
309
|
+
closeButtonAriaLabel?: string;
|
|
310
|
+
|
|
306
311
|
/**
|
|
307
312
|
* CSS classes to be applied on modal
|
|
308
313
|
*/
|