vuetify 3.5.11 → 3.5.12

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 (182) hide show
  1. package/dist/_component-variables-labs.sass +2 -1
  2. package/dist/json/attributes.json +243 -19
  3. package/dist/json/importMap-labs.json +22 -10
  4. package/dist/json/importMap.json +124 -124
  5. package/dist/json/tags.json +71 -0
  6. package/dist/json/web-types.json +747 -38
  7. package/dist/vuetify-labs.css +2339 -2089
  8. package/dist/vuetify-labs.d.ts +1117 -154
  9. package/dist/vuetify-labs.esm.js +675 -25
  10. package/dist/vuetify-labs.esm.js.map +1 -1
  11. package/dist/vuetify-labs.js +675 -25
  12. package/dist/vuetify-labs.min.css +2 -2
  13. package/dist/vuetify.css +1661 -1652
  14. package/dist/vuetify.d.ts +321 -192
  15. package/dist/vuetify.esm.js +33 -19
  16. package/dist/vuetify.esm.js.map +1 -1
  17. package/dist/vuetify.js +33 -19
  18. package/dist/vuetify.js.map +1 -1
  19. package/dist/vuetify.min.css +2 -2
  20. package/dist/vuetify.min.js +93 -92
  21. package/dist/vuetify.min.js.map +1 -1
  22. package/lib/components/VAvatar/VAvatar.css +6 -0
  23. package/lib/components/VAvatar/VAvatar.sass +6 -0
  24. package/lib/components/VAvatar/_variables.scss +2 -0
  25. package/lib/components/VCheckbox/index.d.mts +54 -18
  26. package/lib/components/VChip/VChip.css +5 -2
  27. package/lib/components/VChip/VChip.sass +3 -0
  28. package/lib/components/VChip/_variables.scss +2 -2
  29. package/lib/components/VDivider/VDivider.css +1 -1
  30. package/lib/components/VDivider/VDivider.sass +1 -1
  31. package/lib/components/VExpansionPanel/VExpansionPanel.css +3 -3
  32. package/lib/components/VExpansionPanel/VExpansionPanel.sass +2 -2
  33. package/lib/components/VField/VField.css +1 -1
  34. package/lib/components/VField/_variables.scss +1 -1
  35. package/lib/components/VFileInput/index.d.mts +12 -12
  36. package/lib/components/VForm/index.d.mts +42 -42
  37. package/lib/components/VInput/index.d.mts +6 -6
  38. package/lib/components/VRadio/index.d.mts +27 -9
  39. package/lib/components/VRadioGroup/index.d.mts +27 -9
  40. package/lib/components/VSelectionControl/VSelectionControl.mjs +1 -0
  41. package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
  42. package/lib/components/VSelectionControl/index.d.mts +27 -9
  43. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +1 -1
  44. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs.map +1 -1
  45. package/lib/components/VSelectionControlGroup/index.d.mts +27 -9
  46. package/lib/components/VSwitch/index.d.mts +27 -9
  47. package/lib/components/VTextField/index.d.mts +12 -12
  48. package/lib/components/VTextarea/index.d.mts +12 -12
  49. package/lib/components/VValidation/index.d.mts +6 -6
  50. package/lib/components/index.d.mts +279 -153
  51. package/lib/composables/form.mjs.map +1 -1
  52. package/lib/composables/router.mjs +16 -8
  53. package/lib/composables/router.mjs.map +1 -1
  54. package/lib/composables/transition.mjs +5 -2
  55. package/lib/composables/transition.mjs.map +1 -1
  56. package/lib/composables/validation.mjs +5 -4
  57. package/lib/composables/validation.mjs.map +1 -1
  58. package/lib/entry-bundler.mjs +1 -1
  59. package/lib/framework.mjs +1 -1
  60. package/lib/index.d.mts +42 -39
  61. package/lib/labs/VNumberInput/VNumberInput.mjs +4 -4
  62. package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
  63. package/lib/labs/VTimePicker/SelectingTimes.mjs.map +1 -0
  64. package/lib/labs/VTimePicker/VTimePicker.css +8 -0
  65. package/lib/labs/VTimePicker/VTimePicker.mjs +265 -0
  66. package/lib/labs/VTimePicker/VTimePicker.mjs.map +1 -0
  67. package/lib/labs/VTimePicker/VTimePicker.sass +10 -0
  68. package/lib/labs/VTimePicker/VTimePickerClock.css +130 -0
  69. package/lib/labs/VTimePicker/VTimePickerClock.mjs +244 -0
  70. package/lib/labs/VTimePicker/VTimePickerClock.mjs.map +1 -0
  71. package/lib/{components → labs}/VTimePicker/VTimePickerClock.sass +22 -39
  72. package/lib/labs/VTimePicker/VTimePickerControls.css +104 -0
  73. package/lib/labs/VTimePicker/VTimePickerControls.mjs +125 -0
  74. package/lib/labs/VTimePicker/VTimePickerControls.mjs.map +1 -0
  75. package/lib/labs/VTimePicker/VTimePickerControls.sass +102 -0
  76. package/lib/labs/VTimePicker/_variables.scss +34 -0
  77. package/lib/labs/VTimePicker/index.d.mts +848 -0
  78. package/lib/labs/VTimePicker/index.mjs +4 -0
  79. package/lib/labs/VTimePicker/index.mjs.map +1 -0
  80. package/lib/labs/components.d.mts +835 -1
  81. package/lib/labs/components.mjs +1 -0
  82. package/lib/labs/components.mjs.map +1 -1
  83. package/lib/locale/af.mjs +2 -1
  84. package/lib/locale/af.mjs.map +1 -1
  85. package/lib/locale/ar.mjs +2 -1
  86. package/lib/locale/ar.mjs.map +1 -1
  87. package/lib/locale/az.mjs +2 -1
  88. package/lib/locale/az.mjs.map +1 -1
  89. package/lib/locale/bg.mjs +2 -1
  90. package/lib/locale/bg.mjs.map +1 -1
  91. package/lib/locale/ca.mjs +2 -1
  92. package/lib/locale/ca.mjs.map +1 -1
  93. package/lib/locale/ckb.mjs +2 -1
  94. package/lib/locale/ckb.mjs.map +1 -1
  95. package/lib/locale/cs.mjs +2 -1
  96. package/lib/locale/cs.mjs.map +1 -1
  97. package/lib/locale/da.mjs +2 -1
  98. package/lib/locale/da.mjs.map +1 -1
  99. package/lib/locale/de.mjs +2 -1
  100. package/lib/locale/de.mjs.map +1 -1
  101. package/lib/locale/el.mjs +2 -1
  102. package/lib/locale/el.mjs.map +1 -1
  103. package/lib/locale/en.mjs +2 -1
  104. package/lib/locale/en.mjs.map +1 -1
  105. package/lib/locale/es.mjs +2 -1
  106. package/lib/locale/es.mjs.map +1 -1
  107. package/lib/locale/et.mjs +2 -1
  108. package/lib/locale/et.mjs.map +1 -1
  109. package/lib/locale/fa.mjs +2 -1
  110. package/lib/locale/fa.mjs.map +1 -1
  111. package/lib/locale/fi.mjs +2 -1
  112. package/lib/locale/fi.mjs.map +1 -1
  113. package/lib/locale/fr.mjs +2 -1
  114. package/lib/locale/fr.mjs.map +1 -1
  115. package/lib/locale/he.mjs +2 -1
  116. package/lib/locale/he.mjs.map +1 -1
  117. package/lib/locale/hr.mjs +2 -1
  118. package/lib/locale/hr.mjs.map +1 -1
  119. package/lib/locale/hu.mjs +2 -1
  120. package/lib/locale/hu.mjs.map +1 -1
  121. package/lib/locale/id.mjs +2 -1
  122. package/lib/locale/id.mjs.map +1 -1
  123. package/lib/locale/index.d.mts +43 -0
  124. package/lib/locale/it.mjs +2 -1
  125. package/lib/locale/it.mjs.map +1 -1
  126. package/lib/locale/ja.mjs +2 -1
  127. package/lib/locale/ja.mjs.map +1 -1
  128. package/lib/locale/km.mjs +2 -1
  129. package/lib/locale/km.mjs.map +1 -1
  130. package/lib/locale/ko.mjs +2 -1
  131. package/lib/locale/ko.mjs.map +1 -1
  132. package/lib/locale/lt.mjs +2 -1
  133. package/lib/locale/lt.mjs.map +1 -1
  134. package/lib/locale/lv.mjs +2 -1
  135. package/lib/locale/lv.mjs.map +1 -1
  136. package/lib/locale/nl.mjs +2 -1
  137. package/lib/locale/nl.mjs.map +1 -1
  138. package/lib/locale/no.mjs +2 -1
  139. package/lib/locale/no.mjs.map +1 -1
  140. package/lib/locale/pl.mjs +2 -1
  141. package/lib/locale/pl.mjs.map +1 -1
  142. package/lib/locale/pt.mjs +2 -1
  143. package/lib/locale/pt.mjs.map +1 -1
  144. package/lib/locale/ro.mjs +2 -1
  145. package/lib/locale/ro.mjs.map +1 -1
  146. package/lib/locale/ru.mjs +2 -1
  147. package/lib/locale/ru.mjs.map +1 -1
  148. package/lib/locale/sk.mjs +2 -1
  149. package/lib/locale/sk.mjs.map +1 -1
  150. package/lib/locale/sl.mjs +2 -1
  151. package/lib/locale/sl.mjs.map +1 -1
  152. package/lib/locale/sr-Cyrl.mjs +2 -1
  153. package/lib/locale/sr-Cyrl.mjs.map +1 -1
  154. package/lib/locale/sr-Latn.mjs +2 -1
  155. package/lib/locale/sr-Latn.mjs.map +1 -1
  156. package/lib/locale/sv.mjs +2 -1
  157. package/lib/locale/sv.mjs.map +1 -1
  158. package/lib/locale/th.mjs +2 -1
  159. package/lib/locale/th.mjs.map +1 -1
  160. package/lib/locale/tr.mjs +2 -1
  161. package/lib/locale/tr.mjs.map +1 -1
  162. package/lib/locale/uk.mjs +2 -1
  163. package/lib/locale/uk.mjs.map +1 -1
  164. package/lib/locale/vi.mjs +2 -1
  165. package/lib/locale/vi.mjs.map +1 -1
  166. package/lib/locale/zh-Hans.mjs +2 -1
  167. package/lib/locale/zh-Hans.mjs.map +1 -1
  168. package/lib/locale/zh-Hant.mjs +2 -1
  169. package/lib/locale/zh-Hant.mjs.map +1 -1
  170. package/package.json +4 -4
  171. package/lib/components/VTimePicker/SelectingTimes.mjs.map +0 -1
  172. package/lib/components/VTimePicker/VTimePicker.mjs +0 -288
  173. package/lib/components/VTimePicker/VTimePicker.mjs.map +0 -1
  174. package/lib/components/VTimePicker/VTimePickerClock.mjs +0 -251
  175. package/lib/components/VTimePicker/VTimePickerClock.mjs.map +0 -1
  176. package/lib/components/VTimePicker/VTimePickerTitle.mjs +0 -64
  177. package/lib/components/VTimePicker/VTimePickerTitle.mjs.map +0 -1
  178. package/lib/components/VTimePicker/VTimePickerTitle.sass +0 -61
  179. package/lib/components/VTimePicker/_variables.scss +0 -32
  180. package/lib/components/VTimePicker/index.mjs +0 -12
  181. package/lib/components/VTimePicker/index.mjs.map +0 -1
  182. /package/lib/{components → labs}/VTimePicker/SelectingTimes.mjs +0 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.5.11
