@vuetify/nightly 4.0.0-dev-20230419.0 → 4.0.0-dev-20230421.0

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.
Files changed (121) hide show
  1. package/CHANGELOG.md +7 -2
  2. package/dist/json/attributes.json +172 -108
  3. package/dist/json/importMap.json +34 -34
  4. package/dist/json/tags.json +16 -0
  5. package/dist/json/web-types.json +522 -220
  6. package/dist/vuetify-labs.css +293 -130
  7. package/dist/vuetify-labs.d.ts +620 -171
  8. package/dist/vuetify-labs.esm.js +867 -186
  9. package/dist/vuetify-labs.esm.js.map +1 -1
  10. package/dist/vuetify-labs.js +867 -185
  11. package/dist/vuetify-labs.min.css +2 -2
  12. package/dist/vuetify.css +166 -3
  13. package/dist/vuetify.d.ts +577 -160
  14. package/dist/vuetify.esm.js +809 -138
  15. package/dist/vuetify.esm.js.map +1 -1
  16. package/dist/vuetify.js +809 -137
  17. package/dist/vuetify.js.map +1 -1
  18. package/dist/vuetify.min.css +2 -2
  19. package/dist/vuetify.min.js +802 -736
  20. package/dist/vuetify.min.js.map +1 -1
  21. package/lib/adapters/date-adapter.mjs +2 -0
  22. package/lib/adapters/date-adapter.mjs.map +1 -0
  23. package/lib/adapters/vuetify.mjs +399 -0
  24. package/lib/adapters/vuetify.mjs.map +1 -0
  25. package/lib/blueprints/index.d.ts +34 -0
  26. package/lib/blueprints/md1.d.ts +34 -0
  27. package/lib/blueprints/md2.d.ts +34 -0
  28. package/lib/blueprints/md3.d.ts +34 -0
  29. package/lib/components/VAppBar/VAppBar.mjs +62 -10
  30. package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
  31. package/lib/components/VAppBar/index.d.ts +26 -0
  32. package/lib/components/VAutocomplete/VAutocomplete.css +9 -0
  33. package/lib/components/VAutocomplete/VAutocomplete.mjs +50 -6
  34. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  35. package/lib/components/VAutocomplete/VAutocomplete.sass +10 -0
  36. package/lib/components/VAutocomplete/index.d.ts +29 -17
  37. package/lib/components/VBtn/_mixins.scss +1 -1
  38. package/lib/components/VCard/VCard.mjs.map +1 -1
  39. package/lib/components/VCard/index.d.ts +21 -16
  40. package/lib/components/VCheckbox/VCheckbox.mjs +2 -2
  41. package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
  42. package/lib/components/VCheckbox/index.d.ts +22 -1
  43. package/lib/components/VCombobox/VCombobox.css +1 -1
  44. package/lib/components/VCombobox/VCombobox.mjs +6 -4
  45. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  46. package/lib/components/VCombobox/VCombobox.sass +1 -1
  47. package/lib/components/VCombobox/index.d.ts +29 -17
  48. package/lib/components/VField/index.d.ts +6 -0
  49. package/lib/components/VFileInput/VFileInput.mjs +13 -17
  50. package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
  51. package/lib/components/VFileInput/index.d.ts +68 -23
  52. package/lib/components/VInput/VInput.mjs +14 -7
  53. package/lib/components/VInput/VInput.mjs.map +1 -1
  54. package/lib/components/VInput/index.d.ts +22 -1
  55. package/lib/components/VOverlay/locationStrategies.mjs +9 -4
  56. package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
  57. package/lib/components/VRadioGroup/VRadioGroup.mjs +2 -2
  58. package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
  59. package/lib/components/VRadioGroup/index.d.ts +22 -1
  60. package/lib/components/VRangeSlider/VRangeSlider.mjs +33 -22
  61. package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
  62. package/lib/components/VRangeSlider/index.d.ts +39 -6
  63. package/lib/components/VSelect/VSelect.mjs +6 -0
  64. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  65. package/lib/components/VSelect/index.d.ts +32 -17
  66. package/lib/components/VSlider/VSlider.mjs +33 -15
  67. package/lib/components/VSlider/VSlider.mjs.map +1 -1
  68. package/lib/components/VSlider/index.d.ts +39 -6
  69. package/lib/components/VSlider/slider.mjs +47 -24
  70. package/lib/components/VSlider/slider.mjs.map +1 -1
  71. package/lib/components/VSwitch/VSwitch.mjs +5 -3
  72. package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
  73. package/lib/components/VSwitch/index.d.ts +43 -1
  74. package/lib/components/VTextField/VTextField.mjs +4 -12
  75. package/lib/components/VTextField/VTextField.mjs.map +1 -1
  76. package/lib/components/VTextField/index.d.ts +70 -22
  77. package/lib/components/VTextarea/VTextarea.mjs +4 -12
  78. package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
  79. package/lib/components/VTextarea/index.d.ts +61 -22
  80. package/lib/components/VToolbar/VToolbar.css +3 -1
  81. package/lib/components/VToolbar/VToolbar.sass +3 -1
  82. package/lib/components/VValidation/index.d.ts +10 -1
  83. package/lib/components/index.d.ts +525 -150
  84. package/lib/composables/date.mjs +39 -0
  85. package/lib/composables/date.mjs.map +1 -0
  86. package/lib/composables/focus.mjs +3 -2
  87. package/lib/composables/focus.mjs.map +1 -1
  88. package/lib/composables/index.mjs +1 -0
  89. package/lib/composables/index.mjs.map +1 -1
  90. package/lib/composables/items.mjs +7 -2
  91. package/lib/composables/items.mjs.map +1 -1
  92. package/lib/composables/scroll.mjs +3 -0
  93. package/lib/composables/scroll.mjs.map +1 -1
  94. package/lib/entry-bundler.mjs +1 -1
  95. package/lib/framework.mjs +8 -3
  96. package/lib/framework.mjs.map +1 -1
  97. package/lib/iconsets/mdi-svg.mjs +2 -2
  98. package/lib/iconsets/mdi-svg.mjs.map +1 -1
  99. package/lib/index.d.ts +52 -10
  100. package/lib/labs/VDataTable/VDataTable.mjs +2 -2
  101. package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
  102. package/lib/labs/VDataTable/VDataTableFooter.mjs.map +1 -1
  103. package/lib/labs/VDataTable/VDataTableHeaders.mjs.map +1 -1
  104. package/lib/labs/VDataTable/VDataTableRows.mjs +52 -44
  105. package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
  106. package/lib/labs/VDataTable/VDataTableServer.mjs +2 -1
  107. package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
  108. package/lib/labs/VDataTable/VDataTableVirtual.mjs +0 -1
  109. package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
  110. package/lib/labs/VDataTable/composables/options.mjs +2 -1
  111. package/lib/labs/VDataTable/composables/options.mjs.map +1 -1
  112. package/lib/labs/VDataTable/index.d.ts +44 -11
  113. package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs +1 -0
  114. package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs.map +1 -1
  115. package/lib/labs/VSkeletonLoader/index.d.ts +9 -9
  116. package/lib/labs/components.d.ts +53 -20
  117. package/lib/styles/main.css +152 -0
  118. package/lib/styles/settings/_utilities.scss +11 -1
  119. package/lib/util/helpers.mjs +4 -0
  120. package/lib/util/helpers.mjs.map +1 -1
  121. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v4.0.0-dev-20230419.0
2
+ * Vuetify v4.0.0-dev-20230421.0
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -203,10 +203,6 @@ function clamp(value) {
203
203
  let max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
204
204
  return Math.max(min, Math.min(max, value));
205
205
  }
