@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vmz/ui",
3
- "version": "0.1.31",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "description": "VMZ UI — official UI framework (component contracts + semantic token requirements). Not a theme. Not a plugin.",
6
6
  "license": "MIT",
@@ -9,7 +9,7 @@
9
9
  :data-vmz-accordion-trigger="item.id"
10
10
  :aria-expanded="openId === item.id ? 'true' : 'false'"
11
11
  :aria-controls="item.panelId"
12
- @click="() => this.toggle(item.id)"
12
+ @click="() => toggle(item.id)"
13
13
  >
14
14
  {{ item.title }}
15
15
  </button>
@@ -19,8 +19,8 @@
19
19
  :aria-describedby="describedBy"
20
20
  :value="value"
21
21
  :disabled="disabled"
22
- @input="this.onDomInput"
23
- :onKeyDown="this.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="this.onListClick"
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="this.onDomClick"
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="this.onDomClick"
32
+ @click="onDomClick"
33
33
  >
34
34
  <span v-if="loading" class="vmz-ui-btn__spinner" aria-hidden="true"></span>
35
35
  <slot />
@@ -7,7 +7,7 @@
7
7
  :checked="checked"
8
8
  :disabled="disabled"
9
9
  :aria-describedby="describedBy"
10
- @click="this.onToggle"
10
+ @click="onToggle"
11
11
  />
12
12
  <span class="vmz-ui-checkbox__label">{{ label }}</span>
13
13
  </label>
@@ -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="this.onCopy">{{ copyLabel }}</Button>
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="this.onHeadClick">
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="this.onBodyClick">
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="this.toggle"
20
- :onKeyDown="this.onTriggerKeyDown"
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="this.onPanelKeyDown"
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="this.prevMonth"
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="this.nextMonth"
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="this.onDayClick"
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="this.dismiss"
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="this.onPanelKeyDown"
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="this.dismiss">
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="this.dismiss"
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="this.onPanelKeyDown"
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="this.dismiss">
38
+ <button type="button" class="vmz-ui-drawer__close" data-vmz-focus="close" @click="dismiss">
39
39
  Close
40
40
  </button>
41
41
  </div>
@@ -12,7 +12,7 @@
12
12
  :disabled="disabled"
13
13
  :aria-invalid="error ? 'true' : 'false'"
14
14
  :aria-describedby="describedBy"
15
- @input="this.onDomInput"
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>
@@ -6,8 +6,8 @@
6
6
  data-novalidate="true"
7
7
  :aria-label="label"
8
8
  :aria-describedby="describedBy"
9
- @submit="this.onSubmitGuard"
10
- @reset="this.onResetGuard"
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 }}
@@ -6,8 +6,8 @@
6
6
  role="listbox"
7
7
  :aria-labelledby="labelId"
8
8
  :aria-label="label"
9
- @click="this.onListClick"
10
- :onKeyDown="this.onListKeyDown"
9
+ @click="onListClick"
10
+ :onKeyDown="onListKeyDown"
11
11
  >
12
12
  <li
13
13
  v-for="item in items"
@@ -7,8 +7,8 @@
7
7
  aria-haspopup="menu"
8
8
  :aria-expanded="open ? 'true' : 'false'"
9
9
  :aria-controls="menuId"
10
- @click="this.toggle"
11
- :onKeyDown="this.onTriggerKeyDown"
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="this.onMenuKeyDown"
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="this.onItemClick"
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="this.onPrevClick"
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="this.onNextClick"
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="this.dismiss"
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="this.onPanelKeyDown"
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="this.dismiss">
36
+ <button type="button" class="vmz-ui-popover__close" data-vmz-focus="close" @click="dismiss">
37
37
  Close
38
38
  </button>
39
39
  </div>
@@ -4,7 +4,7 @@
4
4
  data-vmz-ui="query-form"
5
5
  data-dense="true"
6
6
  :aria-label="label"
7
- @submit="this.onSubmitGuard"
7
+ @submit="onSubmitGuard"
8
8
  >
9
9
  <slot />
10
10
  </form>
@@ -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="this.onListClick">
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"
@@ -6,7 +6,7 @@
6
6
  type="button"
7
7
  :data-vmz-segment="opt.value"
8
8
  :aria-pressed="opt.value === value ? 'true' : 'false'"
9
- @click="() => this.onPick(opt.value)"
9
+ @click="() => onPick(opt.value)"
10
10
  >{{ opt.label }}</button>
11
11
  </div>
12
12
  </template>
@@ -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="this.toggle"
23
- :onKeyDown="this.onTriggerKeyDown"
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="this.onSearchInput"
45
- :onKeyDown="this.onSearchKeyDown"
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="this.onListKeyDown"
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="this.onOptionClick"
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="this.close">Done</button>
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="this.toggle"
12
- :onKeyDown="this.onKeyDown"
11
+ @click="toggle"
12
+ :onKeyDown="onKeyDown"
13
13
  >
14
14
  <span class="vmz-ui-switch__thumb" aria-hidden="true"></span>
15
15
  </button>
@@ -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="this.onHeadClick">
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="this.onBodyClick">
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">
@@ -4,8 +4,8 @@
4
4
  class="vmz-ui-tabs__list"
5
5
  role="tablist"
6
6
  :aria-label="label"
7
- :onKeyDown="this.onListKeyDown"
8
- @click="this.onListClick"
7
+ :onKeyDown="onListKeyDown"
8
+ @click="onListClick"
9
9
  >
10
10
  <button
11
11
  v-for="item in items"
@@ -10,7 +10,7 @@
10
10
  :readonly="readonly"
11
11
  :aria-invalid="error ? 'true' : 'false'"
12
12
  :aria-describedby="describedBy"
13
- @input="this.onDomInput"
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>
@@ -6,8 +6,8 @@
6
6
  role="tree"
7
7
  :aria-labelledby="labelId"
8
8
  :aria-label="label"
9
- @click="this.onTreeClick"
10
- :onKeyDown="this.onTreeKeyDown"
9
+ @click="onTreeClick"
10
+ :onKeyDown="onTreeKeyDown"
11
11
  >
12
12
  <li
13
13
  v-for="item in items"
@@ -10,10 +10,10 @@
10
10
  :data-invalid="invalidAttr"
11
11
  :data-vmz-upload-status="status"
12
12
  :data-progress="progress"
13
- :onDragEnter="this.onDragEnter"
14
- :onDragOver="this.onDragOver"
15
- :onDragLeave="this.onDragLeave"
16
- :onDrop="this.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="this.onPick"
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="this.onCancelClick">
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="this.onResumeClick">
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>