2
+ * Vuetify v3.5.12
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -313,7 +313,7 @@ function padEnd(str, length) {
313
313
  let char = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '0';
314
314
  return str + char.repeat(Math.max(0, length - str.length));
315
315
  }
316
- function padStart(str, length) {
316
+ function padStart$1(str, length) {
317
317
  let char = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '0';
318
318
  return char.repeat(Math.max(0, length - str.length)) + str;
319
319
  }
@@ -2007,7 +2007,8 @@ var en = {
2007
2007
  },
2008
2008
  timePicker: {
2009
2009
  am: 'AM',
2010
- pm: 'PM'
2010
+ pm: 'PM',
2011
+ title: 'Select Time'
2011
2012
  },
2012
2013
  pagination: {
2013
2014
  ariaLabel: {
@@ -3169,10 +3170,13 @@ const MaybeTransition = (props, _ref) => {
3169
3170
  } = typeof transition === 'object' ? transition : {};
3170
3171
  return h(component, mergeProps(typeof transition === 'string' ? {
3171
3172
  name: disabled ? '' : transition
3172
- } : customProps, typeof transition === 'string' ? {} : {
3173
+ } : customProps, typeof transition === 'string' ? {} : Object.fromEntries(Object.entries({
3173
3174
  disabled,
3174
3175
  group
3175
- }, rest), slots);
3176
+ }).filter(_ref2 => {
3177
+ let [_, v] = _ref2;
3178
+ return v !== undefined;
3179
+ })), rest), slots);
3176
3180
  };
