@vmz/ui 0.1.14 → 0.1.16

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 (57) hide show
  1. package/package.json +1 -1
  2. package/src/components/Accordion.vmz +13 -13
  3. package/src/components/Alert.vmz +4 -4
  4. package/src/components/AppShell.vmz +4 -4
  5. package/src/components/Autocomplete.vmz +22 -23
  6. package/src/components/Avatar.vmz +1 -1
  7. package/src/components/Badge.vmz +1 -1
  8. package/src/components/Breadcrumb.vmz +4 -4
  9. package/src/components/BulkActions.vmz +3 -3
  10. package/src/components/Button.vmz +9 -9
  11. package/src/components/Callout.vmz +4 -4
  12. package/src/components/Card.vmz +4 -4
  13. package/src/components/Checkbox.vmz +7 -7
  14. package/src/components/CodeBlock.vmz +3 -3
  15. package/src/components/Collapse.vmz +3 -3
  16. package/src/components/ConsoleShell.vmz +7 -7
  17. package/src/components/DataTable.vmz +23 -24
  18. package/src/components/DatePicker.vmz +33 -36
  19. package/src/components/Dialog.vmz +8 -8
  20. package/src/components/Divider.vmz +2 -2
  21. package/src/components/Drawer.vmz +8 -8
  22. package/src/components/Dropdown.vmz +2 -2
  23. package/src/components/Empty.vmz +2 -2
  24. package/src/components/Field.vmz +14 -14
  25. package/src/components/FilterBar.vmz +1 -1
  26. package/src/components/Flex.vmz +1 -1
  27. package/src/components/Form.vmz +7 -7
  28. package/src/components/FormItem.vmz +7 -7
  29. package/src/components/Grid.vmz +1 -1
  30. package/src/components/Icon.vmz +17 -17
  31. package/src/components/Link.vmz +3 -3
  32. package/src/components/List.vmz +12 -13
  33. package/src/components/Menu.vmz +14 -15
  34. package/src/components/Notification.vmz +4 -4
  35. package/src/components/Pagination.vmz +6 -6
  36. package/src/components/Popover.vmz +8 -8
  37. package/src/components/Progress.vmz +3 -3
  38. package/src/components/QueryForm.vmz +2 -2
  39. package/src/components/RadioGroup.vmz +17 -18
  40. package/src/components/Result.vmz +3 -3
  41. package/src/components/Segmented.vmz +6 -7
  42. package/src/components/Select.vmz +36 -36
  43. package/src/components/Skeleton.vmz +6 -6
  44. package/src/components/Space.vmz +1 -1
  45. package/src/components/Spinner.vmz +1 -1
  46. package/src/components/Steps.vmz +9 -10
  47. package/src/components/Switch.vmz +8 -8
  48. package/src/components/Table.vmz +13 -13
  49. package/src/components/Tabs.vmz +14 -15
  50. package/src/components/Tag.vmz +1 -1
  51. package/src/components/TextArea.vmz +12 -12
  52. package/src/components/Timeline.vmz +5 -5
  53. package/src/components/Toc.vmz +7 -8
  54. package/src/components/Tooltip.vmz +4 -4
  55. package/src/components/Tree.vmz +20 -21
  56. package/src/components/Typography.vmz +1 -1
  57. package/src/components/Upload.vmz +44 -45
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vmz/ui",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
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",
@@ -1,28 +1,28 @@
1
1
  <template>
2
- <div class="vmz-ui-accordion" data-vmz-ui="accordion" aria-label={label}>
3
- <div each={items} as="item" key={item.id} class="vmz-ui-accordion__item" data-vmz-accordion={item.id}>
2
+ <div class="vmz-ui-accordion" data-vmz-ui="accordion" :aria-label="label">
3
+ <div v-for="item in items" :key="item.id" class="vmz-ui-accordion__item" :data-vmz-accordion="item.id">
4
4
  <h3 class="vmz-ui-accordion__heading">
