@vuetify/nightly 3.0.0-beta.0 → 3.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/CHANGELOG.md +53 -2
  2. package/dist/json/attributes.json +343 -195
  3. package/dist/json/importMap.json +20 -0
  4. package/dist/json/tags.json +106 -44
  5. package/dist/json/web-types.json +946 -549
  6. package/dist/vuetify.css +1486 -1085
  7. package/dist/vuetify.d.ts +9036 -8077
  8. package/dist/vuetify.esm.js +1511 -944
  9. package/dist/vuetify.esm.js.map +1 -1
  10. package/dist/vuetify.js +1510 -943
  11. package/dist/vuetify.js.map +1 -1
  12. package/dist/vuetify.min.css +3 -3
  13. package/dist/vuetify.min.js +825 -754
  14. package/dist/vuetify.min.js.map +1 -1
  15. package/lib/components/VAlert/VAlert.css +29 -8
  16. package/lib/components/VAlert/VAlert.mjs +31 -17
  17. package/lib/components/VAlert/VAlert.mjs.map +1 -1
  18. package/lib/components/VAlert/VAlert.sass +27 -7
  19. package/lib/components/VAlert/VAlertTitle.mjs +1 -0
  20. package/lib/components/VAlert/VAlertTitle.mjs.map +1 -1
  21. package/lib/components/VAlert/_variables.scss +14 -7
  22. package/lib/components/VApp/VApp.css +1 -0
  23. package/lib/components/VApp/VApp.sass +1 -0
  24. package/lib/components/VAppBar/VAppBar.mjs +7 -3
  25. package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
  26. package/lib/components/VAppBar/VAppBarTitle.mjs.map +1 -1
  27. package/lib/components/VAutocomplete/VAutocomplete.mjs +82 -69
  28. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  29. package/lib/components/VAvatar/VAvatar.mjs +15 -14
  30. package/lib/components/VAvatar/VAvatar.mjs.map +1 -1
  31. package/lib/components/VBanner/VBanner.css +82 -58
  32. package/lib/components/VBanner/VBanner.mjs +39 -43
  33. package/lib/components/VBanner/VBanner.mjs.map +1 -1
  34. package/lib/components/VBanner/VBanner.sass +61 -54
  35. package/lib/components/VBanner/VBannerActions.mjs +34 -2
  36. package/lib/components/VBanner/VBannerActions.mjs.map +1 -1
  37. package/lib/components/VBanner/VBannerAvatar.mjs +20 -0
  38. package/lib/components/VBanner/VBannerAvatar.mjs.map +1 -0
  39. package/lib/components/VBanner/VBannerIcon.mjs +20 -0
  40. package/lib/components/VBanner/VBannerIcon.mjs.map +1 -0
  41. package/lib/components/VBanner/_variables.scss +10 -14
  42. package/lib/components/VBanner/index.mjs +2 -0
  43. package/lib/components/VBanner/index.mjs.map +1 -1
  44. package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +2 -0
  45. package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
  46. package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs +10 -9
  47. package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs.map +1 -1
  48. package/lib/components/VBtn/VBtn.css +20 -1
  49. package/lib/components/VBtn/VBtn.mjs +20 -7
  50. package/lib/components/VBtn/VBtn.mjs.map +1 -1
  51. package/lib/components/VBtn/VBtn.sass +15 -2
  52. package/lib/components/VBtn/_variables.scss +3 -0
  53. package/lib/components/VBtnGroup/VBtnGroup.css +14 -6
  54. package/lib/components/VBtnGroup/VBtnGroup.sass +14 -6
  55. package/lib/components/VCard/VCard.css +13 -11
  56. package/lib/components/VCard/VCard.mjs +5 -2
  57. package/lib/components/VCard/VCard.mjs.map +1 -1
  58. package/lib/components/VCard/VCard.sass +12 -9
  59. package/lib/components/VCard/VCardActions.mjs +1 -2
  60. package/lib/components/VCard/VCardActions.mjs.map +1 -1
  61. package/lib/components/VCard/VCardContent.mjs +3 -0
  62. package/lib/components/VCard/VCardContent.mjs.map +1 -0
  63. package/lib/components/VCard/_variables.scss +11 -5
  64. package/lib/components/VCard/index.mjs +1 -0
  65. package/lib/components/VCard/index.mjs.map +1 -1
  66. package/lib/components/VCarousel/VCarousel.mjs +1 -1
  67. package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
  68. package/lib/components/VCheckbox/VCheckbox.mjs +2 -2
  69. package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
  70. package/lib/components/VChip/VChip.css +3 -0
  71. package/lib/components/VChip/VChip.sass +3 -0
  72. package/lib/components/VChip/_variables.scss +3 -0
  73. package/lib/components/VColorPicker/VColorPickerCanvas.css +1 -1
  74. package/lib/components/VCombobox/VCombobox.mjs +92 -74
  75. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  76. package/lib/components/VDialog/VDialog.css +31 -11
  77. package/lib/components/VDialog/VDialog.mjs +6 -9
  78. package/lib/components/VDialog/VDialog.mjs.map +1 -1
  79. package/lib/components/VDialog/VDialog.sass +27 -10
  80. package/lib/components/VDialog/_variables.scss +3 -6
  81. package/lib/components/VExpansionPanel/VExpansionPanel.css +3 -2
  82. package/lib/components/VExpansionPanel/VExpansionPanel.mjs +6 -2
  83. package/lib/components/VExpansionPanel/VExpansionPanel.mjs.map +1 -1
  84. package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs +5 -3
  85. package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs.map +1 -1
  86. package/lib/components/VExpansionPanel/VExpansionPanels.mjs +4 -0
  87. package/lib/components/VExpansionPanel/VExpansionPanels.mjs.map +1 -1
  88. package/lib/components/VField/VField.css +1 -1
  89. package/lib/components/VField/VField.mjs +3 -4
  90. package/lib/components/VField/VField.mjs.map +1 -1
  91. package/lib/components/VField/VField.sass +1 -1
  92. package/lib/components/VFileInput/VFileInput.mjs +2 -1
  93. package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
  94. package/lib/components/VFooter/VFooter.mjs +32 -15
  95. package/lib/components/VFooter/VFooter.mjs.map +1 -1
  96. package/lib/components/VForm/VForm.mjs +25 -11
  97. package/lib/components/VForm/VForm.mjs.map +1 -1
  98. package/lib/components/VIcon/VIcon.css +27 -12
  99. package/lib/components/VIcon/VIcon.mjs +19 -16
  100. package/lib/components/VIcon/VIcon.mjs.map +1 -1
  101. package/lib/components/VIcon/VIcon.sass +27 -16
  102. package/lib/components/VIcon/_variables.scss +1 -0
  103. package/lib/components/VInput/VInput.css +3 -1
  104. package/lib/components/VInput/VInput.mjs +3 -4
  105. package/lib/components/VInput/VInput.mjs.map +1 -1
  106. package/lib/components/VInput/VInput.sass +3 -1
  107. package/lib/components/VInput/_variables.scss +4 -0
  108. package/lib/components/VList/VList.css +7 -6
  109. package/lib/components/VList/VList.mjs +36 -17
  110. package/lib/components/VList/VList.mjs.map +1 -1
  111. package/lib/components/VList/VList.sass +3 -2
  112. package/lib/components/VList/VListChildren.mjs +1 -1
  113. package/lib/components/VList/VListChildren.mjs.map +1 -1
  114. package/lib/components/VList/VListGroup.mjs +28 -10
  115. package/lib/components/VList/VListGroup.mjs.map +1 -1
  116. package/lib/components/VList/VListItem.css +119 -42
  117. package/lib/components/VList/VListItem.mjs +36 -32
  118. package/lib/components/VList/VListItem.mjs.map +1 -1
  119. package/lib/components/VList/VListItem.sass +76 -28
  120. package/lib/components/VList/VListItemAction.mjs +29 -0
  121. package/lib/components/VList/VListItemAction.mjs.map +1 -0
  122. package/lib/components/VList/VListItemAvatar.mjs +10 -16
  123. package/lib/components/VList/VListItemAvatar.mjs.map +1 -1
  124. package/lib/components/VList/VListItemIcon.mjs +23 -0
  125. package/lib/components/VList/VListItemIcon.mjs.map +1 -0
  126. package/lib/components/VList/VListItemMedia.mjs +4 -4
  127. package/lib/components/VList/VListItemMedia.mjs.map +1 -1
  128. package/lib/components/VList/_variables.scss +12 -3
  129. package/lib/components/VList/index.mjs +2 -0
  130. package/lib/components/VList/index.mjs.map +1 -1
  131. package/lib/components/VMenu/VMenu.css +2 -12
  132. package/lib/components/VMenu/VMenu.mjs +61 -31
  133. package/lib/components/VMenu/VMenu.mjs.map +1 -1
  134. package/lib/components/VMenu/VMenu.sass +3 -6
  135. package/lib/components/VMenu/shared.mjs +2 -0
  136. package/lib/components/VMenu/shared.mjs.map +1 -0
  137. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +1 -1
  138. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
  139. package/lib/components/VOverlay/VOverlay.css +8 -0
  140. package/lib/components/VOverlay/VOverlay.mjs +16 -15
  141. package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
  142. package/lib/components/VOverlay/VOverlay.sass +9 -0
  143. package/lib/components/VOverlay/_variables.scss +1 -0
  144. package/lib/components/VOverlay/positionStrategies.mjs +7 -3
  145. package/lib/components/VOverlay/positionStrategies.mjs.map +1 -1
  146. package/lib/components/VOverlay/scrollStrategies.mjs +9 -0
  147. package/lib/components/VOverlay/scrollStrategies.mjs.map +1 -1
  148. package/lib/components/VOverlay/useActivator.mjs +50 -14
  149. package/lib/components/VOverlay/useActivator.mjs.map +1 -1
  150. package/lib/components/VPagination/VPagination.mjs +10 -12
  151. package/lib/components/VPagination/VPagination.mjs.map +1 -1
  152. package/lib/components/VProgressLinear/VProgressLinear.css +1 -1
  153. package/lib/components/VRadio/VRadio.mjs +1 -2
  154. package/lib/components/VRadio/VRadio.mjs.map +1 -1
  155. package/lib/components/VRadioGroup/VRadioGroup.mjs +2 -2
  156. package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
  157. package/lib/components/VRangeSlider/VRangeSlider.mjs +5 -2
  158. package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
  159. package/lib/components/VRating/VRating.css +2 -2
  160. package/lib/components/VRating/VRating.mjs +13 -3
  161. package/lib/components/VRating/VRating.mjs.map +1 -1
  162. package/lib/components/VRating/VRating.sass +2 -2
  163. package/lib/components/VSelect/VSelect.mjs +70 -91
  164. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  165. package/lib/components/VSelectionControl/VSelectionControl.mjs +2 -1
  166. package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
  167. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +2 -2
  168. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs.map +1 -1
  169. package/lib/components/VSlideGroup/VSlideGroup.css +0 -5
  170. package/lib/components/VSlideGroup/VSlideGroup.mjs +36 -14
  171. package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
  172. package/lib/components/VSlideGroup/VSlideGroup.sass +0 -4
  173. package/lib/components/VSlideGroup/VSlideGroupItem.mjs +3 -1
  174. package/lib/components/VSlideGroup/VSlideGroupItem.mjs.map +1 -1
  175. package/lib/components/VSlider/VSlider.css +7 -2
  176. package/lib/components/VSlider/VSlider.sass +11 -5
  177. package/lib/components/VSlider/VSliderTrack.css +6 -6
  178. package/lib/components/VSlider/VSliderTrack.mjs +1 -1
  179. package/lib/components/VSlider/VSliderTrack.mjs.map +1 -1
  180. package/lib/components/VSlider/VSliderTrack.sass +7 -7
  181. package/lib/components/VSlider/_variables.scss +5 -2
  182. package/lib/components/VSnackbar/VSnackbar.css +14 -13
  183. package/lib/components/VSnackbar/VSnackbar.mjs +22 -10
  184. package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
  185. package/lib/components/VSnackbar/VSnackbar.sass +15 -16
  186. package/lib/components/VSnackbar/_variables.scss +0 -4
  187. package/lib/components/VSwitch/VSwitch.mjs +8 -5
  188. package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
  189. package/lib/components/VSystemBar/VSystemBar.css +0 -5
  190. package/lib/components/VSystemBar/VSystemBar.mjs +31 -14
  191. package/lib/components/VSystemBar/VSystemBar.mjs.map +1 -1
  192. package/lib/components/VSystemBar/VSystemBar.sass +0 -5
  193. package/lib/components/VSystemBar/_variables.scss +0 -3
  194. package/lib/components/VTabs/VTab.mjs +28 -32
  195. package/lib/components/VTabs/VTab.mjs.map +1 -1
  196. package/lib/components/VTabs/VTabs.css +6 -2
  197. package/lib/components/VTabs/VTabs.mjs +7 -8
  198. package/lib/components/VTabs/VTabs.mjs.map +1 -1
  199. package/lib/components/VTabs/VTabs.sass +6 -1
  200. package/lib/components/VTabs/shared.mjs +2 -0
  201. package/lib/components/VTabs/shared.mjs.map +1 -0
  202. package/lib/components/VTextField/VTextField.css +4 -4
  203. package/lib/components/VTextField/VTextField.mjs +5 -9
  204. package/lib/components/VTextField/VTextField.mjs.map +1 -1
  205. package/lib/components/VTextField/VTextField.sass +5 -5
  206. package/lib/components/VTextarea/VTextarea.css +7 -4
  207. package/lib/components/VTextarea/VTextarea.sass +9 -5
  208. package/lib/components/VTimeline/VTimeline.css +187 -48
  209. package/lib/components/VTimeline/VTimeline.mjs +27 -11
  210. package/lib/components/VTimeline/VTimeline.mjs.map +1 -1
  211. package/lib/components/VTimeline/VTimeline.sass +196 -51
  212. package/lib/components/VTimeline/VTimelineDivider.mjs +2 -1
  213. package/lib/components/VTimeline/VTimelineDivider.mjs.map +1 -1
  214. package/lib/components/VTimeline/_variables.scss +2 -1
  215. package/lib/components/VToolbar/VToolbar.css +8 -1
  216. package/lib/components/VToolbar/VToolbar.mjs +8 -11
  217. package/lib/components/VToolbar/VToolbar.mjs.map +1 -1
  218. package/lib/components/VToolbar/VToolbar.sass +2 -1
  219. package/lib/components/VToolbar/VToolbarItems.mjs +0 -1
  220. package/lib/components/VToolbar/VToolbarItems.mjs.map +1 -1
  221. package/lib/components/VToolbar/_variables.scss +13 -1
  222. package/lib/components/VWindow/VWindow.mjs +0 -8
  223. package/lib/components/VWindow/VWindow.mjs.map +1 -1
  224. package/lib/components/index.d.ts +9025 -8077
  225. package/lib/composables/defaults.mjs +2 -2
  226. package/lib/composables/defaults.mjs.map +1 -1
  227. package/lib/composables/form.mjs +18 -5
  228. package/lib/composables/form.mjs.map +1 -1
  229. package/lib/composables/forwardRef.mjs +10 -6
  230. package/lib/composables/forwardRef.mjs.map +1 -1
  231. package/lib/composables/group.mjs +14 -6
  232. package/lib/composables/group.mjs.map +1 -1
  233. package/lib/composables/index.mjs.map +1 -1
  234. package/lib/composables/items.mjs +56 -0
  235. package/lib/composables/items.mjs.map +1 -0
  236. package/lib/composables/layout.mjs +7 -3
  237. package/lib/composables/layout.mjs.map +1 -1
  238. package/lib/composables/loader.mjs.map +1 -1
  239. package/lib/composables/nested/nested.mjs +27 -14
  240. package/lib/composables/nested/nested.mjs.map +1 -1
  241. package/lib/composables/nested/openStrategies.mjs +63 -36
  242. package/lib/composables/nested/openStrategies.mjs.map +1 -1
  243. package/lib/composables/nested/selectStrategies.mjs +163 -122
  244. package/lib/composables/nested/selectStrategies.mjs.map +1 -1
  245. package/lib/composables/overlay.mjs +5 -1
  246. package/lib/composables/overlay.mjs.map +1 -1
  247. package/lib/composables/proxiedModel.mjs.map +1 -1
  248. package/lib/composables/resizeObserver.mjs +1 -9
  249. package/lib/composables/resizeObserver.mjs.map +1 -1
  250. package/lib/composables/router.mjs +17 -5
  251. package/lib/composables/router.mjs.map +1 -1
  252. package/lib/composables/selectLink.mjs +19 -0
  253. package/lib/composables/selectLink.mjs.map +1 -0
  254. package/lib/composables/stack.mjs +7 -4
  255. package/lib/composables/stack.mjs.map +1 -1
  256. package/lib/composables/validation.mjs +6 -3
  257. package/lib/composables/validation.mjs.map +1 -1
  258. package/lib/composables/variant.mjs +0 -3
  259. package/lib/composables/variant.mjs.map +1 -1
  260. package/lib/directives/ripple/index.mjs +15 -3
  261. package/lib/directives/ripple/index.mjs.map +1 -1
  262. package/lib/entry-bundler.mjs +1 -1
  263. package/lib/framework.mjs +12 -7
  264. package/lib/framework.mjs.map +1 -1
  265. package/lib/index.d.ts +18 -2
  266. package/lib/locale/ca.mjs +9 -9
  267. package/lib/locale/ca.mjs.map +1 -1
  268. package/lib/styles/generic/_colors.scss +0 -1
  269. package/lib/styles/main.css +400 -392
  270. package/lib/styles/settings/_utilities.scss +54 -26
  271. package/lib/styles/tools/_states.sass +2 -1
  272. package/lib/util/defineComponent.mjs +37 -6
  273. package/lib/util/defineComponent.mjs.map +1 -1
  274. package/lib/util/getCurrentInstance.mjs +1 -1
  275. package/lib/util/getCurrentInstance.mjs.map +1 -1
  276. package/lib/util/helpers.mjs.map +1 -1
  277. package/package.json +31 -29
