@vmz/ui 0.1.31 → 0.2.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/package.json +1 -1
- package/src/components/Accordion.vmz +1 -1
- package/src/components/Autocomplete.vmz +3 -3
- package/src/components/Button.vmz +2 -2
- package/src/components/Checkbox.vmz +1 -1
- package/src/components/CodeBlock.vmz +1 -1
- package/src/components/DataTable.vmz +2 -2
- package/src/components/DatePicker.vmz +6 -6
- package/src/components/Dialog.vmz +3 -3
- package/src/components/Drawer.vmz +3 -3
- package/src/components/Field.vmz +1 -1
- package/src/components/Form.vmz +2 -2
- package/src/components/List.vmz +2 -2
- package/src/components/Menu.vmz +4 -4
- package/src/components/Pagination.vmz +2 -2
- package/src/components/Popover.vmz +3 -3
- package/src/components/QueryForm.vmz +1 -1
- package/src/components/RadioGroup.vmz +1 -1
- package/src/components/Segmented.vmz +1 -1
- package/src/components/Select.vmz +7 -7
- package/src/components/Switch.vmz +2 -2
- package/src/components/Table.vmz +2 -2
- package/src/components/Tabs.vmz +2 -2
- package/src/components/TextArea.vmz +1 -1
- package/src/components/Tree.vmz +2 -2
- package/src/components/Upload.vmz +7 -7
package/package.json
CHANGED
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
:aria-describedby="describedBy"
|
|
20
20
|
:value="value"
|
|
21
21
|
:disabled="disabled"
|
|
22
|
-
@input="
|
|
23
|
-
:onKeyDown="
|
|
22
|
+
@input="onDomInput"
|
|
23
|
+
:onKeyDown="onKeyDown"
|
|
24
24
|
/>
|
|
25
25
|
<ul
|
|
26
26
|
v-if="listOpen"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
class="vmz-ui-autocomplete__list"
|
|
29
29
|
role="listbox"
|
|
30
30
|
data-vmz-autocomplete="list"
|
|
31
|
-
@click="
|
|
31
|
+
@click="onListClick"
|
|
32
32
|
>
|
|
33
33
|
<li
|
|
34
34
|
v-for="opt in options"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
:href="href"
|
|
12
12
|
:target="target"
|
|
13
13
|
:rel="rel"
|
|
14
|
-
@click="
|
|
14
|
+
@click="onDomClick"
|
|
15
15
|
>
|
|
16
16
|
<span v-if="loading" class="vmz-ui-btn__spinner" aria-hidden="true"></span>
|
|
17
17
|
<slot />
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
:data-loading="loading ? 'true' : 'false'"
|
|
30
30
|
:disabled="disabled"
|
|
31
31
|
:aria-busy="loading ? 'true' : 'false'"
|
|
32
|
-
@click="
|
|
32
|
+
@click="onDomClick"
|
|
33
33
|
>
|
|
34
34
|
<span v-if="loading" class="vmz-ui-btn__spinner" aria-hidden="true"></span>
|
|
35
35
|
<slot />
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<figure class="vmz-ui-code-block" data-vmz-ui="code-block">
|
|
3
3
|
<div class="vmz-ui-code-block__bar">
|
|
4
4
|
<figcaption v-if="caption" class="vmz-ui-code-block__caption">{{ caption }}</figcaption>
|
|
5
|
-
<Button type="button" variant="ghost" @click="
|
|
5
|
+
<Button type="button" variant="ghost" @click="onCopy">{{ copyLabel }}</Button>
|
|
6
6
|
</div>
|
|
7
7
|
<pre class="vmz-ui-code-block__pre"><code class="vmz-ui-code-block__code">{{ code }}</code></pre>
|
|
8
8
|
</figure>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:data-selected-count="selectedCount"
|
|
8
8
|
>
|
|
9
9
|
<table class="vmz-ui-datatable">
|
|
10
|
-
<thead @click="
|
|
10
|
+
<thead @click="onHeadClick">
|
|
11
11
|
<tr>
|
|
12
12
|
<th scope="col" class="vmz-ui-datatable__check">
|
|
13
13
|
<input
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<th v-if="hasRowAction" scope="col">{{ actionTitle }}</th>
|
|
27
27
|
</tr>
|
|
28
28
|
</thead>
|
|
29
|
-
<tbody @click="
|
|
29
|
+
<tbody @click="onBodyClick">
|
|
30
30
|
<tr
|
|
31
31
|
v-for="row in rows"
|
|
32
32
|
:key="row.id"
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
:aria-controls="panelId"
|
|
17
17
|
:aria-invalid="error ? 'true' : 'false'"
|
|
18
18
|
:aria-describedby="describedBy"
|
|
19
|
-
@click="
|
|
20
|
-
:onKeyDown="
|
|
19
|
+
@click="toggle"
|
|
20
|
+
:onKeyDown="onTriggerKeyDown"
|
|
21
21
|
>
|
|
22
22
|
<span class="vmz-ui-date-picker__value" data-vmz-date="value">{{ displayLabel }}</span>
|
|
23
23
|
<span class="vmz-ui-date-picker__chev" aria-hidden="true"></span>
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
data-vmz-overlay-owner="date-picker"
|
|
35
35
|
data-vmz-focus="enter"
|
|
36
36
|
data-vmz-date="panel"
|
|
37
|
-
:onKeyDown="
|
|
37
|
+
:onKeyDown="onPanelKeyDown"
|
|
38
38
|
>
|
|
39
39
|
<div class="vmz-ui-date-picker__monthbar">
|
|
40
40
|
<button
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
class="vmz-ui-date-picker__nav"
|
|
43
43
|
data-vmz-date="prev"
|
|
44
44
|
aria-label="Previous month"
|
|
45
|
-
@click="
|
|
45
|
+
@click="prevMonth"
|
|
46
46
|
>‹</button>
|
|
47
47
|
<p class="vmz-ui-date-picker__month" data-vmz-date="month">{{ monthLabel }}</p>
|
|
48
48
|
<button
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
class="vmz-ui-date-picker__nav"
|
|
51
51
|
data-vmz-date="next"
|
|
52
52
|
aria-label="Next month"
|
|
53
|
-
@click="
|
|
53
|
+
@click="nextMonth"
|
|
54
54
|
>›</button>
|
|
55
55
|
</div>
|
|
56
56
|
<div class="vmz-ui-date-picker__weekdays" aria-hidden="true">
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
:aria-selected="day.selected ? 'true' : 'false'"
|
|
73
73
|
:aria-disabled="day.disabled ? 'true' : 'false'"
|
|
74
74
|
:disabled="day.disabled"
|
|
75
|
-
@click="
|
|
75
|
+
@click="onDayClick"
|
|
76
76
|
>{{ day.label }}</button>
|
|
77
77
|
</div>
|
|
78
78
|
</div>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
class="vmz-ui-dialog__backdrop"
|
|
17
17
|
data-vmz-overlay-layer="backdrop"
|
|
18
18
|
aria-label="Dismiss dialog"
|
|
19
|
-
@click="
|
|
19
|
+
@click="dismiss"
|
|
20
20
|
></button>
|
|
21
21
|
<div
|
|
22
22
|
class="vmz-ui-dialog__panel"
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
data-vmz-focus="enter"
|
|
29
29
|
data-vmz-motion="overlay-enter"
|
|
30
30
|
data-vmz-motion-token="motion.overlay"
|
|
31
|
-
:onKeyDown="
|
|
31
|
+
:onKeyDown="onPanelKeyDown"
|
|
32
32
|
>
|
|
33
33
|
<h2 :id="titleId" class="vmz-ui-dialog__title">{{ title }}</h2>
|
|
34
34
|
<div class="vmz-ui-dialog__body">
|
|
35
35
|
<slot />
|
|
36
36
|
</div>
|
|
37
37
|
<div class="vmz-ui-dialog__actions">
|
|
38
|
-
<button type="button" class="vmz-ui-dialog__close" data-vmz-focus="close" @click="
|
|
38
|
+
<button type="button" class="vmz-ui-dialog__close" data-vmz-focus="close" @click="dismiss">
|
|
39
39
|
Close
|
|
40
40
|
</button>
|
|
41
41
|
</div>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
class="vmz-ui-drawer__backdrop"
|
|
17
17
|
data-vmz-overlay-layer="backdrop"
|
|
18
18
|
aria-label="Dismiss drawer"
|
|
19
|
-
@click="
|
|
19
|
+
@click="dismiss"
|
|
20
20
|
></button>
|
|
21
21
|
<div
|
|
22
22
|
class="vmz-ui-drawer__panel"
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
data-vmz-focus="enter"
|
|
29
29
|
data-vmz-motion="overlay-enter"
|
|
30
30
|
data-vmz-motion-token="motion.overlay"
|
|
31
|
-
:onKeyDown="
|
|
31
|
+
:onKeyDown="onPanelKeyDown"
|
|
32
32
|
>
|
|
33
33
|
<h2 :id="titleId" class="vmz-ui-drawer__title">{{ title }}</h2>
|
|
34
34
|
<div class="vmz-ui-drawer__body">
|
|
35
35
|
<slot />
|
|
36
36
|
</div>
|
|
37
37
|
<div class="vmz-ui-drawer__actions">
|
|
38
|
-
<button type="button" class="vmz-ui-drawer__close" data-vmz-focus="close" @click="
|
|
38
|
+
<button type="button" class="vmz-ui-drawer__close" data-vmz-focus="close" @click="dismiss">
|
|
39
39
|
Close
|
|
40
40
|
</button>
|
|
41
41
|
</div>
|
package/src/components/Field.vmz
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
:disabled="disabled"
|
|
13
13
|
:aria-invalid="error ? 'true' : 'false'"
|
|
14
14
|
:aria-describedby="describedBy"
|
|
15
|
-
@input="
|
|
15
|
+
@input="onDomInput"
|
|
16
16
|
/>
|
|
17
17
|
<p v-if="description" :id="descriptionId" class="vmz-ui-field__description">{{ description }}</p>
|
|
18
18
|
<p v-if="error" :id="errorId" class="vmz-ui-field__error" role="alert">{{ error }}</p>
|
package/src/components/Form.vmz
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
data-novalidate="true"
|
|
7
7
|
:aria-label="label"
|
|
8
8
|
:aria-describedby="describedBy"
|
|
9
|
-
@submit="
|
|
10
|
-
@reset="
|
|
9
|
+
@submit="onSubmitGuard"
|
|
10
|
+
@reset="onResetGuard"
|
|
11
11
|
>
|
|
12
12
|
<div v-if="errorSummary" :id="summaryId" class="vmz-ui-form__summary" role="alert" data-vmz-form="summary">
|
|
13
13
|
{{ errorSummary }}
|
package/src/components/List.vmz
CHANGED
package/src/components/Menu.vmz
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
aria-haspopup="menu"
|
|
8
8
|
:aria-expanded="open ? 'true' : 'false'"
|
|
9
9
|
:aria-controls="menuId"
|
|
10
|
-
@click="
|
|
11
|
-
:onKeyDown="
|
|
10
|
+
@click="toggle"
|
|
11
|
+
:onKeyDown="onTriggerKeyDown"
|
|
12
12
|
>
|
|
13
13
|
{{ label }}
|
|
14
14
|
</button>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
data-vmz-overlay-owner="menu"
|
|
22
22
|
data-vmz-focus="enter"
|
|
23
23
|
tabindex="-1"
|
|
24
|
-
:onKeyDown="
|
|
24
|
+
:onKeyDown="onMenuKeyDown"
|
|
25
25
|
>
|
|
26
26
|
<button
|
|
27
27
|
v-for="item in items"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
class="vmz-ui-menu__item"
|
|
31
31
|
role="menuitem"
|
|
32
32
|
:data-vmz-menu-item="item.id"
|
|
33
|
-
@click="
|
|
33
|
+
@click="onItemClick"
|
|
34
34
|
>
|
|
35
35
|
{{ item.title }}
|
|
36
36
|
</button>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
type="button"
|
|
5
5
|
class="vmz-ui-pagination__btn"
|
|
6
6
|
:disabled="prevDisabled"
|
|
7
|
-
@click="
|
|
7
|
+
@click="onPrevClick"
|
|
8
8
|
>
|
|
9
9
|
Previous
|
|
10
10
|
</button>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
type="button"
|
|
14
14
|
class="vmz-ui-pagination__btn"
|
|
15
15
|
:disabled="nextDisabled"
|
|
16
|
-
@click="
|
|
16
|
+
@click="onNextClick"
|
|
17
17
|
>
|
|
18
18
|
Next
|
|
19
19
|
</button>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
class="vmz-ui-popover__backdrop"
|
|
17
17
|
data-vmz-overlay-layer="backdrop"
|
|
18
18
|
aria-label="Dismiss popover"
|
|
19
|
-
@click="
|
|
19
|
+
@click="dismiss"
|
|
20
20
|
></button>
|
|
21
21
|
<div
|
|
22
22
|
class="vmz-ui-popover__panel"
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
tabindex="-1"
|
|
27
27
|
data-vmz-overlay-layer="panel"
|
|
28
28
|
data-vmz-focus="enter"
|
|
29
|
-
:onKeyDown="
|
|
29
|
+
:onKeyDown="onPanelKeyDown"
|
|
30
30
|
>
|
|
31
31
|
<h2 :id="titleId" class="vmz-ui-popover__title">{{ title }}</h2>
|
|
32
32
|
<div class="vmz-ui-popover__body">
|
|
33
33
|
<slot />
|
|
34
34
|
</div>
|
|
35
35
|
<div class="vmz-ui-popover__actions">
|
|
36
|
-
<button type="button" class="vmz-ui-popover__close" data-vmz-focus="close" @click="
|
|
36
|
+
<button type="button" class="vmz-ui-popover__close" data-vmz-focus="close" @click="dismiss">
|
|
37
37
|
Close
|
|
38
38
|
</button>
|
|
39
39
|
</div>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:disabled="disabled"
|
|
8
8
|
>
|
|
9
9
|
<legend class="vmz-ui-radio-group__legend">{{ label }}</legend>
|
|
10
|
-
<div class="vmz-ui-radio-group__list" role="radiogroup" :aria-label="label" @click="
|
|
10
|
+
<div class="vmz-ui-radio-group__list" role="radiogroup" :aria-label="label" @click="onListClick">
|
|
11
11
|
<label
|
|
12
12
|
v-for="item in items"
|
|
13
13
|
:key="item.value"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
:aria-invalid="error ? 'true' : 'false'"
|
|
20
20
|
:aria-describedby="describedBy"
|
|
21
21
|
:aria-multiselectable="isMultiple ? 'true' : 'false'"
|
|
22
|
-
@click="
|
|
23
|
-
:onKeyDown="
|
|
22
|
+
@click="toggle"
|
|
23
|
+
:onKeyDown="onTriggerKeyDown"
|
|
24
24
|
>
|
|
25
25
|
<span class="vmz-ui-select__value">{{ displayLabel }}</span>
|
|
26
26
|
<span class="vmz-ui-select__chev" aria-hidden="true"></span>
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
:value="searchQuery"
|
|
42
42
|
:placeholder="searchPlaceholder"
|
|
43
43
|
:aria-label="searchPlaceholder"
|
|
44
|
-
@input="
|
|
45
|
-
:onKeyDown="
|
|
44
|
+
@input="onSearchInput"
|
|
45
|
+
:onKeyDown="onSearchKeyDown"
|
|
46
46
|
/>
|
|
47
47
|
</div>
|
|
48
48
|
<ul
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
role="listbox"
|
|
51
51
|
:aria-multiselectable="isMultiple ? 'true' : 'false'"
|
|
52
52
|
tabindex="-1"
|
|
53
|
-
:onKeyDown="
|
|
53
|
+
:onKeyDown="onListKeyDown"
|
|
54
54
|
>
|
|
55
55
|
<li v-if="showEmpty" class="vmz-ui-select__empty" role="presentation">{{ emptyText }}</li>
|
|
56
56
|
<li v-for="opt in visibleOptions" :key="opt.value" role="presentation">
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
role="option"
|
|
61
61
|
:data-vmz-option="opt.value"
|
|
62
62
|
:aria-selected="opt.selected ? 'true' : 'false'"
|
|
63
|
-
@click="
|
|
63
|
+
@click="onOptionClick"
|
|
64
64
|
>{{ opt.label }}</button>
|
|
65
65
|
</li>
|
|
66
66
|
</ul>
|
|
67
67
|
<div v-if="isMultiple" class="vmz-ui-select__footer">
|
|
68
|
-
<button type="button" class="vmz-ui-select__done" data-vmz-select="done" @click="
|
|
68
|
+
<button type="button" class="vmz-ui-select__done" data-vmz-select="done" @click="close">Done</button>
|
|
69
69
|
</div>
|
|
70
70
|
</div>
|
|
71
71
|
<p v-if="description" :id="descriptionId" class="vmz-ui-select__description">{{ description }}</p>
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
:aria-checked="checked"
|
|
9
9
|
:aria-describedby="describedBy"
|
|
10
10
|
:disabled="disabled"
|
|
11
|
-
@click="
|
|
12
|
-
:onKeyDown="
|
|
11
|
+
@click="toggle"
|
|
12
|
+
:onKeyDown="onKeyDown"
|
|
13
13
|
>
|
|
14
14
|
<span class="vmz-ui-switch__thumb" aria-hidden="true"></span>
|
|
15
15
|
</button>
|
package/src/components/Table.vmz
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="vmz-ui-table-wrap" data-vmz-ui="table" :data-sort-key="sortKey" :data-sort-dir="sortDir">
|
|
3
3
|
<table class="vmz-ui-table">
|
|
4
|
-
<thead @click="
|
|
4
|
+
<thead @click="onHeadClick">
|
|
5
5
|
<tr>
|
|
6
6
|
<th v-for="col in columns" :key="col.id" scope="col" :data-vmz-col="col.id">
|
|
7
7
|
<button type="button" class="vmz-ui-table__sort" :data-vmz-sort="col.id">
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<th v-if="hasRowAction" scope="col">{{ actionTitle }}</th>
|
|
12
12
|
</tr>
|
|
13
13
|
</thead>
|
|
14
|
-
<tbody @click="
|
|
14
|
+
<tbody @click="onBodyClick">
|
|
15
15
|
<tr v-for="row in rows" :key="row.id" :data-vmz-row="row.id">
|
|
16
16
|
<td v-for="cell in row.cells">{{ cell }}</td>
|
|
17
17
|
<td v-if="hasRowAction">
|
package/src/components/Tabs.vmz
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
:readonly="readonly"
|
|
11
11
|
:aria-invalid="error ? 'true' : 'false'"
|
|
12
12
|
:aria-describedby="describedBy"
|
|
13
|
-
@input="
|
|
13
|
+
@input="onDomInput"
|
|
14
14
|
></textarea>
|
|
15
15
|
<p v-if="description" :id="descriptionId" class="vmz-ui-textarea__description">{{ description }}</p>
|
|
16
16
|
<p v-if="error" :id="errorId" class="vmz-ui-textarea__error" role="alert">{{ error }}</p>
|
package/src/components/Tree.vmz
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
:data-invalid="invalidAttr"
|
|
11
11
|
:data-vmz-upload-status="status"
|
|
12
12
|
:data-progress="progress"
|
|
13
|
-
:onDragEnter="
|
|
14
|
-
:onDragOver="
|
|
15
|
-
:onDragLeave="
|
|
16
|
-
:onDrop="
|
|
13
|
+
:onDragEnter="onDragEnter"
|
|
14
|
+
:onDragOver="onDragOver"
|
|
15
|
+
:onDragLeave="onDragLeave"
|
|
16
|
+
:onDrop="onDrop"
|
|
17
17
|
>
|
|
18
18
|
<label v-if="label" class="vmz-ui-upload__label" :for="controlId">{{ label }}</label>
|
|
19
19
|
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
:aria-invalid="error ? 'true' : 'false'"
|
|
29
29
|
:aria-describedby="describedBy"
|
|
30
30
|
:data-vmz-upload-directory="directoryAttr"
|
|
31
|
-
@change="
|
|
31
|
+
@change="onPick"
|
|
32
32
|
/>
|
|
33
33
|
<p class="vmz-ui-upload__hint" data-vmz-upload="hint">{{ zoneHint }}</p>
|
|
34
34
|
</div>
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
<p v-if="resultText" class="vmz-ui-upload__result" data-vmz-upload="result">{{ resultText }}</p>
|
|
59
59
|
|
|
60
60
|
<div v-if="showActions" class="vmz-ui-upload__actions" data-vmz-upload="actions">
|
|
61
|
-
<button v-if="canCancel" type="button" class="vmz-ui-upload__cancel" data-vmz-upload="cancel" @click="
|
|
61
|
+
<button v-if="canCancel" type="button" class="vmz-ui-upload__cancel" data-vmz-upload="cancel" @click="onCancelClick">
|
|
62
62
|
{{ cancelLabel }}
|
|
63
63
|
</button>
|
|
64
|
-
<button v-if="canResume" type="button" class="vmz-ui-upload__resume" data-vmz-upload="resume" @click="
|
|
64
|
+
<button v-if="canResume" type="button" class="vmz-ui-upload__resume" data-vmz-upload="resume" @click="onResumeClick">
|
|
65
65
|
{{ resumeLabel }}
|
|
66
66
|
</button>
|
|
67
67
|
</div>
|