vuetify 3.4.1 → 3.4.3
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/json/attributes.json +1928 -1928
- package/dist/json/importMap.json +136 -136
- package/dist/json/web-types.json +3673 -3658
- package/dist/vuetify-labs.css +2924 -2918
- package/dist/vuetify-labs.d.ts +298 -151
- package/dist/vuetify-labs.esm.js +710 -696
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +709 -695
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +1824 -1818
- package/dist/vuetify.d.ts +343 -196
- package/dist/vuetify.esm.js +710 -696
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +709 -695
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +222 -221
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/index.d.mts +48 -48
- package/lib/blueprints/md1.d.mts +48 -48
- package/lib/blueprints/md2.d.mts +48 -48
- package/lib/blueprints/md3.d.mts +48 -48
- package/lib/components/VBtn/VBtn.css +3 -0
- package/lib/components/VBtn/VBtn.sass +4 -0
- package/lib/components/VBtn/_variables.scss +1 -0
- package/lib/components/VCarousel/VCarousel.css +2 -1
- package/lib/components/VCarousel/VCarousel.mjs +1 -1
- package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
- package/lib/components/VCarousel/VCarousel.sass +3 -1
- package/lib/components/VCarousel/_variables.scss +6 -0
- package/lib/components/VCheckbox/index.d.mts +32 -20
- package/lib/components/VDataTable/VDataTable.css +0 -3
- package/lib/components/VDataTable/VDataTable.mjs +2 -1
- package/lib/components/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTable.sass +0 -2
- package/lib/components/VDataTable/VDataTableFooter.css +1 -1
- package/lib/components/VDataTable/VDataTableFooter.mjs +18 -31
- package/lib/components/VDataTable/VDataTableFooter.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaders.mjs +1 -1
- package/lib/components/VDataTable/VDataTableHeaders.mjs.map +1 -1
- package/lib/components/VDataTable/_variables.scss +1 -1
- package/lib/components/VDataTable/index.d.mts +3 -3
- package/lib/components/VDatePicker/VDatePicker.mjs +3 -3
- package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.mjs +18 -15
- package/lib/components/VDatePicker/VDatePickerMonth.mjs.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.mjs +1 -0
- package/lib/components/VOtpInput/VOtpInput.mjs.map +1 -1
- package/lib/components/VPagination/VPagination.mjs +2 -2
- package/lib/components/VPagination/VPagination.mjs.map +1 -1
- package/lib/components/VRadio/index.d.mts +16 -10
- package/lib/components/VRadioGroup/index.d.mts +16 -10
- package/lib/components/VSelect/VSelect.mjs +3 -1
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelectionControl/index.d.mts +16 -10
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +4 -1
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs.map +1 -1
- package/lib/components/VSelectionControlGroup/index.d.mts +16 -10
- package/lib/components/VSlideGroup/VSlideGroup.mjs +2 -2
- package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
- package/lib/components/VSwitch/index.d.mts +16 -10
- package/lib/components/VTable/VTable.css +6 -1
- package/lib/components/VTable/VTable.sass +6 -1
- package/lib/components/VTable/_variables.scss +2 -0
- package/lib/components/VTabs/VTab.mjs +4 -3
- package/lib/components/VTabs/VTab.mjs.map +1 -1
- package/lib/components/VTabs/index.d.mts +72 -0
- package/lib/components/index.d.mts +187 -73
- package/lib/composables/date/date.mjs +21 -13
- package/lib/composables/date/date.mjs.map +1 -1
- package/lib/composables/router.mjs +7 -2
- package/lib/composables/router.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +4 -3
- package/lib/framework.mjs.map +1 -1
- package/lib/index.d.mts +156 -123
- package/lib/locale/fr.mjs +1 -1
- package/lib/locale/fr.mjs.map +1 -1
- package/package.json +2 -2
package/dist/vuetify-labs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.4.
|
|
2
|
+
* Vuetify v3.4.3
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -4971,6 +4971,13 @@
|
|
|
4971
4971
|
}
|
|
4972
4972
|
|
|
4973
4973
|
// Utilities
|
|
4974
|
+
|
|
4975
|
+
// Types
|
|
4976
|
+
|
|
4977
|
+
function useRoute() {
|
|
4978
|
+
const vm = getCurrentInstance('useRoute');
|
|
4979
|
+
return vue.computed(() => vm?.proxy?.$route);
|
|
4980
|
+
}
|
|
4974
4981
|
function useRouter() {
|
|
4975
4982
|
return getCurrentInstance('useRouter')?.proxy?.$router;
|
|
4976
4983
|
}
|
|
@@ -4988,12 +4995,17 @@
|
|
|
4988
4995
|
};
|
|
4989
4996
|
}
|
|
4990
4997
|
const link = props.to ? RouterLink.useLink(props) : undefined;
|
|
4998
|
+
const route = useRoute();
|
|
4991
4999
|
return {
|
|
4992
5000
|
isLink,
|
|
4993
5001
|
isClickable,
|
|
4994
5002
|
route: link?.route,
|
|
4995
5003
|
navigate: link?.navigate,
|
|
4996
|
-
isActive: link && vue.computed(() =>
|
|
5004
|
+
isActive: link && vue.computed(() => {
|
|
5005
|
+
if (!props.exact) return link.isActive?.value;
|
|
5006
|
+
if (!route.value) return link.isExactActive?.value;
|
|
5007
|
+
return link.isExactActive?.value && deepEqual(link.route.value.query, route.value.query);
|
|
5008
|
+
}),
|
|
4997
5009
|
href: vue.computed(() => props.to ? link?.route.value.href : props.href)
|
|
4998
5010
|
};
|
|
4999
5011
|
}
|
|
@@ -5810,7 +5822,10 @@
|
|
|
5810
5822
|
default: null
|
|
5811
5823
|
},
|
|
5812
5824
|
name: String,
|
|
5813
|
-
readonly:
|
|
5825
|
+
readonly: {
|
|
5826
|
+
type: Boolean,
|
|
5827
|
+
default: null
|
|
5828
|
+
},
|
|
5814
5829
|
modelValue: null,
|
|
5815
5830
|
type: String,
|
|
5816
5831
|
valueComparator: {
|
|
@@ -11449,7 +11464,9 @@
|
|
|
11449
11464
|
item,
|
|
11450
11465
|
index,
|
|
11451
11466
|
props: itemProps
|
|
11452
|
-
}) ?? vue.createVNode(VListItem, itemProps, {
|
|
11467
|
+
}) ?? vue.createVNode(VListItem, vue.mergeProps(itemProps, {
|
|
11468
|
+
"role": "option"
|
|
11469
|
+
}), {
|
|
11453
11470
|
prepend: _ref3 => {
|
|
11454
11471
|
let {
|
|
11455
11472
|
isSelected
|
|
@@ -13411,7 +13428,7 @@
|
|
|
13411
13428
|
const props = {
|
|
13412
13429
|
id: `carousel-item-${item.id}`,
|
|
13413
13430
|
'aria-label': t('$vuetify.carousel.ariaLabel.delimiter', index + 1, group.items.value.length),
|
|
13414
|
-
class: [group.isSelected(item.id) && 'v-btn--active'],
|
|
13431
|
+
class: ['v-carousel__controls__item', group.isSelected(item.id) && 'v-btn--active'],
|
|
13415
13432
|
onClick: () => group.select(item.id, true)
|
|
13416
13433
|
};
|
|
13417
13434
|
return slots.item ? slots.item({
|
|
@@ -16806,13 +16823,11 @@
|
|
|
16806
16823
|
}
|
|
16807
16824
|
}
|
|
16808
16825
|
|
|
16809
|
-
//
|
|
16810
|
-
|
|
16811
|
-
// Types
|
|
16812
|
-
|
|
16826
|
+
// Composables
|
|
16827
|
+
const DateOptionsSymbol = Symbol.for('vuetify:date-options');
|
|
16813
16828
|
const DateAdapterSymbol = Symbol.for('vuetify:date-adapter');
|
|
16814
16829
|
function createDate(options, locale) {
|
|
16815
|
-
const
|
|
16830
|
+
const _options = mergeDeep({
|
|
16816
16831
|
adapter: VuetifyDateAdapter,
|
|
16817
16832
|
locale: {
|
|
16818
16833
|
af: 'af-ZA',
|
|
@@ -16858,22 +16873,28 @@
|
|
|
16858
16873
|
zhHant: 'zh-TW'
|
|
16859
16874
|
}
|
|
16860
16875
|
}, options);
|
|
16861
|
-
|
|
16876
|
+
return {
|
|
16877
|
+
options: _options,
|
|
16878
|
+
instance: createInstance(_options, locale)
|
|
16879
|
+
};
|
|
16880
|
+
}
|
|
16881
|
+
function createInstance(options, locale) {
|
|
16882
|
+
const instance = vue.reactive(typeof options.adapter === 'function'
|
|
16862
16883
|
// eslint-disable-next-line new-cap
|
|
16863
|
-
? new
|
|
16864
|
-
locale:
|
|
16865
|
-
formats:
|
|
16866
|
-
}) :
|
|
16884
|
+
? new options.adapter({
|
|
16885
|
+
locale: options.locale[locale.current.value] ?? locale.current.value,
|
|
16886
|
+
formats: options.formats
|
|
16887
|
+
}) : options.adapter);
|
|
16867
16888
|
vue.watch(locale.current, value => {
|
|
16868
|
-
|
|
16869
|
-
instance.locale = newLocale ?? instance.locale;
|
|
16889
|
+
instance.locale = options.locale[value] ?? value ?? instance.locale;
|
|
16870
16890
|
});
|
|
16871
16891
|
return instance;
|
|
16872
16892
|
}
|
|
16873
16893
|
function useDate() {
|
|
16874
|
-
const
|
|
16875
|
-
if (!
|
|
16876
|
-
|
|
16894
|
+
const options = vue.inject(DateOptionsSymbol);
|
|
16895
|
+
if (!options) throw new Error('[Vuetify] Could not find injected date options');
|
|
16896
|
+
const locale = useLocale();
|
|
16897
|
+
return createInstance(options, locale);
|
|
16877
16898
|
}
|
|
16878
16899
|
|
|
16879
16900
|
// https://stackoverflow.com/questions/274861/how-do-i-calculate-the-week-number-given-a-date/275024#275024
|
|
@@ -17214,152 +17235,473 @@
|
|
|
17214
17235
|
}
|
|
17215
17236
|
});
|
|
17216
17237
|
|
|
17238
|
+
// Utilities
|
|
17239
|
+
|
|
17217
17240
|
// Types
|
|
17218
17241
|
|
|
17219
|
-
|
|
17242
|
+
function useRefs() {
|
|
17243
|
+
const refs = vue.ref([]);
|
|
17244
|
+
vue.onBeforeUpdate(() => refs.value = []);
|
|
17245
|
+
function updateRef(e, i) {
|
|
17246
|
+
refs.value[i] = e;
|
|
17247
|
+
}
|
|
17248
|
+
return {
|
|
17249
|
+
refs,
|
|
17250
|
+
updateRef
|
|
17251
|
+
};
|
|
17252
|
+
}
|
|
17253
|
+
|
|
17254
|
+
// Types
|
|
17255
|
+
|
|
17256
|
+
const makeVPaginationProps = propsFactory({
|
|
17257
|
+
activeColor: String,
|
|
17258
|
+
start: {
|
|
17259
|
+
type: [Number, String],
|
|
17260
|
+
default: 1
|
|
17261
|
+
},
|
|
17262
|
+
modelValue: {
|
|
17263
|
+
type: Number,
|
|
17264
|
+
default: props => props.start
|
|
17265
|
+
},
|
|
17266
|
+
disabled: Boolean,
|
|
17267
|
+
length: {
|
|
17268
|
+
type: [Number, String],
|
|
17269
|
+
default: 1,
|
|
17270
|
+
validator: val => val % 1 === 0
|
|
17271
|
+
},
|
|
17272
|
+
totalVisible: [Number, String],
|
|
17273
|
+
firstIcon: {
|
|
17274
|
+
type: IconValue,
|
|
17275
|
+
default: '$first'
|
|
17276
|
+
},
|
|
17220
17277
|
prevIcon: {
|
|
17221
|
-
type:
|
|
17278
|
+
type: IconValue,
|
|
17222
17279
|
default: '$prev'
|
|
17223
17280
|
},
|
|
17224
17281
|
nextIcon: {
|
|
17225
|
-
type:
|
|
17282
|
+
type: IconValue,
|
|
17226
17283
|
default: '$next'
|
|
17227
17284
|
},
|
|
17228
|
-
|
|
17285
|
+
lastIcon: {
|
|
17286
|
+
type: IconValue,
|
|
17287
|
+
default: '$last'
|
|
17288
|
+
},
|
|
17289
|
+
ariaLabel: {
|
|
17229
17290
|
type: String,
|
|
17230
|
-
default: '$
|
|
17291
|
+
default: '$vuetify.pagination.ariaLabel.root'
|
|
17231
17292
|
},
|
|
17232
|
-
|
|
17293
|
+
pageAriaLabel: {
|
|
17233
17294
|
type: String,
|
|
17234
|
-
default: '$
|
|
17295
|
+
default: '$vuetify.pagination.ariaLabel.page'
|
|
17235
17296
|
},
|
|
17236
|
-
|
|
17297
|
+
currentPageAriaLabel: {
|
|
17237
17298
|
type: String,
|
|
17238
|
-
default: '$vuetify.
|
|
17299
|
+
default: '$vuetify.pagination.ariaLabel.currentPage'
|
|
17239
17300
|
},
|
|
17240
|
-
|
|
17301
|
+
firstAriaLabel: {
|
|
17241
17302
|
type: String,
|
|
17242
|
-
default: '$vuetify.
|
|
17303
|
+
default: '$vuetify.pagination.ariaLabel.first'
|
|
17243
17304
|
},
|
|
17244
|
-
|
|
17305
|
+
previousAriaLabel: {
|
|
17245
17306
|
type: String,
|
|
17246
|
-
default: '$vuetify.
|
|
17307
|
+
default: '$vuetify.pagination.ariaLabel.previous'
|
|
17247
17308
|
},
|
|
17248
|
-
|
|
17309
|
+
nextAriaLabel: {
|
|
17249
17310
|
type: String,
|
|
17250
|
-
default: '$vuetify.
|
|
17311
|
+
default: '$vuetify.pagination.ariaLabel.next'
|
|
17251
17312
|
},
|
|
17252
|
-
|
|
17313
|
+
lastAriaLabel: {
|
|
17253
17314
|
type: String,
|
|
17254
|
-
default: '$vuetify.
|
|
17315
|
+
default: '$vuetify.pagination.ariaLabel.last'
|
|
17255
17316
|
},
|
|
17256
|
-
|
|
17317
|
+
ellipsis: {
|
|
17257
17318
|
type: String,
|
|
17258
|
-
default: '
|
|
17319
|
+
default: '...'
|
|
17259
17320
|
},
|
|
17260
|
-
|
|
17261
|
-
|
|
17262
|
-
|
|
17263
|
-
|
|
17264
|
-
|
|
17265
|
-
|
|
17266
|
-
|
|
17267
|
-
|
|
17268
|
-
|
|
17269
|
-
|
|
17270
|
-
|
|
17271
|
-
|
|
17272
|
-
|
|
17273
|
-
|
|
17274
|
-
|
|
17275
|
-
|
|
17276
|
-
|
|
17277
|
-
|
|
17321
|
+
showFirstLastPage: Boolean,
|
|
17322
|
+
...makeBorderProps(),
|
|
17323
|
+
...makeComponentProps(),
|
|
17324
|
+
...makeDensityProps(),
|
|
17325
|
+
...makeElevationProps(),
|
|
17326
|
+
...makeRoundedProps(),
|
|
17327
|
+
...makeSizeProps(),
|
|
17328
|
+
...makeTagProps({
|
|
17329
|
+
tag: 'nav'
|
|
17330
|
+
}),
|
|
17331
|
+
...makeThemeProps(),
|
|
17332
|
+
...makeVariantProps({
|
|
17333
|
+
variant: 'text'
|
|
17334
|
+
})
|
|
17335
|
+
}, 'VPagination');
|
|
17336
|
+
const VPagination = genericComponent()({
|
|
17337
|
+
name: 'VPagination',
|
|
17338
|
+
props: makeVPaginationProps(),
|
|
17339
|
+
emits: {
|
|
17340
|
+
'update:modelValue': value => true,
|
|
17341
|
+
first: value => true,
|
|
17342
|
+
prev: value => true,
|
|
17343
|
+
next: value => true,
|
|
17344
|
+
last: value => true
|
|
17278
17345
|
},
|
|
17279
|
-
showCurrentPage: Boolean
|
|
17280
|
-
}, 'VDataTableFooter');
|
|
17281
|
-
const VDataTableFooter = genericComponent()({
|
|
17282
|
-
name: 'VDataTableFooter',
|
|
17283
|
-
props: makeVDataTableFooterProps(),
|
|
17284
17346
|
setup(props, _ref) {
|
|
17285
17347
|
let {
|
|
17286
|
-
slots
|
|
17348
|
+
slots,
|
|
17349
|
+
emit
|
|
17287
17350
|
} = _ref;
|
|
17351
|
+
const page = useProxiedModel(props, 'modelValue');
|
|
17288
17352
|
const {
|
|
17289
|
-
t
|
|
17353
|
+
t,
|
|
17354
|
+
n
|
|
17290
17355
|
} = useLocale();
|
|
17291
17356
|
const {
|
|
17292
|
-
|
|
17293
|
-
|
|
17294
|
-
|
|
17295
|
-
|
|
17296
|
-
|
|
17297
|
-
|
|
17298
|
-
|
|
17299
|
-
} =
|
|
17300
|
-
const
|
|
17301
|
-
|
|
17302
|
-
|
|
17303
|
-
|
|
17304
|
-
|
|
17305
|
-
|
|
17357
|
+
isRtl
|
|
17358
|
+
} = useRtl();
|
|
17359
|
+
const {
|
|
17360
|
+
themeClasses
|
|
17361
|
+
} = provideTheme(props);
|
|
17362
|
+
const {
|
|
17363
|
+
width
|
|
17364
|
+
} = useDisplay();
|
|
17365
|
+
const maxButtons = vue.shallowRef(-1);
|
|
17366
|
+
provideDefaults(undefined, {
|
|
17367
|
+
scoped: true
|
|
17368
|
+
});
|
|
17369
|
+
const {
|
|
17370
|
+
resizeRef
|
|
17371
|
+
} = useResizeObserver(entries => {
|
|
17372
|
+
if (!entries.length) return;
|
|
17373
|
+
const {
|
|
17374
|
+
target,
|
|
17375
|
+
contentRect
|
|
17376
|
+
} = entries[0];
|
|
17377
|
+
const firstItem = target.querySelector('.v-pagination__list > *');
|
|
17378
|
+
if (!firstItem) return;
|
|
17379
|
+
const totalWidth = contentRect.width;
|
|
17380
|
+
const itemWidth = firstItem.offsetWidth + parseFloat(getComputedStyle(firstItem).marginRight) * 2;
|
|
17381
|
+
maxButtons.value = getMax(totalWidth, itemWidth);
|
|
17382
|
+
});
|
|
17383
|
+
const length = vue.computed(() => parseInt(props.length, 10));
|
|
17384
|
+
const start = vue.computed(() => parseInt(props.start, 10));
|
|
17385
|
+
const totalVisible = vue.computed(() => {
|
|
17386
|
+
if (props.totalVisible != null) return parseInt(props.totalVisible, 10);else if (maxButtons.value >= 0) return maxButtons.value;
|
|
17387
|
+
return getMax(width.value, 58);
|
|
17388
|
+
});
|
|
17389
|
+
function getMax(totalWidth, itemWidth) {
|
|
17390
|
+
const minButtons = props.showFirstLastPage ? 5 : 3;
|
|
17391
|
+
return Math.max(0, Math.floor(
|
|
17392
|
+
// Round to two decimal places to avoid floating point errors
|
|
17393
|
+
+((totalWidth - itemWidth * minButtons) / itemWidth).toFixed(2)));
|
|
17394
|
+
}
|
|
17395
|
+
const range = vue.computed(() => {
|
|
17396
|
+
if (length.value <= 0 || isNaN(length.value) || length.value > Number.MAX_SAFE_INTEGER) return [];
|
|
17397
|
+
if (totalVisible.value <= 0) return [];else if (totalVisible.value === 1) return [page.value];
|
|
17398
|
+
if (length.value <= totalVisible.value) {
|
|
17399
|
+
return createRange(length.value, start.value);
|
|
17306
17400
|
}
|
|
17307
|
-
|
|
17308
|
-
|
|
17309
|
-
|
|
17310
|
-
|
|
17311
|
-
|
|
17312
|
-
|
|
17313
|
-
|
|
17314
|
-
|
|
17315
|
-
|
|
17316
|
-
|
|
17317
|
-
|
|
17318
|
-
|
|
17319
|
-
|
|
17320
|
-
|
|
17321
|
-
|
|
17322
|
-
|
|
17323
|
-
}, null)]), vue.createVNode("div", {
|
|
17324
|
-
"class": "v-data-table-footer__info"
|
|
17325
|
-
}, [vue.createVNode("div", null, [t(props.pageText, !itemsLength.value ? 0 : startIndex.value + 1, stopIndex.value, itemsLength.value)])]), vue.createVNode("div", {
|
|
17326
|
-
"class": "v-data-table-footer__pagination"
|
|
17327
|
-
}, [vue.createVNode(VBtn, {
|
|
17328
|
-
"icon": props.firstIcon,
|
|
17329
|
-
"variant": "plain",
|
|
17330
|
-
"onClick": () => page.value = 1,
|
|
17331
|
-
"disabled": page.value === 1,
|
|
17332
|
-
"aria-label": t(props.firstPageLabel)
|
|
17333
|
-
}, null), vue.createVNode(VBtn, {
|
|
17334
|
-
"icon": props.prevIcon,
|
|
17335
|
-
"variant": "plain",
|
|
17336
|
-
"onClick": () => page.value = Math.max(1, page.value - 1),
|
|
17337
|
-
"disabled": page.value === 1,
|
|
17338
|
-
"aria-label": t(props.prevPageLabel)
|
|
17339
|
-
}, null), props.showCurrentPage && vue.createVNode("span", {
|
|
17340
|
-
"key": "page",
|
|
17341
|
-
"class": "v-data-table-footer__page"
|
|
17342
|
-
}, [page.value]), vue.createVNode(VBtn, {
|
|
17343
|
-
"icon": props.nextIcon,
|
|
17344
|
-
"variant": "plain",
|
|
17345
|
-
"onClick": () => page.value = Math.min(pageCount.value, page.value + 1),
|
|
17346
|
-
"disabled": page.value === pageCount.value,
|
|
17347
|
-
"aria-label": t(props.nextPageLabel)
|
|
17348
|
-
}, null), vue.createVNode(VBtn, {
|
|
17349
|
-
"icon": props.lastIcon,
|
|
17350
|
-
"variant": "plain",
|
|
17351
|
-
"onClick": () => page.value = pageCount.value,
|
|
17352
|
-
"disabled": page.value === pageCount.value,
|
|
17353
|
-
"aria-label": t(props.lastPageLabel)
|
|
17354
|
-
}, null)])]);
|
|
17355
|
-
}
|
|
17356
|
-
});
|
|
17357
|
-
|
|
17358
|
-
// Types
|
|
17401
|
+
const even = totalVisible.value % 2 === 0;
|
|
17402
|
+
const middle = even ? totalVisible.value / 2 : Math.floor(totalVisible.value / 2);
|
|
17403
|
+
const left = even ? middle : middle + 1;
|
|
17404
|
+
const right = length.value - middle;
|
|
17405
|
+
if (left - page.value >= 0) {
|
|
17406
|
+
return [...createRange(Math.max(1, totalVisible.value - 1), start.value), props.ellipsis, length.value];
|
|
17407
|
+
} else if (page.value - right >= (even ? 1 : 0)) {
|
|
17408
|
+
const rangeLength = totalVisible.value - 1;
|
|
17409
|
+
const rangeStart = length.value - rangeLength + start.value;
|
|
17410
|
+
return [start.value, props.ellipsis, ...createRange(rangeLength, rangeStart)];
|
|
17411
|
+
} else {
|
|
17412
|
+
const rangeLength = Math.max(1, totalVisible.value - 3);
|
|
17413
|
+
const rangeStart = rangeLength === 1 ? page.value : page.value - Math.ceil(rangeLength / 2) + start.value;
|
|
17414
|
+
return [start.value, props.ellipsis, ...createRange(rangeLength, rangeStart), props.ellipsis, length.value];
|
|
17415
|
+
}
|
|
17416
|
+
});
|
|
17359
17417
|
|
|
17360
|
-
|
|
17361
|
-
|
|
17362
|
-
|
|
17418
|
+
// TODO: 'first' | 'prev' | 'next' | 'last' does not work here?
|
|
17419
|
+
function setValue(e, value, event) {
|
|
17420
|
+
e.preventDefault();
|
|
17421
|
+
page.value = value;
|
|
17422
|
+
event && emit(event, value);
|
|
17423
|
+
}
|
|
17424
|
+
const {
|
|
17425
|
+
refs,
|
|
17426
|
+
updateRef
|
|
17427
|
+
} = useRefs();
|
|
17428
|
+
provideDefaults({
|
|
17429
|
+
VPaginationBtn: {
|
|
17430
|
+
color: vue.toRef(props, 'color'),
|
|
17431
|
+
border: vue.toRef(props, 'border'),
|
|
17432
|
+
density: vue.toRef(props, 'density'),
|
|
17433
|
+
size: vue.toRef(props, 'size'),
|
|
17434
|
+
variant: vue.toRef(props, 'variant'),
|
|
17435
|
+
rounded: vue.toRef(props, 'rounded'),
|
|
17436
|
+
elevation: vue.toRef(props, 'elevation')
|
|
17437
|
+
}
|
|
17438
|
+
});
|
|
17439
|
+
const items = vue.computed(() => {
|
|
17440
|
+
return range.value.map((item, index) => {
|
|
17441
|
+
const ref = e => updateRef(e, index);
|
|
17442
|
+
if (typeof item === 'string') {
|
|
17443
|
+
return {
|
|
17444
|
+
isActive: false,
|
|
17445
|
+
key: `ellipsis-${index}`,
|
|
17446
|
+
page: item,
|
|
17447
|
+
props: {
|
|
17448
|
+
ref,
|
|
17449
|
+
ellipsis: true,
|
|
17450
|
+
icon: true,
|
|
17451
|
+
disabled: true
|
|
17452
|
+
}
|
|
17453
|
+
};
|
|
17454
|
+
} else {
|
|
17455
|
+
const isActive = item === page.value;
|
|
17456
|
+
return {
|
|
17457
|
+
isActive,
|
|
17458
|
+
key: item,
|
|
17459
|
+
page: n(item),
|
|
17460
|
+
props: {
|
|
17461
|
+
ref,
|
|
17462
|
+
ellipsis: false,
|
|
17463
|
+
icon: true,
|
|
17464
|
+
disabled: !!props.disabled || +props.length < 2,
|
|
17465
|
+
color: isActive ? props.activeColor : props.color,
|
|
17466
|
+
ariaCurrent: isActive,
|
|
17467
|
+
ariaLabel: t(isActive ? props.currentPageAriaLabel : props.pageAriaLabel, item),
|
|
17468
|
+
onClick: e => setValue(e, item)
|
|
17469
|
+
}
|
|
17470
|
+
};
|
|
17471
|
+
}
|
|
17472
|
+
});
|
|
17473
|
+
});
|
|
17474
|
+
const controls = vue.computed(() => {
|
|
17475
|
+
const prevDisabled = !!props.disabled || page.value <= start.value;
|
|
17476
|
+
const nextDisabled = !!props.disabled || page.value >= start.value + length.value - 1;
|
|
17477
|
+
return {
|
|
17478
|
+
first: props.showFirstLastPage ? {
|
|
17479
|
+
icon: isRtl.value ? props.lastIcon : props.firstIcon,
|
|
17480
|
+
onClick: e => setValue(e, start.value, 'first'),
|
|
17481
|
+
disabled: prevDisabled,
|
|
17482
|
+
ariaLabel: t(props.firstAriaLabel),
|
|
17483
|
+
ariaDisabled: prevDisabled
|
|
17484
|
+
} : undefined,
|
|
17485
|
+
prev: {
|
|
17486
|
+
icon: isRtl.value ? props.nextIcon : props.prevIcon,
|
|
17487
|
+
onClick: e => setValue(e, page.value - 1, 'prev'),
|
|
17488
|
+
disabled: prevDisabled,
|
|
17489
|
+
ariaLabel: t(props.previousAriaLabel),
|
|
17490
|
+
ariaDisabled: prevDisabled
|
|
17491
|
+
},
|
|
17492
|
+
next: {
|
|
17493
|
+
icon: isRtl.value ? props.prevIcon : props.nextIcon,
|
|
17494
|
+
onClick: e => setValue(e, page.value + 1, 'next'),
|
|
17495
|
+
disabled: nextDisabled,
|
|
17496
|
+
ariaLabel: t(props.nextAriaLabel),
|
|
17497
|
+
ariaDisabled: nextDisabled
|
|
17498
|
+
},
|
|
17499
|
+
last: props.showFirstLastPage ? {
|
|
17500
|
+
icon: isRtl.value ? props.firstIcon : props.lastIcon,
|
|
17501
|
+
onClick: e => setValue(e, start.value + length.value - 1, 'last'),
|
|
17502
|
+
disabled: nextDisabled,
|
|
17503
|
+
ariaLabel: t(props.lastAriaLabel),
|
|
17504
|
+
ariaDisabled: nextDisabled
|
|
17505
|
+
} : undefined
|
|
17506
|
+
};
|
|
17507
|
+
});
|
|
17508
|
+
function updateFocus() {
|
|
17509
|
+
const currentIndex = page.value - start.value;
|
|
17510
|
+
refs.value[currentIndex]?.$el.focus();
|
|
17511
|
+
}
|
|
17512
|
+
function onKeydown(e) {
|
|
17513
|
+
if (e.key === keyValues.left && !props.disabled && page.value > +props.start) {
|
|
17514
|
+
page.value = page.value - 1;
|
|
17515
|
+
vue.nextTick(updateFocus);
|
|
17516
|
+
} else if (e.key === keyValues.right && !props.disabled && page.value < start.value + length.value - 1) {
|
|
17517
|
+
page.value = page.value + 1;
|
|
17518
|
+
vue.nextTick(updateFocus);
|
|
17519
|
+
}
|
|
17520
|
+
}
|
|
17521
|
+
useRender(() => vue.createVNode(props.tag, {
|
|
17522
|
+
"ref": resizeRef,
|
|
17523
|
+
"class": ['v-pagination', themeClasses.value, props.class],
|
|
17524
|
+
"style": props.style,
|
|
17525
|
+
"role": "navigation",
|
|
17526
|
+
"aria-label": t(props.ariaLabel),
|
|
17527
|
+
"onKeydown": onKeydown,
|
|
17528
|
+
"data-test": "v-pagination-root"
|
|
17529
|
+
}, {
|
|
17530
|
+
default: () => [vue.createVNode("ul", {
|
|
17531
|
+
"class": "v-pagination__list"
|
|
17532
|
+
}, [props.showFirstLastPage && vue.createVNode("li", {
|
|
17533
|
+
"key": "first",
|
|
17534
|
+
"class": "v-pagination__first",
|
|
17535
|
+
"data-test": "v-pagination-first"
|
|
17536
|
+
}, [slots.first ? slots.first(controls.value.first) : vue.createVNode(VBtn, vue.mergeProps({
|
|
17537
|
+
"_as": "VPaginationBtn"
|
|
17538
|
+
}, controls.value.first), null)]), vue.createVNode("li", {
|
|
17539
|
+
"key": "prev",
|
|
17540
|
+
"class": "v-pagination__prev",
|
|
17541
|
+
"data-test": "v-pagination-prev"
|
|
17542
|
+
}, [slots.prev ? slots.prev(controls.value.prev) : vue.createVNode(VBtn, vue.mergeProps({
|
|
17543
|
+
"_as": "VPaginationBtn"
|
|
17544
|
+
}, controls.value.prev), null)]), items.value.map((item, index) => vue.createVNode("li", {
|
|
17545
|
+
"key": item.key,
|
|
17546
|
+
"class": ['v-pagination__item', {
|
|
17547
|
+
'v-pagination__item--is-active': item.isActive
|
|
17548
|
+
}],
|
|
17549
|
+
"data-test": "v-pagination-item"
|
|
17550
|
+
}, [slots.item ? slots.item(item) : vue.createVNode(VBtn, vue.mergeProps({
|
|
17551
|
+
"_as": "VPaginationBtn"
|
|
17552
|
+
}, item.props), {
|
|
17553
|
+
default: () => [item.page]
|
|
17554
|
+
})])), vue.createVNode("li", {
|
|
17555
|
+
"key": "next",
|
|
17556
|
+
"class": "v-pagination__next",
|
|
17557
|
+
"data-test": "v-pagination-next"
|
|
17558
|
+
}, [slots.next ? slots.next(controls.value.next) : vue.createVNode(VBtn, vue.mergeProps({
|
|
17559
|
+
"_as": "VPaginationBtn"
|
|
17560
|
+
}, controls.value.next), null)]), props.showFirstLastPage && vue.createVNode("li", {
|
|
17561
|
+
"key": "last",
|
|
17562
|
+
"class": "v-pagination__last",
|
|
17563
|
+
"data-test": "v-pagination-last"
|
|
17564
|
+
}, [slots.last ? slots.last(controls.value.last) : vue.createVNode(VBtn, vue.mergeProps({
|
|
17565
|
+
"_as": "VPaginationBtn"
|
|
17566
|
+
}, controls.value.last), null)])])]
|
|
17567
|
+
}));
|
|
17568
|
+
return {};
|
|
17569
|
+
}
|
|
17570
|
+
});
|
|
17571
|
+
|
|
17572
|
+
// Types
|
|
17573
|
+
|
|
17574
|
+
const makeVDataTableFooterProps = propsFactory({
|
|
17575
|
+
prevIcon: {
|
|
17576
|
+
type: String,
|
|
17577
|
+
default: '$prev'
|
|
17578
|
+
},
|
|
17579
|
+
nextIcon: {
|
|
17580
|
+
type: String,
|
|
17581
|
+
default: '$next'
|
|
17582
|
+
},
|
|
17583
|
+
firstIcon: {
|
|
17584
|
+
type: String,
|
|
17585
|
+
default: '$first'
|
|
17586
|
+
},
|
|
17587
|
+
lastIcon: {
|
|
17588
|
+
type: String,
|
|
17589
|
+
default: '$last'
|
|
17590
|
+
},
|
|
17591
|
+
itemsPerPageText: {
|
|
17592
|
+
type: String,
|
|
17593
|
+
default: '$vuetify.dataFooter.itemsPerPageText'
|
|
17594
|
+
},
|
|
17595
|
+
pageText: {
|
|
17596
|
+
type: String,
|
|
17597
|
+
default: '$vuetify.dataFooter.pageText'
|
|
17598
|
+
},
|
|
17599
|
+
firstPageLabel: {
|
|
17600
|
+
type: String,
|
|
17601
|
+
default: '$vuetify.dataFooter.firstPage'
|
|
17602
|
+
},
|
|
17603
|
+
prevPageLabel: {
|
|
17604
|
+
type: String,
|
|
17605
|
+
default: '$vuetify.dataFooter.prevPage'
|
|
17606
|
+
},
|
|
17607
|
+
nextPageLabel: {
|
|
17608
|
+
type: String,
|
|
17609
|
+
default: '$vuetify.dataFooter.nextPage'
|
|
17610
|
+
},
|
|
17611
|
+
lastPageLabel: {
|
|
17612
|
+
type: String,
|
|
17613
|
+
default: '$vuetify.dataFooter.lastPage'
|
|
17614
|
+
},
|
|
17615
|
+
itemsPerPageOptions: {
|
|
17616
|
+
type: Array,
|
|
17617
|
+
default: () => [{
|
|
17618
|
+
value: 10,
|
|
17619
|
+
title: '10'
|
|
17620
|
+
}, {
|
|
17621
|
+
value: 25,
|
|
17622
|
+
title: '25'
|
|
17623
|
+
}, {
|
|
17624
|
+
value: 50,
|
|
17625
|
+
title: '50'
|
|
17626
|
+
}, {
|
|
17627
|
+
value: 100,
|
|
17628
|
+
title: '100'
|
|
17629
|
+
}, {
|
|
17630
|
+
value: -1,
|
|
17631
|
+
title: '$vuetify.dataFooter.itemsPerPageAll'
|
|
17632
|
+
}]
|
|
17633
|
+
},
|
|
17634
|
+
showCurrentPage: Boolean
|
|
17635
|
+
}, 'VDataTableFooter');
|
|
17636
|
+
const VDataTableFooter = genericComponent()({
|
|
17637
|
+
name: 'VDataTableFooter',
|
|
17638
|
+
props: makeVDataTableFooterProps(),
|
|
17639
|
+
setup(props, _ref) {
|
|
17640
|
+
let {
|
|
17641
|
+
slots
|
|
17642
|
+
} = _ref;
|
|
17643
|
+
const {
|
|
17644
|
+
t
|
|
17645
|
+
} = useLocale();
|
|
17646
|
+
const {
|
|
17647
|
+
page,
|
|
17648
|
+
pageCount,
|
|
17649
|
+
startIndex,
|
|
17650
|
+
stopIndex,
|
|
17651
|
+
itemsLength,
|
|
17652
|
+
itemsPerPage,
|
|
17653
|
+
setItemsPerPage
|
|
17654
|
+
} = usePagination();
|
|
17655
|
+
const itemsPerPageOptions = vue.computed(() => props.itemsPerPageOptions.map(option => {
|
|
17656
|
+
if (typeof option === 'number') {
|
|
17657
|
+
return {
|
|
17658
|
+
value: option,
|
|
17659
|
+
title: option === -1 ? t('$vuetify.dataFooter.itemsPerPageAll') : String(option)
|
|
17660
|
+
};
|
|
17661
|
+
}
|
|
17662
|
+
return {
|
|
17663
|
+
...option,
|
|
17664
|
+
title: t(option.title)
|
|
17665
|
+
};
|
|
17666
|
+
}));
|
|
17667
|
+
useRender(() => vue.createVNode("div", {
|
|
17668
|
+
"class": "v-data-table-footer"
|
|
17669
|
+
}, [slots.prepend?.(), vue.createVNode("div", {
|
|
17670
|
+
"class": "v-data-table-footer__items-per-page"
|
|
17671
|
+
}, [vue.createVNode("span", null, [t(props.itemsPerPageText)]), vue.createVNode(VSelect, {
|
|
17672
|
+
"items": itemsPerPageOptions.value,
|
|
17673
|
+
"modelValue": itemsPerPage.value,
|
|
17674
|
+
"onUpdate:modelValue": v => setItemsPerPage(Number(v)),
|
|
17675
|
+
"density": "compact",
|
|
17676
|
+
"variant": "outlined",
|
|
17677
|
+
"hide-details": true
|
|
17678
|
+
}, null)]), vue.createVNode("div", {
|
|
17679
|
+
"class": "v-data-table-footer__info"
|
|
17680
|
+
}, [vue.createVNode("div", null, [t(props.pageText, !itemsLength.value ? 0 : startIndex.value + 1, stopIndex.value, itemsLength.value)])]), vue.createVNode("div", {
|
|
17681
|
+
"class": "v-data-table-footer__pagination"
|
|
17682
|
+
}, [vue.createVNode(VPagination, {
|
|
17683
|
+
"modelValue": page.value,
|
|
17684
|
+
"onUpdate:modelValue": $event => page.value = $event,
|
|
17685
|
+
"density": "comfortable",
|
|
17686
|
+
"first-aria-label": props.firstPageLabel,
|
|
17687
|
+
"last-aria-label": props.lastPageLabel,
|
|
17688
|
+
"length": pageCount.value,
|
|
17689
|
+
"next-aria-label": props.nextPageLabel,
|
|
17690
|
+
"prev-aria-label": props.prevPageLabel,
|
|
17691
|
+
"rounded": true,
|
|
17692
|
+
"show-first-last-page": true,
|
|
17693
|
+
"total-visible": props.showCurrentPage ? 1 : 0,
|
|
17694
|
+
"variant": "plain"
|
|
17695
|
+
}, null)])]));
|
|
17696
|
+
return {};
|
|
17697
|
+
}
|
|
17698
|
+
});
|
|
17699
|
+
|
|
17700
|
+
// Types
|
|
17701
|
+
|
|
17702
|
+
const VDataTableColumn = defineFunctionalComponent({
|
|
17703
|
+
align: {
|
|
17704
|
+
type: String,
|
|
17363
17705
|
default: 'start'
|
|
17364
17706
|
},
|
|
17365
17707
|
fixed: Boolean,
|
|
@@ -17738,7 +18080,7 @@
|
|
|
17738
18080
|
}, loaderClasses.value],
|
|
17739
18081
|
"style": {
|
|
17740
18082
|
width: convertToUnit(column.width),
|
|
17741
|
-
minWidth: convertToUnit(column.
|
|
18083
|
+
minWidth: convertToUnit(column.minWidth),
|
|
17742
18084
|
...getFixedStyles(column, y)
|
|
17743
18085
|
},
|
|
17744
18086
|
"colspan": column.colspan,
|
|
@@ -18373,7 +18715,7 @@
|
|
|
18373
18715
|
default: () => slots.default ? slots.default(slotProps.value) : vue.createVNode(vue.Fragment, null, [slots.colgroup?.(slotProps.value), vue.createVNode("thead", null, [vue.createVNode(VDataTableHeaders, dataTableHeadersProps, slots)]), slots.thead?.(slotProps.value), vue.createVNode("tbody", null, [slots['body.prepend']?.(slotProps.value), slots.body ? slots.body(slotProps.value) : vue.createVNode(VDataTableRows, vue.mergeProps(attrs, dataTableRowsProps, {
|
|
18374
18716
|
"items": paginatedItems.value
|
|
18375
18717
|
}), slots), slots['body.append']?.(slotProps.value)]), slots.tbody?.(slotProps.value), slots.tfoot?.(slotProps.value)]),
|
|
18376
|
-
bottom: () => slots.bottom ? slots.bottom(slotProps.value) : vue.createVNode(vue.Fragment, null, [vue.createVNode(VDataTableFooter, dataTableFooterProps, {
|
|
18718
|
+
bottom: () => slots.bottom ? slots.bottom(slotProps.value) : vue.createVNode(vue.Fragment, null, [vue.createVNode(VDivider, null, null), vue.createVNode(VDataTableFooter, dataTableFooterProps, {
|
|
18377
18719
|
prepend: slots['footer.prepend']
|
|
18378
18720
|
})])
|
|
18379
18721
|
});
|
|
@@ -19246,21 +19588,20 @@
|
|
|
19246
19588
|
// model comes in always as array
|
|
19247
19589
|
// leaves as array if multiple
|
|
19248
19590
|
const model = useProxiedModel(props, 'modelValue', [], v => wrapInArray(v));
|
|
19249
|
-
|
|
19250
|
-
|
|
19251
|
-
|
|
19252
|
-
|
|
19591
|
+
const displayValue = vue.computed(() => {
|
|
19592
|
+
if (model.value.length > 0) return adapter.date(model.value[0]);
|
|
19593
|
+
if (props.min) return adapter.date(props.min);
|
|
19594
|
+
if (Array.isArray(props.allowedDates)) return adapter.date(props.allowedDates[0]);
|
|
19595
|
+
return adapter.date();
|
|
19253
19596
|
});
|
|
19254
19597
|
const year = useProxiedModel(props, 'year', undefined, v => {
|
|
19255
|
-
|
|
19256
|
-
|
|
19257
|
-
return adapter.startOfYear(date);
|
|
19598
|
+
const value = v != null ? Number(v) : adapter.getYear(displayValue.value);
|
|
19599
|
+
return adapter.startOfYear(adapter.setYear(adapter.date(), value));
|
|
19258
19600
|
}, v => adapter.getYear(v));
|
|
19259
19601
|
const month = useProxiedModel(props, 'month', undefined, v => {
|
|
19260
|
-
|
|
19261
|
-
|
|
19262
|
-
|
|
19263
|
-
return date;
|
|
19602
|
+
const value = v != null ? Number(v) : adapter.getMonth(displayValue.value);
|
|
19603
|
+
const date = adapter.setYear(adapter.date(), adapter.getYear(year.value));
|
|
19604
|
+
return adapter.setMonth(date, value);
|
|
19264
19605
|
}, v => adapter.getMonth(v));
|
|
19265
19606
|
const weeksInMonth = vue.computed(() => {
|
|
19266
19607
|
const weeks = adapter.getWeekArray(month.value);
|
|
@@ -19314,9 +19655,9 @@
|
|
|
19314
19655
|
function isDisabled(value) {
|
|
19315
19656
|
if (props.disabled) return true;
|
|
19316
19657
|
const date = adapter.date(value);
|
|
19317
|
-
if (props.min && adapter.isAfter(props.min, date)) return true;
|
|
19318
|
-
if (props.max && adapter.isAfter(date, props.max)) return true;
|
|
19319
|
-
if (Array.isArray(props.allowedDates)) {
|
|
19658
|
+
if (props.min && adapter.isAfter(adapter.date(props.min), date)) return true;
|
|
19659
|
+
if (props.max && adapter.isAfter(date, adapter.date(props.max))) return true;
|
|
19660
|
+
if (Array.isArray(props.allowedDates) && props.allowedDates.length > 0) {
|
|
19320
19661
|
return !props.allowedDates.some(d => adapter.isSameDay(adapter.date(d), date));
|
|
19321
19662
|
}
|
|
19322
19663
|
if (typeof props.allowedDates === 'function') {
|
|
@@ -19338,6 +19679,10 @@
|
|
|
19338
19679
|
model.value = [value];
|
|
19339
19680
|
}
|
|
19340
19681
|
}
|
|
19682
|
+
vue.watch(displayValue, val => {
|
|
19683
|
+
month.value = val;
|
|
19684
|
+
year.value = val;
|
|
19685
|
+
});
|
|
19341
19686
|
return () => vue.createVNode("div", {
|
|
19342
19687
|
"class": "v-date-picker-month"
|
|
19343
19688
|
}, [props.showWeek && vue.createVNode("div", {
|
|
@@ -19709,22 +20054,22 @@
|
|
|
19709
20054
|
function onClickNext() {
|
|
19710
20055
|
if (month.value < 11) {
|
|
19711
20056
|
month.value++;
|
|
19712
|
-
emit('update:month', month.value);
|
|
19713
20057
|
} else {
|
|
19714
20058
|
year.value++;
|
|
19715
20059
|
month.value = 0;
|
|
19716
20060
|
emit('update:year', year.value);
|
|
19717
20061
|
}
|
|
20062
|
+
emit('update:month', month.value);
|
|
19718
20063
|
}
|
|
19719
20064
|
function onClickPrev() {
|
|
19720
20065
|
if (month.value > 0) {
|
|
19721
20066
|
month.value--;
|
|
19722
|
-
emit('update:month', month.value);
|
|
19723
20067
|
} else {
|
|
19724
20068
|
year.value--;
|
|
19725
20069
|
month.value = 11;
|
|
19726
|
-
emit('update:year',
|
|
20070
|
+
emit('update:year', year.value);
|
|
19727
20071
|
}
|
|
20072
|
+
emit('update:month', month.value);
|
|
19728
20073
|
}
|
|
19729
20074
|
function onClickMonth() {
|
|
19730
20075
|
viewMode.value = viewMode.value === 'months' ? 'month' : 'months';
|
|
@@ -21452,577 +21797,244 @@
|
|
|
21452
21797
|
}, {
|
|
21453
21798
|
default: () => [isTemporary.value && (isDragging.value || isActive.value) && !!props.scrim && vue.createVNode("div", vue.mergeProps({
|
|
21454
21799
|
"class": ['v-navigation-drawer__scrim', scrimColor.backgroundColorClasses.value],
|
|
21455
|
-
"style": [scrimStyles.value, scrimColor.backgroundColorStyles.value],
|
|
21456
|
-
"onClick": () => isActive.value = false
|
|
21457
|
-
}, scopeId), null)]
|
|
21458
|
-
})]);
|
|
21459
|
-
});
|
|
21460
|
-
return {
|
|
21461
|
-
isStuck
|
|
21462
|
-
};
|
|
21463
|
-
}
|
|
21464
|
-
});
|
|
21465
|
-
|
|
21466
|
-
// Composables
|
|
21467
|
-
const VNoSsr = defineComponent({
|
|
21468
|
-
name: 'VNoSsr',
|
|
21469
|
-
setup(_, _ref) {
|
|
21470
|
-
let {
|
|
21471
|
-
slots
|
|
21472
|
-
} = _ref;
|
|
21473
|
-
const show = useHydration();
|
|
21474
|
-
return () => show.value && slots.default?.();
|
|
21475
|
-
}
|
|
21476
|
-
});
|
|
21477
|
-
|
|
21478
|
-
// Types
|
|
21479
|
-
|
|
21480
|
-
const makeVOtpInputProps = propsFactory({
|
|
21481
|
-
autofocus: Boolean,
|
|
21482
|
-
divider: String,
|
|
21483
|
-
focusAll: Boolean,
|
|
21484
|
-
label: {
|
|
21485
|
-
type: String,
|
|
21486
|
-
default: '$vuetify.input.otp'
|
|
21487
|
-
},
|
|
21488
|
-
length: {
|
|
21489
|
-
type: [Number, String],
|
|
21490
|
-
default: 6
|
|
21491
|
-
},
|
|
21492
|
-
modelValue: {
|
|
21493
|
-
type: [Number, String],
|
|
21494
|
-
default: undefined
|
|
21495
|
-
},
|
|
21496
|
-
placeholder: String,
|
|
21497
|
-
type: {
|
|
21498
|
-
type: String,
|
|
21499
|
-
default: 'number'
|
|
21500
|
-
},
|
|
21501
|
-
...makeDimensionProps(),
|
|
21502
|
-
...makeFocusProps(),
|
|
21503
|
-
...only(makeVFieldProps({
|
|
21504
|
-
variant: 'outlined'
|
|
21505
|
-
}), ['baseColor', 'bgColor', 'class', 'color', 'disabled', 'error', 'loading', 'rounded', 'style', 'theme', 'variant'])
|
|
21506
|
-
}, 'VOtpInput');
|
|
21507
|
-
const VOtpInput = genericComponent()({
|
|
21508
|
-
name: 'VOtpInput',
|
|
21509
|
-
props: makeVOtpInputProps(),
|
|
21510
|
-
emits: {
|
|
21511
|
-
finish: val => true,
|
|
21512
|
-
'update:focused': val => true,
|
|
21513
|
-
'update:modelValue': val => true
|
|
21514
|
-
},
|
|
21515
|
-
setup(props, _ref) {
|
|
21516
|
-
let {
|
|
21517
|
-
attrs,
|
|
21518
|
-
emit,
|
|
21519
|
-
slots
|
|
21520
|
-
} = _ref;
|
|
21521
|
-
const {
|
|
21522
|
-
dimensionStyles
|
|
21523
|
-
} = useDimension(props);
|
|
21524
|
-
const {
|
|
21525
|
-
isFocused,
|
|
21526
|
-
focus,
|
|
21527
|
-
blur
|
|
21528
|
-
} = useFocus(props);
|
|
21529
|
-
const model = useProxiedModel(props, 'modelValue', '', val => String(val).split(''), val => val.join(''));
|
|
21530
|
-
const {
|
|
21531
|
-
t
|
|
21532
|
-
} = useLocale();
|
|
21533
|
-
const length = vue.computed(() => Number(props.length));
|
|
21534
|
-
const fields = vue.computed(() => Array(length.value).fill(0));
|
|
21535
|
-
const focusIndex = vue.ref(-1);
|
|
21536
|
-
const contentRef = vue.ref();
|
|
21537
|
-
const inputRef = vue.ref([]);
|
|
21538
|
-
const current = vue.computed(() => inputRef.value[focusIndex.value]);
|
|
21539
|
-
function onInput() {
|
|
21540
|
-
// The maxlength attribute doesn't work for the number type input, so the text type is used.
|
|
21541
|
-
// The following logic simulates the behavior of a number input.
|
|
21542
|
-
if (props.type === 'number' && /[^0-9]/g.test(current.value.value)) {
|
|
21543
|
-
current.value.value = '';
|
|
21544
|
-
return;
|
|
21545
|
-
}
|
|
21546
|
-
const array = model.value.slice();
|
|
21547
|
-
const value = current.value.value;
|
|
21548
|
-
array[focusIndex.value] = value;
|
|
21549
|
-
let target = null;
|
|
21550
|
-
if (focusIndex.value > model.value.length) {
|
|
21551
|
-
target = model.value.length + 1;
|
|
21552
|
-
} else if (focusIndex.value + 1 !== length.value) {
|
|
21553
|
-
target = 'next';
|
|
21554
|
-
}
|
|
21555
|
-
model.value = array;
|
|
21556
|
-
if (target) focusChild(contentRef.value, target);
|
|
21557
|
-
}
|
|
21558
|
-
function onKeydown(e) {
|
|
21559
|
-
const array = model.value.slice();
|
|
21560
|
-
const index = focusIndex.value;
|
|
21561
|
-
let target = null;
|
|
21562
|
-
if (!['ArrowLeft', 'ArrowRight', 'Backspace', 'Delete'].includes(e.key)) return;
|
|
21563
|
-
e.preventDefault();
|
|
21564
|
-
if (e.key === 'ArrowLeft') {
|
|
21565
|
-
target = 'prev';
|
|
21566
|
-
} else if (e.key === 'ArrowRight') {
|
|
21567
|
-
target = 'next';
|
|
21568
|
-
} else if (['Backspace', 'Delete'].includes(e.key)) {
|
|
21569
|
-
array[focusIndex.value] = '';
|
|
21570
|
-
model.value = array;
|
|
21571
|
-
if (focusIndex.value > 0 && e.key === 'Backspace') {
|
|
21572
|
-
target = 'prev';
|
|
21573
|
-
} else {
|
|
21574
|
-
requestAnimationFrame(() => {
|
|
21575
|
-
inputRef.value[index]?.select();
|
|
21576
|
-
});
|
|
21577
|
-
}
|
|
21578
|
-
}
|
|
21579
|
-
requestAnimationFrame(() => {
|
|
21580
|
-
if (target != null) {
|
|
21581
|
-
focusChild(contentRef.value, target);
|
|
21582
|
-
}
|
|
21583
|
-
});
|
|
21584
|
-
}
|
|
21585
|
-
function onPaste(index, e) {
|
|
21586
|
-
e.preventDefault();
|
|
21587
|
-
e.stopPropagation();
|
|
21588
|
-
model.value = (e?.clipboardData?.getData('Text') ?? '').split('');
|
|
21589
|
-
inputRef.value?.[index].blur();
|
|
21590
|
-
}
|
|
21591
|
-
function reset() {
|
|
21592
|
-
model.value = [];
|
|
21593
|
-
}
|
|
21594
|
-
function onFocus(e, index) {
|
|
21595
|
-
focus();
|
|
21596
|
-
focusIndex.value = index;
|
|
21597
|
-
}
|
|
21598
|
-
function onBlur() {
|
|
21599
|
-
blur();
|
|
21600
|
-
focusIndex.value = -1;
|
|
21601
|
-
}
|
|
21602
|
-
provideDefaults({
|
|
21603
|
-
VField: {
|
|
21604
|
-
color: vue.computed(() => props.color),
|
|
21605
|
-
bgColor: vue.computed(() => props.color),
|
|
21606
|
-
baseColor: vue.computed(() => props.baseColor),
|
|
21607
|
-
disabled: vue.computed(() => props.disabled),
|
|
21608
|
-
error: vue.computed(() => props.error),
|
|
21609
|
-
variant: vue.computed(() => props.variant)
|
|
21610
|
-
}
|
|
21611
|
-
}, {
|
|
21612
|
-
scoped: true
|
|
21613
|
-
});
|
|
21614
|
-
vue.watch(model, val => {
|
|
21615
|
-
if (val.length === length.value) emit('finish', val.join(''));
|
|
21616
|
-
}, {
|
|
21617
|
-
deep: true
|
|
21618
|
-
});
|
|
21619
|
-
vue.watch(focusIndex, val => {
|
|
21620
|
-
if (val < 0) return;
|
|
21621
|
-
vue.nextTick(() => {
|
|
21622
|
-
inputRef.value[val]?.select();
|
|
21623
|
-
});
|
|
21624
|
-
});
|
|
21625
|
-
useRender(() => {
|
|
21626
|
-
const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
|
|
21627
|
-
return vue.createVNode("div", vue.mergeProps({
|
|
21628
|
-
"class": ['v-otp-input', {
|
|
21629
|
-
'v-otp-input--divided': !!props.divider
|
|
21630
|
-
}, props.class],
|
|
21631
|
-
"style": [props.style]
|
|
21632
|
-
}, rootAttrs), [vue.createVNode("div", {
|
|
21633
|
-
"ref": contentRef,
|
|
21634
|
-
"class": "v-otp-input__content",
|
|
21635
|
-
"style": [dimensionStyles.value]
|
|
21636
|
-
}, [fields.value.map((_, i) => vue.createVNode(vue.Fragment, null, [props.divider && i !== 0 && vue.createVNode("span", {
|
|
21637
|
-
"class": "v-otp-input__divider"
|
|
21638
|
-
}, [props.divider]), vue.createVNode(VField, {
|
|
21639
|
-
"focused": isFocused.value && props.focusAll || focusIndex.value === i,
|
|
21640
|
-
"key": i
|
|
21641
|
-
}, {
|
|
21642
|
-
...slots,
|
|
21643
|
-
default: () => {
|
|
21644
|
-
return vue.createVNode("input", {
|
|
21645
|
-
"ref": val => inputRef.value[i] = val,
|
|
21646
|
-
"aria-label": t(props.label, i + 1),
|
|
21647
|
-
"autofocus": i === 0 && props.autofocus,
|
|
21648
|
-
"autocomplete": "one-time-code",
|
|
21649
|
-
"class": ['v-otp-input__field'],
|
|
21650
|
-
"inputmode": props.type === 'number' ? 'numeric' : 'text',
|
|
21651
|
-
"min": props.type === 'number' ? 0 : undefined,
|
|
21652
|
-
"maxlength": "1",
|
|
21653
|
-
"placeholder": props.placeholder,
|
|
21654
|
-
"type": props.type === 'number' ? 'text' : props.type,
|
|
21655
|
-
"value": model.value[i],
|
|
21656
|
-
"onInput": onInput,
|
|
21657
|
-
"onFocus": e => onFocus(e, i),
|
|
21658
|
-
"onBlur": onBlur,
|
|
21659
|
-
"onKeydown": onKeydown,
|
|
21660
|
-
"onPaste": event => onPaste(i, event)
|
|
21661
|
-
}, null);
|
|
21662
|
-
}
|
|
21663
|
-
})])), vue.createVNode("input", vue.mergeProps({
|
|
21664
|
-
"class": "v-otp-input-input",
|
|
21665
|
-
"type": "hidden"
|
|
21666
|
-
}, inputAttrs, {
|
|
21667
|
-
"value": model.value.join('')
|
|
21668
|
-
}), null), vue.createVNode(VOverlay, {
|
|
21669
|
-
"contained": true,
|
|
21670
|
-
"content-class": "v-otp-input__loader",
|
|
21671
|
-
"model-value": !!props.loading,
|
|
21672
|
-
"persistent": true
|
|
21673
|
-
}, {
|
|
21674
|
-
default: () => [slots.loader?.() ?? vue.createVNode(VProgressCircular, {
|
|
21675
|
-
"color": typeof props.loading === 'boolean' ? undefined : props.loading,
|
|
21676
|
-
"indeterminate": true,
|
|
21677
|
-
"size": "24",
|
|
21678
|
-
"width": "2"
|
|
21679
|
-
}, null)]
|
|
21680
|
-
}), slots.default?.()])]);
|
|
21800
|
+
"style": [scrimStyles.value, scrimColor.backgroundColorStyles.value],
|
|
21801
|
+
"onClick": () => isActive.value = false
|
|
21802
|
+
}, scopeId), null)]
|
|
21803
|
+
})]);
|
|
21681
21804
|
});
|
|
21682
21805
|
return {
|
|
21683
|
-
|
|
21684
|
-
inputRef.value?.some(input => input.blur());
|
|
21685
|
-
},
|
|
21686
|
-
focus: () => {
|
|
21687
|
-
inputRef.value?.[0].focus();
|
|
21688
|
-
},
|
|
21689
|
-
reset,
|
|
21690
|
-
isFocused
|
|
21806
|
+
isStuck
|
|
21691
21807
|
};
|
|
21692
21808
|
}
|
|
21693
21809
|
});
|
|
21694
21810
|
|
|
21695
|
-
//
|
|
21696
|
-
|
|
21697
|
-
|
|
21698
|
-
|
|
21699
|
-
|
|
21700
|
-
|
|
21701
|
-
|
|
21702
|
-
|
|
21703
|
-
|
|
21811
|
+
// Composables
|
|
21812
|
+
const VNoSsr = defineComponent({
|
|
21813
|
+
name: 'VNoSsr',
|
|
21814
|
+
setup(_, _ref) {
|
|
21815
|
+
let {
|
|
21816
|
+
slots
|
|
21817
|
+
} = _ref;
|
|
21818
|
+
const show = useHydration();
|
|
21819
|
+
return () => show.value && slots.default?.();
|
|
21704
21820
|
}
|
|
21705
|
-
|
|
21706
|
-
refs,
|
|
21707
|
-
updateRef
|
|
21708
|
-
};
|
|
21709
|
-
}
|
|
21821
|
+
});
|
|
21710
21822
|
|
|
21711
21823
|
// Types
|
|
21712
21824
|
|
|
21713
|
-
const
|
|
21714
|
-
|
|
21715
|
-
|
|
21716
|
-
|
|
21717
|
-
|
|
21718
|
-
|
|
21719
|
-
|
|
21720
|
-
type: Number,
|
|
21721
|
-
default: props => props.start
|
|
21825
|
+
const makeVOtpInputProps = propsFactory({
|
|
21826
|
+
autofocus: Boolean,
|
|
21827
|
+
divider: String,
|
|
21828
|
+
focusAll: Boolean,
|
|
21829
|
+
label: {
|
|
21830
|
+
type: String,
|
|
21831
|
+
default: '$vuetify.input.otp'
|
|
21722
21832
|
},
|
|
21723
|
-
disabled: Boolean,
|
|
21724
21833
|
length: {
|
|
21725
21834
|
type: [Number, String],
|
|
21726
|
-
default:
|
|
21727
|
-
validator: val => val % 1 === 0
|
|
21728
|
-
},
|
|
21729
|
-
totalVisible: [Number, String],
|
|
21730
|
-
firstIcon: {
|
|
21731
|
-
type: IconValue,
|
|
21732
|
-
default: '$first'
|
|
21733
|
-
},
|
|
21734
|
-
prevIcon: {
|
|
21735
|
-
type: IconValue,
|
|
21736
|
-
default: '$prev'
|
|
21737
|
-
},
|
|
21738
|
-
nextIcon: {
|
|
21739
|
-
type: IconValue,
|
|
21740
|
-
default: '$next'
|
|
21741
|
-
},
|
|
21742
|
-
lastIcon: {
|
|
21743
|
-
type: IconValue,
|
|
21744
|
-
default: '$last'
|
|
21745
|
-
},
|
|
21746
|
-
ariaLabel: {
|
|
21747
|
-
type: String,
|
|
21748
|
-
default: '$vuetify.pagination.ariaLabel.root'
|
|
21749
|
-
},
|
|
21750
|
-
pageAriaLabel: {
|
|
21751
|
-
type: String,
|
|
21752
|
-
default: '$vuetify.pagination.ariaLabel.page'
|
|
21753
|
-
},
|
|
21754
|
-
currentPageAriaLabel: {
|
|
21755
|
-
type: String,
|
|
21756
|
-
default: '$vuetify.pagination.ariaLabel.currentPage'
|
|
21757
|
-
},
|
|
21758
|
-
firstAriaLabel: {
|
|
21759
|
-
type: String,
|
|
21760
|
-
default: '$vuetify.pagination.ariaLabel.first'
|
|
21761
|
-
},
|
|
21762
|
-
previousAriaLabel: {
|
|
21763
|
-
type: String,
|
|
21764
|
-
default: '$vuetify.pagination.ariaLabel.previous'
|
|
21765
|
-
},
|
|
21766
|
-
nextAriaLabel: {
|
|
21767
|
-
type: String,
|
|
21768
|
-
default: '$vuetify.pagination.ariaLabel.next'
|
|
21835
|
+
default: 6
|
|
21769
21836
|
},
|
|
21770
|
-
|
|
21771
|
-
type: String,
|
|
21772
|
-
default:
|
|
21837
|
+
modelValue: {
|
|
21838
|
+
type: [Number, String],
|
|
21839
|
+
default: undefined
|
|
21773
21840
|
},
|
|
21774
|
-
|
|
21841
|
+
placeholder: String,
|
|
21842
|
+
type: {
|
|
21775
21843
|
type: String,
|
|
21776
|
-
default: '
|
|
21844
|
+
default: 'number'
|
|
21777
21845
|
},
|
|
21778
|
-
|
|
21779
|
-
...
|
|
21780
|
-
...
|
|
21781
|
-
|
|
21782
|
-
|
|
21783
|
-
|
|
21784
|
-
|
|
21785
|
-
|
|
21786
|
-
|
|
21787
|
-
}),
|
|
21788
|
-
...makeThemeProps(),
|
|
21789
|
-
...makeVariantProps({
|
|
21790
|
-
variant: 'text'
|
|
21791
|
-
})
|
|
21792
|
-
}, 'VPagination');
|
|
21793
|
-
const VPagination = genericComponent()({
|
|
21794
|
-
name: 'VPagination',
|
|
21795
|
-
props: makeVPaginationProps(),
|
|
21846
|
+
...makeDimensionProps(),
|
|
21847
|
+
...makeFocusProps(),
|
|
21848
|
+
...only(makeVFieldProps({
|
|
21849
|
+
variant: 'outlined'
|
|
21850
|
+
}), ['baseColor', 'bgColor', 'class', 'color', 'disabled', 'error', 'loading', 'rounded', 'style', 'theme', 'variant'])
|
|
21851
|
+
}, 'VOtpInput');
|
|
21852
|
+
const VOtpInput = genericComponent()({
|
|
21853
|
+
name: 'VOtpInput',
|
|
21854
|
+
props: makeVOtpInputProps(),
|
|
21796
21855
|
emits: {
|
|
21797
|
-
|
|
21798
|
-
|
|
21799
|
-
|
|
21800
|
-
next: value => true,
|
|
21801
|
-
last: value => true
|
|
21856
|
+
finish: val => true,
|
|
21857
|
+
'update:focused': val => true,
|
|
21858
|
+
'update:modelValue': val => true
|
|
21802
21859
|
},
|
|
21803
21860
|
setup(props, _ref) {
|
|
21804
21861
|
let {
|
|
21805
|
-
|
|
21806
|
-
emit
|
|
21862
|
+
attrs,
|
|
21863
|
+
emit,
|
|
21864
|
+
slots
|
|
21807
21865
|
} = _ref;
|
|
21808
|
-
const page = useProxiedModel(props, 'modelValue');
|
|
21809
|
-
const {
|
|
21810
|
-
t,
|
|
21811
|
-
n
|
|
21812
|
-
} = useLocale();
|
|
21813
|
-
const {
|
|
21814
|
-
isRtl
|
|
21815
|
-
} = useRtl();
|
|
21816
21866
|
const {
|
|
21817
|
-
|
|
21818
|
-
} =
|
|
21867
|
+
dimensionStyles
|
|
21868
|
+
} = useDimension(props);
|
|
21819
21869
|
const {
|
|
21820
|
-
|
|
21821
|
-
|
|
21822
|
-
|
|
21823
|
-
|
|
21824
|
-
|
|
21825
|
-
});
|
|
21870
|
+
isFocused,
|
|
21871
|
+
focus,
|
|
21872
|
+
blur
|
|
21873
|
+
} = useFocus(props);
|
|
21874
|
+
const model = useProxiedModel(props, 'modelValue', '', val => String(val).split(''), val => val.join(''));
|
|
21826
21875
|
const {
|
|
21827
|
-
|
|
21828
|
-
} =
|
|
21829
|
-
|
|
21830
|
-
|
|
21831
|
-
|
|
21832
|
-
|
|
21833
|
-
|
|
21834
|
-
|
|
21835
|
-
|
|
21836
|
-
|
|
21837
|
-
|
|
21838
|
-
|
|
21839
|
-
|
|
21840
|
-
|
|
21841
|
-
const start = vue.computed(() => parseInt(props.start, 10));
|
|
21842
|
-
const totalVisible = vue.computed(() => {
|
|
21843
|
-
if (props.totalVisible) return parseInt(props.totalVisible, 10);else if (maxButtons.value >= 0) return maxButtons.value;
|
|
21844
|
-
return getMax(width.value, 58);
|
|
21845
|
-
});
|
|
21846
|
-
function getMax(totalWidth, itemWidth) {
|
|
21847
|
-
const minButtons = props.showFirstLastPage ? 5 : 3;
|
|
21848
|
-
return Math.max(0, Math.floor(
|
|
21849
|
-
// Round to two decimal places to avoid floating point errors
|
|
21850
|
-
+((totalWidth - itemWidth * minButtons) / itemWidth).toFixed(2)));
|
|
21851
|
-
}
|
|
21852
|
-
const range = vue.computed(() => {
|
|
21853
|
-
if (length.value <= 0 || isNaN(length.value) || length.value > Number.MAX_SAFE_INTEGER) return [];
|
|
21854
|
-
if (totalVisible.value <= 1) return [page.value];
|
|
21855
|
-
if (length.value <= totalVisible.value) {
|
|
21856
|
-
return createRange(length.value, start.value);
|
|
21876
|
+
t
|
|
21877
|
+
} = useLocale();
|
|
21878
|
+
const length = vue.computed(() => Number(props.length));
|
|
21879
|
+
const fields = vue.computed(() => Array(length.value).fill(0));
|
|
21880
|
+
const focusIndex = vue.ref(-1);
|
|
21881
|
+
const contentRef = vue.ref();
|
|
21882
|
+
const inputRef = vue.ref([]);
|
|
21883
|
+
const current = vue.computed(() => inputRef.value[focusIndex.value]);
|
|
21884
|
+
function onInput() {
|
|
21885
|
+
// The maxlength attribute doesn't work for the number type input, so the text type is used.
|
|
21886
|
+
// The following logic simulates the behavior of a number input.
|
|
21887
|
+
if (props.type === 'number' && /[^0-9]/g.test(current.value.value)) {
|
|
21888
|
+
current.value.value = '';
|
|
21889
|
+
return;
|
|
21857
21890
|
}
|
|
21858
|
-
const
|
|
21859
|
-
const
|
|
21860
|
-
|
|
21861
|
-
|
|
21862
|
-
if (
|
|
21863
|
-
|
|
21864
|
-
} else if (
|
|
21865
|
-
|
|
21866
|
-
|
|
21867
|
-
|
|
21868
|
-
|
|
21869
|
-
|
|
21870
|
-
|
|
21871
|
-
|
|
21891
|
+
const array = model.value.slice();
|
|
21892
|
+
const value = current.value.value;
|
|
21893
|
+
array[focusIndex.value] = value;
|
|
21894
|
+
let target = null;
|
|
21895
|
+
if (focusIndex.value > model.value.length) {
|
|
21896
|
+
target = model.value.length + 1;
|
|
21897
|
+
} else if (focusIndex.value + 1 !== length.value) {
|
|
21898
|
+
target = 'next';
|
|
21899
|
+
}
|
|
21900
|
+
model.value = array;
|
|
21901
|
+
if (target) focusChild(contentRef.value, target);
|
|
21902
|
+
}
|
|
21903
|
+
function onKeydown(e) {
|
|
21904
|
+
const array = model.value.slice();
|
|
21905
|
+
const index = focusIndex.value;
|
|
21906
|
+
let target = null;
|
|
21907
|
+
if (!['ArrowLeft', 'ArrowRight', 'Backspace', 'Delete'].includes(e.key)) return;
|
|
21908
|
+
e.preventDefault();
|
|
21909
|
+
if (e.key === 'ArrowLeft') {
|
|
21910
|
+
target = 'prev';
|
|
21911
|
+
} else if (e.key === 'ArrowRight') {
|
|
21912
|
+
target = 'next';
|
|
21913
|
+
} else if (['Backspace', 'Delete'].includes(e.key)) {
|
|
21914
|
+
array[focusIndex.value] = '';
|
|
21915
|
+
model.value = array;
|
|
21916
|
+
if (focusIndex.value > 0 && e.key === 'Backspace') {
|
|
21917
|
+
target = 'prev';
|
|
21918
|
+
} else {
|
|
21919
|
+
requestAnimationFrame(() => {
|
|
21920
|
+
inputRef.value[index]?.select();
|
|
21921
|
+
});
|
|
21922
|
+
}
|
|
21872
21923
|
}
|
|
21873
|
-
|
|
21874
|
-
|
|
21875
|
-
|
|
21876
|
-
|
|
21924
|
+
requestAnimationFrame(() => {
|
|
21925
|
+
if (target != null) {
|
|
21926
|
+
focusChild(contentRef.value, target);
|
|
21927
|
+
}
|
|
21928
|
+
});
|
|
21929
|
+
}
|
|
21930
|
+
function onPaste(index, e) {
|
|
21877
21931
|
e.preventDefault();
|
|
21878
|
-
|
|
21879
|
-
|
|
21932
|
+
e.stopPropagation();
|
|
21933
|
+
model.value = (e?.clipboardData?.getData('Text') ?? '').split('');
|
|
21934
|
+
inputRef.value?.[index].blur();
|
|
21935
|
+
}
|
|
21936
|
+
function reset() {
|
|
21937
|
+
model.value = [];
|
|
21938
|
+
}
|
|
21939
|
+
function onFocus(e, index) {
|
|
21940
|
+
focus();
|
|
21941
|
+
focusIndex.value = index;
|
|
21942
|
+
}
|
|
21943
|
+
function onBlur() {
|
|
21944
|
+
blur();
|
|
21945
|
+
focusIndex.value = -1;
|
|
21880
21946
|
}
|
|
21881
|
-
const {
|
|
21882
|
-
refs,
|
|
21883
|
-
updateRef
|
|
21884
|
-
} = useRefs();
|
|
21885
21947
|
provideDefaults({
|
|
21886
|
-
|
|
21887
|
-
color: vue.
|
|
21888
|
-
|
|
21889
|
-
|
|
21890
|
-
|
|
21891
|
-
|
|
21892
|
-
|
|
21893
|
-
elevation: vue.toRef(props, 'elevation')
|
|
21948
|
+
VField: {
|
|
21949
|
+
color: vue.computed(() => props.color),
|
|
21950
|
+
bgColor: vue.computed(() => props.color),
|
|
21951
|
+
baseColor: vue.computed(() => props.baseColor),
|
|
21952
|
+
disabled: vue.computed(() => props.disabled),
|
|
21953
|
+
error: vue.computed(() => props.error),
|
|
21954
|
+
variant: vue.computed(() => props.variant)
|
|
21894
21955
|
}
|
|
21956
|
+
}, {
|
|
21957
|
+
scoped: true
|
|
21895
21958
|
});
|
|
21896
|
-
|
|
21897
|
-
|
|
21898
|
-
|
|
21899
|
-
|
|
21900
|
-
|
|
21901
|
-
|
|
21902
|
-
|
|
21903
|
-
|
|
21904
|
-
|
|
21905
|
-
ref,
|
|
21906
|
-
ellipsis: true,
|
|
21907
|
-
icon: true,
|
|
21908
|
-
disabled: true
|
|
21909
|
-
}
|
|
21910
|
-
};
|
|
21911
|
-
} else {
|
|
21912
|
-
const isActive = item === page.value;
|
|
21913
|
-
return {
|
|
21914
|
-
isActive,
|
|
21915
|
-
key: item,
|
|
21916
|
-
page: n(item),
|
|
21917
|
-
props: {
|
|
21918
|
-
ref,
|
|
21919
|
-
ellipsis: false,
|
|
21920
|
-
icon: true,
|
|
21921
|
-
disabled: !!props.disabled || +props.length < 2,
|
|
21922
|
-
color: isActive ? props.activeColor : props.color,
|
|
21923
|
-
ariaCurrent: isActive,
|
|
21924
|
-
ariaLabel: t(isActive ? props.currentPageAriaLabel : props.pageAriaLabel, item),
|
|
21925
|
-
onClick: e => setValue(e, item)
|
|
21926
|
-
}
|
|
21927
|
-
};
|
|
21928
|
-
}
|
|
21959
|
+
vue.watch(model, val => {
|
|
21960
|
+
if (val.length === length.value) emit('finish', val.join(''));
|
|
21961
|
+
}, {
|
|
21962
|
+
deep: true
|
|
21963
|
+
});
|
|
21964
|
+
vue.watch(focusIndex, val => {
|
|
21965
|
+
if (val < 0) return;
|
|
21966
|
+
vue.nextTick(() => {
|
|
21967
|
+
inputRef.value[val]?.select();
|
|
21929
21968
|
});
|
|
21930
21969
|
});
|
|
21931
|
-
|
|
21932
|
-
const
|
|
21933
|
-
|
|
21934
|
-
|
|
21935
|
-
|
|
21936
|
-
|
|
21937
|
-
|
|
21938
|
-
|
|
21939
|
-
|
|
21940
|
-
|
|
21941
|
-
|
|
21942
|
-
|
|
21943
|
-
|
|
21944
|
-
|
|
21945
|
-
|
|
21946
|
-
|
|
21947
|
-
|
|
21948
|
-
|
|
21949
|
-
|
|
21950
|
-
|
|
21951
|
-
|
|
21952
|
-
|
|
21953
|
-
|
|
21954
|
-
|
|
21955
|
-
|
|
21956
|
-
|
|
21957
|
-
|
|
21958
|
-
|
|
21959
|
-
|
|
21960
|
-
|
|
21961
|
-
|
|
21962
|
-
|
|
21963
|
-
|
|
21970
|
+
useRender(() => {
|
|
21971
|
+
const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
|
|
21972
|
+
return vue.createVNode("div", vue.mergeProps({
|
|
21973
|
+
"class": ['v-otp-input', {
|
|
21974
|
+
'v-otp-input--divided': !!props.divider
|
|
21975
|
+
}, props.class],
|
|
21976
|
+
"style": [props.style]
|
|
21977
|
+
}, rootAttrs), [vue.createVNode("div", {
|
|
21978
|
+
"ref": contentRef,
|
|
21979
|
+
"class": "v-otp-input__content",
|
|
21980
|
+
"style": [dimensionStyles.value]
|
|
21981
|
+
}, [fields.value.map((_, i) => vue.createVNode(vue.Fragment, null, [props.divider && i !== 0 && vue.createVNode("span", {
|
|
21982
|
+
"class": "v-otp-input__divider"
|
|
21983
|
+
}, [props.divider]), vue.createVNode(VField, {
|
|
21984
|
+
"focused": isFocused.value && props.focusAll || focusIndex.value === i,
|
|
21985
|
+
"key": i
|
|
21986
|
+
}, {
|
|
21987
|
+
...slots,
|
|
21988
|
+
default: () => {
|
|
21989
|
+
return vue.createVNode("input", {
|
|
21990
|
+
"ref": val => inputRef.value[i] = val,
|
|
21991
|
+
"aria-label": t(props.label, i + 1),
|
|
21992
|
+
"autofocus": i === 0 && props.autofocus,
|
|
21993
|
+
"autocomplete": "one-time-code",
|
|
21994
|
+
"class": ['v-otp-input__field'],
|
|
21995
|
+
"disabled": props.disabled,
|
|
21996
|
+
"inputmode": props.type === 'number' ? 'numeric' : 'text',
|
|
21997
|
+
"min": props.type === 'number' ? 0 : undefined,
|
|
21998
|
+
"maxlength": "1",
|
|
21999
|
+
"placeholder": props.placeholder,
|
|
22000
|
+
"type": props.type === 'number' ? 'text' : props.type,
|
|
22001
|
+
"value": model.value[i],
|
|
22002
|
+
"onInput": onInput,
|
|
22003
|
+
"onFocus": e => onFocus(e, i),
|
|
22004
|
+
"onBlur": onBlur,
|
|
22005
|
+
"onKeydown": onKeydown,
|
|
22006
|
+
"onPaste": event => onPaste(i, event)
|
|
22007
|
+
}, null);
|
|
22008
|
+
}
|
|
22009
|
+
})])), vue.createVNode("input", vue.mergeProps({
|
|
22010
|
+
"class": "v-otp-input-input",
|
|
22011
|
+
"type": "hidden"
|
|
22012
|
+
}, inputAttrs, {
|
|
22013
|
+
"value": model.value.join('')
|
|
22014
|
+
}), null), vue.createVNode(VOverlay, {
|
|
22015
|
+
"contained": true,
|
|
22016
|
+
"content-class": "v-otp-input__loader",
|
|
22017
|
+
"model-value": !!props.loading,
|
|
22018
|
+
"persistent": true
|
|
22019
|
+
}, {
|
|
22020
|
+
default: () => [slots.loader?.() ?? vue.createVNode(VProgressCircular, {
|
|
22021
|
+
"color": typeof props.loading === 'boolean' ? undefined : props.loading,
|
|
22022
|
+
"indeterminate": true,
|
|
22023
|
+
"size": "24",
|
|
22024
|
+
"width": "2"
|
|
22025
|
+
}, null)]
|
|
22026
|
+
}), slots.default?.()])]);
|
|
21964
22027
|
});
|
|
21965
|
-
|
|
21966
|
-
|
|
21967
|
-
|
|
21968
|
-
|
|
21969
|
-
|
|
21970
|
-
|
|
21971
|
-
|
|
21972
|
-
|
|
21973
|
-
|
|
21974
|
-
|
|
21975
|
-
vue.nextTick(updateFocus);
|
|
21976
|
-
}
|
|
21977
|
-
}
|
|
21978
|
-
useRender(() => vue.createVNode(props.tag, {
|
|
21979
|
-
"ref": resizeRef,
|
|
21980
|
-
"class": ['v-pagination', themeClasses.value, props.class],
|
|
21981
|
-
"style": props.style,
|
|
21982
|
-
"role": "navigation",
|
|
21983
|
-
"aria-label": t(props.ariaLabel),
|
|
21984
|
-
"onKeydown": onKeydown,
|
|
21985
|
-
"data-test": "v-pagination-root"
|
|
21986
|
-
}, {
|
|
21987
|
-
default: () => [vue.createVNode("ul", {
|
|
21988
|
-
"class": "v-pagination__list"
|
|
21989
|
-
}, [props.showFirstLastPage && vue.createVNode("li", {
|
|
21990
|
-
"key": "first",
|
|
21991
|
-
"class": "v-pagination__first",
|
|
21992
|
-
"data-test": "v-pagination-first"
|
|
21993
|
-
}, [slots.first ? slots.first(controls.value.first) : vue.createVNode(VBtn, vue.mergeProps({
|
|
21994
|
-
"_as": "VPaginationBtn"
|
|
21995
|
-
}, controls.value.first), null)]), vue.createVNode("li", {
|
|
21996
|
-
"key": "prev",
|
|
21997
|
-
"class": "v-pagination__prev",
|
|
21998
|
-
"data-test": "v-pagination-prev"
|
|
21999
|
-
}, [slots.prev ? slots.prev(controls.value.prev) : vue.createVNode(VBtn, vue.mergeProps({
|
|
22000
|
-
"_as": "VPaginationBtn"
|
|
22001
|
-
}, controls.value.prev), null)]), items.value.map((item, index) => vue.createVNode("li", {
|
|
22002
|
-
"key": item.key,
|
|
22003
|
-
"class": ['v-pagination__item', {
|
|
22004
|
-
'v-pagination__item--is-active': item.isActive
|
|
22005
|
-
}],
|
|
22006
|
-
"data-test": "v-pagination-item"
|
|
22007
|
-
}, [slots.item ? slots.item(item) : vue.createVNode(VBtn, vue.mergeProps({
|
|
22008
|
-
"_as": "VPaginationBtn"
|
|
22009
|
-
}, item.props), {
|
|
22010
|
-
default: () => [item.page]
|
|
22011
|
-
})])), vue.createVNode("li", {
|
|
22012
|
-
"key": "next",
|
|
22013
|
-
"class": "v-pagination__next",
|
|
22014
|
-
"data-test": "v-pagination-next"
|
|
22015
|
-
}, [slots.next ? slots.next(controls.value.next) : vue.createVNode(VBtn, vue.mergeProps({
|
|
22016
|
-
"_as": "VPaginationBtn"
|
|
22017
|
-
}, controls.value.next), null)]), props.showFirstLastPage && vue.createVNode("li", {
|
|
22018
|
-
"key": "last",
|
|
22019
|
-
"class": "v-pagination__last",
|
|
22020
|
-
"data-test": "v-pagination-last"
|
|
22021
|
-
}, [slots.last ? slots.last(controls.value.last) : vue.createVNode(VBtn, vue.mergeProps({
|
|
22022
|
-
"_as": "VPaginationBtn"
|
|
22023
|
-
}, controls.value.last), null)])])]
|
|
22024
|
-
}));
|
|
22025
|
-
return {};
|
|
22028
|
+
return {
|
|
22029
|
+
blur: () => {
|
|
22030
|
+
inputRef.value?.some(input => input.blur());
|
|
22031
|
+
},
|
|
22032
|
+
focus: () => {
|
|
22033
|
+
inputRef.value?.[0].focus();
|
|
22034
|
+
},
|
|
22035
|
+
reset,
|
|
22036
|
+
isFocused
|
|
22037
|
+
};
|
|
22026
22038
|
}
|
|
22027
22039
|
});
|
|
22028
22040
|
|
|
@@ -23084,7 +23096,7 @@
|
|
|
23084
23096
|
"class": ['v-slide-group__prev', {
|
|
23085
23097
|
'v-slide-group__prev--disabled': !hasPrev.value
|
|
23086
23098
|
}],
|
|
23087
|
-
"onClick": () => scrollTo('prev')
|
|
23099
|
+
"onClick": () => hasPrev.value && scrollTo('prev')
|
|
23088
23100
|
}, [slots.prev?.(slotProps.value) ?? vue.createVNode(VFadeTransition, null, {
|
|
23089
23101
|
default: () => [vue.createVNode(VIcon, {
|
|
23090
23102
|
"icon": isRtl.value ? props.nextIcon : props.prevIcon
|
|
@@ -23109,7 +23121,7 @@
|
|
|
23109
23121
|
"class": ['v-slide-group__next', {
|
|
23110
23122
|
'v-slide-group__next--disabled': !hasNext.value
|
|
23111
23123
|
}],
|
|
23112
|
-
"onClick": () => scrollTo('next')
|
|
23124
|
+
"onClick": () => hasNext.value && scrollTo('next')
|
|
23113
23125
|
}, [slots.next?.(slotProps.value) ?? vue.createVNode(VFadeTransition, null, {
|
|
23114
23126
|
default: () => [vue.createVNode(VIcon, {
|
|
23115
23127
|
"icon": isRtl.value ? props.prevIcon : props.nextIcon
|
|
@@ -24002,11 +24014,12 @@
|
|
|
24002
24014
|
"maxWidth": props.fixed ? 300 : undefined,
|
|
24003
24015
|
"onGroup:selected": updateSlider
|
|
24004
24016
|
}), {
|
|
24005
|
-
|
|
24017
|
+
...slots,
|
|
24018
|
+
default: () => vue.createVNode(vue.Fragment, null, [slots.default?.() ?? props.text, !props.hideSlider && vue.createVNode("div", {
|
|
24006
24019
|
"ref": sliderEl,
|
|
24007
24020
|
"class": ['v-tab__slider', sliderColorClasses.value],
|
|
24008
24021
|
"style": sliderColorStyles.value
|
|
24009
|
-
}, null)]
|
|
24022
|
+
}, null)])
|
|
24010
24023
|
});
|
|
24011
24024
|
});
|
|
24012
24025
|
return {};
|
|
@@ -25148,7 +25161,8 @@
|
|
|
25148
25161
|
app.provide(ThemeSymbol, theme);
|
|
25149
25162
|
app.provide(IconSymbol, icons);
|
|
25150
25163
|
app.provide(LocaleSymbol, locale);
|
|
25151
|
-
app.provide(
|
|
25164
|
+
app.provide(DateOptionsSymbol, date.options);
|
|
25165
|
+
app.provide(DateAdapterSymbol, date.instance);
|
|
25152
25166
|
if (IN_BROWSER && options.ssr) {
|
|
25153
25167
|
if (app.$nuxt) {
|
|
25154
25168
|
app.$nuxt.hook('app:suspense:resolve', () => {
|
|
@@ -25194,7 +25208,7 @@
|
|
|
25194
25208
|
date
|
|
25195
25209
|
};
|
|
25196
25210
|
}
|
|
25197
|
-
const version$1 = "3.4.
|
|
25211
|
+
const version$1 = "3.4.3";
|
|
25198
25212
|
createVuetify$1.version = version$1;
|
|
25199
25213
|
|
|
25200
25214
|
// Vue's inject() can only be used in setup
|
|
@@ -25208,7 +25222,7 @@
|
|
|
25208
25222
|
|
|
25209
25223
|
/* eslint-disable local-rules/sort-imports */
|
|
25210
25224
|
|
|
25211
|
-
const version = "3.4.
|
|
25225
|
+
const version = "3.4.3";
|
|
25212
25226
|
|
|
25213
25227
|
/* eslint-disable local-rules/sort-imports */
|
|
25214
25228
|
|