sprintify-ui 0.10.70 → 0.10.72

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.
@@ -11,6 +11,10 @@ import { RouteLocationRaw } from 'vue-router';
11
11
  declare const sectionLabelClasses: import("vue").ComputedRef<string[]>;
12
12
  declare function onNotificationClick(notification: Notification): void;
13
13
  declare function onNotificationOpen(): void;
14
+ declare const windowSize: {
15
+ width: import("vue").Ref<number>;
16
+ height: import("vue").Ref<number>;
17
+ };
14
18
  declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
15
19
  declare var __VLS_11: {}, __VLS_27: {};
16
20
  type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
@@ -64,6 +68,7 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
64
68
  sectionLabelClasses: typeof sectionLabelClasses;
65
69
  onNotificationClick: typeof onNotificationClick;
66
70
  onNotificationOpen: typeof onNotificationOpen;
71
+ windowSize: typeof windowSize;
67
72
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
68
73
  "notification:click": (...args: any[]) => void;
69
74
  "notification:open": (...args: any[]) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.10.70",
3
+ "version": "0.10.72",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "rimraf dist && vue-tsc && vite build",
@@ -11,11 +11,11 @@ const breadcrumbs = [
11
11
  to: "/users",
12
12
  },
13
13
  {
14
- label: "John Doe",
14
+ label: "Very long title this is a very long title that will be truncated Very long title this is a very long title that will be truncated",
15
15
  to: "/users/1",
16
16
  },
17
17
  {
18
- label: "Very long title this is a very long title that will be truncated",
18
+ label: "Very long title this is a very long title that will be truncated Very long title this is a very long title that will be truncated",
19
19
  to: "/users/1/settings",
20
20
  },
21
21
  ];
@@ -2,18 +2,19 @@
2
2
  <div>
3
3
  <nav
4
4
  v-if="breadcrumbs.length > 0"
5
- class="hidden sm:flex"
5
+ class="hidden overflow-hidden w-full sm:flex"
6
6
  aria-label="Breadcrumb"
7
7
  >
8
8
  <ol
9
9
  role="list"
10
- class="flex items-center space-x-2"
10
+ class="flex items-center space-x-2 w-full overflow-hidden"
11
11
  >
12
12
  <li
13
13
  v-for="(breadcrumb, index) in breadcrumbs"
14
14
  :key="index"
15
+ class="overflow-hidden"
15
16
  >
16
- <div class="flex items-center">
17
+ <div class="flex items-center overflow-hidden">
17
18
  <div
18
19
  v-if="index > 0"
19
20
  class="text-gray-300"
@@ -29,7 +30,7 @@
29
30
  >
30
31
  <a
31
32
  :href="href"
32
- class="text-sm"
33
+ class="text-sm overflow-hidden"
33
34
  :class="[
34
35
  { 'ml-2': index > 0 },
35
36
  isExactActive
@@ -46,9 +47,10 @@
46
47
  </span>
47
48
  <span
48
49
  v-else
49
- :class="{ 'text-sm': size == 'md', 'text-xs': size == 'sm' }"
50
+ class="truncate block"
51
+ :class="{ 'text-sm': size == 'md', 'text-xs': size == 'sm', 'max-w-[140px]': index < breadcrumbs.length - 1, }"
50
52
  >
51
- {{ truncate(breadcrumb.label) }}
53
+ {{ breadcrumb.label }}
52
54
  </span>
53
55
  </a>
54
56
  </RouterLink>
@@ -60,9 +62,9 @@
60
62
  <RouterLink
61
63
  v-if="mobileBreadcrumb"
62
64
  :to="mobileBreadcrumb.to"
63
- class="block text-slate-600 sm:hidden"
65
+ class="block text-slate-600 sm:hidden overflow-hidden"
64
66
  >
65
- <div class="flex items-center">
67
+ <div class="flex items-center overflow-hidden">
66
68
  <svg
67
69
  class="-ml-1 mr-1 h-5 w-5 flex-shrink-0 text-slate-500"
68
70
  viewBox="0 0 20 20"
@@ -75,7 +77,10 @@
75
77
  clip-rule="evenodd"
76
78
  ></path>
77
79
  </svg>
78
- <span :class="{ 'text-sm': size == 'md', 'text-xs': size == 'sm' }">
80
+ <span
81
+ class="truncate"
82
+ :class="{ 'text-sm': size == 'md', 'text-xs': size == 'sm' }"
83
+ >
79
84
  {{ mobileBreadcrumb.label }}
80
85
  </span>
81
86
  </div>
@@ -103,7 +103,7 @@
103
103
  <BaseAvatar
104
104
  :user="user"
105
105
  :size="size"
106
- show-details
106
+ :show-details="windowSize.width.value >= 640"
107
107
  />
108
108
  </div>
109
109
  </template>
@@ -130,6 +130,7 @@ import BaseLayoutSidebar from './BaseLayoutSidebar.vue';
130
130
  import BaseMenu from './BaseMenu.vue';
131
131
  import BaseNavbarSideItem from './BaseNavbarSideItem.vue';
132
132
  import { RouteLocationRaw } from 'vue-router';
133
+ import { useWindowSize } from '@vueuse/core';
133
134
 
134
135
  const emit = defineEmits(['notification:click', 'notification:open']);
135
136
 
@@ -199,4 +200,6 @@ function onNotificationClick(notification: Notification) {
199
200
  function onNotificationOpen() {
200
201
  emit('notification:open');
201
202
  }
203
+
204
+ const windowSize = useWindowSize();
202
205
  </script>