@cnamts/synapse 0.0.7-alpha → 0.0.9-alpha
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/design-system-v3.d.ts +785 -372
- package/dist/design-system-v3.js +4993 -3357
- package/dist/design-system-v3.umd.cjs +1 -10
- package/dist/style.css +1 -1
- package/package.json +10 -2
- package/src/assets/settings.scss +2 -2
- package/src/assets/tokens.scss +107 -112
- package/src/components/BackBtn/BackBtn.vue +4 -4
- package/src/components/BackToTopBtn/BackToTopBtn.vue +1 -0
- package/src/components/CollapsibleList/CollapsibleList.mdx +1 -1
- package/src/components/CollapsibleList/CollapsibleList.vue +43 -44
- package/src/components/ContextualMenu/Accessibilite.mdx +14 -0
- package/src/components/ContextualMenu/Accessibilite.stories.ts +191 -0
- package/src/components/ContextualMenu/AccessibiliteItems.ts +89 -0
- package/src/components/ContextualMenu/ContextualMenu.mdx +118 -0
- package/src/components/ContextualMenu/ContextualMenu.stories.ts +430 -0
- package/src/components/ContextualMenu/ContextualMenu.vue +101 -0
- package/src/components/ContextualMenu/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/ContextualMenu/tests/ContextualMenu.spec.ts +115 -0
- package/src/components/ContextualMenu/tests/__snapshots__/ContextualMenu.spec.ts.snap +10 -0
- package/src/components/ContextualMenu/types.ts +5 -0
- package/src/components/CookieBanner/CookieBanner.stories.ts +1 -2
- package/src/components/CookieBanner/CookieBanner.vue +13 -10
- package/src/components/CookieBanner/tests/__snapshots__/CookieBanner.spec.ts.snap +17 -15
- package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +6 -1
- package/src/components/CookiesSelection/CookiesInformation/locales.ts +1 -0
- package/src/components/CookiesSelection/CookiesTable/CookiesTable.vue +1 -0
- package/src/components/CookiesSelection/tests/__snapshots__/CookiesSelection.spec.ts.snap +17 -15
- package/src/components/CopyBtn/CopyBtn.vue +7 -7
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.vue +26 -26
- package/src/components/Customs/SyInputSelect/SyInputSelect.vue +24 -24
- package/src/components/Customs/SySelect/SySelect.stories.ts +7 -7
- package/src/components/Customs/SySelect/SySelect.vue +36 -30
- package/src/components/Customs/SySelect/tests/SySelect.spec.ts +2 -2
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +187 -2
- package/src/components/Customs/SyTextField/SyTextField.vue +185 -16
- package/src/components/Customs/SyTextField/tests/SyTextField.spec.ts +2 -4
- package/src/components/Customs/SyTextField/tests/__snapshots__/SyTextField.spec.ts.snap +18 -16
- package/src/components/Customs/SyTextField/types.d.ts +2 -2
- package/src/components/DataList/DataList.stories.ts +3 -2
- package/src/components/DataList/DataList.vue +1 -1
- package/src/components/DataListGroup/DataListGroup.stories.ts +3 -2
- package/src/components/DataListItem/DataListItem.vue +12 -12
- package/src/components/DatePicker/DatePicker.mdx +191 -0
- package/src/components/DatePicker/DatePicker.stories.ts +787 -0
- package/src/components/DatePicker/DatePicker.vue +560 -0
- package/src/components/DatePicker/DateTextInput.vue +409 -0
- package/src/components/DatePicker/tests/DatePicker.spec.ts +266 -0
- package/src/components/DialogBox/DialogBox.mdx +28 -2
- package/src/components/DialogBox/DialogBox.stories.ts +2 -2
- package/src/components/DialogBox/DialogBox.vue +3 -2
- package/src/components/DownloadBtn/DownloadBtn.vue +2 -1
- package/src/components/ExternalLinks/Accessibilite.mdx +14 -0
- package/src/components/ExternalLinks/Accessibilite.stories.ts +191 -0
- package/src/components/ExternalLinks/AccessibiliteItems.ts +197 -0
- package/src/components/ExternalLinks/ExternalLinks.mdx +86 -0
- package/src/components/ExternalLinks/ExternalLinks.stories.ts +553 -0
- package/src/components/ExternalLinks/ExternalLinks.vue +200 -0
- package/src/components/ExternalLinks/config.ts +34 -0
- package/src/components/ExternalLinks/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/ExternalLinks/locales.ts +4 -0
- package/src/components/ExternalLinks/tests/ExternalLinks.spec.ts +154 -0
- package/src/components/ExternalLinks/tests/__snapshots__/ExternalLinks.spec.ts.snap +159 -0
- package/src/components/FileUpload/FileUpload.mdx +165 -0
- package/src/components/FileUpload/FileUpload.stories.ts +429 -0
- package/src/components/FileUpload/FileUpload.vue +195 -0
- package/src/components/FileUpload/FileUploadContent.vue +109 -0
- package/src/components/FileUpload/locales.ts +10 -0
- package/src/components/FileUpload/tests/FileUpload.spec.ts +332 -0
- package/src/components/FileUpload/tests/__snapshots__/FileUpload.spec.ts.snap +7 -0
- package/src/components/FileUpload/useFileDrop.ts +23 -0
- package/src/components/FileUpload/validateFiles.ts +39 -0
- package/src/components/FooterBar/FooterBar.vue +105 -80
- package/src/components/FranceConnectBtn/FranceConnectBtn.vue +14 -13
- package/src/components/HeaderBar/HeaderBar.vue +3 -3
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderBurgerMenu.vue +11 -7
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuItem/HeaderMenuItem.vue +5 -5
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderMenuSection/HeaderMenuSection.vue +2 -2
- package/src/components/HeaderBar/HeaderBurgerMenu/HeaderSubMenu/HeaderSubMenu.vue +10 -8
- package/src/components/HeaderBar/HeaderLogo/HeaderLogo.vue +2 -2
- package/src/components/HeaderBar/HeaderLogo/logos/Logo-mobile.vue +2 -1
- package/src/components/HeaderBar/HeaderLogo/logos/Logo.vue +2 -1
- package/src/components/HeaderBar/HeaderMenuBtn/HeaderMenuBtn.vue +10 -10
- package/src/components/HeaderBar/consts.scss +1 -1
- package/src/components/HeaderLoading/HeaderLoading.vue +12 -11
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +2 -1
- package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +9 -9
- package/src/components/HeaderToolbar/HeaderToolbar.vue +215 -202
- package/src/components/LangBtn/LangBtn.vue +8 -6
- package/src/components/LogoBrandSection/LogoBrandSection.stories.ts +2 -2
- package/src/components/NirField/NirField.stories.ts +8 -8
- package/src/components/NirField/NirField.vue +46 -48
- package/src/components/NotFoundPage/NotFoundPage.stories.ts +33 -2
- package/src/components/NotFoundPage/NotFoundPage.vue +17 -0
- package/src/components/NotificationBar/NotificationBar.mdx +5 -5
- package/src/components/NotificationBar/NotificationBar.stories.ts +410 -314
- package/src/components/NotificationBar/NotificationBar.vue +43 -41
- package/src/components/PageContainer/PageContainer.vue +4 -4
- package/src/components/PasswordField/Accessibilite.mdx +14 -0
- package/src/components/PasswordField/Accessibilite.stories.ts +191 -0
- package/src/components/PasswordField/AccessibiliteItems.ts +184 -0
- package/src/components/PasswordField/PasswordField.mdx +70 -0
- package/src/components/PasswordField/PasswordField.stories.ts +213 -0
- package/src/components/PasswordField/PasswordField.vue +189 -0
- package/src/components/PasswordField/config.ts +11 -0
- package/src/components/PasswordField/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/PasswordField/locales.ts +4 -0
- package/src/components/PasswordField/tests/PasswordField.spec.ts +96 -0
- package/src/components/PhoneField/PhoneField.mdx +0 -2
- package/src/components/PhoneField/PhoneField.stories.ts +10 -50
- package/src/components/PhoneField/PhoneField.vue +77 -93
- package/src/components/PhoneField/tests/PhoneField.spec.ts +0 -15
- package/src/components/RangeField/RangeField.mdx +54 -0
- package/src/components/RangeField/RangeField.stories.ts +189 -0
- package/src/components/RangeField/RangeField.vue +157 -0
- package/src/components/RangeField/RangeSlider/RangeSlider.vue +387 -0
- package/src/components/RangeField/RangeSlider/Tooltip/Tooltip.vue +64 -0
- package/src/components/RangeField/RangeSlider/tests/__snapshots__/rangeSlider.spec.ts.snap +27 -0
- package/src/components/RangeField/RangeSlider/tests/rangeSlider.spec.ts +100 -0
- package/src/components/RangeField/RangeSlider/tests/useDoubleSlider.spec.ts +246 -0
- package/src/components/RangeField/RangeSlider/tests/useMouseSlide.spec.ts +204 -0
- package/src/components/RangeField/RangeSlider/tests/useThumb.spec.ts +22 -0
- package/src/components/RangeField/RangeSlider/tests/useThumbKeyboard.spec.ts +233 -0
- package/src/components/RangeField/RangeSlider/tests/useTooltipsNudge.spec.ts +150 -0
- package/src/components/RangeField/RangeSlider/tests/useTrack.spec.ts +314 -0
- package/src/components/RangeField/RangeSlider/tests/vAnimateClick.spec.ts +32 -0
- package/src/components/RangeField/RangeSlider/types.ts +15 -0
- package/src/components/RangeField/RangeSlider/useMouseSlide.ts +109 -0
- package/src/components/RangeField/RangeSlider/useRangeSlider.ts +126 -0
- package/src/components/RangeField/RangeSlider/useThumb.ts +18 -0
- package/src/components/RangeField/RangeSlider/useThumbKeyboard.ts +84 -0
- package/src/components/RangeField/RangeSlider/useTooltipsNudge.ts +92 -0
- package/src/components/RangeField/RangeSlider/useTrack.ts +116 -0
- package/src/components/RangeField/RangeSlider/vAnimateClick.ts +19 -0
- package/src/components/RangeField/config.ts +7 -0
- package/src/components/RangeField/locales.ts +4 -0
- package/src/components/RangeField/tests/RangeField.spec.ts +224 -0
- package/src/components/RangeField/tests/__snapshots__/RangeField.spec.ts.snap +379 -0
- package/src/components/RatingPicker/EmotionPicker/EmotionPicker.vue +205 -0
- package/src/components/RatingPicker/EmotionPicker/locales.ts +3 -0
- package/src/components/RatingPicker/EmotionPicker/tests/EmotionPicker.spec.ts +104 -0
- package/src/components/RatingPicker/EmotionPicker/tests/__snapshots__/EmotionPicker.spec.ts.snap +66 -0
- package/src/components/RatingPicker/NumberPicker/NumberPicker.vue +159 -0
- package/src/components/RatingPicker/NumberPicker/locales.ts +4 -0
- package/src/components/RatingPicker/NumberPicker/tests/NumberPicker.spec.ts +73 -0
- package/src/components/RatingPicker/NumberPicker/tests/__snapshots__/NumberPicker.spec.ts.snap +105 -0
- package/src/components/RatingPicker/Rating.ts +45 -0
- package/src/components/RatingPicker/RatingPicker.mdx +56 -0
- package/src/components/RatingPicker/RatingPicker.stories.ts +515 -0
- package/src/components/RatingPicker/RatingPicker.vue +122 -0
- package/src/components/RatingPicker/StarsPicker/StarsPicker.vue +116 -0
- package/src/components/RatingPicker/StarsPicker/tests/StarsPicker.spec.ts +95 -0
- package/src/components/RatingPicker/StarsPicker/tests/__snapshots__/StarsPicker.spec.ts.snap +36 -0
- package/src/components/RatingPicker/locales.ts +3 -0
- package/src/components/RatingPicker/tests/Rating.spec.ts +104 -0
- package/src/components/RatingPicker/tests/RatingPicker.spec.ts +187 -0
- package/src/components/RatingPicker/tests/__snapshots__/RatingPicker.spec.ts.snap +108 -0
- package/src/components/SearchListField/SearchListField.mdx +74 -0
- package/src/components/SearchListField/SearchListField.stories.ts +126 -0
- package/src/components/SearchListField/SearchListField.vue +194 -0
- package/src/components/SearchListField/locales.ts +5 -0
- package/src/components/SearchListField/tests/SearchListField.spec.ts +323 -0
- package/src/components/SearchListField/types.d.ts +4 -0
- package/src/components/SelectBtnField/SelectBtnField.mdx +50 -0
- package/src/components/SelectBtnField/SelectBtnField.stories.ts +763 -0
- package/src/components/SelectBtnField/SelectBtnField.vue +283 -0
- package/src/components/SelectBtnField/config.ts +11 -0
- package/src/components/SelectBtnField/tests/SelectBtnField.spec.ts +327 -0
- package/src/components/SelectBtnField/tests/__snapshots__/SelectBtnField.spec.ts.snap +125 -0
- package/src/components/SelectBtnField/types.d.ts +11 -0
- package/src/components/SkipLink/SkipLink.vue +10 -10
- package/src/components/SocialMediaLinks/SocialMediaLinks.vue +28 -26
- package/src/components/SubHeader/SubHeader.vue +32 -31
- package/src/components/SyAlert/SyAlert.vue +12 -12
- package/src/components/UserMenuBtn/UserMenuBtn.vue +1 -1
- package/src/components/UserMenuBtn/config.ts +1 -1
- package/src/components/index.ts +17 -7
- package/src/composables/rules/useFieldValidation.ts +172 -44
- package/src/designTokens/index.ts +6 -4
- package/src/designTokens/{bootstrapColors.md → paColors.md} +1 -1
- package/src/designTokens/tokens/cnam/cnamLightTheme.ts +2 -0
- package/src/designTokens/tokens/pa/paColors.ts +171 -0
- package/src/designTokens/tokens/pa/paContextual.ts +58 -0
- package/src/designTokens/tokens/pa/paDarkTheme.ts +5 -0
- package/src/designTokens/tokens/pa/paLightTheme.ts +123 -0
- package/src/designTokens/tokens/pa/paSemantic.ts +87 -0
- package/src/stories/Fondamentaux/CustomisationEtThemes.mdx +52 -2
- package/src/stories/GuideDuDev/CreerUneIssue.mdx +64 -0
- package/src/stories/GuideDuDev/{CommentUtiliserLesRules.mdx → UtiliserLesRules.mdx} +2 -2
- package/src/stories/GuideDuDev/components.stories.ts +9 -7
- package/src/stories/Guidelines/Vuetify/Vuetify.stories.ts +163 -88
- package/src/stories/Guidelines/Vuetify/VuetifyItems.ts +250 -23
- package/src/temp/TestDTComponent.vue +5 -6
- package/src/utils/calcHumanFileSize/index.ts +12 -0
- package/src/utils/calcHumanFileSize/tests/calcHumanFileSize.spec.ts +21 -0
- package/src/designTokens/tokens/bootstrap/bootstrapColors.ts +0 -158
- package/src/designTokens/tokens/bootstrap/bootstrapLightTheme.ts +0 -22
- package/src/stories/GuideDuDev/CommentContribuer.mdx +0 -22
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
|
|
234
234
|
function validateOnSubmit() {
|
|
235
235
|
isValidating.value = true
|
|
236
|
-
validateFields()
|
|
236
|
+
validateFields(true)
|
|
237
237
|
return errors.value.length === 0
|
|
238
238
|
}
|
|
239
239
|
|
|
@@ -339,115 +339,113 @@
|
|
|
339
339
|
</template>
|
|
340
340
|
|
|
341
341
|
<style lang="scss" scoped>
|
|
342
|
-
@use '@/assets/tokens
|
|
342
|
+
@use '@/assets/tokens';
|
|
343
343
|
|
|
344
344
|
.v-messages__message--success {
|
|
345
|
-
|
|
345
|
+
color: tokens.$colors-border-success !important;
|
|
346
346
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
347
|
+
.v-field--active & {
|
|
348
|
+
color: tokens.$colors-border-success !important;
|
|
349
|
+
}
|
|
350
350
|
}
|
|
351
351
|
|
|
352
352
|
.v-messages__message--error {
|
|
353
|
-
|
|
353
|
+
color: tokens.$colors-border-error;
|
|
354
354
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
355
|
+
.v-field--active & {
|
|
356
|
+
color: tokens.$colors-border-error;
|
|
357
|
+
}
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
:deep(.v-field.v-field--active .v-label.v-field-label--floating) {
|
|
361
|
-
|
|
361
|
+
opacity: 1;
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
.multi-line {
|
|
365
|
-
|
|
365
|
+
white-space: pre-line !important;
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
.vd-number-field {
|
|
369
|
-
|
|
369
|
+
max-width: 296px;
|
|
370
370
|
}
|
|
371
371
|
|
|
372
372
|
.vd-key-field {
|
|
373
|
-
|
|
373
|
+
width: 104px;
|
|
374
|
+
flex: none;
|
|
375
|
+
margin-left: 2%;
|
|
374
376
|
}
|
|
375
377
|
|
|
376
378
|
.custom-counter {
|
|
377
|
-
|
|
379
|
+
color: rgb(0 0 0 / 54%);
|
|
378
380
|
}
|
|
379
381
|
|
|
380
382
|
.vd-nir-field :deep(.v-input__append-inner),
|
|
381
383
|
.vd-tooltip-icon {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
+
flex: none;
|
|
385
|
+
color: rgb(0 0 0 / 54%);
|
|
384
386
|
}
|
|
385
387
|
|
|
386
388
|
:deep(.v-overlay__content) {
|
|
387
|
-
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
.vd-key-field {
|
|
391
|
-
flex: none;
|
|
389
|
+
background: rgb(84 88 89 / 95%) !important;
|
|
392
390
|
}
|
|
393
391
|
|
|
394
392
|
.vd-nir-field--outlined :deep(.v-messages.error--text) {
|
|
395
|
-
|
|
393
|
+
padding: 6px;
|
|
396
394
|
}
|
|
397
395
|
|
|
398
396
|
.vd-nir-field {
|
|
399
|
-
|
|
397
|
+
container-name: nirfieldwrapper;
|
|
400
398
|
}
|
|
401
399
|
|
|
402
400
|
:deep(.v-input__append) {
|
|
403
|
-
|
|
401
|
+
margin-inline-start: 0 !important;
|
|
404
402
|
}
|
|
403
|
+
|
|
405
404
|
:deep(.vd-number-field > .v-input__prepend) {
|
|
406
|
-
|
|
405
|
+
margin-right: 0 !important;
|
|
407
406
|
}
|
|
408
407
|
|
|
409
408
|
:deep(.vd-key-field > .v-input__prepend) {
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
409
|
+
@media screen and (width <= 360px) {
|
|
410
|
+
margin-inline-end: 0 !important;
|
|
411
|
+
}
|
|
413
412
|
}
|
|
414
413
|
|
|
415
414
|
:deep(.v-text-field .v-input__details) {
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
flex: none !important;
|
|
415
|
+
padding-inline: 0 !important;
|
|
416
|
+
flex: none !important;
|
|
419
417
|
}
|
|
420
418
|
|
|
421
419
|
:deep(.v-text-field .v-input__details .v-messages) {
|
|
422
|
-
|
|
420
|
+
color: rgb(0 0 0 / 100%) !important;
|
|
423
421
|
}
|
|
424
422
|
|
|
425
423
|
@mixin responsive-nir-wrapper {
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
424
|
+
.vd-nir-field__fields-wrapper :deep(> .v-input__control) {
|
|
425
|
+
justify-content: start;
|
|
426
|
+
flex-wrap: wrap;
|
|
427
|
+
gap: 4px;
|
|
428
|
+
margin-bottom: 4px;
|
|
429
|
+
|
|
430
|
+
.vd-number-field {
|
|
431
|
+
flex: 100% 0 0;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
436
434
|
}
|
|
437
435
|
|
|
438
436
|
@container nirFieldwrapper (max-width: 300px) {
|
|
439
|
-
|
|
437
|
+
@include responsive-nir-wrapper;
|
|
440
438
|
}
|
|
441
439
|
|
|
442
|
-
@media screen and (
|
|
443
|
-
|
|
440
|
+
@media screen and (width <= 360px) {
|
|
441
|
+
@include responsive-nir-wrapper;
|
|
444
442
|
}
|
|
445
443
|
|
|
446
444
|
.v-text-field .v-input__append-inner {
|
|
447
|
-
|
|
445
|
+
padding-left: 0 !important;
|
|
448
446
|
}
|
|
449
447
|
|
|
450
448
|
:deep(.v-text-field > .v-input__control > .v-input__slot > .v-text-field__slot) {
|
|
451
|
-
|
|
449
|
+
width: min-content !important;
|
|
452
450
|
}
|
|
453
451
|
</style>
|
|
@@ -7,6 +7,20 @@ const meta = {
|
|
|
7
7
|
parameters: {
|
|
8
8
|
layout: 'fullscreen',
|
|
9
9
|
},
|
|
10
|
+
argTypes: {
|
|
11
|
+
hideBtn: {
|
|
12
|
+
control: { type: 'boolean' },
|
|
13
|
+
},
|
|
14
|
+
btnText: {
|
|
15
|
+
control: { type: 'text' },
|
|
16
|
+
},
|
|
17
|
+
btnHref: {
|
|
18
|
+
control: { type: 'text' },
|
|
19
|
+
},
|
|
20
|
+
btnLink: {
|
|
21
|
+
control: { type: 'text' },
|
|
22
|
+
},
|
|
23
|
+
},
|
|
10
24
|
} satisfies Meta<typeof NotFoundPage>
|
|
11
25
|
|
|
12
26
|
export default meta
|
|
@@ -14,6 +28,10 @@ export default meta
|
|
|
14
28
|
type Story = StoryObj<typeof NotFoundPage>
|
|
15
29
|
|
|
16
30
|
export const Default: Story = {
|
|
31
|
+
args: {
|
|
32
|
+
btnText: 'Retour à l’accueil',
|
|
33
|
+
btnHref: '/',
|
|
34
|
+
},
|
|
17
35
|
parameters: {
|
|
18
36
|
query: {
|
|
19
37
|
support_id: '',
|
|
@@ -24,7 +42,10 @@ export const Default: Story = {
|
|
|
24
42
|
code: `
|
|
25
43
|
<template>
|
|
26
44
|
<div style="padding: 20px; background: rgb(231, 236, 245)">
|
|
27
|
-
<NotFoundPage
|
|
45
|
+
<NotFoundPage
|
|
46
|
+
btn-text="Retour à l’accueil"
|
|
47
|
+
btn-href="/"
|
|
48
|
+
/>
|
|
28
49
|
</div>
|
|
29
50
|
</template>
|
|
30
51
|
`,
|
|
@@ -45,17 +66,27 @@ export const Default: Story = {
|
|
|
45
66
|
}
|
|
46
67
|
|
|
47
68
|
export const WithErrorCode: Story = {
|
|
69
|
+
args: {
|
|
70
|
+
btnText: 'Retour à l’accueil',
|
|
71
|
+
btnHref: '/',
|
|
72
|
+
},
|
|
48
73
|
parameters: {
|
|
49
74
|
query: {
|
|
50
75
|
support_id: '1234567890123456789',
|
|
51
76
|
},
|
|
77
|
+
btnText: 'Retour à l’accueil',
|
|
78
|
+
btnHref: '/',
|
|
79
|
+
hideBtn: false,
|
|
52
80
|
sourceCode: [
|
|
53
81
|
{
|
|
54
82
|
name: 'Template',
|
|
55
83
|
code: `
|
|
56
84
|
<template>
|
|
57
85
|
<div style="padding: 20px; background: rgb(231, 236, 245)">
|
|
58
|
-
<NotFoundPage
|
|
86
|
+
<NotFoundPage
|
|
87
|
+
btn-text="Retour à l’accueil"
|
|
88
|
+
btn-href="/"
|
|
89
|
+
/>
|
|
59
90
|
</div>
|
|
60
91
|
</template>
|
|
61
92
|
`,
|
|
@@ -2,10 +2,23 @@
|
|
|
2
2
|
import { onMounted, ref } from 'vue'
|
|
3
3
|
import ErrorPage from '../ErrorPage/ErrorPage.vue'
|
|
4
4
|
import { locales } from './locales'
|
|
5
|
+
import type { RouteRecordRaw } from 'vue-router'
|
|
5
6
|
|
|
6
7
|
const SUPPORT_ID_PARAM_NAME = 'support_id'
|
|
7
8
|
const supportId = ref<string | undefined>()
|
|
8
9
|
|
|
10
|
+
withDefaults(defineProps<{
|
|
11
|
+
btnText?: string
|
|
12
|
+
btnHref?: string
|
|
13
|
+
btnLink?: RouteRecordRaw | string
|
|
14
|
+
hideBtn?: boolean
|
|
15
|
+
}>(), {
|
|
16
|
+
btnText: undefined,
|
|
17
|
+
btnLink: '/',
|
|
18
|
+
btnHref: undefined,
|
|
19
|
+
hideBtn: false,
|
|
20
|
+
})
|
|
21
|
+
|
|
9
22
|
onMounted(() => {
|
|
10
23
|
const params = new URLSearchParams(document.location.search)
|
|
11
24
|
let supportIdParam = params.get(SUPPORT_ID_PARAM_NAME)
|
|
@@ -23,6 +36,10 @@
|
|
|
23
36
|
:code="locales.code"
|
|
24
37
|
:page-title="locales.pageTitle"
|
|
25
38
|
:message="locales.message"
|
|
39
|
+
:btn-text="btnText"
|
|
40
|
+
:btn-href="btnHref"
|
|
41
|
+
:btn-link="btnLink"
|
|
42
|
+
:hide-btn="hideBtn"
|
|
26
43
|
>
|
|
27
44
|
<template
|
|
28
45
|
v-if="supportId"
|
|
@@ -6,13 +6,13 @@ import * as NotificationBarStories from './NotificationBar.stories';
|
|
|
6
6
|
|
|
7
7
|
# NotificationBar
|
|
8
8
|
|
|
9
|
-
##### Les
|
|
9
|
+
##### Les NotificationsBar servent à notifier l’utilisateur soit d’un retour d’action.
|
|
10
10
|
|
|
11
|
-
##### Deux actions sont
|
|
11
|
+
##### Deux actions sont possibles :
|
|
12
12
|
- Fermer la notification lorsqu’elle a été vue
|
|
13
13
|
- Cliquer sur un élément qui permet de faire une action secondaire (comme amener sur une page visée par la notification).
|
|
14
14
|
|
|
15
|
-
##### L’affichage d’une durée de quelques secondes et
|
|
15
|
+
##### L’affichage d’une durée de quelques secondes et disparition automatique de la notification bar est déconseillé pour des raisons d’accessibilité afin de permettre à tout le monde de prendre le temps nécessaire de lire la notification.
|
|
16
16
|
|
|
17
17
|
##### Les 4 états son disponibles :
|
|
18
18
|
- **Information** : Information supplémentaire nécessaire à la compréhension de l’utilisateur d’un élément spécifique.
|
|
@@ -20,10 +20,10 @@ import * as NotificationBarStories from './NotificationBar.stories';
|
|
|
20
20
|
- **Warning** : Alerte, élément important mais pas bloquant. L’utilisateur a besoin d’être informé d’un élément ou d’une conséquence.
|
|
21
21
|
- **Success** : l’action a été réalisée correctement et prise en compte.
|
|
22
22
|
|
|
23
|
-
<Canvas of={NotificationBarStories.
|
|
23
|
+
<Canvas of={NotificationBarStories.Default} />
|
|
24
24
|
|
|
25
25
|
# API
|
|
26
|
-
<Controls of={NotificationBarStories.
|
|
26
|
+
<Controls of={NotificationBarStories.Default} />
|
|
27
27
|
|
|
28
28
|
# Exemple d'utilisation
|
|
29
29
|
|