Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(VTimePicker): update to v3 #18153

Merged
merged 29 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d8b8872
feat(VTimePicker): Initial conversion
blalan05 Aug 26, 2023
dd5b053
inital working
blalan05 Oct 24, 2023
79da48a
feat(VTimePicker): updating to M3 design
blalan05 Oct 25, 2023
a64c01c
Refactor(VTimePicker): Refactor code to match VDatePicker structure
blalan05 Oct 28, 2023
95fdf1d
refactor(VTimePicker): finish working refactor
blalan05 Oct 30, 2023
cd5897e
Merge branch 'master' into feat/v3-time-picker-labs
blalan05 Mar 15, 2024
b85a635
improve styles
blalan05 Mar 15, 2024
daed64c
chore(locale): add missing locale strings
johnleider Mar 25, 2024
adabb47
chore: remove old VTimePicker
johnleider Mar 25, 2024
5032265
chore: revert changes to dev
johnleider Mar 25, 2024
58f6d6d
refactor: code clean-up
johnleider Mar 25, 2024
4999a60
chore(VTimePicker): resolve import issue
johnleider Mar 25, 2024
7438d38
fix(VTimePicker): add missing type declaration
johnleider Mar 25, 2024
1f818eb
fix(VTimePickerControls): update v-btn to VBtn
johnleider Mar 25, 2024
a208fab
feat(VTimePicker): styles for seconds controls;
blalan05 Mar 25, 2024
a38d10f
fix(VTimePicker): default active and disabled colors
johnleider Mar 26, 2024
b52a31e
docs(VTimePicker): enable doc page
johnleider Mar 26, 2024
af3407e
fix(VTimePicker): color styling and spacing
johnleider Mar 26, 2024
524b7ff
fix(VTimePicker): set default width
johnleider Mar 26, 2024
e88601b
chore(VTimePicker): code clean-up
johnleider Mar 26, 2024
c81f918
docs(VTimePicker): clean-up examples
johnleider Mar 26, 2024
60d9f11
fix(VTimePicker): remove unused sass variables
blalan05 Mar 26, 2024
c362ca5
docs(VTimePicker): fix more examples
johnleider Mar 26, 2024
6014d53
fix(VTimePicker): working without v-model
blalan05 Mar 26, 2024
da68a2c
Merge examples commit
blalan05 Mar 26, 2024
15a078b
fix(VTimePicker): fix v-model
blalan05 Mar 26, 2024
719cbc1
docs(VTimePicker): fix dialog-and-menu example
johnleider Mar 26, 2024
22bc61e
fix(VTimePicker): readonly functionality
johnleider Mar 26, 2024
bdcc40a
chore(VTimePicker): update api
johnleider Mar 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions packages/api-generator/src/locale/en/VTimePicker.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
"format": "Defines the format of a time displayed in picker. Available options are `ampm` and `24hr`.",
"max": "Maximum allowed time.",
"min": "Minimum allowed time.",
"hide-header": "Hide the header of the picker.",
"readonly": "Puts picker in readonly state.",
"scrollable": "Allows changing hour/minute with mouse scroll.",
"useSeconds": "Toggles the use of seconds in picker.",
"use-seconds": "Toggles the use of seconds in picker.",
"value": "Time picker model (ISO 8601 format, 24hr hh:mm).",
"width": "Width of the picker."
},
Expand All @@ -19,9 +20,9 @@
},
"events": {
"change": "Emitted when the time selection is done (when user changes the minute for HH:MM picker and the second for HH:MM:SS picker.",
"click:hour": "Emitted when user selects the hour.",
"click:minute": "Emitted when user selects the minute.",
"click:second": "Emitted when user selects the second.",
"update:hour": "Emitted when user selects the hour.",
"update:minute": "Emitted when user selects the minute.",
"update:second": "Emitted when user selects the second.",
"update:period": "Emitted when user clicks the AM/PM button."
}
}
4 changes: 0 additions & 4 deletions packages/docs/src/data/301.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,8 @@
"components/simple-tables": "/components/tables",
"components/data-tables": "/components/data-tables/basics",
"components/date-pickers-month": "/introduction/roadmap",
"components/time-pickers": "/introduction/roadmap",
"components/overflow-btns": "/introduction/roadmap",
"components/sparklines": "/introduction/roadmap",
"components/server-side-data-tables": "/components/data-tables/server-side-tables",
"components/skeleton-loaders": "/introduction/roadmap",
"components/speed-dials": "/introduction/roadmap",
"components/virtual-data-tables": "/components/data-tables/virtual-tables",
"api/v-click-outside": "/api/v-click-outside-directive",
"api/v-intersect": "/api/v-intersect-directive",
Expand Down
4 changes: 4 additions & 0 deletions packages/docs/src/data/nav.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@
"title": "speed-dials",
"subfolder": "components"
},
{
"title": "time-pickers",
"subfolder": "components"
},
{
"title": "treeview",
"subfolder": "components"
Expand Down
126 changes: 49 additions & 77 deletions packages/docs/src/examples/v-time-picker/misc-dialog-and-menu.vue
Original file line number Diff line number Diff line change
@@ -1,92 +1,64 @@
<template>
<v-row>
<v-col
cols="11"
sm="5"
>
<v-menu
ref="menu"
v-model="menu2"
v-model:return-value="time"
:close-on-content-click="false"
:nudge-right="40"
max-width="290px"
min-width="290px"
transition="scale-transition"
offset-y
<v-container>
<v-row justify="space-around">
<v-col
cols="11"
sm="5"
>
<template v-slot:activator="{ on, attrs }">
<v-text-field
v-model="time"
label="Picker in menu"
prepend-icon="mdi-clock-time-four-outline"
readonly
v-bind="attrs"
v-on="on"
></v-text-field>
</template>
<v-time-picker
v-if="menu2"
<v-text-field
v-model="time"
full-width
@click:minute="menu.save(time)"
></v-time-picker>
</v-menu>
</v-col>
<v-spacer></v-spacer>
<v-col
cols="11"
sm="5"
>
<v-dialog
ref="dialog"
v-model="modal2"
v-model:return-value="time"
width="290px"
persistent
:active="menu2"
:focus="menu2"
label="Picker in menu"
prepend-icon="mdi-clock-time-four-outline"
readonly
>
<v-menu
v-model="menu2"
:close-on-content-click="false"
activator="parent"
transition="scale-transition"
>
<v-time-picker
v-if="menu2"
v-model="time"
full-width
></v-time-picker>
</v-menu>
</v-text-field>
</v-col>

<v-col
cols="11"
sm="5"
>
<template v-slot:activator="{ on, attrs }">
<v-text-field
v-model="time"
label="Picker in dialog"
prepend-icon="mdi-clock-time-four-outline"
readonly
v-bind="attrs"
v-on="on"
></v-text-field>
</template>
<v-time-picker
v-if="modal2"
<v-text-field
v-model="time"
full-width
:active="modal2"
:focused="modal2"
label="Picker in dialog"
prepend-icon="mdi-clock-time-four-outline"
readonly
>
<v-spacer></v-spacer>
<v-btn
color="primary"
variant="text"
@click="modal2 = false"
<v-dialog
v-model="modal2"
activator="parent"
width="auto"
>
Cancel
</v-btn>
<v-btn
color="primary"
variant="text"
@click="dialog.save(time)"
>
OK
</v-btn>
</v-time-picker>
</v-dialog>
</v-col>
</v-row>
<v-time-picker
v-if="modal2"
v-model="time"
></v-time-picker>
</v-dialog>
</v-text-field>
</v-col>
</v-row>
</v-container>
</template>

<script setup>
import { ref } from 'vue'

const menu = ref()
const dialog = ref()

const time = ref(null)
const menu2 = ref(false)
const modal2 = ref(false)
Expand Down
37 changes: 19 additions & 18 deletions packages/docs/src/examples/v-time-picker/prop-allowed-times.vue
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
<template>
<v-row justify="space-around">
<v-time-picker
v-model="time"
:allowed-hours="allowedHours"
:allowed-minutes="allowedMinutes"
class="mt-4"
format="24hr"
max="22:15"
min="9:30"
scrollable
></v-time-picker>
<v-time-picker
v-model="timeStep"
:allowed-minutes="allowedStep"
class="mt-4"
format="24hr"
></v-time-picker>
</v-row>
<v-container>
<v-row justify="space-around">
<v-time-picker
v-model="time"
:allowed-hours="allowedHours"
:allowed-minutes="allowedMinutes"
format="24hr"
max="22:15"
min="9:30"
scrollable
></v-time-picker>

<v-time-picker
v-model="timeStep"
:allowed-minutes="allowedStep"
format="24hr"
></v-time-picker>
</v-row>
</v-container>
</template>

<script setup>
Expand Down
39 changes: 12 additions & 27 deletions packages/docs/src/examples/v-time-picker/prop-color.vue
Original file line number Diff line number Diff line change
@@ -1,29 +1,14 @@
<template>
<v-row justify="space-around">
<v-time-picker
v-model="e4"
color="green-lighten-1"
></v-time-picker>
<v-time-picker
v-model="e4"
color="green-lighten-1"
header-color="primary"
></v-time-picker>
</v-row>
</template>

<script setup>
import { ref } from 'vue'
<v-container>
<v-row justify="space-around">
<v-time-picker
color="green-lighten-1"
></v-time-picker>

const e4 = ref(null)
</script>

<script>
export default {
data () {
return {
e4: null,
}
},
}
</script>
<v-time-picker
color="pink"
header-color="primary"
></v-time-picker>
</v-row>
</v-container>
</template>
37 changes: 7 additions & 30 deletions packages/docs/src/examples/v-time-picker/prop-elevation.vue
Original file line number Diff line number Diff line change
@@ -1,32 +1,9 @@
<template>
<v-row
align="center"
justify="space-around"
>
<v-time-picker
v-model="picker"
flat
></v-time-picker>

<v-time-picker
v-model="picker"
elevation="15"
></v-time-picker>
</v-row>
<v-container>
<v-row justify="center">
<v-time-picker
elevation="15"
></v-time-picker>
</v-row>
</v-container>
</template>

<script setup>
import { ref } from 'vue'

const picker = ref(null)
</script>

<script>
export default {
data () {
return {
picker: null,
}
},
}
</script>
29 changes: 5 additions & 24 deletions packages/docs/src/examples/v-time-picker/prop-format.vue
Original file line number Diff line number Diff line change
@@ -1,26 +1,7 @@
<template>
<v-row justify="center">
<v-col>
<v-time-picker
v-model="e7"
format="24hr"
></v-time-picker>
</v-col>
</v-row>
<v-container>
<v-row justify="center">
<v-time-picker format="24hr"></v-time-picker>
</v-row>
</v-container>
</template>

<script setup>
import { ref } from 'vue'

const e7 = ref(null)
</script>

<script>
export default {
data () {
return {
e7: null,
}
},
}
</script>
7 changes: 7 additions & 0 deletions packages/docs/src/examples/v-time-picker/prop-hide-header.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<template>
<v-container>
<v-row justify="center">
<v-time-picker hide-header></v-time-picker>
</v-row>
</v-container>
</template>
31 changes: 0 additions & 31 deletions packages/docs/src/examples/v-time-picker/prop-no-title.vue

This file was deleted.

Loading
Loading