@cnamts/synapse 1.0.6 → 1.0.8
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/{DateFilter-BlOpwEVq.js → DateFilter-DkqG0pmr.js} +1 -1
- package/dist/{NumberFilter-BPUXE4wY.js → NumberFilter-Ck7AwD39.js} +1 -1
- package/dist/{PeriodFilter-B2yx329_.js → PeriodFilter-LRI6YpgU.js} +1 -1
- package/dist/{SelectFilter-CedKn1oV.js → SelectFilter-DPc70Jk7.js} +1 -1
- package/dist/{TextFilter-DkhJjRtR.js → TextFilter-DRQL7uD8.js} +1 -1
- package/dist/components/Amelipro/AmeliproAccordionGroup/AmeliproAccordionGroup.d.ts +116 -0
- package/dist/components/Amelipro/AmeliproAccordionGroup/types.d.ts +4 -0
- package/dist/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.d.ts +220 -0
- package/dist/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.d.ts +68 -0
- package/dist/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/AmeliproAccordionResultTemplate.d.ts +70 -0
- package/dist/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.d.ts +204 -0
- package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +26 -26
- package/dist/components/Amelipro/AmeliproBadge/AmeliproBadge.d.ts +59 -0
- package/dist/components/Amelipro/AmeliproBtn/AmeliproBtn.d.ts +3 -3
- package/dist/components/Amelipro/AmeliproCaptcha/AmeliproCaptcha.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproCarousel/AmeliproCarousel.d.ts +214 -0
- package/dist/components/Amelipro/AmeliproCarousel/AmeliproCarouselItem/AmeliproCarouselItem.d.ts +70 -0
- package/dist/components/Amelipro/AmeliproCarousel/types.d.ts +7 -0
- package/dist/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.d.ts +125 -0
- package/dist/components/Amelipro/AmeliproIconBtn/AmeliproIconBtn.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproIllustratedDataTile/AmeliproIllustratedDataTile.d.ts +2 -2
- package/dist/components/Amelipro/AmeliproResultList/AmeliproResultList.d.ts +164 -0
- package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +27 -27
- package/dist/components/Amelipro/AmeliproStateTile/AmeliproStateTile.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproTable/AmeliproTable.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +32 -32
- package/dist/components/Amelipro/AmeliproTextArea/AmeliproTextArea.d.ts +6 -6
- package/dist/components/Amelipro/AmeliproTextField/AmeliproTextField.d.ts +7 -7
- package/dist/components/Amelipro/AmeliproTileBtn/AmeliproTileBtn.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproTooltips/AmeliproTooltips.d.ts +2 -2
- package/dist/components/ChipList/ChipList.d.ts +4 -0
- package/dist/components/ChipList/locales.d.ts +4 -2
- package/dist/components/CookiesSelection/CookiesInformation/CookiesInformation.d.ts +8 -8
- package/dist/components/Customs/Selects/SySelect/SySelect.d.ts +329 -1296
- package/dist/components/Customs/Selects/SySelect/composables/useSySelectKeyboard.d.ts +0 -1
- package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +2 -0
- package/dist/components/Customs/SyTabs/SyTabs.d.ts +71 -0
- package/dist/components/Customs/SyTabs/config.d.ts +17 -0
- package/dist/components/Customs/SyTabs/types.d.ts +11 -0
- package/dist/components/Customs/SyTextField/SyTextField.d.ts +9 -9
- package/dist/components/DataList/DataList.d.ts +1 -1
- package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +4811 -240
- package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +52 -33
- package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +23 -10
- package/dist/components/DatePicker/composables/useDateInputEditing.d.ts +1 -0
- package/dist/components/DatePicker/composables/useTodayButton.d.ts +1 -0
- package/dist/components/DialogBox/DialogBox.d.ts +219 -0
- package/dist/components/HeaderLoading/HeaderLoading.d.ts +27 -0
- package/dist/components/HeaderNavigationBar/HeaderNavigationBar.d.ts +110 -3
- package/dist/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.d.ts +19 -1
- package/dist/components/LangBtn/LangBtn.d.ts +2 -2
- package/dist/components/NirField/NirField.d.ts +18 -18
- package/dist/components/PeriodField/PeriodField.d.ts +10766 -1620
- package/dist/components/PhoneField/PhoneField.d.ts +1866 -2
- package/dist/components/PhoneField/indicatifs.d.ts +1 -0
- package/dist/components/PhoneField/locales.d.ts +1 -0
- package/dist/components/RangeField/RangeField.d.ts +1 -1
- package/dist/components/RangeField/RangeSlider/RangeSlider.d.ts +1 -1
- package/dist/components/SubHeader/SubHeader.d.ts +8 -0
- package/dist/components/SubHeader/locales.d.ts +1 -0
- package/dist/components/SyTextArea/SyTextArea.d.ts +6 -6
- package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +5 -4
- package/dist/components/Tables/SyTable/SyTable.d.ts +5 -4
- package/dist/components/Tables/common/SyTablePagination.d.ts +333 -1296
- package/dist/components/Tables/common/organizeColumns/OrganizeColumns.d.ts +2 -2
- package/dist/components/Tables/common/types.d.ts +2 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/design-system-v3.js +173 -164
- package/dist/design-system-v3.umd.cjs +286 -263
- package/dist/{main-BXPFSAB4.js → main-DXMoMtj5.js} +13176 -11457
- package/dist/services/NotificationService.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/assets/amelipro/icons.ts +38 -11
- package/src/components/Amelipro/AmeliproAccordionGroup/AmeliproAccordionGroup.mdx +20 -0
- package/src/components/Amelipro/AmeliproAccordionGroup/AmeliproAccordionGroup.stories.ts +135 -0
- package/src/components/Amelipro/AmeliproAccordionGroup/AmeliproAccordionGroup.vue +107 -0
- package/src/components/Amelipro/AmeliproAccordionGroup/__tests__/AmeliproAccordionGroup.spec.ts +37 -0
- package/src/components/Amelipro/AmeliproAccordionGroup/__tests__/__snapshots__/AmeliproAccordionGroup.spec.ts.snap +513 -0
- package/src/components/Amelipro/AmeliproAccordionGroup/types.d.ts +4 -0
- package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.mdx +16 -0
- package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.stories.ts +300 -0
- package/src/components/Amelipro/AmeliproAccordionList/AmeliproAccordionList.vue +288 -0
- package/src/components/Amelipro/AmeliproAccordionList/__tests__/AmeliproAccordionList.spec.ts +38 -0
- package/src/components/Amelipro/AmeliproAccordionList/__tests__/__snapshots__/AmeliproAccordionList.spec.ts.snap +1712 -0
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.mdx +19 -0
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.stories.ts +68 -0
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResult.vue +66 -0
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/AmeliproAccordionResultTemplate.vue +145 -0
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/__tests__/AmeliproAccordionResultTemplate.spec.ts +24 -0
- package/src/components/Amelipro/AmeliproAccordionResult/AmeliproAccordionResultTemplate/__tests__/__snapshots__/AmeliproAccordionResultTemplate.spec.ts.snap +127 -0
- package/src/components/Amelipro/AmeliproAccordionResult/__tests__/AmeliproAccordionResult.spec.ts +24 -0
- package/src/components/Amelipro/AmeliproAccordionResult/__tests__/__snapshots__/AmeliproAccordionResult.spec.ts.snap +123 -0
- package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.mdx +20 -0
- package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.stories.ts +273 -0
- package/src/components/Amelipro/AmeliproAccordionResultList/AmeliproAccordionResultList.vue +275 -0
- package/src/components/Amelipro/AmeliproAccordionResultList/__tests__/AmeliproAccordionResultList.spec.ts +38 -0
- package/src/components/Amelipro/AmeliproAccordionResultList/__tests__/__snapshots__/AmeliproAccordionResultList.spec.ts.snap +1593 -0
- package/src/components/Amelipro/AmeliproBadge/AmeliproBadge.mdx +15 -0
- package/src/components/Amelipro/AmeliproBadge/AmeliproBadge.stories.ts +54 -0
- package/src/components/Amelipro/AmeliproBadge/AmeliproBadge.vue +76 -0
- package/src/components/Amelipro/AmeliproBadge/__tests__/AmeliproBadge.spec.ts +20 -0
- package/src/components/Amelipro/AmeliproBadge/__tests__/__snapshots__/AmeliproBadge.spec.ts.snap +19 -0
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarousel.mdx +15 -0
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarousel.stories.ts +191 -0
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarousel.vue +263 -0
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarouselItem/AmeliproCarouselItem.vue +93 -0
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarouselItem/__tests__/AmeliproCarouselItem.spec.ts +24 -0
- package/src/components/Amelipro/AmeliproCarousel/AmeliproCarouselItem/__tests__/__snapshots__/AmeliproCarouselItem.spec.ts.snap +43 -0
- package/src/components/Amelipro/AmeliproCarousel/__tests__/AmeliproCarousel.spec.ts +40 -0
- package/src/components/Amelipro/AmeliproCarousel/__tests__/__snapshots__/AmeliproCarousel.spec.ts.snap +342 -0
- package/src/components/Amelipro/AmeliproCarousel/types.d.ts +8 -0
- package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.mdx +18 -0
- package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.stories.ts +67 -0
- package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.vue +233 -0
- package/src/components/Amelipro/AmeliproClickableTile/tests/AmeliproClickableTile.spec.ts +21 -0
- package/src/components/Amelipro/AmeliproClickableTile/tests/__snapshots__/AmeliproClickableTile.spec.ts.snap +140 -0
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeader.vue +7 -1
- package/src/components/Amelipro/AmeliproHeader/tests/__snapshots__/AmeliproHeader.spec.ts.snap +5 -4
- package/src/components/Amelipro/AmeliproIcon/iconList.ts +6 -0
- package/src/components/Amelipro/AmeliproPageLayout/tests/__snapshots__/AmeliproPageLayout.spec.ts.snap +5 -4
- package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.mdx +15 -0
- package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.stories.ts +264 -0
- package/src/components/Amelipro/AmeliproResultList/AmeliproResultList.vue +231 -0
- package/src/components/Amelipro/AmeliproResultList/__tests__/AmeliproResultList.spec.ts +37 -0
- package/src/components/Amelipro/AmeliproResultList/__tests__/__snapshots__/AmeliproResultList.spec.ts.snap +434 -0
- package/src/components/Amelipro/AmeliproTable/AmeliproTable.vue +6 -5
- package/src/components/Amelipro/AmeliproTable/__tests__/__snapshots__/AmeliproTable.spec.ts.snap +23 -26
- package/src/components/Amelipro/AmeliproTileBtn/AmeliproTileBtn.stories.ts +2 -2
- package/src/components/ChipList/Accessibilite.stories.ts +4 -0
- package/src/components/ChipList/ChipList.vue +185 -42
- package/src/components/ChipList/locales.ts +4 -2
- package/src/components/ChipList/tests/chipList.spec.ts +7 -4
- package/src/components/Customs/Selects/SelectOverview.mdx +34 -66
- package/src/components/Customs/Selects/SyBtnSelect/SyBtnSelect.stories.ts +10 -10
- package/src/components/Customs/Selects/SyInputSelect/SyInputSelect.mdx +3 -0
- package/src/components/Customs/Selects/SyInputSelect/SyInputSelect.stories.ts +14 -0
- package/src/components/Customs/Selects/SySelect/SySelect.stories.ts +14 -6
- package/src/components/Customs/Selects/SySelect/SySelect.vue +268 -205
- package/src/components/Customs/Selects/SySelect/composables/tests/useSySelectKeyboard.spec.ts +0 -10
- package/src/components/Customs/Selects/SySelect/composables/useSySelectKeyboard.ts +0 -5
- package/src/components/Customs/Selects/SySelect/tests/SySelect.spec.ts +184 -25
- package/src/components/Customs/SyCheckbox/SyCheckbox.mdx +3 -1
- package/src/components/Customs/SyCheckbox/SyCheckbox.stories.ts +165 -0
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +28 -9
- package/src/components/Customs/SyTabs/Accessibilite.mdx +309 -0
- package/src/components/Customs/SyTabs/SyTabs.mdx +117 -0
- package/src/components/Customs/SyTabs/SyTabs.stories.ts +354 -0
- package/src/components/Customs/SyTabs/SyTabs.vue +413 -0
- package/src/components/Customs/SyTabs/config.ts +17 -0
- package/src/components/Customs/SyTabs/tests/SyTabs.spec.ts +425 -0
- package/src/components/Customs/SyTabs/types.ts +12 -0
- package/src/components/Customs/SyTextField/SyTextField.mdx +3 -0
- package/src/components/Customs/SyTextField/SyTextField.stories.ts +142 -1
- package/src/components/Customs/SyTextField/SyTextField.vue +19 -16
- package/src/components/DataList/DataList.vue +47 -49
- package/src/components/DataListGroup/DataListGroup.vue +1 -1
- package/src/components/DataListItem/DataListItem.vue +67 -63
- package/src/components/DataListItem/tests/DataListItem.spec.ts +2 -2
- package/src/components/DatePicker/CalendarMode/DatePicker.stories.ts +3 -3
- package/src/components/DatePicker/CalendarMode/DatePicker.vue +49 -13
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +412 -649
- package/src/components/DatePicker/DatePickerValidationExample/CalendarMode.stories.ts +215 -0
- package/src/components/DatePicker/DatePickerValidationExample/ComplexDatePicker.stories.ts +218 -0
- package/src/components/DatePicker/DatePickerValidationExample/DatePickerValidation.mdx +2 -0
- package/src/components/DatePicker/DatePickerValidationExample/DatePickerValidation.stories.ts +1 -1
- package/src/components/DatePicker/DatePickerValidationExample/DateTextInput.stories.ts +218 -0
- package/src/components/DatePicker/DatePickerValidationExample/MultiMode.stories.ts +281 -0
- package/src/components/DatePicker/DateTextInput/DateTextInput.events.spec.ts +17 -4
- package/src/components/DatePicker/DateTextInput/DateTextInput.range.spec.ts +111 -18
- package/src/components/DatePicker/DateTextInput/DateTextInput.spec.ts +238 -6
- package/src/components/DatePicker/DateTextInput/DateTextInput.vue +716 -757
- package/src/components/DatePicker/composables/tests/useDateInputEditing.spec.ts +4 -4
- package/src/components/DatePicker/composables/tests/useDisplayedDateString.spec.ts +17 -10
- package/src/components/DatePicker/composables/useDateInputEditing.ts +52 -22
- package/src/components/DatePicker/composables/useDisplayedDateString.ts +18 -4
- package/src/components/DatePicker/composables/useTodayButton.ts +13 -1
- package/src/components/DatePicker/utils/dateFormattingUtils.ts +79 -14
- package/src/components/DialogBox/DialogBox.stories.ts +12 -0
- package/src/components/DialogBox/DialogBox.vue +16 -11
- package/src/components/DialogBox/tests/DialogBox.spec.ts +22 -0
- package/src/components/HeaderLoading/Accessibilite.mdx +429 -8
- package/src/components/HeaderLoading/Accessibilite.stories.ts +4 -0
- package/src/components/HeaderLoading/HeaderLoading.vue +59 -0
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.mdx +17 -2
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.stories.ts +91 -2
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +37 -1
- package/src/components/HeaderNavigationBar/HorizontalNavbar/HorizontalNavbar.vue +284 -21
- package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.spec.ts +2 -2
- package/src/components/NirField/NirField.mdx +3 -0
- package/src/components/NirField/NirField.vue +10 -1
- package/src/components/NirField/tests/NirField.spec.ts +81 -0
- package/src/components/NotificationBar/NotificationBar.stories.ts +128 -2
- package/src/components/NotificationBar/NotificationBar.vue +16 -1
- package/src/components/NotificationBar/tests/NotificationBar.spec.ts +65 -0
- package/src/components/PasswordField/PasswordField.mdx +3 -0
- package/src/components/PeriodField/PeriodField.mdx +2 -0
- package/src/components/PeriodField/PeriodField.stories.ts +195 -0
- package/src/components/PhoneField/Accessibilite.stories.ts +4 -0
- package/src/components/PhoneField/PhoneField.mdx +3 -1
- package/src/components/PhoneField/PhoneField.stories.ts +285 -1
- package/src/components/PhoneField/PhoneField.vue +228 -95
- package/src/components/PhoneField/indicatifs.ts +102 -102
- package/src/components/PhoneField/locales.ts +1 -0
- package/src/components/PhoneField/tests/PhoneField.spec.ts +419 -2
- package/src/components/SkipLink/SkipLink.vue +3 -31
- package/src/components/SkipLink/tests/skipLink.spec.ts +0 -21
- package/src/components/SubHeader/Accessibilite.stories.ts +8 -0
- package/src/components/SubHeader/SubHeader.mdx +1 -0
- package/src/components/SubHeader/SubHeader.stories.ts +179 -60
- package/src/components/SubHeader/SubHeader.vue +45 -15
- package/src/components/SubHeader/locales.ts +1 -0
- package/src/components/SyAlert/SyAlert.vue +6 -0
- package/src/components/Tables/SyServerTable/SyServerTable.mdx +3 -10
- package/src/components/Tables/SyServerTable/SyServerTable.stories.ts +242 -0
- package/src/components/Tables/SyServerTable/SyServerTable.vue +29 -10
- package/src/components/Tables/SyTable/SyTable.mdx +3 -10
- package/src/components/Tables/SyTable/SyTable.stories.ts +242 -0
- package/src/components/Tables/SyTable/SyTable.vue +2 -0
- package/src/components/Tables/common/SyTablePagination.vue +13 -6
- package/src/components/Tables/common/filters/tests/SelectFilter.spec.ts +6 -1
- package/src/components/Tables/common/tests/SyTablePagination.spec.ts +157 -0
- package/src/components/Tables/common/types.ts +2 -0
- package/src/components/index.ts +9 -0
- package/src/composables/useFilterable/useFilterable.ts +10 -0
- package/src/designTokens/tokens/amelipro/apColors.ts +1 -1
- package/src/designTokens/tokens/cnam/cnamSemantic.ts +3 -3
- package/src/services/NotificationService.ts +9 -0
- package/src/stories/Components/Components.stories.ts +1 -1
- package/src/stories/GuideDuDev/FormValidationGuide.mdx +342 -0
- package/src/stories/Templates/Templates.stories.ts +1 -1
- package/src/utils/functions/ameliproColors/ameliproColors.ts +1 -1
- package/dist/components/DataList/locales.d.ts +0 -3
- package/src/components/DataList/locales.ts +0 -3
- package/src/components/PhoneField/tests/PhoneField.additional.spec.ts +0 -266
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { type PropType, computed, ref } from 'vue'
|
|
3
|
+
import AmeliproIcon from '../AmeliproIcon/AmeliproIcon.vue'
|
|
4
|
+
import type { IndexedObject } from '../types'
|
|
5
|
+
import type { RouteLocationRaw } from 'vue-router'
|
|
6
|
+
import { convertToHex } from '@/utils/functions/convertToHex'
|
|
7
|
+
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
borderedIcon: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false,
|
|
12
|
+
},
|
|
13
|
+
disabled: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: false,
|
|
16
|
+
},
|
|
17
|
+
href: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: undefined,
|
|
20
|
+
},
|
|
21
|
+
icon: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: undefined,
|
|
24
|
+
},
|
|
25
|
+
imgMaxWidth: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: undefined,
|
|
28
|
+
},
|
|
29
|
+
imgMinWidth: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: undefined,
|
|
32
|
+
},
|
|
33
|
+
imgSrc: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: undefined,
|
|
36
|
+
},
|
|
37
|
+
imgWidth: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: '100px',
|
|
40
|
+
},
|
|
41
|
+
tileTitle: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: undefined,
|
|
44
|
+
},
|
|
45
|
+
tileWidth: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: '100%',
|
|
48
|
+
},
|
|
49
|
+
to: {
|
|
50
|
+
type: [Array, Object, String] as PropType<RouteLocationRaw>,
|
|
51
|
+
default: undefined,
|
|
52
|
+
},
|
|
53
|
+
uniqueId: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: undefined,
|
|
56
|
+
},
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
const hover = ref(false)
|
|
60
|
+
const focus = ref(false)
|
|
61
|
+
|
|
62
|
+
const tileStyles = computed<IndexedObject>(() => {
|
|
63
|
+
const btnStyles: IndexedObject = {
|
|
64
|
+
backgroundColor: convertToHex('ap-white'),
|
|
65
|
+
border: `1px solid ${convertToHex('ap-blue-darken-1')} !important`,
|
|
66
|
+
color: convertToHex('ap-grey-darken-1'),
|
|
67
|
+
padding: '1rem',
|
|
68
|
+
}
|
|
69
|
+
if ((hover.value || focus.value) && !props.disabled) {
|
|
70
|
+
btnStyles.border = `1px solid ${convertToHex('ap-blue-darken-2')} !important`
|
|
71
|
+
}
|
|
72
|
+
if (props.disabled) {
|
|
73
|
+
btnStyles.color = `${convertToHex('ap-grey-darken-1')} !important`
|
|
74
|
+
btnStyles.backgroundColor = `${convertToHex('ap-grey-lighten-2')} !important`
|
|
75
|
+
btnStyles.border = `1px solid ${convertToHex('ap-grey-lighten-2')} !important`
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return btnStyles
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
const imgStyles = computed((): IndexedObject => {
|
|
82
|
+
const styles: IndexedObject = { width: props.imgWidth }
|
|
83
|
+
if (props.imgMaxWidth) {
|
|
84
|
+
styles.maxWidth = props.imgMaxWidth
|
|
85
|
+
}
|
|
86
|
+
if (props.imgMinWidth) {
|
|
87
|
+
styles.minWidth = props.imgMinWidth
|
|
88
|
+
}
|
|
89
|
+
return styles
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
const iconColorValue = computed<string>(() => {
|
|
93
|
+
if (!props.borderedIcon) {
|
|
94
|
+
return 'ap-white'
|
|
95
|
+
}
|
|
96
|
+
if (props.disabled) {
|
|
97
|
+
return 'ap-grey-darken-1'
|
|
98
|
+
}
|
|
99
|
+
if (hover.value || focus.value) {
|
|
100
|
+
return 'ap-blue-darken-2'
|
|
101
|
+
}
|
|
102
|
+
return 'ap-blue-darken-1'
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
const iconBgColorValue = computed<string>(() => {
|
|
106
|
+
if (props.borderedIcon) {
|
|
107
|
+
return 'transparent'
|
|
108
|
+
}
|
|
109
|
+
if (props.disabled) {
|
|
110
|
+
return 'ap-grey-darken-1'
|
|
111
|
+
}
|
|
112
|
+
if (hover.value || focus.value) {
|
|
113
|
+
return 'ap-blue-darken-2'
|
|
114
|
+
}
|
|
115
|
+
return 'ap-blue-darken-1'
|
|
116
|
+
})
|
|
117
|
+
|
|
118
|
+
const iconArrowColorValue = computed<string>(() => {
|
|
119
|
+
if (props.disabled) {
|
|
120
|
+
return 'ap-grey-darken-1'
|
|
121
|
+
}
|
|
122
|
+
if (hover.value || focus.value) {
|
|
123
|
+
return 'ap-blue-darken-2'
|
|
124
|
+
}
|
|
125
|
+
return 'ap-blue-darken-1'
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
const emit = defineEmits(['click'])
|
|
129
|
+
const emitClickEvent = () => emit('click', props.uniqueId)
|
|
130
|
+
</script>
|
|
131
|
+
|
|
132
|
+
<template>
|
|
133
|
+
<VBtn
|
|
134
|
+
:id="uniqueId"
|
|
135
|
+
class="amelipro-clickable-tile text-none"
|
|
136
|
+
:disabled="disabled"
|
|
137
|
+
:elevation="0"
|
|
138
|
+
height="auto"
|
|
139
|
+
:href="href"
|
|
140
|
+
:ripple="false"
|
|
141
|
+
:style="tileStyles"
|
|
142
|
+
:to="to"
|
|
143
|
+
:width="tileWidth"
|
|
144
|
+
@blur="focus = false"
|
|
145
|
+
@click="emitClickEvent"
|
|
146
|
+
@focus="focus = true"
|
|
147
|
+
@mouseenter="hover = true"
|
|
148
|
+
@mouseleave="hover = false"
|
|
149
|
+
>
|
|
150
|
+
<span class="d-flex align-center">
|
|
151
|
+
<img
|
|
152
|
+
v-if="imgSrc && !icon"
|
|
153
|
+
:id="uniqueId ? `${uniqueId}-img` : undefined"
|
|
154
|
+
alt=""
|
|
155
|
+
class="amelipro-clickable-tile__img"
|
|
156
|
+
:src="imgSrc"
|
|
157
|
+
:style="imgStyles"
|
|
158
|
+
>
|
|
159
|
+
|
|
160
|
+
<AmeliproIcon
|
|
161
|
+
v-if="icon && !imgSrc"
|
|
162
|
+
:id="uniqueId ? `${uniqueId}-icon` : undefined"
|
|
163
|
+
:bordered="borderedIcon"
|
|
164
|
+
class="amelipro-clickable-tile__icon"
|
|
165
|
+
:icon="icon"
|
|
166
|
+
:icon-bg-color="iconBgColorValue"
|
|
167
|
+
:icon-color="iconColorValue"
|
|
168
|
+
size="32px"
|
|
169
|
+
/>
|
|
170
|
+
|
|
171
|
+
<span
|
|
172
|
+
class="d-block ml-3 mr-6"
|
|
173
|
+
>
|
|
174
|
+
<slot name="default">
|
|
175
|
+
{{ tileTitle }}
|
|
176
|
+
</slot>
|
|
177
|
+
</span>
|
|
178
|
+
</span>
|
|
179
|
+
|
|
180
|
+
<AmeliproIcon
|
|
181
|
+
:id="uniqueId ? `${uniqueId}-icon-arrow` : undefined"
|
|
182
|
+
class="amelipro-clickable-tile__icon-arrow"
|
|
183
|
+
icon="chevronRight"
|
|
184
|
+
icon-bg-color="transparent"
|
|
185
|
+
:icon-color="iconArrowColorValue"
|
|
186
|
+
size="16px"
|
|
187
|
+
/>
|
|
188
|
+
</VBtn>
|
|
189
|
+
</template>
|
|
190
|
+
|
|
191
|
+
<style lang="scss" scoped>
|
|
192
|
+
@use '@/assets/amelipro/apTokens';
|
|
193
|
+
|
|
194
|
+
.amelipro-clickable-tile {
|
|
195
|
+
position: relative;
|
|
196
|
+
display: flex;
|
|
197
|
+
background-color: apTokens.$ap-white;
|
|
198
|
+
border-radius: 0.5rem;
|
|
199
|
+
white-space: normal;
|
|
200
|
+
font-size: 1rem;
|
|
201
|
+
font-weight: 600;
|
|
202
|
+
text-align: left;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.v-btn {
|
|
206
|
+
letter-spacing: unset;
|
|
207
|
+
text-indent: unset;
|
|
208
|
+
|
|
209
|
+
& :deep(.v-btn__overlay),
|
|
210
|
+
& :deep(.v-btn__underlay) {
|
|
211
|
+
display: none !important;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&.v-btn--active::before,
|
|
215
|
+
&:focus::before,
|
|
216
|
+
&:hover::before {
|
|
217
|
+
content: unset !important;
|
|
218
|
+
opacity: 0 !important;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
&:focus {
|
|
222
|
+
outline: 1px dotted apTokens.$ap-grey-darken1;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
& :deep(.v-btn__content) {
|
|
226
|
+
position: unset;
|
|
227
|
+
display: flex;
|
|
228
|
+
justify-content: space-between;
|
|
229
|
+
align-items: center;
|
|
230
|
+
width: 100%;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
</style>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils'
|
|
2
|
+
import { expect, describe, it } from 'vitest'
|
|
3
|
+
import AmeliproClickableTile from '../AmeliproClickableTile.vue'
|
|
4
|
+
import { vuetify } from '@tests/unit/setup'
|
|
5
|
+
|
|
6
|
+
describe('AmeliproClickableTile', () => {
|
|
7
|
+
it('render correctly', async () => {
|
|
8
|
+
const wrapper = mount(AmeliproClickableTile, {
|
|
9
|
+
global: {
|
|
10
|
+
plugins: [vuetify],
|
|
11
|
+
},
|
|
12
|
+
props: {
|
|
13
|
+
icon: 'utilisateur',
|
|
14
|
+
tileTitle: 'titre de la tuile',
|
|
15
|
+
uniqueId: 'my-clickable-tile-id',
|
|
16
|
+
},
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
20
|
+
})
|
|
21
|
+
})
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
+
|
|
3
|
+
exports[`AmeliproClickableTile > render correctly 1`] = `
|
|
4
|
+
<button
|
|
5
|
+
class="
|
|
6
|
+
amelipro-clickable-tile
|
|
7
|
+
elevation-0
|
|
8
|
+
text-none
|
|
9
|
+
v-btn
|
|
10
|
+
v-btn--density-default
|
|
11
|
+
v-btn--elevated
|
|
12
|
+
v-btn--size-default
|
|
13
|
+
v-btn--variant-elevated
|
|
14
|
+
v-theme--light
|
|
15
|
+
"
|
|
16
|
+
id="my-clickable-tile-id"
|
|
17
|
+
style="
|
|
18
|
+
height: auto;
|
|
19
|
+
width: 100%;
|
|
20
|
+
background-color: #FFFFFF;
|
|
21
|
+
border: 1px solid #00749C !important;
|
|
22
|
+
color: #1A1B1B;
|
|
23
|
+
padding: 1rem;
|
|
24
|
+
"
|
|
25
|
+
type="button"
|
|
26
|
+
>
|
|
27
|
+
<span class="v-btn__overlay"></span>
|
|
28
|
+
<span class="v-btn__underlay"></span>
|
|
29
|
+
<!---->
|
|
30
|
+
<span
|
|
31
|
+
class="v-btn__content"
|
|
32
|
+
data-no-activator=""
|
|
33
|
+
>
|
|
34
|
+
<span class="
|
|
35
|
+
align-center
|
|
36
|
+
d-flex
|
|
37
|
+
">
|
|
38
|
+
<!-- v-if -->
|
|
39
|
+
<span
|
|
40
|
+
class="
|
|
41
|
+
amelipro-clickable-tile__icon
|
|
42
|
+
amelipro-icon
|
|
43
|
+
"
|
|
44
|
+
id="my-clickable-tile-id-icon"
|
|
45
|
+
>
|
|
46
|
+
<span
|
|
47
|
+
aria-hidden="true"
|
|
48
|
+
class="
|
|
49
|
+
amelipro-custom-icon
|
|
50
|
+
custom-color
|
|
51
|
+
"
|
|
52
|
+
focusable="false"
|
|
53
|
+
role="img"
|
|
54
|
+
style="
|
|
55
|
+
color: #FFFFFF;
|
|
56
|
+
height: 32px;
|
|
57
|
+
width: 32px;
|
|
58
|
+
"
|
|
59
|
+
>
|
|
60
|
+
<span>
|
|
61
|
+
<svg
|
|
62
|
+
aria-hidden="true"
|
|
63
|
+
clip-rule="evenodd"
|
|
64
|
+
fill-rule="evenodd"
|
|
65
|
+
height="34"
|
|
66
|
+
image-rendering="optimizeQuality"
|
|
67
|
+
shape-rendering="geometricPrecision"
|
|
68
|
+
text-rendering="geometricPrecision"
|
|
69
|
+
viewBox="0 0 1823 1823"
|
|
70
|
+
width="34"
|
|
71
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
72
|
+
>
|
|
73
|
+
<circle
|
|
74
|
+
class="circle-color"
|
|
75
|
+
cx="912"
|
|
76
|
+
cy="912"
|
|
77
|
+
r="912"
|
|
78
|
+
/>
|
|
79
|
+
<path
|
|
80
|
+
class="shape-color"
|
|
81
|
+
d="M962 454c117 0 125 154 125 154v145s1 111-73 152c-2 10-3 20-1 30 4-2-21 146 106 165 92 15 178 57 247 120 23 23 40 186 40 186H418s-2-132 40-186c73-62 162-104 257-120 128-19 85-160 89-158 2-10 1-21-1-31 0 0-69-89-68-169 1-81 0-134 0-134s-4-190 126-190l101 36z"
|
|
82
|
+
/>
|
|
83
|
+
</svg>
|
|
84
|
+
</span>
|
|
85
|
+
</span>
|
|
86
|
+
</span>
|
|
87
|
+
<span class="
|
|
88
|
+
d-block
|
|
89
|
+
ml-3
|
|
90
|
+
mr-6
|
|
91
|
+
">
|
|
92
|
+
titre de la tuile
|
|
93
|
+
</span>
|
|
94
|
+
</span>
|
|
95
|
+
<span
|
|
96
|
+
class="
|
|
97
|
+
amelipro-clickable-tile__icon-arrow
|
|
98
|
+
amelipro-icon
|
|
99
|
+
"
|
|
100
|
+
id="my-clickable-tile-id-icon-arrow"
|
|
101
|
+
>
|
|
102
|
+
<span
|
|
103
|
+
aria-hidden="true"
|
|
104
|
+
class="
|
|
105
|
+
amelipro-custom-icon
|
|
106
|
+
custom-color
|
|
107
|
+
"
|
|
108
|
+
focusable="false"
|
|
109
|
+
role="img"
|
|
110
|
+
style="
|
|
111
|
+
color: #00749C;
|
|
112
|
+
height: 16px;
|
|
113
|
+
width: 16px;
|
|
114
|
+
"
|
|
115
|
+
>
|
|
116
|
+
<span>
|
|
117
|
+
<svg
|
|
118
|
+
aria-hidden="true"
|
|
119
|
+
style="enable-background:new 0 0 14.8 24;"
|
|
120
|
+
version="1.1"
|
|
121
|
+
viewBox="0 0 14.8 24"
|
|
122
|
+
x="0px"
|
|
123
|
+
xml:space="preserve"
|
|
124
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
125
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
126
|
+
y="0px"
|
|
127
|
+
>
|
|
128
|
+
<path
|
|
129
|
+
class="shape-color"
|
|
130
|
+
d="M0,2.8L9.2,12L0,21.2L2.8,24l12-12L2.8,0L0,2.8z"
|
|
131
|
+
/>
|
|
132
|
+
</svg>
|
|
133
|
+
</span>
|
|
134
|
+
</span>
|
|
135
|
+
</span>
|
|
136
|
+
</span>
|
|
137
|
+
<!---->
|
|
138
|
+
<!---->
|
|
139
|
+
</button>
|
|
140
|
+
`;
|
|
@@ -165,6 +165,12 @@
|
|
|
165
165
|
structureValue.value.dialog = false
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
+
|
|
169
|
+
const clickSignature = (event: Event): void => {
|
|
170
|
+
if (props.ameliproHeaderInfos?.signatureInfos?.clickFn) {
|
|
171
|
+
props.ameliproHeaderInfos?.signatureInfos?.clickFn(event)
|
|
172
|
+
}
|
|
173
|
+
}
|
|
168
174
|
</script>
|
|
169
175
|
|
|
170
176
|
<template>
|
|
@@ -358,7 +364,7 @@
|
|
|
358
364
|
size="2rem"
|
|
359
365
|
:to="signatureInfos.to ? signatureInfos.to : undefined"
|
|
360
366
|
:unique-id="`${uniqueId}-signature-btn`"
|
|
361
|
-
@click="
|
|
367
|
+
@click="clickSignature"
|
|
362
368
|
/>
|
|
363
369
|
</slot>
|
|
364
370
|
</li>
|
package/src/components/Amelipro/AmeliproHeader/tests/__snapshots__/AmeliproHeader.spec.ts.snap
CHANGED
|
@@ -649,6 +649,7 @@ exports[`AmeliproHeader > render correctly 1`] = `
|
|
|
649
649
|
"
|
|
650
650
|
><span>
|
|
651
651
|
<svg
|
|
652
|
+
aria-hidden="true"
|
|
652
653
|
version="1.1"
|
|
653
654
|
viewBox="0 0 32 32"
|
|
654
655
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -657,10 +658,10 @@ exports[`AmeliproHeader > render correctly 1`] = `
|
|
|
657
658
|
class="circle-color"
|
|
658
659
|
d="M16,32c8.8,0,16-7.2,16-16S24.8,0,16,0,0,7.2,0,16s7.2,16,16,16Z"
|
|
659
660
|
/>
|
|
660
|
-
<
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
661
|
+
<g class="shape-color">
|
|
662
|
+
<path d="M14.5,22.1h10.7v1.9h-10.7v-1.9Z" />
|
|
663
|
+
<path d="M17.6,14.6l-6,8.7-3,.6-.6-2.9,6-8.7,3.5,2.4ZM21.2,12.7c0,.4.4.8.1,1.3l-2.6,3.8-1.4-.9,2.7-4-.9-.6-.7,1.1-3.5-2.4,2.3-3.2c.2-.3.7-.4,1.2-.2l2.1,1.5c.3.2.4.7.2,1.2-.2.3-.4.6-.4.9,0,.3.4.5.7.7.5.3.3.6.2,1Z" />
|
|
664
|
+
</g>
|
|
664
665
|
</svg></span></span></span></span>
|
|
665
666
|
|
|
666
667
|
<!---->
|
|
@@ -107,6 +107,8 @@ export const iconList: IconItem[] = [
|
|
|
107
107
|
{ name: 'notePencil' },
|
|
108
108
|
{ name: 'signature' },
|
|
109
109
|
{ name: 'signature2' },
|
|
110
|
+
{ name: 'shieldPlus' },
|
|
111
|
+
{ name: 'delegation' },
|
|
110
112
|
{
|
|
111
113
|
name: 'chevronLeft',
|
|
112
114
|
noBackground: true,
|
|
@@ -227,4 +229,8 @@ export const iconList: IconItem[] = [
|
|
|
227
229
|
name: 'arrowRight',
|
|
228
230
|
noBackground: true,
|
|
229
231
|
},
|
|
232
|
+
{
|
|
233
|
+
name: 'diamondNoCircle',
|
|
234
|
+
noBackground: true,
|
|
235
|
+
},
|
|
230
236
|
]
|
|
@@ -697,6 +697,7 @@ exports[`AmeliproPageLayout > render correctly 1`] = `
|
|
|
697
697
|
"
|
|
698
698
|
><span>
|
|
699
699
|
<svg
|
|
700
|
+
aria-hidden="true"
|
|
700
701
|
version="1.1"
|
|
701
702
|
viewBox="0 0 32 32"
|
|
702
703
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -705,10 +706,10 @@ exports[`AmeliproPageLayout > render correctly 1`] = `
|
|
|
705
706
|
class="circle-color"
|
|
706
707
|
d="M16,32c8.8,0,16-7.2,16-16S24.8,0,16,0,0,7.2,0,16s7.2,16,16,16Z"
|
|
707
708
|
/>
|
|
708
|
-
<
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
709
|
+
<g class="shape-color">
|
|
710
|
+
<path d="M14.5,22.1h10.7v1.9h-10.7v-1.9Z" />
|
|
711
|
+
<path d="M17.6,14.6l-6,8.7-3,.6-.6-2.9,6-8.7,3.5,2.4ZM21.2,12.7c0,.4.4.8.1,1.3l-2.6,3.8-1.4-.9,2.7-4-.9-.6-.7,1.1-3.5-2.4,2.3-3.2c.2-.3.7-.4,1.2-.2l2.1,1.5c.3.2.4.7.2,1.2-.2.3-.4.6-.4.9,0,.3.4.5.7.7.5.3.3.6.2,1Z" />
|
|
712
|
+
</g>
|
|
712
713
|
</svg></span></span></span></span>
|
|
713
714
|
|
|
714
715
|
<!---->
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Controls, Canvas, Meta } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import * as AmeliproResultListStories from './AmeliproResultList.stories';
|
|
4
|
+
|
|
5
|
+
<Meta of={AmeliproResultListStories} />
|
|
6
|
+
|
|
7
|
+
# AmeliproResultList
|
|
8
|
+
|
|
9
|
+
L’élément `AmeliproResultList` est utilisé pour afficher des listes de résultats dans l’application Amelipro
|
|
10
|
+
|
|
11
|
+
<Canvas of={AmeliproResultListStories.Default} />
|
|
12
|
+
|
|
13
|
+
## API
|
|
14
|
+
|
|
15
|
+
<Controls of={AmeliproResultListStories.Default} />
|