@ouestfrance/sipa-bms-ui 8.22.2 → 8.22.3

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.
Files changed (50) hide show
  1. package/dist/components/button/BmsButton.vue.d.ts +1 -1
  2. package/dist/components/button/BmsIconButton.vue.d.ts +1 -1
  3. package/dist/components/button/UiButton.vue.d.ts +1 -1
  4. package/dist/components/layout/BmsHeaderTitle.vue.d.ts +1 -1
  5. package/dist/components/navigation/BmsBreadcrumb.vue.d.ts +1 -1
  6. package/dist/components/navigation/BmsShortLinkMenu.vue.d.ts +2 -2
  7. package/dist/components/table/BmsPagination.vue.d.ts +2 -2
  8. package/dist/plugins/router-history/router-history.composable.d.ts +1 -1
  9. package/dist/sipa-bms-ui.css +16 -16
  10. package/dist/sipa-bms-ui.es.js +3608 -3142
  11. package/dist/sipa-bms-ui.es.js.map +1 -1
  12. package/dist/sipa-bms-ui.umd.js +3608 -3142
  13. package/dist/sipa-bms-ui.umd.js.map +1 -1
  14. package/package.json +18 -18
  15. package/src/components/button/BmsButton.stories.js +142 -3
  16. package/src/components/form/BmsChip.stories.js +104 -2
  17. package/src/components/form/BmsInputCheckboxCaptionGroup.stories.js +157 -2
  18. package/src/components/form/BmsInputCheckboxGroup.stories.js +119 -2
  19. package/src/components/form/BmsInputCode.stories.js +109 -2
  20. package/src/components/form/BmsInputFile.stories.js +110 -2
  21. package/src/components/form/BmsInputRadioCaptionGroup.stories.js +138 -2
  22. package/src/components/form/BmsInputRadioGroup.stories.js +120 -2
  23. package/src/components/form/BmsInputText.stories.js +269 -1
  24. package/src/components/form/BmsMultiSelect.vue +3 -1
  25. package/src/components/form/BmsSearch.stories.js +89 -2
  26. package/src/components/form/BmsSelect.stories.js +220 -2
  27. package/src/components/form/BmsSelect.vue +5 -3
  28. package/src/components/form/BmsTag.stories.js +119 -3
  29. package/src/components/form/BmsTextArea.stories.js +146 -2
  30. package/src/components/form/RawAutocomplete.vue +3 -1
  31. package/src/components/layout/BmsForm.stories.js +216 -0
  32. package/src/components/layout/BmsHeaderTitle.stories.js +136 -1
  33. package/src/components/table/BmsTable.stories.js +247 -1
  34. package/src/documentation/button/secondaryButton.mdx +114 -3
  35. package/src/documentation/checkboxCaptionGroup.mdx +99 -0
  36. package/src/documentation/checkboxGroup.mdx +99 -0
  37. package/src/documentation/chip.mdx +85 -11
  38. package/src/documentation/inputCode.mdx +97 -0
  39. package/src/documentation/inputFile.mdx +90 -13
  40. package/src/documentation/inputText.mdx +183 -0
  41. package/src/documentation/layout/form.mdx +74 -0
  42. package/src/documentation/layout/headerTitle.mdx +124 -0
  43. package/src/documentation/layout/table.mdx +111 -0
  44. package/src/documentation/radioCaptionGroup.mdx +86 -19
  45. package/src/documentation/radioGroup.mdx +85 -18
  46. package/src/documentation/search.mdx +85 -13
  47. package/src/documentation/select.mdx +137 -16
  48. package/src/documentation/tag.mdx +91 -11
  49. package/src/documentation/textArea.mdx +126 -13
  50. package/src/documentation/fields_text.mdx +0 -31