206
- function getDecimals(value) {
207
- const trimmedStr = value.toString().trim();
208
- return trimmedStr.includes('.') ? trimmedStr.length - trimmedStr.indexOf('.') - 1 : 0;
209
- }
210
206
  function padEnd(str, length) {
211
207
  let char = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '0';
212
208
  return str + char.repeat(Math.max(0, length - str.length));
@@ -3253,6 +3249,98 @@ const VToolbar = genericComponent()({
3253
3249
 
3254
3250
  // Utilities
3255
3251
 
3252
+ // Types
3253
+
3254
+ // Composables
3255
+ const makeScrollProps = propsFactory({
3256
+ scrollTarget: {
3257
+ type: String
3258
+ },
3259
+ scrollThreshold: {
3260
+ type: [String, Number]
3261
+ }
3262
+ }, 'scroll');
3263
+ function useScroll(props) {
3264
+ let args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3265
+ const {
3266
+ thresholdMetCallback,
3267
+ scrollThreshold,
3268
+ canScroll
3269
+ } = args;
3270
+ let previousScroll = 0;
3271
+ const target = ref(null);
3272
+ const currentScroll = ref(0);
3273
+ const savedScroll = ref(0);
3274
+ const currentThreshold = ref(0);
3275
+ const isScrollActive = ref(false);
3276
+ const isScrollingUp = ref(false);
3277
+ const computedScrollThreshold = computed(() => {
3278
+ return Number(props.scrollThreshold ?? scrollThreshold ?? 300);
3279
+ });
3280
+ const onScroll = () => {
3281
+ const targetEl = target.value;
3282
+ if (!targetEl || canScroll && !canScroll.value) return;
3283
+ previousScroll = currentScroll.value;
3284
+ currentScroll.value = 'window' in targetEl ? targetEl.pageYOffset : targetEl.scrollTop;
3285
+ isScrollingUp.value = currentScroll.value < previousScroll;
3286
+ currentThreshold.value = Math.abs(currentScroll.value - computedScrollThreshold.value);
3287
+ };
3288
+ watch(isScrollingUp, () => {
3289
+ savedScroll.value = savedScroll.value || currentScroll.value;
3290
+ });
3291
+ watch(isScrollActive, () => {
3292
+ savedScroll.value = 0;
3293
+ });
3294
+ onMounted(() => {
3295
+ watch(() => props.scrollTarget, scrollTarget => {
3296
+ const newTarget = scrollTarget ? document.querySelector(scrollTarget) : window;
3297
+ if (!newTarget) {
3298
+ consoleWarn(`Unable to locate element with identifier ${scrollTarget}`, getCurrentInstance$1());
3299
+ return;
3300
+ }
3301
+ if (newTarget === target.value) return;
3302
+ target.value?.removeEventListener('scroll', onScroll);
3303
+ target.value = newTarget;
3304
+ target.value.addEventListener('scroll', onScroll, {
3305
+ passive: true
3306
+ });
3307
+ }, {
3308
+ immediate: true
3309
+ });
3310
+ });
3311
+ onBeforeUnmount(() => {
3312
+ target.value?.removeEventListener('scroll', onScroll);
3313
+ });
3314
+ thresholdMetCallback && watch(() => Math.abs(currentScroll.value - savedScroll.value) > computedScrollThreshold.value, thresholdMet => {
3315
+ thresholdMet && thresholdMetCallback({
3316
+ currentThreshold: currentThreshold.value,
3317
+ isScrollingUp: isScrollingUp.value,
3318
+ savedScroll
3319
+ });
3320
+ }, {
3321
+ immediate: true
3322
+ });
3323
+
3324
+ // Do we need this? If yes - seems that
3325
+ // there's no need to expose onScroll
3326
+ canScroll && watch(canScroll, onScroll, {
3327
+ immediate: true
3328
+ });
3329
+ return {
3330
+ computedScrollThreshold,
3331
+ currentScroll,
3332
+ currentThreshold,
3333
+ isScrollActive,
3334
+ // required only for testing
3335
+ // probably can be removed
3336
+ // later (2 chars chlng)
3337
+ isScrollingUp,
3338
+ savedScroll
3339
+ };
3340
+ }
3341
+
3342
+ // Utilities
3343
+
3256
3344
  // Composables
3257
3345
  function useSsrBoot() {
3258
3346
  const isBooted = ref(false);
@@ -3275,13 +3363,7 @@ function useSsrBoot() {
3275
3363
  const VAppBar = genericComponent()({
3276
3364
  name: 'VAppBar',
3277
3365
  props: {
3278
- // TODO: Implement scrolling techniques
3279
- // hideOnScroll: Boolean
3280
- // invertedScroll: Boolean
3281
- // collapseOnScroll: Boolean
3282
- // elevateOnScroll: Boolean
3283
- // shrinkOnScroll: Boolean
3284
- // fadeImageOnScroll: Boolean
3366
+ scrollBehavior: String,
3285
3367
  modelValue: {
3286
3368
  type: Boolean,
3287
3369
  default: true
@@ -3293,6 +3375,7 @@ const VAppBar = genericComponent()({
3293
3375
  },
3294
3376
  ...makeVToolbarProps(),
3295
3377
  ...makeLayoutItemProps(),
3378
+ ...makeScrollProps(),
3296
3379
  height: {
3297
3380
  type: [Number, String],
3298
3381
  default: 64
@@ -3307,11 +3390,63 @@ const VAppBar = genericComponent()({
3307
3390
  } = _ref;
3308
3391
  const vToolbarRef = ref();
3309
3392
  const isActive = useProxiedModel(props, 'modelValue');
3393
+ const scrollBehavior = computed(() => {
3394
+ const behavior = new Set(props.scrollBehavior?.split(' ') ?? []);
3395
+ return {
3396
+ hide: behavior.has('hide'),
3397
+ // fullyHide: behavior.has('fully-hide'),
3398
+ inverted: behavior.has('inverted'),
3399
+ collapse: behavior.has('collapse'),
3400
+ elevate: behavior.has('elevate'),
3401
+ fadeImage: behavior.has('fade-image')
3402
+ // shrink: behavior.has('shrink'),
3403
+ };
3404
+ });
3405
+
3406
+ const canScroll = computed(() => {
3407
+ const behavior = scrollBehavior.value;
3408
+ return behavior.hide ||
3409
+ // behavior.fullyHide ||
3410
+ behavior.inverted || behavior.collapse || behavior.elevate || behavior.fadeImage ||
3411
+ // behavior.shrink ||
3412
+ !isActive.value;
3413
+ });
3414
+ const {
3415
+ currentScroll,
3416
+ currentThreshold,
3417
+ computedScrollThreshold,
3418
+ isScrollingUp
3419
+ } = useScroll(props, {
3420
+ canScroll
3421
+ });
3422
+ const isCollapsed = computed(() => props.collapse || scrollBehavior.value.collapse && (scrollBehavior.value.inverted ? currentScroll.value < 1 : currentScroll.value > 0));
3423
+ const isFlat = computed(() => props.flat || scrollBehavior.value.elevate && currentScroll.value === (scrollBehavior.value.inverted ? 1 : 0));
3424
+ const scrollRatio = computed(() => Math.min((currentThreshold.value - currentScroll.value) / currentThreshold.value || 1, 1));
3425
+ const opacity = computed(() => scrollBehavior.value.fadeImage ? scrollBehavior.value.inverted ? 1 - scrollRatio.value : scrollRatio.value : undefined);
3310
3426
  const height = computed(() => {
3427
+ if (scrollBehavior.value.hide && scrollBehavior.value.inverted) return 0;
3311
3428
  const height = vToolbarRef.value?.contentHeight ?? 0;
3312
3429
  const extensionHeight = vToolbarRef.value?.extensionHeight ?? 0;
3313
3430
  return height + extensionHeight;
3314
3431
  });
3432
+ function setActive() {
3433
+ const val = currentScroll.value;
3434
+ if (scrollBehavior.value.hide) {
3435
+ if (scrollBehavior.value.inverted) {
3436
+ isActive.value = val > computedScrollThreshold.value;
3437
+ } else {
3438
+ isActive.value = isScrollingUp.value || val < computedScrollThreshold.value;
3439
+ }
3440
+ } else if (scrollBehavior.value.inverted) {
3441
+ isActive.value = currentScroll.value === 0;
3442
+ } else {
3443
+ isActive.value = true;
3444
+ }
3445
+ }
3446
+ watch(currentScroll, setActive, {
3447
+ immediate: true
3448
+ });
3449
+ watch(scrollBehavior, setActive);
3315
3450
  const {
3316
3451
  ssrBootStyles
3317
3452
  } = useSsrBoot();
@@ -3322,7 +3457,7 @@ const VAppBar = genericComponent()({
3322
3457
  order: computed(() => parseInt(props.order, 10)),
3323
3458
  position: toRef(props, 'location'),
3324
3459
  layoutSize: height,
3325
- elementSize: height,
3460
+ elementSize: ref(undefined),
3326
3461
  active: isActive,
3327
3462
  absolute: toRef(props, 'absolute')
3328
3463
  });
@@ -3335,10 +3470,14 @@ const VAppBar = genericComponent()({
3335
3470
  }],
3336
3471
  "style": {
3337
3472
  ...layoutItemStyles.value,
3473
+ '--v-toolbar-image-opacity': opacity.value,
3338
3474
  height: undefined,
3339
3475
  ...ssrBootStyles.value
3340
3476
  }
3341
- }, toolbarProps), slots);
3477
+ }, toolbarProps, {
3478
+ "collapse": isCollapsed.value,
3479
+ "flat": isFlat.value
3480
+ }), slots);
3342
3481
  });
3343
3482
  return {};
3344
3483
  }
@@ -5296,7 +5435,8 @@ const VFieldLabel = genericComponent()({
5296
5435
 
5297
5436
  // Composables
5298
5437
  const makeFocusProps = propsFactory({
5299
- focused: Boolean
5438
+ focused: Boolean,
5439
+ 'onUpdate:focused': EventProp()
5300
5440
  }, 'focus');
5301
5441
  function useFocus(props) {
5302
5442
  let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();
@@ -5891,6 +6031,8 @@ const makeVInputProps = propsFactory({
5891
6031
  appendIcon: IconValue,
5892
6032
  prependIcon: IconValue,
5893
6033
  hideDetails: [Boolean, String],
6034
+ hint: String,
6035
+ persistentHint: Boolean,
5894
6036
  messages: {
5895
6037
  type: [Array, String],
5896
6038
  default: () => []
@@ -5954,10 +6096,19 @@ const VInput = genericComponent()({
5954
6096
  resetValidation,
5955
6097
  validate
5956
6098
  }));
6099
+ const messages = computed(() => {
6100
+ if (errorMessages.value.length > 0) {
6101
+ return errorMessages.value;
6102
+ } else if (props.hint && (props.persistentHint || props.focused)) {
6103
+ return props.hint;
6104
+ } else {
6105
+ return props.messages;
6106
+ }
6107
+ });
5957
6108
  useRender(() => {
5958
6109
  const hasPrepend = !!(slots.prepend || props.prependIcon);
5959
6110
  const hasAppend = !!(slots.append || props.appendIcon);
5960
- const hasMessages = !!(props.messages?.length || errorMessages.value.length);
6111
+ const hasMessages = messages.value.length > 0;
5961
6112
  const hasDetails = !props.hideDetails || props.hideDetails === 'auto' && (hasMessages || !!slots.details);
5962
6113
  return createVNode("div", {
5963
6114
  "class": ['v-input', `v-input--${props.direction}`, densityClasses.value, validationClasses.value]
@@ -5980,7 +6131,7 @@ const VInput = genericComponent()({
5980
6131
  }, [createVNode(VMessages, {
5981
6132
  "id": messagesId.value,
5982
6133
  "active": hasMessages,
5983
- "messages": errorMessages.value.length > 0 ? errorMessages.value : props.messages
6134
+ "messages": messages.value
5984
6135
  }, {
5985
6136
  message: slots.message
5986
6137
  }), slots.details?.(slotProps.value)])]);
@@ -5992,10 +6143,6 @@ const VInput = genericComponent()({
5992
6143
  };
5993
6144
  }
5994
6145
  });
5995
- function filterInputProps(props) {
5996
- const keys = Object.keys(VInput.props).filter(k => !isOn(k));
5997
- return pick(props, keys);
5998
- }
5999
6146
 
6000
6147
  const VCounter = genericComponent()({
6001
6148
  name: 'VCounter',
@@ -6121,8 +6268,6 @@ const makeVTextFieldProps = propsFactory({
6121
6268
  autofocus: Boolean,
6122
6269
  counter: [Boolean, Number, String],
6123
6270
  counterValue: Function,
6124
- hint: String,
6125
- persistentHint: Boolean,
6126
6271
  prefix: String,
6127
6272
  placeholder: String,
6128
6273
  persistentPlaceholder: Boolean,
@@ -6177,9 +6322,6 @@ const VTextField = genericComponent()({
6177
6322
  const vFieldRef = ref();
6178
6323
  const inputRef = ref();
6179
6324
  const isActive = computed(() => activeTypes.includes(props.type) || props.persistentPlaceholder || isFocused.value);
6180
- const messages = computed(() => {
6181
- return props.messages.length ? props.messages : isFocused.value || props.persistentHint ? props.hint : '';
6182
- });
6183
6325
  function onFocus() {
6184
6326
  if (inputRef.value !== document.activeElement) {
6185
6327
  inputRef.value?.focus();
@@ -6222,7 +6364,7 @@ const VTextField = genericComponent()({
6222
6364
  const [{
6223
6365
  modelValue: _,
6224
6366
  ...inputProps
6225
- }] = filterInputProps(props);
6367
+ }] = VInput.filterProps(props);
6226
6368
  const [fieldProps] = filterFieldProps(props);
6227
6369
  return createVNode(VInput, mergeProps({
6228
6370
  "ref": vInputRef,
@@ -6232,12 +6374,9 @@ const VTextField = genericComponent()({
6232
6374
  'v-text-field--prefixed': props.prefix,
6233
6375
  'v-text-field--suffixed': props.suffix,
6234
6376
  'v-text-field--flush-details': ['plain', 'underlined'].includes(props.variant)
6235
- }],
6236
- "onClick:prepend": props['onClick:prepend'],
6237
- "onClick:append": props['onClick:append']
6377
+ }]
6238
6378
  }, rootAttrs, inputProps, {
6239
- "focused": isFocused.value,
6240
- "messages": messages.value
6379
+ "focused": isFocused.value
6241
6380
  }), {
6242
6381
  ...slots,
6243
6382
  default: _ref2 => {
@@ -6646,7 +6785,7 @@ const VCheckbox = genericComponent()({
6646
6785
  const id = computed(() => props.id || `checkbox-${uid}`);
6647
6786
  useRender(() => {
6648
6787
  const [inputAttrs, controlAttrs] = filterInputAttrs(attrs);
6649
- const [inputProps, _1] = filterInputProps(props);
6788
+ const [inputProps, _1] = VInput.filterProps(props);
6650
6789
  const [checkboxProps, _2] = VCheckboxBtn.filterProps(props);
6651
6790
  return createVNode(VInput, mergeProps({
6652
6791
  "class": "v-checkbox"
@@ -8058,7 +8197,12 @@ function transformItems$1(props, items) {
8058
8197
  function useItems(props) {
8059
8198
  const items = computed(() => transformItems$1(props, props.items));
8060
8199
  function transformIn(value) {
8061
- return value.map(item => transformItem$1(props, item));
8200
+ return value.map(v => {
8201
+ const existingItem = items.value.find(item => deepEqual(v, item.value));
8202
+ // Nullish existingItem means value is a custom input value from combobox
8203
+ // In this case, use transformItem to create an InternalItem based on value
8204
+ return existingItem ?? transformItem$1(props, v);
8205
+ });
8062
8206
  }
8063
8207
  function transformOut(value) {
8064
8208
  return value.map(_ref => {
@@ -8736,7 +8880,7 @@ function staticLocationStrategy() {
8736
8880
  }
8737
8881
 
8738
8882
  /** Get size of element ignoring max-width/max-height */
8739
- function getIntrinsicSize(el) {
8883
+ function getIntrinsicSize(el, isRtl) {
8740
8884
  // const scrollables = new Map<Element, [number, number]>()
8741
8885
  // el.querySelectorAll('*').forEach(el => {
8742
8886
  // const x = el.scrollLeft
@@ -8753,7 +8897,11 @@ function getIntrinsicSize(el) {
8753
8897
 
8754
8898
  /* eslint-disable-next-line sonarjs/prefer-immediate-return */
8755
8899
  const contentBox = nullifyTransforms(el);
8756
- contentBox.x -= parseFloat(el.style.left || 0);
8900
+ if (isRtl) {
8901
+ contentBox.x += parseFloat(el.style.right || 0);
8902
+ } else {
8903
+ contentBox.x -= parseFloat(el.style.left || 0);
8904
+ }
8757
8905
  contentBox.y -= parseFloat(el.style.top || 0);
8758
8906
 
8759
8907
  // el.style.maxWidth = initialMaxWidth
@@ -8834,7 +8982,7 @@ function connectedLocationStrategy(data, props, contentStyles) {
8834
8982
  });
8835
8983
  if (!data.activatorEl.value || !data.contentEl.value) return;
8836
8984
  const targetBox = data.activatorEl.value.getBoundingClientRect();
8837
- const contentBox = getIntrinsicSize(data.contentEl.value);
8985
+ const contentBox = getIntrinsicSize(data.contentEl.value, data.isRtl.value);
8838
8986
  const scrollParents = getScrollParents(data.contentEl.value);
8839
8987
  const viewportMargin = 12;
8840
8988
  if (!scrollParents.length) {
@@ -9010,7 +9158,8 @@ function connectedLocationStrategy(data, props, contentStyles) {
9010
9158
  transformOrigin: `${placement.origin.side} ${placement.origin.align}`,
9011
9159
  // transform: `translate(${pixelRound(x)}px, ${pixelRound(y)}px)`,
9012
9160
  top: convertToUnit(pixelRound(y)),
9013
- left: convertToUnit(pixelRound(x)),
9161
+ left: data.isRtl.value ? undefined : convertToUnit(pixelRound(x)),
9162
+ right: data.isRtl.value ? convertToUnit(pixelRound(-x)) : undefined,
9014
9163
  minWidth: convertToUnit(axis === 'y' ? Math.min(minWidth.value, targetBox.width) : minWidth.value),
9015
9164
  maxWidth: convertToUnit(pixelCeil(clamp(available.x, minWidth.value === Infinity ? 0 : minWidth.value, maxWidth.value))),
9016
9165
  maxHeight: convertToUnit(pixelCeil(clamp(available.y, minHeight.value === Infinity ? 0 : minHeight.value, maxHeight.value)))
@@ -9905,6 +10054,7 @@ const VSelect = genericComponent()({
9905
10054
  })
9906
10055
  },
9907
10056
  emits: {
10057
+ 'update:focused': focused => true,
9908
10058
  'update:modelValue': val => true,
9909
10059
  'update:menu': val => true
9910
10060
  },
@@ -10021,6 +10171,9 @@ const VSelect = genericComponent()({
10021
10171
  menu.value = false;
10022
10172
  }
10023
10173
  }
10174
+ function onFocusin(e) {
10175
+ isFocused.value = true;
10176
+ }
10024
10177
  function onFocusout(e) {
10025
10178
  if (e.relatedTarget == null) {
10026
10179
  vTextFieldRef.value?.focus();
@@ -10075,6 +10228,7 @@ const VSelect = genericComponent()({
10075
10228
  "selected": selected.value,
10076
10229
  "selectStrategy": props.multiple ? 'independent' : 'single-independent',
10077
10230
  "onMousedown": e => e.preventDefault(),
10231
+ "onFocusin": onFocusin,
10078
10232
  "onFocusout": onFocusout
10079
10233
  }, {
10080
10234
  default: () => [!displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VListItem, {
@@ -10153,6 +10307,7 @@ const VSelect = genericComponent()({
10153
10307
  });
10154
10308
  });
10155
10309
  return forwardRefs({
10310
+ isFocused,
10156
10311
  menu,
10157
10312
  select
10158
10313
  }, vTextFieldRef);
@@ -10291,6 +10446,7 @@ const VAutocomplete = genericComponent()({
10291
10446
  })
10292
10447
  },
10293
10448
  emits: {
10449
+ 'update:focused': focused => true,
10294
10450
  'update:search': val => true,
10295
10451
  'update:modelValue': val => true,
10296
10452
  'update:menu': val => true
@@ -10314,11 +10470,17 @@ const VAutocomplete = genericComponent()({
10314
10470
  _menu.value = v;
10315
10471
  }
10316
10472
  });
10473
+ const selectionIndex = ref(-1);
10474
+ const color = computed(() => vTextFieldRef.value?.color);
10317
10475
  const {
10318
10476
  items,
10319
10477
  transformIn,
10320
10478
  transformOut
10321
10479
  } = useItems(props);
10480
+ const {
10481
+ textColorClasses,
10482
+ textColorStyles
10483
+ } = useTextColor(color);
10322
10484
  const search = useProxiedModel(props, 'search', '');
10323
10485
  const model = useProxiedModel(props, 'modelValue', [], v => transformIn(wrapInArray(v)), v => {
10324
10486
  const transformed = transformOut(v);
@@ -10341,6 +10503,7 @@ const VAutocomplete = genericComponent()({
10341
10503
  return filteredItems.value;
10342
10504
  });
10343
10505
  const selected = computed(() => selections.value.map(selection => selection.props.value));
10506
+ const selection = computed(() => selections.value[selectionIndex.value]);
10344
10507
  const listRef = ref();
10345
10508
  function onClear(e) {
10346
10509
  if (props.openOnClear) {
@@ -10354,7 +10517,9 @@ const VAutocomplete = genericComponent()({
10354
10517
  }
10355
10518
  function onKeydown(e) {
10356
10519
  if (props.readonly || form?.isReadonly.value) return;
10357
- if (['Enter', 'ArrowDown', 'ArrowUp'].includes(e.key)) {
10520
+ const selectionStart = vTextFieldRef.value.selectionStart;
10521
+ const length = selected.value.length;
10522
+ if (selectionIndex.value > -1 || ['Enter', 'ArrowDown', 'ArrowUp'].includes(e.key)) {
10358
10523
  e.preventDefault();
10359
10524
  }
10360
10525
  if (['Enter', 'ArrowDown'].includes(e.key)) {
@@ -10371,6 +10536,38 @@ const VAutocomplete = genericComponent()({
10371
10536
  } else if (e.key === 'ArrowUp') {
10372
10537
  listRef.value?.focus('prev');
10373
10538
  }
10539
+ if (!props.multiple) return;
10540
+ if (['Backspace', 'Delete'].includes(e.key)) {
10541
+ if (selectionIndex.value < 0) {
10542
+ if (e.key === 'Backspace' && !search.value) {
10543
+ selectionIndex.value = length - 1;
10544
+ }
10545
+ return;
10546
+ }
10547
+ const originalSelectionIndex = selectionIndex.value;
10548
+ if (selection.value) select(selection.value);
10549
+ selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
10550
+ }
10551
+ if (e.key === 'ArrowLeft') {
10552
+ if (selectionIndex.value < 0 && selectionStart > 0) return;
10553
+ const prev = selectionIndex.value > -1 ? selectionIndex.value - 1 : length - 1;
10554
+ if (selections.value[prev]) {
10555
+ selectionIndex.value = prev;
10556
+ } else {
10557
+ selectionIndex.value = -1;
10558
+ vTextFieldRef.value.setSelectionRange(search.value?.length, search.value?.length);
10559
+ }
10560
+ }
10561
+ if (e.key === 'ArrowRight') {
10562
+ if (selectionIndex.value < 0) return;
10563
+ const next = selectionIndex.value + 1;
10564
+ if (selections.value[next]) {
10565
+ selectionIndex.value = next;
10566
+ } else {
10567
+ selectionIndex.value = -1;
10568
+ vTextFieldRef.value.setSelectionRange(0, 0);
10569
+ }
10570
+ }
10374
10571
  }
10375
10572
  function onInput(e) {
10376
10573
  search.value = e.target.value;
@@ -10392,7 +10589,6 @@ const VAutocomplete = genericComponent()({
10392
10589
  const index = selected.value.findIndex(selection => props.valueComparator(selection, item.value));
10393
10590
  if (index === -1) {
10394
10591
  model.value = [...model.value, item];
10395
- search.value = '';
10396
10592
  } else {
10397
10593
  const value = [...model.value];
10398
10594
  value.splice(index, 1);
@@ -10437,12 +10633,15 @@ const VAutocomplete = genericComponent()({
10437
10633
  "onUpdate:modelValue": v => {
10438
10634
  if (v == null) model.value = [];
10439
10635
  },
10636
+ "focused": isFocused.value,
10637
+ "onUpdate:focused": $event => isFocused.value = $event,
10440
10638
  "validationValue": model.externalValue,
10441
10639
  "dirty": isDirty,
10442
10640
  "onInput": onInput,
10443
10641
  "class": ['v-autocomplete', {
10444
10642
  'v-autocomplete--active-menu': menu.value,
10445
10643
  'v-autocomplete--chips': !!props.chips,
10644
+ 'v-autocomplete--selecting-index': selectionIndex.value > -1,
10446
10645
  [`v-autocomplete--${props.multiple ? 'multiple' : 'single'}`]: true,
10447
10646
  'v-autocomplete--selection-slot': !!slots.selection
10448
10647
  }],
@@ -10451,8 +10650,6 @@ const VAutocomplete = genericComponent()({
10451
10650
  "placeholder": isDirty ? undefined : props.placeholder,
10452
10651
  "onClick:clear": onClear,
10453
10652
  "onMousedown:control": onMousedownControl,
10454
- "onFocus": () => isFocused.value = true,
10455
- "onBlur": () => isFocused.value = false,
10456
10653
  "onKeydown": onKeydown
10457
10654
  }), {
10458
10655
  ...slots,
@@ -10517,7 +10714,8 @@ const VAutocomplete = genericComponent()({
10517
10714
  };
10518
10715
  return createVNode("div", {
10519
10716
  "key": item.value,
10520
- "class": "v-autocomplete__selection"
10717
+ "class": ['v-autocomplete__selection', index === selectionIndex.value && ['v-autocomplete__selection--selected', textColorClasses.value]],
10718
+ "style": index === selectionIndex.value ? textColorStyles.value : {}
10521
10719
  }, [hasChips ? !slots.chip ? createVNode(VChip, mergeProps({
10522
10720
  "key": "chip",
10523
10721
  "closable": props.closableChips,
@@ -12412,11 +12610,36 @@ const makeSliderProps = propsFactory({
12412
12610
  elevation: 2
12413
12611
  })
12414
12612
  }, 'slider');
12613
+ const useSteps = props => {
12614
+ const min = computed(() => parseFloat(props.min));
12615
+ const max = computed(() => parseFloat(props.max));
12616
+ const step = computed(() => +props.step > 0 ? parseFloat(props.step) : 0);
12617
+ const decimals = computed(() => {
12618
+ const trimmedStep = step.value.toString().trim();
12619
+ return trimmedStep.includes('.') ? trimmedStep.length - trimmedStep.indexOf('.') - 1 : 0;
12620
+ });
12621
+ function roundValue(value) {
12622
+ if (step.value <= 0) return value;
12623
+ const clamped = clamp(value, min.value, max.value);
12624
+ const offset = min.value % step.value;
12625
+ const newValue = Math.round((clamped - offset) / step.value) * step.value + offset;
12626
+ return parseFloat(Math.min(newValue, max.value).toFixed(decimals.value));
12627
+ }
12628
+ return {
12629
+ min,
12630
+ max,
12631
+ step,
12632
+ decimals,
12633
+ roundValue
12634
+ };
12635
+ };
12415
12636
  const useSlider = _ref => {
12416
12637
  let {
12417
12638
  props,
12418
- handleSliderMouseUp,
12419
- handleMouseMove,
12639
+ steps,
12640
+ onSliderStart,
12641
+ onSliderMove,
12642
+ onSliderEnd,
12420
12643
  getActiveThumb
12421
12644
  } = _ref;
12422
12645
  const {
@@ -12430,10 +12653,13 @@ const useSlider = _ref => {
12430
12653
  }
12431
12654
  return hd;
12432
12655
  });
12433
- const min = computed(() => parseFloat(props.min));
12434
- const max = computed(() => parseFloat(props.max));
12435
- const step = computed(() => +props.step > 0 ? parseFloat(props.step) : 0);
12436
- const decimals = computed(() => Math.max(getDecimals(step.value), getDecimals(min.value)));
12656
+ const {
12657
+ min,
12658
+ max,
12659
+ step,
12660
+ decimals,
12661
+ roundValue
12662
+ } = steps;
12437
12663
  const thumbSize = computed(() => parseInt(props.thumbSize, 10));
12438
12664
  const tickSize = computed(() => parseInt(props.tickSize, 10));
12439
12665
  const trackSize = computed(() => parseInt(props.trackSize, 10));
@@ -12447,13 +12673,6 @@ const useSlider = _ref => {
12447
12673
  const startOffset = ref(0);
12448
12674
  const trackContainerRef = ref();
12449
12675
  const activeThumbRef = ref();
12450
- function roundValue(value) {
12451
- if (step.value <= 0) return value;
12452
- const clamped = clamp(value, min.value, max.value);
12453
- const offset = min.value % step.value;
12454
- const newValue = Math.round((clamped - offset) / step.value) * step.value + offset;
12455
- return parseFloat(Math.min(newValue, max.value).toFixed(decimals.value));
12456
- }
12457
12676
  function parseMouseMove(e) {
12458
12677
  const vertical = props.direction === 'vertical';
12459
12678
  const start = vertical ? 'top' : 'left';
@@ -12470,14 +12689,11 @@ const useSlider = _ref => {
12470
12689
  if (vertical || horizontalDirection.value === 'rtl') clickPos = 1 - clickPos;
12471
12690
  return roundValue(min.value + clickPos * (max.value - min.value));
12472
12691
  }
12473
- let thumbMoved = false;
12474
12692
  const handleStop = e => {
12475
- if (!thumbMoved) {
12476
- startOffset.value = 0;
12477
- handleSliderMouseUp(parseMouseMove(e));
12478
- }
12693
+ onSliderEnd({
12694
+ value: parseMouseMove(e)
12695
+ });
12479
12696
  mousePressed.value = false;
12480
- thumbMoved = false;
12481
12697
  startOffset.value = 0;
12482
12698
  };
12483
12699
  const handleStart = e => {
@@ -12486,20 +12702,25 @@ const useSlider = _ref => {
12486
12702
  activeThumbRef.value.focus();
12487
12703
  mousePressed.value = true;
12488
12704
  if (activeThumbRef.value.contains(e.target)) {
12489
- thumbMoved = true;
12490
12705
  startOffset.value = getOffset(e, activeThumbRef.value, props.direction);
12491
12706
  } else {
12492
12707
  startOffset.value = 0;
12493
- handleMouseMove(parseMouseMove(e));
12708
+ onSliderMove({
12709
+ value: parseMouseMove(e)
12710
+ });
12494
12711
  }
12712
+ onSliderStart({
12713
+ value: parseMouseMove(e)
12714
+ });
12495
12715
  };
12496
12716
  const moveListenerOptions = {
12497
12717
  passive: true,
12498
12718
  capture: true
12499
12719
  };
12500
12720
  function onMouseMove(e) {
12501
- thumbMoved = true;
12502
- handleMouseMove(parseMouseMove(e));
12721
+ onSliderMove({
12722
+ value: parseMouseMove(e)
12723
+ });
12503
12724
  }
12504
12725
  function onSliderMouseUp(e) {
12505
12726
  e.stopPropagation();
@@ -12875,13 +13096,21 @@ const VSlider = genericComponent()({
12875
13096
  },
12876
13097
  emits: {
12877
13098
  'update:focused': value => true,
12878
- 'update:modelValue': v => true
13099
+ 'update:modelValue': v => true,
13100
+ start: value => true,
13101
+ end: value => true
12879
13102
  },
12880
13103
  setup(props, _ref) {
12881
13104
  let {
12882
- slots
13105
+ slots,
13106
+ emit
12883
13107
  } = _ref;
12884
13108
  const thumbContainerRef = ref();
13109
+ const steps = useSteps(props);
13110
+ const model = useProxiedModel(props, 'modelValue', undefined, v => {
13111
+ const value = typeof v === 'string' ? parseFloat(v) : v == null ? steps.min.value : v;
13112
+ return steps.roundValue(value);
13113
+ });
12885
13114
  const {
12886
13115
  min,
12887
13116
  max,
@@ -12895,16 +13124,26 @@ const VSlider = genericComponent()({
12895
13124
  readonly
12896
13125
  } = useSlider({
12897
13126
  props,
12898
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
12899
- handleSliderMouseUp: newValue => model.value = roundValue(newValue),
12900
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
12901
- handleMouseMove: newValue => model.value = roundValue(newValue),
13127
+ steps,
13128
+ onSliderStart: () => {
13129
+ emit('start', model.value);
13130
+ },
13131
+ onSliderEnd: _ref2 => {
13132
+ let {
13133
+ value
13134
+ } = _ref2;
13135
+ const roundedValue = roundValue(value);
13136
+ model.value = roundedValue;
13137
+ emit('end', roundedValue);
13138
+ },
13139
+ onSliderMove: _ref3 => {
13140
+ let {
13141
+ value
13142
+ } = _ref3;
13143
+ return model.value = roundValue(value);
13144
+ },
12902
13145
  getActiveThumb: () => thumbContainerRef.value?.$el
12903
13146
  });
12904
- const model = useProxiedModel(props, 'modelValue', undefined, v => {
12905
- const value = typeof v === 'string' ? parseFloat(v) : v == null ? min.value : v;
12906
- return roundValue(value);
12907
- });
12908
13147
  const {
12909
13148
  isFocused,
12910
13149
  focus,
@@ -12912,7 +13151,7 @@ const VSlider = genericComponent()({
12912
13151
  } = useFocus(props);
12913
13152
  const trackStop = computed(() => position(model.value));
12914
13153
  useRender(() => {
12915
- const [inputProps, _] = filterInputProps(props);
13154
+ const [inputProps, _] = VInput.filterProps(props);
12916
13155
  const hasPrepend = !!(props.label || slots.label || slots.prepend);
12917
13156
  return createVNode(VInput, mergeProps({
12918
13157
  "class": ['v-slider', {
@@ -12930,11 +13169,11 @@ const VSlider = genericComponent()({
12930
13169
  "class": "v-slider__label",
12931
13170
  "text": props.label
12932
13171
  }, null) : undefined, slots.prepend?.(slotProps)]) : undefined,
12933
- default: _ref2 => {
13172
+ default: _ref4 => {
12934
13173
  let {
12935
13174
  id,
12936
13175
  messagesId
12937
- } = _ref2;
13176
+ } = _ref4;
12938
13177
  return createVNode("div", {
12939
13178
  "class": "v-slider__container",
12940
13179
  "onMousedown": !readonly.value ? onSliderMousedown : undefined,
@@ -13576,6 +13815,7 @@ const VCombobox = genericComponent()({
13576
13815
  })
13577
13816
  },
13578
13817
  emits: {
13818
+ 'update:focused': focused => true,
13579
13819
  'update:modelValue': val => true,
13580
13820
  'update:search': val => true,
13581
13821
  'update:menu': val => true
@@ -13713,8 +13953,9 @@ const VCombobox = genericComponent()({
13713
13953
  }
13714
13954
  return;
13715
13955
  }
13716
- select(selection.value);
13717
- nextTick(() => !selection.value && (selectionIndex.value = length - 2));
13956
+ const originalSelectionIndex = selectionIndex.value;
13957
+ if (selection.value) select(selection.value);
13958
+ selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
13718
13959
  }
13719
13960
  if (e.key === 'ArrowLeft') {
13720
13961
  if (selectionIndex.value < 0 && selectionStart > 0) return;
@@ -13799,6 +14040,8 @@ const VCombobox = genericComponent()({
13799
14040
  "onUpdate:modelValue": [$event => search.value = $event, v => {
13800
14041
  if (v == null) model.value = [];
13801
14042
  }],
14043
+ "focused": isFocused.value,
14044
+ "onUpdate:focused": $event => isFocused.value = $event,
13802
14045
  "validationValue": model.externalValue,
13803
14046
  "dirty": isDirty,
13804
14047
  "class": ['v-combobox', {
@@ -13812,8 +14055,6 @@ const VCombobox = genericComponent()({
13812
14055
  "placeholder": isDirty ? undefined : props.placeholder,
13813
14056
  "onClick:clear": onClear,
13814
14057
  "onMousedown:control": onMousedownControl,
13815
- "onFocus": () => isFocused.value = true,
13816
- "onBlur": () => isFocused.value = false,
13817
14058
  "onKeydown": onKeydown
13818
14059
  }), {
13819
14060
  ...slots,
@@ -14265,8 +14506,6 @@ const VFileInput = genericComponent()({
14265
14506
  default: '$vuetify.fileInput.counter'
14266
14507
  },
14267
14508
  multiple: Boolean,
14268
- hint: String,
14269
- persistentHint: Boolean,
14270
14509
  showSize: {
14271
14510
  type: [Boolean, Number],
14272
14511
  default: false,
@@ -14291,6 +14530,7 @@ const VFileInput = genericComponent()({
14291
14530
  emits: {
14292
14531
  'click:control': e => true,
14293
14532
  'mousedown:control': e => true,
14533
+ 'update:focused': focused => true,
14294
14534
  'update:modelValue': files => true
14295
14535
  },
14296
14536
  setup(props, _ref) {
@@ -14303,6 +14543,11 @@ const VFileInput = genericComponent()({
14303
14543
  t
14304
14544
  } = useLocale();
14305
14545
  const model = useProxiedModel(props, 'modelValue');
14546
+ const {
14547
+ isFocused,
14548
+ focus,
14549
+ blur
14550
+ } = useFocus(props);
14306
14551
  const base = computed(() => typeof props.showSize !== 'boolean' ? props.showSize : undefined);
14307
14552
  const totalBytes = computed(() => (model.value ?? []).reduce((bytes, _ref2) => {
14308
14553
  let {
@@ -14324,21 +14569,14 @@ const VFileInput = genericComponent()({
14324
14569
  });
14325
14570
  const vInputRef = ref();
14326
14571
  const vFieldRef = ref();
14327
- const isFocused = ref(false);
14328
14572
  const inputRef = ref();
14329
- const messages = computed(() => {
14330
- return props.messages.length ? props.messages : props.persistentHint ? props.hint : '';
14331
- });
14332
14573
  function onFocus() {
14333
14574
  if (inputRef.value !== document.activeElement) {
14334
14575
  inputRef.value?.focus();
14335
14576
  }
14336
- if (!isFocused.value) {
14337
- isFocused.value = true;
14338
- }
14577
+ if (!isFocused.value) focus();
14339
14578
  }
14340
14579
  function onClickPrepend(e) {
14341
- callEvent(props['onClick:prepend'], e);
14342
14580
  onControlClick(e);
14343
14581
  }
14344
14582
  function onControlMousedown(e) {
@@ -14369,18 +14607,16 @@ const VFileInput = genericComponent()({
14369
14607
  const [{
14370
14608
  modelValue: _,
14371
14609
  ...inputProps
14372
- }] = filterInputProps(props);
14610
+ }] = VInput.filterProps(props);
14373
14611
  const [fieldProps] = filterFieldProps(props);
14374
14612
  return createVNode(VInput, mergeProps({
14375
14613
  "ref": vInputRef,
14376
14614
  "modelValue": model.value,
14377
14615
  "onUpdate:modelValue": $event => model.value = $event,
14378
14616
  "class": "v-file-input",
14379
- "onClick:prepend": onClickPrepend,
14380
- "onClick:append": props['onClick:append']
14617
+ "onClick:prepend": onClickPrepend
14381
14618
  }, rootAttrs, inputProps, {
14382
- "focused": isFocused.value,
14383
- "messages": messages.value
14619
+ "focused": isFocused.value
14384
14620
  }), {
14385
14621
  ...slots,
14386
14622
  default: _ref3 => {
@@ -14432,7 +14668,7 @@ const VFileInput = genericComponent()({
14432
14668
  model.value = [...(target.files ?? [])];
14433
14669
  },
14434
14670
  "onFocus": onFocus,
14435
- "onBlur": () => isFocused.value = false
14671
+ "onBlur": blur
14436
14672
  }, slotProps, inputAttrs), null), createVNode("div", {
14437
14673
  "class": fieldClass
14438
14674
  }, [!!model.value?.length && (slots.selection ? slots.selection({
@@ -15123,6 +15359,432 @@ const VMain = genericComponent()({
15123
15359
  }
15124
15360
  });
15125
15361
 
15362
+ // Utilities
15363
+
15364
+ // Types
15365
+
15366
+ function getWeekArray(date) {
15367
+ let currentWeek = [];
15368
+ const weeks = [];
15369
+ const firstDayOfMonth = startOfMonth(date);
15370
+ const lastDayOfMonth = endOfMonth(date);
15371
+ for (let i = 0; i < firstDayOfMonth.getDay(); i++) {
15372
+ currentWeek.push(null);
15373
+ }
15374
+ for (let i = 1; i <= lastDayOfMonth.getDate(); i++) {
15375
+ const day = new Date(date.getFullYear(), date.getMonth(), i);
15376
+
15377
+ // Add the day to the current week
15378
+ currentWeek.push(day);
15379
+
15380
+ // If the current week has 7 days, add it to the weeks array and start a new week
15381
+ if (currentWeek.length === 7) {
15382
+ weeks.push(currentWeek);
15383
+ currentWeek = [];
15384
+ }
15385
+ }
15386
+ for (let i = currentWeek.length; i < 7; i++) {
15387
+ currentWeek.push(null);
15388
+ }
15389
+ weeks.push(currentWeek);
15390
+ return weeks;
15391
+ }
15392
+ function startOfMonth(date) {
15393
+ return new Date(date.getFullYear(), date.getMonth(), 1);
15394
+ }
15395
+ function endOfMonth(date) {
15396
+ return new Date(date.getFullYear(), date.getMonth() + 1, 0);
15397
+ }
15398
+ function date(value) {
15399
+ if (value == null) return null;
15400
+ if (value instanceof Date) return value;
15401
+ if (typeof value === 'string') {
15402
+ const parsed = Date.parse(value);
15403
+ if (!isNaN(parsed)) return new Date(parsed);
15404
+ }
15405
+ return null;
15406
+ }
15407
+ const firstDay = {
15408
+ '001': 1,
15409
+ AD: 1,
15410
+ AE: 6,
15411
+ AF: 6,
15412
+ AG: 0,
15413
+ AI: 1,
15414
+ AL: 1,
15415
+ AM: 1,
15416
+ AN: 1,
15417
+ AR: 1,
15418
+ AS: 0,
15419
+ AT: 1,
15420
+ AU: 0,
15421
+ AX: 1,
15422
+ AZ: 1,
15423
+ BA: 1,
15424
+ BD: 0,
15425
+ BE: 1,
15426
+ BG: 1,
15427
+ BH: 6,
15428
+ BM: 1,
15429
+ BN: 1,
15430
+ BR: 0,
15431
+ BS: 0,
15432
+ BT: 0,
15433
+ BW: 0,
15434
+ BY: 1,
15435
+ BZ: 0,
15436
+ CA: 0,
15437
+ CH: 1,
15438
+ CL: 1,
15439
+ CM: 1,
15440
+ CN: 0,
15441
+ CO: 0,
15442
+ CR: 1,
15443
+ CY: 1,
15444
+ CZ: 1,
15445
+ DE: 1,
15446
+ DJ: 6,
15447
+ DK: 1,
15448
+ DM: 0,
15449
+ DO: 0,
15450
+ DZ: 6,
15451
+ EC: 1,
15452
+ EE: 1,
15453
+ EG: 6,
15454
+ ES: 1,
15455
+ ET: 0,
15456
+ FI: 1,
15457
+ FJ: 1,
15458
+ FO: 1,
15459
+ FR: 1,
15460
+ GB: 1,
15461
+ 'GB-alt-variant': 0,
15462
+ GE: 1,
15463
+ GF: 1,
15464
+ GP: 1,
15465
+ GR: 1,
15466
+ GT: 0,
15467
+ GU: 0,
15468
+ HK: 0,
15469
+ HN: 0,
15470
+ HR: 1,
15471
+ HU: 1,
15472
+ ID: 0,
15473
+ IE: 1,
15474
+ IL: 0,
15475
+ IN: 0,
15476
+ IQ: 6,
15477
+ IR: 6,
15478
+ IS: 1,
15479
+ IT: 1,
15480
+ JM: 0,
15481
+ JO: 6,
15482
+ JP: 0,
15483
+ KE: 0,
15484
+ KG: 1,
15485
+ KH: 0,
15486
+ KR: 0,
15487
+ KW: 6,
15488
+ KZ: 1,
15489
+ LA: 0,
15490
+ LB: 1,
15491
+ LI: 1,
15492
+ LK: 1,
15493
+ LT: 1,
15494
+ LU: 1,
15495
+ LV: 1,
15496
+ LY: 6,
15497
+ MC: 1,
15498
+ MD: 1,
15499
+ ME: 1,
15500
+ MH: 0,
15501
+ MK: 1,
15502
+ MM: 0,
15503
+ MN: 1,
15504
+ MO: 0,
15505
+ MQ: 1,
15506
+ MT: 0,
15507
+ MV: 5,
15508
+ MX: 0,
15509
+ MY: 1,
15510
+ MZ: 0,
15511
+ NI: 0,
15512
+ NL: 1,
15513
+ NO: 1,
15514
+ NP: 0,
15515
+ NZ: 1,
15516
+ OM: 6,
15517
+ PA: 0,
15518
+ PE: 0,
15519
+ PH: 0,
15520
+ PK: 0,
15521
+ PL: 1,
15522
+ PR: 0,
15523
+ PT: 0,
15524
+ PY: 0,
15525
+ QA: 6,
15526
+ RE: 1,
15527
+ RO: 1,
15528
+ RS: 1,
15529
+ RU: 1,
15530
+ SA: 0,
15531
+ SD: 6,
15532
+ SE: 1,
15533
+ SG: 0,
15534
+ SI: 1,
15535
+ SK: 1,
15536
+ SM: 1,
15537
+ SV: 0,
15538
+ SY: 6,
15539
+ TH: 0,
15540
+ TJ: 1,
15541
+ TM: 1,
15542
+ TR: 1,
15543
+ TT: 0,
15544
+ TW: 0,
15545
+ UA: 1,
15546
+ UM: 0,
15547
+ US: 0,
15548
+ UY: 1,
15549
+ UZ: 1,
15550
+ VA: 1,
15551
+ VE: 0,
15552
+ VI: 0,
15553
+ VN: 1,
15554
+ WS: 0,
15555
+ XK: 1,
15556
+ YE: 0,
15557
+ ZA: 0,
15558
+ ZW: 0
15559
+ };
15560
+ const sundayJanuarySecond2000 = new Date(2000, 0, 2);
15561
+ function getWeekdays(locale) {
15562
+ const daysFromSunday = firstDay[locale.slice(-2).toUpperCase()];
15563
+ return createRange(7).map(i => {
15564
+ const weekday = new Date(sundayJanuarySecond2000);
15565
+ weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i);
15566
+ return new Intl.DateTimeFormat(locale, {
15567
+ weekday: 'long'
15568
+ }).format(weekday);
15569
+ });
15570
+ }
15571
+ function format(value, formatString, locale) {
15572
+ const date = new Date(value);
15573
+ let options = {};
15574
+ switch (formatString) {
15575
+ case 'fullDateWithWeekday':
15576
+ options = {
15577
+ weekday: 'long',
15578
+ day: 'numeric',
15579
+ month: 'long',
15580
+ year: 'numeric'
15581
+ };
15582
+ break;
15583
+ case 'normalDateWithWeekday':
15584
+ options = {
15585
+ weekday: 'short',
15586
+ day: 'numeric',
15587
+ month: 'short',
15588
+ year: 'numeric'
15589
+ };
15590
+ break;
15591
+ case 'keyboardDate':
15592
+ options = {};
15593
+ break;
15594
+ case 'monthAndDate':
15595
+ options = {
15596
+ month: 'long',
15597
+ day: 'numeric'
15598
+ };
15599
+ break;
15600
+ case 'monthAndYear':
15601
+ options = {
15602
+ month: 'long',
15603
+ year: 'numeric'
15604
+ };
15605
+ break;
15606
+ default:
15607
+ options = {
15608
+ timeZone: 'UTC',
15609
+ timeZoneName: 'short'
15610
+ };
15611
+ }
15612
+ return new Intl.DateTimeFormat(locale, options).format(date);
15613
+ }
15614
+ function addDays(date, amount) {
15615
+ const d = new Date(date);
15616
+ d.setDate(d.getDate() + amount);
15617
+ return d;
15618
+ }
15619
+ function addMonths(date, amount) {
15620
+ const d = new Date(date);
15621
+ d.setMonth(d.getMonth() + amount);
15622
+ return d;
15623
+ }
15624
+ function getYear(date) {
15625
+ return date.getFullYear();
15626
+ }
15627
+ function getMonth(date) {
15628
+ return date.getMonth();
15629
+ }
15630
+ function startOfYear(date) {
15631
+ return new Date(date.getFullYear(), 0, 1);
15632
+ }
15633
+ function endOfYear(date) {
15634
+ return new Date(date.getFullYear(), 11, 31);
15635
+ }
15636
+ function getMondayOfFirstWeekOfYear(year) {
15637
+ return new Date(year, 0, 1);
15638
+ }
15639
+
15640
+ // https://stackoverflow.com/questions/274861/how-do-i-calculate-the-week-number-given-a-date/275024#275024
15641
+ function getWeek(date) {
15642
+ let year = date.getFullYear();
15643
+ let d1w1 = getMondayOfFirstWeekOfYear(year);
15644
+ if (date < d1w1) {
15645
+ year = year - 1;
15646
+ d1w1 = getMondayOfFirstWeekOfYear(year);
15647
+ } else {
15648
+ const tv = getMondayOfFirstWeekOfYear(year + 1);
15649
+ if (date >= tv) {
15650
+ year = year + 1;
15651
+ d1w1 = tv;
15652
+ }
15653
+ }
15654
+ const diffTime = Math.abs(date.getTime() - d1w1.getTime());
15655
+ const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
15656
+ return Math.floor(diffDays / 7) + 1;
15657
+ }
15658
+ function isWithinRange(date, range) {
15659
+ return isAfter(date, range[0]) && isBefore(date, range[1]);
15660
+ }
15661
+ function isValid(date) {
15662
+ const d = new Date(date);
15663
+ return d instanceof Date && !isNaN(d.getTime());
15664
+ }
15665
+ function isAfter(date, comparing) {
15666
+ return date.getTime() > comparing.getTime();
15667
+ }
15668
+ function isBefore(date, comparing) {
15669
+ return date.getTime() < comparing.getTime();
15670
+ }
15671
+ function isEqual(date, comparing) {
15672
+ return date.getTime() === comparing.getTime();
15673
+ }
15674
+ function isSameDay(date, comparing) {
15675
+ return date.getDate() === comparing.getDate() && date.getMonth() === comparing.getMonth() && date.getFullYear() === comparing.getFullYear();
15676
+ }
15677
+ function isSameMonth(date, comparing) {
15678
+ return date.getMonth() === comparing.getMonth() && date.getFullYear() === comparing.getFullYear();
15679
+ }
15680
+ function getDiff(date, comparing, unit) {
15681
+ const d = new Date(date);
15682
+ const c = new Date(comparing);
15683
+ if (unit === 'month') {
15684
+ return d.getMonth() - c.getMonth() + (d.getFullYear() - c.getFullYear()) * 12;
15685
+ }
15686
+ return Math.floor((d.getTime() - c.getTime()) / (1000 * 60 * 60 * 24));
15687
+ }
15688
+ function setYear(date, year) {
15689
+ const d = new Date(date);
15690
+ d.setFullYear(year);
15691
+ return d;
15692
+ }
15693
+ class VuetifyDateAdapter {
15694
+ constructor() {
15695
+ let locale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'en';
15696
+ this.locale = locale;
15697
+ }
15698
+ date(value) {
15699
+ return date(value);
15700
+ }
15701
+ addDays(date, amount) {
15702
+ return addDays(date, amount);
15703
+ }
15704
+ addMonths(date, amount) {
15705
+ return addMonths(date, amount);
15706
+ }
15707
+ getWeekArray(date) {
15708
+ return getWeekArray(date);
15709
+ }
15710
+ startOfMonth(date) {
15711
+ return startOfMonth(date);
15712
+ }
15713
+ endOfMonth(date) {
15714
+ return endOfMonth(date);
15715
+ }
15716
+ format(date, formatString) {
15717
+ return format(date, formatString, this.locale);
15718
+ }
15719
+ isEqual(date, comparing) {
15720
+ return isEqual(date, comparing);
15721
+ }
15722
+ isValid(date) {
15723
+ return isValid(date);
15724
+ }
15725
+ isWithinRange(date, range) {
15726
+ return isWithinRange(date, range);
15727
+ }
15728
+ isAfter(date, comparing) {
15729
+ return isAfter(date, comparing);
15730
+ }
15731
+ isSameDay(date, comparing) {
15732
+ return isSameDay(date, comparing);
15733
+ }
15734
+ isSameMonth(date, comparing) {
15735
+ return isSameMonth(date, comparing);
15736
+ }
15737
+ setYear(date, year) {
15738
+ return setYear(date, year);
15739
+ }
15740
+ getDiff(date, comparing, unit) {
15741
+ return getDiff(date, comparing, unit);
15742
+ }
15743
+ getWeek(date) {
15744
+ return getWeek(date);
15745
+ }
15746
+ getWeekdays() {
15747
+ return getWeekdays(this.locale);
15748
+ }
15749
+ getYear(date) {
15750
+ return getYear(date);
15751
+ }
15752
+ getMonth(date) {
15753
+ return getMonth(date);
15754
+ }
15755
+ startOfYear(date) {
15756
+ return startOfYear(date);
15757
+ }
15758
+ endOfYear(date) {
15759
+ return endOfYear(date);
15760
+ }
15761
+ }
15762
+
15763
+ // Composables
15764
+
15765
+ // Types
15766
+
15767
+ const DateAdapterSymbol = Symbol.for('vuetify:date-adapter');
15768
+ function createDate(options) {
15769
+ return options ?? {
15770
+ adapter: VuetifyDateAdapter
15771
+ };
15772
+ }
15773
+ function useDate(props) {
15774
+ const date = inject$1(DateAdapterSymbol);
15775
+ const locale = useLocale();
15776
+ if (!date) throw new Error('[Vuetify] Could not find injected date');
15777
+
15778
+ // eslint-disable-next-line new-cap
15779
+ const instance = new date.adapter(locale.current.value);
15780
+ watch(locale.current, val => {
15781
+ instance.locale = val;
15782
+ }, {
15783
+ immediate: true
15784
+ });
15785
+ return instance;
15786
+ }
15787
+
15126
15788
  function useSticky(_ref) {
15127
15789
  let {
15128
15790
  rootEl,
@@ -16127,7 +16789,7 @@ const VRadioGroup = genericComponent()({
16127
16789
  const model = useProxiedModel(props, 'modelValue');
16128
16790
  useRender(() => {
16129
16791
  const [inputAttrs, controlAttrs] = filterInputAttrs(attrs);
16130
- const [inputProps, _1] = filterInputProps(props);
16792
+ const [inputProps, _1] = VInput.filterProps(props);
16131
16793
  const [controlProps, _2] = VSelectionControl.filterProps(props);
16132
16794
  const label = slots.label ? slots.label({
16133
16795
  label: props.label,
@@ -16192,11 +16854,14 @@ const VRangeSlider = genericComponent()({
16192
16854
  },
16193
16855
  emits: {
16194
16856
  'update:focused': value => true,
16195
- 'update:modelValue': value => true
16857
+ 'update:modelValue': value => true,
16858
+ end: value => true,
16859
+ start: value => true
16196
16860
  },
16197
16861
  setup(props, _ref) {
16198
16862
  let {
16199
- slots
16863
+ slots,
16864
+ emit
16200
16865
  } = _ref;
16201
16866
  const startThumbRef = ref();
16202
16867
  const stopThumbRef = ref();
@@ -16209,6 +16874,11 @@ const VRangeSlider = genericComponent()({
16209
16874
  const b = Math.abs(stopOffset);
16210
16875
  return a < b || a === b && startOffset < 0 ? startThumbRef.value.$el : stopThumbRef.value.$el;
16211
16876
  }
16877
+ const steps = useSteps(props);
16878
+ const model = useProxiedModel(props, 'modelValue', undefined, arr => {
16879
+ if (!arr?.length) return [0, 0];
16880
+ return arr.map(value => steps.roundValue(value));
16881
+ });
16212
16882
  const {
16213
16883
  activeThumbRef,
16214
16884
  hasLabels,
@@ -16218,34 +16888,37 @@ const VRangeSlider = genericComponent()({
16218
16888
  onSliderMousedown,
16219
16889
  onSliderTouchstart,
16220
16890
  position,
16221
- roundValue,
16222
16891
  trackContainerRef
16223
16892
  } = useSlider({
16224
- /* eslint-disable @typescript-eslint/no-use-before-define */
16225
16893
  props,
16226
- handleSliderMouseUp: newValue => {
16227
- model.value = activeThumbRef.value === startThumbRef.value?.$el ? [newValue, model.value[1]] : [model.value[0], newValue];
16894
+ steps,
16895
+ onSliderStart: () => {
16896
+ emit('start', model.value);
16897
+ },
16898
+ onSliderEnd: _ref2 => {
16899
+ let {
16900
+ value
16901
+ } = _ref2;
16902
+ const newValue = activeThumbRef.value === startThumbRef.value?.$el ? [value, model.value[1]] : [model.value[0], value];
16903
+ model.value = newValue;
16904
+ emit('end', newValue);
16228
16905
  },
16229
- handleMouseMove: newValue => {
16906
+ onSliderMove: _ref3 => {
16907
+ let {
16908
+ value
16909
+ } = _ref3;
16230
16910
  const [start, stop] = model.value;
16231
16911
  if (!props.strict && start === stop && start !== min.value) {
16232
- activeThumbRef.value = newValue > start ? stopThumbRef.value?.$el : startThumbRef.value?.$el;
16912
+ activeThumbRef.value = value > start ? stopThumbRef.value?.$el : startThumbRef.value?.$el;
16233
16913
  activeThumbRef.value?.focus();
16234
16914
  }
16235
16915
  if (activeThumbRef.value === startThumbRef.value?.$el) {
16236
- model.value = [Math.min(newValue, stop), stop];
16916
+ model.value = [Math.min(value, stop), stop];
16237
16917
  } else {
16238
- model.value = [start, Math.max(start, newValue)];
16918
+ model.value = [start, Math.max(start, value)];
16239
16919
  }
16240
16920
  },
16241
16921
  getActiveThumb
16242
- /* eslint-enable @typescript-eslint/no-use-before-define */
16243
- });
16244
-
16245
- const model = useProxiedModel(props, 'modelValue', undefined, arr => {
16246
- // eslint-disable-next-line @typescript-eslint/prefer-optional-chain
16247
- if (!arr || !arr.length) return [0, 0];
16248
- return arr.map(value => roundValue(value));
16249
16922
  });
16250
16923
  const {
16251
16924
  isFocused,
@@ -16255,7 +16928,7 @@ const VRangeSlider = genericComponent()({
16255
16928
  const trackStart = computed(() => position(model.value[0]));
16256
16929
  const trackStop = computed(() => position(model.value[1]));
16257
16930
  useRender(() => {
16258
- const [inputProps, _] = filterInputProps(props);
16931
+ const [inputProps, _] = VInput.filterProps(props);
16259
16932
  const hasPrepend = !!(props.label || slots.label || slots.prepend);
16260
16933
  return createVNode(VInput, mergeProps({
16261
16934
  "class": ['v-slider', 'v-range-slider', {
@@ -16273,11 +16946,11 @@ const VRangeSlider = genericComponent()({
16273
16946
  "class": "v-slider__label",
16274
16947
  "text": props.label
16275
16948
  }, null) : undefined, slots.prepend?.(slotProps)]) : undefined,
16276
- default: _ref2 => {
16949
+ default: _ref4 => {
16277
16950
  let {
16278
16951
  id,
16279
16952
  messagesId
16280
- } = _ref2;
16953
+ } = _ref4;
16281
16954
  return createVNode("div", {
16282
16955
  "class": "v-slider__container",
16283
16956
  "onMousedown": onSliderMousedown,
@@ -17100,10 +17773,12 @@ const VSwitch = genericComponent()({
17100
17773
  }
17101
17774
  useRender(() => {
17102
17775
  const [inputAttrs, controlAttrs] = filterInputAttrs(attrs);
17103
- const [inputProps, _1] = filterInputProps(props);
17776
+ const [inputProps, _1] = VInput.filterProps(props);
17104
17777
  const [controlProps, _2] = VSelectionControl.filterProps(props);
17105
17778
  const control = ref();
17106
- function onClick() {
17779
+ function onClick(e) {
17780
+ e.stopPropagation();
17781
+ e.preventDefault();
17107
17782
  control.value?.input?.click();
17108
17783
  }
17109
17784
  return createVNode(VInput, mergeProps({
@@ -17464,8 +18139,6 @@ const VTextarea = genericComponent()({
17464
18139
  autofocus: Boolean,
17465
18140
  counter: [Boolean, Number, String],
17466
18141
  counterValue: Function,
17467
- hint: String,
17468
- persistentHint: Boolean,
17469
18142
  prefix: String,
17470
18143
  placeholder: String,
17471
18144
  persistentPlaceholder: Boolean,
@@ -17520,9 +18193,6 @@ const VTextarea = genericComponent()({
17520
18193
  const controlHeight = ref('');
17521
18194
  const textareaRef = ref();
17522
18195
  const isActive = computed(() => isFocused.value || props.persistentPlaceholder);
17523
- const messages = computed(() => {
17524
- return props.messages.length ? props.messages : isFocused.value || props.persistentHint ? props.hint : '';
17525
- });
17526
18196
  function onFocus() {
17527
18197
  if (textareaRef.value !== document.activeElement) {
17528
18198
  textareaRef.value?.focus();
@@ -17594,7 +18264,7 @@ const VTextarea = genericComponent()({
17594
18264
  const [{
17595
18265
  modelValue: _,
17596
18266
  ...inputProps
17597
- }] = filterInputProps(props);
18267
+ }] = VInput.filterProps(props);
17598
18268
  const [fieldProps] = filterFieldProps(props);
17599
18269
  return createVNode(VInput, mergeProps({
17600
18270
  "ref": vInputRef,
@@ -17608,12 +18278,9 @@ const VTextarea = genericComponent()({
17608
18278
  'v-textarea--auto-grow': props.autoGrow,
17609
18279
  'v-textarea--no-resize': props.noResize || props.autoGrow,
17610
18280
  'v-text-field--flush-details': ['plain', 'underlined'].includes(props.variant)
17611
- }],
17612
- "onClick:prepend": props['onClick:prepend'],
17613
- "onClick:append": props['onClick:append']
18281
+ }]
17614
18282
  }, rootAttrs, inputProps, {
17615
- "focused": isFocused.value,
17616
- "messages": messages.value
18283
+ "focused": isFocused.value
17617
18284
  }), {
17618
18285
  ...slots,
17619
18286
  default: _ref2 => {
@@ -19095,56 +19762,64 @@ const VDataTableRows = genericComponent()({
19095
19762
  const {
19096
19763
  t
19097
19764
  } = useLocale();
19098
- useRender(() => createVNode(Fragment, null, [props.loading ? slots.loading?.() ?? createVNode(VDataTableRow, {
19099
- "class": "v-data-table-rows-no-data",
19100
- "key": "loading"
19101
- }, {
19102
- default: () => [t(props.loadingText)]
19103
- }) : undefined, !props.loading && !props.items.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VDataTableRow, {
19104
- "class": "v-data-table-rows-no-data",
19105
- "key": "no-data"
19106
- }, {
19107
- default: () => [t(props.noDataText)]
19108
- })), props.items.map((item, index) => {
19109
- if (item.type === 'group-header') {
19110
- return slots['group-header'] ? slots['group-header']({
19765
+ useRender(() => {
19766
+ if (props.loading && slots.loading) {
19767
+ return createVNode("tr", {
19768
+ "class": "v-data-table-rows-no-data",
19769
+ "key": "loading"
19770
+ }, [createVNode("td", {
19771
+ "colspan": columns.value.length
19772
+ }, [slots.loading()])]);
19773
+ }
19774
+ if (!props.loading && !props.items.length && !props.hideNoData && slots['no-data']) {
19775
+ return createVNode("tr", {
19776
+ "class": "v-data-table-rows-no-data",
19777
+ "key": "no-data"
19778
+ }, [createVNode("td", {
19779
+ "colspan": columns.value.length
19780
+ }, [slots['no-data']?.() ?? t(props.noDataText)])]);
19781
+ }
19782
+ return createVNode(Fragment, null, [props.items.map((item, index) => {
19783
+ if (item.type === 'group-header') {
19784
+ return slots['group-header'] ? slots['group-header']({
19785
+ index,
19786
+ item,
19787
+ columns: columns.value,
19788
+ isExpanded,
19789
+ toggleExpand,
19790
+ isSelected,
19791
+ toggleSelect,
19792
+ toggleGroup,
19793
+ isGroupOpen
19794
+ }) : createVNode(VDataTableGroupHeaderRow, {
19795
+ "key": `group-header_${item.id}`,
19796
+ "item": item
19797
+ }, slots);
19798
+ }
19799
+ const slotProps = {
19111
19800
  index,
19112
19801
  item,
19113
19802
  columns: columns.value,
19114
19803
  isExpanded,
19115
19804
  toggleExpand,
19116
19805
  isSelected,
19117
- toggleSelect,
19118
- toggleGroup,
19119
- isGroupOpen
19120
- }) : createVNode(VDataTableGroupHeaderRow, {
19121
- "key": `group-header_${item.id}`,
19806
+ toggleSelect
19807
+ };
19808
+ return createVNode(Fragment, null, [slots.item ? slots.item(slotProps) : createVNode(VDataTableRow, {
19809
+ "key": `item_${item.value}`,
19810
+ "onClick": expandOnClick.value || props['onClick:row'] ? event => {
19811
+ if (expandOnClick.value) {
19812
+ toggleExpand(item);
19813
+ }
19814
+ props['onClick:row']?.(event, {
19815
+ item
19816
+ });
19817
+ } : undefined,
19818
+ "index": index,
19122
19819
  "item": item
19123
- }, slots);
19124
- }
19125
- const slotProps = {
19126
- index,
19127
- item,
19128
- columns: columns.value,
19129
- isExpanded,
19130
- toggleExpand,
19131
- isSelected,
19132
- toggleSelect
19133
- };
19134
- return createVNode(Fragment, null, [slots.item ? slots.item(slotProps) : createVNode(VDataTableRow, {
19135
- "key": `item_${item.value}`,
19136
- "onClick": expandOnClick.value || props['onClick:row'] ? event => {
19137
- if (expandOnClick.value) {
19138
- toggleExpand(item);
19139
- }
19140
- props['onClick:row']?.(event, {
19141
- item
19142
- });
19143
- } : undefined,
19144
- "index": index,
19145
- "item": item
19146
- }, slots), isExpanded(item) && slots['expanded-row']?.(slotProps)]);
19147
- })]));
19820
+ }, slots), isExpanded(item) && slots['expanded-row']?.(slotProps)]);
19821
+ })]);
19822
+ });
19148
19823
  return {};
19149
19824
  }
19150
19825
  });
@@ -19419,7 +20094,8 @@ function useOptions(_ref) {
19419
20094
  page: page.value,
19420
20095
  itemsPerPage: itemsPerPage.value,
19421
20096
  sortBy: sortBy.value,
19422
- groupBy: groupBy.value
20097
+ groupBy: groupBy.value,
20098
+ search: search.value
19423
20099
  }));
19424
20100
 
19425
20101
  // Reset page when searching
@@ -19452,12 +20128,12 @@ const makeVDataTableProps = propsFactory({
19452
20128
  width: [String, Number],
19453
20129
  fixedHeader: Boolean,
19454
20130
  fixedFooter: Boolean,
19455
- 'onClick:row': Function
20131
+ 'onClick:row': Function,
20132
+ search: String
19456
20133
  }, 'v-data-table');
19457
20134
  const VDataTable = genericComponent()({
19458
20135
  name: 'VDataTable',
19459
20136
  props: {
19460
- search: String,
19461
20137
  ...makeVDataTableProps(),
19462
20138
  ...makeDataTableExpandProps(),
19463
20139
  ...makeDataTableGroupProps(),
@@ -19672,7 +20348,6 @@ function useVirtual(props, items) {
19672
20348
  const VDataTableVirtual = genericComponent()({
19673
20349
  name: 'VDataTableVirtual',
19674
20350
  props: {
19675
- search: String,
19676
20351
  ...makeVDataTableProps(),
19677
20352
  ...makeVDataTableProps(),
19678
20353
  ...makeDataTableGroupProps(),
@@ -19911,7 +20586,8 @@ const VDataTableServer = genericComponent()({
19911
20586
  page,
19912
20587
  itemsPerPage,
19913
20588
  sortBy,
19914
- groupBy
20589
+ groupBy,
20590
+ search: toRef(props, 'search')
19915
20591
  });
19916
20592
  provide('v-data-table', {
19917
20593
  toggleSort,
@@ -19971,6 +20647,7 @@ const rootTypes = {
19971
20647
  'date-picker': 'list-item, heading, divider, date-picker-options, date-picker-days, actions',
19972
20648
  'date-picker-options': 'text, avatar@2',
19973
20649
  'date-picker-days': 'avatar@28',
20650
+ divider: 'divider',
19974
20651
  heading: 'heading',
19975
20652
  image: 'image',
19976
20653
  'list-item': 'text',
@@ -20378,6 +21055,7 @@ function createVuetify$1() {
20378
21055
  const theme = createTheme(options.theme);
20379
21056
  const icons = createIcons(options.icons);
20380
21057
  const locale = createLocale(options.locale);
21058
+ const date = createDate(options.date);
20381
21059
  const install = app => {
20382
21060
  for (const key in directives) {
20383
21061
  app.directive(key, directives[key]);
@@ -20398,6 +21076,7 @@ function createVuetify$1() {
20398
21076
  app.provide(ThemeSymbol, theme);
20399
21077
  app.provide(IconSymbol, icons);
20400
21078
  app.provide(LocaleSymbol, locale);
21079
+ app.provide(DateAdapterSymbol, date);
20401
21080
  if (IN_BROWSER && options.ssr) {
20402
21081
  if (app.$nuxt) {
20403
21082
  app.$nuxt.hook('app:suspense:resolve', () => {
@@ -20425,7 +21104,8 @@ function createVuetify$1() {
20425
21104
  display: inject.call(this, DisplaySymbol),
20426
21105
  theme: inject.call(this, ThemeSymbol),
20427
21106
  icons: inject.call(this, IconSymbol),
20428
- locale: inject.call(this, LocaleSymbol)
21107
+ locale: inject.call(this, LocaleSymbol),
21108
+ date: inject.call(this, DateAdapterSymbol)
20429
21109
  });
20430
21110
  }
20431
21111
  }
@@ -20438,10 +21118,11 @@ function createVuetify$1() {
20438
21118
  display,
20439
21119
  theme,
20440
21120
  icons,
20441
- locale
21121
+ locale,
21122
+ date
20442
21123
  };
20443
21124
  }
20444
- const version$1 = "4.0.0-dev-20230419.0";
21125
+ const version$1 = "4.0.0-dev-20230421.0";
20445
21126
  createVuetify$1.version = version$1;
20446
21127
 
20447
21128
  // Vue's inject() can only be used in setup
@@ -20453,7 +21134,7 @@ function inject(key) {
20453
21134
  }
20454
21135
  }
20455
21136
 
20456
- const version = "4.0.0-dev-20230419.0";
21137
+ const version = "4.0.0-dev-20230421.0";
20457
21138
 
20458
21139
  const createVuetify = function () {
20459
21140
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -20464,5 +21145,5 @@ const createVuetify = function () {
20464
21145
  });
20465
21146
  };
20466
21147
 
20467
- export { components, createVuetify, directives, useDisplay, useLayout, useLocale, useRtl, useTheme, version };
21148
+ export { components, createVuetify, directives, useDate, useDisplay, useLayout, useLocale, useRtl, useTheme, version };
20468
21149
  //# sourceMappingURL=vuetify-labs.esm.js.map