3177
3181
 
3178
3182
  // Utilities
@@ -5083,19 +5087,27 @@ function useLink(props, attrs) {
5083
5087
  href: toRef(props, 'href')
5084
5088
  };
5085
5089
  }
5086
- const link = props.to ? RouterLink.useLink(props) : undefined;
5090
+ // vue-router useLink `to` prop needs to be reactive and useLink will crash if undefined
5091
+ const linkProps = computed(() => ({
5092
+ ...props,
5093
+ to: props.to ? props.to : {}
5094
+ }));
5095
+ const routerLink = RouterLink.useLink(linkProps.value);
5096
+ // Actual link needs to be undefined when to prop is not used
5097
+ const link = computed(() => props.to ? routerLink : undefined);
5087
5098
  const route = useRoute();
5088
5099
  return {
5089
5100
  isLink,
5090
5101
  isClickable,
5091
- route: link?.route,
5092
- navigate: link?.navigate,
5093
- isActive: link && computed(() => {
5094
- if (!props.exact) return link.isActive?.value;
5095
- if (!route.value) return link.isExactActive?.value;
5096
- return link.isExactActive?.value && deepEqual(link.route.value.query, route.value.query);
5102
+ route: link.value?.route,
5103
+ navigate: link.value?.navigate,
5104
+ isActive: computed(() => {
5105
+ if (!link.value) return false;
5106
+ if (!props.exact) return link.value.isActive?.value ?? false;
5107
+ if (!route.value) return link.value.isExactActive?.value ?? false;
5108
+ return link.value.isExactActive?.value && deepEqual(link.value.route.value.query, route.value.query);
5097
5109
  }),
5098
- href: computed(() => props.to ? link?.route.value.href : props.href)
5110
+ href: computed(() => props.to ? link.value?.route.value.href : props.href)
5099
5111
  };
5100
5112
  }
5101
5113
  const makeRouterProps = propsFactory({
@@ -5981,7 +5993,7 @@ const makeSelectionControlGroupProps = propsFactory({
5981
5993
  falseIcon: IconValue,
5982
5994
  trueIcon: IconValue,
5983
5995
  ripple: {
5984
- type: Boolean,
5996
+ type: [Boolean, Object],
5985
5997
  default: true
5986
5998
  },
5987
5999
  multiple: {
@@ -6205,6 +6217,7 @@ const VSelectionControl = genericComponent()({
6205
6217
  "onFocus": onFocus,
6206
6218
  "onInput": onInput,
6207
6219
  "aria-disabled": !!props.disabled,
6220
+ "aria-label": props.label,
6208
6221
  "type": props.type,
6209
6222
  "value": trueValue.value,
6210
6223
  "name": props.name,
@@ -6664,14 +6677,15 @@ function useValidation(props) {
6664
6677
  watch([isValid, errorMessages], () => {
6665
6678
  form?.update(uid.value, isValid.value, errorMessages.value);
6666
6679
  });
6667
- function reset() {
6680
+ async function reset() {
6668
6681
  model.value = null;
6669
- nextTick(resetValidation);
6682
+ await nextTick();
6683
+ await resetValidation();
6670
6684
  }
6671
- function resetValidation() {
6685
+ async function resetValidation() {
6672
6686
  isPristine.value = true;
6673
6687
  if (!validateOn.value.lazy) {
6674
- validate(true);
6688
+ await validate(true);
6675
6689
  } else {
6676
6690
  internalErrorMessages.value = [];
6677
6691
  }
@@ -17507,8 +17521,8 @@ function format(value, formatString, locale, formats) {
17507
17521
  function toISO(adapter, value) {
17508
17522
  const date = adapter.toJsDate(value);
17509
17523
  const year = date.getFullYear();
17510
- const month = padStart(String(date.getMonth() + 1), 2, '0');
17511
- const day = padStart(String(date.getDate()), 2, '0');
17524
+ const month = padStart$1(String(date.getMonth() + 1), 2, '0');
17525
+ const day = padStart$1(String(date.getDate()), 2, '0');
17512
17526
  return `${year}-${month}-${day}`;
17513
17527
  }
17514
17528
  function parseISO(value) {
@@ -26565,17 +26579,17 @@ const VNumberInput = genericComponent()({
26565
26579
  ...slotProps
26566
26580
  }
26567
26581
  } = _ref2;
26568
- return createVNode("input", mergeProps({
26582
+ return withDirectives(createVNode("input", mergeProps({
26569
26583
  "ref": inputRef,
26570
26584
  "type": "number",
26571
- "value": model.value,
26585
+ "onUpdate:modelValue": $event => model.value = $event,
26572
26586
  "class": fieldClass,
26573
26587
  "max": props.max,
26574
26588
  "min": props.min,
26575
26589
  "step": props.step,
26576
26590
  "onFocus": onFocus,
26577
26591
  "onBlur": blur
26578
- }, inputAttrs), null);
26592
+ }, inputAttrs), null), [[vModelText, model.value]]);
26579
26593
  },
26580
26594
  'append-inner': controlVariant.value === 'split' ? () => createVNode("div", {
26581
26595
  "class": "v-number-input__control"
@@ -27105,6 +27119,639 @@ const VSpeedDial = genericComponent()({
27105
27119
 
27106
27120
  // Types
27107
27121
 
27122
+ const makeVTimePickerClockProps = propsFactory({
27123
+ allowedValues: Function,
27124
+ ampm: Boolean,
27125
+ color: String,
27126
+ disabled: Boolean,
27127
+ displayedValue: {
27128
+ default: null
27129
+ },
27130
+ double: Boolean,
27131
+ format: {
27132
+ type: Function,
27133
+ default: val => val
27134
+ },
27135
+ max: {
27136
+ type: Number,
27137
+ required: true
27138
+ },
27139
+ min: {
27140
+ type: Number,
27141
+ required: true
27142
+ },
27143
+ scrollable: Boolean,
27144
+ readonly: Boolean,
27145
+ rotate: {
27146
+ type: Number,
27147
+ default: 0
27148
+ },
27149
+ step: {
27150
+ type: Number,
27151
+ default: 1
27152
+ },
27153
+ modelValue: {
27154
+ type: Number
27155
+ }
27156
+ }, 'VTimePickerClock');
27157
+ const VTimePickerClock = genericComponent()({
27158
+ name: 'VTimePickerClock',
27159
+ props: makeVTimePickerClockProps(),
27160
+ emits: {
27161
+ change: val => val,
27162
+ input: val => val
27163
+ },
27164
+ setup(props, _ref) {
27165
+ let {
27166
+ emit
27167
+ } = _ref;
27168
+ const clockRef = ref(null);
27169
+ const innerClockRef = ref(null);
27170
+ const inputValue = ref(undefined);
27171
+ const isDragging = ref(false);
27172
+ const valueOnMouseDown = ref(null);
27173
+ const valueOnMouseUp = ref(null);
27174
+ const {
27175
+ textColorClasses,
27176
+ textColorStyles
27177
+ } = useTextColor(toRef(props, 'color'));
27178
+ const {
27179
+ backgroundColorClasses,
27180
+ backgroundColorStyles
27181
+ } = useBackgroundColor(toRef(props, 'color'));
27182
+ const count = computed(() => props.max - props.min + 1);
27183
+ const roundCount = computed(() => props.double ? count.value / 2 : count.value);
27184
+ const degreesPerUnit = computed(() => 360 / roundCount.value);
27185
+ const degrees = computed(() => degreesPerUnit.value * Math.PI / 180);
27186
+ const displayedValue = computed(() => props.modelValue == null ? props.min : props.modelValue);
27187
+ const innerRadiusScale = computed(() => 0.62);
27188
+ const genChildren = computed(() => {
27189
+ const children = [];
27190
+ for (let value = props.min; value <= props.max; value = value + props.step) {
27191
+ children.push(value);
27192
+ }
27193
+ return children;
27194
+ });
27195
+ watch(() => props.modelValue, val => {
27196
+ inputValue.value = val;
27197
+ });
27198
+ function update(value) {
27199
+ if (inputValue.value !== value) {
27200
+ inputValue.value = value;
27201
+ }
27202
+ emit('input', value);
27203
+ }
27204
+ function isAllowed(value) {
27205
+ return !props.allowedValues || props.allowedValues(value);
27206
+ }
27207
+ function wheel(e) {
27208
+ e.preventDefault();
27209
+ const delta = Math.sign(-e.deltaY || 1);
27210
+ let value = displayedValue.value;
27211
+ do {
27212
+ value = value + delta;
27213
+ value = (value - props.min + count.value) % count.value + props.min;
27214
+ } while (!isAllowed(value) && value !== displayedValue.value);
27215
+ if (value !== props.displayedValue) {
27216
+ update(value);
27217
+ }
27218
+ }
27219
+ function isInner(value) {
27220
+ return props.double && value - props.min >= roundCount.value;
27221
+ }
27222
+ function handScale(value) {
27223
+ return isInner(value) ? innerRadiusScale.value : 1;
27224
+ }
27225
+ function getPosition(value) {
27226
+ const rotateRadians = props.rotate * Math.PI / 180;
27227
+ return {
27228
+ x: Math.sin((value - props.min) * degrees.value + rotateRadians) * handScale(value),
27229
+ y: -Math.cos((value - props.min) * degrees.value + rotateRadians) * handScale(value)
27230
+ };
27231
+ }
27232
+ function angleToValue(angle, insideClick) {
27233
+ const value = (Math.round(angle / degreesPerUnit.value) + (insideClick ? roundCount.value : 0)) % count.value + props.min;
27234
+
27235
+ // Necessary to fix edge case when selecting left part of the value(s) at 12 o'clock
27236
+ if (angle < 360 - degreesPerUnit.value / 2) return value;
27237
+ return insideClick ? props.max - roundCount.value + 1 : props.min;
27238
+ }
27239
+ function getTransform(i) {
27240
+ const {
27241
+ x,
27242
+ y
27243
+ } = getPosition(i);
27244
+ return {
27245
+ left: `${50 + x * 50}%`,
27246
+ top: `${50 + y * 50}%`
27247
+ };
27248
+ }
27249
+ function euclidean(p0, p1) {
27250
+ const dx = p1.x - p0.x;
27251
+ const dy = p1.y - p0.y;
27252
+ return Math.sqrt(dx * dx + dy * dy);
27253
+ }
27254
+ function angle(center, p1) {
27255
+ const value = 2 * Math.atan2(p1.y - center.y - euclidean(center, p1), p1.x - center.x);
27256
+ return Math.abs(value * 180 / Math.PI);
27257
+ }
27258
+ function setMouseDownValue(value) {
27259
+ if (valueOnMouseDown.value === null) {
27260
+ valueOnMouseDown.value = value;
27261
+ }
27262
+ valueOnMouseUp.value = value;
27263
+ update(value);
27264
+ }
27265
+ function onDragMove(e) {
27266
+ e.preventDefault();
27267
+ if (!isDragging.value && e.type !== 'click' || !clockRef.value) return;
27268
+ const {
27269
+ width,
27270
+ top,
27271
+ left
27272
+ } = clockRef.value?.getBoundingClientRect();
27273
+ const {
27274
+ width: innerWidth
27275
+ } = innerClockRef.value?.getBoundingClientRect() ?? {
27276
+ width: 0
27277
+ };
27278
+ const {
27279
+ clientX,
27280
+ clientY
27281
+ } = 'touches' in e ? e.touches[0] : e;
27282
+ const center = {
27283
+ x: width / 2,
27284
+ y: -width / 2
27285
+ };
27286
+ const coords = {
27287
+ x: clientX - left,
27288
+ y: top - clientY
27289
+ };
27290
+ const handAngle = Math.round(angle(center, coords) - props.rotate + 360) % 360;
27291
+ const insideClick = props.double && euclidean(center, coords) < (innerWidth + innerWidth * innerRadiusScale.value) / 4;
27292
+ const checksCount = Math.ceil(15 / degreesPerUnit.value);
27293
+ let value;
27294
+ for (let i = 0; i < checksCount; i++) {
27295
+ value = angleToValue(handAngle + i * degreesPerUnit.value, insideClick);
27296
+ if (isAllowed(value)) return setMouseDownValue(value);
27297
+ value = angleToValue(handAngle - i * degreesPerUnit.value, insideClick);
27298
+ if (isAllowed(value)) return setMouseDownValue(value);
27299
+ }
27300
+ }
27301
+ function onMouseDown(e) {
27302
+ e.preventDefault();
27303
+ valueOnMouseDown.value = null;
27304
+ valueOnMouseUp.value = null;
27305
+ isDragging.value = true;
27306
+ onDragMove(e);
27307
+ }
27308
+ function onMouseUp(e) {
27309
+ e.stopPropagation();
27310
+ isDragging.value = false;
27311
+ if (valueOnMouseUp.value !== null && isAllowed(valueOnMouseUp.value)) {
27312
+ emit('change', valueOnMouseUp.value);
27313
+ }
27314
+ }
27315
+ useRender(() => {
27316
+ return createVNode("div", {
27317
+ "class": [{
27318
+ 'v-time-picker-clock': true,
27319
+ 'v-time-picker-clock--indeterminate': props.modelValue == null,
27320
+ 'v-time-picker-clock--readonly': props.readonly
27321
+ }],
27322
+ "onMousedown": onMouseDown,
27323
+ "onMouseup": onMouseUp,
27324
+ "onMouseleave": e => isDragging.value && onMouseUp(e),
27325
+ "onTouchstart": onMouseDown,
27326
+ "onTouchend": onMouseUp,
27327
+ "onMousemove": onDragMove,
27328
+ "onTouchmove": onDragMove,
27329
+ "onWheel": e => props.scrollable && wheel(e),
27330
+ "ref": clockRef
27331
+ }, [createVNode("div", {
27332
+ "class": "v-time-picker-clock__inner",
27333
+ "ref": innerClockRef
27334
+ }, [createVNode("div", {
27335
+ "class": [{
27336
+ 'v-time-picker-clock__hand': true,
27337
+ 'v-time-picker-clock__hand--inner': isInner(props.modelValue)
27338
+ }, textColorClasses.value],
27339
+ "style": [{
27340
+ transform: `rotate(${props.rotate + degreesPerUnit.value * (displayedValue.value - props.min)}deg) scaleY(${handScale(displayedValue.value)})`
27341
+ }, textColorStyles.value]
27342
+ }, null), genChildren.value.map(value => {
27343
+ const isActive = value === displayedValue.value;
27344
+ return createVNode("div", {
27345
+ "class": [{
27346
+ 'v-time-picker-clock__item': true,
27347
+ 'v-time-picker-clock__item--active': isActive,
27348
+ 'v-time-picker-clock__item--disabled': props.disabled || !isAllowed(value)
27349
+ }, isActive && backgroundColorClasses.value],
27350
+ "style": [getTransform(value), isActive && backgroundColorStyles.value]
27351
+ }, [createVNode("span", null, [props.format(value)])]);
27352
+ })])]);
27353
+ });
27354
+ }
27355
+ });
27356
+
27357
+ // @ts-nocheck
27358
+ /* eslint-disable */
27359
+
27360
+ const padStart = (string, targetLength, padString) => {
27361
+ targetLength = targetLength >> 0;
27362
+ string = String(string);
27363
+ padString = String(padString);
27364
+ if (string.length > targetLength) {
27365
+ return String(string);
27366
+ }
27367
+ targetLength = targetLength - string.length;
27368
+ if (targetLength > padString.length) {
27369
+ padString += padString.repeat(targetLength / padString.length);
27370
+ }
27371
+ return padString.slice(0, targetLength) + String(string);
27372
+ };
27373
+ var pad = (function (n) {
27374
+ let length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
27375
+ return padStart(n, length, '0');
27376
+ });
27377
+
27378
+ // @ts-nocheck
27379
+ /* eslint-disable */
27380
+ var SelectingTimes = /*#__PURE__*/function (SelectingTimes) {
27381
+ SelectingTimes[SelectingTimes["Hour"] = 1] = "Hour";
27382
+ SelectingTimes[SelectingTimes["Minute"] = 2] = "Minute";
27383
+ SelectingTimes[SelectingTimes["Second"] = 3] = "Second";
27384
+ return SelectingTimes;
27385
+ }(SelectingTimes || {});
27386
+
27387
+ const makeVTimePickerControlsProps = propsFactory({
27388
+ ampm: Boolean,
27389
+ ampmReadonly: Boolean,
27390
+ color: String,
27391
+ disabled: Boolean,
27392
+ hour: Number,
27393
+ minute: Number,
27394
+ second: Number,
27395
+ period: String,
27396
+ readonly: Boolean,
27397
+ useSeconds: Boolean,
27398
+ selecting: Number,
27399
+ value: Number
27400
+ }, 'VTimePickerControls');
27401
+ const VTimePickerControls = genericComponent()({
27402
+ name: 'VTimePickerControls',
27403
+ props: makeVTimePickerControlsProps(),
27404
+ emits: {
27405
+ 'update:period': data => data,
27406
+ 'update:selecting': data => data
27407
+ },
27408
+ setup(props, _ref) {
27409
+ let {
27410
+ emit,
27411
+ slots
27412
+ } = _ref;
27413
+ const {
27414
+ t
27415
+ } = useLocale();
27416
+ useRender(() => {
27417
+ let hour = props.hour;
27418
+ if (props.ampm) {
27419
+ hour = hour ? (hour - 1) % 12 + 1 : 12;
27420
+ }
27421
+ return createVNode("div", {
27422
+ "class": "v-time-picker-controls"
27423
+ }, [createVNode("div", {
27424
+ "class": {
27425
+ 'v-time-picker-controls__time': true,
27426
+ 'v-time-picker-controls__time--with-seconds': props.useSeconds
27427
+ }
27428
+ }, [createVNode(VBtn, {
27429
+ "active": props.selecting === 1,
27430
+ "color": props.selecting === 1 ? props.color : undefined,
27431
+ "variant": "tonal",
27432
+ "class": {
27433
+ 'v-time-picker-controls__time__btn': true,
27434
+ 'v-time-picker-controls__time--with-ampm__btn': props.ampm,
27435
+ 'v-time-picker-controls__time--with-seconds__btn': props.useSeconds
27436
+ },
27437
+ "text": props.hour == null ? '--' : pad(`${hour}`),
27438
+ "onClick": () => emit('update:selecting', SelectingTimes.Hour)
27439
+ }, null), createVNode("span", {
27440
+ "class": ['v-time-picker-controls__time__separator', {
27441
+ 'v-time-picker-controls--with-seconds__time__separator': props.useSeconds
27442
+ }]
27443
+ }, [createTextVNode(":")]), createVNode(VBtn, {
27444
+ "active": props.selecting === 2,
27445
+ "color": props.selecting === 2 ? props.color : undefined,
27446
+ "class": {
27447
+ 'v-time-picker-controls__time__btn': true,
27448
+ 'v-time-picker-controls__time__btn__active': props.selecting === 2,
27449
+ 'v-time-picker-controls__time--with-ampm__btn': props.ampm,
27450
+ 'v-time-picker-controls__time--with-seconds__btn': props.useSeconds
27451
+ },
27452
+ "variant": "tonal",
27453
+ "text": props.minute == null ? '--' : pad(props.minute),
27454
+ "onClick": () => emit('update:selecting', SelectingTimes.Minute)
27455
+ }, null), props.useSeconds && createVNode("span", {
27456
+ "class": ['v-time-picker-controls__time__separator', {
27457
+ 'v-time-picker-controls--with-seconds__time__separator': props.useSeconds
27458
+ }],
27459
+ "key": "secondsDivider"
27460
+ }, [createTextVNode(":")]), props.useSeconds && createVNode(VBtn, {
27461
+ "key": "secondsVal",
27462
+ "variant": "tonal",
27463
+ "onClick": () => emit('update:selecting', SelectingTimes.Second),
27464
+ "class": {
27465
+ 'v-time-picker-controls__time__btn': true,
27466
+ 'v-time-picker-controls__time__btn__active': props.selecting === 3,
27467
+ 'v-time-picker-controls__time--with-seconds__btn': props.useSeconds
27468
+ },
27469
+ "text": props.second == null ? '--' : pad(props.second)
27470
+ }, null), props.ampm && createVNode("div", {
27471
+ "class": ['v-time-picker-controls__ampm', {
27472
+ 'v-time-picker-controls__ampm--readonly': props.ampmReadonly
27473
+ }]
27474
+ }, [createVNode(VBtn, {
27475
+ "active": props.period === 'am',
27476
+ "color": props.period === 'am' ? props.color : undefined,
27477
+ "class": {
27478
+ 'v-time-picker-controls__ampm__am': true,
27479
+ 'v-time-picker-controls__ampm__btn': true,
27480
+ 'v-time-picker-controls__ampm__btn__active': props.period === 'am'
27481
+ },
27482
+ "text": t('$vuetify.timePicker.am'),
27483
+ "variant": "tonal",
27484
+ "onClick": () => props.period !== 'am' ? emit('update:period', 'am') : null
27485
+ }, null), createVNode(VBtn, {
27486
+ "active": props.period === 'pm',
27487
+ "color": props.period === 'pm' ? props.color : undefined,
27488
+ "class": {
27489
+ 'v-time-picker-controls__ampm__pm': true,
27490
+ 'v-time-picker-controls__ampm__btn': true,
27491
+ 'v-time-picker-controls__ampm__btn__active': props.period === 'pm'
27492
+ },
27493
+ "text": t('$vuetify.timePicker.pm'),
27494
+ "variant": "tonal",
27495
+ "onClick": () => props.period !== 'pm' ? emit('update:period', 'pm') : null
27496
+ }, null)])])]);
27497
+ });
27498
+ return {};
27499
+ }
27500
+ });
27501
+
27502
+ // Types
27503
+
27504
+ const rangeHours24 = createRange(24);
27505
+ const rangeHours12am = createRange(12);
27506
+ const rangeHours12pm = rangeHours12am.map(v => v + 12);
27507
+ const range60 = createRange(60);
27508
+ const selectingNames = {
27509
+ 1: 'hour',
27510
+ 2: 'minute',
27511
+ 3: 'second'
27512
+ };
27513
+ const makeVTimePickerProps = propsFactory({
27514
+ allowedHours: [Function, Array],
27515
+ allowedMinutes: [Function, Array],
27516
+ allowedSeconds: [Function, Array],
27517
+ ampmInTitle: Boolean,
27518
+ disabled: Boolean,
27519
+ format: {
27520
+ type: String,
27521
+ default: 'ampm'
27522
+ },
27523
+ max: String,
27524
+ min: String,
27525
+ modelValue: null,
27526
+ readonly: Boolean,
27527
+ scrollable: Boolean,
27528
+ useSeconds: Boolean,
27529
+ ...omit(makeVPickerProps({
27530
+ title: '$vuetify.timePicker.title'
27531
+ }), ['landscape'])
27532
+ }, 'VTimePicker');
27533
+ const VTimePicker = genericComponent()({
27534
+ name: 'VTimePicker',
27535
+ props: makeVTimePickerProps(),
27536
+ emits: {
27537
+ 'update:hour': val => val,
27538
+ 'update:minute': val => val,
27539
+ 'update:period': val => val,
27540
+ 'update:second': val => val,
27541
+ 'update:modelValue': val => val
27542
+ },
27543
+ setup(props, _ref) {
27544
+ let {
27545
+ emit,
27546
+ slots
27547
+ } = _ref;
27548
+ const {
27549
+ t
27550
+ } = useLocale();
27551
+ const inputHour = ref(null);
27552
+ const inputMinute = ref(null);
27553
+ const inputSecond = ref(null);
27554
+ const lazyInputHour = ref(null);
27555
+ const lazyInputMinute = ref(null);
27556
+ const lazyInputSecond = ref(null);
27557
+ const period = ref('am');
27558
+ const selecting = ref(SelectingTimes.Hour);
27559
+ const controlsRef = ref(null);
27560
+ const clockRef = ref(null);
27561
+ const isAllowedHourCb = computed(() => {
27562
+ let cb;
27563
+ if (props.allowedHours instanceof Array) {
27564
+ cb = val => props.allowedHours.includes(val);
27565
+ } else {
27566
+ cb = props.allowedHours;
27567
+ }
27568
+ if (!props.min && !props.max) return cb;
27569
+ const minHour = props.min ? Number(props.min.split(':')[0]) : 0;
27570
+ const maxHour = props.max ? Number(props.max.split(':')[0]) : 23;
27571
+ return val => {
27572
+ return val >= minHour * 1 && val <= maxHour * 1 && (!cb || cb(val));
27573
+ };
27574
+ });
27575
+ const isAllowedMinuteCb = computed(() => {
27576
+ let cb;
27577
+ const isHourAllowed = !isAllowedHourCb.value || inputHour.value === null || isAllowedHourCb.value(inputHour.value);
27578
+ if (props.allowedMinutes instanceof Array) {
27579
+ cb = val => props.allowedMinutes.includes(val);
27580
+ } else {
27581
+ cb = props.allowedMinutes;
27582
+ }
27583
+ if (!props.min && !props.max) {
27584
+ return isHourAllowed ? cb : () => false;
27585
+ }
27586
+ const [minHour, minMinute] = props.min ? props.min.split(':').map(Number) : [0, 0];
27587
+ const [maxHour, maxMinute] = props.max ? props.max.split(':').map(Number) : [23, 59];
27588
+ const minTime = minHour * 60 + minMinute * 1;
27589
+ const maxTime = maxHour * 60 + maxMinute * 1;
27590
+ return val => {
27591
+ const time = 60 * inputHour.value + val;
27592
+ return time >= minTime && time <= maxTime && isHourAllowed && (!cb || cb(val));
27593
+ };
27594
+ });
27595
+ const isAllowedSecondCb = computed(() => {
27596
+ let cb;
27597
+ const isHourAllowed = !isAllowedHourCb.value || inputHour.value === null || isAllowedHourCb.value(inputHour.value);
27598
+ const isMinuteAllowed = isHourAllowed && (!isAllowedMinuteCb.value || inputMinute.value === null || isAllowedMinuteCb.value(inputMinute.value));
27599
+ if (props.allowedSeconds instanceof Array) {
27600
+ cb = val => props.allowedSeconds.includes(val);
27601
+ } else {
27602
+ cb = props.allowedSeconds;
27603
+ }
27604
+ if (!props.min && !props.max) {
27605
+ return isMinuteAllowed ? cb : () => false;
27606
+ }
27607
+ const [minHour, minMinute, minSecond] = props.min ? props.min.split(':').map(Number) : [0, 0, 0];
27608
+ const [maxHour, maxMinute, maxSecond] = props.max ? props.max.split(':').map(Number) : [23, 59, 59];
27609
+ const minTime = minHour * 3600 + minMinute * 60 + (minSecond || 0) * 1;
27610
+ const maxTime = maxHour * 3600 + maxMinute * 60 + (maxSecond || 0) * 1;
27611
+ return val => {
27612
+ const time = 3600 * inputHour.value + 60 * inputMinute.value + val;
27613
+ return time >= minTime && time <= maxTime && isMinuteAllowed && (!cb || cb(val));
27614
+ };
27615
+ });
27616
+ const isAmPm = computed(() => {
27617
+ return props.format === 'ampm';
27618
+ });
27619
+ watch(() => props.modelValue, val => setInputData(val));
27620
+ onMounted(() => {
27621
+ setInputData(props.modelValue);
27622
+ });
27623
+ function genValue() {
27624
+ if (inputHour.value != null && inputMinute.value != null && (!props.useSeconds || inputSecond.value != null)) {
27625
+ return `${pad(inputHour.value)}:${pad(inputMinute.value)}` + (props.useSeconds ? `:${pad(inputSecond.value)}` : '');
27626
+ }
27627
+ return null;
27628
+ }
27629
+ function emitValue() {
27630
+ const value = genValue();
27631
+ if (value !== null) emit('update:modelValue', value);
27632
+ }
27633
+ function convert24to12(hour) {
27634
+ return hour ? (hour - 1) % 12 + 1 : 12;
27635
+ }
27636
+ function convert12to24(hour, period) {
27637
+ return hour % 12 + (period === 'pm' ? 12 : 0);
27638
+ }
27639
+ function setInputData(value) {
27640
+ if (value == null || value === '') {
27641
+ inputHour.value = null;
27642
+ inputMinute.value = null;
27643
+ inputSecond.value = null;
27644
+ } else if (value instanceof Date) {
27645
+ inputHour.value = value.getHours();
27646
+ inputMinute.value = value.getMinutes();
27647
+ inputSecond.value = value.getSeconds();
27648
+ } else {
27649
+ const [hour,, minute,, second, period] = value.trim().toLowerCase().match(/^(\d+):(\d+)(:(\d+))?([ap]m)?$/) || new Array(6);
27650
+ inputHour.value = period ? convert12to24(parseInt(hour, 10), period) : parseInt(hour, 10);
27651
+ inputMinute.value = parseInt(minute, 10);
27652
+ inputSecond.value = parseInt(second || 0, 10);
27653
+ }
27654
+ period.value = inputHour.value == null || inputHour.value < 12 ? 'am' : 'pm';
27655
+ }
27656
+ function firstAllowed(type, value) {
27657
+ const allowedFn = type === 'hour' ? isAllowedHourCb.value : type === 'minute' ? isAllowedMinuteCb.value : isAllowedSecondCb.value;
27658
+ if (!allowedFn) return value;
27659
+
27660
+ // TODO: clean up (Note from V2 code)
27661
+ const range = type === 'minute' ? range60 : type === 'second' ? range60 : isAmPm.value ? value < 12 ? rangeHours12am : rangeHours12pm : rangeHours24;
27662
+ const first = range.find(v => allowedFn((v + value) % range.length + range[0]));
27663
+ return ((first || 0) + value) % range.length + range[0];
27664
+ }
27665
+ function setPeriod(val) {
27666
+ period.value = val;
27667
+ if (inputHour.value != null) {
27668
+ const newHour = inputHour.value + (period.value === 'am' ? -12 : 12);
27669
+ inputHour.value = firstAllowed('hour', newHour);
27670
+ }
27671
+ emit('update:period', val);
27672
+ emitValue();
27673
+ return true;
27674
+ }
27675
+ function onInput(value) {
27676
+ if (selecting.value === SelectingTimes.Hour) {
27677
+ inputHour.value = isAmPm.value ? convert12to24(value, period.value) : value;
27678
+ } else if (selecting.value === SelectingTimes.Minute) {
27679
+ inputMinute.value = value;
27680
+ } else {
27681
+ inputSecond.value = value;
27682
+ }
27683
+ }
27684
+ function onChange(value) {
27685
+ switch (selectingNames[selecting.value]) {
27686
+ case 'hour':
27687
+ emit('update:hour', value);
27688
+ break;
27689
+ case 'minutes':
27690
+ emit('update:minute', value);
27691
+ break;
27692
+ case 'seconds':
27693
+ emit('update:second', value);
27694
+ break;
27695
+ }
27696
+ const emitChange = selecting.value === (props.useSeconds ? SelectingTimes.Second : SelectingTimes.Minute);
27697
+ if (selecting.value === SelectingTimes.Hour) {
27698
+ selecting.value = SelectingTimes.Minute;
27699
+ } else if (props.useSeconds && selecting.value === SelectingTimes.Minute) {
27700
+ selecting.value = SelectingTimes.Second;
27701
+ }
27702
+ if (inputHour.value === lazyInputHour.value && inputMinute.value === lazyInputMinute.value && (!props.useSeconds || inputSecond.value === lazyInputSecond.value)) return;
27703
+ const time = genValue();
27704
+ if (time === null) return;
27705
+ lazyInputHour.value = inputHour.value;
27706
+ lazyInputMinute.value = inputMinute.value;
27707
+ props.useSeconds && (lazyInputSecond.value = inputSecond.value);
27708
+ emitChange && emitValue();
27709
+ }
27710
+ useRender(() => {
27711
+ const pickerProps = VPicker.filterProps(props);
27712
+ const timePickerControlsProps = VTimePickerControls.filterProps(props);
27713
+ const timePickerClockProps = VTimePickerClock.filterProps(omit(props, ['format', 'modelValue', 'min', 'max']));
27714
+ return createVNode(VPicker, mergeProps(pickerProps, {
27715
+ "color": undefined,
27716
+ "class": ['v-time-picker', props.class],
27717
+ "style": props.style
27718
+ }), {
27719
+ title: () => slots.title?.() ?? createVNode("div", {
27720
+ "class": "v-time-picker__title"
27721
+ }, [t(props.title)]),
27722
+ header: () => createVNode(VTimePickerControls, mergeProps(timePickerControlsProps, {
27723
+ "ampm": isAmPm.value || props.ampmInTitle,
27724
+ "ampmReadonly": isAmPm.value && !props.ampmInTitle,
27725
+ "hour": inputHour.value,
27726
+ "minute": inputMinute.value,
27727
+ "period": period.value,
27728
+ "second": inputSecond.value,
27729
+ "selecting": selecting.value,
27730
+ "onUpdate:period": val => setPeriod(val),
27731
+ "onUpdate:selecting": value => selecting.value = value,
27732
+ "ref": controlsRef
27733
+ }), null),
27734
+ default: () => createVNode(VTimePickerClock, mergeProps(timePickerClockProps, {
27735
+ "allowedValues": selecting.value === SelectingTimes.Hour ? isAllowedHourCb.value : selecting.value === SelectingTimes.Minute ? isAllowedMinuteCb.value : isAllowedSecondCb.value,
27736
+ "double": selecting.value === SelectingTimes.Hour && !isAmPm.value,
27737
+ "format": selecting.value === SelectingTimes.Hour ? isAmPm.value ? convert24to12 : val => val : val => pad(val, 2),
27738
+ "max": selecting.value === SelectingTimes.Hour ? isAmPm.value && period.value === 'am' ? 11 : 23 : 59,
27739
+ "min": selecting.value === SelectingTimes.Hour && isAmPm.value && period.value === 'pm' ? 12 : 0,
27740
+ "size": 20,
27741
+ "step": selecting.value === SelectingTimes.Hour ? 1 : 5,
27742
+ "modelValue": selecting.value === SelectingTimes.Hour ? inputHour.value : selecting.value === SelectingTimes.Minute ? inputMinute.value : inputSecond.value,
27743
+ "onChange": onChange,
27744
+ "onInput": onInput,
27745
+ "ref": clockRef
27746
+ }), null),
27747
+ actions: slots.actions
27748
+ });
27749
+ });
27750
+ }
27751
+ });
27752
+
27753
+ // Types
27754
+
27108
27755
  const makeVTreeviewGroupProps = propsFactory({
27109
27756
  ...omit(makeVListGroupProps({
27110
27757
  collapseIcon: '$treeviewCollapse',
@@ -27623,6 +28270,9 @@ var components = /*#__PURE__*/Object.freeze({
27623
28270
  VTextField: VTextField,
27624
28271
  VTextarea: VTextarea,
27625
28272
  VThemeProvider: VThemeProvider,
28273
+ VTimePicker: VTimePicker,
28274
+ VTimePickerClock: VTimePickerClock,
28275
+ VTimePickerControls: VTimePickerControls,
27626
28276
  VTimeline: VTimeline,
27627
28277
  VTimelineItem: VTimelineItem,
27628
28278
  VToolbar: VToolbar,
@@ -27858,7 +28508,7 @@ function createVuetify$1() {
27858
28508
  goTo
27859
28509
  };
27860
28510
  }
27861
- const version$1 = "3.5.11";
28511
+ const version$1 = "3.5.12";
27862
28512
  createVuetify$1.version = version$1;
27863
28513
 
27864
28514
  // Vue's inject() can only be used in setup
@@ -28111,7 +28761,7 @@ var index = /*#__PURE__*/Object.freeze({
28111
28761
 
28112
28762
  /* eslint-disable local-rules/sort-imports */
28113
28763
 
28114
- const version = "3.5.11";
28764
+ const version = "3.5.12";
28115
28765
 
28116
28766
  /* eslint-disable local-rules/sort-imports */
28117
28767