5
5
  <button
6
6
  type="button"
7
7
  class="vmz-ui-accordion__trigger"
8
- id={item.triggerId}
9
- data-vmz-accordion-trigger={item.id}
10
- aria-expanded={openId === item.id ? 'true' : 'false'}
11
- aria-controls={item.panelId}
12
- onClick={() => this.toggle(item.id)}
8
+ :id="item.triggerId"
9
+ :data-vmz-accordion-trigger="item.id"
10
+ :aria-expanded="openId === item.id ? 'true' : 'false'"
11
+ :aria-controls="item.panelId"
12
+ @click="() => this.toggle(item.id)"
13
13
  >
14
- {item.title}
14
+ {{ item.title }}
15
15
  </button>
16
16
  </h3>
17
17
  <div
18
- if={openId === item.id}
19
- id={item.panelId}
18
+ v-if="openId === item.id"
19
+ :id="item.panelId"
20
20
  class="vmz-ui-accordion__panel"
21
21
  role="region"
22
- data-vmz-accordion-panel={item.id}
23
- aria-labelledby={item.triggerId}
22
+ :data-vmz-accordion-panel="item.id"
23
+ :aria-labelledby="item.triggerId"
24
24
  >
25
- {item.body}
25
+ {{ item.body }}
26
26
  </div>
27
27
  </div>
28
28
  </div>
@@ -2,11 +2,11 @@
2
2
  <div
3
3
  class="vmz-ui-alert"
4
4
  data-vmz-ui="alert"
5
- data-tone={tone}
6
- role={roleName}
5
+ :data-tone="tone"
6
+ :role="roleName"
7
7
  >
8
- <p if={title} class="vmz-ui-alert__title">{title}</p>
9
- <p if={description} class="vmz-ui-alert__description">{description}</p>
8
+ <p v-if="title" class="vmz-ui-alert__title">{{ title }}</p>
9
+ <p v-if="description" class="vmz-ui-alert__description">{{ description }}</p>
10
10
  <div class="vmz-ui-alert__actions">
11
11
  <slot />
12
12
  </div>
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <div class="vmz-ui-app-shell" data-vmz-ui="app-shell">
3
3
  <header class="vmz-ui-app-shell__header" data-vmz-shell="header"><div class="vmz-ui-app-shell__header-inner">
4
- <a class="vmz-ui-app-shell__brand" href={homeHref}>{brand}</a>
5
- <nav class="vmz-ui-app-shell__nav" aria-label={navLabel}>
6
- <a each={nav} as="item" key={item.id} href={item.href} data-vmz-nav={item.id}>
7
- {item.title}
4
+ <a class="vmz-ui-app-shell__brand" :href="homeHref">{{ brand }}</a>
5
+ <nav class="vmz-ui-app-shell__nav" :aria-label="navLabel">
6
+ <a v-for="item in nav" :key="item.id" :href="item.href" :data-vmz-nav="item.id">
7
+ {{ item.title }}
8
8
  </a>
9
9
  </nav>
10
10
  </div></header>
@@ -2,49 +2,48 @@
2
2
  <div
3
3
  class="vmz-ui-autocomplete"
4
4
  data-vmz-ui="autocomplete"
5
- data-invalid={invalidAttr}
6
- data-open={openAttr}
5
+ :data-invalid="invalidAttr"
6
+ :data-open="openAttr"
7
7
  >
8
- <label if={label} class="vmz-ui-autocomplete__label" for={controlId}>{label}</label>
8
+ <label v-if="label" class="vmz-ui-autocomplete__label" :for="controlId">{{ label }}</label>
9
9
  <input
10
- id={controlId}
10
+ :id="controlId"
11
11
  class="vmz-ui-autocomplete__control"
12
12
  type="text"
13
13
  role="combobox"
14
14
  autocomplete="off"