@@ -1,28 +1,108 @@
1
+ import { Canvas, Meta, Controls } from '@storybook/addon-docs/blocks';
1
2
  import {
2
- Canvas,
3
- Meta,
4
- Story,
5
- Stories,
6
- Controls,
7
- } from '@storybook/addon-docs/blocks';
8
- import { Default as TagDefault } from '../components/form/BmsTag.stories.js';
3
+ PlaygroundTag,
4
+ DoWithClearContent,
5
+ DoWithDismissible,
6
+ DoWithActiveState,
7
+ DoWithDisabledState,
8
+ DoWithShortContent,
9
+ DontLongContent,
10
+ DontEmptyContent,
11
+ DoClearContent,
12
+ DontCantDismissWhenNeeded,
13
+ DoCanDismiss,
14
+ } from '../components/form/BmsTag.stories.js';
9
15
 
10
16
  <Meta title="Documentation/Tag" />
11
17
 
12
18
  # <img src="./BmsIcon.png" /> Tag
13
19
 
14
- Tags are components that allow users to add differents options to forms or interfaces. A tag can be active or desactive by the user and closable (its the principal difference with Chips).
20
+ Tags are interactive components that allow users to add, select, and remove options in forms or interfaces. Tags can be clicked to toggle their active state and can be dismissed (closed) by users. They are commonly used for filters, selections, categories, and removable items. Tags provide a way for users to interact with and manage multiple options in a compact, visual format.
15
21
 
16
22
  ![Tag representation](./tag/CoverTag.png)
17
23
 
18
24
  ## Anatomy
19
25
 
26
+ Tags consist of a container with a border, text content, and an optional dismiss button. They can be in an active or inactive state, and can be disabled. Tags are designed to be interactive elements that users can click to toggle or dismiss.
27
+
20
28
  ![Tag representation](./tag/TagRepresentation.png)
21
29
 
22
30
  ## Component
23
31
 
24
- <Canvas of={TagDefault} args={{ label: 'toto' }} />
32
+ Use the controls below to interact with the component and see how it behaves with different configurations.
33
+
34
+ <Canvas of={PlaygroundTag} />
35
+
36
+ ### Props
37
+
38
+ <Controls of={PlaygroundTag} />
39
+
40
+ ## Usage Examples
41
+
42
+ ### ✅ Do: Tag with clear content
43
+
44
+ Always provide clear, concise content that is easy to understand at a glance.
45
+
46
+ <Canvas of={DoWithClearContent} />
47
+
48
+ ### ✅ Do: Tag with dismissible option
49
+
50
+ Use dismissible tags when users need to remove items, such as filters or selected options.
51
+
52
+ <Canvas of={DoWithDismissible} />
53
+
54
+ ### ✅ Do: Tag with active state
55
+
56
+ Use the active state to indicate that a tag is currently selected or applied. Active tags have a filled background.
57
+
58
+ <Canvas of={DoWithActiveState} />
59
+
60
+ ### ✅ Do: Tag with disabled state
61
+
62
+ Use the disabled state when a tag should be visible but not interactive. This is useful for showing locked or unavailable options.
63
+
64
+ <Canvas of={DoWithDisabledState} />
65
+
66
+ ### ✅ Do: Tag with short content
67
+
68
+ Keep tag content short and concise. Tags are meant to display brief information that users can quickly scan and interact with.
69
+
70
+ <Canvas of={DoWithShortContent} />
71
+
72
+ ## Rules
73
+
74
+ ### ⛔ Don't: Long content
75
+
76
+ Avoid overly long content in tags. Long text makes tags difficult to read, breaks the layout, and defeats the purpose of compact, scannable elements.
77
+
78
+ **❌ Don't:**
79
+
80
+ <Canvas of={DontLongContent} />
81
+
82
+ **✅ Do:**
83
+
84
+ <Canvas of={DoWithShortContent} />
85
+
86
+ ### ⛔ Don't: Empty or unclear content
87
+
88
+ Always provide meaningful content in tags. Empty tags or unclear labels don't provide value to users and make the interface confusing.
89
+
90
+ **❌ Don't:**
91
+
92
+ <Canvas of={DontEmptyContent} />
93
+
94
+ **✅ Do:**
95
+
96
+ <Canvas of={DoClearContent} />
97
+
98
+ ### ⛔ Don't: Tag that cannot be dismissed when it should
99
+
100
+ If a tag represents something that users should be able to remove (like a filter or a selected option), make sure it can be dismissed. Non-dismissible tags should only be used for permanent or required items.
101
+
102
+ **❌ Don't:**
103
+
104
+ <Canvas of={DontCantDismissWhenNeeded} />
25
105
 
