Skip to content

Commit 97a20f6

Browse files
committed
Merge branch 'master' into dev
2 parents 22f666d + 7fe2f80 commit 97a20f6

File tree

33 files changed

+491
-233
lines changed

33 files changed

+491
-233
lines changed

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
}
1414
},
1515
"npmClient": "pnpm",
16-
"version": "3.10.7"
16+
"version": "3.10.8"
1717
}

packages/api-generator/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@vuetify/api-generator",
33
"type": "module",
4-
"version": "3.10.7",
4+
"version": "3.10.8",
55
"private": true,
66
"description": "",
77
"scripts": {

packages/api-generator/src/locale/en/VSnackbar.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"props": {
33
"app": "Respects boundaries of—and will not overlap with—other `app` components like `v-app-bar`, `v-navigation-drawer`, and `v-footer`.",
44
"centered": "Positions the snackbar in the center of the screen, (x and y axis).",
5-
"multiLine": "Gives the snackbar a larger minimum height.",
5+
"multiLine": "Deprecated, use `min-height` instead. Increases minimum height.",
66
"timer": "Display a progress bar that counts down until the snackbar closes. Pass a string to set a custom color, otherwise uses `info`.",
77
"timeout": "Time (in milliseconds) to wait until snackbar is automatically hidden. Use `-1` to keep open indefinitely (`0` in version < 2.3 ). It is recommended for this number to be between `4000` and `10000`. Changes to this property will reset the timeout.",
88
"vertical": "Stacks snackbar content on top of the actions (button)."

packages/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "A Vue.js project",
55
"private": true,
66
"author": "John Leider <john@vuetifyjs.com>",
7-
"version": "3.10.7",
7+
"version": "3.10.8",
88
"repository": {
99
"type": "git",
1010
"url": "git+https://github.com/vuetifyjs/vuetify.git",
Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,29 @@
11
<template>
2-
<v-stepper-vertical
3-
:items="['Step 1', 'Step 2', 'Step 3']"
4-
:mandatory="false"
5-
editable
6-
non-linear
7-
></v-stepper-vertical>
2+
<div>
3+
<v-stepper-vertical
4+
v-model="step"
5+
:mandatory="false"
6+
hide-actions
7+
multiple
8+
non-linear
9+
>
10+
<v-stepper-vertical-item title="Select campaign settings" value="1" editable>
11+
Step content
12+
</v-stepper-vertical-item>
13+
14+
<v-stepper-vertical-item title="Create an ad group" value="2" editable>
15+
Step content
16+
</v-stepper-vertical-item>
17+
18+
<v-stepper-vertical-item title="Create an ad" value="3" editable>
19+
Step content
20+
</v-stepper-vertical-item>
21+
</v-stepper-vertical>
22+
</div>
823
</template>
24+
25+
<script setup>
26+
import { shallowRef } from 'vue'
27+
28+
const step = shallowRef([1])
29+
</script>

packages/docs/src/pages/en/components/vertical-steppers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ The `v-stepper-vertical` is the vertical variant of the [v-stepper](/components/
6464

6565
Non-linear stepper allow the user to navigate freely – skip to a desired section without forcing clicks on the action buttons within, provided **editable** prop is also present. When combined with `:mandatory="false"`, allowes to collapse the section as well.
6666

67-
<ExamplesExample file="v-stepper/prop-non-linear" />
67+
<ExamplesExample file="v-stepper-vertical/prop-non-linear" />
6868

6969
#### Slots
7070

packages/vuetify/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vuetify",
33
"description": "Vue Material Component Framework",
4-
"version": "3.10.7",
4+
"version": "3.10.8",
55
"author": {
66
"name": "John Leider",
77
"email": "john@vuetifyjs.com"

packages/vuetify/src/components/VColorPicker/VColorPickerPreview.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const VColorPickerPreview = defineComponent({
103103
name={ t('$vuetify.colorPicker.ariaLabel.hueSlider') }
104104
modelValue={ props.color?.h }
105105
onUpdate:modelValue={ h => emit('update:color', { ...(props.color ?? nullColor), h }) }
106-
step={ 0 }
106+
step={ 1 }
107107
min={ 0 }
108108
max={ 360 }
109109
disabled={ props.disabled }
@@ -119,7 +119,7 @@ export const VColorPickerPreview = defineComponent({
119119
name={ t('$vuetify.colorPicker.ariaLabel.alphaSlider') }
120120
modelValue={ props.color?.a ?? 1 }
121121
onUpdate:modelValue={ a => emit('update:color', { ...(props.color ?? nullColor), a }) }
122-
step={ 1 / 256 }
122+
step={ 0.01 }
123123
min={ 0 }
124124
max={ 1 }
125125
disabled={ props.disabled }

packages/vuetify/src/components/VConfirmEdit/VConfirmEdit.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { useLocale } from '@/composables/locale'
66
import { useProxiedModel } from '@/composables/proxiedModel'
77

88
// Utilities
9-
import { computed, ref, toRaw, watchEffect } from 'vue'
10-
import { deepEqual, genericComponent, propsFactory, useRender } from '@/util'
9+
import { computed, ref, watchEffect } from 'vue'
10+
import { deepEqual, deepToRaw, genericComponent, propsFactory, useRender } from '@/util'
1111

1212
// Types
1313
import type { PropType, Ref, VNode } from 'vue'
@@ -63,7 +63,7 @@ export const VConfirmEdit = genericComponent<new <T> (
6363
const model = useProxiedModel(props, 'modelValue')
6464
const internalModel = ref()
6565
watchEffect(() => {
66-
internalModel.value = structuredClone(toRaw(model.value))
66+
internalModel.value = structuredClone(deepToRaw(model.value))
6767
})
6868

6969
const { t } = useLocale()
@@ -93,7 +93,7 @@ export const VConfirmEdit = genericComponent<new <T> (
9393
}
9494

9595
function cancel () {
96-
internalModel.value = structuredClone(toRaw(model.value))
96+
internalModel.value = structuredClone(deepToRaw(model.value))
9797
emit('cancel')
9898
}
9999

packages/vuetify/src/components/VDataTable/composables/select.ts

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useProxiedModel } from '@/composables/proxiedModel'
33

44
// Utilities
55
import { computed, inject, provide, shallowRef, toRef } from 'vue'
6-
import { deepEqual, propsFactory, wrapInArray } from '@/util'
6+
import { deepEqual, isPrimitive, propsFactory, wrapInArray } from '@/util'
77

88
// Types
99
import type { InjectionKey, PropType, Ref } from 'vue'
@@ -37,7 +37,7 @@ export interface DataTableSelectStrategy {
3737
type SelectionProps = Pick<DataTableItemProps, 'itemValue'> & {
3838
modelValue: readonly any[]
3939
selectStrategy: 'single' | 'page' | 'all'
40-
valueComparator: typeof deepEqual
40+
valueComparator?: typeof deepEqual
4141
'onUpdate:modelValue': EventProp<[any[]]> | undefined
4242
}
4343

@@ -75,7 +75,9 @@ const allSelectStrategy: DataTableSelectStrategy = {
7575

7676
return selected
7777
},
78-
selectAll: ({ value, allItems, selected }) => allSelectStrategy.select({ items: allItems, value, selected }),
78+
selectAll: ({ value, allItems }) => {
79+
return new Set(value ? allItems.map(item => item.value) : [])
80+
},
7981
}
8082

8183
export const makeDataTableSelectProps = propsFactory({
@@ -88,10 +90,7 @@ export const makeDataTableSelectProps = propsFactory({
8890
type: Array as PropType<readonly any[]>,
8991
default: () => ([]),
9092
},
91-
valueComparator: {
92-
type: Function as PropType<typeof deepEqual>,
93-
default: deepEqual,
94-
},
93+
valueComparator: Function as PropType<typeof deepEqual>,
9594
}, 'DataTable-select')
9695

9796
export const VDataTableSelectionSymbol: InjectionKey<ReturnType<typeof provideSelection>> = Symbol.for('vuetify:data-table-selection')
@@ -101,8 +100,16 @@ export function provideSelection (
101100
{ allItems, currentPage }: { allItems: Ref<SelectableItem[]>, currentPage: Ref<SelectableItem[]> }
102101
) {
103102
const selected = useProxiedModel(props, 'modelValue', props.modelValue, v => {
103+
const customComparator = props.valueComparator
104+
if (customComparator) {
105+
return new Set(wrapInArray(v).map(v => {
106+
return allItems.value.find(item => customComparator(v, item.value))?.value ?? v
107+
}))
108+
}
104109
return new Set(wrapInArray(v).map(v => {
105-
return allItems.value.find(item => props.valueComparator(v, item.value))?.value ?? v
110+
return isPrimitive(v)
111+
? allItems.value.find(item => v === item.value)?.value ?? v
112+
: allItems.value.find(item => deepEqual(v, item.value))?.value ?? v
106113
}))
107114
}, v => {
108115
return [...v.values()]

0 commit comments

Comments
 (0)