15
15
  aria-autocomplete="list"
16
- aria-expanded={openAttr}
17
- aria-controls={listId}
18
- aria-invalid={error ? 'true' : 'false'}
19
- aria-describedby={describedBy}
20
- value={value}
21
- disabled={disabled}
22
- onInput={onInput}
23
- onKeyDown={onKeyDown}
16
+ :aria-expanded="openAttr"
17
+ :aria-controls="listId"
18
+ :aria-invalid="error ? 'true' : 'false'"
19
+ :aria-describedby="describedBy"
20
+ :value="value"
21
+ :disabled="disabled"
22
+ @input="onInput"
23
+ :onKeyDown="onKeyDown"
24
24
  />
25
25
  <ul
26
- if={listOpen}
27
- id={listId}
26
+ v-if="listOpen"
27
+ :id="listId"
28
28
  class="vmz-ui-autocomplete__list"
29
29
  role="listbox"
30
30
  data-vmz-autocomplete="list"
31
- onClick={onListClick}
31
+ @click="onListClick"
32
32
  >
33
33
  <li
34
- each={options}
35
- as="opt"
36
- key={opt.value}
34
+ v-for="opt in options"
35
+ :key="opt.value"
37
36
  class="vmz-ui-autocomplete__option"
38
37
  role="option"
39
- data-vmz-option={opt.value}
38
+ :data-vmz-option="opt.value"
40
39
  tabindex="-1"
41
40
  >
42
- {opt.label}
41
+ {{ opt.label }}
43
42
  </li>
44
43
  </ul>
45
- <p if={showEmpty} class="vmz-ui-autocomplete__empty" data-vmz-autocomplete="empty">{emptyText}</p>
46
- <p if={description} id={descriptionId} class="vmz-ui-autocomplete__description">{description}</p>
47
- <p if={error} id={errorId} class="vmz-ui-autocomplete__error" role="alert">{error}</p>
44
+ <p v-if="showEmpty" class="vmz-ui-autocomplete__empty" data-vmz-autocomplete="empty">{{ emptyText }}</p>
45
+ <p v-if="description" :id="descriptionId" class="vmz-ui-autocomplete__description">{{ description }}</p>
46
+ <p v-if="error" :id="errorId" class="vmz-ui-autocomplete__error" role="alert">{{ error }}</p>
48
47
  </div>
49
48
  </template>
50
49
 
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <span class="vmz-ui-avatar" data-vmz-ui="avatar" data-size={size} aria-label={label}><img if={src} src={src} alt="" /><span if={!src}>{text}</span></span>
2
+ <span class="vmz-ui-avatar" data-vmz-ui="avatar" :data-size="size" :aria-label="label"><img v-if="src" :src="src" alt="" /><span v-if="!src">{{ text }}</span></span>
3
3
  </template>
4
4
 
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <span class="vmz-ui-badge" data-vmz-ui="badge" data-tone={tone}>
2
+ <span class="vmz-ui-badge" data-vmz-ui="badge" :data-tone="tone">
3
3
  <slot />
4
4
  </span>
5
5
  </template>
@@ -1,9 +1,9 @@
1
1
  <template>
2
- <nav class="vmz-ui-breadcrumb" data-vmz-ui="breadcrumb" aria-label={label}>
2
+ <nav class="vmz-ui-breadcrumb" data-vmz-ui="breadcrumb" :aria-label="label">
3
3
  <ol class="vmz-ui-breadcrumb__list">
4
- <li each={items} as="item" key={item.id} class="vmz-ui-breadcrumb__item" data-vmz-crumb={item.id}>
5
- <a if={item.href} class="vmz-ui-breadcrumb__link" href={item.href}>{item.title}</a>
6
- <span if={!item.href} class="vmz-ui-breadcrumb__current" aria-current="page">{item.title}</span>
4
+ <li v-for="item in items" :key="item.id" class="vmz-ui-breadcrumb__item" :data-vmz-crumb="item.id">
5
+ <a v-if="item.href" class="vmz-ui-breadcrumb__link" :href="item.href">{{ item.title }}</a>
6
+ <span v-if="!item.href" class="vmz-ui-breadcrumb__current" aria-current="page">{{ item.title }}</span>
7
7
  </li>