26
- ### Table of props
106
+ **✅ Do:**
27
107
 
28
- <Controls of={TagDefault} />
108
+ <Canvas of={DoCanDismiss} />
@@ -1,27 +1,140 @@
1
+ import { Canvas, Meta, Controls } from '@storybook/addon-docs/blocks';
1
2
  import {
2
- Canvas,
3
- Meta,
4
- Story,
5
- Stories,
6
- Controls,
7
- } from '@storybook/addon-docs/blocks';
8
- import { Default as TextAreaDefault } from '../components/form/BmsTextArea.stories.js';
3
+ PlaygroundTextArea,
4
+ DoWithLabel,
5
+ DoWithPlaceholder,
6
+ DoWithCaption,
7
+ DoDisabled,
8
+ DoLoading,
9
+ DontLongLabel,
10
+ DoShortLabel,
11
+ DontNoLabel,
12
+ DontGenericPlaceholder,
13
+ DoSpecificPlaceholder,
14
+ DontNoErrorFeedback,
15
+ DoWithErrorFeedback,
16
+ DontNoCaption,
17
+ DoWithHelpfulCaption,
18
+ } from '../components/form/BmsTextArea.stories.js';
9
19
 
10
20
  <Meta title="Documentation/Fields/Text Area" />
11
21
 
12
22
  # <img src="./BmsIcon.png" /> Text Area
13
23
 
14
- Text area allows users to input and edit multiple lines of text such as paragraphs, comments, or descriptions.
15
- ![InputFile representation](./fields/CoverTextArea.png)
24
+ Text area allows users to input and edit multiple lines of text such as paragraphs, comments, or descriptions. They are essential components for forms that require longer text entries, providing a way for users to enter detailed information, feedback, or multi-line content. Various options can be shown with the field to communicate input requirements and provide feedback.
16
25
 
17
26
  ## Anatomy
18
27
 
19
- ![InputFile representation](./fields/InputTextAreaRepresentation.png)
28
+ Text areas consist of several key elements: a label that describes what information is needed, a textarea field where users type multiple lines of text, placeholder text for guidance, captions for additional information, and error messages for validation feedback.
29
+
30
+ ![](./fields/InputTextAreaRepresentation.png)
20
31
 
21
32
  ## Component
22
33
 
