sprintify-ui 0.0.196 → 0.0.197

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.
@@ -10,11 +10,11 @@ declare const _default: import("vue").DefineComponent<{
10
10
  };
11
11
  size: {
12
12
  default: string;
13
- type: StringConstructor;
13
+ type: PropType<"xs" | "sm" | "md">;
14
14
  };
15
15
  color: {
16
16
  default: string;
17
- type: PropType<"danger" | "dark" | "light" | "white" | "primary">;
17
+ type: PropType<"success" | "danger" | "warning" | "dark" | "light" | "white" | "primary">;
18
18
  };
19
19
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
20
20
  count: {
@@ -27,15 +27,15 @@ declare const _default: import("vue").DefineComponent<{
27
27
  };
28
28
  size: {
29
29
  default: string;
30
- type: StringConstructor;
30
+ type: PropType<"xs" | "sm" | "md">;
31
31
  };
32
32
  color: {
33
33
  default: string;
34
- type: PropType<"danger" | "dark" | "light" | "white" | "primary">;
34
+ type: PropType<"success" | "danger" | "warning" | "dark" | "light" | "white" | "primary">;
35
35
  };
36
36
  }>>, {
37
- color: "danger" | "dark" | "light" | "white" | "primary";
38
- size: string;
37
+ color: "success" | "danger" | "warning" | "dark" | "light" | "white" | "primary";
38
+ size: "xs" | "sm" | "md";
39
39
  maxDigit: number;
40
40
  }>;
41
41
  export default _default;
@@ -9,6 +9,10 @@ declare const _default: import("vue").DefineComponent<{
9
9
  default: boolean;
10
10
  type: BooleanConstructor;
11
11
  };
12
+ size: {
13
+ default: string;
14
+ type: PropType<"xs" | "sm" | "md">;
15
+ };
12
16
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "open")[], "click" | "open", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
13
17
  notificationsConfig: {
14
18
  required: true;
@@ -18,10 +22,15 @@ declare const _default: import("vue").DefineComponent<{
18
22
  default: boolean;
19
23
  type: BooleanConstructor;
20
24
  };
25
+ size: {
26
+ default: string;
27
+ type: PropType<"xs" | "sm" | "md">;
28
+ };
21
29
  }>> & {
22
30
  onClick?: ((...args: any[]) => any) | undefined;
23
31
  onOpen?: ((...args: any[]) => any) | undefined;
24
32
  }, {
25
33
  dark: boolean;
34
+ size: "xs" | "sm" | "md";
26
35
  }>;
27
36
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { PropType } from 'vue';
1
2
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
2
3
  appName: {
3
4
  default: string;
@@ -11,6 +12,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
11
12
  default: boolean;
12
13
  type: BooleanConstructor;
13
14
  };
15
+ size: {
16
+ default: string;
17
+ type: PropType<"xs" | "sm" | "md">;
18
+ };
14
19
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
15
20
  appName: {
16
21
  default: string;
@@ -24,8 +29,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
24
29
  default: boolean;
25
30
  type: BooleanConstructor;
26
31
  };
32
+ size: {
33
+ default: string;
34
+ type: PropType<"xs" | "sm" | "md">;
35
+ };
27
36
  }>>, {
28
37
  dark: boolean;
38
+ size: "xs" | "sm" | "md";
29
39
  appName: string;
30
40
  logoUrl: string;
31
41
  }>, {
@@ -30,6 +30,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
30
30
  default: boolean;
31
31
  type: BooleanConstructor;
32
32
  };
33
+ size: {
34
+ default: string;
35
+ type: PropType<"xs" | "sm" | "md">;
36
+ };
33
37
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("notification:click" | "notification:open")[], "notification:click" | "notification:open", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
34
38
  appName: {
35
39
  default: string;
@@ -59,12 +63,17 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
59
63
  default: boolean;
60
64
  type: BooleanConstructor;
61
65
  };
