@cnamts/synapse 0.0.0-alpha.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/LICENSE +21 -0
- package/README.md +2 -0
- package/dist/design-system-v3.d.ts +246 -0
- package/dist/design-system-v3.js +5425 -0
- package/dist/design-system-v3.umd.cjs +2 -0
- package/dist/style.css +1 -0
- package/package.json +104 -0
- package/src/assets/tokens.scss +500 -0
- package/src/components/Alert/Alert.mdx +36 -0
- package/src/components/Alert/Alert.stories.ts +115 -0
- package/src/components/Alert/Alert.vue +248 -0
- package/src/components/Alert/locales.ts +3 -0
- package/src/components/Alert/tests/Alert.spec.ts +105 -0
- package/src/components/Alert/tests/__snapshots__/Alert.spec.ts.snap +15 -0
- package/src/components/BackBtn/BackBtn.mdx +26 -0
- package/src/components/BackBtn/BackBtn.stories.ts +138 -0
- package/src/components/BackBtn/BackBtn.vue +60 -0
- package/src/components/BackBtn/locales.ts +3 -0
- package/src/components/BackBtn/tests/BackBtn.spec.ts +103 -0
- package/src/components/BackBtn/tests/__snapshots__/BackBtn.spec.ts.snap +9 -0
- package/src/components/BackToTopBtn/BackToTopBtn.mdx +52 -0
- package/src/components/BackToTopBtn/BackToTopBtn.stories.ts +188 -0
- package/src/components/BackToTopBtn/BackToTopBtn.vue +137 -0
- package/src/components/BackToTopBtn/config.ts +12 -0
- package/src/components/BackToTopBtn/locales.ts +3 -0
- package/src/components/BackToTopBtn/tests/BackToTopBtn.spec.ts +173 -0
- package/src/components/BackToTopBtn/tests/__snapshots__/BackToTopBtn.spec.ts.snap +17 -0
- package/src/components/Beta/beta.mdx +5 -0
- package/src/components/CopyBtn/CopyBtn.mdx +38 -0
- package/src/components/CopyBtn/CopyBtn.stories.ts +209 -0
- package/src/components/CopyBtn/CopyBtn.vue +103 -0
- package/src/components/CopyBtn/config.ts +17 -0
- package/src/components/CopyBtn/locales.ts +3 -0
- package/src/components/CopyBtn/tests/CopyBtn.spec.ts +99 -0
- package/src/components/CopyBtn/tests/__snapshots__/CopyBtn.spec.ts.snap +7 -0
- package/src/components/Deprecated/deprecated.mdx +5 -0
- package/src/components/DownloadBtn/DownloadBtn.mdx +94 -0
- package/src/components/DownloadBtn/DownloadBtn.stories.ts +211 -0
- package/src/components/DownloadBtn/DownloadBtn.vue +113 -0
- package/src/components/DownloadBtn/config.ts +13 -0
- package/src/components/DownloadBtn/tests/DownloadBtn.spec.ts +82 -0
- package/src/components/DownloadBtn/tests/__snapshots__/DownloadBtn.spec.ts.snap +17 -0
- package/src/components/DownloadBtn/tests/data/filePromise.ts +53 -0
- package/src/components/DownloadBtn/tests/data/test.json +0 -0
- package/src/components/FranceConnectBtn/FranceConnectBtn.mdx +34 -0
- package/src/components/FranceConnectBtn/FranceConnectBtn.stories.ts +92 -0
- package/src/components/FranceConnectBtn/FranceConnectBtn.vue +154 -0
- package/src/components/FranceConnectBtn/locales.ts +6 -0
- package/src/components/FranceConnectBtn/tests/FranceConnectBtn.spec.ts +62 -0
- package/src/components/FranceConnectBtn/tests/__snapshots__/FranceConnectBtn.spec.ts.snap +36 -0
- package/src/components/LangBtn/LangBtn.mdx +37 -0
- package/src/components/LangBtn/LangBtn.stories.ts +147 -0
- package/src/components/LangBtn/LangBtn.vue +167 -0
- package/src/components/LangBtn/config.ts +17 -0
- package/src/components/LangBtn/locales.ts +3 -0
- package/src/components/LangBtn/tests/Config.spec.ts +24 -0
- package/src/components/LangBtn/tests/LangBtn.spec.ts +283 -0
- package/src/components/LangBtn/tests/__snapshots__/LangBtn.spec.ts.snap +11 -0
- package/src/components/LangBtn/types.d.ts +7 -0
- package/src/components/NotificationBar/NotificationBar.mdx +94 -0
- package/src/components/NotificationBar/NotificationBar.stories.ts +366 -0
- package/src/components/NotificationBar/NotificationBar.vue +296 -0
- package/src/components/NotificationBar/options.ts +15 -0
- package/src/components/NotificationBar/tests/NotificationBar.spec.ts +332 -0
- package/src/components/NotificationBar/tests/__snapshots__/NotificationBar.spec.ts.snap +7 -0
- package/src/components/NotificationBar/types.ts +7 -0
- package/src/components/PageContainer/PageContainer.mdx +29 -0
- package/src/components/PageContainer/PageContainer.stories.ts +115 -0
- package/src/components/PageContainer/PageContainer.vue +68 -0
- package/src/components/PageContainer/tests/PageContainer.spec.ts +56 -0
- package/src/components/PageContainer/tests/__snapshots__/PageContainer.spec.ts.snap +7 -0
- package/src/components/SkipLink/SkipLink.mdx +55 -0
- package/src/components/SkipLink/SkipLink.stories.ts +70 -0
- package/src/components/SkipLink/SkipLink.vue +79 -0
- package/src/components/SkipLink/locales.ts +3 -0
- package/src/components/SkipLink/tests/__snapshots__/skipLink.spec.ts.snap +3 -0
- package/src/components/SkipLink/tests/skipLink.spec.ts +46 -0
- package/src/components/index.ts +8 -0
- package/src/composables/useCustomizableOptions.ts +23 -0
- package/src/designTokens/bootstrapColors.md +66 -0
- package/src/designTokens/cnamColors.md +193 -0
- package/src/designTokens/index.ts +15 -0
- package/src/designTokens/tokens/bootstrap/bootstrapColors.ts +158 -0
- package/src/designTokens/tokens/bootstrap/bootstrapLightTheme.ts +22 -0
- package/src/designTokens/tokens/cnam/cnamColors.ts +171 -0
- package/src/designTokens/tokens/cnam/cnamContextual.ts +58 -0
- package/src/designTokens/tokens/cnam/cnamLightTheme.ts +90 -0
- package/src/designTokens/tokens/cnam/cnamSemantic.ts +87 -0
- package/src/designTokens/tokens/json/contextual-tokens.json +156 -0
- package/src/designTokens/tokens/json/primitives.json +209 -0
- package/src/designTokens/tokens/json/semantic.json +120 -0
- package/src/designTokens/utils/convertGaps.ts +11 -0
- package/src/designTokens/utils/convertSemanticsToken.ts +32 -0
- package/src/designTokens/utils/createFlattenTheme.ts +19 -0
- package/src/designTokens/utils/index.ts +4 -0
- package/src/main.ts +2 -0
- package/src/services/NotificationService.ts +27 -0
- package/src/stories/Fondamentaux/Accessibilite/Accessibilite.mdx +52 -0
- package/src/stories/Fondamentaux/Accessibilite/Accessibilite.stories.ts +36 -0
- package/src/stories/Fondamentaux/Accessibilite/AccessibiliteItems.ts +706 -0
- package/src/stories/Fondamentaux/Accessibilite/constants/ExpertiseLevelEnum.ts +5 -0
- package/src/stories/Fondamentaux/Accessibilite/constants/RGAALevelEnum.ts +4 -0
- package/src/stories/Fondamentaux/EcoConception/EcoConception.mdx +24 -0
- package/src/stories/Fondamentaux/EcoConception/Econception.stories.ts +30 -0
- package/src/stories/Fondamentaux/EcoConception/ecoDesignItems.ts +55 -0
- package/src/stories/GuideDuDev/CommentContribuer.mdx +22 -0
- package/src/stories/GuideDuDev/components.stories.ts +23 -0
- package/src/stories/GuideDuDev/moduleDeNotification.mdx +182 -0
- package/src/stories/GuideDuDev/vuetifyOptions.mdx +72 -0
- package/src/stories/Guidelines/Colors.mdx +220 -0
- package/src/stories/Guidelines/CustomisationEtThemes.mdx +3 -0
- package/src/stories/Guidelines/Introduction.mdx +35 -0
- package/src/stories/Guidelines/Typo.mdx +53 -0
- package/src/stories/Home/Accueil.mdx +7 -0
- package/src/stories/Home/PolitiqueDeConfidentialite.mdx +4 -0
- package/src/stories/Home/synapse.webp +0 -0
- package/src/temp/TestA11y.vue +14 -0
- package/src/temp/TestComponent.vue +37 -0
- package/src/temp/TestDTComponent.vue +93 -0
- package/src/temp/customizableOptions.vue +18 -0
- package/src/temp/gridsTests.vue +54 -0
- package/src/temp/options.json +5 -0
- package/src/types/vuetifyTypes.ts +3 -0
- package/src/utils/convertToUnit/index.ts +16 -0
- package/src/utils/convertToUnit/test/convertToUnit.spec.ts +32 -0
- package/src/utils/functions/copyToClipboard/index.ts +38 -0
- package/src/utils/functions/copyToClipboard/tests/copyToClipboard.spec.ts +104 -0
- package/src/utils/functions/downloadFile/index.ts +37 -0
- package/src/utils/functions/downloadFile/tests/downloadFile.spec.ts +69 -0
- package/src/utils/functions/downloadFile/types.ts +1 -0
|
@@ -0,0 +1,500 @@
|
|
|
1
|
+
// Primitives
|
|
2
|
+
$orange-darken-80: #2d100b;
|
|
3
|
+
$orange-darken-60: #5a2017;
|
|
4
|
+
$orange-darken-40: #862f22;
|
|
5
|
+
$orange-darken-20: #b33f2e;
|
|
6
|
+
$orange-base: #e04f39;
|
|
7
|
+
$orange-lighten-20: #e67261;
|
|
8
|
+
$orange-lighten-40: #ec9588;
|
|
9
|
+
$orange-lighten-60: #f3b9b0;
|
|
10
|
+
$orange-lighten-80: #f9dcd7;
|
|
11
|
+
$orange-lighten-90: #fcedeb;
|
|
12
|
+
$orange-lighten-97: #fefaf9;
|
|
13
|
+
$yellow-darken-80: #302407;
|
|
14
|
+
$yellow-darken-60: #60480e;
|
|
15
|
+
$yellow-darken-40: #906b15;
|
|
16
|
+
$yellow-darken-20: #c08f1c;
|
|
17
|
+
$yellow-base: #f0b323;
|
|
18
|
+
$yellow-lighten-20: #f3c24f;
|
|
19
|
+
$yellow-lighten-40: #f6d17b;
|
|
20
|
+
$yellow-lighten-60: #f9e1a7;
|
|
21
|
+
$yellow-lighten-80: #fcf0d3;
|
|
22
|
+
$yellow-lighten-90: #fdf7e9;
|
|
23
|
+
$yellow-lighten-97: #fffdf8;
|
|
24
|
+
$green-darken-80: #112717;
|
|
25
|
+
$green-darken-60: #224e2d;
|
|
26
|
+
$green-darken-40: #347444;
|
|
27
|
+
$green-darken-20: #459b5a;
|
|
28
|
+
$green-base: #56c271;
|
|
29
|
+
$green-lighten-20: #78ce8d;
|
|
30
|
+
$green-lighten-40: #9adaaa;
|
|
31
|
+
$green-lighten-60: #bbe7c6;
|
|
32
|
+
$green-lighten-80: #ddf3e3;
|
|
33
|
+
$green-lighten-90: #eef9f1;
|
|
34
|
+
$green-lighten-97: #fafdfb;
|
|
35
|
+
$turquoise-darken-80: #00221c;
|
|
36
|
+
$turquoise-darken-60: #004439;
|
|
37
|
+
$turquoise-darken-40: #006755;
|
|
38
|
+
$turquoise-darken-20: #008972;
|
|
39
|
+
$turquoise-base: #00ab8e;
|
|
40
|
+
$turquoise-lighten-20: #33bca5;
|
|
41
|
+
$turquoise-lighten-40: #66cdbb;
|
|
42
|
+
$turquoise-lighten-60: #99ddd2;
|
|
43
|
+
$turquoise-lighten-80: #cceee8;
|
|
44
|
+
$turquoise-lighten-90: #e5f7f4;
|
|
45
|
+
$turquoise-lighten-97: #f7fcfc;
|
|
46
|
+
$blue-darken-80: #020d1f;
|
|
47
|
+
$blue-darken-60: #051a3e;
|
|
48
|
+
$blue-darken-40: #07275c;
|
|
49
|
+
$blue-darken-20: #0a347b;
|
|
50
|
+
$blue-base: #0c419a;
|
|
51
|
+
$blue-lighten-20: #3d67ae;
|
|
52
|
+
$blue-lighten-40: #6d8dc2;
|
|
53
|
+
$blue-lighten-60: #9eb3d7;
|
|
54
|
+
$blue-lighten-80: #ced9eb;
|
|
55
|
+
$blue-lighten-90: #e7ecf5;
|
|
56
|
+
$blue-lighten-97: #f8f9fc;
|
|
57
|
+
$cyan-darken-80: #00212d;
|
|
58
|
+
$cyan-darken-60: #004259;
|
|
59
|
+
$cyan-darken-40: #006386;
|
|
60
|
+
$cyan-darken-20: #0084b2;
|
|
61
|
+
$cyan-base: #00a5df;
|
|
62
|
+
$cyan-lighten-20: #33b7e5;
|
|
63
|
+
$cyan-lighten-40: #66c9ec;
|
|
64
|
+
$cyan-lighten-60: #99dbf2;
|
|
65
|
+
$cyan-lighten-80: #ccedf9;
|
|
66
|
+
$cyan-lighten-90: #e5f6fc;
|
|
67
|
+
$cyan-lighten-97: #f7fcfe;
|
|
68
|
+
$frosted-blue-darken-80: #142327;
|
|
69
|
+
$frosted-blue-darken-60: #28464d;
|
|
70
|
+
$frosted-blue-darken-40: #3d6874;
|
|
71
|
+
$frosted-blue-darken-20: #518b9a;
|
|
72
|
+
$frosted-blue-base: #65aec1;
|
|
73
|
+
$frosted-blue-lighten-20: #84becd;
|
|
74
|
+
$frosted-blue-lighten-40: #a3ceda;
|
|
75
|
+
$frosted-blue-lighten-60: #c1dfe6;
|
|
76
|
+
$frosted-blue-lighten-80: #e0eff3;
|
|
77
|
+
$frosted-blue-lighten-90: #f0f7f9;
|
|
78
|
+
$frosted-blue-lighten-97: #fafdfd;
|
|
79
|
+
$parma-darken-80: #171c26;
|
|
80
|
+
$parma-darken-60: #2f384d;
|
|
81
|
+
$parma-darken-40: #465473;
|
|
82
|
+
$parma-darken-20: #5e709a;
|
|
83
|
+
$parma-base: #758cc0;
|
|
84
|
+
$parma-lighten-20: #91a3cd;
|
|
85
|
+
$parma-lighten-40: #acbad9;
|
|
86
|
+
$parma-lighten-60: #c8d1e6;
|
|
87
|
+
$parma-lighten-80: #e3e8f2;
|
|
88
|
+
$parma-lighten-90: #f1f3f9;
|
|
89
|
+
$parma-lighten-97: #fbfcfd;
|
|
90
|
+
$mauve-darken-80: #201224;
|
|
91
|
+
$mauve-darken-60: #402449;
|
|
92
|
+
$mauve-darken-40: #60376d;
|
|
93
|
+
$mauve-darken-20: #804992;
|
|
94
|
+
$mauve-base: #a05bb6;
|
|
95
|
+
$mauve-lighten-20: #b37cc5;
|
|
96
|
+
$mauve-lighten-40: #c69dd3;
|
|
97
|
+
$mauve-lighten-60: #d9bde2;
|
|
98
|
+
$mauve-lighten-80: #ecdef0;
|
|
99
|
+
$mauve-lighten-90: #f5eff8;
|
|
100
|
+
$mauve-lighten-97: #fcfafd;
|
|
101
|
+
$pink-darken-80: #2d051a;
|
|
102
|
+
$pink-darken-60: #5a0a34;
|
|
103
|
+
$pink-darken-40: #87104d;
|
|
104
|
+
$pink-darken-20: #b41567;
|
|
105
|
+
$pink-base: #e11a81;
|
|
106
|
+
$pink-lighten-20: #e7489a;
|
|
107
|
+
$pink-lighten-40: #ed76b3;
|
|
108
|
+
$pink-lighten-60: #f3a3cd;
|
|
109
|
+
$pink-lighten-80: #f9d1e6;
|
|
110
|
+
$pink-lighten-90: #fce8f2;
|
|
111
|
+
$pink-lighten-97: #fef8fb;
|
|
112
|
+
$brick-darken-80: #291112;
|
|
113
|
+
$brick-darken-60: #522224;
|
|
114
|
+
$brick-darken-40: #7b3237;
|
|
115
|
+
$brick-darken-20: #a44349;
|
|
116
|
+
$brick-base: #cd545b;
|
|
117
|
+
$brick-lighten-20: #d7767c;
|
|
118
|
+
$brick-lighten-40: #e1989d;
|
|
119
|
+
$brick-lighten-60: #ebbbbd;
|
|
120
|
+
$brick-lighten-80: #f5ddde;
|
|
121
|
+
$brick-lighten-90: #faeeef;
|
|
122
|
+
$brick-lighten-97: #fdfafa;
|
|
123
|
+
$grey-darken-80: #111212;
|
|
124
|
+
$grey-darken-60: #222324;
|
|
125
|
+
$grey-darken-40: #323535;
|
|
126
|
+
$grey-darken-20: #434647;
|
|
127
|
+
$grey-base: #545859;
|
|
128
|
+
$grey-lighten-20: #76797a;
|
|
129
|
+
$grey-lighten-40: #989b9b;
|
|
130
|
+
$grey-lighten-60: #bbbcbd;
|
|
131
|
+
$grey-lighten-80: #dddede;
|
|
132
|
+
$grey-lighten-90: #eeeeee;
|
|
133
|
+
$grey-lighten-97: #fafafa;
|
|
134
|
+
$white-20: rgba(255, 255, 255, 0.2000);
|
|
135
|
+
$white-38: rgba(255, 255, 255, 0.3800);
|
|
136
|
+
$white-40: rgba(255, 255, 255, 0.4000);
|
|
137
|
+
$white-70: rgba(255, 255, 255, 0.7000);
|
|
138
|
+
$white-base: #ffffff;
|
|
139
|
+
$white-08: rgba(255, 255, 255, 0.0800);
|
|
140
|
+
$white-00: rgba(255, 255, 255, 0.0000);
|
|
141
|
+
$none-value: undefined;
|
|
142
|
+
$transparent-blue-18: rgba(12, 65, 154, 0.1800);
|
|
143
|
+
$transparent-blue-08: rgba(12, 65, 154, 0.0800);
|
|
144
|
+
$transparent-blue-00: rgba(12, 65, 154, 0.0000);
|
|
145
|
+
|
|
146
|
+
// Semantic Tokens
|
|
147
|
+
$primary-darker-2: #07275c;
|
|
148
|
+
$primary-darker: #0a347b;
|
|
149
|
+
$primary-base: #0c419a;
|
|
150
|
+
$primary-light: #3d67ae;
|
|
151
|
+
$primary-lighter-2: #9eb3d7;
|
|
152
|
+
$primary-lighter-3: #ced9eb;
|
|
153
|
+
$primary-lighter-4: #e7ecf5;
|
|
154
|
+
$primary-lighter-5: #f8f9fc;
|
|
155
|
+
$neutral-black: #222324;
|
|
156
|
+
$neutral-black-lighter: #545859;
|
|
157
|
+
$neutral-black-lighter-2: #989b9b;
|
|
158
|
+
$neutral-grey: #dddede;
|
|
159
|
+
$neutral-white: #ffffff;
|
|
160
|
+
$neutral-white-alpha: rgba(255, 255, 255, 0.7);
|
|
161
|
+
$neutral-white-alpha-lighter: rgba(255, 255, 255, 0.4);
|
|
162
|
+
$neutral-white-alpha-lighter-2: rgba(255, 255, 255, 0.2);
|
|
163
|
+
$neutral-white-alpha-lighter-3: rgba(255, 255, 255, 0.08);
|
|
164
|
+
$info-info-lightest: #e7ecf5;
|
|
165
|
+
$info-info-lighter: #ced9eb;
|
|
166
|
+
$info-default: #0c419a;
|
|
167
|
+
$success-lightest: #e5f7f4;
|
|
168
|
+
$success-lighter: #cceee8;
|
|
169
|
+
$success-default: #56c271;
|
|
170
|
+
$success-darker: #224e2d;
|
|
171
|
+
$warning-lightest: #fdf7e9;
|
|
172
|
+
$warning-lighter: #fcf0d3;
|
|
173
|
+
$warning-default: #f0b323;
|
|
174
|
+
$warning-darker: #60480e;
|
|
175
|
+
$danger-lightest: #fcedeb;
|
|
176
|
+
$danger-lighter: #f9dcd7;
|
|
177
|
+
$danger-default: #b33f2e;
|
|
178
|
+
$user-professionnel: #66c9ec;
|
|
179
|
+
$user-assure: #ed76b3;
|
|
180
|
+
$user-entreprise: #f0b323;
|
|
181
|
+
|
|
182
|
+
// Contextual Tokens
|
|
183
|
+
$colors-background: #ffffff;
|
|
184
|
+
$colors-border: #dddddd;
|
|
185
|
+
$colors-text: #333333;
|
|
186
|
+
$colors-icon: #666666;
|
|
187
|
+
$colors-overlay: rgba(0, 0, 0, 0.5);
|
|
188
|
+
$colors-interactive: #007bff;
|
|
189
|
+
$gap-0: 0;
|
|
190
|
+
$gap-1: 4px;
|
|
191
|
+
$gap-2: 8px;
|
|
192
|
+
$gap-3: 12px;
|
|
193
|
+
$gap-4: 16px;
|
|
194
|
+
$gap-5: 20px;
|
|
195
|
+
$gap-6: 24px;
|
|
196
|
+
$gap-7: 28px;
|
|
197
|
+
$gap-8: 32px;
|
|
198
|
+
$gap-9: 36px;
|
|
199
|
+
$gap-10: 40px;
|
|
200
|
+
$gap-11: 44px;
|
|
201
|
+
$gap-12: 48px;
|
|
202
|
+
$gap-13: 52px;
|
|
203
|
+
$gap-14: 56px;
|
|
204
|
+
$gap-15: 60px;
|
|
205
|
+
$gap-16: 64px;
|
|
206
|
+
$icon-size-xsmall: 8px;
|
|
207
|
+
$icon-size-small: 16px;
|
|
208
|
+
$icon-size-default: 24px;
|
|
209
|
+
$icon-size-large: 32px;
|
|
210
|
+
$radius-rounded-0: 0;
|
|
211
|
+
$radius-rounded: 4px;
|
|
212
|
+
$radius-rounded-lg: 8px;
|
|
213
|
+
$radius-rounded-pill: 64px;
|
|
214
|
+
$padding-0: 0;
|
|
215
|
+
$padding-2: 8px;
|
|
216
|
+
$padding-3: 12px;
|
|
217
|
+
$padding-4: 16px;
|
|
218
|
+
$padding-6: 24px;
|
|
219
|
+
$padding-8: 32px;
|
|
220
|
+
$padding-10: 40px;
|
|
221
|
+
$padding-14: 56px;
|
|
222
|
+
$padding-16: 64px;
|
|
223
|
+
$font-size-title: 24px;
|
|
224
|
+
$font-size-alt-title: 20px;
|
|
225
|
+
$font-size-body-text: 16px;
|
|
226
|
+
$font-size-link-label: 14px;
|
|
227
|
+
|
|
228
|
+
// Additional Contextual Tokens
|
|
229
|
+
$colors-background-main: #e7ecf5;
|
|
230
|
+
$colors-background-surface: #ffffff;
|
|
231
|
+
$colors-background-main-alt: #ffffff;
|
|
232
|
+
$colors-background-surface-alt: #e7ecf5;
|
|
233
|
+
$colors-background-raised: #f8f9fc;
|
|
234
|
+
$colors-background-accent: #0c419a;
|
|
235
|
+
$colors-background-accent-contrasted: #07275c;
|
|
236
|
+
$colors-background-accent-alt: #111212;
|
|
237
|
+
$colors-background-info: #ced9eb;
|
|
238
|
+
$colors-background-info-subdued: #e7ecf5;
|
|
239
|
+
$colors-background-info-contrasted: #0c419a;
|
|
240
|
+
$colors-background-success: #cceee8;
|
|
241
|
+
$colors-background-success-subdued: #e5f7f4;
|
|
242
|
+
$colors-background-success-contrasted: #56c271;
|
|
243
|
+
$colors-background-warning: #fcf0d3;
|
|
244
|
+
$colors-background-warning-subdued: #fdf7e9;
|
|
245
|
+
$colors-background-warning-contrasted: #f0b323;
|
|
246
|
+
$colors-background-error: #f9dcd7;
|
|
247
|
+
$colors-background-error-subdued: #fcedeb;
|
|
248
|
+
$colors-background-error-contrasted: #b33f2e;
|
|
249
|
+
$colors-background-disabled: #dddede;
|
|
250
|
+
$colors-background-disabled-ondark: rgba(255, 255, 255, 0.0800);
|
|
251
|
+
$colors-background-assure: #ed76b3;
|
|
252
|
+
$colors-background-professionnel: #66c9ec;
|
|
253
|
+
$colors-background-entreprise: #f0b323;
|
|
254
|
+
|
|
255
|
+
$colors-border-darker: #222324;
|
|
256
|
+
$colors-border-base: #989b9b;
|
|
257
|
+
$colors-border-subdued: #dddede;
|
|
258
|
+
$colors-border-accent: #0c419a;
|
|
259
|
+
$colors-border-accent-contrasted: #07275c;
|
|
260
|
+
$colors-border-accent-ondark: #ffffff;
|
|
261
|
+
$colors-border-info: #0c419a;
|
|
262
|
+
$colors-border-success: #224e2d;
|
|
263
|
+
$colors-border-warning: #60480e;
|
|
264
|
+
$colors-border-error: #b33f2e;
|
|
265
|
+
$colors-border-ondark: rgba(255, 255, 255, 0.7);
|
|
266
|
+
$colors-border-disabled: #dddede;
|
|
267
|
+
$colors-border-disabled-ondark: rgba(255, 255, 255, 0.4);
|
|
268
|
+
|
|
269
|
+
$colors-text-base: #222324;
|
|
270
|
+
$colors-text-accent: #0c419a;
|
|
271
|
+
$colors-text-accent-contrasted: #07275c;
|
|
272
|
+
$colors-text-subdued: #545859;
|
|
273
|
+
$colors-text-info: #0c419a;
|
|
274
|
+
$colors-text-success: #224e2d;
|
|
275
|
+
$colors-text-warning: #60480e;
|
|
276
|
+
$colors-text-error: #b33f2e;
|
|
277
|
+
$colors-text-disabled: #989b9b;
|
|
278
|
+
$colors-text-ondark: #ffffff;
|
|
279
|
+
$colors-text-subdued-ondark: rgba(255, 255, 255, 0.7);
|
|
280
|
+
$colors-text-disabled-ondark: rgba(255, 255, 255, 0.4);
|
|
281
|
+
|
|
282
|
+
$colors-icon-base: #222324;
|
|
283
|
+
$colors-icon-subdued: #545859;
|
|
284
|
+
$colors-icon-subdued-ondark: rgba(255, 255, 255, 0.7);
|
|
285
|
+
$colors-icon-accent: #0c419a;
|
|
286
|
+
$colors-icon-accent-contrasted: #07275c;
|
|
287
|
+
$colors-icon-info: #0c419a;
|
|
288
|
+
$colors-icon-success: #224e2d;
|
|
289
|
+
$colors-icon-warning: #60480e;
|
|
290
|
+
$colors-icon-error: #b33f2e;
|
|
291
|
+
$colors-icon-ondark: #ffffff;
|
|
292
|
+
$colors-icon-disabled: #989b9b;
|
|
293
|
+
$colors-icon-disabled-ondark: rgba(255, 255, 255, 0.4);
|
|
294
|
+
|
|
295
|
+
$colors-overlay-fullpage: #989b9b;
|
|
296
|
+
$colors-overlay-ondark: #ffffff;
|
|
297
|
+
$colors-overlay-onlight: #0c419a;
|
|
298
|
+
|
|
299
|
+
$colors-interactive-default: rgba(255, 255, 255, 0.0000);
|
|
300
|
+
$colors-interactive-hover: #e7ecf5;
|
|
301
|
+
$colors-interactive-pressed: #ced9eb;
|
|
302
|
+
$colors-interactive-focus: #e7ecf5;
|
|
303
|
+
$colors-interactive-disabled: rgba(255, 255, 255, 0.0000);
|
|
304
|
+
$colors-interactive-hover-on-selected: #ced9eb;
|
|
305
|
+
|
|
306
|
+
$padding-0: 0;
|
|
307
|
+
$padding-2: 8px;
|
|
308
|
+
$padding-3: 12px;
|
|
309
|
+
$padding-4: 16px;
|
|
310
|
+
$padding-6: 24px;
|
|
311
|
+
$padding-8: 32px;
|
|
312
|
+
$padding-10: 40px;
|
|
313
|
+
$padding-14: 56px;
|
|
314
|
+
$padding-16: 64px;
|
|
315
|
+
|
|
316
|
+
$heading-1-font-size: 24px;
|
|
317
|
+
$heading-2-font-size: 20px;
|
|
318
|
+
$heading-3-font-size: 16px;
|
|
319
|
+
$heading-4-font-size: 14px;
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
.title {
|
|
323
|
+
font-size: $font-size-title !important;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.alt-title {
|
|
327
|
+
font-size: $font-size-alt-title !important;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.body-text {
|
|
331
|
+
font-size: $font-size-body-text !important;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.link-label {
|
|
335
|
+
font-size: $font-size-link-label !important;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
h1 {
|
|
339
|
+
font-size: 32px !important;
|
|
340
|
+
line-height: 130% !important;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.h1-bold {
|
|
344
|
+
font-size: 32px !important;
|
|
345
|
+
font-weight: bold !important;
|
|
346
|
+
line-height: 130% !important;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
h2 {
|
|
350
|
+
font-size: 28px !important;
|
|
351
|
+
line-height: 130% !important;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.h2-bold {
|
|
355
|
+
font-size: 28px !important;
|
|
356
|
+
font-weight: bold !important;
|
|
357
|
+
line-height: 130% !important;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
h3 {
|
|
361
|
+
font-size: 24px !important;
|
|
362
|
+
line-height: 130% !important;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.h3-bold {
|
|
366
|
+
font-size: 24px !important;
|
|
367
|
+
font-weight: bold !important;
|
|
368
|
+
line-height: 130% !important;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
h4 {
|
|
372
|
+
font-size: 20px !important;
|
|
373
|
+
line-height: 130% !important;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.h4-bold {
|
|
377
|
+
font-size: 20px !important;
|
|
378
|
+
font-weight: bold !important;
|
|
379
|
+
line-height: 130% !important;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.display-1 {
|
|
383
|
+
font-size: 40px !important;
|
|
384
|
+
line-height: 130% !important;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.display-1-bold {
|
|
388
|
+
font-size: 40px !important;
|
|
389
|
+
font-weight: bold !important;
|
|
390
|
+
line-height: 130% !important;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.display-2 {
|
|
394
|
+
font-size: 30px !important;
|
|
395
|
+
line-height: 130% !important;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.display-2-bold {
|
|
399
|
+
font-size: 30px !important;
|
|
400
|
+
font-weight: bold !important;
|
|
401
|
+
line-height: 130% !important;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
// espacement verticaux des elements
|
|
405
|
+
|
|
406
|
+
$spacing-none: 0;
|
|
407
|
+
$spacing-xx-small: 4px;
|
|
408
|
+
$spacing-x-small: 8px;
|
|
409
|
+
$spacing-small: 16px;
|
|
410
|
+
$spacing-medium: 24px;
|
|
411
|
+
$spacing-large: 32px;
|
|
412
|
+
$spacing-x-large: 40px;
|
|
413
|
+
$spacing-xx-large: 56px;
|
|
414
|
+
$spacing-xxx-large: 64px;
|
|
415
|
+
$spacing-huge: 80px;
|
|
416
|
+
|
|
417
|
+
// espacement horizontaux des elements
|
|
418
|
+
|
|
419
|
+
$spacing-horizontal-none: 0;
|
|
420
|
+
$spacing-horizontal-xx-small: 4px;
|
|
421
|
+
$spacing-horizontal-x-small: 8px;
|
|
422
|
+
$spacing-horizontal-small: 16px;
|
|
423
|
+
$spacing-horizontal-medium: 24px;
|
|
424
|
+
$spacing-horizontal-large: 32px;
|
|
425
|
+
$spacing-horizontal-x-large: 40px;
|
|
426
|
+
$spacing-horizontal-xx-large: 56px;
|
|
427
|
+
$spacing-horizontal-xxx-large: 64px;
|
|
428
|
+
$spacing-horizontal-huge: 80px;
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
// Surcharger toutes les élévations pour utiliser uniquement l'élévation 02
|
|
432
|
+
.elevation-0,
|
|
433
|
+
.elevation-1,
|
|
434
|
+
.elevation-2,
|
|
435
|
+
.elevation-3,
|
|
436
|
+
.elevation-4,
|
|
437
|
+
.elevation-5,
|
|
438
|
+
.elevation-6,
|
|
439
|
+
.elevation-7,
|
|
440
|
+
.elevation-8,
|
|
441
|
+
.elevation-9,
|
|
442
|
+
.elevation-10,
|
|
443
|
+
.elevation-11,
|
|
444
|
+
.elevation-12,
|
|
445
|
+
.elevation-13,
|
|
446
|
+
.elevation-14,
|
|
447
|
+
.elevation-15,
|
|
448
|
+
.elevation-16,
|
|
449
|
+
.elevation-17,
|
|
450
|
+
.elevation-18,
|
|
451
|
+
.elevation-19,
|
|
452
|
+
.elevation-20,
|
|
453
|
+
.elevation-21,
|
|
454
|
+
.elevation-22,
|
|
455
|
+
.elevation-23,
|
|
456
|
+
.elevation-24 {
|
|
457
|
+
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12) !important;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
// global.scss
|
|
461
|
+
|
|
462
|
+
// Variables pour les largeurs des conteneurs
|
|
463
|
+
$container-mobile-max-width: 600px;
|
|
464
|
+
$container-tablet-max-width: 960px;
|
|
465
|
+
$container-desktop-max-width: 960px;
|
|
466
|
+
|
|
467
|
+
// Conteneur général
|
|
468
|
+
.page-container {
|
|
469
|
+
text-align: center;
|
|
470
|
+
margin: 0 auto; // Centrer les conteneurs
|
|
471
|
+
padding: 40px 40px 56px 56px;
|
|
472
|
+
width: 1160px;
|
|
473
|
+
// Mobile Styles
|
|
474
|
+
@media (max-width: 600px) {
|
|
475
|
+
max-width: $container-mobile-max-width;
|
|
476
|
+
padding: 40px 24px 80px;
|
|
477
|
+
display: grid;
|
|
478
|
+
grid-template-columns: repeat(3, 1fr);
|
|
479
|
+
grid-gap: 24px;
|
|
480
|
+
width: 80%;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
// Tablet Styles
|
|
484
|
+
@media (min-width: 601px) and (max-width: 960px) {
|
|
485
|
+
max-width: $container-tablet-max-width;
|
|
486
|
+
width: 80%;
|
|
487
|
+
display: grid;
|
|
488
|
+
grid-template-columns: repeat(6, 1fr);
|
|
489
|
+
grid-gap: 24px;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
// Desktop Styles
|
|
493
|
+
@media (min-width: 960px) {
|
|
494
|
+
max-width: $container-desktop-max-width;
|
|
495
|
+
width: 100%;
|
|
496
|
+
display: grid;
|
|
497
|
+
grid-template-columns: repeat(12, 1fr);
|
|
498
|
+
grid-gap: 24px;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {Controls, Canvas, Meta, Source} from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import * as AlertStories from './Alert.stories';
|
|
4
|
+
|
|
5
|
+
<Meta of={AlertStories} />
|
|
6
|
+
|
|
7
|
+
# AlertWrapper
|
|
8
|
+
|
|
9
|
+
Le composant `AlertWrapper` est utilisé pour afficher une alerte à l’utilisateur.
|
|
10
|
+
|
|
11
|
+
<Canvas of={AlertStories.Default} />
|
|
12
|
+
|
|
13
|
+
# API
|
|
14
|
+
|
|
15
|
+
<Controls of={AlertStories.Default} />
|
|
16
|
+
|
|
17
|
+
# Exemple d'utilisation
|
|
18
|
+
|
|
19
|
+
<Source dark code={`
|
|
20
|
+
<script setup lang="ts">
|
|
21
|
+
import Alert from '@/components/Alert/Alert.vue'
|
|
22
|
+
import { ref } from 'vue'
|
|
23
|
+
|
|
24
|
+
const showAlert = ref(true);
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<div class="d-flex flex-wrap align-center justify-center">
|
|
29
|
+
<Alert v-model="showAlert" type="warning" variant="tonal" :closable="true">
|
|
30
|
+
<template #default>This is a warning alert</template>
|
|
31
|
+
</Alert>
|
|
32
|
+
|
|
33
|
+
<VBtn v-if="!showAlert" color="primary" @click="showAlert = true" class="ma-6">Réinitialiser</VBtn>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
`} />
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import Alert from './Alert.vue'
|
|
3
|
+
import { VBtn } from 'vuetify/components'
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Components/Alert',
|
|
7
|
+
component: Alert,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'fullscreen',
|
|
10
|
+
controls: { exclude: ['prependIcon', 'dismissAlert'] },
|
|
11
|
+
},
|
|
12
|
+
args: {
|
|
13
|
+
modelValue: true,
|
|
14
|
+
},
|
|
15
|
+
argTypes: {
|
|
16
|
+
type: {
|
|
17
|
+
options: ['info', 'warning', 'success', 'error'],
|
|
18
|
+
control: { type: 'select' },
|
|
19
|
+
default: 'info',
|
|
20
|
+
},
|
|
21
|
+
variant: {
|
|
22
|
+
options: ['outlined', 'tonal'],
|
|
23
|
+
control: { type: 'select' },
|
|
24
|
+
default: 'outlined',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
} as Meta<typeof Alert>
|
|
28
|
+
|
|
29
|
+
export default meta
|
|
30
|
+
|
|
31
|
+
type Story = StoryObj<typeof meta>
|
|
32
|
+
|
|
33
|
+
export const Default: Story = {
|
|
34
|
+
args: {
|
|
35
|
+
modelValue: true,
|
|
36
|
+
type: 'success',
|
|
37
|
+
closable: true,
|
|
38
|
+
variant: 'tonal',
|
|
39
|
+
default: 'Alert content',
|
|
40
|
+
},
|
|
41
|
+
render: (args) => {
|
|
42
|
+
return {
|
|
43
|
+
components: { Alert, VBtn },
|
|
44
|
+
setup() {
|
|
45
|
+
return { args }
|
|
46
|
+
},
|
|
47
|
+
template: `
|
|
48
|
+
<div class="d-flex flex-wrap align-center justify-center">
|
|
49
|
+
<Alert v-model="args.modelValue" :type="args.type" :variant="args.variant" :closable="args.closable">
|
|
50
|
+
<template #default>{{ args.default }}</template>
|
|
51
|
+
</Alert>
|
|
52
|
+
<VBtn v-if="!args.modelValue" color="primary" @click="args.modelValue = true" class="ma-6">
|
|
53
|
+
Réinitialiser
|
|
54
|
+
</VBtn>
|
|
55
|
+
</div>
|
|
56
|
+
`,
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const Outlined: Story = {
|
|
62
|
+
args: {
|
|
63
|
+
type: 'warning',
|
|
64
|
+
closable: true,
|
|
65
|
+
variant: 'outlined',
|
|
66
|
+
default: 'Alert content',
|
|
67
|
+
},
|
|
68
|
+
render: (args) => {
|
|
69
|
+
return {
|
|
70
|
+
components: { Alert, VBtn },
|
|
71
|
+
setup() {
|
|
72
|
+
return { args }
|
|
73
|
+
},
|
|
74
|
+
template: `
|
|
75
|
+
<div class="d-flex flex-wrap align-center justify-center">
|
|
76
|
+
<Alert v-model="args.modelValue" :type="args.type" :variant="args.variant" :closable="args.closable">
|
|
77
|
+
<template #default>{{ args.default }}</template>
|
|
78
|
+
</Alert>
|
|
79
|
+
<VBtn v-if="!args.modelValue" color="primary" @click="args.modelValue = true" class="ma-6">
|
|
80
|
+
Réinitialiser
|
|
81
|
+
</VBtn>
|
|
82
|
+
</div>
|
|
83
|
+
`,
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export const SlotIcon: Story = {
|
|
89
|
+
args: {
|
|
90
|
+
type: 'success',
|
|
91
|
+
closable: true,
|
|
92
|
+
variant: 'tonal',
|
|
93
|
+
default: 'Alert content',
|
|
94
|
+
icon: 'M21.1,12.5L22.5,13.91L15.97,20.5L12.5,17L13.9,15.59L15.97,17.67L21.1,12.5M10,17L13,20H3V18C3,15.79 6.58,14 11,14L12.89,14.11L10,17M11,4A4,4 0 0,1 15,8A4,4 0 0,1 11,12A4,4 0 0,1 7,8A4,4 0 0,1 11,4Z',
|
|
95
|
+
},
|
|
96
|
+
render: (args) => {
|
|
97
|
+
return {
|
|
98
|
+
components: { Alert, VBtn },
|
|
99
|
+
setup() {
|
|
100
|
+
return { args }
|
|
101
|
+
},
|
|
102
|
+
template: `
|
|
103
|
+
<div class="d-flex flex-wrap align-center justify-center">
|
|
104
|
+
<Alert v-model="args.modelValue" :type="args.type" :variant="args.variant" :closable="args.closable">
|
|
105
|
+
<template #default>{{ args.default }}</template>
|
|
106
|
+
<template #icon>{{ args.icon }}</template>
|
|
107
|
+
</Alert>
|
|
108
|
+
<VBtn v-if="!args.modelValue" color="primary" @click="args.modelValue = true" class="ma-6">
|
|
109
|
+
Réinitialiser
|
|
110
|
+
</VBtn>
|
|
111
|
+
</div>
|
|
112
|
+
`,
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
}
|