@ouestfrance/sipa-bms-ui 8.13.0 → 8.14.0

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": "@ouestfrance/sipa-bms-ui",
3
- "version": "8.13.0",
3
+ "version": "8.14.0",
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": "19.8.1",
37
- "@commitlint/config-conventional": "19.8.1",
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.13",
41
- "@storybook/addon-links": "9.1.13",
42
- "@storybook/vue3-vite": "9.1.13",
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.0",
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.4",
61
+ "lint-staged": "16.2.6",
62
62
  "lodash": "4.17.21",
63
- "lucide-vue-next": "0.546.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": "24.2.9",
69
+ "semantic-release": "25.0.1",
70
70
  "start-server-and-test": "2.1.2",
71
- "storybook": "9.1.13",
72
- "storybook-addon-pseudo-states": "9.1.13",
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.13.0",
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',
@@ -8,6 +8,9 @@
8
8
  <template #additional>
9
9
  <slot name="additional"></slot>
10
10
  </template>
11
+ <template #icon-end="{ item }">
12
+ <slot name="icon-end" :item="item"></slot>
13
+ </template>
11
14
  </BmsMenuNav>
12
15
 
13
16
  <div class="menu__copyright">
@@ -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',
@@ -46,7 +46,11 @@
46
46
  :item="item as MenuItem"
47
47
  :active="isItemActive(item as MenuItem)"
48
48
  @click="clickItem(item)"
49
- />
49
+ >
50
+ <template #icon-end>
51
+ <slot name="icon-end" :item="item"> </slot>
52
+ </template>
53
+ </UiMenuItem>
50
54
  </li>
51
55
  </ul>
52
56
  <div class="additional">
@@ -67,6 +71,7 @@ import {
67
71
  import { ChevronDown, ChevronUp, Settings } from 'lucide-vue-next';
68
72
  import UiMenuItem from './UiMenuItem.vue';
69
73
  import BmsLink from './BmsLink.vue';
74
+ import BmsBadge from '../feedback/BmsBadge.vue';
70
75
 
71
76
  interface Props {
72
77
  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">&nbsp;</span>
4
- <component v-if="item.icon" :is="item.icon" :size="20" />
5
- <span class="label"> {{ item.label }}</span>
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>