@cnamts/synapse 1.0.3 → 1.0.4
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-yrwJv_2R.js +95 -0
- package/dist/NumberFilter-BQXtywZI.js +117 -0
- package/dist/PeriodFilter-BYXVSzr5.js +108 -0
- package/dist/SelectFilter-CJV_mlN3.js +133 -0
- package/dist/TextFilter-DN0ejYIs.js +110 -0
- package/dist/components/Accordion/Accordion.d.ts +2 -2
- package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +5 -5
- package/dist/components/Amelipro/AmeliproIcon/AmeliproIcon.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproIconBtn/AmeliproIconBtn.d.ts +7 -7
- package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +5 -5
- package/dist/components/Amelipro/AmeliproStateTile/AmeliproStateTile.d.ts +9 -0
- package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +10 -10
- package/dist/components/Amelipro/AmeliproTextField/AmeliproTextField.d.ts +1 -1
- package/dist/components/CookieBanner/CookieBanner.d.ts +302 -1
- package/dist/components/CookieBanner/config.d.ts +1 -0
- package/dist/components/CookiesSelection/CookiesInformation/CookiesInformation.d.ts +1188 -1
- package/dist/components/CookiesSelection/CookiesSelection.d.ts +217 -0
- package/dist/components/Customs/Selects/SySelect/SySelect.d.ts +1 -1
- package/dist/components/Customs/SyTextField/SyTextField.d.ts +1 -1
- package/dist/components/DataList/DataList.d.ts +1 -1
- package/dist/components/DataListItem/DataListItem.d.ts +1 -1
- package/dist/components/DatePicker/{DatePicker → CalendarMode}/DatePicker.d.ts +15 -15
- package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +13 -13
- package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +4 -4
- package/dist/components/DatePicker/composables/useDatePickerViewMode.d.ts +2 -2
- package/dist/components/DatePicker/composables/useDatePickerVisibility.d.ts +2 -2
- package/dist/components/DatePicker/composables/useDateSelection.d.ts +1 -1
- package/dist/components/DatePicker/composables/useMonthButtonCustomization.d.ts +2 -2
- package/dist/components/DatePicker/composables/useTodayButton.d.ts +1 -1
- package/dist/components/DatePicker/composables/useWeekendDays.d.ts +1 -1
- package/dist/components/DatePicker/constants/messages.d.ts +1 -1
- package/dist/components/DatePicker/types.d.ts +2 -2
- package/dist/components/ExternalLinks/ExternalLinks.d.ts +3 -3
- package/dist/components/ExternalLinks/config.d.ts +4 -3
- package/dist/components/ExternalLinks/locales.d.ts +1 -0
- package/dist/components/NirField/NirField.d.ts +11 -11
- package/dist/components/PasswordField/PasswordField.d.ts +1 -1
- package/dist/components/PeriodField/PeriodField.d.ts +24 -24
- package/dist/components/Tables/common/locales.d.ts +5 -0
- package/dist/components/Tables/common/useTableAria.d.ts +21 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/composables/date/useDatePickerAccessibility.d.ts +2 -2
- package/dist/{style.css → design-system-v3.css} +1 -1
- package/dist/design-system-v3.js +1 -1
- package/dist/design-system-v3.umd.cjs +273 -252
- package/dist/directives/Toolbar.d.ts +15 -0
- package/dist/directives/letterSpacing.d.ts +27 -0
- package/dist/{main-DoYCrS2Q.js → main-BzyNNvHX.js} +10482 -10252
- package/package.json +12 -12
- package/src/assets/_typography.scss +22 -23
- package/src/components/Accordion/Accordion.vue +2 -2
- package/src/components/Accordion/tests/__snapshots__/accordion.spec.ts.snap +5 -1
- package/src/components/Amelipro/AmeliproAutoCompleteField/__tests__/__snapshots__/AmeliproAutoCompleteField.spec.ts.snap +26 -14
- package/src/components/Amelipro/AmeliproBreadcrumb/__tests__/__snapshots__/AmeliproBreadcrumb.spec.ts.snap +15 -3
- package/src/components/Amelipro/AmeliproBtn/tests/__snapshots__/AmeliproBtn.spec.ts.snap +5 -1
- package/src/components/Amelipro/AmeliproCallback/tests/__snapshots__/AmeliproCallback.spec.ts.snap +14 -3
- package/src/components/Amelipro/AmeliproCard/tests/__snapshots__/AmeliproCard.spec.ts.snap +9 -2
- package/src/components/Amelipro/AmeliproChips/tests/__snapshots__/AmeliproChips.spec.ts.snap +4 -1
- package/src/components/Amelipro/AmeliproDialog/tests/__snapshots__/AmeliproDialog.spec.ts.snap +9 -2
- package/src/components/Amelipro/AmeliproDisclosure/tests/__snapshots__/AmeliproDisclosure.spec.ts.snap +19 -3
- package/src/components/Amelipro/AmeliproFooter/tests/__snapshots__/AmeliproFooter.spec.ts.snap +35 -7
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/AmeliproHeaderBrandSection/tests/__snapshots__/AmeliproHeaderBrandSection.spec.ts.snap +1 -1
- package/src/components/Amelipro/AmeliproHeader/AmeliproHeaderBar/tests/__snapshots__/AmeliproHeaderBar.spec.ts.snap +5 -2
- package/src/components/Amelipro/AmeliproHeader/tests/__snapshots__/AmeliproHeader.spec.ts.snap +130 -30
- package/src/components/Amelipro/AmeliproIconBtn/tests/__snapshots__/AmeliproIconBtn.spec.ts.snap +4 -1
- package/src/components/Amelipro/AmeliproIllustratedDataTile/tests/__snapshots__/AmeliproIllustratedDataTile.spec.ts.snap +4 -1
- package/src/components/Amelipro/AmeliproIllustratedRadioGroup/tests/__snapshots__/AmeliproIllustratedRadioGroup.spec.ts.snap +25 -5
- package/src/components/Amelipro/AmeliproMailTile/tests/__snapshots__/AmeliproMailTile.spec.ts.snap +5 -1
- package/src/components/Amelipro/AmeliproMenu/tests/__snapshots__/AmeliproMenu.spec.ts.snap +77 -15
- package/src/components/Amelipro/AmeliproMessage/tests/__snapshots__/AmeliproMessage.spec.ts.snap +11 -2
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproDropdownMenu/AmeliproDropdownMenuBtn/tests/__snapshots__/AmeliproDropdownMenuBtn.spec.ts.snap +5 -1
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproDropdownMenu/tests/__snapshots__/AmeliproDropdownMenu.spec.ts.snap +25 -5
- package/src/components/Amelipro/AmeliproMessagingLayout/AmeliproMessagingMenuBtn/tests/__snapshots__/AmeliproMessagingMenuBtn.spec.ts.snap +10 -2
- package/src/components/Amelipro/AmeliproMessagingLayout/tests/__snapshots__/AmeliproMessagingLayout.spec.ts.snap +42 -8
- package/src/components/Amelipro/AmeliproMultipleFoldingCard/tests/__snapshots__/AmeliproMultipleFoldingCard.spec.ts.snap +13 -3
- package/src/components/Amelipro/AmeliproNumberedCard/tests/__snapshots__/AmeliproNumberedCard.spec.ts.snap +12 -3
- package/src/components/Amelipro/AmeliproPageLayout/tests/__snapshots__/AmeliproPageLayout.spec.ts.snap +195 -42
- package/src/components/Amelipro/AmeliproPagination/AmeliproPaginationBtn/tests/__snapshots__/AmeliproPaginationBtn.spec.ts.snap +5 -1
- package/src/components/Amelipro/AmeliproPagination/tests/__snapshots__/AmeliproPagination.spec.ts.snap +10 -2
- package/src/components/Amelipro/AmeliproPatientBanner/tests/__snapshots__/AmeliproPatientBanner.spec.ts.snap +26 -4
- package/src/components/Amelipro/AmeliproSelect/tests/__snapshots__/AmeliproSelect.spec.ts.snap +10 -11
- package/src/components/Amelipro/AmeliproStateTile/AmeliproStateTile.stories.ts +2 -0
- package/src/components/Amelipro/AmeliproStateTile/AmeliproStateTile.vue +11 -4
- package/src/components/Amelipro/AmeliproStateTile/AmeliproStateTileTypes.ts +5 -0
- package/src/components/Amelipro/AmeliproStateTile/tests/__snapshots__/AmeliproStateTile.spec.ts.snap +13 -2
- package/src/components/Amelipro/AmeliproStatus/tests/__snapshots__/AmeliproStatus.spec.ts.snap +5 -1
- package/src/components/Amelipro/AmeliproStepper/AmeliproStepBtn/tests/__snapshots__/AmeliproStepBtn.spec.ts.snap +7 -1
- package/src/components/Amelipro/AmeliproStepper/tests/__snapshots__/AmeliproStepper.spec.ts.snap +49 -7
- package/src/components/Amelipro/AmeliproTabs/AmeliproTabBtn/tests/__snapshots__/AmeliproTabBtn.spec.ts.snap +5 -1
- package/src/components/Amelipro/AmeliproTabs/tests/__snapshots__/AmeliproTabs.spec.ts.snap +21 -4
- package/src/components/Amelipro/AmeliproTextArea/__tests__/__snapshots__/AmeliproTextArea.spec.ts.snap +10 -11
- package/src/components/Amelipro/AmeliproTextField/tests/__snapshots__/AmeliproTextField.spec.ts.snap +10 -11
- package/src/components/Amelipro/AmeliproTileBtn/tests/__snapshots__/AmeliproTileBtn.spec.ts.snap +8 -1
- package/src/components/Amelipro/AmeliproTooltips/tests/__snapshots__/AmeliproTooltips.spec.ts.snap +11 -2
- package/src/components/Amelipro/AmeliproTransmission/tests/__snapshots__/AmeliproTransmission.spec.ts.snap +26 -5
- package/src/components/Amelipro/ServiceMenu/ServiceBtn/tests/__snapshots__/ServiceBtn.spec.ts.snap +9 -2
- package/src/components/Amelipro/ServiceMenu/ServiceList/tests/__snapshots__/ServiceList.spec.ts.snap +18 -4
- package/src/components/Amelipro/ServiceMenu/ServiceMenuContent/tests/__snapshots__/ServiceMenuContent.spec.ts.snap +69 -15
- package/src/components/Amelipro/ServiceMenu/tests/__snapshots__/ServiceMenu.spec.ts.snap +84 -19
- package/src/components/Amelipro/StructureMenu/StructureItem/tests/__snapshots__/StructureItem.spec.ts.snap +5 -1
- package/src/components/Amelipro/StructureMenu/StructureList/tests/__snapshots__/StructureList.spec.ts.snap +15 -4
- package/src/components/Amelipro/StructureMenu/StructureTabs/tests/__snapshots__/StructureTabs.spec.ts.snap +30 -8
- package/src/components/Amelipro/StructureMenu/tests/__snapshots__/StructureMenu.spec.ts.snap +72 -16
- package/src/components/Amelipro/UserMenu/tests/__snapshots__/UserMenu.spec.ts.snap +9 -2
- package/src/components/BackToTopBtn/tests/BackToTopBtn.spec.ts +53 -15
- package/src/components/BackToTopBtn/tests/__snapshots__/BackToTopBtn.spec.ts.snap +10 -2
- package/src/components/CollapsibleList/CollapsibleList.vue +5 -1
- package/src/components/CookieBanner/Accessibilite.stories.ts +4 -0
- package/src/components/CookieBanner/CookieBanner.vue +137 -10
- package/src/components/CookieBanner/config.ts +3 -0
- package/src/components/CookieBanner/tests/__snapshots__/CookieBanner.spec.ts.snap +49 -38
- package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +80 -2
- package/src/components/CookiesSelection/CookiesSelection.vue +15 -2
- package/src/components/CookiesSelection/tests/__snapshots__/CookiesSelection.spec.ts.snap +49 -34
- package/src/components/CopyBtn/tests/__snapshots__/CopyBtn.spec.ts.snap +1 -1
- package/src/components/Customs/Selects/SelectBtnField/tests/__snapshots__/SelectBtnField.spec.ts.snap +58 -13
- package/src/components/Customs/Selects/SySelect/SySelect.vue +144 -147
- package/src/components/DatePicker/{DatePicker → CalendarMode}/DatePicker.stories.ts +3 -3
- package/src/components/DatePicker/{DatePicker → CalendarMode}/DatePicker.vue +4 -4
- package/src/components/DatePicker/{DatePicker → CalendarMode}/tests/DatePicker.events.spec.ts +1 -1
- package/src/components/DatePicker/{DatePicker → CalendarMode}/tests/DatePicker.spec.ts +4 -4
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.mdx +1 -1
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +3 -3
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.vue +6 -6
- package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.spec.ts +3 -3
- package/src/components/DatePicker/DatePickerOverview.mdx +1 -1
- package/src/components/DatePicker/DatePickerValidationExample/DatePickerValidation.stories.ts +1 -1
- package/src/components/DatePicker/DateTextInput/DateRange.stories.ts +76 -3
- package/src/components/DatePicker/DateTextInput/NoCalendar.mdx +1 -1
- package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +1 -1
- package/src/components/DatePicker/composables/index.ts +2 -2
- package/src/components/DatePicker/composables/tests/useDatePickerVisibility.spec.ts +14 -14
- package/src/components/DatePicker/composables/useDatePickerViewMode.ts +4 -4
- package/src/components/DatePicker/composables/useDatePickerVisibility.ts +12 -12
- package/src/components/DatePicker/composables/useDateSelection.ts +1 -1
- package/src/components/DatePicker/composables/useMonthButtonCustomization.ts +3 -3
- package/src/components/DatePicker/composables/useTodayButton.ts +1 -1
- package/src/components/DatePicker/composables/useWeekendDays.ts +1 -1
- package/src/components/DatePicker/constants/messages.ts +1 -1
- package/src/components/DatePicker/docExamples/DatePickerBidirectionalValidation.vue +2 -2
- package/src/components/DatePicker/docExamples/DatePickerValidationExamples.vue +1 -1
- package/src/components/DatePicker/types.ts +2 -2
- package/src/components/DialogBox/tests/DialogBox.spec.ts +26 -4
- package/src/components/DialogBox/tests/__snapshots__/DialogBox.spec.ts.snap +13 -3
- package/src/components/DownloadBtn/tests/__snapshots__/DownloadBtn.spec.ts.snap +8 -2
- package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +18 -4
- package/src/components/ExternalLinks/Accessibilite.mdx +4 -1
- package/src/components/ExternalLinks/Accessibilite.stories.ts +34 -0
- package/src/components/ExternalLinks/ExternalLinks.stories.ts +1 -3
- package/src/components/ExternalLinks/ExternalLinks.vue +96 -41
- package/src/components/ExternalLinks/config.ts +5 -4
- package/src/components/ExternalLinks/locales.ts +1 -0
- package/src/components/ExternalLinks/tests/ExternalLinks.spec.ts +3 -3
- package/src/components/ExternalLinks/tests/__snapshots__/ExternalLinks.spec.ts.snap +510 -400
- package/src/components/FilterInline/tests/__snapshots__/FilterInline.spec.ts.snap +3 -3
- package/src/components/FilterSideBar/tests/FilterSideBar.spec.ts +15 -6
- package/src/components/FooterBar/Accessibilite.stories.ts +4 -0
- package/src/components/FooterBar/FooterBar.vue +9 -5
- package/src/components/FooterBar/tests/__snapshots__/FooterBar.spec.ts.snap +0 -5
- package/src/components/FranceConnectBtn/tests/__snapshots__/FranceConnectBtn.spec.ts.snap +15 -3
- package/src/components/HeaderBar/HeaderBurgerMenu/tests/__snapshots__/HeaderBurgerMenu.spec.ts.snap +5 -1
- package/src/components/HeaderBar/HeaderLogo/tests/HeaderLogo.spec.ts +31 -6
- package/src/components/HeaderBar/tests/__snapshots__/HeaderBar.spec.ts.snap +7 -1
- package/src/components/HeaderBar/tests/useHeaderResponsiveMode.spec.ts +63 -5
- package/src/components/NirField/NirField.vue +41 -1
- package/src/components/NirField/tests/NirField.spec.ts +2 -2
- package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +18 -4
- package/src/components/PeriodField/PeriodField.vue +3 -3
- package/src/components/RangeField/RangeSlider/tests/__snapshots__/rangeSlider.spec.ts.snap +12 -3
- package/src/components/RangeField/tests/__snapshots__/RangeField.spec.ts.snap +132 -111
- package/src/components/RatingPicker/EmotionPicker/tests/__snapshots__/EmotionPicker.spec.ts.snap +66 -31
- package/src/components/RatingPicker/NumberPicker/tests/__snapshots__/NumberPicker.spec.ts.snap +33 -33
- package/src/components/RatingPicker/StarsPicker/tests/__snapshots__/StarsPicker.spec.ts.snap +43 -23
- package/src/components/RatingPicker/tests/__snapshots__/RatingPicker.spec.ts.snap +33 -33
- package/src/components/SyAlert/tests/__snapshots__/SyAlert.spec.ts.snap +5 -1
- package/src/components/TableToolbar/tests/__snapshots__/TableToolbar.spec.ts.snap +107 -95
- package/src/components/Tables/SyServerTable/SyServerTable.vue +43 -2
- package/src/components/Tables/SyTable/SyTable.vue +45 -7
- package/src/components/Tables/common/SyTablePagination.vue +10 -6
- package/src/components/Tables/common/filters/DateFilter.vue +1 -1
- package/src/components/Tables/common/filters/SelectFilter.vue +1 -2
- package/src/components/Tables/common/filters/tests/DateFilter.spec.ts +2 -2
- package/src/components/Tables/common/locales.ts +7 -0
- package/src/components/Tables/common/useTableAria.ts +279 -0
- package/src/components/ToolbarContainer/ToolbarContainer.vue +4 -4
- package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +17 -5
- package/src/components/index.ts +1 -1
- package/src/composables/date/tests/useDatePickerAccessibility.spec.ts +1 -1
- package/src/composables/date/useDateInitialization.ts +1 -1
- package/src/composables/date/useDateInitializationDayjs.ts +1 -1
- package/src/composables/date/useDatePickerAccessibility.ts +5 -5
- package/src/composables/useFilterable/useFilterable.spec.ts +10 -2
- package/src/designTokens/utils/createFontVariables.ts +6 -6
- package/src/directives/Toolbar.ts +172 -0
- package/src/directives/letterSpacing.ts +233 -0
- package/src/stories/Accessibilite/Avancement/Avancement.mdx +6 -6
- package/src/stories/Accessibilite/Avancement/Avancement.stories.ts +10 -9
- package/src/utils/functions/throttleDisplayFn/tests/throttleDisplayFn.spec.ts +27 -2
- package/src/utils/rules/isHolidayDay/IsHolidayDay.stories.ts +2 -2
- package/dist/DateFilter-DFKfon7L.js +0 -98
- package/dist/NumberFilter-DmhIL2Pr.js +0 -121
- package/dist/PeriodFilter-C46V6bYN.js +0 -112
- package/dist/SelectFilter-B8dtHtHo.js +0 -136
- package/dist/TextFilter-COKGday2.js +0 -114
- package/src/components/FilterSideBar/tests/__snapshots__/FilterSideBar.spec.ts.snap +0 -173
- package/src/components/SocialMediaLinks/tests/__snapshots__/SocialMediaLinks.spec.ts.snap +0 -186
- /package/src/components/DatePicker/{DatePicker → CalendarMode}/DatePicker.mdx +0 -0
|
@@ -17,7 +17,11 @@ exports[`TableToolbar > renders correctly when all the item are displayed 1`] =
|
|
|
17
17
|
v-toolbar--flat
|
|
18
18
|
"
|
|
19
19
|
minheight="56px"
|
|
20
|
-
style="
|
|
20
|
+
style="
|
|
21
|
+
background-color: #FFFFFF;
|
|
22
|
+
color: #000;
|
|
23
|
+
caret-color: #000;
|
|
24
|
+
"
|
|
21
25
|
>
|
|
22
26
|
<!---->
|
|
23
27
|
<div class="v-toolbar__content">
|
|
@@ -67,22 +71,23 @@ exports[`TableToolbar > renders correctly when all the item are displayed 1`] =
|
|
|
67
71
|
v-theme--light
|
|
68
72
|
"
|
|
69
73
|
role="progressbar"
|
|
70
|
-
style="
|
|
74
|
+
style="
|
|
75
|
+
top: 0px;
|
|
76
|
+
height: 0px;
|
|
77
|
+
--v-progress-linear-height: 2px;
|
|
78
|
+
"
|
|
71
79
|
>
|
|
72
80
|
<!---->
|
|
73
81
|
<div
|
|
74
|
-
class="
|
|
75
|
-
bg-primary
|
|
76
|
-
v-progress-linear__background
|
|
77
|
-
"
|
|
82
|
+
class="v-progress-linear__background"
|
|
78
83
|
style="opacity: NaN;"
|
|
79
84
|
></div>
|
|
80
85
|
<div
|
|
81
|
-
class="
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
class="v-progress-linear__buffer"
|
|
87
|
+
style="
|
|
88
|
+
opacity: NaN;
|
|
89
|
+
width: 0%;
|
|
84
90
|
"
|
|
85
|
-
style="opacity: NaN; width: 0%;"
|
|
86
91
|
></div>
|
|
87
92
|
<transition-stub
|
|
88
93
|
appear="false"
|
|
@@ -92,12 +97,10 @@ exports[`TableToolbar > renders correctly when all the item are displayed 1`] =
|
|
|
92
97
|
>
|
|
93
98
|
<div class="v-progress-linear__indeterminate">
|
|
94
99
|
<div class="
|
|
95
|
-
bg-primary
|
|
96
100
|
long
|
|
97
101
|
v-progress-linear__indeterminate
|
|
98
102
|
"></div>
|
|
99
103
|
<div class="
|
|
100
|
-
bg-primary
|
|
101
104
|
short
|
|
102
105
|
v-progress-linear__indeterminate
|
|
103
106
|
"></div>
|
|
@@ -117,16 +120,15 @@ exports[`TableToolbar > renders correctly when all the item are displayed 1`] =
|
|
|
117
120
|
v-field-label
|
|
118
121
|
v-label
|
|
119
122
|
"
|
|
120
|
-
for="input-0"
|
|
123
|
+
for="input-v-0"
|
|
121
124
|
>
|
|
122
125
|
<!---->
|
|
123
126
|
Rechercher
|
|
124
127
|
</label>
|
|
125
128
|
<!---->
|
|
126
129
|
<input
|
|
127
|
-
aria-describedby="input-0-messages"
|
|
128
130
|
class="v-field__input"
|
|
129
|
-
id="input-0"
|
|
131
|
+
id="input-v-0"
|
|
130
132
|
size="1"
|
|
131
133
|
type="text"
|
|
132
134
|
/>
|
|
@@ -155,7 +157,7 @@ exports[`TableToolbar > renders correctly when all the item are displayed 1`] =
|
|
|
155
157
|
v-theme--light
|
|
156
158
|
"
|
|
157
159
|
role="button"
|
|
158
|
-
tabindex="
|
|
160
|
+
tabindex="-1"
|
|
159
161
|
></i>
|
|
160
162
|
</div>
|
|
161
163
|
</transition-stub>
|
|
@@ -237,7 +239,11 @@ exports[`TableToolbar > renders correctly when loading 1`] = `
|
|
|
237
239
|
v-toolbar--flat
|
|
238
240
|
"
|
|
239
241
|
minheight="56px"
|
|
240
|
-
style="
|
|
242
|
+
style="
|
|
243
|
+
background-color: #FFFFFF;
|
|
244
|
+
color: #000;
|
|
245
|
+
caret-color: #000;
|
|
246
|
+
"
|
|
241
247
|
>
|
|
242
248
|
<!---->
|
|
243
249
|
<div class="v-toolbar__content">
|
|
@@ -290,22 +296,23 @@ exports[`TableToolbar > renders correctly when loading 1`] = `
|
|
|
290
296
|
v-theme--light
|
|
291
297
|
"
|
|
292
298
|
role="progressbar"
|
|
293
|
-
style="
|
|
299
|
+
style="
|
|
300
|
+
top: 0px;
|
|
301
|
+
height: 0px;
|
|
302
|
+
--v-progress-linear-height: 2px;
|
|
303
|
+
"
|
|
294
304
|
>
|
|
295
305
|
<!---->
|
|
296
306
|
<div
|
|
297
|
-
class="
|
|
298
|
-
bg-primary
|
|
299
|
-
v-progress-linear__background
|
|
300
|
-
"
|
|
307
|
+
class="v-progress-linear__background"
|
|
301
308
|
style="opacity: NaN;"
|
|
302
309
|
></div>
|
|
303
310
|
<div
|
|
304
|
-
class="
|
|
305
|
-
|
|
306
|
-
|
|
311
|
+
class="v-progress-linear__buffer"
|
|
312
|
+
style="
|
|
313
|
+
opacity: NaN;
|
|
314
|
+
width: 0%;
|
|
307
315
|
"
|
|
308
|
-
style="opacity: NaN; width: 0%;"
|
|
309
316
|
></div>
|
|
310
317
|
<transition-stub
|
|
311
318
|
appear="false"
|
|
@@ -315,12 +322,10 @@ exports[`TableToolbar > renders correctly when loading 1`] = `
|
|
|
315
322
|
>
|
|
316
323
|
<div class="v-progress-linear__indeterminate">
|
|
317
324
|
<div class="
|
|
318
|
-
bg-primary
|
|
319
325
|
long
|
|
320
326
|
v-progress-linear__indeterminate
|
|
321
327
|
"></div>
|
|
322
328
|
<div class="
|
|
323
|
-
bg-primary
|
|
324
329
|
short
|
|
325
330
|
v-progress-linear__indeterminate
|
|
326
331
|
"></div>
|
|
@@ -340,17 +345,16 @@ exports[`TableToolbar > renders correctly when loading 1`] = `
|
|
|
340
345
|
v-field-label
|
|
341
346
|
v-label
|
|
342
347
|
"
|
|
343
|
-
for="input-0"
|
|
348
|
+
for="input-v-0"
|
|
344
349
|
>
|
|
345
350
|
<!---->
|
|
346
351
|
Rechercher
|
|
347
352
|
</label>
|
|
348
353
|
<!---->
|
|
349
354
|
<input
|
|
350
|
-
aria-describedby="input-0-messages"
|
|
351
355
|
class="v-field__input"
|
|
352
356
|
disabled=""
|
|
353
|
-
id="input-0"
|
|
357
|
+
id="input-v-0"
|
|
354
358
|
size="1"
|
|
355
359
|
type="text"
|
|
356
360
|
/>
|
|
@@ -435,7 +439,11 @@ exports[`TableToolbar > renders correctly when the screen width <= 600px 1`] = `
|
|
|
435
439
|
v-toolbar--flat
|
|
436
440
|
"
|
|
437
441
|
minheight="56px"
|
|
438
|
-
style="
|
|
442
|
+
style="
|
|
443
|
+
background-color: #FFFFFF;
|
|
444
|
+
color: #000;
|
|
445
|
+
caret-color: #000;
|
|
446
|
+
"
|
|
439
447
|
>
|
|
440
448
|
<!---->
|
|
441
449
|
<div class="v-toolbar__content">
|
|
@@ -485,22 +493,23 @@ exports[`TableToolbar > renders correctly when the screen width <= 600px 1`] = `
|
|
|
485
493
|
v-theme--light
|
|
486
494
|
"
|
|
487
495
|
role="progressbar"
|
|
488
|
-
style="
|
|
496
|
+
style="
|
|
497
|
+
top: 0px;
|
|
498
|
+
height: 0px;
|
|
499
|
+
--v-progress-linear-height: 2px;
|
|
500
|
+
"
|
|
489
501
|
>
|
|
490
502
|
<!---->
|
|
491
503
|
<div
|
|
492
|
-
class="
|
|
493
|
-
bg-primary
|
|
494
|
-
v-progress-linear__background
|
|
495
|
-
"
|
|
504
|
+
class="v-progress-linear__background"
|
|
496
505
|
style="opacity: NaN;"
|
|
497
506
|
></div>
|
|
498
507
|
<div
|
|
499
|
-
class="
|
|
500
|
-
|
|
501
|
-
|
|
508
|
+
class="v-progress-linear__buffer"
|
|
509
|
+
style="
|
|
510
|
+
opacity: NaN;
|
|
511
|
+
width: 0%;
|
|
502
512
|
"
|
|
503
|
-
style="opacity: NaN; width: 0%;"
|
|
504
513
|
></div>
|
|
505
514
|
<transition-stub
|
|
506
515
|
appear="false"
|
|
@@ -510,12 +519,10 @@ exports[`TableToolbar > renders correctly when the screen width <= 600px 1`] = `
|
|
|
510
519
|
>
|
|
511
520
|
<div class="v-progress-linear__indeterminate">
|
|
512
521
|
<div class="
|
|
513
|
-
bg-primary
|
|
514
522
|
long
|
|
515
523
|
v-progress-linear__indeterminate
|
|
516
524
|
"></div>
|
|
517
525
|
<div class="
|
|
518
|
-
bg-primary
|
|
519
526
|
short
|
|
520
527
|
v-progress-linear__indeterminate
|
|
521
528
|
"></div>
|
|
@@ -535,16 +542,15 @@ exports[`TableToolbar > renders correctly when the screen width <= 600px 1`] = `
|
|
|
535
542
|
v-field-label
|
|
536
543
|
v-label
|
|
537
544
|
"
|
|
538
|
-
for="input-0"
|
|
545
|
+
for="input-v-0"
|
|
539
546
|
>
|
|
540
547
|
<!---->
|
|
541
548
|
Rechercher
|
|
542
549
|
</label>
|
|
543
550
|
<!---->
|
|
544
551
|
<input
|
|
545
|
-
aria-describedby="input-0-messages"
|
|
546
552
|
class="v-field__input"
|
|
547
|
-
id="input-0"
|
|
553
|
+
id="input-v-0"
|
|
548
554
|
size="1"
|
|
549
555
|
type="text"
|
|
550
556
|
/>
|
|
@@ -573,7 +579,7 @@ exports[`TableToolbar > renders correctly when the screen width <= 600px 1`] = `
|
|
|
573
579
|
v-theme--light
|
|
574
580
|
"
|
|
575
581
|
role="button"
|
|
576
|
-
tabindex="
|
|
582
|
+
tabindex="-1"
|
|
577
583
|
></i>
|
|
578
584
|
</div>
|
|
579
585
|
</transition-stub>
|
|
@@ -655,7 +661,11 @@ exports[`TableToolbar > renders correctly with content slot 1`] = `
|
|
|
655
661
|
v-toolbar--flat
|
|
656
662
|
"
|
|
657
663
|
minheight="56px"
|
|
658
|
-
style="
|
|
664
|
+
style="
|
|
665
|
+
background-color: #FFFFFF;
|
|
666
|
+
color: #000;
|
|
667
|
+
caret-color: #000;
|
|
668
|
+
"
|
|
659
669
|
>
|
|
660
670
|
<!---->
|
|
661
671
|
<div class="v-toolbar__content">
|
|
@@ -705,22 +715,23 @@ exports[`TableToolbar > renders correctly with content slot 1`] = `
|
|
|
705
715
|
v-theme--light
|
|
706
716
|
"
|
|
707
717
|
role="progressbar"
|
|
708
|
-
style="
|
|
718
|
+
style="
|
|
719
|
+
top: 0px;
|
|
720
|
+
height: 0px;
|
|
721
|
+
--v-progress-linear-height: 2px;
|
|
722
|
+
"
|
|
709
723
|
>
|
|
710
724
|
<!---->
|
|
711
725
|
<div
|
|
712
|
-
class="
|
|
713
|
-
bg-primary
|
|
714
|
-
v-progress-linear__background
|
|
715
|
-
"
|
|
726
|
+
class="v-progress-linear__background"
|
|
716
727
|
style="opacity: NaN;"
|
|
717
728
|
></div>
|
|
718
729
|
<div
|
|
719
|
-
class="
|
|
720
|
-
|
|
721
|
-
|
|
730
|
+
class="v-progress-linear__buffer"
|
|
731
|
+
style="
|
|
732
|
+
opacity: NaN;
|
|
733
|
+
width: 0%;
|
|
722
734
|
"
|
|
723
|
-
style="opacity: NaN; width: 0%;"
|
|
724
735
|
></div>
|
|
725
736
|
<transition-stub
|
|
726
737
|
appear="false"
|
|
@@ -730,12 +741,10 @@ exports[`TableToolbar > renders correctly with content slot 1`] = `
|
|
|
730
741
|
>
|
|
731
742
|
<div class="v-progress-linear__indeterminate">
|
|
732
743
|
<div class="
|
|
733
|
-
bg-primary
|
|
734
744
|
long
|
|
735
745
|
v-progress-linear__indeterminate
|
|
736
746
|
"></div>
|
|
737
747
|
<div class="
|
|
738
|
-
bg-primary
|
|
739
748
|
short
|
|
740
749
|
v-progress-linear__indeterminate
|
|
741
750
|
"></div>
|
|
@@ -755,16 +764,15 @@ exports[`TableToolbar > renders correctly with content slot 1`] = `
|
|
|
755
764
|
v-field-label
|
|
756
765
|
v-label
|
|
757
766
|
"
|
|
758
|
-
for="input-0"
|
|
767
|
+
for="input-v-0"
|
|
759
768
|
>
|
|
760
769
|
<!---->
|
|
761
770
|
Rechercher
|
|
762
771
|
</label>
|
|
763
772
|
<!---->
|
|
764
773
|
<input
|
|
765
|
-
aria-describedby="input-0-messages"
|
|
766
774
|
class="v-field__input"
|
|
767
|
-
id="input-0"
|
|
775
|
+
id="input-v-0"
|
|
768
776
|
size="1"
|
|
769
777
|
type="text"
|
|
770
778
|
/>
|
|
@@ -793,7 +801,7 @@ exports[`TableToolbar > renders correctly with content slot 1`] = `
|
|
|
793
801
|
v-theme--light
|
|
794
802
|
"
|
|
795
803
|
role="button"
|
|
796
|
-
tabindex="
|
|
804
|
+
tabindex="-1"
|
|
797
805
|
></i>
|
|
798
806
|
</div>
|
|
799
807
|
</transition-stub>
|
|
@@ -875,7 +883,11 @@ exports[`TableToolbar > renders correctly with no items 1`] = `
|
|
|
875
883
|
v-toolbar--flat
|
|
876
884
|
"
|
|
877
885
|
minheight="56px"
|
|
878
|
-
style="
|
|
886
|
+
style="
|
|
887
|
+
background-color: #FFFFFF;
|
|
888
|
+
color: #000;
|
|
889
|
+
caret-color: #000;
|
|
890
|
+
"
|
|
879
891
|
>
|
|
880
892
|
<!---->
|
|
881
893
|
<div class="v-toolbar__content">
|
|
@@ -917,22 +929,23 @@ exports[`TableToolbar > renders correctly with no items 1`] = `
|
|
|
917
929
|
v-theme--light
|
|
918
930
|
"
|
|
919
931
|
role="progressbar"
|
|
920
|
-
style="
|
|
932
|
+
style="
|
|
933
|
+
top: 0px;
|
|
934
|
+
height: 0px;
|
|
935
|
+
--v-progress-linear-height: 2px;
|
|
936
|
+
"
|
|
921
937
|
>
|
|
922
938
|
<!---->
|
|
923
939
|
<div
|
|
924
|
-
class="
|
|
925
|
-
bg-primary
|
|
926
|
-
v-progress-linear__background
|
|
927
|
-
"
|
|
940
|
+
class="v-progress-linear__background"
|
|
928
941
|
style="opacity: NaN;"
|
|
929
942
|
></div>
|
|
930
943
|
<div
|
|
931
|
-
class="
|
|
932
|
-
|
|
933
|
-
|
|
944
|
+
class="v-progress-linear__buffer"
|
|
945
|
+
style="
|
|
946
|
+
opacity: NaN;
|
|
947
|
+
width: 0%;
|
|
934
948
|
"
|
|
935
|
-
style="opacity: NaN; width: 0%;"
|
|
936
949
|
></div>
|
|
937
950
|
<transition-stub
|
|
938
951
|
appear="false"
|
|
@@ -942,12 +955,10 @@ exports[`TableToolbar > renders correctly with no items 1`] = `
|
|
|
942
955
|
>
|
|
943
956
|
<div class="v-progress-linear__indeterminate">
|
|
944
957
|
<div class="
|
|
945
|
-
bg-primary
|
|
946
958
|
long
|
|
947
959
|
v-progress-linear__indeterminate
|
|
948
960
|
"></div>
|
|
949
961
|
<div class="
|
|
950
|
-
bg-primary
|
|
951
962
|
short
|
|
952
963
|
v-progress-linear__indeterminate
|
|
953
964
|
"></div>
|
|
@@ -967,16 +978,15 @@ exports[`TableToolbar > renders correctly with no items 1`] = `
|
|
|
967
978
|
v-field-label
|
|
968
979
|
v-label
|
|
969
980
|
"
|
|
970
|
-
for="input-0"
|
|
981
|
+
for="input-v-0"
|
|
971
982
|
>
|
|
972
983
|
<!---->
|
|
973
984
|
Rechercher
|
|
974
985
|
</label>
|
|
975
986
|
<!---->
|
|
976
987
|
<input
|
|
977
|
-
aria-describedby="input-0-messages"
|
|
978
988
|
class="v-field__input"
|
|
979
|
-
id="input-0"
|
|
989
|
+
id="input-v-0"
|
|
980
990
|
size="1"
|
|
981
991
|
type="text"
|
|
982
992
|
/>
|
|
@@ -1005,7 +1015,7 @@ exports[`TableToolbar > renders correctly with no items 1`] = `
|
|
|
1005
1015
|
v-theme--light
|
|
1006
1016
|
"
|
|
1007
1017
|
role="button"
|
|
1008
|
-
tabindex="
|
|
1018
|
+
tabindex="-1"
|
|
1009
1019
|
></i>
|
|
1010
1020
|
</div>
|
|
1011
1021
|
</transition-stub>
|
|
@@ -1088,7 +1098,11 @@ exports[`TableToolbar > should render 1`] = `
|
|
|
1088
1098
|
"
|
|
1089
1099
|
minheight="56px"
|
|
1090
1100
|
showaddbtn="true"
|
|
1091
|
-
style="
|
|
1101
|
+
style="
|
|
1102
|
+
background-color: #FFFFFF;
|
|
1103
|
+
color: #000;
|
|
1104
|
+
caret-color: #000;
|
|
1105
|
+
"
|
|
1092
1106
|
>
|
|
1093
1107
|
<!---->
|
|
1094
1108
|
<div class="v-toolbar__content">
|
|
@@ -1138,22 +1152,23 @@ exports[`TableToolbar > should render 1`] = `
|
|
|
1138
1152
|
v-theme--light
|
|
1139
1153
|
"
|
|
1140
1154
|
role="progressbar"
|
|
1141
|
-
style="
|
|
1155
|
+
style="
|
|
1156
|
+
top: 0px;
|
|
1157
|
+
height: 0px;
|
|
1158
|
+
--v-progress-linear-height: 2px;
|
|
1159
|
+
"
|
|
1142
1160
|
>
|
|
1143
1161
|
<!---->
|
|
1144
1162
|
<div
|
|
1145
|
-
class="
|
|
1146
|
-
bg-primary
|
|
1147
|
-
v-progress-linear__background
|
|
1148
|
-
"
|
|
1163
|
+
class="v-progress-linear__background"
|
|
1149
1164
|
style="opacity: NaN;"
|
|
1150
1165
|
></div>
|
|
1151
1166
|
<div
|
|
1152
|
-
class="
|
|
1153
|
-
|
|
1154
|
-
|
|
1167
|
+
class="v-progress-linear__buffer"
|
|
1168
|
+
style="
|
|
1169
|
+
opacity: NaN;
|
|
1170
|
+
width: 0%;
|
|
1155
1171
|
"
|
|
1156
|
-
style="opacity: NaN; width: 0%;"
|
|
1157
1172
|
></div>
|
|
1158
1173
|
<transition-stub
|
|
1159
1174
|
appear="false"
|
|
@@ -1163,12 +1178,10 @@ exports[`TableToolbar > should render 1`] = `
|
|
|
1163
1178
|
>
|
|
1164
1179
|
<div class="v-progress-linear__indeterminate">
|
|
1165
1180
|
<div class="
|
|
1166
|
-
bg-primary
|
|
1167
1181
|
long
|
|
1168
1182
|
v-progress-linear__indeterminate
|
|
1169
1183
|
"></div>
|
|
1170
1184
|
<div class="
|
|
1171
|
-
bg-primary
|
|
1172
1185
|
short
|
|
1173
1186
|
v-progress-linear__indeterminate
|
|
1174
1187
|
"></div>
|
|
@@ -1188,16 +1201,15 @@ exports[`TableToolbar > should render 1`] = `
|
|
|
1188
1201
|
v-field-label
|
|
1189
1202
|
v-label
|
|
1190
1203
|
"
|
|
1191
|
-
for="input-0"
|
|
1204
|
+
for="input-v-0"
|
|
1192
1205
|
>
|
|
1193
1206
|
<!---->
|
|
1194
1207
|
Rechercher
|
|
1195
1208
|
</label>
|
|
1196
1209
|
<!---->
|
|
1197
1210
|
<input
|
|
1198
|
-
aria-describedby="input-0-messages"
|
|
1199
1211
|
class="v-field__input"
|
|
1200
|
-
id="input-0"
|
|
1212
|
+
id="input-v-0"
|
|
1201
1213
|
size="1"
|
|
1202
1214
|
type="text"
|
|
1203
1215
|
/>
|
|
@@ -1226,7 +1238,7 @@ exports[`TableToolbar > should render 1`] = `
|
|
|
1226
1238
|
v-theme--light
|
|
1227
1239
|
"
|
|
1228
1240
|
role="button"
|
|
1229
|
-
tabindex="
|
|
1241
|
+
tabindex="-1"
|
|
1230
1242
|
></i>
|
|
1231
1243
|
</div>
|
|
1232
1244
|
</transition-stub>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed, nextTick, onMounted, provide, ref, toRef, useAttrs, watch } from 'vue'
|
|
2
|
+
import { computed, nextTick, onMounted, onUnmounted, provide, ref, toRef, useAttrs, watch } from 'vue'
|
|
3
3
|
import type { VDataTableServer } from 'vuetify/components'
|
|
4
4
|
import SyCheckbox from '@/components/Customs/SyCheckbox/SyCheckbox.vue'
|
|
5
5
|
import SyTableFilter from '../common/SyTableFilter.vue'
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import { useTableItems } from '../common/useTableItems'
|
|
17
17
|
import OrganizeColumns from '../common/organizeColumns/OrganizeColumns.vue'
|
|
18
18
|
import { useTableCheckbox } from '../common/useTableCheckbox'
|
|
19
|
+
import { useTableAria } from '../common/useTableAria'
|
|
19
20
|
|
|
20
21
|
const props = withDefaults(defineProps<SyServerTableProps>(), {
|
|
21
22
|
caption: '',
|
|
@@ -111,10 +112,16 @@
|
|
|
111
112
|
// Create a computed property for items to ensure reactivity
|
|
112
113
|
const tableItems = computed(() => props.items)
|
|
113
114
|
|
|
115
|
+
// Timeout management for cleanup
|
|
116
|
+
const timeouts = ref<ReturnType<typeof setTimeout>[]>([])
|
|
117
|
+
|
|
114
118
|
// Function to add accessibility attributes to row checkboxes
|
|
115
119
|
const accessibilityRowCheckboxes = () => {
|
|
116
120
|
nextTick(() => {
|
|
117
|
-
setTimeout(() => {
|
|
121
|
+
const timeoutId = setTimeout(() => {
|
|
122
|
+
// Check if document is available (for test environment)
|
|
123
|
+
if (typeof document === 'undefined') return
|
|
124
|
+
|
|
118
125
|
const tableElement = document.getElementById(uniqueTableId.value)
|
|
119
126
|
if (!tableElement) return
|
|
120
127
|
|
|
@@ -126,6 +133,9 @@
|
|
|
126
133
|
checkbox.setAttribute('title', rowLabel)
|
|
127
134
|
})
|
|
128
135
|
}, 100) // Small delay to ensure DOM is updated
|
|
136
|
+
|
|
137
|
+
// Track timeout for cleanup
|
|
138
|
+
timeouts.value.push(timeoutId)
|
|
129
139
|
})
|
|
130
140
|
}
|
|
131
141
|
|
|
@@ -137,6 +147,15 @@
|
|
|
137
147
|
// Apply accessibility attributes when component is mounted
|
|
138
148
|
onMounted(() => {
|
|
139
149
|
accessibilityRowCheckboxes()
|
|
150
|
+
setupAria()
|
|
151
|
+
})
|
|
152
|
+
|
|
153
|
+
// Clean up timeouts on unmount to prevent unhandled errors
|
|
154
|
+
onUnmounted(() => {
|
|
155
|
+
timeouts.value.forEach((timeoutId) => {
|
|
156
|
+
clearTimeout(timeoutId)
|
|
157
|
+
})
|
|
158
|
+
timeouts.value = []
|
|
140
159
|
})
|
|
141
160
|
|
|
142
161
|
const { getItemValue, toggleAllRows } = useTableCheckbox({
|
|
@@ -147,6 +166,19 @@
|
|
|
147
166
|
},
|
|
148
167
|
})
|
|
149
168
|
|
|
169
|
+
// Use the ARIA accessibility composable
|
|
170
|
+
const {
|
|
171
|
+
statusRegionId,
|
|
172
|
+
statusMessage,
|
|
173
|
+
setupAria,
|
|
174
|
+
} = useTableAria({
|
|
175
|
+
table,
|
|
176
|
+
items: itemsRef,
|
|
177
|
+
totalItemsCount: itemsLength,
|
|
178
|
+
options,
|
|
179
|
+
uniqueTableId: uniqueTableId.value,
|
|
180
|
+
})
|
|
181
|
+
|
|
150
182
|
defineExpose({ filterItems })
|
|
151
183
|
|
|
152
184
|
setupAccessibility()
|
|
@@ -203,6 +235,15 @@
|
|
|
203
235
|
:id="uniqueTableId"
|
|
204
236
|
:class="['sy-server-table', { 'sy-server-table--striped': props.striped }]"
|
|
205
237
|
>
|
|
238
|
+
<!-- ARIA status region for row count announcements -->
|
|
239
|
+
<div
|
|
240
|
+
:id="statusRegionId"
|
|
241
|
+
role="status"
|
|
242
|
+
aria-live="polite"
|
|
243
|
+
class="d-sr-only"
|
|
244
|
+
>
|
|
245
|
+
{{ statusMessage }}
|
|
246
|
+
</div>
|
|
206
247
|
<VDataTableServer
|
|
207
248
|
ref="table"
|
|
208
249
|
v-bind="propsFacade"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed, onMounted, nextTick, provide, ref, toRef, useAttrs, watch } from 'vue'
|
|
2
|
+
import { computed, onMounted, onUnmounted, nextTick, provide, ref, toRef, useAttrs, watch } from 'vue'
|
|
3
3
|
import type { VDataTable } from 'vuetify/components'
|
|
4
4
|
import SyCheckbox from '@/components/Customs/SyCheckbox/SyCheckbox.vue'
|
|
5
5
|
import SyTableFilter from '../common/SyTableFilter.vue'
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import { useTableHeaders } from '../common/useTableHeaders'
|
|
17
17
|
import { useTableItems } from '../common/useTableItems'
|
|
18
18
|
import { useTableCheckbox } from '../common/useTableCheckbox'
|
|
19
|
+
import { useTableAria } from '../common/useTableAria'
|
|
19
20
|
|
|
20
21
|
const props = withDefaults(defineProps<SyTableProps>(), {
|
|
21
22
|
caption: '',
|
|
@@ -104,22 +105,38 @@
|
|
|
104
105
|
emit,
|
|
105
106
|
})
|
|
106
107
|
|
|
107
|
-
// Create a computed property for items to ensure reactivity
|
|
108
|
-
const tableItems = computed(() => props.items)
|
|
109
|
-
|
|
110
108
|
// Use the table checkbox composable
|
|
111
|
-
const {
|
|
112
|
-
items:
|
|
109
|
+
const { toggleAllRows, getItemValue } = useTableCheckbox({
|
|
110
|
+
items: filteredItems,
|
|
113
111
|
modelValue: model,
|
|
114
112
|
updateModelValue: (value) => {
|
|
115
113
|
model.value = value
|
|
116
114
|
},
|
|
117
115
|
})
|
|
118
116
|
|
|
117
|
+
// Use the ARIA accessibility composable
|
|
118
|
+
const {
|
|
119
|
+
statusRegionId,
|
|
120
|
+
statusMessage,
|
|
121
|
+
setupAria,
|
|
122
|
+
} = useTableAria({
|
|
123
|
+
table,
|
|
124
|
+
items: filteredItems,
|
|
125
|
+
totalItemsCount: itemsLength,
|
|
126
|
+
options,
|
|
127
|
+
uniqueTableId: uniqueTableId.value,
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
// Timeout management for cleanup
|
|
131
|
+
const timeouts = ref<ReturnType<typeof setTimeout>[]>([])
|
|
132
|
+
|
|
119
133
|
// Function to add accessibility attributes to row checkboxes
|
|
120
134
|
const accessibilityRowCheckboxes = () => {
|
|
121
135
|
nextTick(() => {
|
|
122
|
-
setTimeout(() => {
|
|
136
|
+
const timeoutId = setTimeout(() => {
|
|
137
|
+
// Check if document is available (for test environment)
|
|
138
|
+
if (typeof document === 'undefined') return
|
|
139
|
+
|
|
123
140
|
const tableElement = document.getElementById(uniqueTableId.value)
|
|
124
141
|
if (!tableElement) return
|
|
125
142
|
|
|
@@ -131,6 +148,9 @@
|
|
|
131
148
|
checkbox.setAttribute('title', rowLabel)
|
|
132
149
|
})
|
|
133
150
|
}, 100) // Small delay to ensure DOM is updated
|
|
151
|
+
|
|
152
|
+
// Track timeout for cleanup
|
|
153
|
+
timeouts.value.push(timeoutId)
|
|
134
154
|
})
|
|
135
155
|
}
|
|
136
156
|
|
|
@@ -142,6 +162,15 @@
|
|
|
142
162
|
// Apply accessibility attributes when component is mounted
|
|
143
163
|
onMounted(() => {
|
|
144
164
|
accessibilityRowCheckboxes()
|
|
165
|
+
setupAria()
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
// Clean up timeouts on unmount to prevent unhandled errors
|
|
169
|
+
onUnmounted(() => {
|
|
170
|
+
timeouts.value.forEach((timeoutId) => {
|
|
171
|
+
clearTimeout(timeoutId)
|
|
172
|
+
})
|
|
173
|
+
timeouts.value = []
|
|
145
174
|
})
|
|
146
175
|
|
|
147
176
|
setupAccessibility()
|
|
@@ -198,6 +227,15 @@
|
|
|
198
227
|
:id="uniqueTableId"
|
|
199
228
|
:class="['sy-table', { 'sy-table--striped': props.striped }]"
|
|
200
229
|
>
|
|
230
|
+
<!-- ARIA status region for row count announcements -->
|
|
231
|
+
<div
|
|
232
|
+
:id="statusRegionId"
|
|
233
|
+
role="status"
|
|
234
|
+
aria-live="polite"
|
|
235
|
+
class="d-sr-only"
|
|
236
|
+
>
|
|
237
|
+
{{ statusMessage }}
|
|
238
|
+
</div>
|
|
201
239
|
<VDataTable
|
|
202
240
|
ref="table"
|
|
203
241
|
v-model="model"
|