8
8
  </ol>
9
9
  </nav>
@@ -1,12 +1,12 @@
1
1
  <template>
2
2
  <div
3
- if={selectedCount}
3
+ v-if="selectedCount"
4
4
  class="vmz-ui-bulk-actions"
5
5
  data-vmz-ui="bulk-actions"
6
6
  role="region"
7
- aria-label={label}
7
+ :aria-label="label"
8
8
  >
9
- <p class="vmz-ui-bulk-actions__count" data-vmz-fixture="bulk-count">{countLabel}</p>
9
+ <p class="vmz-ui-bulk-actions__count" data-vmz-fixture="bulk-count">{{ countLabel }}</p>
10
10
  <div class="vmz-ui-bulk-actions__actions">
11
11
  <slot />
12
12
  </div>
@@ -1,19 +1,19 @@
1
1
  <template>
2
2
  <button
3
- type={type}
3
+ :type="type"
4
4
  class="vmz-ui-btn"
5
5
  data-vmz-ui="button"
6
6
  data-vmz-motion="control"
7
7
  data-vmz-motion-token="motion.control"
8
- data-variant={variant}
9
- data-size={size}
10
- data-block={block ? 'true' : 'false'}
11
- data-loading={loading ? 'true' : 'false'}
12
- disabled={disabled}
13
- aria-busy={loading ? 'true' : 'false'}
14
- onClick={onClick}
8
+ :data-variant="variant"
9
+ :data-size="size"
10
+ :data-block="block ? 'true' : 'false'"
11
+ :data-loading="loading ? 'true' : 'false'"
12
+ :disabled="disabled"
13
+ :aria-busy="loading ? 'true' : 'false'"
14
+ @click="onClick"
15
15
  >
16
- <span if={loading} class="vmz-ui-btn__spinner" aria-hidden="true"></span>
16
+ <span v-if="loading" class="vmz-ui-btn__spinner" aria-hidden="true"></span>
17
17
  <slot />
18
18
  </button>
19
19
  </template>
@@ -2,11 +2,11 @@
2
2
  <aside
3
3
  class="vmz-ui-callout"
4
4
  data-vmz-ui="callout"
5
- data-tone={tone}
6
- role={roleName}
5
+ :data-tone="tone"
6
+ :role="roleName"
7
7
  >
8
- <p if={title} class="vmz-ui-callout__title">{title}</p>
9
- <p if={description} class="vmz-ui-callout__description">{description}</p>
8
+ <p v-if="title" class="vmz-ui-callout__title">{{ title }}</p>
9
+ <p v-if="description" class="vmz-ui-callout__description">{{ description }}</p>
10
10
  <div class="vmz-ui-callout__body">
11
11
  <slot />
12
12
  </div>
@@ -1,8 +1,8 @@
1
1
  <template>
2
- <section class="vmz-ui-card" data-vmz-ui="card" data-size={size} data-bordered={bordered ? 'true' : 'false'} data-hoverable={hoverable ? 'true' : 'false'}>
3
- <header if={title} class="vmz-ui-card__header">
4
- <h2 class="vmz-ui-card__title">{title}</h2>
5
- <p if={description} class="vmz-ui-card__description">{description}</p>
2
+ <section class="vmz-ui-card" data-vmz-ui="card" :data-size="size" :data-bordered="bordered ? 'true' : 'false'" :data-hoverable="hoverable ? 'true' : 'false'">
3
+ <header v-if="title" class="vmz-ui-card__header">
4
+ <h2 class="vmz-ui-card__title">{{ title }}</h2>
5
+ <p v-if="description" class="vmz-ui-card__description">{{ description }}</p>
6
6
  </header>
