frappe-ui 0.1.87 → 0.1.88

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": "frappe-ui",
3
- "version": "0.1.87",
3
+ "version": "0.1.88",
4
4
  "description": "A set of components and utilities for rapid UI development",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
@@ -31,22 +31,38 @@
31
31
  class="flex min-w-0 items-center overflow-hidden text-ellipsis whitespace-nowrap"
32
32
  >
33
33
  <template v-for="(item, i) in crumbs" :key="item.label">
34
- <component
35
- :is="item.route ? 'router-link' : 'button'"
34
+ <router-link
35
+ v-if="item.route"
36
+ :to="item.route"
36
37
  class="flex items-center rounded px-0.5 py-1 text-lg font-medium focus:outline-none focus-visible:ring-2 focus-visible:ring-outline-gray-3"
37
38
  :class="[
38
39
  i == crumbs.length - 1
39
40
  ? 'text-ink-gray-9'
40
41
  : 'text-ink-gray-5 hover:text-ink-gray-7',
41
42
  ]"
42
- v-bind="item.route ? { to: item.route } : { onClick: item.onClick }"
43
43
  >
44
44
  <slot name="prefix" :item="item" />
45
45
  <span>
46
46
  {{ item.label }}
47
47
  </span>
48
48
  <slot name="suffix" :item="item" />
49
- </component>
49
+ </router-link>
50
+ <button
51
+ v-else
52
+ class="flex items-center rounded px-0.5 py-1 text-lg font-medium focus:outline-none focus-visible:ring-2 focus-visible:ring-outline-gray-3"
53
+ :class="[
54
+ i == crumbs.length - 1
55
+ ? 'text-ink-gray-9'
56
+ : 'text-ink-gray-5 hover:text-ink-gray-7',
57
+ ]"
58
+ @click="item.onClick"
59
+ >
60
+ <slot name="prefix" :item="item" />
61
+ <span>
62
+ {{ item.label }}
63
+ </span>
64
+ <slot name="suffix" :item="item" />
65
+ </button>
50
66
  <span
51
67
  v-if="i != crumbs.length - 1"
52
68
  class="mx-0.5 text-base text-ink-gray-4"