@ouestfrance/sipa-bms-ui 8.13.0 → 8.14.1
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/dist/components/navigation/BmsFixedMenu.vue.d.ts +3 -0
- package/dist/components/navigation/BmsMenuNav.vue.d.ts +6 -0
- package/dist/components/navigation/UiMenuItem.vue.d.ts +11 -2
- package/dist/mockServiceWorker.js +1 -1
- package/dist/sipa-bms-ui.css +24 -21
- package/dist/sipa-bms-ui.es.js +3498 -3417
- package/dist/sipa-bms-ui.es.js.map +1 -1
- package/dist/sipa-bms-ui.umd.js +3498 -3417
- package/dist/sipa-bms-ui.umd.js.map +1 -1
- package/package.json +13 -14
- package/src/components/navigation/BmsFixedMenu.stories.js +7 -0
- package/src/components/navigation/BmsFixedMenu.vue +3 -0
- package/src/components/navigation/BmsMenuNav.stories.js +6 -0
- package/src/components/navigation/BmsMenuNav.vue +11 -2
- package/src/components/navigation/UiMenuItem.vue +8 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ouestfrance/sipa-bms-ui",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.14.1",
|
|
4
4
|
"author": "Ouest-France BMS",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"scripts": {
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"@chromatic-com/storybook": "^4.0.0",
|
|
34
34
|
"@codemirror/lang-html": "6.4.11",
|
|
35
35
|
"@codemirror/lang-json": "6.0.2",
|
|
36
|
-
"@commitlint/cli": "
|
|
37
|
-
"@commitlint/config-conventional": "
|
|
36
|
+
"@commitlint/cli": "20.1.0",
|
|
37
|
+
"@commitlint/config-conventional": "20.0.0",
|
|
38
38
|
"@formkit/vue": "1.6.9",
|
|
39
39
|
"@mdx-js/react": "3.1.1",
|
|
40
|
-
"@storybook/addon-docs": "9.1.
|
|
41
|
-
"@storybook/addon-links": "9.1.
|
|
42
|
-
"@storybook/vue3-vite": "9.1.
|
|
40
|
+
"@storybook/addon-docs": "9.1.15",
|
|
41
|
+
"@storybook/addon-links": "9.1.15",
|
|
42
|
+
"@storybook/vue3-vite": "9.1.15",
|
|
43
43
|
"@types/lodash": "4.17.20",
|
|
44
44
|
"@types/uuid": "11.0.0",
|
|
45
45
|
"@vitejs/plugin-vue": "6.0.1",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@vueuse/motion": "^3.0.0",
|
|
49
49
|
"axios": "1.12.2",
|
|
50
50
|
"blob-util": "^2.0.2",
|
|
51
|
-
"chromatic": "13.3.
|
|
51
|
+
"chromatic": "13.3.2",
|
|
52
52
|
"codemirror": "6.0.2",
|
|
53
53
|
"cors": "^2.8.5",
|
|
54
54
|
"cross-env": "^10.0.0",
|
|
@@ -58,18 +58,18 @@
|
|
|
58
58
|
"husky": "9.1.7",
|
|
59
59
|
"jsdom": "27.0.1",
|
|
60
60
|
"keycloak-js": "26.1.2",
|
|
61
|
-
"lint-staged": "16.2.
|
|
61
|
+
"lint-staged": "16.2.6",
|
|
62
62
|
"lodash": "4.17.21",
|
|
63
|
-
"lucide-vue-next": "0.
|
|
63
|
+
"lucide-vue-next": "0.548.0",
|
|
64
64
|
"msw-storybook-addon": "^2.0.3",
|
|
65
65
|
"normalize.css": "8.0.1",
|
|
66
66
|
"path": "0.12.7",
|
|
67
67
|
"prettier": "3.6.2",
|
|
68
68
|
"sass": "1.93.2",
|
|
69
|
-
"semantic-release": "
|
|
69
|
+
"semantic-release": "25.0.1",
|
|
70
70
|
"start-server-and-test": "2.1.2",
|
|
71
|
-
"storybook": "9.1.
|
|
72
|
-
"storybook-addon-pseudo-states": "9.1.
|
|
71
|
+
"storybook": "9.1.15",
|
|
72
|
+
"storybook-addon-pseudo-states": "9.1.15",
|
|
73
73
|
"storybook-vue3-router": "^6.0.2",
|
|
74
74
|
"typescript": "5.2.2",
|
|
75
75
|
"uuid": "13.0.0",
|
|
@@ -102,8 +102,7 @@
|
|
|
102
102
|
"./theming": "./src/assets/scss/_conf.scss"
|
|
103
103
|
},
|
|
104
104
|
"volta": {
|
|
105
|
-
"node": "22.
|
|
106
|
-
"npm": "10.2.4"
|
|
105
|
+
"node": "22.14.0"
|
|
107
106
|
},
|
|
108
107
|
"engines": {
|
|
109
108
|
"node": ">=14 <=22",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import BmsFixedMenu from '@/components/navigation/BmsFixedMenu.vue';
|
|
2
|
+
import BmsBadge from '@/components/feedback/BmsBadge.vue';
|
|
2
3
|
import { Activity, ArrowBigDown, Globe, User } from 'lucide-vue-next';
|
|
3
4
|
import { vueRouter } from 'storybook-vue3-router';
|
|
4
5
|
|
|
@@ -33,6 +34,7 @@ export default {
|
|
|
33
34
|
const Template = (args) => ({
|
|
34
35
|
components: {
|
|
35
36
|
BmsFixedMenu,
|
|
37
|
+
BmsBadge,
|
|
36
38
|
},
|
|
37
39
|
setup() {
|
|
38
40
|
return { args };
|
|
@@ -40,6 +42,9 @@ const Template = (args) => ({
|
|
|
40
42
|
template: `
|
|
41
43
|
<BmsFixedMenu v-bind="args">
|
|
42
44
|
<template v-if="args.additionalSlot" #additional>Additional</template>
|
|
45
|
+
<template v-if="args.additionalSlot" #icon-end="{ item }" >
|
|
46
|
+
<BmsBadge :pending="item.badgeCount"></BmsBadge>
|
|
47
|
+
</template>
|
|
43
48
|
<template v-if="args.footerSlot" #footer>Footer</template>
|
|
44
49
|
</BmsFixedMenu>
|
|
45
50
|
`,
|
|
@@ -100,11 +105,13 @@ WithSlots.args = {
|
|
|
100
105
|
label: 'Activity',
|
|
101
106
|
link: '/activity',
|
|
102
107
|
icon: Activity,
|
|
108
|
+
badgeCount: 1,
|
|
103
109
|
},
|
|
104
110
|
{
|
|
105
111
|
label: 'Users',
|
|
106
112
|
link: '/users',
|
|
107
113
|
icon: User,
|
|
114
|
+
badgeCount: 0,
|
|
108
115
|
},
|
|
109
116
|
],
|
|
110
117
|
activeLink: '/users',
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import BmsMenuNav from '@/components/navigation/BmsMenuNav.vue';
|
|
2
|
+
import BmsBadge from '@/components/feedback/BmsBadge.vue';
|
|
2
3
|
import { Activity, BookOpen, Settings } from 'lucide-vue-next';
|
|
3
4
|
import { StatusType } from '../../models';
|
|
4
5
|
|
|
@@ -13,6 +14,7 @@ export default {
|
|
|
13
14
|
const Template = (args) => ({
|
|
14
15
|
components: {
|
|
15
16
|
BmsMenuNav,
|
|
17
|
+
BmsBadge,
|
|
16
18
|
},
|
|
17
19
|
setup() {
|
|
18
20
|
return { args };
|
|
@@ -20,6 +22,9 @@ const Template = (args) => ({
|
|
|
20
22
|
template: `
|
|
21
23
|
<BmsMenuNav v-bind="args">
|
|
22
24
|
<template v-if="args.additionalSlot" #additional>Additional</template>
|
|
25
|
+
<template v-if="args.additionalSlot" #icon-end="{ item }" >
|
|
26
|
+
<BmsBadge :pending="item.badgeCount"></BmsBadge>
|
|
27
|
+
</template>
|
|
23
28
|
</BmsMenuNav>
|
|
24
29
|
`,
|
|
25
30
|
});
|
|
@@ -158,6 +163,7 @@ WithAdditionalSlot.args = {
|
|
|
158
163
|
link: '/toto',
|
|
159
164
|
icon: Activity,
|
|
160
165
|
id: 'toto',
|
|
166
|
+
badgeCount: 5,
|
|
161
167
|
},
|
|
162
168
|
{
|
|
163
169
|
label: 'titi',
|
|
@@ -36,7 +36,11 @@
|
|
|
36
36
|
:item="subItem as MenuItem"
|
|
37
37
|
:active="isItemActive(subItem as MenuItem)"
|
|
38
38
|
@click="clickItem(subItem)"
|
|
39
|
-
|
|
39
|
+
>
|
|
40
|
+
<template #icon-end>
|
|
41
|
+
<slot name="icon-end" :item="item"> </slot>
|
|
42
|
+
</template>
|
|
43
|
+
</UiMenuItem>
|
|
40
44
|
</li>
|
|
41
45
|
</ul>
|
|
42
46
|
</Transition>
|
|
@@ -46,7 +50,11 @@
|
|
|
46
50
|
:item="item as MenuItem"
|
|
47
51
|
:active="isItemActive(item as MenuItem)"
|
|
48
52
|
@click="clickItem(item)"
|
|
49
|
-
|
|
53
|
+
>
|
|
54
|
+
<template #icon-end>
|
|
55
|
+
<slot name="icon-end" :item="item"> </slot>
|
|
56
|
+
</template>
|
|
57
|
+
</UiMenuItem>
|
|
50
58
|
</li>
|
|
51
59
|
</ul>
|
|
52
60
|
<div class="additional">
|
|
@@ -67,6 +75,7 @@ import {
|
|
|
67
75
|
import { ChevronDown, ChevronUp, Settings } from 'lucide-vue-next';
|
|
68
76
|
import UiMenuItem from './UiMenuItem.vue';
|
|
69
77
|
import BmsLink from './BmsLink.vue';
|
|
78
|
+
import BmsBadge from '../feedback/BmsBadge.vue';
|
|
70
79
|
|
|
71
80
|
interface Props {
|
|
72
81
|
items: (MenuItem | ParentMenuItem)[];
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<BmsLink :to="(item as MenuItem).link" :target="target" :classes="classes">
|
|
3
3
|
<span class="bar"> </span>
|
|
4
|
-
<component v-if="item.icon" :is="item.icon" :size="20" />
|
|
5
|
-
<
|
|
4
|
+
<component v-if="item.icon" :is="item.icon" :size="20" class="icon" />
|
|
5
|
+
<div class="label">
|
|
6
|
+
{{ item.label }}
|
|
7
|
+
<slot name="icon-end" :item="item"></slot>
|
|
8
|
+
</div>
|
|
6
9
|
</BmsLink>
|
|
7
10
|
</template>
|
|
8
11
|
|
|
@@ -111,6 +114,9 @@ const classes = computed(() => {
|
|
|
111
114
|
.label {
|
|
112
115
|
padding: 16px 16px 16px 0;
|
|
113
116
|
line-height: 16px;
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
gap: 4px;
|
|
114
120
|
}
|
|
115
121
|
}
|
|
116
122
|
</style>
|