7
7
  <div class="vmz-ui-card__body">
8
8
  <slot />
@@ -1,15 +1,15 @@
1
1
  <template>
2
- <label class="vmz-ui-checkbox" data-vmz-ui="checkbox" for={controlId}>
2
+ <label class="vmz-ui-checkbox" data-vmz-ui="checkbox" :for="controlId">
3
3
  <input
4
- id={controlId}
4
+ :id="controlId"
5
5
  class="vmz-ui-checkbox__input"
6
6
  type="checkbox"
7
- checked={checked}
8
- disabled={disabled}
9
- aria-describedby={describedBy}
10
- onClick={onToggle}
7
+ :checked="checked"
8
+ :disabled="disabled"
9
+ :aria-describedby="describedBy"
10
+ @click="onToggle"
11
11
  />
12
- <span class="vmz-ui-checkbox__label">{label}</span>
12
+ <span class="vmz-ui-checkbox__label">{{ label }}</span>
13
13
  </label>
14
14
  </template>
15
15
 
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <figure class="vmz-ui-code-block" data-vmz-ui="code-block">
3
3
  <div class="vmz-ui-code-block__bar">
4
- <figcaption if={caption} class="vmz-ui-code-block__caption">{caption}</figcaption>
5
- <Button type="button" variant="ghost" onClick={onCopy}>{copyLabel}</Button>
4
+ <figcaption v-if="caption" class="vmz-ui-code-block__caption">{{ caption }}</figcaption>
5
+ <Button type="button" variant="ghost" @click="onCopy">{{ copyLabel }}</Button>
6
6
  </div>
7
- <pre class="vmz-ui-code-block__pre"><code class="vmz-ui-code-block__code">{code}</code></pre>
7
+ <pre class="vmz-ui-code-block__pre"><code class="vmz-ui-code-block__code">{{ code }}</code></pre>
8
8
  </figure>
9
9
  </template>
10
10
 
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <div class="vmz-ui-collapse" data-vmz-ui="collapse">
3
- <details each={items} as="item" key={item.id}>
4
- <summary>{item.title}</summary>
5
- <div class="vmz-ui-collapse__body">{item.body}</div>
3
+ <details v-for="item in items" :key="item.id">
4
+ <summary>{{ item.title }}</summary>
5
+ <div class="vmz-ui-collapse__body">{{ item.body }}</div>
6
6
  </details>
7
7
  </div>
8
8
  </template>
@@ -1,22 +1,22 @@
1
1
  <template>
2
2
  <div class="vmz-ui-console-shell" data-vmz-ui="console-shell">
3
- <aside class="vmz-ui-console-shell__sidebar" data-vmz-shell="sidebar" aria-label={navLabel}>
4
- <a class="vmz-ui-console-shell__brand" href={homeHref}>{brand}</a>
3
+ <aside class="vmz-ui-console-shell__sidebar" data-vmz-shell="sidebar" :aria-label="navLabel">
4
+ <a class="vmz-ui-console-shell__brand" :href="homeHref">{{ brand }}</a>
5
5
  <nav class="vmz-ui-console-shell__nav">
6
- <a each={nav} as="item" key={item.id} href={item.href} data-vmz-nav={item.id}>
7
- {item.title}
6
+ <a v-for="item in nav" :key="item.id" :href="item.href" :data-vmz-nav="item.id">
7
+ {{ item.title }}
8
8
  </a>
9
9
  </nav>
10
10
  </aside>
11
11
  <div class="vmz-ui-console-shell__body">
12
12
  <header class="vmz-ui-console-shell__header" data-vmz-shell="header">
13
- <h1 class="vmz-ui-console-shell__title">{title}</h1>
13
+ <h1 class="vmz-ui-console-shell__title">{{ title }}</h1>
14
14
  </header>