23
- <Canvas of={TextAreaDefault} args={{ label: 'toto' }} />
34
+ Use the controls below to interact with the component and see how it behaves with different configurations.
35
+
36
+ <Canvas of={PlaygroundTextArea} />
37
+
38
+ ### Props
39
+
40
+ <Controls of={PlaygroundTextArea} />
41
+
42
+ ## Usage Examples
43
+
44
+ ### ✅ Do: Simple textarea with label
45
+
46
+ Always provide a clear, descriptive label that explains what information is expected.
47
+
48
+ <Canvas of={DoWithLabel} />
49
+
50
+ ### ✅ Do: Textarea with placeholder
51
+
52
+ Use placeholders to provide examples or format hints. Placeholders disappear when the user starts typing.
53
+
54
+ <Canvas of={DoWithPlaceholder} />
55
+
56
+ ### ✅ Do: Textarea with caption
57
+
58
+ Use captions to provide additional context, help text, or format requirements such as character limits.
59
+
60
+ <Canvas of={DoWithCaption} />
61
+
62
+ ### ✅ Do: Disabled state
63
+
64
+ Use the disabled state when the textarea should not be editable, but the value should still be visible.
65
+
66
+ <Canvas of={DoDisabled} />
67
+
68
+ ### ✅ Do: Loading state
69
+
70
+ Use the loading state to indicate that the textarea is processing data or waiting for a response.
71
+
72
+ <Canvas of={DoLoading} />
73
+
74
+ ### ✅ Do: Textarea with error feedback
75
+
76
+ Always provide clear error messages when validation fails. Help users understand what went wrong and how to fix it.
77
+
78
+ <Canvas of={DoWithErrorFeedback} />
79
+
80
+ ## Rules
81
+
82
+ ### ⛔ Don't: Long labels
83
+
84
+ Avoid overly long labels that make the form difficult to scan. Keep labels concise and clear.
85
+
86
+ **❌ Don't:**
87
+
88
+ <Canvas of={DontLongLabel} />
89
+
90
+ **✅ Do:**
91
+
92
+ <Canvas of={DoShortLabel} />
93
+
94
+ ### ⛔ Don't: Missing labels
95
+
96
+ Always provide a label for accessibility and clarity. Labels help screen readers and provide context.
97
+
98
+ **❌ Don't:**
99
+
100
+ <Canvas of={DontNoLabel} />
101
+
102
+ **✅ Do:**
103
+
104
+ <Canvas of={DoWithLabel} />
105
+
106
+ ### ⛔ Don't: Generic placeholders
107
+
108
+ Avoid generic placeholders like "Enter text" or "Type here". Use specific examples that guide the user.
109
+
110
+ **❌ Don't:**
111
+
112
+ <Canvas of={DontGenericPlaceholder} />
113
+
114
+ **✅ Do:**
115
+
116
+ <Canvas of={DoSpecificPlaceholder} />
117
+
118
+ ### ⛔ Don't: No error feedback
119
+
120
+ Always provide clear error messages when validation fails. Help users understand what went wrong and how to fix it.
121
+
122
+ **❌ Don't:**
123
+
124
+ <Canvas of={DontNoErrorFeedback} />
125
+
126
+ **✅ Do:**
127
+
128
+ <Canvas of={DoWithErrorFeedback} />
129
+
130
+ ### ⛔ Don't: Missing helpful captions
131
+
132
+ When textarea requirements are complex, provide captions to help users understand what's expected.
133
+
134
+ **❌ Don't:**
135
+
136
+ <Canvas of={DontNoCaption} />
24
137
 
25
- ### Table of props
138
+ **✅ Do:**
26
139
 
27
- <Controls of={TextAreaDefault} />
140
+ <Canvas of={DoWithHelpfulCaption} />
@@ -1,31 +0,0 @@
1
- import {
2
- Canvas,
3
- Meta,
4
- Story,
5
- Stories,
6
- Controls,
7
- } from '@storybook/addon-docs/blocks';
8
- import { Default as FieldDefault } from '../plugins/field/FieldComponent.stories.js';
9
- import { Default as TextDefault } from '../components/form/BmsInputText.stories.js';
10
- import BmsInputText from '../components/form/BmsInputText.vue';
11
- import { Default as SelectDefault } from '../components/form/BmsSelect.stories.js';
12
-
13
- <Meta title="Documentation/Fields/Input Text" />
14
-
15
- # <img src="./BmsIcon.png" /> Input Text
16
-
17
- Text fields allow users to input custom text entries with a keyboard. Various options can be shown with the field to communicate the input requirements.
18
-
19
- ![](./fields/CoverInputText.png)
20
-
21
- ## Anatomy
22
-
23
- ![](./fields/InputRepresentation.png)
24
-
25
- ## Component
26
-
27
- <Canvas of={TextDefault} args={{ label: 'toto' }} />
28
-
29
- ### Table of props
30
-
31
- <Controls of={TextDefault} />