sprintify-ui 0.5.7 → 0.5.8

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": "sprintify-ui",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -1,6 +1,7 @@
1
1
  import { DateTime } from 'luxon';
2
2
  import PageDashboard from '../../.storybook/components/PageDashboard.vue';
3
3
  import BaseLayoutSidebarConfigurable from './BaseLayoutSidebarConfigurable.vue';
4
+ import { useSystemAlertStore } from '../stores/systemAlerts';
4
5
 
5
6
  export default {
6
7
  title: 'Layout/BaseLayoutSidebarConfigurable',
@@ -141,6 +142,13 @@ const Template = (args) => ({
141
142
  PageDashboard,
142
143
  },
143
144
  setup() {
145
+
146
+ const alerts = useSystemAlertStore();
147
+ alerts.push({
148
+ color: 'warning',
149
+ message: 'This is a warning message',
150
+ });
151
+
144
152
  return { args };
145
153
  },
146
154
  template: `
@@ -1,3 +1,4 @@
1
+ import { useSystemAlertStore } from '../stores/systemAlerts';
1
2
  import BaseContainer from './BaseContainer.vue';
2
3
  import BaseLayoutStackedConfigurable from './BaseLayoutStackedConfigurable.vue';
3
4
 
@@ -113,6 +114,13 @@ const Template = (args) => ({
113
114
  BaseContainer,
114
115
  },
115
116
  setup() {
117
+
118
+ const alerts = useSystemAlertStore();
119
+ alerts.push({
120
+ color: 'warning',
121
+ message: 'This is a warning message',
122
+ });
123
+
116
124
  return { args };
117
125
  },
118
126
  template: `
@@ -83,7 +83,7 @@
83
83
 
84
84
  <template #mobile>
85
85
  <!-- Links mobile -->
86
- <div class="space-y-0.5 p-2 pt-0">
86
+ <div class="space-y-0.5 p-2">
87
87
  <BaseNavbarSideItem
88
88
  v-for="item in menu"
89
89
  :key="item.label"
@@ -1,5 +1,11 @@
1
1
  <template>
2
- <nav :class="classInternal">
2
+ <nav
3
+ ref="navRef"
4
+ :class="classInternal"
5
+ :style="{
6
+ maxHeight: `${maxHeight}px`,
7
+ }"
8
+ >
3
9
  <BaseContainer size="7xl">
4
10
  <div
5
11
  :style="{
@@ -72,7 +78,7 @@ import { Icon as BaseIcon } from '@iconify/vue';
72
78
  import BaseContainer from './BaseContainer.vue';
73
79
  import { twMerge } from 'tailwind-merge';
74
80
  import { PropType } from 'vue';
75
- import { useWindowSize } from '@vueuse/core';
81
+ import { useElementBounding, useWindowSize } from '@vueuse/core';
76
82
  import { disableScroll, enableScroll } from '..';
77
83
 
78
84
  defineOptions({
@@ -140,7 +146,7 @@ const backgroundClass = computed(() => {
140
146
  const classInternal = computed(() => {
141
147
 
142
148
  const classes = [
143
- 'fixed flex flex-col top-0 left-0 w-full max-h-screen',
149
+ 'flex flex-col top-0 left-0 w-full',
144
150
  backgroundClass.value,
145
151
  ];
146
152
 
@@ -151,6 +157,13 @@ const classInternal = computed(() => {
151
157
  return twMerge(classes, props.class)
152
158
  })
153
159
 
160
+ const navRef = ref<HTMLElement | null>(null);
161
+ const navRefRect = useElementBounding(navRef);
162
+
163
+ const maxHeight = computed(() => {
164
+ return window.height.value - navRefRect.top.value;
165
+ });
166
+
154
167
  const showMobileMenu = ref(false);
155
168
 
156
169
  function toggleMenu() {