15
15
  <main class="vmz-ui-console-shell__main" data-vmz-shell="main">
16
16
  <slot />
17
17
  </main>
18
- <footer if={footer} class="vmz-ui-console-shell__footer" data-vmz-shell="footer">
19
- {footer}
18
+ <footer v-if="footer" class="vmz-ui-console-shell__footer" data-vmz-shell="footer">
19
+ {{ footer }}
20
20
  </footer>
21
21
  </div>
22
22
  </div>
@@ -2,56 +2,55 @@
2
2
  <div
3
3
  class="vmz-ui-datatable-wrap"
4
4
  data-vmz-ui="data-table"
5
- data-sort-key={sortKey}
6
- data-sort-dir={sortDir}
7
- data-selected-count={selectedCount}
5
+ :data-sort-key="sortKey"
6
+ :data-sort-dir="sortDir"
7
+ :data-selected-count="selectedCount"
8
8
  >
9
9
  <table class="vmz-ui-datatable">
10
- <thead onClick={onHeadClick}>
10
+ <thead @click="onHeadClick">
11
11
  <tr>
12
12
  <th scope="col" class="vmz-ui-datatable__check">
13
13
  <input
14
14
  type="checkbox"
15
15
  class="vmz-ui-datatable__box"
16
16
  data-vmz-select-all="true"
17
- aria-label={selectAllLabel}
18
- checked={allSelected}
17
+ :aria-label="selectAllLabel"
18
+ :checked="allSelected"
19
19
  />
20
20
  </th>
21
- <th each={columns} as="col" key={col.id} scope="col" data-vmz-col={col.id}>
22
- <button type="button" class="vmz-ui-datatable__sort" data-vmz-sort={col.id}>
23
- {col.title}
21
+ <th v-for="col in columns" :key="col.id" scope="col" :data-vmz-col="col.id">
22
+ <button type="button" class="vmz-ui-datatable__sort" :data-vmz-sort="col.id">
23
+ {{ col.title }}
24
24
  </button>
25
25
  </th>
26
- <th if={hasRowAction} scope="col">{actionTitle}</th>
26
+ <th v-if="hasRowAction" scope="col">{{ actionTitle }}</th>
27
27
  </tr>
28
28
  </thead>
29
- <tbody onClick={onBodyClick}>
29
+ <tbody @click="onBodyClick">
30
30
  <tr
31
- each={rows}
32
- as="row"
33
- key={row.id}
34
- data-vmz-row={row.id}
35
- data-selected={row.selectedAttr}
31
+ v-for="row in rows"
32
+ :key="row.id"
33
+ :data-vmz-row="row.id"
34
+ :data-selected="row.selectedAttr"
36
35
  >
37
36
  <td class="vmz-ui-datatable__check">
38
37
  <input
39
38
  type="checkbox"
40
39
  class="vmz-ui-datatable__box"
41
- data-vmz-select={row.id}
42
- aria-label={row.selectLabel}
43
- checked={row.selected}
40
+ :data-vmz-select="row.id"
41
+ :aria-label="row.selectLabel"
42
+ :checked="row.selected"
44
43
  />
45
44
  </td>
46
- <td each={row.cells} as="cell">{cell}</td>
47
- <td if={hasRowAction}>
45
+ <td v-for="cell in row.cells">{{ cell }}</td>
46
+ <td v-if="hasRowAction">
48
47
  <button
49
48
  type="button"
50
49
  class="vmz-ui-datatable__row-action"
51
- data-vmz-row-action={row.id}
52
- disabled={rowActionDisabled}
50
+ :data-vmz-row-action="row.id"
51
+ :disabled="rowActionDisabled"
53
52
  >
54
- {actionLabel}
53
+ {{ actionLabel }}
55
54
  </button>
56
55
  </td>
57
56
  </tr>
@@ -1,40 +1,40 @@
1
1
  <template>