66
+ size: {
67
+ default: string;
68
+ type: PropType<"xs" | "sm" | "md">;
69
+ };
62
70
  }>> & {
63
71
  "onNotification:click"?: ((...args: any[]) => any) | undefined;
64
72
  "onNotification:open"?: ((...args: any[]) => any) | undefined;
65
73
  }, {
66
74
  dark: boolean;
67
75
  notifications: NotificationsConfig;
76
+ size: "xs" | "sm" | "md";
68
77
  appName: string;
69
78
  logoUrl: string;
70
79
  }>, {
@@ -1,3 +1,4 @@
1
+ import { PropType } from 'vue';
1
2
  declare const _default: import("vue").DefineComponent<{
2
3
  label: {
3
4
  default: undefined;
@@ -19,6 +20,10 @@ declare const _default: import("vue").DefineComponent<{
19
20
  default: boolean;
20
21
  type: BooleanConstructor;
21
22
  };
23
+ size: {
24
+ default: string;
25
+ type: PropType<"sm" | "md">;
26
+ };
22
27
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
23
28
  label: {
24
29
  default: undefined;
@@ -40,11 +45,16 @@ declare const _default: import("vue").DefineComponent<{
40
45
  default: boolean;
41
46
  type: BooleanConstructor;
42
47
  };
48
+ size: {
49
+ default: string;
50
+ type: PropType<"sm" | "md">;
51
+ };
43
52
  }>>, {
44
53
  label: string;
45
54
  active: boolean;
46
55
  icon: string;
47
56
  dark: boolean;
48
57
  count: number;
58
+ size: "sm" | "md";
49
59
  }>;
50
60
  export default _default;
@@ -13,6 +13,10 @@ declare const _default: import("vue").DefineComponent<{
13
13
  default: string;
14
14
  type: PropType<"toggle" | "always">;
15
15
  };
16
+ size: {
17
+ default: string;
18
+ type: PropType<"xs" | "sm" | "md">;
19
+ };
16
20
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
17
21
  item: {
18
22
  required: true;
@@ -26,10 +30,15 @@ declare const _default: import("vue").DefineComponent<{
26
30
  default: string;
27
31
  type: PropType<"toggle" | "always">;
28
32
  };
33
+ size: {
34
+ default: string;
35
+ type: PropType<"xs" | "sm" | "md">;
36
+ };
29
37
  }>> & {
30
38
  onClick?: ((...args: any[]) => any) | undefined;
31
39
  }, {
32
40
  dark: boolean;
41
+ size: "xs" | "sm" | "md";
33
42
  actionsVisible: "toggle" | "always";
34
43
  }>;
35
44
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { PropType } from 'vue';
1
2
  declare const _default: import("vue").DefineComponent<{
2
3
  label: {
3
4
  default: undefined;
@@ -19,6 +20,10 @@ declare const _default: import("vue").DefineComponent<{
19
20
  default: boolean;
20
21
  type: BooleanConstructor;
21
22
  };
23
+ size: {
24
+ default: string;
25
+ type: PropType<"xs" | "sm" | "md">;
26
+ };
22
27
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
23
28
  label: {
24
29
  default: undefined;
@@ -40,11 +45,16 @@ declare const _default: import("vue").DefineComponent<{
40
45
  default: boolean;
41
46
  type: BooleanConstructor;
42
47
  };
48
+ size: {
49
+ default: string;
50
+ type: PropType<"xs" | "sm" | "md">;
51
+ };
43
52
  }>>, {
44
53
  label: string;
45
54
  active: boolean;
46
55
  icon: string;
47
56
  dark: boolean;
48
57
  count: number;
58
+ size: "xs" | "sm" | "md";
49
59
  }>;
50
60
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.0.196",
3
+ "version": "0.0.197",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -84,7 +84,7 @@ const textSizeClass = computed((): string => {
84
84
  const base = 'text-sm';
85
85
 
86
86
  if (props.size == 'xs') {
87
- return 'text-xs';
87
+ return 'text-[11px]';
88
88
  }
89
89
  if (props.size == 'sm') {
90
90
  return 'text-xs';
@@ -30,3 +30,18 @@ Demo.args = {
30
30
  count: 355,
31
31
  maxDigit: 2,
32
32
  };
33
+
34
+ export const SizeXS = Template.bind({});
35
+ SizeXS.args = {
36
+ size: 'xs',
37
+ };
38
+
39
+ export const SizeSM = Template.bind({});
40
+ SizeSM.args = {
41
+ size: 'sm',
42
+ };
43
+
44
+ export const SizeMD = Template.bind({});
45
+ SizeMD.args = {
46
+ size: 'md',
47
+ };
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- class="inline-flex h-4 w-auto items-center justify-center rounded-full px-1.5"
3
+ class="inline-flex w-auto items-center justify-center rounded-full"
4
4
  :class="[sizeClass, colorClass]"
5
5
  >
6
6
  {{ countLabel }}
@@ -22,11 +22,13 @@ const props = defineProps({
22
22
  },
23
23
  size: {
24
24
  default: 'sm',
25
- type: String,
25
+ type: String as PropType<'xs' | 'sm' | 'md'>,
26
26
  },
27
27
  color: {
28
28
  default: 'danger',
29
- type: String as PropType<'danger' | 'primary' | 'dark' | 'light' | 'white'>,
29
+ type: String as PropType<
30
+ 'danger' | 'primary' | 'success' | 'warning' | 'dark' | 'light' | 'white'
31
+ >,
30
32
  },
31
33
  });
32
34
 
@@ -43,21 +45,27 @@ const countLabel = computed((): string => {
43
45
 
44
46
  const sizeClass = computed((): string => {
45
47
  if (props.size == 'xs') {
46
- return 'text-[10px]';
48
+ return 'text-[10px] px-1 h-[14px]';
47
49
  }
48
50
  if (props.size == 'sm') {
49
- return 'text-xs';
51
+ return 'text-xs px-1.5 h-4';
50
52
  }
51
- if (props.size == 'base') {
52
- return 'text-sm';
53
+ if (props.size == 'md') {
54
+ return 'text-sm px-1.5 h-5';
53
55
  }
54
- return 'text-xs';
56
+ return 'text-xs px-1.5 h-4';
55
57
  });
56
58
 
57
59
  const colorClass = computed((): string => {
58
60
  if (props.color == 'danger') {
59
61
  return 'bg-red-500 text-white';
60
62
  }
63
+ if (props.color == 'warning') {
64
+ return 'bg-yellow-400 text-white';
65
+ }
66
+ if (props.color == 'success') {
67
+ return 'bg-green-500 text-white';
68
+ }
61
69
  if (props.color == 'primary') {
62
70
  return 'bg-primary-500 text-white';
63
71
  }
@@ -6,18 +6,15 @@
6
6
  >
7
7
  <template #button="{ open }">
8
8
  <div
9
- class="relative flex items-center rounded-full p-1.5"
10
- :class="[open ? '' : '']"
9
+ class="relative flex items-center rounded-md p-1.5 hover:bg-slate-100"
10
+ :class="[open ? 'bg-slate-100' : '']"
11
11
  @click="onOpen"
12
12
  >
13
- <BaseIcon
14
- icon="heroicons:bell"
15
- class="h-6 w-6"
16
- :class="[dark ? 'text-slate-300' : 'text-slate-600']"
17
- ></BaseIcon>
13
+ <BaseIcon icon="fa-solid:bell" :class="[iconClasses]"></BaseIcon>
18
14
  <BaseCounter
19
15
  v-if="notificationsConfig.items.length"
20
16
  class="absolute top-0 right-0"
17
+ :size="counterSize"
21
18
  :count="notificationsConfig.items.length"
22
19
  ></BaseCounter>
23
20
  </div>
@@ -87,7 +84,7 @@ import { Notification } from '@/types/Notification';
87
84
 
88
85
  const emit = defineEmits(['click', 'open']);
89
86
 
90
- defineProps({
87
+ const props = defineProps({
91
88
  notificationsConfig: {
92
89
  required: true,
93
90
  type: Object as PropType<NotificationsConfig>,
@@ -96,6 +93,10 @@ defineProps({
96
93
  default: false,
97
94
  type: Boolean,
98
95
  },
96
+ size: {
97
+ default: 'md',
98
+ type: String as PropType<'xs' | 'sm' | 'md'>,
99
+ },
99
100
  });
100
101
 
101
102
  const breakpoints = useBreakpoints();
@@ -111,4 +112,34 @@ function onClick(notification: Notification) {
111
112
  function onOpen() {
112
113
  emit('open');
113
114
  }
115
+
116
+ const iconClasses = computed(() => {
117
+ const classList = [''];
118
+
119
+ if (props.dark) {
120
+ classList.push('text-slate-300');
121
+ } else {
122
+ classList.push('text-slate-600');
123
+ }
124
+
125
+ if (props.size == 'xs') {
126
+ classList.push('h-4 w-4');
127
+ } else if (props.size == 'sm') {
128
+ classList.push('h-5 w-5');
129
+ } else {
130
+ classList.push('h-6 w-6');
131
+ }
132
+
133
+ return classList;
134
+ });
135
+
136
+ const counterSize = computed(() => {
137
+ if (props.size == 'xs') {
138
+ return 'xs';
139
+ } else if (props.size == 'sm') {
140
+ return 'xs';
141
+ } else {
142
+ return 'sm';
143
+ }
144
+ });
114
145
  </script>
@@ -90,7 +90,7 @@
90
90
  {{ systemAlert.message }}
91
91
  </BaseSystemAlert>
92
92
 
93
- <div class="flex h-16 bg-white">
93
+ <div class="flex bg-white" :style="{ height: navbarHeight + 'px' }">
94
94
  <button
95
95
  type="button"
96
96
  class="border-r border-slate-200 px-4 text-slate-500 xl:hidden"
@@ -126,7 +126,8 @@
126
126
  :class="[dark ? 'bg-slate-800' : 'bg-white shadow']"
127
127
  >
128
128
  <div
129
- class="flex h-16 flex-shrink-0 items-center px-4"
129
+ class="flex flex-shrink-0 items-center px-4"
130
+ :style="{ height: navbarHeight + 'px' }"
130
131
  :class="[dark ? 'bg-slate-900' : 'bg-white']"
131
132
  >
132
133
  <img class="block h-8 w-auto" :src="logoUrl" :alt="appName" />
@@ -142,7 +143,7 @@
142
143
  </template>
143
144
 
144
145
  <script setup lang="ts">
145
- import { ref } from 'vue';
146
+ import { ref, PropType } from 'vue';
146
147
  import {
147
148
  Dialog,
148
149
  DialogPanel,
@@ -167,6 +168,10 @@ const props = defineProps({
167
168
  default: false,
168
169
  type: Boolean,
169
170
  },
171
+ size: {
172
+ default: 'md',
173
+ type: String as PropType<'xs' | 'sm' | 'md'>,
174
+ },
170
175
  });
171
176
 
172
177
  /**
@@ -196,6 +201,17 @@ function openMenu() {
196
201
  function closeMenu() {
197
202
  showMobileMenu.value = false;
198
203
  }
204
+ const navbarHeight = computed<number>(() => {
205
+ if (props.size === 'xs') {
206
+ return 50;
207
+ }
208
+
209
+ if (props.size === 'sm') {
210
+ return 54;
211
+ }
212
+
213
+ return 64;
214
+ });
199
215
 
200
216
  provide('toggleMenu', toggleMenu);
201
217
  provide('openMenu', openMenu);
@@ -1,5 +1,5 @@
1
1
  import { DateTime } from 'luxon';
2
- import BaseContainer from './BaseContainer.vue';
2
+ import PageDashboard from '../../.storybook/components/PageDashboard.vue';
3
3
  import BaseLayoutSidebarConfigurable from './BaseLayoutSidebarConfigurable.vue';
4
4
 
5
5
  export default {
@@ -24,12 +24,13 @@ export default {
24
24
  {
25
25
  label: 'Dashboard',
26
26
  to: '/',
27
- icon: 'heroicons-home',
27
+ icon: 'heroicons:home-20-solid',
28
28
  },
29
29
  {
30
30
  label: 'Articles',
31
31
  to: '/articles',
32
- icon: 'heroicons:document-text',
32
+ icon: 'heroicons:document-text-solid',
33
+ count: 3134,
33
34
  actions: [
34
35
  {
35
36
  label: 'Articles',
@@ -53,7 +54,7 @@ export default {
53
54
  {
54
55
  label: 'Users',
55
56
  to: '/users',
56
- icon: 'heroicons:users',
57
+ icon: 'heroicons:users-solid',
57
58
  },
58
59
  ],
59
60
  },
@@ -63,12 +64,12 @@ export default {
63
64
  {
64
65
  label: 'Account',
65
66
  to: '/account',
66
- icon: 'heroicons:cog',
67
+ icon: 'heroicons:cog-solid',
67
68
  },
68
69
  {
69
70
  label: 'Logout',
70
71
  action: logout,
71
- icon: 'heroicons:arrow-left-on-rectangle',
72
+ icon: 'heroicons:arrow-left-on-rectangle-solid',
72
73
  },
73
74
  ],
74
75
  },
@@ -77,17 +78,17 @@ export default {
77
78
  {
78
79
  label: 'Dashboard',
79
80
  to: '/',
80
- icon: 'heroicons-home',
81
+ icon: 'heroicons:home-solid',
81
82
  },
82
83
  {
83
84
  label: 'Settings',
84
85
  to: '/account',
85
- icon: 'heroicons:cog',
86
+ icon: 'heroicons:cog-solid',
86
87
  },
87
88
  {
88
89
  label: 'Logout',
89
90
  action: logout,
90
- icon: 'heroicons:arrow-left-on-rectangle',
91
+ icon: 'heroicons:arrow-left-on-rectangle-20-solid',
91
92
  },
92
93
  ],
93
94
  notifications: {
@@ -116,20 +117,16 @@ async function logout() {
116
117
 
117
118
  const Template = (args) => ({
118
119
  components: {
119
- BaseContainer,
120
120
  BaseLayoutSidebarConfigurable,
121
+ PageDashboard,
121
122
  },
122
123
  setup() {
123
124
  return { args };
124
125
  },
125
126
  template: `
126
127
  <BaseLayoutSidebarConfigurable v-bind="args">
127
- <div class="py-16">
128
- <BaseContainer size="3xl">
129
- <p v-for="i in 20" class="mb-1">
130
- Amet occaecat enim pariatur incididunt enim laborum enim. Duis cillum in in excepteur sit excepteur laboris consectetur magna. Commodo proident labore commodo duis veniam do nisi irure ipsum officia excepteur non. Nisi cillum mollit tempor ut.
131
- </p>
132
- </BaseContainer>
128
+ <div class="py-10 bg-slate-50">
129
+ <PageDashboard />
133
130
  </div>
134
131
  </BaseLayoutSidebarConfigurable>
135
132
  `,
@@ -146,3 +143,24 @@ Dark.args = {
146
143
  dark: true,
147
144
  logoUrl: 'https://sprintify.witify.io/img/logo/logo-side-dark.svg',
148
145
  };
146
+
147
+ export const SizeXS = Template.bind({});
148
+ SizeXS.args = {
149
+ size: 'xs',
150
+ dark: true,
151
+ logoUrl: 'https://sprintify.witify.io/img/logo/logo-side-dark.svg',
152
+ };
153
+
154
+ export const SizeSM = Template.bind({});
155
+ SizeSM.args = {
156
+ size: 'sm',
157
+ dark: true,
158
+ logoUrl: 'https://sprintify.witify.io/img/logo/logo-side-dark.svg',
159
+ };
160
+
161
+ export const SizeMD = Template.bind({});
162
+ SizeMD.args = {
163
+ size: 'md',
164
+ dark: true,
165
+ logoUrl: 'https://sprintify.witify.io/img/logo/logo-side-dark.svg',
166
+ };
@@ -1,23 +1,25 @@
1
1
  <template>
2
- <BaseLayoutSidebar :app-name="appName" :logo-url="logoUrl" :dark="dark">
2
+ <BaseLayoutSidebar
3
+ :app-name="appName"
4
+ :logo-url="logoUrl"
5
+ :dark="dark"
6
+ :size="size"
7
+ >
3
8
  <template #menu>
4
9
  <div class="px-3 py-6">
5
10
  <div class="space-y-8">
6
11
  <div v-for="section in actionSections" :key="section.title">
7
- <h2
8
- v-if="section.title"
9
- class="mb-3 pl-3 text-xs font-semibold uppercase tracking-widest"
10
- :class="dark ? 'text-slate-400' : 'text-slate-500'"
11
- >
12
+ <h2 v-if="section.title" class="pl-3" :class="sectionTitleClasses">
12
13
  {{ section.title }}
13
14
  </h2>
14
15
  <div>
15
- <div class="space-y-1">
16
+ <div :class="[size == 'md' ? 'space-y-1' : 'space-y-0.5']">
16
17
  <BaseNavbarSideItem
17
18
  v-for="item in section.actions"
18
19
  :key="item.label"
19
20
  :item="item"
20
21
  :dark="dark"
22
+ :size="size"
21
23
  />
22
24
  </div>
23
25
  </div>
@@ -38,16 +40,27 @@
38
40
  v-if="notifications"
39
41
  :notifications-config="notifications"
40
42
  class="mr-1 sm:mr-2"
43
+ :size="size"
41
44
  @click="onNotificationClick"
42
45
  @open="onNotificationOpen"
43
46
  ></BaseLayoutNotificationDropdown>
44
47
 
45
48
  <!-- Profile dropdown -->
46
- <div class="relative ml-3 mr-3">
47
- <BaseMenu :items="userMenu">
49
+ <div
50
+ class="relative mr-2"
51
+ :class="{
52
+ 'ml-2': size == 'md',
53
+ 'ml-1': size == 'sm',
54
+ 'ml-0': size == 'xs',
55
+ }"
56
+ >
57
+ <BaseMenu :items="userMenu" :size="size == 'xs' ? 'xs' : 'sm'">
48
58
  <template #button="{ open }">
49
- <div class="flex" :class="[open ? '' : '']">
50
- <BaseAvatar :user="user" show-details />
59
+ <div
60
+ class="flex rounded-md p-1.5 hover:bg-slate-100"
61
+ :class="[open ? 'bg-slate-100' : '']"
62
+ >
63
+ <BaseAvatar :user="user" :size="size" show-details />
51
64
  </div>
52
65
  </template>
53
66
  </BaseMenu>
@@ -103,6 +116,10 @@ const props = defineProps({
103
116
  default: false,
104
117
  type: Boolean,
105
118
  },
119
+ size: {
120
+ default: 'md',
121
+ type: String as PropType<'xs' | 'sm' | 'md'>,
122
+ },
106
123
  });
107
124
 
108
125
  const actionSections = computed((): ActionSection[] => {
@@ -120,6 +137,26 @@ const actionSections = computed((): ActionSection[] => {
120
137
  ];
121
138
  });
122
139
 
140
+ const sectionTitleClasses = computed((): string[] => {
141
+ const classList = ['mb-3 font-semibold uppercase tracking-widest'];
142
+
143
+ if (props.dark) {
144
+ classList.push('text-gray-400');
145
+ } else {
146
+ classList.push('text-gray-500');
147
+ }
148
+
149
+ if (props.size === 'xs') {
150
+ classList.push('text-[10px]');
151
+ } else if (props.size === 'sm') {
152
+ classList.push('text-[11px]');
153
+ } else if (props.size === 'md') {
154
+ classList.push('text-xs');
155
+ }
156
+
157
+ return classList;
158
+ });
159
+
123
160
  function onNotificationClick(notification: Notification) {
124
161
  emit('notification:click', notification);
125
162
  }