@ouestfrance/sipa-bms-ui 8.19.0 → 8.21.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/dist/components/form/BmsFilePicker.vue.d.ts +4 -0
- package/dist/components/form/BmsInputText.vue.d.ts +1 -0
- package/dist/components/form/BmsMultiSelect.vue.d.ts +4 -0
- package/dist/components/form/BmsSearch.vue.d.ts +3 -1
- package/dist/components/form/RawAutocomplete.vue.d.ts +8 -0
- package/dist/components/layout/BmsSplitWindow.vue.d.ts +1 -0
- package/dist/components/navigation/UiTenantSwitcher.vue.d.ts +3 -1
- package/dist/components/table/BmsTableFilters.vue.d.ts +3 -1
- package/dist/mockServiceWorker.js +1 -1
- package/dist/sipa-bms-ui.css +54 -368
- package/dist/sipa-bms-ui.es.js +118 -47
- package/dist/sipa-bms-ui.es.js.map +1 -1
- package/dist/sipa-bms-ui.umd.js +117 -46
- package/dist/sipa-bms-ui.umd.js.map +1 -1
- package/package.json +13 -12
- package/src/assets/scss/_conf.scss +0 -1
- package/src/assets/scss/app.scss +0 -1
- package/src/components/button/BmsAllButtons.stories.js +50 -23
- package/src/components/button/BmsButton.stories.js +151 -65
- package/src/components/button/BmsIconButton.stories.js +14 -8
- package/src/components/button/UiButton.stories.js +31 -0
- package/src/components/feedback/BmsCircularProgress.stories.js +0 -7
- package/src/components/feedback/BmsLoader.stories.js +0 -6
- package/src/components/feedback/BmsTooltip.stories.js +1 -0
- package/src/components/feedback/UiTooltip.stories.js +1 -0
- package/src/components/form/BmsAutocomplete.stories.js +11 -1
- package/src/components/form/BmsBetweenInput.stories.js +17 -1
- package/src/components/form/BmsFilePicker.stories.js +8 -1
- package/src/components/form/BmsFilePicker.vue +10 -5
- package/src/components/form/BmsInputBooleanCheckbox.stories.js +9 -0
- package/src/components/form/BmsInputCheckboxCaption.stories.js +16 -0
- package/src/components/form/BmsInputCheckboxCaptionGroup.stories.js +21 -1
- package/src/components/form/BmsInputText.vue +1 -0
- package/src/components/form/BmsMultiSelect.vue +32 -25
- package/src/components/form/BmsSelect.vue +18 -16
- package/src/components/form/RawAutocomplete.vue +16 -4
- package/src/components/form/RawInputText.vue +1 -0
- package/src/components/form/UiBmsInputCheckbox.stories.js +1 -0
- package/src/components/form/UiBmsSwitch.stories.js +1 -5
- package/src/components/layout/BmsForm_retrocompat.stories.js +1 -0
- package/src/components/layout/BmsModal.stories.js +2 -1
- package/src/components/layout/BmsSplitWindow.vue +4 -3
- package/src/components/navigation/BmsBreadcrumb.stories.js +0 -18
- package/src/components/navigation/BmsMenu.stories.js +4 -4
- package/src/components/navigation/BmsMenuNav.stories.js +4 -3
- package/src/components/navigation/UiMenuItem.stories.js +53 -2
- package/src/components/navigation/UiTab.stories.js +1 -0
- package/src/components/navigation/UiTenantSwitcher.stories.js +1 -0
- package/src/components/table/BmsEmptyScreen.stories.js +0 -7
- package/src/components/table/BmsTableFilters.vue +1 -1
- package/src/components/table/UiBmsTable.stories.js +1 -0
- package/src/components/table/UiFilterButton.stories.js +3 -8
- package/src/components/utils/BmsRelativeTime.stories.js +0 -6
- package/src/documentation/button/primaryButton.mdx +142 -0
- package/src/documentation/{secondaryButton.mdx → button/secondaryButton.mdx} +2 -2
- package/src/documentation/foundation/contributing.mdx +72 -0
- package/src/documentation/foundation/gettingstarted.mdx +7 -0
- package/src/documentation/{principles.mdx → foundation/principles.mdx} +9 -9
- package/src/documentation/icons.mdx +43 -0
- package/src/showroom/pages/forms.vue +10 -1
- package/src/assets/scss/_formkit.scss +0 -353
- package/src/components/feedback/Notification.stories.js +0 -37
- package/src/components/form/Form.stories.js +0 -35
- package/src/components/navigation/UiMenuItemStatus.stories.js +0 -64
- package/src/documentation/primaryButton.mdx +0 -20
- /package/src/documentation/{button.mdx → button/button.mdx} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import BmsModal from '@/components/layout/BmsModal.vue';
|
|
2
|
+
import BmsProblem from '@/components/utils/BmsProblem.vue';
|
|
3
|
+
import { isProblem } from '@/helpers/problem.helper.ts';
|
|
2
4
|
import { StatusType } from '@/models/status-type.model';
|
|
3
|
-
import { BmsProblem, isProblem } from '../../index';
|
|
4
5
|
|
|
5
6
|
const openNotification = {
|
|
6
7
|
details: 'this is a detail',
|
|
@@ -55,7 +55,6 @@ const collapsedLocal = ref(props.collapsed ?? false);
|
|
|
55
55
|
watch(
|
|
56
56
|
() => props.collapsed,
|
|
57
57
|
(val) => {
|
|
58
|
-
console.log('watch:collapsed', val);
|
|
59
58
|
collapsedLocal.value = val ?? false;
|
|
60
59
|
},
|
|
61
60
|
);
|
|
@@ -218,7 +217,7 @@ function clamp(value: number, minValue: number, maxValue: number) {
|
|
|
218
217
|
<slot name="first" />
|
|
219
218
|
</div>
|
|
220
219
|
<div
|
|
221
|
-
class="split-window__separator
|
|
220
|
+
class="split-window__separator"
|
|
222
221
|
role="separator"
|
|
223
222
|
tabindex="0"
|
|
224
223
|
:aria-label="props.ariaLabel || 'Séparateur de volet'"
|
|
@@ -229,7 +228,9 @@ function clamp(value: number, minValue: number, maxValue: number) {
|
|
|
229
228
|
:aria-controls="primaryId"
|
|
230
229
|
@pointerdown.prevent.stop="onPointerDown"
|
|
231
230
|
@keydown="onKeyDown"
|
|
232
|
-
|
|
231
|
+
>
|
|
232
|
+
<slot name="separator" />
|
|
233
|
+
</div>
|
|
233
234
|
<div
|
|
234
235
|
class="split-window__pane split-window__second-pane"
|
|
235
236
|
:id="primary === 'second' ? primaryId : undefined"
|
|
@@ -60,21 +60,3 @@ Default.args = {
|
|
|
60
60
|
},
|
|
61
61
|
],
|
|
62
62
|
};
|
|
63
|
-
|
|
64
|
-
export const WithCustomSeparator = Template.bind({});
|
|
65
|
-
WithCustomSeparator.args = {
|
|
66
|
-
separator: '❤️',
|
|
67
|
-
breadcrumbs: [
|
|
68
|
-
{
|
|
69
|
-
to: { name: 'firstRoute' },
|
|
70
|
-
label: 'First route',
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
to: { name: 'secondRoute' },
|
|
74
|
-
label: 'Second route',
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
label: 'Third and final route',
|
|
78
|
-
},
|
|
79
|
-
],
|
|
80
|
-
};
|
|
@@ -18,8 +18,8 @@ const Template = (args) => ({
|
|
|
18
18
|
},
|
|
19
19
|
template: `
|
|
20
20
|
<BmsMenu v-bind="args">
|
|
21
|
-
<template v-if="args.
|
|
22
|
-
<template v-if="args.
|
|
21
|
+
<template v-if="args.additional" #additional>{{args.additional}}</template>
|
|
22
|
+
<template v-if="args.footer" #footer>{{args.footer}}</template>
|
|
23
23
|
</BmsMenu>
|
|
24
24
|
`,
|
|
25
25
|
});
|
|
@@ -80,6 +80,6 @@ WithFooterSlot.args = {
|
|
|
80
80
|
},
|
|
81
81
|
],
|
|
82
82
|
activeLink: '/tutu',
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
additional: 'Additional',
|
|
84
|
+
footer: 'Footer',
|
|
85
85
|
};
|
|
@@ -21,8 +21,8 @@ const Template = (args) => ({
|
|
|
21
21
|
},
|
|
22
22
|
template: `
|
|
23
23
|
<BmsMenuNav v-bind="args">
|
|
24
|
-
<template v-if="args.
|
|
25
|
-
<template v-if="args.
|
|
24
|
+
<template v-if="args.additional" #additional>{{args.additional}}</template>
|
|
25
|
+
<template v-if="args.iconEndCustomSlot" #icon-end="{ item }" >
|
|
26
26
|
<BmsBadge :pending="item.badgeCount"></BmsBadge>
|
|
27
27
|
</template>
|
|
28
28
|
</BmsMenuNav>
|
|
@@ -189,5 +189,6 @@ WithAdditionalSlot.args = {
|
|
|
189
189
|
},
|
|
190
190
|
],
|
|
191
191
|
activeLink: { path: '/tutu' },
|
|
192
|
-
|
|
192
|
+
additional: 'Additional',
|
|
193
|
+
iconEndCustomSlot: true,
|
|
193
194
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import UiMenuItem from '@/components/navigation/UiMenuItem.vue';
|
|
2
|
-
import { Activity } from 'lucide-vue-next';
|
|
2
|
+
import { Activity, ShieldAlert, ShieldCheck, ShieldOff } from 'lucide-vue-next';
|
|
3
3
|
import { vueRouter } from 'storybook-vue3-router';
|
|
4
4
|
import template from '@/documentation/template_internal_component.mdx';
|
|
5
|
+
import { StatusType } from '@/models';
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
8
|
parameters: {
|
|
@@ -9,7 +10,8 @@ export default {
|
|
|
9
10
|
page: template,
|
|
10
11
|
},
|
|
11
12
|
},
|
|
12
|
-
|
|
13
|
+
tags: ['code-only'],
|
|
14
|
+
title: 'Composants/navigation/UiMenuItem',
|
|
13
15
|
component: UiMenuItem,
|
|
14
16
|
decorators: [
|
|
15
17
|
vueRouter([
|
|
@@ -77,3 +79,52 @@ Active.args = {
|
|
|
77
79
|
},
|
|
78
80
|
active: true,
|
|
79
81
|
};
|
|
82
|
+
|
|
83
|
+
const TemplateStatus = (args) => ({
|
|
84
|
+
components: {
|
|
85
|
+
UiMenuItem,
|
|
86
|
+
},
|
|
87
|
+
setup() {
|
|
88
|
+
return { args };
|
|
89
|
+
},
|
|
90
|
+
template: `
|
|
91
|
+
<UiMenuItem :item="args.items[0]"/>
|
|
92
|
+
<UiMenuItem :item="args.items[0]" :active="true"/>
|
|
93
|
+
<UiMenuItem :item="args.items[1]"/>
|
|
94
|
+
<UiMenuItem :item="args.items[1]" :active="true"/>
|
|
95
|
+
<UiMenuItem :item="args.items[2]"/>
|
|
96
|
+
<UiMenuItem :item="args.items[2]" :active="true"/>
|
|
97
|
+
<UiMenuItem :item="args.items[3]"/>
|
|
98
|
+
<UiMenuItem :item="args.items[3]" :active="true"/>
|
|
99
|
+
`,
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
export const WithStatusType = TemplateStatus.bind({});
|
|
103
|
+
WithStatusType.args = {
|
|
104
|
+
items: [
|
|
105
|
+
{
|
|
106
|
+
label: 'Item label',
|
|
107
|
+
link: 'http://google.fr',
|
|
108
|
+
icon: ShieldAlert,
|
|
109
|
+
status: StatusType.Danger,
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
label: 'Item label',
|
|
113
|
+
link: 'http://google.fr',
|
|
114
|
+
icon: ShieldAlert,
|
|
115
|
+
status: StatusType.Warning,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
label: 'Item label',
|
|
119
|
+
link: 'http://google.fr',
|
|
120
|
+
icon: ShieldCheck,
|
|
121
|
+
status: StatusType.Success,
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
label: 'Item label',
|
|
125
|
+
link: 'http://google.fr',
|
|
126
|
+
icon: ShieldOff,
|
|
127
|
+
status: StatusType.Information,
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
};
|
|
@@ -1,31 +1,24 @@
|
|
|
1
1
|
import BmsEmptyScreen from '@/components/table/BmsEmptyScreen.vue';
|
|
2
2
|
|
|
3
|
-
// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
|
|
4
3
|
export default {
|
|
5
4
|
title: 'Composants/table/EmptyScreen',
|
|
6
5
|
component: BmsEmptyScreen,
|
|
7
|
-
// More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
|
|
8
6
|
argTypes: {},
|
|
9
7
|
};
|
|
10
8
|
|
|
11
|
-
// More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
|
|
12
9
|
const Template = (args) => ({
|
|
13
|
-
// Components used in your story `template` are defined in the `components` object
|
|
14
10
|
components: {
|
|
15
11
|
BmsEmptyScreen,
|
|
16
12
|
},
|
|
17
|
-
// The story's `args` need to be mapped into the template through the `setup()` method
|
|
18
13
|
setup() {
|
|
19
14
|
return { args };
|
|
20
15
|
},
|
|
21
|
-
// And then the `args` are bound to your component with `v-bind="args"`
|
|
22
16
|
template: `
|
|
23
17
|
<BmsEmptyScreen v-bind="args" />
|
|
24
18
|
`,
|
|
25
19
|
});
|
|
26
20
|
|
|
27
21
|
export const Default = Template.bind({});
|
|
28
|
-
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
|
29
22
|
Default.args = {
|
|
30
23
|
title: 'Not found',
|
|
31
24
|
description: "The requested data haven't been found",
|
|
@@ -7,7 +7,8 @@ export default {
|
|
|
7
7
|
page: template,
|
|
8
8
|
},
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
tags: ['code-only'],
|
|
11
|
+
title: 'Composants/table/UiFilterButton',
|
|
11
12
|
component: UiFilterButton,
|
|
12
13
|
argTypes: {},
|
|
13
14
|
};
|
|
@@ -19,16 +20,10 @@ const Template = (args) => ({
|
|
|
19
20
|
setup() {
|
|
20
21
|
return { args };
|
|
21
22
|
},
|
|
22
|
-
|
|
23
|
-
template: `
|
|
24
|
-
<div style="display:flex">
|
|
25
|
-
<UiFilterButton v-bind="args" />
|
|
26
|
-
</div>
|
|
27
|
-
`,
|
|
23
|
+
template: `<UiFilterButton v-bind="args" />`,
|
|
28
24
|
});
|
|
29
25
|
|
|
30
26
|
export const Default = Template.bind({});
|
|
31
|
-
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
|
32
27
|
Default.args = {};
|
|
33
28
|
|
|
34
29
|
export const activeFilters = Template.bind({});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import BmsRelativeTime from '@/components/utils/BmsRelativeTime.vue';
|
|
2
2
|
|
|
3
|
-
// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
|
|
4
3
|
export default {
|
|
5
4
|
title: 'Composants/utils/RelativeTime',
|
|
6
5
|
component: BmsRelativeTime,
|
|
@@ -11,17 +10,13 @@ export default {
|
|
|
11
10
|
},
|
|
12
11
|
};
|
|
13
12
|
|
|
14
|
-
// More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
|
|
15
13
|
const Template = (args) => ({
|
|
16
|
-
// Components used in your story `template` are defined in the `components` object
|
|
17
14
|
components: {
|
|
18
15
|
BmsRelativeTime,
|
|
19
16
|
},
|
|
20
|
-
// The story's `args` need to be mapped into the template through the `setup()` method
|
|
21
17
|
setup() {
|
|
22
18
|
return { args };
|
|
23
19
|
},
|
|
24
|
-
// And then the `args` are bound to your component with `v-bind="args"`
|
|
25
20
|
template: `
|
|
26
21
|
<div style="width: 400px; text-align: center;">
|
|
27
22
|
<p>
|
|
@@ -44,5 +39,4 @@ const Template = (args) => ({
|
|
|
44
39
|
});
|
|
45
40
|
|
|
46
41
|
export const Primary = Template.bind({});
|
|
47
|
-
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
|
48
42
|
Primary.args = {};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { Canvas, Meta, Controls } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import {
|
|
3
|
+
Playground,
|
|
4
|
+
DoSimple,
|
|
5
|
+
DoDanger,
|
|
6
|
+
DoSmall,
|
|
7
|
+
DoIconStart,
|
|
8
|
+
DoIconEnd,
|
|
9
|
+
DoSubmit,
|
|
10
|
+
DontLongLabel,
|
|
11
|
+
DoShortLabel,
|
|
12
|
+
DontMultiplePrimary,
|
|
13
|
+
DoOnePrimary,
|
|
14
|
+
DontTooManyIcons,
|
|
15
|
+
DoOneIcon,
|
|
16
|
+
DontGenericLabel,
|
|
17
|
+
DoSpecificLabel,
|
|
18
|
+
DontPrimaryForCancel,
|
|
19
|
+
DoPrimaryForSave,
|
|
20
|
+
} from '../../components/button/BmsButton.stories.js';
|
|
21
|
+
|
|
22
|
+
<Meta title="Documentation/Buttons/Primary" />
|
|
23
|
+
|
|
24
|
+
# <img src="./BmsIcon.png" /> Primary Button
|
|
25
|
+
|
|
26
|
+
The primary button should represent the main action on a screen. There should only be one primary button on an interface. If multiple actions are possible, it is essential to create a hierarchy of actions and use a primary and several secondary or tertiary buttons.
|
|
27
|
+
|
|
28
|
+
## Anatomy
|
|
29
|
+
|
|
30
|
+
Buttons allow users to perform an action or to navigate to another page. They have multiple styles for various needs, and are ideal for calling attention to where a user needs to do something in order to move forward in a flow.
|
|
31
|
+
|
|
32
|
+

|
|
33
|
+
|
|
34
|
+
## Component
|
|
35
|
+
|
|
36
|
+
Use the controls below to interact with the component and see how it behaves with different configurations.
|
|
37
|
+
|
|
38
|
+
<Canvas of={Playground} />
|
|
39
|
+
|
|
40
|
+
### Props
|
|
41
|
+
|
|
42
|
+
<Controls of={Playground} />
|
|
43
|
+
|
|
44
|
+
## Usage Examples
|
|
45
|
+
|
|
46
|
+
### ✅ Do: Simple action button
|
|
47
|
+
|
|
48
|
+
Use a clear, concise label (maximum 3 words) for the primary action.
|
|
49
|
+
|
|
50
|
+
<Canvas of={DoSimple} />
|
|
51
|
+
|
|
52
|
+
### ✅ Do: Button with icon at start
|
|
53
|
+
|
|
54
|
+
Icons can help clarify the action. Place them at the start of the button.
|
|
55
|
+
|
|
56
|
+
<Canvas of={DoIconStart} />
|
|
57
|
+
|
|
58
|
+
### ✅ Do: Button with icon at end
|
|
59
|
+
|
|
60
|
+
Place icons at the end for navigation or forward actions.
|
|
61
|
+
|
|
62
|
+
<Canvas of={DoIconEnd} />
|
|
63
|
+
|
|
64
|
+
### ✅ Do: Submit button
|
|
65
|
+
|
|
66
|
+
Use `submit` prop for form submissions.
|
|
67
|
+
|
|
68
|
+
<Canvas of={DoSubmit} />
|
|
69
|
+
|
|
70
|
+
### ✅ Do: Danger mode
|
|
71
|
+
|
|
72
|
+
Use danger mode for destructive actions that require caution.
|
|
73
|
+
|
|
74
|
+
<Canvas of={DoDanger} />
|
|
75
|
+
|
|
76
|
+
### ✅ Do: Small variant
|
|
77
|
+
|
|
78
|
+
Use the small variant when space is limited.
|
|
79
|
+
|
|
80
|
+
<Canvas of={DoSmall} />
|
|
81
|
+
|
|
82
|
+
## Rules
|
|
83
|
+
|
|
84
|
+
### ⛔ Don't: Long labels
|
|
85
|
+
|
|
86
|
+
Avoid long labels that exceed 3 words. Keep button text concise and action-oriented.
|
|
87
|
+
|
|
88
|
+
**❌ Don't:**
|
|
89
|
+
|
|
90
|
+
<Canvas of={DontLongLabel} />
|
|
91
|
+
|
|
92
|
+
**✅ Do:**
|
|
93
|
+
|
|
94
|
+
<Canvas of={DoShortLabel} />
|
|
95
|
+
|
|
96
|
+
### ⛔ Don't: Multiple primary buttons
|
|
97
|
+
|
|
98
|
+
Never use multiple primary buttons on the same screen. Use only one primary button per interface.
|
|
99
|
+
|
|
100
|
+
**❌ Don't:**
|
|
101
|
+
|
|
102
|
+
<Canvas of={DontMultiplePrimary} />
|
|
103
|
+
|
|
104
|
+
**✅ Do:**
|
|
105
|
+
|
|
106
|
+
<Canvas of={DoOnePrimary} />
|
|
107
|
+
|
|
108
|
+
### ⛔ Don't: Overuse of icons
|
|
109
|
+
|
|
110
|
+
Don't overload buttons with multiple icons or decorative elements that don't add value.
|
|
111
|
+
|
|
112
|
+
**❌ Don't:**
|
|
113
|
+
|
|
114
|
+
<Canvas of={DontTooManyIcons} />
|
|
115
|
+
|
|
116
|
+
**✅ Do:**
|
|
117
|
+
|
|
118
|
+
<Canvas of={DoOneIcon} />
|
|
119
|
+
|
|
120
|
+
### ⛔ Don't: Generic labels
|
|
121
|
+
|
|
122
|
+
Avoid generic labels like "Click here" or "Submit". Use specific action verbs.
|
|
123
|
+
|
|
124
|
+
**❌ Don't:**
|
|
125
|
+
|
|
126
|
+
<Canvas of={DontGenericLabel} />
|
|
127
|
+
|
|
128
|
+
**✅ Do:**
|
|
129
|
+
|
|
130
|
+
<Canvas of={DoSpecificLabel} />
|
|
131
|
+
|
|
132
|
+
### ⛔ Don't: Primary for secondary actions
|
|
133
|
+
|
|
134
|
+
Don't use primary buttons for secondary or cancel actions. Reserve primary buttons for the main action.
|
|
135
|
+
|
|
136
|
+
**❌ Don't:**
|
|
137
|
+
|
|
138
|
+
<Canvas of={DontPrimaryForCancel} />
|
|
139
|
+
|
|
140
|
+
**✅ Do:**
|
|
141
|
+
|
|
142
|
+
<Canvas of={DoPrimaryForSave} />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks';
|
|
2
|
-
import Button from '
|
|
2
|
+
import Button from '../../components/button/BmsButton.vue';
|
|
3
3
|
|
|
4
|
-
<Meta title="Documentation/Buttons/Secondary
|
|
4
|
+
<Meta title="Documentation/Buttons/Secondary" />
|
|
5
5
|
|
|
6
6
|
# <img src="./BmsIcon.png" /> Secondary Button
|
|
7
7
|
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
<Meta title="Foundation/Contributing" />
|
|
4
|
+
|
|
5
|
+
# <img src="./BmsIcon.png" /> Contributing
|
|
6
|
+
|
|
7
|
+
We welcome contributions from the community! To keep the codebase healthy and consistent, please follow the process outlined below before submitting a Merge Request (MR).
|
|
8
|
+
|
|
9
|
+
## Contribution – Challenging the Need for Evolution
|
|
10
|
+
|
|
11
|
+
> **Before adding or modifying a component, question the underlying need.**
|
|
12
|
+
> In a design system every change propagates across many products, so it’s crucial to ensure that new work truly adds value.
|
|
13
|
+
|
|
14
|
+
1. **Define the problem** – Who experiences the pain point? What user goal does it affect?
|
|
15
|
+
2. **Consider existing solutions** – Can the issue be solved with a variant, a token adjustment, or a composition of existing components?
|
|
16
|
+
3. **Evaluate impact** – Think about bundle size, visual consistency, accessibility, and maintenance overhead.
|
|
17
|
+
|
|
18
|
+
Applying this disciplined approach helps the design system stay lean, cohesive, and future‑proof while preventing unnecessary churn.
|
|
19
|
+
|
|
20
|
+
## 1️ Discuss the Change First
|
|
21
|
+
|
|
22
|
+
Before you start coding, **open a thread** on Teams describing the problem you want to solve or the feature you’d like to add. Include:
|
|
23
|
+
|
|
24
|
+
- A clear description of the motivation.
|
|
25
|
+
- Any relevant design sketches or screenshot.
|
|
26
|
+
- Links to related tickets or upstream discussions.
|
|
27
|
+
|
|
28
|
+
This early conversation helps us:
|
|
29
|
+
|
|
30
|
+
- Validate that the change aligns with the project roadmap.
|
|
31
|
+
- Identify potential design conflicts early.
|
|
32
|
+
- Agree on an implementation approach.
|
|
33
|
+
|
|
34
|
+
Only after we give a **“Go‑ahead”** comment should you begin work on the MR.
|
|
35
|
+
|
|
36
|
+
## 2️ Follow Our Development Standards
|
|
37
|
+
|
|
38
|
+
Your contribution must meet the project's quality expectations:
|
|
39
|
+
|
|
40
|
+
(WIP)
|
|
41
|
+
|
|
42
|
+
If any of these checks fail, the MR will be returned for revision.
|
|
43
|
+
|
|
44
|
+
## 3️ Submit Your Merge Request
|
|
45
|
+
|
|
46
|
+
When the feature is complete:
|
|
47
|
+
|
|
48
|
+
1. (WIP)
|
|
49
|
+
|
|
50
|
+
## 4️ Review Process
|
|
51
|
+
|
|
52
|
+
- **Automated checks**: CI will automatically reject the MR if linting, tests, or build steps fail.
|
|
53
|
+
- **Human review**: At least one core maintainer will review the code. They may request changes, ask clarifying questions, or suggest improvements.
|
|
54
|
+
- **Approval**: Once all reviewers approve and CI passes, the MR will be merged.
|
|
55
|
+
|
|
56
|
+
> **We reserve the right to reject any MR** that does not meet our development standards, conflicts with the project direction, or introduces regressions. Rejections will be accompanied by constructive feedback so you can adjust and resubmit.
|
|
57
|
+
|
|
58
|
+
## 5️ Post‑Merge Checklist
|
|
59
|
+
|
|
60
|
+
- Verify that the change appears in the next release notes.
|
|
61
|
+
- Close the associated issue (or move it to _Done_).
|
|
62
|
+
- Celebrate 🎉 – you’ve contributed to the project!
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
### Additional Tips (Optional)
|
|
67
|
+
|
|
68
|
+
- **Keep PRs small** – aim for a single logical change per MR.
|
|
69
|
+
- **Write clear commit messages** – follow the Conventional Commits format (`feat: add …`, `fix: resolve …`).
|
|
70
|
+
- **Respect the Code of Conduct** – treat all contributors with respect and professionalism.
|
|
71
|
+
|
|
72
|
+
Thank you for helping make this project better! 🙏
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
<Meta title="Foundation/Getting started" />
|
|
4
|
+
|
|
5
|
+
# <img src="./BmsIcon.png" /> Getting started
|
|
6
|
+
|
|
7
|
+
All the information are located in the Read Me on [Gitlab](https://gitlab.ouest-france.fr/sipa-ouest-france/platform/platform-library-vuejs-bms)
|
|
@@ -2,7 +2,7 @@ import { Meta } from '@storybook/addon-docs/blocks';
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
<Meta title="
|
|
5
|
+
<Meta title="Foundation/Principles" />
|
|
6
6
|
|
|
7
7
|
# <img src="./BmsIcon.png" /> Principles
|
|
8
8
|
|
|
@@ -16,13 +16,13 @@ bms UI focuses on the essentials, we concentrate on what is useful for interface
|
|
|
16
16
|
|
|
17
17
|
A constraint-based design system is designed to offer a consistent user experience across all products that use it. By limiting possible interpretations, this type of design system provides a clear and consistent logic that facilitates understanding and use of the products. Constraints can be applied to visual elements such as colors, typography, and font sizes, as well as interactive elements such as buttons and menus. By using a constraint-based design system, users can interact with products with confidence, knowing that the design elements will be consistent and predictable.
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Documentation of the **bms UI** Design System
|
|
20
20
|
|
|
21
21
|
> **Mission** – Provide a **single Design System** dedicated to the Sipa group’s Back‑Office tools, limiting the use of the Vue framework and offering a constraint‑driven approach to interface design and construction. Goal: reduce costs, ensure visual and functional consistency, and simplify maintenance.
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
|
-
### 1
|
|
25
|
+
### 1️ Context & Objectives
|
|
26
26
|
|
|
27
27
|
- **Who?**
|
|
28
28
|
The bms UI Design System is actually maintained by the frontend team of **bms**.
|
|
@@ -35,7 +35,7 @@ A constraint-based design system is designed to offer a consistent user experien
|
|
|
35
35
|
- **Target audience**
|
|
36
36
|
Front‑end developers, designers, QA engineers, project managers, and anyone involved in creating or maintaining Back‑Office interfaces.
|
|
37
37
|
|
|
38
|
-
### 2
|
|
38
|
+
### 2️ Core Principles
|
|
39
39
|
|
|
40
40
|
#### 2.1 Focused – Essentials First
|
|
41
41
|
|
|
@@ -59,19 +59,19 @@ A constraint-based design system is designed to offer a consistent user experien
|
|
|
59
59
|
|
|
60
60
|
These constraints are **declarative** – they’re baked directly into components (e.g., `mode="danger"` to have a red button), preventing stylistic drift.
|
|
61
61
|
|
|
62
|
-
### 3
|
|
62
|
+
### 3️ Project Architecture
|
|
63
63
|
|
|
64
64
|
- **Single export** – `import BmsButton from '../components/button/BmsButton.vue';`
|
|
65
65
|
- **Integrated Storybook** – Each component has a `*.stories.js` file showcasing the UI and the props & slots for each component.```
|
|
66
66
|
- **Typescript components** - Each component as typed props & events, and the relevant types are exported by the library (e.g. TableHeader, Caption, etc.)
|
|
67
67
|
|
|
68
|
-
### 4
|
|
68
|
+
### 4️ Usage Guide
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
Installation
|
|
71
71
|
|
|
72
72
|
Gitlab documentation https://gitlab.ouest-france.fr/sipa-ouest-france/platform/platform-library-vuejs-bms#installation
|
|
73
73
|
|
|
74
|
-
### 5
|
|
74
|
+
### 5️ Quick FAQ
|
|
75
75
|
|
|
76
76
|
- **Can I add a custom color?**
|
|
77
77
|
**Answer:** No – all colors must come from the defined palette. If a legitimate need arises, open a **Jira** ticket.
|
|
@@ -82,7 +82,7 @@ Gitlab documentation https://gitlab.ouest-france.fr/sipa-ouest-france/platform/p
|
|
|
82
82
|
- **Does the design system support dark mode?**
|
|
83
83
|
**Answer:** No – theming is not available at this time.
|
|
84
84
|
|
|
85
|
-
### 6
|
|
85
|
+
### 6️ Contact & Support
|
|
86
86
|
|
|
87
87
|
- **Teams**: [#🎨bmsUI](https://teams.microsoft.com/l/channel/19%3Au9dPXr-JjoRoaLat-EyS-QEKit1ZzUwQ7G0VrzvDkTE1%40thread.tacv2/%F0%9F%8E%A8bmsUI?groupId=677fd2f9-de86-4bf9-a00c-71817f033ad3&tenantId=a59e9cc9-4ed4-43c4-9f1e-ca78d44b0072&ngc=true&allowXTenantAccess=)
|
|
88
88
|
- **Issues**: [#Jira] (⚠️ WIP)
|