2
2
  <div
3
- class={'vmz-ui-date-picker' + (open ? ' is-opened' : '')}
3
+ :class="'vmz-ui-date-picker' + (open ? ' is-opened' : '')"
4
4
  data-vmz-ui="date-picker"
5
- data-mode={mode}
6
- data-invalid={invalidAttr}
5
+ :data-mode="mode"
6
+ :data-invalid="invalidAttr"
7
7
  >
8
- <label if={label} class="vmz-ui-date-picker__label" for={controlId}>{label}</label>
8
+ <label v-if="label" class="vmz-ui-date-picker__label" :for="controlId">{{ label }}</label>
9
9
  <button
10
10
  type="button"
11
- id={controlId}
11
+ :id="controlId"
12
12
  class="vmz-ui-date-picker__control"
13
- disabled={disabled}
13
+ :disabled="disabled"
14
14
  aria-haspopup="dialog"
15
- aria-expanded={open ? 'true' : 'false'}
16
- aria-controls={panelId}
17
- aria-invalid={error ? 'true' : 'false'}
18
- aria-describedby={describedBy}
19
- onClick={toggle}
20
- onKeyDown={onTriggerKeyDown}
15
+ :aria-expanded="open ? 'true' : 'false'"
16
+ :aria-controls="panelId"
17
+ :aria-invalid="error ? 'true' : 'false'"
18
+ :aria-describedby="describedBy"
19
+ @click="toggle"
20
+ :onKeyDown="onTriggerKeyDown"
21
21
  >
22
- <span class="vmz-ui-date-picker__value" data-vmz-date="value">{displayLabel}</span>
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>
24
24
  </button>
25
25
  <div
26
- if={open}
27
- id={panelId}
26
+ v-if="open"
27
+ :id="panelId"
28
28
  class="vmz-ui-date-picker__panel"
29
29
  role="dialog"
30
30
  aria-modal="false"
31
- aria-label={panelLabel}
31
+ :aria-label="panelLabel"
32
32
  tabindex="-1"
33
33
  data-vmz-overlay="date-picker"
34
34
  data-vmz-overlay-owner="date-picker"
35
35
  data-vmz-focus="enter"
36
36
  data-vmz-date="panel"
37
- onKeyDown={onPanelKeyDown}
37
+ :onKeyDown="onPanelKeyDown"
38
38
  >
39
39
  <div class="vmz-ui-date-picker__monthbar">
40
40
  <button
@@ -42,45 +42,42 @@
42
42
  class="vmz-ui-date-picker__nav"
43
43
  data-vmz-date="prev"
44
44
  aria-label="Previous month"
45
- onClick={prevMonth}
45
+ @click="prevMonth"
46
46
  >‹</button>
47
- <p class="vmz-ui-date-picker__month" data-vmz-date="month">{monthLabel}</p>
47
+ <p class="vmz-ui-date-picker__month" data-vmz-date="month">{{ monthLabel }}</p>
48
48
  <button
49
49
  type="button"
50
50
  class="vmz-ui-date-picker__nav"
51
51
  data-vmz-date="next"
52
52
  aria-label="Next month"
53
- onClick={nextMonth}
53
+ @click="nextMonth"
54
54
  >›</button>
55
55
  </div>
56
56
  <div class="vmz-ui-date-picker__weekdays" aria-hidden="true">
57
57
  <span>Mo</span><span>Tu</span><span>We</span><span>Th</span><span>Fr</span><span>Sa</span><span>Su</span>
58
58
  </div>
59
- <div class="vmz-ui-date-picker__grid" role="grid" aria-labelledby={panelId}>
59
+ <div class="vmz-ui-date-picker__grid" role="grid" :aria-labelledby="panelId">
60
60
  <button
61
- each={days}
62
- as="day"
63
- key={day.key}
61
+ v-for="day in days"
62
+ :key="day.key"
64
63
  type="button"