@@ -2,8 +2,8 @@
2
2
  .v-text-field input {
3
3
  color: inherit;
4
4
  flex: 1;
5
- opacity: 0;
6
5
  transition: 0.15s opacity cubic-bezier(0.4, 0, 0.2, 1);
6
+ min-width: 0;
7
7
  }
8
8
  .v-text-field input:focus, .v-text-field input:active {
9
9
  outline: none;
@@ -26,6 +26,9 @@
26
26
  padding-inline-start: 16px;
27
27
  padding-inline-end: 16px;
28
28
  }
29
+ .v-text-field .v-field--has-label input {
30
+ opacity: 0;
31
+ }
29
32
  .v-text-field .v-field--active input {
30
33
  opacity: 1;
31
34
  }
@@ -63,8 +66,5 @@
63
66
  .v-text-field--flush-details .v-input__details {
64
67
  padding: 0;
65
68
  }
66
- .v-text-field--persistent-placeholder input {
67
- opacity: 1;
68
- }
69
69
 
70
70
  /* endregion */
@@ -40,13 +40,9 @@ export const VTextField = genericComponent()({
40
40
  ...makeVFieldProps()
41
41
  },
42
42
  emits: {
43
- 'click:append': e => true,
44
- 'click:append-inner': e => true,
45
43
  'click:clear': e => true,
46
44
  'click:control': e => true,
47
45
  'click:input': e => true,
48
- 'click:prepend': e => true,
49
- 'click:prepend-inner': e => true,
50
46
  'update:modelValue': val => true
51
47
  },
52
48
 
@@ -121,13 +117,12 @@ export const VTextField = genericComponent()({
121
117
  "modelValue": model.value,
122
118
  "onUpdate:modelValue": $event => model.value = $event,
123
119
  "class": ['v-text-field', {
124
- 'v-text-field--persistent-placeholder': props.persistentPlaceholder,
125
120
  'v-text-field--prefixed': props.prefix,
126
121
  'v-text-field--suffixed': props.suffix,
127
122
  'v-text-field--flush-details': ['plain', 'underlined'].includes(props.variant)
128
123
  }],
129
- "onClick:prepend": e => emit('click:prepend', e),
130
- "onClick:append": e => emit('click:append', e)
124
+ "onClick:prepend": attrs['onClick:prepend'],
125
+ "onClick:append": attrs['onClick:append']
131
126
  }, rootAttrs, inputProps, {
132
127
  "messages": messages.value
133
128
  }), { ...slots,
@@ -146,8 +141,8 @@ export const VTextField = genericComponent()({
146
141
  },
147
142
  "onClick:control": onControlClick,
148
143
  "onClick:clear": onClear,
149
- "onClick:prependInner": e => emit('click:prepend-inner', e),
150
- "onClick:appendInner": e => emit('click:append-inner', e),
144
+ "onClick:prependInner": attrs['onClick:prependInner'],
145
+ "onClick:appendInner": attrs['onClick:prependInner'],
151
146
  "role": "textbox"
152
147
  }, fieldProps, {
153
148
  "active": isActive.value || isDirty.value,
@@ -175,6 +170,7 @@ export const VTextField = genericComponent()({
175
170
  "autofocus": props.autofocus,
176
171
  "readonly": isReadonly.value,
177
172
  "disabled": isDisabled.value,
173
+ "name": props.name,
178
174
  "placeholder": props.placeholder,
179
175
  "size": 1,
180
176
  "type": props.type,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/VTextField/VTextField.tsx"],"names":["filterInputProps","makeVInputProps","VInput","filterFieldProps","makeVFieldProps","VField","VCounter","useForwardRef","useProxiedModel","Intersect","computed","nextTick","ref","filterInputAttrs","genericComponent","useRender","activeTypes","VTextField","name","directives","inheritAttrs","props","autofocus","Boolean","counter","Number","String","counterValue","Function","hint","persistentHint","prefix","placeholder","persistentPlaceholder","persistentCounter","suffix","type","default","emits","e","val","setup","attrs","emit","slots","model","value","toString","length","max","maxlength","undefined","onIntersect","isIntersecting","entries","target","focus","vInputRef","vFieldRef","isFocused","inputRef","isActive","includes","messages","onFocus","document","activeElement","onControlClick","onClear","stopPropagation","hasCounter","rootAttrs","inputAttrs","modelValue","_","inputProps","fieldProps","variant","isDisabled","isDirty","isReadonly","isValid","preventDefault","dirty","class","fieldClass","slotProps","handler","details"],"mappings":";AAAA;AACA,0B,CAEA;;SACSA,gB,EAAkBC,e,EAAiBC,M;SACnCC,gB,EAAkBC,e,EAAiBC,M;SACnCC,Q,iCAET;;SACSC,a;SACAC,e,8CAET;;OACOC,S,8CAEP;;AACA,SAASC,QAAT,EAAmBC,QAAnB,EAA6BC,GAA7B,QAAwC,KAAxC;SACSC,gB,EAAkBC,gB,EAAkBC,S,gCAE7C;;AAKA,MAAMC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,CAACb,KAL9B;AAAA,mBAMRnB,YAAY,CAACmB,KANL;AAAA,iBAOVG,GAAG,CAACH;AAPM,WAQNF,KAAK,CAACpB,OARA,GAAH,GAWf2B;AAzGV;AA6GD,KAnHQ,CAAT;AAqHA,WAAO5C,aAAa,CAAC,EAAD,EAAKkD,SAAL,EAAgBC,SAAhB,EAA2BE,QAA3B,CAApB;AACD;;AA9NE,CAFqC,CAAnC","sourcesContent":["// Styles\nimport './VTextField.sass'\n\n// Components\nimport { filterInputProps, makeVInputProps, VInput } from '@/components/VInput/VInput'\nimport { filterFieldProps, makeVFieldProps, VField } from '@/components/VField/VField'\nimport { VCounter } from '@/components/VCounter'\n\n// Composables\nimport { useForwardRef } from '@/composables/forwardRef'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Directives\nimport Intersect from '@/directives/intersect'\n\n// Utilities\nimport { computed, nextTick, ref } from 'vue'\nimport { filterInputAttrs, genericComponent, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VInputSlots } from '@/components/VInput/VInput'\nimport type { VFieldSlots } from '@/components/VField/VField'\n\nconst activeTypes = ['color', 'file', 'time', 'date', 'datetime-local', 'week', 'month']\n\nexport const VTextField = genericComponent<new <T>() => {\n $slots: VInputSlots & VFieldSlots\n}>()({\n name: 'VTextField',\n\n directives: { Intersect },\n\n inheritAttrs: false,\n\n props: {\n autofocus: Boolean,\n counter: [Boolean, Number, String] as PropType<true | number | string>,\n counterValue: Function as PropType<(value: any) => number>,\n hint: String,\n persistentHint: Boolean,\n prefix: String,\n placeholder: String,\n persistentPlaceholder: Boolean,\n persistentCounter: Boolean,\n suffix: String,\n type: {\n type: String,\n default: 'text',\n },\n\n ...makeVInputProps(),\n ...makeVFieldProps(),\n },\n\n emits: {\n 'click:append': (e: MouseEvent) => true,\n 'click:append-inner': (e: MouseEvent) => true,\n 'click:clear': (e: MouseEvent) => true,\n 'click:control': (e: MouseEvent) => true,\n 'click:input': (e: MouseEvent) => true,\n 'click:prepend': (e: MouseEvent) => true,\n 'click:prepend-inner': (e: MouseEvent) => true,\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const counterValue = computed(() => {\n return typeof props.counterValue === 'function'\n ? props.counterValue(model.value)\n : (model.value ?? '').toString().length\n })\n const max = computed(() => {\n if (attrs.maxlength) return attrs.maxlength as undefined\n\n if (\n !props.counter ||\n (typeof props.counter !== 'number' &&\n typeof props.counter !== 'string')\n ) return undefined\n\n return props.counter\n })\n\n function onIntersect (\n isIntersecting: boolean,\n entries: IntersectionObserverEntry[]\n ) {\n if (!props.autofocus || !isIntersecting) return\n\n (entries[0].target as HTMLInputElement)?.focus?.()\n }\n\n const vInputRef = ref<VInput>()\n const vFieldRef = ref<VInput>()\n const isFocused = ref(false)\n const inputRef = ref<HTMLInputElement>()\n const isActive = computed(() => (\n activeTypes.includes(props.type) ||\n props.persistentPlaceholder ||\n isFocused.value\n ))\n const messages = computed(() => {\n return props.messages.length\n ? props.messages\n : (isFocused.value || props.persistentHint) ? props.hint : ''\n })\n function onFocus () {\n if (inputRef.value !== document.activeElement) {\n inputRef.value?.focus()\n }\n\n if (!isFocused.value) isFocused.value = true\n }\n function onControlClick (e: MouseEvent) {\n onFocus()\n\n emit('click:control', e)\n }\n function onClear (e: MouseEvent) {\n e.stopPropagation()\n\n onFocus()\n\n nextTick(() => {\n model.value = ''\n\n emit('click:clear', e)\n })\n }\n\n useRender(() => {\n const hasCounter = !!(slots.counter || props.counter || props.counterValue)\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs)\n const [{ modelValue: _, ...inputProps }] = filterInputProps(props)\n const [fieldProps] = filterFieldProps(props)\n\n return (\n <VInput\n ref={ vInputRef }\n v-model={ model.value }\n class={[\n 'v-text-field',\n {\n 'v-text-field--persistent-placeholder': props.persistentPlaceholder,\n 'v-text-field--prefixed': props.prefix,\n 'v-text-field--suffixed': props.suffix,\n 'v-text-field--flush-details': ['plain', 'underlined'].includes(props.variant),\n },\n ]}\n onClick:prepend={ (e: MouseEvent) => emit('click:prepend', e) }\n onClick:append={ (e: MouseEvent) => emit('click:append', e) }\n { ...rootAttrs }\n { ...inputProps }\n messages={ messages.value }\n >\n {{\n ...slots,\n default: ({\n isDisabled,\n isDirty,\n isReadonly,\n isValid,\n }) => (\n <VField\n ref={ vFieldRef }\n onMousedown={ (e: MouseEvent) => {\n if (e.target === inputRef.value) return\n\n e.preventDefault()\n }}\n onClick:control={ onControlClick }\n onClick:clear={ onClear }\n onClick:prependInner={ (e: MouseEvent) => emit('click:prepend-inner', e) }\n onClick:appendInner={ (e: MouseEvent) => emit('click:append-inner', e) }\n role=\"textbox\"\n { ...fieldProps }\n active={ isActive.value || isDirty.value }\n dirty={ isDirty.value || props.dirty }\n focused={ isFocused.value }\n error={ isValid.value === false }\n >\n {{\n ...slots,\n default: ({\n props: { class: fieldClass, ...slotProps },\n }) => {\n return (\n <>\n { props.prefix && (\n <span class=\"v-text-field__prefix\">\n { props.prefix }\n </span>\n ) }\n\n <div\n class={ fieldClass }\n onClick={ e => emit('click:input', e) }\n >\n { slots.default?.() }\n\n <input\n ref={ inputRef }\n v-model={ model.value }\n v-intersect={[{\n handler: onIntersect,\n }, null, ['once']]}\n autofocus={ props.autofocus }\n readonly={ isReadonly.value }\n disabled={ isDisabled.value }\n placeholder={ props.placeholder }\n size={ 1 }\n type={ props.type }\n onFocus={ onFocus }\n onBlur={ () => (isFocused.value = false) }\n { ...slotProps }\n { ...inputAttrs }\n />\n </div>\n\n { props.suffix && (\n <span class=\"v-text-field__suffix\">\n { props.suffix }\n </span>\n ) }\n </>\n )\n },\n }}\n </VField>\n ),\n details: hasCounter ? () => (\n <>\n <span />\n\n <VCounter\n active={ props.persistentCounter || isFocused.value }\n value={ counterValue.value }\n max={ max.value }\n v-slots={ slots.counter }\n />\n </>\n ) : undefined,\n }}\n </VInput>\n )\n })\n\n return useForwardRef({}, vInputRef, vFieldRef, inputRef)\n },\n})\n\nexport type VTextField = InstanceType<typeof VTextField>\n"],"file":"VTextField.mjs"}
1
+ {"version":3,"sources":["../../../src/components/VTextField/VTextField.tsx"],"names":["filterInputProps","makeVInputProps","VInput","filterFieldProps","makeVFieldProps","VField","VCounter","useForwardRef","useProxiedModel","Intersect","computed","nextTick","ref","filterInputAttrs","genericComponent","useRender","activeTypes","VTextField","name","directives","inheritAttrs","props","autofocus","Boolean","counter","Number","String","counterValue","Function","hint","persistentHint","prefix","placeholder","persistentPlaceholder","persistentCounter","suffix","type","default","emits","e","val","setup","attrs","emit","slots","model","value","toString","length","max","maxlength","undefined","onIntersect","isIntersecting","entries","target","focus","vInputRef","vFieldRef","isFocused","inputRef","isActive","includes","messages","onFocus","document","activeElement","onControlClick","onClear","stopPropagation","hasCounter","rootAttrs","inputAttrs","modelValue","_","inputProps","fieldProps","variant","isDisabled","isDirty","isReadonly","isValid","preventDefault","dirty","class","fieldClass","slotProps","handler","details"],"mappings":";AAAA;AACA,0B,CAEA;;SACSA,gB,EAAkBC,e,EAAiBC,M;SACnCC,gB,EAAkBC,e,EAAiBC,M;SACnCC,Q,iCAET;;SACSC,a;SACAC,e,8CAET;;OACOC,S,8CAEP;;AACA,SAASC,QAAT,EAAmBC,QAAnB,EAA6BC,GAA7B,QAAwC,KAAxC;SACSC,gB,EAAkBC,gB,EAAkBC,S,gCAE7C;;AAKA,MAAMC,WAAW,GAAG,CAAC,OAAD,EAAU,MAAV,EAAkB,MAAlB,EAA0B,MAA1B,EAAkC,gBAAlC,EAAoD,MAApD,EAA4D,OAA5D,CAApB;AAEA,OAAO,MAAMC,UAAU,GAAGH,gBAAgB,GAErC;AACHI,EAAAA,IAAI,EAAE,YADH;AAGHC,EAAAA,UAAU,EAAE;AAAEV,IAAAA;AAAF,GAHT;AAKHW,EAAAA,YAAY,EAAE,KALX;AAOHC,EAAAA,KAAK,EAAE;AACLC,IAAAA,SAAS,EAAEC,OADN;AAELC,IAAAA,OAAO,EAAE,CAACD,OAAD,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A,4BAsBmBgC,UAAU,CAAChC,KAtB9B;AAAA,wBAuBezB,KAAK,CAACH,IAvBrB;AAAA,+BAwBsBG,KAAK,CAACW,WAxB5B;AAAA,wBAyBe,CAzBf;AAAA,wBA0BeX,KAAK,CAACe,IA1BrB;AAAA,2BA2BkB4B,OA3BlB;AAAA,0BA4BiB,MAAOL,SAAS,CAACb,KAAV,GAAkB;AA5B1C,iBA6BawC,SA7Bb,EA8Bad,UA9Bb,4BAgBkB3B,KAAK,CAACC,KAhBxB,oCAiBsB;AACZyC,gBAAAA,OAAO,EAAEnC;AADG,eAjBtB,EAmBW,IAnBX;AAAA;AAAA,sBAkCM/B,KAAK,CAACc,MAAN;AAAA,yBACY;AADZ,kBAEId,KAAK,CAACc,MAFV,EAlCN;AAyCD;AAtEE;AAAA,SApBf;AA8FMqD,QAAAA,OAAO,EAAElB,UAAU,GAAG;AAAA,oBAKPjD,KAAK,CAACa,iBAAN,IAA2ByB,SAAS,CAACb,KAL9B;AAAA,mBAMRnB,YAAY,CAACmB,KANL;AAAA,iBAOVG,GAAG,CAACH;AAPM,WAQNF,KAAK,CAACpB,OARA,GAAH,GAWf2B;AAzGV;AA6GD,KAnHQ,CAAT;AAqHA,WAAO5C,aAAa,CAAC,EAAD,EAAKkD,SAAL,EAAgBC,SAAhB,EAA2BE,QAA3B,CAApB;AACD;;AA1NE,CAFqC,CAAnC","sourcesContent":["// Styles\nimport './VTextField.sass'\n\n// Components\nimport { filterInputProps, makeVInputProps, VInput } from '@/components/VInput/VInput'\nimport { filterFieldProps, makeVFieldProps, VField } from '@/components/VField/VField'\nimport { VCounter } from '@/components/VCounter'\n\n// Composables\nimport { useForwardRef } from '@/composables/forwardRef'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Directives\nimport Intersect from '@/directives/intersect'\n\n// Utilities\nimport { computed, nextTick, ref } from 'vue'\nimport { filterInputAttrs, genericComponent, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VInputSlots } from '@/components/VInput/VInput'\nimport type { VFieldSlots } from '@/components/VField/VField'\n\nconst activeTypes = ['color', 'file', 'time', 'date', 'datetime-local', 'week', 'month']\n\nexport const VTextField = genericComponent<new <T>() => {\n $slots: VInputSlots & VFieldSlots\n}>()({\n name: 'VTextField',\n\n directives: { Intersect },\n\n inheritAttrs: false,\n\n props: {\n autofocus: Boolean,\n counter: [Boolean, Number, String] as PropType<true | number | string>,\n counterValue: Function as PropType<(value: any) => number>,\n hint: String,\n persistentHint: Boolean,\n prefix: String,\n placeholder: String,\n persistentPlaceholder: Boolean,\n persistentCounter: Boolean,\n suffix: String,\n type: {\n type: String,\n default: 'text',\n },\n\n ...makeVInputProps(),\n ...makeVFieldProps(),\n },\n\n emits: {\n 'click:clear': (e: MouseEvent) => true,\n 'click:control': (e: MouseEvent) => true,\n 'click:input': (e: MouseEvent) => true,\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const counterValue = computed(() => {\n return typeof props.counterValue === 'function'\n ? props.counterValue(model.value)\n : (model.value ?? '').toString().length\n })\n const max = computed(() => {\n if (attrs.maxlength) return attrs.maxlength as undefined\n\n if (\n !props.counter ||\n (typeof props.counter !== 'number' &&\n typeof props.counter !== 'string')\n ) return undefined\n\n return props.counter\n })\n\n function onIntersect (\n isIntersecting: boolean,\n entries: IntersectionObserverEntry[]\n ) {\n if (!props.autofocus || !isIntersecting) return\n\n (entries[0].target as HTMLInputElement)?.focus?.()\n }\n\n const vInputRef = ref<VInput>()\n const vFieldRef = ref<VInput>()\n const isFocused = ref(false)\n const inputRef = ref<HTMLInputElement>()\n const isActive = computed(() => (\n activeTypes.includes(props.type) ||\n props.persistentPlaceholder ||\n isFocused.value\n ))\n const messages = computed(() => {\n return props.messages.length\n ? props.messages\n : (isFocused.value || props.persistentHint) ? props.hint : ''\n })\n function onFocus () {\n if (inputRef.value !== document.activeElement) {\n inputRef.value?.focus()\n }\n\n if (!isFocused.value) isFocused.value = true\n }\n function onControlClick (e: MouseEvent) {\n onFocus()\n\n emit('click:control', e)\n }\n function onClear (e: MouseEvent) {\n e.stopPropagation()\n\n onFocus()\n\n nextTick(() => {\n model.value = ''\n\n emit('click:clear', e)\n })\n }\n\n useRender(() => {\n const hasCounter = !!(slots.counter || props.counter || props.counterValue)\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs)\n const [{ modelValue: _, ...inputProps }] = filterInputProps(props)\n const [fieldProps] = filterFieldProps(props)\n\n return (\n <VInput\n ref={ vInputRef }\n v-model={ model.value }\n class={[\n 'v-text-field',\n {\n 'v-text-field--prefixed': props.prefix,\n 'v-text-field--suffixed': props.suffix,\n 'v-text-field--flush-details': ['plain', 'underlined'].includes(props.variant),\n },\n ]}\n onClick:prepend={ attrs['onClick:prepend'] }\n onClick:append={ attrs['onClick:append'] }\n { ...rootAttrs }\n { ...inputProps }\n messages={ messages.value }\n >\n {{\n ...slots,\n default: ({\n isDisabled,\n isDirty,\n isReadonly,\n isValid,\n }) => (\n <VField\n ref={ vFieldRef }\n onMousedown={ (e: MouseEvent) => {\n if (e.target === inputRef.value) return\n\n e.preventDefault()\n }}\n onClick:control={ onControlClick }\n onClick:clear={ onClear }\n onClick:prependInner={ attrs['onClick:prependInner'] }\n onClick:appendInner={ attrs['onClick:prependInner'] }\n role=\"textbox\"\n { ...fieldProps }\n active={ isActive.value || isDirty.value }\n dirty={ isDirty.value || props.dirty }\n focused={ isFocused.value }\n error={ isValid.value === false }\n >\n {{\n ...slots,\n default: ({\n props: { class: fieldClass, ...slotProps },\n }) => {\n return (\n <>\n { props.prefix && (\n <span class=\"v-text-field__prefix\">\n { props.prefix }\n </span>\n ) }\n\n <div\n class={ fieldClass }\n onClick={ e => emit('click:input', e) }\n >\n { slots.default?.() }\n\n <input\n ref={ inputRef }\n v-model={ model.value }\n v-intersect={[{\n handler: onIntersect,\n }, null, ['once']]}\n autofocus={ props.autofocus }\n readonly={ isReadonly.value }\n disabled={ isDisabled.value }\n name={ props.name }\n placeholder={ props.placeholder }\n size={ 1 }\n type={ props.type }\n onFocus={ onFocus }\n onBlur={ () => (isFocused.value = false) }\n { ...slotProps }\n { ...inputAttrs }\n />\n </div>\n\n { props.suffix && (\n <span class=\"v-text-field__suffix\">\n { props.suffix }\n </span>\n ) }\n </>\n )\n },\n }}\n </VField>\n ),\n details: hasCounter ? () => (\n <>\n <span />\n\n <VCounter\n active={ props.persistentCounter || isFocused.value }\n value={ counterValue.value }\n max={ max.value }\n v-slots={ slots.counter }\n />\n </>\n ) : undefined,\n }}\n </VInput>\n )\n })\n\n return useForwardRef({}, vInputRef, vFieldRef, inputRef)\n },\n})\n\nexport type VTextField = InstanceType<typeof VTextField>\n"],"file":"VTextField.mjs"}
@@ -8,8 +8,8 @@
8
8
  input
9
9
  color: inherit
10
10
  flex: $text-field-input-flex
11
- opacity: 0
12
11
  transition: $text-field-input-transition
12
+ min-width: 0
13
13
 
14
14
  &:focus,
15
15
  &:active
@@ -33,6 +33,10 @@
33
33
  padding-inline-start: $text-field-details-padding-inline
34
34
  padding-inline-end: $text-field-details-padding-inline
35
35
 
36
+ .v-field--has-label
37
+ input
38
+ opacity: 0
39
+
36
40
  .v-field--active
37
41
  input
38
42
  opacity: 1
@@ -73,8 +77,4 @@
73
77
  &--flush-details
74
78
  .v-input__details
75
79
  padding: 0
76
-
77
- &--persistent-placeholder
78
- input
79
- opacity: 1
80
80
  /* endregion */
@@ -1,6 +1,3 @@
1
- .v-textarea .v-field--active textarea {
2
- opacity: 1;
3
- }
4
1
  .v-textarea .v-field__input {
5
2
  flex: 1 1 auto;
6
3
  line-height: 1.75;
@@ -21,9 +18,15 @@
21
18
  height: 0 !important;
22
19
  pointer-events: none;
23
20
  }
21
+ .v-textarea .v-field--has-label textarea {
22
+ opacity: 0;
23
+ }
24
+ .v-textarea .v-field--active textarea {
25
+ opacity: 1;
26
+ }
24
27
  .v-textarea textarea {
25
28
  flex: 1;
26
- opacity: 0;
29
+ min-width: 0;
27
30
  transition: 0.15s opacity cubic-bezier(0.4, 0, 0.2, 1);
28
31
  }
29
32
  .v-textarea textarea:focus, .v-textarea textarea:active {
@@ -7,10 +7,6 @@
7
7
  @use '../VInput/variables' as *
8
8
 
9
9
  .v-textarea
10
- .v-field--active
11
- textarea
12
- opacity: 1
13
-
14
10
  .v-field__input
15
11
  flex: 1 1 auto
16
12
  line-height: $textarea-line-height
@@ -33,9 +29,17 @@
33
29
  height: 0 !important
34
30
  pointer-events: none
35
31
 
32
+ .v-field--has-label
33
+ textarea
34
+ opacity: 0
35
+
36
+ .v-field--active
37
+ textarea
38
+ opacity: 1
39
+
36
40
  textarea
37
41
  flex: 1
38
- opacity: 0
42
+ min-width: 0
39
43
  transition: .15s opacity settings.$standard-easing
40
44
 
41
45
  &:focus,
@@ -1,4 +1,7 @@
1
1
  .v-timeline .v-timeline-divider__dot {
2
+ background: rgb(var(--v-theme-on-surface-variant));
3
+ }
4
+ .v-timeline .v-timeline-divider__inner-dot {
2
5
  background: rgb(var(--v-theme-on-surface));
3
6
  }
4
7
 
@@ -9,34 +12,43 @@
9
12
  }
10
13
  .v-timeline--horizontal.v-timeline {
11
14
  grid-template-rows: auto min-content auto;
15
+ grid-column-gap: 24px;
12
16
  width: 100%;
13
17
  }
14
- .v-timeline--horizontal.v-timeline .v-timeline-item__body, .v-timeline--horizontal.v-timeline .v-timeline-item__opposite {
15
- padding-inline-start: calc(var(--v-timeline-dot-size) / 2 - 5px);
18
+ .v-timeline--horizontal.v-timeline .v-timeline-item:first-child .v-timeline-item__body, .v-timeline--horizontal.v-timeline .v-timeline-item:first-child .v-timeline-item__opposite, .v-timeline--horizontal.v-timeline .v-timeline-item:first-child .v-timeline-divider {
19
+ padding-inline-start: 24px;
20
+ }
21
+ .v-timeline--horizontal.v-timeline .v-timeline-item:last-child .v-timeline-item__body, .v-timeline--horizontal.v-timeline .v-timeline-item:last-child .v-timeline-item__opposite, .v-timeline--horizontal.v-timeline .v-timeline-item:last-child .v-timeline-divider {
22
+ padding-inline-end: 24px;
16
23
  }
17
24
  .v-timeline--horizontal.v-timeline .v-timeline-item:nth-child(2n) .v-timeline-item__body {
18
25
  grid-row: 3;
19
- padding-top: 24px;
26
+ padding-block-start: 24px;
20
27
  }
21
28
  .v-timeline--horizontal.v-timeline .v-timeline-item:nth-child(2n) .v-timeline-item__opposite {
22
29
  grid-row: 1;
23
- padding-bottom: 24px;
30
+ padding-block-end: 24px;
31
+ align-self: flex-end;
24
32
  }
25
33
  .v-timeline--horizontal.v-timeline .v-timeline-item:nth-child(2n+1) .v-timeline-item__body {
26
34
  grid-row: 1;
27
- padding-bottom: 24px;
35
+ padding-block-end: 24px;
28
36
  }
29
37
  .v-timeline--horizontal.v-timeline .v-timeline-item:nth-child(2n+1) .v-timeline-item__opposite {
30
38
  grid-row: 3;
31
- padding-top: 24px;
39
+ padding-block-start: 24px;
32
40
  }
33
41
 
34
42
  .v-timeline--vertical.v-timeline {
35
43
  grid-template-columns: auto min-content auto;
44
+ grid-row-gap: 24px;
36
45
  height: 100%;
37
46
  }
38
- .v-timeline--vertical.v-timeline .v-timeline-item__body, .v-timeline--vertical.v-timeline .v-timeline-item__opposite {
39
- padding-top: calc((var(--v-timeline-dot-size) - 1.5em) / 2);
47
+ .v-timeline--vertical.v-timeline .v-timeline-item:first-child .v-timeline-divider, .v-timeline--vertical.v-timeline .v-timeline-item:first-child .v-timeline-item__body, .v-timeline--vertical.v-timeline .v-timeline-item:first-child .v-timeline-item__opposite {
48
+ padding-block-start: 24px;
49
+ }
50
+ .v-timeline--vertical.v-timeline .v-timeline-item:last-child .v-timeline-item__body, .v-timeline--vertical.v-timeline .v-timeline-item:last-child .v-timeline-item__opposite, .v-timeline--vertical.v-timeline .v-timeline-item:last-child .v-timeline-divider {
51
+ padding-block-end: 24px;
40
52
  }
41
53
  .v-timeline--vertical.v-timeline .v-timeline-item:nth-child(2n) .v-timeline-item__body {
42
54
  grid-column: 1;
@@ -61,53 +73,55 @@
61
73
  display: contents;
62
74
  }
63
75
 
76
+ .v-timeline-divider {
77
+ position: relative;
78
+ display: flex;
79
+ align-items: center;
80
+ }
81
+ .v-timeline--horizontal .v-timeline-divider {
82
+ flex-direction: row;
83
+ grid-row: 2;
84
+ width: 100%;
85
+ }
86
+
87
+ .v-timeline--vertical .v-timeline-divider {
88
+ height: 100%;
89
+ flex-direction: column;
90
+ grid-column: 2;
91
+ }
92
+
64
93
  .v-timeline-divider__line {
65
94
  background: rgba(var(--v-border-color), var(--v-border-opacity));
66
95
  position: absolute;
67
96
  }
68
97
  .v-timeline--horizontal .v-timeline-divider__line {
69
98
  height: var(--v-timeline-line-thickness);
70
- width: calc(100% - var(--v-timeline-line-inset, 0px));
99
+ width: calc(100% + 24px);
100
+ }
101
+ .v-timeline--horizontal .v-timeline-divider__line.v-locale--is-ltr, .v-locale--is-ltr .v-timeline--horizontal .v-timeline-divider__line {
102
+ left: 0;
103
+ }
104
+ .v-timeline--horizontal .v-timeline-divider__line.v-locale--is-rtl, .v-locale--is-rtl .v-timeline--horizontal .v-timeline-divider__line {
105
+ right: 0;
71
106
  }
72
107
 
73
108
  .v-timeline--vertical .v-timeline-divider__line {
74
- height: 100%;
109
+ height: calc(100% + 24px);
75
110
  width: var(--v-timeline-line-thickness);
76
111
  }
77
-
78
- .v-timeline--vertical.v-timeline--inset-line .v-timeline-divider__line {
79
- height: calc(100% - var(--v-timeline-dot-size) - var(--v-timeline-line-inset));
80
- bottom: calc(var(--v-timeline-line-inset) / 2);
81
- }
82
-
83
- .v-timeline--horizontal.v-timeline--inset-line .v-timeline-divider__line {
84
- width: calc(100% - var(--v-timeline-dot-size) - var(--v-timeline-line-inset));
85
- inset-inline-end: calc(var(--v-timeline-line-inset) / 2);
112
+ .v-timeline--vertical .v-timeline-divider__line.v-locale--is-ltr, .v-locale--is-ltr .v-timeline--vertical .v-timeline-divider__line {
113
+ top: 0;
86
114
  }
87
-
88
- .v-timeline--vertical.v-timeline:not(.v-timeline--inset-line) .v-timeline-item:first-child .v-timeline-divider__line {
115
+ .v-timeline--vertical .v-timeline-divider__line.v-locale--is-rtl, .v-locale--is-rtl .v-timeline--vertical .v-timeline-divider__line {
89
116
  bottom: 0;
90
- height: calc(100% - var(--v-timeline-dot-size) / 2);
91
- }
92
-
93
- .v-timeline--horizontal.v-timeline:not(.v-timeline--inset-line) .v-timeline-item:first-child .v-timeline-divider__line {
94
- width: calc(100% - var(--v-timeline-dot-size) / 2);
95
- inset-inline-end: 0;
96
117
  }
97
118
 
98
- .v-timeline-divider {
99
- position: relative;
100
- display: flex;
101
- align-items: center;
102
- }
103
- .v-timeline--horizontal .v-timeline-divider {
104
- flex-direction: row;
105
- grid-row: 2;
119
+ .v-timeline--vertical .v-timeline-item:last-child .v-timeline-divider__line {
120
+ height: 100%;
106
121
  }
107
122
 
108
- .v-timeline--vertical .v-timeline-divider {
109
- flex-direction: column;
110
- grid-column: 2;
123
+ .v-timeline--horizontal .v-timeline-item:last-child .v-timeline-divider__line {
124
+ width: 100%;
111
125
  }
112
126
 
113
127
  .v-timeline-divider__dot {
@@ -210,34 +224,37 @@
210
224
 
211
225
  .v-timeline--horizontal.v-timeline.v-timeline--side-end .v-timeline-item .v-timeline-item__body {
212
226
  grid-row: 3;
213
- padding-bottom: initial;
214
- padding-top: 24px;
227
+ padding-block-end: initial;
228
+ padding-block-start: 24px;
215
229
  }
216
230
  .v-timeline--horizontal.v-timeline.v-timeline--side-end .v-timeline-item .v-timeline-item__opposite {
217
231
  grid-row: 1;
218
- padding-bottom: 24px;
219
- padding-top: initial;
232
+ padding-block-end: 24px;
233
+ padding-block-start: initial;
220
234
  }
221
235
 
222
236
  .v-timeline--vertical.v-timeline.v-timeline--side-end .v-timeline-item .v-timeline-item__body {
223
237
  grid-column: 3;
224
238
  text-align: initial;
225
239
  padding-inline-start: 24px;
240
+ padding-inline-end: initial;
226
241
  }
227
242
  .v-timeline--vertical.v-timeline.v-timeline--side-end .v-timeline-item .v-timeline-item__opposite {
228
243
  grid-column: 1;
244
+ text-align: end;
229
245
  padding-inline-end: 24px;
246
+ padding-inline-start: initial;
230
247
  }
231
248
 
232
249
  .v-timeline--horizontal.v-timeline.v-timeline--side-start .v-timeline-item .v-timeline-item__body {
233
250
  grid-row: 1;
234
- padding-bottom: 24px;
235
- padding-top: initial;
251
+ padding-block-end: 24px;
252
+ padding-block-start: initial;
236
253
  }
237
254
  .v-timeline--horizontal.v-timeline.v-timeline--side-start .v-timeline-item .v-timeline-item__opposite {
238
255
  grid-row: 3;
239
- padding-bottom: initial;
240
- padding-top: 24px;
256
+ padding-block-end: initial;
257
+ padding-block-start: 24px;
241
258
  }
242
259
 
243
260
  .v-timeline--vertical.v-timeline.v-timeline--side-start .v-timeline-item .v-timeline-item__body {
@@ -247,6 +264,7 @@
247
264
  }
248
265
  .v-timeline--vertical.v-timeline.v-timeline--side-start .v-timeline-item .v-timeline-item__opposite {
249
266
  grid-column: 3;
267
+ text-align: initial;
250
268
  padding-inline-start: 24px;
251
269
  }
252
270
 
@@ -255,6 +273,127 @@
255
273
  width: inherit;
256
274
  }
257
275
 
258
- .v-timeline--truncate-line-end .v-timeline-item:last-child .v-timeline-divider__line {
259
- display: none;
276
+ .v-timeline--horizontal.v-timeline--truncate-line-end .v-timeline-item:last-child .v-timeline-divider__line {
277
+ width: 50%;
278
+ }
279
+
280
+ .v-timeline--vertical.v-timeline--truncate-line-end .v-timeline-item:last-child .v-timeline-divider__line {
281
+ height: 24px;
282
+ }
283
+
284
+ .v-timeline--horizontal.v-timeline--truncate-line-end.v-timeline--align-start .v-timeline-item:last-child .v-timeline-divider__line {
285
+ width: 24px;
286
+ }
287
+
288
+ .v-timeline--horizontal.v-timeline--truncate-line-start .v-timeline-item:first-child .v-timeline-item__body, .v-timeline--horizontal.v-timeline--truncate-line-start .v-timeline-item:first-child .v-timeline-item__opposite, .v-timeline--horizontal.v-timeline--truncate-line-start .v-timeline-item:first-child .v-timeline-divider {
289
+ padding-inline-start: 0;
290
+ }
291
+
292
+ .v-timeline--vertical.v-timeline--truncate-line-start .v-timeline-item:first-child .v-timeline-item__body, .v-timeline--vertical.v-timeline--truncate-line-start .v-timeline-item:first-child .v-timeline-item__opposite, .v-timeline--vertical.v-timeline--truncate-line-start .v-timeline-item:first-child .v-timeline-divider {
293
+ padding-block-start: 0;
294
+ }
295
+
296
+ .v-timeline--horizontal.v-timeline--truncate-line-start.v-timeline--align-center .v-timeline-item:first-child .v-timeline-divider__line {
297
+ width: calc(50% + var(--v-timeline-dot-size));
298
+ }
299
+ .v-timeline--horizontal.v-timeline--truncate-line-start.v-timeline--align-center .v-timeline-item:first-child .v-timeline-divider__line.v-locale--is-ltr, .v-locale--is-ltr .v-timeline--horizontal.v-timeline--truncate-line-start.v-timeline--align-center .v-timeline-item:first-child .v-timeline-divider__line {
300
+ left: calc(50% + 24px - var(--v-timeline-dot-size));
301
+ }
302
+ .v-timeline--horizontal.v-timeline--truncate-line-start.v-timeline--align-center .v-timeline-item:first-child .v-timeline-divider__line.v-locale--is-rtl, .v-locale--is-rtl .v-timeline--horizontal.v-timeline--truncate-line-start.v-timeline--align-center .v-timeline-item:first-child .v-timeline-divider__line {
303
+ right: calc(50% + 24px - var(--v-timeline-dot-size));
304
+ }
305
+
306
+ .v-timeline--vertical.v-timeline--truncate-line-start.v-timeline--align-center .v-timeline-item:first-child .v-timeline-divider__line {
307
+ height: calc(50% + var(--v-timeline-dot-size));
308
+ }
309
+ .v-timeline--vertical.v-timeline--truncate-line-start.v-timeline--align-center .v-timeline-item:first-child .v-timeline-divider__line.v-locale--is-ltr, .v-locale--is-ltr .v-timeline--vertical.v-timeline--truncate-line-start.v-timeline--align-center .v-timeline-item:first-child .v-timeline-divider__line {
310
+ top: calc(50% + 24px - var(--v-timeline-dot-size));
311
+ }
312
+ .v-timeline--vertical.v-timeline--truncate-line-start.v-timeline--align-center .v-timeline-item:first-child .v-timeline-divider__line.v-locale--is-rtl, .v-locale--is-rtl .v-timeline--vertical.v-timeline--truncate-line-start.v-timeline--align-center .v-timeline-item:first-child .v-timeline-divider__line {
313
+ bottom: calc(50% + 24px - var(--v-timeline-dot-size));
314
+ }
315
+
316
+ .v-timeline--horizontal.v-timeline--align-center {
317
+ justify-items: center;
318
+ }
319
+ .v-timeline--horizontal.v-timeline--align-center .v-timeline-divider {
320
+ justify-content: center;
321
+ }
322
+
323
+ .v-timeline--vertical.v-timeline--align-center {
324
+ align-items: center;
325
+ }
326
+ .v-timeline--vertical.v-timeline--align-center .v-timeline-divider {
327
+ justify-content: center;
328
+ }
329
+
330
+ .v-timeline--horizontal .v-timeline--align-start {
331
+ justify-content: flex-start;
332
+ }
333
+
334
+ .v-timeline--vertical.v-timeline--align-start {
335
+ align-items: flex-start;
336
+ }
337
+ .v-timeline--vertical.v-timeline--align-start .v-timeline-divider {
338
+ justify-content: flex-start;
339
+ }
340
+
341
+ .v-timeline--horizontal.v-timeline--inset-line .v-timeline-divider__line {
342
+ width: calc(100% + 24px - var(--v-timeline-dot-size) - var(--v-timeline-line-inset) * 2);
343
+ }
344
+ .v-timeline--horizontal.v-timeline--inset-line .v-timeline-divider__line.v-locale--is-ltr, .v-locale--is-ltr .v-timeline--horizontal.v-timeline--inset-line .v-timeline-divider__line {
345
+ left: calc(50% + var(--v-timeline-line-inset) + var(--v-timeline-dot-size) / 2);
346
+ }
347
+ .v-timeline--horizontal.v-timeline--inset-line .v-timeline-divider__line.v-locale--is-rtl, .v-locale--is-rtl .v-timeline--horizontal.v-timeline--inset-line .v-timeline-divider__line {
348
+ right: calc(50% + var(--v-timeline-line-inset) + var(--v-timeline-dot-size) / 2);
349
+ }
350
+
351
+ .v-timeline--vertical.v-timeline--inset-line .v-timeline-divider__line {
352
+ height: calc(100% + 24px - var(--v-timeline-dot-size) - var(--v-timeline-line-inset) * 2);
353
+ }
354
+ .v-timeline--vertical.v-timeline--inset-line .v-timeline-divider__line.v-locale--is-ltr, .v-locale--is-ltr .v-timeline--vertical.v-timeline--inset-line .v-timeline-divider__line {
355
+ top: calc(50% + var(--v-timeline-line-inset) + var(--v-timeline-dot-size) / 2);
356
+ }
357
+ .v-timeline--vertical.v-timeline--inset-line .v-timeline-divider__line.v-locale--is-rtl, .v-locale--is-rtl .v-timeline--vertical.v-timeline--inset-line .v-timeline-divider__line {
358
+ bottom: calc(50% + var(--v-timeline-line-inset) + var(--v-timeline-dot-size) / 2);
359
+ }
360
+
361
+ .v-timeline--horizontal.v-timeline--inset-line .v-timeline-item:first-child .v-timeline-divider__line {
362
+ width: calc(100% - var(--v-timeline-dot-size) - var(--v-timeline-line-inset) * 2);
363
+ }
364
+ .v-timeline--horizontal.v-timeline--inset-line .v-timeline-item:first-child .v-timeline-divider__line.v-locale--is-ltr, .v-locale--is-ltr .v-timeline--horizontal.v-timeline--inset-line .v-timeline-item:first-child .v-timeline-divider__line {
365
+ left: calc(50% + var(--v-timeline-dot-size) / 2 + 24px / 2 + var(--v-timeline-line-inset));
366
+ }
367
+ .v-timeline--horizontal.v-timeline--inset-line .v-timeline-item:first-child .v-timeline-divider__line.v-locale--is-rtl, .v-locale--is-rtl .v-timeline--horizontal.v-timeline--inset-line .v-timeline-item:first-child .v-timeline-divider__line {
368
+ right: calc(50% + var(--v-timeline-dot-size) / 2 + 24px / 2 + var(--v-timeline-line-inset));
369
+ }
370
+
371
+ .v-timeline--vertical.v-timeline--inset-line .v-timeline-item:first-child .v-timeline-divider__line {
372
+ height: calc(100% - var(--v-timeline-dot-size) - var(--v-timeline-line-inset) * 2);
373
+ }
374
+ .v-timeline--vertical.v-timeline--inset-line .v-timeline-item:first-child .v-timeline-divider__line.v-locale--is-ltr, .v-locale--is-ltr .v-timeline--vertical.v-timeline--inset-line .v-timeline-item:first-child .v-timeline-divider__line {
375
+ top: calc(50% + var(--v-timeline-dot-size) / 2 + 24px / 2 + var(--v-timeline-line-inset));
376
+ }
377
+ .v-timeline--vertical.v-timeline--inset-line .v-timeline-item:first-child .v-timeline-divider__line.v-locale--is-rtl, .v-locale--is-rtl .v-timeline--vertical.v-timeline--inset-line .v-timeline-item:first-child .v-timeline-divider__line {
378
+ bottom: calc(50% + var(--v-timeline-dot-size) / 2 + 24px / 2 + var(--v-timeline-line-inset));
379
+ }
380
+
381
+ .v-timeline--horizontal.v-timeline--inset-line .v-timeline-item:last-child .v-timeline-divider__line {
382
+ width: calc(50% - 24px - var(--v-timeline-line-inset) * 2);
383
+ }
384
+ .v-timeline--horizontal.v-timeline--inset-line .v-timeline-item:last-child .v-timeline-divider__line.v-locale--is-ltr, .v-locale--is-ltr .v-timeline--horizontal.v-timeline--inset-line .v-timeline-item:last-child .v-timeline-divider__line {
385
+ left: calc(50% + var(--v-timeline-line-inset) - 24px / 2 + var(--v-timeline-dot-size) / 2);
386
+ }
387
+ .v-timeline--horizontal.v-timeline--inset-line .v-timeline-item:last-child .v-timeline-divider__line.v-locale--is-rtl, .v-locale--is-rtl .v-timeline--horizontal.v-timeline--inset-line .v-timeline-item:last-child .v-timeline-divider__line {
388
+ right: calc(50% + var(--v-timeline-line-inset) - 24px / 2 + var(--v-timeline-dot-size) / 2);
389
+ }
390
+
391
+ .v-timeline--vertical.v-timeline--inset-line .v-timeline-item:last-child .v-timeline-divider__line {
392
+ height: calc(50% - 24px - var(--v-timeline-line-inset) * 2);
393
+ }
394
+ .v-timeline--vertical.v-timeline--inset-line .v-timeline-item:last-child .v-timeline-divider__line.v-locale--is-ltr, .v-locale--is-ltr .v-timeline--vertical.v-timeline--inset-line .v-timeline-item:last-child .v-timeline-divider__line {
395
+ top: calc(50% + var(--v-timeline-line-inset) - 24px / 2 + var(--v-timeline-dot-size) / 2);
396
+ }
397
+ .v-timeline--vertical.v-timeline--inset-line .v-timeline-item:last-child .v-timeline-divider__line.v-locale--is-rtl, .v-locale--is-rtl .v-timeline--vertical.v-timeline--inset-line .v-timeline-item:last-child .v-timeline-divider__line {
398
+ bottom: calc(50% + var(--v-timeline-line-inset) - 24px / 2 + var(--v-timeline-dot-size) / 2);
260
399
  }
@@ -1,8 +1,6 @@
1
1
  import { createVNode as _createVNode } from "vue";
2
2
  // Styles
3
- import "./VTimeline.css"; // Components
4
-
5
- import { VTimelineItem } from "./VTimelineItem.mjs"; // Composables
3
+ import "./VTimeline.css"; // Composables
6
4
 
7
5
  import { makeTagProps } from "../../composables/tag.mjs";
8
6
  import { makeDensityProps, useDensity } from "../../composables/density.mjs";
@@ -15,6 +13,11 @@ import { VTimelineSymbol } from "./shared.mjs"; // Types
15
13
  export const VTimeline = defineComponent({
16
14
  name: 'VTimeline',
17
15
  props: {
16
+ align: {
17
+ type: String,
18
+ default: 'center',
19
+ validator: v => ['center', 'start'].includes(v)
20
+ },
18
21
  direction: {
19
22
  type: String,
20
23
  default: 'vertical',
@@ -35,8 +38,7 @@ export const VTimeline = defineComponent({
35
38
  lineColor: String,
36
39
  truncateLine: {
37
40
  type: String,
38
- default: 'start',
39
- validator: v => ['none', 'start', 'end', 'both'].includes(v)
41
+ validator: v => ['start', 'end', 'both'].includes(v)
40
42
  },
41
43
  ...makeDensityProps(),
42
44
  ...makeTagProps(),
@@ -61,22 +63,36 @@ export const VTimeline = defineComponent({
61
63
  const side = props.side ? props.side : props.density !== 'default' ? 'end' : null;
62
64
  return side && `v-timeline--side-${side}`;
63
65
  });
66
+ const truncateClasses = computed(() => {
67
+ const classes = ['v-timeline--truncate-line-start', 'v-timeline--truncate-line-end'];
68
+
69
+ switch (props.truncateLine) {
70
+ case 'both':
71
+ return classes;
72
+
73
+ case 'start':
74
+ return classes[0];
75
+
76
+ case 'end':
77
+ return classes[1];
78
+
79
+ default:
80
+ return null;
81
+ }
82
+ });
64
83
  return () => {
65
84
  var _slots$default;
66
85
 
67
86
  return _createVNode(props.tag, {
68
- "class": ['v-timeline', `v-timeline--${props.direction}`, {
69
- 'v-timeline--inset-line': !!props.lineInset,
70
- 'v-timeline--truncate-line-end': props.truncateLine === 'end' || props.truncateLine === 'both'
87
+ "class": ['v-timeline', `v-timeline--${props.direction}`, `v-timeline--align-${props.align}`, !props.lineInset && truncateClasses.value, {
88
+ 'v-timeline--inset-line': !!props.lineInset
71
89
  }, themeClasses.value, densityClasses.value, sideClass.value],
72
90
  "style": {
73
91
  '--v-timeline-line-thickness': convertToUnit(props.lineThickness),
74
92
  '--v-timeline-line-inset': convertToUnit(props.lineInset)
75
93
  }
76
94
  }, {
77
- default: () => [(props.truncateLine === 'none' || props.truncateLine === 'end') && _createVNode(VTimelineItem, {
78
- "hideDot": true
79
- }, null), (_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots)]
95
+ default: () => [(_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots)]
80
96
  });
81
97
  };
82
98
  }