origam 2.38.1 → 2.38.2
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/CHANGELOG.md +24 -0
- package/dist/src/assets/locales/en.json +1 -1
- package/dist/src/assets/locales/fr.json +2 -2
- package/dist/src/components/Alert/OrigamAlert.vue +739 -165
- package/dist/src/components/App/OrigamApp.vue +95 -19
- package/dist/src/components/App/OrigamAppBar.vue +751 -158
- package/dist/src/components/Audio/OrigamAudio.vue +1288 -346
- package/dist/src/components/Audio/OrigamAudioWaveform.vue +63 -7
- package/dist/src/components/Avatar/OrigamAvatar.vue +678 -126
- package/dist/src/components/Avatar/OrigamAvatarGroup.vue +700 -153
- package/dist/src/components/Badge/OrigamBadge.vue +548 -135
- package/dist/src/components/Blockquote/OrigamBlockquote.vue +698 -140
- package/dist/src/components/BottomNav/OrigamBottomNav.vue +864 -156
- package/dist/src/components/Bracket/OrigamBracket.vue +1013 -380
- package/dist/src/components/Bracket/OrigamBracketCompetitor.vue +674 -154
- package/dist/src/components/Bracket/OrigamBracketMatch.vue +663 -163
- package/dist/src/components/Bracket/OrigamBracketRound.vue +116 -34
- package/dist/src/components/Breadcrumb/OrigamBreadcrumb.vue +654 -119
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbDivider.vue +292 -54
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbItem.vue +657 -126
- package/dist/src/components/Btn/OrigamBtn.vue +928 -249
- package/dist/src/components/Btn/OrigamBtnGroup.vue +658 -141
- package/dist/src/components/Btn/OrigamBtnToggle.vue +578 -91
- package/dist/src/components/Calendar/OrigamCalendar.vue +1142 -484
- package/dist/src/components/Card/OrigamCard.vue +938 -194
- package/dist/src/components/Card/OrigamCardHeader.vue +593 -104
- package/dist/src/components/Card/OrigamCardText.vue +536 -84
- package/dist/src/components/Carousel/OrigamCarousel.vue +778 -202
- package/dist/src/components/Carousel/OrigamCarouselItem.vue +660 -109
- package/dist/src/components/Chart/OrigamChart.vue +942 -452
- package/dist/src/components/Chart/OrigamChartAxis.vue +111 -19
- package/dist/src/components/Chart/OrigamChartBoxPlot.vue +713 -297
- package/dist/src/components/Chart/OrigamChartBullet.vue +701 -286
- package/dist/src/components/Chart/OrigamChartCandlestick.vue +663 -243
- package/dist/src/components/Chart/OrigamChartCartesian.vue +1055 -487
- package/dist/src/components/Chart/OrigamChartGauge.vue +563 -164
- package/dist/src/components/Chart/OrigamChartHeatmap.vue +677 -251
- package/dist/src/components/Chart/OrigamChartHoneycomb.vue +700 -288
- package/dist/src/components/Chart/OrigamChartLegend.vue +108 -16
- package/dist/src/components/Chart/OrigamChartMap.vue +723 -299
- package/dist/src/components/Chart/OrigamChartPareto.vue +721 -276
- package/dist/src/components/Chart/OrigamChartPictorial.vue +777 -355
- package/dist/src/components/Chart/OrigamChartPolar.vue +603 -210
- package/dist/src/components/Chart/OrigamChartPolarBar.vue +674 -271
- package/dist/src/components/Chart/OrigamChartPyramid.vue +685 -250
- package/dist/src/components/Chart/OrigamChartRadar.vue +515 -165
- package/dist/src/components/Chart/OrigamChartRangeSelector.vue +50 -25
- package/dist/src/components/Chart/OrigamChartSankey.vue +913 -467
- package/dist/src/components/Chart/OrigamChartSparkline.vue +711 -268
- package/dist/src/components/Chart/OrigamChartStreamgraph.vue +810 -368
- package/dist/src/components/Chart/OrigamChartSunburst.vue +779 -368
- package/dist/src/components/Chart/OrigamChartTooltip.vue +78 -19
- package/dist/src/components/Chart/OrigamChartTreemap.vue +750 -288
- package/dist/src/components/Chart/OrigamChartVariwide.vue +679 -251
- package/dist/src/components/Chart/OrigamChartWordCloud.vue +674 -265
- package/dist/src/components/Checkbox/OrigamCheckbox.vue +781 -136
- package/dist/src/components/Checkbox/OrigamCheckboxBtn.vue +465 -81
- package/dist/src/components/Checkbox/OrigamCheckboxGroup.vue +824 -137
- package/dist/src/components/Chip/OrigamChip.vue +867 -202
- package/dist/src/components/Chip/OrigamChipGroup.vue +633 -121
- package/dist/src/components/ClientOnly/OrigamClientOnly.vue +30 -4
- package/dist/src/components/Clipboard/OrigamClipboard.vue +624 -105
- package/dist/src/components/Code/OrigamCode.vue +844 -206
- package/dist/src/components/CodeGroup/OrigamCodeGroup.vue +494 -83
- package/dist/src/components/ColorPicker/OrigamColorPicker.vue +777 -159
- package/dist/src/components/ColorPicker/OrigamColorPickerCanvas.vue +295 -181
- package/dist/src/components/ColorPicker/OrigamColorPickerEdit.vue +108 -45
- package/dist/src/components/ColorPicker/OrigamColorPickerPreview.vue +131 -46
- package/dist/src/components/ColorPicker/OrigamColorPickerSwatches.vue +128 -39
- package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +1123 -258
- package/dist/src/components/CommandPalette/OrigamCommandPalette.vue +415 -162
- package/dist/src/components/ConfirmWrapper/OrigamConfirmWrapper.vue +389 -145
- package/dist/src/components/ContextualMenu/OrigamContextualMenu.vue +852 -147
- package/dist/src/components/Counter/OrigamCounter.vue +588 -96
- package/dist/src/components/DataList/OrigamDataList.vue +619 -113
- package/dist/src/components/DataList/OrigamDataText.vue +295 -65
- package/dist/src/components/DataList/OrigamDataTitle.vue +295 -65
- package/dist/src/components/DataTable/OrigamDataTable.vue +934 -222
- package/dist/src/components/DataTable/OrigamDataTableColumnCell.vue +196 -51
- package/dist/src/components/DataTable/OrigamDataTableFooter.vue +319 -78
- package/dist/src/components/DataTable/OrigamDataTableGroupHeaderRow.vue +124 -44
- package/dist/src/components/DataTable/OrigamDataTableHeaderCell.vue +181 -70
- package/dist/src/components/DataTable/OrigamDataTableHeaders.vue +155 -46
- package/dist/src/components/DataTable/OrigamDataTableHeadersCell.vue +145 -27
- package/dist/src/components/DataTable/OrigamDataTableHeadersCellMobile.vue +126 -43
- package/dist/src/components/DataTable/OrigamDataTableRow.vue +151 -73
- package/dist/src/components/DataTable/OrigamDataTableRows.vue +261 -106
- package/dist/src/components/DatePicker/OrigamDatePicker.vue +1048 -261
- package/dist/src/components/DatePicker/OrigamDatePickerControls.vue +155 -51
- package/dist/src/components/DatePicker/OrigamDatePickerHeader.vue +147 -46
- package/dist/src/components/DatePicker/OrigamDatePickerMonth.vue +312 -134
- package/dist/src/components/DatePicker/OrigamDatePickerMonths.vue +151 -61
- package/dist/src/components/DatePicker/OrigamDatePickerYears.vue +154 -67
- package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +1147 -306
- package/dist/src/components/DefaultsProvider/OrigamDefaultsProvider.vue +74 -14
- package/dist/src/components/Dialog/OrigamDialog.vue +953 -196
- package/dist/src/components/Dialog/OrigamDialogConfirmation.vue +886 -148
- package/dist/src/components/Divider/OrigamDivider.vue +210 -50
- package/dist/src/components/Drawer/OrigamDrawer.vue +909 -207
- package/dist/src/components/EmptyState/OrigamEmptyState.vue +146 -35
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanel.vue +746 -159
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelContent.vue +591 -95
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +663 -143
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanels.vue +675 -134
- package/dist/src/components/Field/OrigamField.vue +1118 -306
- package/dist/src/components/FileField/OrigamFileField.vue +1188 -311
- package/dist/src/components/FileField/OrigamFileFieldDragNDropItem.vue +155 -36
- package/dist/src/components/FileField/OrigamFileFieldListItem.vue +155 -36
- package/dist/src/components/Form/OrigamForm.vue +197 -74
- package/dist/src/components/Grid/OrigamGrid.vue +707 -147
- package/dist/src/components/Grid/OrigamGridItem.vue +110 -37
- package/dist/src/components/Grids/OrigamCol.vue +593 -110
- package/dist/src/components/Grids/OrigamContainer.vue +461 -80
- package/dist/src/components/Grids/OrigamRow.vue +573 -112
- package/dist/src/components/Grids/OrigamSpacer.vue +54 -17
- package/dist/src/components/Icon/OrigamClassIcon.vue +573 -98
- package/dist/src/components/Icon/OrigamComponentIcon.vue +561 -101
- package/dist/src/components/Icon/OrigamIcon.vue +561 -98
- package/dist/src/components/Icon/OrigamLigatureIcon.vue +558 -98
- package/dist/src/components/Icon/OrigamSvgIcon.vue +593 -100
- package/dist/src/components/Img/OrigamImg.vue +869 -228
- package/dist/src/components/InfiniteScroll/OrigamInfiniteScroll.vue +319 -111
- package/dist/src/components/InfiniteScroll/OrigamInfiniteScrollIntersect.vue +80 -17
- package/dist/src/components/InlineEdit/OrigamInlineEdit.vue +476 -140
- package/dist/src/components/Input/OrigamInput.vue +747 -180
- package/dist/src/components/ItemGroup/OrigamItemGroup.vue +112 -36
- package/dist/src/components/ItemGroup/OrigamItemGroupItem.vue +80 -29
- package/dist/src/components/Kbd/OrigamKbd.vue +450 -75
- package/dist/src/components/Label/OrigamLabel.vue +584 -95
- package/dist/src/components/Layout/OrigamLayout.vue +563 -94
- package/dist/src/components/Lazy/OrigamLazy.vue +131 -34
- package/dist/src/components/List/OrigamList.vue +755 -170
- package/dist/src/components/List/OrigamListChildren.vue +59 -19
- package/dist/src/components/List/OrigamListGroup.vue +631 -134
- package/dist/src/components/List/OrigamListGroupActivator.vue +45 -17
- package/dist/src/components/List/OrigamListItem.vue +890 -224
- package/dist/src/components/List/OrigamListItemWrapper.vue +20 -10
- package/dist/src/components/List/OrigamListSubheader.vue +542 -93
- package/dist/src/components/Loader/OrigamLoader.vue +110 -25
- package/dist/src/components/Main/OrigamMain.vue +565 -96
- package/dist/src/components/Masonry/OrigamMasonry.vue +799 -187
- package/dist/src/components/Media/OrigamMediaController.vue +465 -182
- package/dist/src/components/Media/OrigamMediaScrubber.vue +389 -152
- package/dist/src/components/Media/OrigamMediaVolumeControl.vue +174 -44
- package/dist/src/components/Menu/OrigamMenu.vue +1079 -255
- package/dist/src/components/Messages/OrigamMessages.vue +606 -97
- package/dist/src/components/NumberField/OrigamNumberField.vue +1208 -333
- package/dist/src/components/NumberFormat/OrigamNumberFormat.vue +177 -57
- package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +1016 -272
- package/dist/src/components/Overlay/OrigamOverlay.vue +446 -158
- package/dist/src/components/Overlay/OrigamOverlayScrim.vue +122 -30
- package/dist/src/components/Pagination/OrigamPagination.vue +982 -313
- package/dist/src/components/Parallax/OrigamParallax.vue +800 -259
- package/dist/src/components/Parallax/OrigamParallaxElement.vue +694 -178
- package/dist/src/components/Parallax/OrigamParallaxLayer.vue +132 -47
- package/dist/src/components/PasswordField/OrigamPasswordField.vue +1098 -265
- package/dist/src/components/Picker/OrigamPicker.vue +655 -108
- package/dist/src/components/Picker/OrigamPickerTitle.vue +108 -26
- package/dist/src/components/Progress/OrigamProgress.vue +436 -70
- package/dist/src/components/Progress/OrigamProgressCircular.vue +399 -82
- package/dist/src/components/Progress/OrigamProgressLinear.vue +468 -115
- package/dist/src/components/QrCode/OrigamQrCode.vue +642 -126
- package/dist/src/components/Radio/OrigamRadio.vue +772 -132
- package/dist/src/components/Radio/OrigamRadioBtn.vue +446 -71
- package/dist/src/components/Radio/OrigamRadioGroup.vue +808 -135
- package/dist/src/components/RatingField/OrigamRatingField.vue +963 -194
- package/dist/src/components/RatingField/OrigamRatingFieldItem.vue +657 -106
- package/dist/src/components/Responsive/OrigamResponsive.vue +548 -91
- package/dist/src/components/Select/OrigamSelect.vue +1639 -567
- package/dist/src/components/SelectionControl/OrigamSelectionControl.vue +564 -151
- package/dist/src/components/SelectionControl/OrigamSelectionControlGroup.vue +178 -62
- package/dist/src/components/Sheet/OrigamSheet.vue +773 -199
- package/dist/src/components/Skeleton/OrigamSkeleton.vue +249 -46
- package/dist/src/components/Skeleton/OrigamSkeletonGroup.vue +66 -11
- package/dist/src/components/Slide/OrigamSlideGroup.vue +772 -257
- package/dist/src/components/SliderField/OrigamSliderField.vue +1157 -335
- package/dist/src/components/SliderField/OrigamSliderFieldTrack.vue +236 -112
- package/dist/src/components/Snackbar/OrigamSnackbar.vue +871 -214
- package/dist/src/components/Snackbar/OrigamSnackbarGroup.vue +218 -51
- package/dist/src/components/Snackbar/OrigamSnackbarItem.vue +175 -43
- package/dist/src/components/Stepper/OrigamStepper.vue +618 -126
- package/dist/src/components/Stepper/OrigamStepperItem.vue +98 -37
- package/dist/src/components/Switch/OrigamSwitch.vue +879 -156
- package/dist/src/components/Switch/OrigamSwitchTrack.vue +431 -78
- package/dist/src/components/SystemBar/OrigamSystemBar.vue +517 -87
- package/dist/src/components/Table/OrigamTable.vue +585 -124
- package/dist/src/components/Tabs/OrigamTab.vue +239 -73
- package/dist/src/components/Tabs/OrigamTabPanel.vue +125 -39
- package/dist/src/components/Tabs/OrigamTabPanels.vue +148 -57
- package/dist/src/components/Tabs/OrigamTabs.vue +381 -109
- package/dist/src/components/TextField/OrigamTextField.vue +1077 -258
- package/dist/src/components/TextMask/OrigamTextMask.vue +150 -43
- package/dist/src/components/TextareaField/OrigamTextareaField.vue +1162 -310
- package/dist/src/components/TextareaField/OrigamTextareaFieldRichToolbar.vue +77 -79
- package/dist/src/components/ThemeProvider/OrigamThemeProvider.vue +44 -9
- package/dist/src/components/Timeline/OrigamTimeline.vue +113 -43
- package/dist/src/components/Timeline/OrigamTimelineItem.vue +163 -76
- package/dist/src/components/Title/OrigamTitle.vue +505 -82
- package/dist/src/components/Toolbar/OrigamToolbar.vue +679 -142
- package/dist/src/components/Tooltip/OrigamTooltip.vue +288 -72
- package/dist/src/components/Transition/OrigamExpandX.vue +219 -106
- package/dist/src/components/Transition/OrigamExpandY.vue +219 -106
- package/dist/src/components/Transition/OrigamFade.vue +47 -9
- package/dist/src/components/Transition/OrigamReverseTranslatePicker.vue +52 -10
- package/dist/src/components/Transition/OrigamScaleRotate.vue +52 -10
- package/dist/src/components/Transition/OrigamSlideX.vue +52 -10
- package/dist/src/components/Transition/OrigamSlideY.vue +52 -10
- package/dist/src/components/Transition/OrigamSnack.vue +52 -10
- package/dist/src/components/Transition/OrigamTransition.vue +40 -12
- package/dist/src/components/Transition/OrigamTranslateBottom.vue +52 -10
- package/dist/src/components/Transition/OrigamTranslatePicker.vue +52 -10
- package/dist/src/components/Transition/OrigamTranslateScale.vue +209 -97
- package/dist/src/components/Transition/OrigamWindowXReverseTranslate.vue +40 -7
- package/dist/src/components/Transition/OrigamWindowXTranslate.vue +40 -7
- package/dist/src/components/Transition/OrigamWindowYReverseTranslate.vue +40 -7
- package/dist/src/components/Transition/OrigamWindowYTranslate.vue +40 -7
- package/dist/src/components/Treeview/OrigamTreeview.vue +258 -118
- package/dist/src/components/Treeview/OrigamTreeviewNode.vue +126 -88
- package/dist/src/components/Video/OrigamVideo.vue +1178 -331
- package/dist/src/components/VirtualScroll/OrigamVirtualScroll.vue +147 -55
- package/dist/src/components/VirtualScroll/OrigamVirtualScrollItem.vue +94 -19
- package/dist/src/components/Watermark/OrigamWatermark.vue +224 -124
- package/dist/src/components/Window/OrigamWindow.vue +745 -175
- package/dist/src/components/Window/OrigamWindowItem.vue +162 -69
- package/dist/src/composables/Commons/display.composable.cjs +2 -0
- package/dist/src/composables/Commons/display.composable.js +1 -1
- package/dist/src/interfaces/Pagination/pagination.interface.d.ts +1 -1
- package/package.json +6 -6
|
@@ -195,379 +195,1048 @@ import { KEYBOARD_VALUES } from "../../enums/Commons/hotkey.enum";
|
|
|
195
195
|
import { MDI_ICONS } from "../../enums/Commons/mdi.enum";
|
|
196
196
|
import { VARIANT } from "../../enums/Commons/variant.enum";
|
|
197
197
|
import { createRange, int } from "../../utils/Commons/commons.util";
|
|
198
|
+
/*********************************************************
|
|
199
|
+
* Global
|
|
200
|
+
*
|
|
201
|
+
* @description
|
|
202
|
+
* Props, emits and filterProps for the Pagination component.
|
|
203
|
+
********************************************************/
|
|
198
204
|
const props = defineProps({
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
205
|
+
start: {
|
|
206
|
+
type: Number,
|
|
207
|
+
required: false,
|
|
208
|
+
default: 1
|
|
209
|
+
},
|
|
210
|
+
modelValue: {
|
|
211
|
+
type: Number,
|
|
212
|
+
required: false
|
|
213
|
+
},
|
|
214
|
+
disabled: {
|
|
215
|
+
type: Boolean,
|
|
216
|
+
required: false
|
|
217
|
+
},
|
|
218
|
+
length: {
|
|
219
|
+
type: [Number, String],
|
|
220
|
+
required: false,
|
|
221
|
+
default: 1
|
|
222
|
+
},
|
|
223
|
+
totalVisible: {
|
|
224
|
+
type: [Number, String],
|
|
225
|
+
required: false
|
|
226
|
+
},
|
|
227
|
+
firstIcon: {
|
|
228
|
+
type: null,
|
|
229
|
+
required: false,
|
|
230
|
+
default: MDI_ICONS.CHEVRON_DOUBLE_LEFT
|
|
231
|
+
},
|
|
232
|
+
prevIcon: {
|
|
233
|
+
type: null,
|
|
234
|
+
required: false,
|
|
235
|
+
default: MDI_ICONS.CHEVRON_LEFT
|
|
236
|
+
},
|
|
237
|
+
nextIcon: {
|
|
238
|
+
type: null,
|
|
239
|
+
required: false,
|
|
240
|
+
default: MDI_ICONS.CHEVRON_RIGHT
|
|
241
|
+
},
|
|
242
|
+
lastIcon: {
|
|
243
|
+
type: null,
|
|
244
|
+
required: false,
|
|
245
|
+
default: MDI_ICONS.CHEVRON_DOUBLE_RIGHT
|
|
246
|
+
},
|
|
247
|
+
ariaLabel: {
|
|
248
|
+
type: String,
|
|
249
|
+
required: false,
|
|
250
|
+
default: "origam.pagination.aria_label.root"
|
|
251
|
+
},
|
|
252
|
+
pageAriaLabel: {
|
|
253
|
+
type: String,
|
|
254
|
+
required: false,
|
|
255
|
+
default: "origam.pagination.aria_label.page"
|
|
256
|
+
},
|
|
257
|
+
currentPageAriaLabel: {
|
|
258
|
+
type: String,
|
|
259
|
+
required: false,
|
|
260
|
+
default: "origam.pagination.aria_label.current_page"
|
|
261
|
+
},
|
|
262
|
+
firstAriaLabel: {
|
|
263
|
+
type: String,
|
|
264
|
+
required: false,
|
|
265
|
+
default: "origam.pagination.aria_label.first"
|
|
266
|
+
},
|
|
267
|
+
previousAriaLabel: {
|
|
268
|
+
type: String,
|
|
269
|
+
required: false,
|
|
270
|
+
default: "origam.pagination.aria_label.previous"
|
|
271
|
+
},
|
|
272
|
+
nextAriaLabel: {
|
|
273
|
+
type: String,
|
|
274
|
+
required: false,
|
|
275
|
+
default: "origam.pagination.aria_label.next"
|
|
276
|
+
},
|
|
277
|
+
lastAriaLabel: {
|
|
278
|
+
type: String,
|
|
279
|
+
required: false,
|
|
280
|
+
default: "origam.pagination.aria_label.last"
|
|
281
|
+
},
|
|
282
|
+
ellipsis: {
|
|
283
|
+
type: String,
|
|
284
|
+
required: false,
|
|
285
|
+
default: "..."
|
|
286
|
+
},
|
|
287
|
+
showFirstLastPage: {
|
|
288
|
+
type: Boolean,
|
|
289
|
+
required: false
|
|
290
|
+
},
|
|
291
|
+
compact: {
|
|
292
|
+
type: Boolean,
|
|
293
|
+
required: false,
|
|
294
|
+
default: false
|
|
295
|
+
},
|
|
296
|
+
pageText: {
|
|
297
|
+
type: String,
|
|
298
|
+
required: false,
|
|
299
|
+
default: "origam.pagination.page"
|
|
300
|
+
},
|
|
301
|
+
ofText: {
|
|
302
|
+
type: String,
|
|
303
|
+
required: false,
|
|
304
|
+
default: "origam.pagination.of"
|
|
305
|
+
},
|
|
306
|
+
withInfo: {
|
|
307
|
+
type: Boolean,
|
|
308
|
+
required: false,
|
|
309
|
+
default: false
|
|
310
|
+
},
|
|
311
|
+
total: {
|
|
312
|
+
type: [Number, String],
|
|
313
|
+
required: false
|
|
314
|
+
},
|
|
315
|
+
perPage: {
|
|
316
|
+
type: [Number, String],
|
|
317
|
+
required: false,
|
|
318
|
+
default: 10
|
|
319
|
+
},
|
|
320
|
+
infoText: {
|
|
321
|
+
type: String,
|
|
322
|
+
required: false,
|
|
323
|
+
default: "origam.pagination.info"
|
|
324
|
+
},
|
|
325
|
+
previousText: {
|
|
326
|
+
type: String,
|
|
327
|
+
required: false
|
|
328
|
+
},
|
|
329
|
+
nextText: {
|
|
330
|
+
type: String,
|
|
331
|
+
required: false
|
|
332
|
+
},
|
|
333
|
+
pageNumberAriaLabel: {
|
|
334
|
+
type: String,
|
|
335
|
+
required: false,
|
|
336
|
+
default: "origam.pagination.aria_label.page_number"
|
|
337
|
+
},
|
|
338
|
+
id: {
|
|
339
|
+
type: String,
|
|
340
|
+
required: false
|
|
341
|
+
},
|
|
342
|
+
class: {
|
|
343
|
+
type: [
|
|
344
|
+
String,
|
|
345
|
+
Array,
|
|
346
|
+
Object
|
|
347
|
+
],
|
|
348
|
+
required: false
|
|
349
|
+
},
|
|
350
|
+
style: {
|
|
351
|
+
type: [
|
|
352
|
+
String,
|
|
353
|
+
Array,
|
|
354
|
+
Object,
|
|
355
|
+
Boolean,
|
|
356
|
+
null
|
|
357
|
+
],
|
|
358
|
+
required: false,
|
|
359
|
+
skipCheck: true
|
|
360
|
+
},
|
|
361
|
+
tag: {
|
|
362
|
+
type: String,
|
|
363
|
+
required: false,
|
|
364
|
+
default: "nav"
|
|
365
|
+
},
|
|
366
|
+
color: {
|
|
367
|
+
type: [
|
|
368
|
+
String,
|
|
369
|
+
Object,
|
|
370
|
+
Boolean,
|
|
371
|
+
null
|
|
372
|
+
],
|
|
373
|
+
required: false,
|
|
374
|
+
skipCheck: true
|
|
375
|
+
},
|
|
376
|
+
bgColor: {
|
|
377
|
+
type: [
|
|
378
|
+
String,
|
|
379
|
+
Object,
|
|
380
|
+
Boolean,
|
|
381
|
+
null
|
|
382
|
+
],
|
|
383
|
+
required: false,
|
|
384
|
+
skipCheck: true
|
|
385
|
+
},
|
|
386
|
+
border: {
|
|
387
|
+
type: [
|
|
388
|
+
Boolean,
|
|
389
|
+
Number,
|
|
390
|
+
String,
|
|
391
|
+
Array
|
|
392
|
+
],
|
|
393
|
+
required: false,
|
|
394
|
+
skipCheck: true
|
|
395
|
+
},
|
|
396
|
+
borderTop: {
|
|
397
|
+
type: [
|
|
398
|
+
Boolean,
|
|
399
|
+
Number,
|
|
400
|
+
String
|
|
401
|
+
],
|
|
402
|
+
required: false
|
|
403
|
+
},
|
|
404
|
+
borderLeft: {
|
|
405
|
+
type: [
|
|
406
|
+
Boolean,
|
|
407
|
+
Number,
|
|
408
|
+
String
|
|
409
|
+
],
|
|
410
|
+
required: false
|
|
411
|
+
},
|
|
412
|
+
borderBottom: {
|
|
413
|
+
type: [
|
|
414
|
+
Boolean,
|
|
415
|
+
Number,
|
|
416
|
+
String
|
|
417
|
+
],
|
|
418
|
+
required: false
|
|
419
|
+
},
|
|
420
|
+
borderRight: {
|
|
421
|
+
type: [
|
|
422
|
+
Boolean,
|
|
423
|
+
Number,
|
|
424
|
+
String
|
|
425
|
+
],
|
|
426
|
+
required: false
|
|
427
|
+
},
|
|
428
|
+
borderBlock: {
|
|
429
|
+
type: [
|
|
430
|
+
Boolean,
|
|
431
|
+
Number,
|
|
432
|
+
String
|
|
433
|
+
],
|
|
434
|
+
required: false
|
|
435
|
+
},
|
|
436
|
+
borderInline: {
|
|
437
|
+
type: [
|
|
438
|
+
Boolean,
|
|
439
|
+
Number,
|
|
440
|
+
String
|
|
441
|
+
],
|
|
442
|
+
required: false
|
|
443
|
+
},
|
|
444
|
+
borderInlineStart: {
|
|
445
|
+
type: [
|
|
446
|
+
Boolean,
|
|
447
|
+
Number,
|
|
448
|
+
String
|
|
449
|
+
],
|
|
450
|
+
required: false
|
|
451
|
+
},
|
|
452
|
+
borderInlineEnd: {
|
|
453
|
+
type: [
|
|
454
|
+
Boolean,
|
|
455
|
+
Number,
|
|
456
|
+
String
|
|
457
|
+
],
|
|
458
|
+
required: false
|
|
459
|
+
},
|
|
460
|
+
borderBlockStart: {
|
|
461
|
+
type: [
|
|
462
|
+
Boolean,
|
|
463
|
+
Number,
|
|
464
|
+
String
|
|
465
|
+
],
|
|
466
|
+
required: false
|
|
467
|
+
},
|
|
468
|
+
borderBlockEnd: {
|
|
469
|
+
type: [
|
|
470
|
+
Boolean,
|
|
471
|
+
Number,
|
|
472
|
+
String
|
|
473
|
+
],
|
|
474
|
+
required: false
|
|
475
|
+
},
|
|
476
|
+
borderColor: {
|
|
477
|
+
type: String,
|
|
478
|
+
required: false
|
|
479
|
+
},
|
|
480
|
+
borderStyle: {
|
|
481
|
+
type: String,
|
|
482
|
+
required: false
|
|
483
|
+
},
|
|
484
|
+
borderTopColor: {
|
|
485
|
+
type: [
|
|
486
|
+
String,
|
|
487
|
+
Object,
|
|
488
|
+
Boolean,
|
|
489
|
+
null
|
|
490
|
+
],
|
|
491
|
+
required: false,
|
|
492
|
+
skipCheck: true
|
|
493
|
+
},
|
|
494
|
+
borderRightColor: {
|
|
495
|
+
type: [
|
|
496
|
+
String,
|
|
497
|
+
Object,
|
|
498
|
+
Boolean,
|
|
499
|
+
null
|
|
500
|
+
],
|
|
501
|
+
required: false,
|
|
502
|
+
skipCheck: true
|
|
503
|
+
},
|
|
504
|
+
borderBottomColor: {
|
|
505
|
+
type: [
|
|
506
|
+
String,
|
|
507
|
+
Object,
|
|
508
|
+
Boolean,
|
|
509
|
+
null
|
|
510
|
+
],
|
|
511
|
+
required: false,
|
|
512
|
+
skipCheck: true
|
|
513
|
+
},
|
|
514
|
+
borderLeftColor: {
|
|
515
|
+
type: [
|
|
516
|
+
String,
|
|
517
|
+
Object,
|
|
518
|
+
Boolean,
|
|
519
|
+
null
|
|
520
|
+
],
|
|
521
|
+
required: false,
|
|
522
|
+
skipCheck: true
|
|
523
|
+
},
|
|
524
|
+
borderInlineStartColor: {
|
|
525
|
+
type: [
|
|
526
|
+
String,
|
|
527
|
+
Object,
|
|
528
|
+
Boolean,
|
|
529
|
+
null
|
|
530
|
+
],
|
|
531
|
+
required: false,
|
|
532
|
+
skipCheck: true
|
|
533
|
+
},
|
|
534
|
+
borderInlineEndColor: {
|
|
535
|
+
type: [
|
|
536
|
+
String,
|
|
537
|
+
Object,
|
|
538
|
+
Boolean,
|
|
539
|
+
null
|
|
540
|
+
],
|
|
541
|
+
required: false,
|
|
542
|
+
skipCheck: true
|
|
543
|
+
},
|
|
544
|
+
borderBlockStartColor: {
|
|
545
|
+
type: [
|
|
546
|
+
String,
|
|
547
|
+
Object,
|
|
548
|
+
Boolean,
|
|
549
|
+
null
|
|
550
|
+
],
|
|
551
|
+
required: false,
|
|
552
|
+
skipCheck: true
|
|
553
|
+
},
|
|
554
|
+
borderBlockEndColor: {
|
|
555
|
+
type: [
|
|
556
|
+
String,
|
|
557
|
+
Object,
|
|
558
|
+
Boolean,
|
|
559
|
+
null
|
|
560
|
+
],
|
|
561
|
+
required: false,
|
|
562
|
+
skipCheck: true
|
|
563
|
+
},
|
|
564
|
+
padding: {
|
|
565
|
+
type: [
|
|
566
|
+
Boolean,
|
|
567
|
+
Number,
|
|
568
|
+
String
|
|
569
|
+
],
|
|
570
|
+
required: false
|
|
571
|
+
},
|
|
572
|
+
paddingTop: {
|
|
573
|
+
type: [
|
|
574
|
+
Boolean,
|
|
575
|
+
Number,
|
|
576
|
+
String
|
|
577
|
+
],
|
|
578
|
+
required: false
|
|
579
|
+
},
|
|
580
|
+
paddingLeft: {
|
|
581
|
+
type: [
|
|
582
|
+
Boolean,
|
|
583
|
+
Number,
|
|
584
|
+
String
|
|
585
|
+
],
|
|
586
|
+
required: false
|
|
587
|
+
},
|
|
588
|
+
paddingBottom: {
|
|
589
|
+
type: [
|
|
590
|
+
Boolean,
|
|
591
|
+
Number,
|
|
592
|
+
String
|
|
593
|
+
],
|
|
594
|
+
required: false
|
|
595
|
+
},
|
|
596
|
+
paddingRight: {
|
|
597
|
+
type: [
|
|
598
|
+
Boolean,
|
|
599
|
+
Number,
|
|
600
|
+
String
|
|
601
|
+
],
|
|
602
|
+
required: false
|
|
603
|
+
},
|
|
604
|
+
paddingBlock: {
|
|
605
|
+
type: [
|
|
606
|
+
Boolean,
|
|
607
|
+
Number,
|
|
608
|
+
String
|
|
609
|
+
],
|
|
610
|
+
required: false
|
|
611
|
+
},
|
|
612
|
+
paddingInline: {
|
|
613
|
+
type: [
|
|
614
|
+
Boolean,
|
|
615
|
+
Number,
|
|
616
|
+
String
|
|
617
|
+
],
|
|
618
|
+
required: false
|
|
619
|
+
},
|
|
620
|
+
paddingInlineStart: {
|
|
621
|
+
type: [
|
|
622
|
+
Boolean,
|
|
623
|
+
Number,
|
|
624
|
+
String
|
|
625
|
+
],
|
|
626
|
+
required: false
|
|
627
|
+
},
|
|
628
|
+
paddingInlineEnd: {
|
|
629
|
+
type: [
|
|
630
|
+
Boolean,
|
|
631
|
+
Number,
|
|
632
|
+
String
|
|
633
|
+
],
|
|
634
|
+
required: false
|
|
635
|
+
},
|
|
636
|
+
paddingBlockStart: {
|
|
637
|
+
type: [
|
|
638
|
+
Boolean,
|
|
639
|
+
Number,
|
|
640
|
+
String
|
|
641
|
+
],
|
|
642
|
+
required: false
|
|
643
|
+
},
|
|
644
|
+
paddingBlockEnd: {
|
|
645
|
+
type: [
|
|
646
|
+
Boolean,
|
|
647
|
+
Number,
|
|
648
|
+
String
|
|
649
|
+
],
|
|
650
|
+
required: false
|
|
651
|
+
},
|
|
652
|
+
margin: {
|
|
653
|
+
type: [
|
|
654
|
+
Boolean,
|
|
655
|
+
Number,
|
|
656
|
+
String
|
|
657
|
+
],
|
|
658
|
+
required: false
|
|
659
|
+
},
|
|
660
|
+
marginTop: {
|
|
661
|
+
type: [
|
|
662
|
+
Boolean,
|
|
663
|
+
Number,
|
|
664
|
+
String
|
|
665
|
+
],
|
|
666
|
+
required: false
|
|
667
|
+
},
|
|
668
|
+
marginLeft: {
|
|
669
|
+
type: [
|
|
670
|
+
Boolean,
|
|
671
|
+
Number,
|
|
672
|
+
String
|
|
673
|
+
],
|
|
674
|
+
required: false
|
|
675
|
+
},
|
|
676
|
+
marginBottom: {
|
|
677
|
+
type: [
|
|
678
|
+
Boolean,
|
|
679
|
+
Number,
|
|
680
|
+
String
|
|
681
|
+
],
|
|
682
|
+
required: false
|
|
683
|
+
},
|
|
684
|
+
marginRight: {
|
|
685
|
+
type: [
|
|
686
|
+
Boolean,
|
|
687
|
+
Number,
|
|
688
|
+
String
|
|
689
|
+
],
|
|
690
|
+
required: false
|
|
691
|
+
},
|
|
692
|
+
marginBlock: {
|
|
693
|
+
type: [
|
|
694
|
+
Boolean,
|
|
695
|
+
Number,
|
|
696
|
+
String
|
|
697
|
+
],
|
|
698
|
+
required: false
|
|
699
|
+
},
|
|
700
|
+
marginInline: {
|
|
701
|
+
type: [
|
|
702
|
+
Boolean,
|
|
703
|
+
Number,
|
|
704
|
+
String
|
|
705
|
+
],
|
|
706
|
+
required: false
|
|
707
|
+
},
|
|
708
|
+
marginInlineStart: {
|
|
709
|
+
type: [
|
|
710
|
+
Boolean,
|
|
711
|
+
Number,
|
|
712
|
+
String
|
|
713
|
+
],
|
|
714
|
+
required: false
|
|
715
|
+
},
|
|
716
|
+
marginInlineEnd: {
|
|
717
|
+
type: [
|
|
718
|
+
Boolean,
|
|
719
|
+
Number,
|
|
720
|
+
String
|
|
721
|
+
],
|
|
722
|
+
required: false
|
|
723
|
+
},
|
|
724
|
+
marginBlockStart: {
|
|
725
|
+
type: [
|
|
726
|
+
Boolean,
|
|
727
|
+
Number,
|
|
728
|
+
String
|
|
729
|
+
],
|
|
730
|
+
required: false
|
|
731
|
+
},
|
|
732
|
+
marginBlockEnd: {
|
|
733
|
+
type: [
|
|
734
|
+
Boolean,
|
|
735
|
+
Number,
|
|
736
|
+
String
|
|
737
|
+
],
|
|
738
|
+
required: false
|
|
739
|
+
},
|
|
740
|
+
elevation: {
|
|
741
|
+
type: [Number, String],
|
|
742
|
+
required: false
|
|
743
|
+
},
|
|
744
|
+
size: {
|
|
745
|
+
type: null,
|
|
746
|
+
required: false
|
|
747
|
+
},
|
|
748
|
+
density: {
|
|
749
|
+
type: null,
|
|
750
|
+
required: false
|
|
751
|
+
},
|
|
752
|
+
fontSize: {
|
|
753
|
+
type: null,
|
|
754
|
+
required: false
|
|
755
|
+
},
|
|
756
|
+
fontWeight: {
|
|
757
|
+
type: null,
|
|
758
|
+
required: false
|
|
759
|
+
}
|
|
281
760
|
});
|
|
282
|
-
const emits = defineEmits([
|
|
761
|
+
const emits = defineEmits([
|
|
762
|
+
"first",
|
|
763
|
+
"prev",
|
|
764
|
+
"next",
|
|
765
|
+
"last",
|
|
766
|
+
"update:modelValue"
|
|
767
|
+
]);
|
|
283
768
|
defineSlots();
|
|
284
769
|
const { filterProps } = useProps(props);
|
|
285
770
|
const { t } = useLocale();
|
|
771
|
+
/*********************************************************
|
|
772
|
+
* Value
|
|
773
|
+
*
|
|
774
|
+
* @description
|
|
775
|
+
* page is the controlled current-page number.
|
|
776
|
+
* width / maxButtons support the responsive total-visible calculation.
|
|
777
|
+
* The uncontrolled seed is passed as `() => props.start`, not
|
|
778
|
+
* `props.start` (#448): a plain read right here, in the setup body,
|
|
779
|
+
* would freeze the pre-theme value, since `useVModel` runs before the
|
|
780
|
+
* ADR-005 theme-props resolver patches `instance.props`. The getter
|
|
781
|
+
* form defers the read to `useVModel`'s internal `seed()`, which only
|
|
782
|
+
* runs on first actual access — after the resolver has already run.
|
|
783
|
+
********************************************************/
|
|
784
|
+
/*********************************************************
|
|
785
|
+
* Page
|
|
786
|
+
*
|
|
787
|
+
* @description
|
|
788
|
+
* `modelValue` n'a plus de defaut (#640) pour que le repli vers `start`
|
|
789
|
+
* soit atteignable. Son type devient donc `number | undefined`, alors
|
|
790
|
+
* qu'au runtime `start` (defaut 1) garantit toujours une valeur.
|
|
791
|
+
* `transformIn` rend cette garantie EXPLICITE a l'execution plutot que
|
|
792
|
+
* de la masquer par un cast, qui aurait eteint le rouge de vue-tsc sans
|
|
793
|
+
* repondre a la question.
|
|
794
|
+
********************************************************/
|
|
286
795
|
const page = useVModel(props, "modelValue", () => props.start, (v) => v ?? props.start);
|
|
796
|
+
/*********************************************************
|
|
797
|
+
* Composables
|
|
798
|
+
********************************************************/
|
|
287
799
|
const { width } = useDisplay();
|
|
288
800
|
const maxButtons = shallowRef(-1);
|
|
289
801
|
const { resizeRef } = useResizeObserver((entries) => {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
802
|
+
if (!entries.length) return;
|
|
803
|
+
const { target, contentRect } = entries[0];
|
|
804
|
+
const firstItem = target.querySelector(".origam-pagination__list > *");
|
|
805
|
+
if (!firstItem) return;
|
|
806
|
+
const totalWidth = contentRect.width;
|
|
807
|
+
const itemWidth = firstItem.offsetWidth + parseFloat(getComputedStyle(firstItem).marginRight) * 2;
|
|
808
|
+
maxButtons.value = getMax(totalWidth, itemWidth);
|
|
297
809
|
});
|
|
298
810
|
const { refs, updateRef } = useRefs();
|
|
811
|
+
/*********************************************************
|
|
812
|
+
* Range & items
|
|
813
|
+
*
|
|
814
|
+
* @description
|
|
815
|
+
* length / start are int-coerced copies of the props.
|
|
816
|
+
* totalVisible computes how many page buttons fit.
|
|
817
|
+
* range produces the raw sequence (numbers + ellipsis strings).
|
|
818
|
+
* sharedBtnColorProps / controlColorProps forward the uniform six-field
|
|
819
|
+
* IColorProps contract to every btn in the row so `color`/`bgColor`
|
|
820
|
+
* changes repaint them all simultaneously.
|
|
821
|
+
* items maps range to the full button prop objects.
|
|
822
|
+
* controls produces the first/prev/next/last button prop objects.
|
|
823
|
+
********************************************************/
|
|
299
824
|
const length = computed(() => {
|
|
300
|
-
|
|
825
|
+
return int(props.length);
|
|
301
826
|
});
|
|
302
827
|
const start = computed(() => {
|
|
303
|
-
|
|
828
|
+
return int(props.start);
|
|
304
829
|
});
|
|
305
830
|
const totalVisible = computed(() => {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
831
|
+
if (props.totalVisible != null) {
|
|
832
|
+
return int(props.totalVisible);
|
|
833
|
+
}
|
|
834
|
+
if (maxButtons.value >= 0) {
|
|
835
|
+
return maxButtons.value;
|
|
836
|
+
}
|
|
837
|
+
return getMax(width.value, 58);
|
|
313
838
|
});
|
|
314
839
|
const range = computed(() => {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
840
|
+
if (length.value <= 0 || isNaN(length.value) || length.value > Number.MAX_SAFE_INTEGER) return [];
|
|
841
|
+
// `withInfo` mode collapses the page-number row to just the
|
|
842
|
+
// current page button — the spec (PDF: WITH INFO) shows a
|
|
843
|
+
// single page indicator between the Prev / Next text buttons,
|
|
844
|
+
// since the `Showing N–M of total` label on the left already
|
|
845
|
+
// expresses position within the range. Pre-fix this rendered
|
|
846
|
+
// the full numbered list, drowning the simpler info layout.
|
|
847
|
+
if (props.withInfo) {
|
|
848
|
+
return [page.value];
|
|
849
|
+
}
|
|
850
|
+
if (totalVisible.value <= 0) return [];
|
|
851
|
+
else if (totalVisible.value === 1) return [page.value];
|
|
852
|
+
if (length.value <= totalVisible.value) {
|
|
853
|
+
return createRange(length.value, start.value);
|
|
854
|
+
}
|
|
855
|
+
const even = totalVisible.value % 2 === 0;
|
|
856
|
+
const middle = even ? totalVisible.value / 2 : Math.floor(totalVisible.value / 2);
|
|
857
|
+
const left = even ? middle : middle + 1;
|
|
858
|
+
const right = length.value - middle;
|
|
859
|
+
if (left - page.value >= 0) {
|
|
860
|
+
return [
|
|
861
|
+
...createRange(Math.max(1, totalVisible.value - 1), start.value),
|
|
862
|
+
props.ellipsis,
|
|
863
|
+
length.value
|
|
864
|
+
];
|
|
865
|
+
} else if (page.value - right >= (even ? 1 : 0)) {
|
|
866
|
+
const rangeLength = totalVisible.value - 1;
|
|
867
|
+
const rangeStart = length.value - rangeLength + start.value;
|
|
868
|
+
return [
|
|
869
|
+
start.value,
|
|
870
|
+
props.ellipsis,
|
|
871
|
+
...createRange(rangeLength, rangeStart)
|
|
872
|
+
];
|
|
873
|
+
} else {
|
|
874
|
+
const rangeLength = Math.max(1, totalVisible.value - 3);
|
|
875
|
+
const rangeStart = rangeLength === 1 ? page.value : page.value - Math.ceil(rangeLength / 2) + start.value;
|
|
876
|
+
return [
|
|
877
|
+
start.value,
|
|
878
|
+
props.ellipsis,
|
|
879
|
+
...createRange(rangeLength, rangeStart),
|
|
880
|
+
props.ellipsis,
|
|
881
|
+
length.value
|
|
882
|
+
];
|
|
883
|
+
}
|
|
339
884
|
});
|
|
885
|
+
// Uniform color contract — every btn in the row (page items 1..n,
|
|
886
|
+
// the ellipsis, AND first / prev / next / last) receives the SAME
|
|
887
|
+
// six IColorProps fields. Changing `color` repaints every text/icon,
|
|
888
|
+
// changing `bgColor` repaints every surface, hover/active rungs
|
|
889
|
+
// work identically. The active item differentiates itself via
|
|
890
|
+
// `active: true` only; a disabled btn shows its standard --disabled
|
|
891
|
+
// veil (Btn's opacity rule), nothing intent-specific.
|
|
892
|
+
// User report: "putain pourquoi tous les btn ne sont pas gérés de
|
|
893
|
+
// la même manière sur la pagination ; je change la couleur, tous
|
|
894
|
+
// les btns voient leur couleur changer ; etc."
|
|
340
895
|
const sharedBtnColorProps = computed(() => {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
896
|
+
// ── Surface / text contrast synthesis (colored mode) ──────────
|
|
897
|
+
// In `--colored` mode the pagination paints the inner btn's
|
|
898
|
+
// surface via the SCSS `--bg-base` CSS var — useStateEffect on
|
|
899
|
+
// the inner btn doesn't see the bg side of the contract because
|
|
900
|
+
// the consumer didn't necessarily pass `bgColor` to the
|
|
901
|
+
// pagination root. Without that info, the btn's fg resolves to
|
|
902
|
+
// `tokenForegroundForIntent(color)` = the same-hue subtle rung
|
|
903
|
+
// (e.g. primary.fgSubtle = primary.700 — dark violet on a
|
|
904
|
+
// primary.500 surface, the very "violet-on-violet" the user
|
|
905
|
+
// just spotted on screen).
|
|
906
|
+
//
|
|
907
|
+
// Synthesise bgColor = color when the consumer only specified
|
|
908
|
+
// `color`: the inner btn's useStateEffect then detects the
|
|
909
|
+
// color-clash (`color === bgColor` both intents) and swaps fg
|
|
910
|
+
// to the bg's paired contrast token (primary.fg = white). The
|
|
911
|
+
// JS-side bg is the same intent the SCSS already paints, so the
|
|
912
|
+
// inline declaration is harmless (same value), and the fg now
|
|
913
|
+
// wins by virtue of being on the same axis as the synthesised
|
|
914
|
+
// bg.
|
|
915
|
+
// NB: `TColor = string | false | null | undefined`, and Vue's
|
|
916
|
+
// defineProps emits `false` (not `undefined`) when a TColor prop
|
|
917
|
+
// is omitted. We MUST use `||` (truthy fallback), NOT `??`
|
|
918
|
+
// (nullish only) — `false ?? "primary"` keeps `false` and the
|
|
919
|
+
// synthesis silently no-ops, while `false || "primary"` falls
|
|
920
|
+
// through to the consumer's chosen intent as intended.
|
|
921
|
+
//
|
|
922
|
+
// hover / active are NOT forwarded here: the inner `<OrigamBtn>`
|
|
923
|
+
// derives its own hover/active darken cascade (bgHover / bgActive
|
|
924
|
+
// token rungs) from ITS OWN `hover` / `active` state via
|
|
925
|
+
// `useStateFlag` + `useStateEffect` — Pagination never had a
|
|
926
|
+
// `hover` / `active` object prop of its own to relay, and the
|
|
927
|
+
// legacy flat `hoverColor` / `hoverBgColor` / `activeColor` /
|
|
928
|
+
// `activeBgColor` props this comment used to describe forwarding
|
|
929
|
+
// were removed (`OrigamBtn` had already stopped reading them —
|
|
930
|
+
// this forwarding was dead code). The active PAGE item still
|
|
931
|
+
// differentiates itself via the per-item `active: true` boolean
|
|
932
|
+
// (see `controls` below), which IS live.
|
|
933
|
+
const baseBg = props.bgColor || props.color;
|
|
934
|
+
return {
|
|
935
|
+
// In colored mode force `flat` so the btn actually PAINTS the
|
|
936
|
+
// pagination-driven `--origam-btn---background-color`. The theme's
|
|
937
|
+
// default `text` variant sets `background-color: transparent
|
|
938
|
+
// !important`, which would otherwise swallow the colored fill. When
|
|
939
|
+
// no color is set, leave `variant` undefined → the neutral text look.
|
|
940
|
+
variant: baseBg ? VARIANT.FLAT : undefined,
|
|
941
|
+
color: props.color,
|
|
942
|
+
bgColor: baseBg,
|
|
943
|
+
// Size / density flow through to every nav btn so the whole row
|
|
944
|
+
// scales consistently — matches the PDF spec which shows the
|
|
945
|
+
// pagination at sm / default / lg sizes (no per-btn override).
|
|
946
|
+
size: props.size,
|
|
947
|
+
density: props.density
|
|
948
|
+
};
|
|
357
949
|
});
|
|
358
950
|
const controlColorProps = sharedBtnColorProps;
|
|
359
951
|
const items = computed(() => {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
952
|
+
return range.value.map((item, index) => {
|
|
953
|
+
const ref = (e) => updateRef(e, index);
|
|
954
|
+
if (typeof item === "string") {
|
|
955
|
+
return {
|
|
956
|
+
isActive: false,
|
|
957
|
+
key: `ellipsis-${index}`,
|
|
958
|
+
page: item,
|
|
959
|
+
props: {
|
|
960
|
+
ref,
|
|
961
|
+
// Same six IColorProps as the rest of the row —
|
|
962
|
+
// even though the ellipsis is non-clickable
|
|
963
|
+
// (`disabled: true`), it must read as visually
|
|
964
|
+
// part of the same nav row, just dimmed by the
|
|
965
|
+
// Btn's --disabled veil. Pre-fix it rendered
|
|
966
|
+
// in the default neutral grey while the
|
|
967
|
+
// surrounding btns took the consumer's bgColor,
|
|
968
|
+
// breaking the user's "tous les btn ensemble"
|
|
969
|
+
// expectation.
|
|
970
|
+
...sharedBtnColorProps.value,
|
|
971
|
+
ellipsis: true,
|
|
972
|
+
icon: true,
|
|
973
|
+
disabled: true
|
|
974
|
+
}
|
|
975
|
+
};
|
|
976
|
+
} else {
|
|
977
|
+
const isActive = item === page.value;
|
|
978
|
+
return {
|
|
979
|
+
isActive,
|
|
980
|
+
key: item,
|
|
981
|
+
page: item,
|
|
982
|
+
props: {
|
|
983
|
+
ref,
|
|
984
|
+
...sharedBtnColorProps.value,
|
|
985
|
+
ellipsis: false,
|
|
986
|
+
// `icon: true` keeps the btn in icon-mode so its
|
|
987
|
+
// width clamps to its height — a 36×36 square at
|
|
988
|
+
// the default size. The pagination SCSS override
|
|
989
|
+
// re-sets the corner radius from the btn's
|
|
990
|
+
// default 50% to 8px, producing the rounded-SQUARE
|
|
991
|
+
// shape the PDF prescribes (NOT a full circle).
|
|
992
|
+
// Inactive page btns paint a transparent surface
|
|
993
|
+
// via the `&:not(&--colored) .origam-btn:not(--active)`
|
|
994
|
+
// rule below, so they read as plain numbers; only
|
|
995
|
+
// the active page paints the intent-coloured fill.
|
|
996
|
+
icon: true,
|
|
997
|
+
disabled: !!props.disabled || +props.length < 2,
|
|
998
|
+
// `active: true` lets the inner `<origam-btn>`
|
|
999
|
+
// add its own --active overlay so the current
|
|
1000
|
+
// page reads as selected — without forcing the
|
|
1001
|
+
// non-active items into a different shape. All
|
|
1002
|
+
// six IColorProps fields are forwarded
|
|
1003
|
+
// uniformly via `sharedBtnColorProps` (above),
|
|
1004
|
+
// so a `color` / `bgColor` change on the
|
|
1005
|
+
// pagination updates EVERY btn at once — the
|
|
1006
|
+
// behaviour the user expects from a uniform row
|
|
1007
|
+
// of nav buttons.
|
|
1008
|
+
active: isActive,
|
|
1009
|
+
"aria-current": isActive ? "page" : undefined,
|
|
1010
|
+
"aria-label": t(isActive ? props.currentPageAriaLabel : props.pageAriaLabel, item),
|
|
1011
|
+
onClick: (e) => setValue(e, item)
|
|
1012
|
+
}
|
|
1013
|
+
};
|
|
1014
|
+
}
|
|
1015
|
+
});
|
|
424
1016
|
});
|
|
425
1017
|
const rootAriaLabel = computed(() => t(props.ariaLabel));
|
|
1018
|
+
/*********************************************************
|
|
1019
|
+
* ⛔ TOUS les `*AriaLabel` sont des CLÉS, jamais du texte prêt.
|
|
1020
|
+
*
|
|
1021
|
+
* @description
|
|
1022
|
+
* Leurs valeurs par défaut sont des clés de catalogue
|
|
1023
|
+
* (`'origam.pagination.aria_label.first'`, …). Elles DOIVENT passer par
|
|
1024
|
+
* `t()` avant d'atteindre un `aria-label`. Cinq ne le faisaient pas : la
|
|
1025
|
+
* `<nav>` racine et les boutons premier / précédent / suivant / dernier
|
|
1026
|
+
* annonçaient la clé littérale, alors que les boutons de PAGE, eux,
|
|
1027
|
+
* étaient corrects — l'incohérence tenait dans le même fichier, à trente
|
|
1028
|
+
* lignes d'écart.
|
|
1029
|
+
*
|
|
1030
|
+
* @description
|
|
1031
|
+
* Un consommateur qui passe sa propre valeur passe donc une CLÉ, pas une
|
|
1032
|
+
* chaîne : c'est le contrat déjà en vigueur pour `pageAriaLabel`, et il est
|
|
1033
|
+
* documenté comme tel. Filet : `OrigamPagination.spec.ts`, dont le dernier
|
|
1034
|
+
* cas refuse tout `aria-label` commençant par `origam.` sur la barre.
|
|
1035
|
+
********************************************************/
|
|
426
1036
|
const controls = computed(() => {
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
1037
|
+
const prevDisabled = !!props.disabled || page.value <= start.value;
|
|
1038
|
+
const nextDisabled = !!props.disabled || page.value >= start.value + length.value - 1;
|
|
1039
|
+
// `withInfo` mode renders Prev / Next as TEXT BUTTONS with the
|
|
1040
|
+
// chevron as a prepend / append icon (PDF spec: WITH INFO).
|
|
1041
|
+
// Default mode keeps them icon-only (the chevron alone). The
|
|
1042
|
+
// first / last controls always stay icon-only — they only show
|
|
1043
|
+
// when `showFirstLastPage` is set and are decorative anchors.
|
|
1044
|
+
const prevTextual = props.withInfo ? {
|
|
1045
|
+
text: t(props.previousText ?? "origam.pagination.previous"),
|
|
1046
|
+
prependIcon: props.prevIcon,
|
|
1047
|
+
icon: false
|
|
1048
|
+
} : { icon: props.prevIcon };
|
|
1049
|
+
const nextTextual = props.withInfo ? {
|
|
1050
|
+
text: t(props.nextText ?? "origam.pagination.next"),
|
|
1051
|
+
appendIcon: props.nextIcon,
|
|
1052
|
+
icon: false
|
|
1053
|
+
} : { icon: props.nextIcon };
|
|
1054
|
+
return {
|
|
1055
|
+
first: {
|
|
1056
|
+
...controlColorProps.value,
|
|
1057
|
+
icon: props.firstIcon,
|
|
1058
|
+
onClick: (e) => setValue(e, start.value, "first"),
|
|
1059
|
+
disabled: prevDisabled,
|
|
1060
|
+
"aria-label": t(props.firstAriaLabel),
|
|
1061
|
+
"aria-disabled": prevDisabled
|
|
1062
|
+
},
|
|
1063
|
+
prev: {
|
|
1064
|
+
...controlColorProps.value,
|
|
1065
|
+
...prevTextual,
|
|
1066
|
+
onClick: (e) => setValue(e, page.value - 1, "prev"),
|
|
1067
|
+
disabled: prevDisabled,
|
|
1068
|
+
"aria-label": t(props.previousAriaLabel),
|
|
1069
|
+
"aria-disabled": prevDisabled
|
|
1070
|
+
},
|
|
1071
|
+
next: {
|
|
1072
|
+
...controlColorProps.value,
|
|
1073
|
+
...nextTextual,
|
|
1074
|
+
onClick: (e) => setValue(e, page.value + 1, "next"),
|
|
1075
|
+
disabled: nextDisabled,
|
|
1076
|
+
"aria-label": t(props.nextAriaLabel),
|
|
1077
|
+
"aria-disabled": nextDisabled
|
|
1078
|
+
},
|
|
1079
|
+
last: {
|
|
1080
|
+
...controlColorProps.value,
|
|
1081
|
+
icon: props.lastIcon,
|
|
1082
|
+
onClick: (e) => setValue(e, start.value + length.value - 1, "last"),
|
|
1083
|
+
disabled: nextDisabled,
|
|
1084
|
+
"aria-label": t(props.lastAriaLabel),
|
|
1085
|
+
"aria-disabled": nextDisabled
|
|
1086
|
+
}
|
|
1087
|
+
};
|
|
477
1088
|
});
|
|
1089
|
+
/*********************************************************
|
|
1090
|
+
* Keyboard navigation
|
|
1091
|
+
*
|
|
1092
|
+
* @description
|
|
1093
|
+
* handleKeydown moves the page with arrow keys and updates focus.
|
|
1094
|
+
* getMax computes the maximum visible buttons from available width.
|
|
1095
|
+
* setValue sets the page value and fires the named event.
|
|
1096
|
+
* updateFocus focuses the newly-active page button.
|
|
1097
|
+
********************************************************/
|
|
478
1098
|
const getMax = (totalWidth, itemWidth) => {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
1099
|
+
const minButtons = props.showFirstLastPage ? 5 : 3;
|
|
1100
|
+
return Math.max(0, Math.floor(
|
|
1101
|
+
// Round to two decimal places to avoid floating point errors
|
|
1102
|
+
+((totalWidth - itemWidth * minButtons) / itemWidth).toFixed(2)
|
|
1103
|
+
));
|
|
484
1104
|
};
|
|
485
1105
|
const setValue = (e, value, event) => {
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
1106
|
+
e.preventDefault();
|
|
1107
|
+
page.value = value;
|
|
1108
|
+
if (event) {
|
|
1109
|
+
emits(event, value);
|
|
1110
|
+
}
|
|
491
1111
|
};
|
|
492
1112
|
const updateFocus = () => {
|
|
493
|
-
|
|
494
|
-
|
|
1113
|
+
const currentIndex = page.value - start.value;
|
|
1114
|
+
refs.value[currentIndex]?.$el.focus();
|
|
495
1115
|
};
|
|
1116
|
+
/*********************************************************
|
|
1117
|
+
* Event handlers
|
|
1118
|
+
********************************************************/
|
|
496
1119
|
const handleKeydown = (e) => {
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
1120
|
+
if (e.key === KEYBOARD_VALUES.LEFT && !props.disabled && page.value > +props.start) {
|
|
1121
|
+
page.value = page.value - 1;
|
|
1122
|
+
nextTick(updateFocus);
|
|
1123
|
+
} else if (e.key === KEYBOARD_VALUES.RIGHT && !props.disabled && page.value < start.value + length.value - 1) {
|
|
1124
|
+
page.value = page.value + 1;
|
|
1125
|
+
nextTick(updateFocus);
|
|
1126
|
+
}
|
|
504
1127
|
};
|
|
1128
|
+
/*********************************************************
|
|
1129
|
+
* Compact mode
|
|
1130
|
+
*
|
|
1131
|
+
* @description
|
|
1132
|
+
* compactInputRef holds the native number input for compact mode.
|
|
1133
|
+
* handleCompactInput clamps and applies the typed value.
|
|
1134
|
+
********************************************************/
|
|
505
1135
|
const compactInputRef = ref(null);
|
|
506
1136
|
const handleCompactInput = (e) => {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
1137
|
+
const input = e.target;
|
|
1138
|
+
const raw = parseInt(input.value, 10);
|
|
1139
|
+
const clamped = isNaN(raw) ? start.value : Math.min(Math.max(raw, start.value), length.value);
|
|
1140
|
+
// Sync the input's displayed value to the clamped value
|
|
1141
|
+
input.value = String(clamped);
|
|
1142
|
+
page.value = clamped;
|
|
512
1143
|
};
|
|
1144
|
+
/*********************************************************
|
|
1145
|
+
* With-info label
|
|
1146
|
+
*
|
|
1147
|
+
* @description
|
|
1148
|
+
* "Showing 21-40 of 248" range label.
|
|
1149
|
+
* `total` (items count) drives the right-hand bound; `perPage` slices
|
|
1150
|
+
* the range; `currentPage` (== `page.value`) anchors it. When `total`
|
|
1151
|
+
* is omitted we fall back to `length * perPage` so the label still
|
|
1152
|
+
* renders something sensible. End is clamped to `total` so the last
|
|
1153
|
+
* page reads "41-43 of 43" rather than "41-50 of 43".
|
|
1154
|
+
********************************************************/
|
|
513
1155
|
const perPageInt = computed(() => {
|
|
514
|
-
|
|
515
|
-
|
|
1156
|
+
const v = int(props.perPage);
|
|
1157
|
+
return Number.isFinite(v) && v > 0 ? v : 10;
|
|
516
1158
|
});
|
|
517
1159
|
const totalInt = computed(() => {
|
|
518
|
-
|
|
519
|
-
|
|
1160
|
+
if (props.total != null) return int(props.total);
|
|
1161
|
+
return length.value * perPageInt.value;
|
|
520
1162
|
});
|
|
521
1163
|
const infoStart = computed(() => {
|
|
522
|
-
|
|
523
|
-
|
|
1164
|
+
if (totalInt.value <= 0) return 0;
|
|
1165
|
+
return (page.value - start.value) * perPageInt.value + 1;
|
|
524
1166
|
});
|
|
525
1167
|
const infoEnd = computed(() => {
|
|
526
|
-
|
|
527
|
-
|
|
1168
|
+
if (totalInt.value <= 0) return 0;
|
|
1169
|
+
return Math.min(infoStart.value + perPageInt.value - 1, totalInt.value);
|
|
528
1170
|
});
|
|
1171
|
+
/*********************************************************
|
|
1172
|
+
* Class & Style
|
|
1173
|
+
*
|
|
1174
|
+
* @description
|
|
1175
|
+
* `--colored` modifier is toggled as soon as the consumer passes any
|
|
1176
|
+
* truthy intent on `color`/`bgColor`. Drives the SCSS branch that
|
|
1177
|
+
* lets the inner OrigamBtn instances render with their own intent
|
|
1178
|
+
* fill (PDF "stylé" look). When absent, the SCSS overrides the
|
|
1179
|
+
* btn's default surface to a transparent neutral so the row reads
|
|
1180
|
+
* as a subtle, ghost-like nav.
|
|
1181
|
+
********************************************************/
|
|
529
1182
|
const isColored = computed(() => !!(props.color || props.bgColor));
|
|
530
1183
|
const { sizeClasses } = useSize(props);
|
|
531
1184
|
const { densityClasses } = useDensity(props);
|
|
532
1185
|
const { typographyStyles } = useTypography(props, "pagination--info");
|
|
1186
|
+
/*********************************************************
|
|
1187
|
+
* Spacing / border / elevation
|
|
1188
|
+
*
|
|
1189
|
+
* @description
|
|
1190
|
+
* `IPaginationProps` extends IPaddingProps / IMarginProps / IBorderProps /
|
|
1191
|
+
* IElevationProps. None of the four were consumed: the row could not be
|
|
1192
|
+
* padded, spaced, bordered or raised despite the types promising it.
|
|
1193
|
+
* These paint the pagination ROW itself — the per-page buttons keep
|
|
1194
|
+
* taking their own size / density through `btnProps` above.
|
|
1195
|
+
********************************************************/
|
|
533
1196
|
const { paddingClasses, paddingStyles } = usePadding(props);
|
|
534
1197
|
const { marginClasses, marginStyles } = useMargin(props);
|
|
535
1198
|
const { borderClasses, borderStyles } = useBorder(props);
|
|
536
1199
|
const { elevationClasses, elevationStyles } = useElevation(props);
|
|
537
1200
|
const paginationClasses = computed(() => {
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
1201
|
+
return [
|
|
1202
|
+
"origam-pagination",
|
|
1203
|
+
{
|
|
1204
|
+
"origam-pagination--colored": isColored.value,
|
|
1205
|
+
"origam-pagination--compact": !!props.compact,
|
|
1206
|
+
"origam-pagination--with-info": !!props.withInfo
|
|
1207
|
+
},
|
|
1208
|
+
sizeClasses.value,
|
|
1209
|
+
densityClasses.value,
|
|
1210
|
+
borderClasses.value,
|
|
1211
|
+
elevationClasses.value,
|
|
1212
|
+
paddingClasses.value,
|
|
1213
|
+
marginClasses.value,
|
|
1214
|
+
props.class
|
|
1215
|
+
];
|
|
553
1216
|
});
|
|
554
1217
|
const paginationStyles = computed(() => {
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
1218
|
+
return [
|
|
1219
|
+
borderStyles.value,
|
|
1220
|
+
elevationStyles.value,
|
|
1221
|
+
marginStyles.value,
|
|
1222
|
+
paddingStyles.value,
|
|
1223
|
+
props.style
|
|
1224
|
+
];
|
|
562
1225
|
});
|
|
563
1226
|
const { id, css, load, isLoaded, unload } = useStyle(paginationStyles, () => props.id);
|
|
1227
|
+
/*********************************************************
|
|
1228
|
+
* Expose
|
|
1229
|
+
*
|
|
1230
|
+
* @description
|
|
1231
|
+
* Exposes filterProps to parent ref consumers.
|
|
1232
|
+
********************************************************/
|
|
564
1233
|
defineExpose({
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
1234
|
+
filterProps,
|
|
1235
|
+
css,
|
|
1236
|
+
id,
|
|
1237
|
+
load,
|
|
1238
|
+
unload,
|
|
1239
|
+
isLoaded
|
|
571
1240
|
});
|
|
572
1241
|
</script>
|
|
573
1242
|
|