65
64
  role="gridcell"
66
- class={
67
- 'vmz-ui-date-picker__day' +
65
+ :class="'vmz-ui-date-picker__day' +
68
66
  (day.inMonth ? '' : ' is-outside') +
69
67
  (day.selected ? ' is-on' : '') +
70
68
  (day.inRange ? ' is-in-range' : '') +
71
69
  (day.rangeEdge ? ' is-range-edge' : '') +
72
- (day.disabled ? ' is-disabled' : '')
73
- }
74
- data-vmz-date-iso={day.iso}
75
- aria-selected={day.selected ? 'true' : 'false'}
76
- aria-disabled={day.disabled ? 'true' : 'false'}
77
- disabled={day.disabled}
78
- onClick={onDayClick}
79
- >{day.label}</button>
70
+ (day.disabled ? ' is-disabled' : '')"
71
+ :data-vmz-date-iso="day.iso"
72
+ :aria-selected="day.selected ? 'true' : 'false'"
73
+ :aria-disabled="day.disabled ? 'true' : 'false'"
74
+ :disabled="day.disabled"
75
+ @click="onDayClick"
76
+ >{{ day.label }}</button>
80
77
  </div>
81
78
  </div>
82
- <p if={description} id={descriptionId} class="vmz-ui-date-picker__description">{description}</p>
83
- <p if={error} id={errorId} class="vmz-ui-date-picker__error" role="alert">{error}</p>
79
+ <p v-if="description" :id="descriptionId" class="vmz-ui-date-picker__description">{{ description }}</p>
80
+ <p v-if="error" :id="errorId" class="vmz-ui-date-picker__error" role="alert">{{ error }}</p>
84
81
  </div>
85
82
  </template>
86
83
 
@@ -2,40 +2,40 @@
2
2
  <div
3
3
  class="vmz-ui-dialog-root"
4
4
  data-vmz-ui="dialog"
5
- data-vmz-overlay-open={open}
5
+ :data-vmz-overlay-open="open"
6
6
  >
7
7
  <div
8
- if={open}
8
+ v-if="open"
9
9
  class="vmz-ui-dialog"
10
10
  data-vmz-overlay="dialog"
11
11
  data-vmz-overlay-owner="dialog"
12
- data-vmz-overlay-stack={stackLevel}
12
+ :data-vmz-overlay-stack="stackLevel"
13
13
  >
14
14
  <button
15
15
  type="button"
16
16
  class="vmz-ui-dialog__backdrop"
17
17
  data-vmz-overlay-layer="backdrop"
18
18
  aria-label="Dismiss dialog"
19
- onClick={dismiss}
19
+ @click="dismiss"
20
20
  ></button>
21
21
  <div
22
22
  class="vmz-ui-dialog__panel"
23
23
  role="dialog"
24
24
  aria-modal="true"
25
- aria-labelledby={titleId}
25
+ :aria-labelledby="titleId"
26
26
  tabindex="-1"
27
27
  data-vmz-overlay-layer="panel"
28
28
  data-vmz-focus="enter"
29
29
  data-vmz-motion="overlay-enter"
30
30
  data-vmz-motion-token="motion.overlay"
31
- onKeyDown={onPanelKeyDown}
31
+ :onKeyDown="onPanelKeyDown"
32
32
  >
33
- <h2 id={titleId} class="vmz-ui-dialog__title">{title}</h2>
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" onClick={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>
@@ -1,6 +1,6 @@
1
1
  <template>
2
- <div class="vmz-ui-divider" data-vmz-ui="divider" data-direction={direction} role="separator">
3
- <span if={label}>{label}</span>
2
+ <div class="vmz-ui-divider" data-vmz-ui="divider" :data-direction="direction" role="separator">
3
+ <span v-if="label">{{ label }}</span>
4
4
  </div>
5
5
  </template>
6
6
  <style>