hash
stringlengths
40
40
date
stringdate
2017-10-11 16:52:59
2025-03-24 06:02:38
author
stringclasses
190 values
commit_message
stringlengths
12
90
is_merge
bool
1 class
masked_commit_message
stringlengths
5
75
type
stringclasses
8 values
git_diff
stringlengths
144
14.2M
c9f3a275051aa43f2081b4880667738ef72f28d8
2019-02-12 13:22:47
Kael
chore: remove word
false
remove word
chore
diff --git a/packages/vuetify/src/components/VDialog/VDialog.js b/packages/vuetify/src/components/VDialog/VDialog.js index 932956a23ff..612ab939b71 100644 --- a/packages/vuetify/src/components/VDialog/VDialog.js +++ b/packages/vuetify/src/components/VDialog/VDialog.js @@ -126,7 +126,7 @@ export default { mounted () { if (getSlotType(this, 'activator', true) === 'v-slot') { - consoleError(`v-dialog's activator slot must be bound to data, try '<template #activator="data"><v-btn v-on="data.on>'`, this) + consoleError(`v-dialog's activator slot must be bound, try '<template #activator="data"><v-btn v-on="data.on>'`, this) } }, diff --git a/packages/vuetify/src/components/VMenu/VMenu.js b/packages/vuetify/src/components/VMenu/VMenu.js index 2005ff1423e..c3ede49ceb4 100644 --- a/packages/vuetify/src/components/VMenu/VMenu.js +++ b/packages/vuetify/src/components/VMenu/VMenu.js @@ -173,7 +173,7 @@ export default Vue.extend({ this.isActive && this.activate() if (getSlotType(this, 'activator', true) === 'v-slot') { - consoleError(`v-tooltip's activator slot must be bound to data, try '<template #activator="data"><v-btn v-on="data.on>'`, this) + consoleError(`v-tooltip's activator slot must be bound, try '<template #activator="data"><v-btn v-on="data.on>'`, this) } }, diff --git a/packages/vuetify/src/components/VTooltip/VTooltip.js b/packages/vuetify/src/components/VTooltip/VTooltip.js index 63f92efd3e0..1e128335fcd 100644 --- a/packages/vuetify/src/components/VTooltip/VTooltip.js +++ b/packages/vuetify/src/components/VTooltip/VTooltip.js @@ -142,7 +142,7 @@ export default { mounted () { if (getSlotType(this, 'activator', true) === 'v-slot') { - consoleError(`v-tooltip's activator slot must be bound to data, try '<template #activator="data"><v-btn v-on="data.on>'`, this) + consoleError(`v-tooltip's activator slot must be bound, try '<template #activator="data"><v-btn v-on="data.on>'`, this) } },
2ad7f67eb1474a8d480e74c6f52445b336d8e622
2018-10-28 15:16:36
John Leider
fix($home-page): added missing ref and ga events
false
added missing ref and ga events
fix
diff --git a/packages/vuetifyjs.com/pages/HomePage.vue b/packages/vuetifyjs.com/pages/HomePage.vue index 9222c52e661..d5fba11546e 100755 --- a/packages/vuetifyjs.com/pages/HomePage.vue +++ b/packages/vuetifyjs.com/pages/HomePage.vue @@ -148,20 +148,27 @@ md4 ) v-card( - :href="feature.url" + :href="`${feature.url}?ref=vuetifyjs.com`" :img="feature.image" height="300px" target="_blank" rel="noopener" + @click="$ga.event('home mwvjs click', 'click', feature.title)" ).elevation-24 v-layout( justify-center pt-3 ) - img( - src="/static/doc-images/powered-by-madewithvue-1.svg" - height="65px" + a( + href="https://madewithvuejs.com?ref=vuetifyjs.com" + target="_blank" + rel="noopener" + @click="$ga.event('home mwvjs click', 'click', 'madewithvuejs')" ) + img( + src="/static/doc-images/powered-by-madewithvue-1.svg" + height="65px" + ) v-jumbotron( dark
127160f37fff9c19cb8e342e628c17782128c63d
2025-03-24 06:02:38
Tauromachian
docs(api): set correct description for border prop (#21108)
false
set correct description for border prop (#21108)
docs
diff --git a/packages/api-generator/src/locale/en/border.json b/packages/api-generator/src/locale/en/border.json index 9639eecdf72..f802a0b292b 100644 --- a/packages/api-generator/src/locale/en/border.json +++ b/packages/api-generator/src/locale/en/border.json @@ -1,5 +1,5 @@ { "props": { - "border": "Designates the **border-radius** applied to the component. This can be **xs**, **sm**, **md**, **lg**, **xl**." + "border": "Applies utility border classes to the component. To use it, you need to omit the `border-` prefix, (for example use `border-sm` as `border=\"sm\"`). Find a list of the built-in border classes on the [borders page](/styles/borders)." } }
be1d41f46e1049381ce60dbdc5ffed993ab240f8
2023-09-08 00:04:57
John Leider
refactor(VDatePickerYears): adjust default height
false
adjust default height
refactor
diff --git a/packages/vuetify/src/labs/VDatePicker/VDatePickerYears.sass b/packages/vuetify/src/labs/VDatePicker/VDatePickerYears.sass index 80ad6c97ffc..a32482a6a01 100644 --- a/packages/vuetify/src/labs/VDatePicker/VDatePickerYears.sass +++ b/packages/vuetify/src/labs/VDatePicker/VDatePickerYears.sass @@ -1,5 +1,5 @@ .v-date-picker-years - height: 308px + height: 320px overflow-y: scroll .v-date-picker-years__content
1c0f0ad17d1d4eed350924d50240d6ad7f482994
2019-09-26 18:17:02
John Leider
revert: "refactor(VTabsSlider): convert to functional"
false
"refactor(VTabsSlider): convert to functional"
revert
diff --git a/packages/vuetify/src/components/VTabs/VTabsSlider.ts b/packages/vuetify/src/components/VTabs/VTabsSlider.ts index 9c11c7b39e5..5246c5666a0 100644 --- a/packages/vuetify/src/components/VTabs/VTabsSlider.ts +++ b/packages/vuetify/src/components/VTabs/VTabsSlider.ts @@ -1,24 +1,18 @@ -// Libraries -import Vue from 'vue' - // Mixins import Colorable from '../../mixins/colorable' +// Utilities +import mixins from '../../util/mixins' + // Types import { VNode } from 'vue/types' /* @vue/component */ -export default Vue.extend({ +export default mixins(Colorable).extend({ name: 'v-tabs-slider', - functional: true, - - props: { - color: String, - }, - - render (h, { props }): VNode { - return h('div', Colorable.options.methods.setBackgroundColor(props.color, { + render (h): VNode { + return h('div', this.setBackgroundColor(this.color, { staticClass: 'v-tabs-slider', })) },
ce6221468cffb4c9876bcb77030a2048459c2c69
2023-11-28 20:41:37
emmettxt
fix(VDataTable): broken design with many nested headers (#18732)
false
broken design with many nested headers (#18732)
fix
diff --git a/packages/vuetify/src/components/VDataTable/composables/headers.ts b/packages/vuetify/src/components/VDataTable/composables/headers.ts index 45039188479..e6e010d25bb 100644 --- a/packages/vuetify/src/components/VDataTable/composables/headers.ts +++ b/packages/vuetify/src/components/VDataTable/composables/headers.ts @@ -179,7 +179,7 @@ function parse (items: InternalDataTableHeader[], maxDepth: number) { if (item.children) { for (const child of item.children) { // This internally sorts items that are on the same priority "row" - const sort = priority % 1 + (fraction / Math.pow(10, currentDepth + 1)) + const sort = priority % 1 + (fraction / Math.pow(10, currentDepth + 2)) queue.enqueue(child, currentDepth + diff + sort) } }
b3175c1d504989a5281c65be058dd329d536321d
2022-06-23 22:22:38
John Leider
refactor(VForm): tuning pass (#15253)
false
tuning pass (#15253)
refactor
diff --git a/packages/vuetify/src/components/VForm/VForm.tsx b/packages/vuetify/src/components/VForm/VForm.tsx index 74f3f51bf74..879666efcb9 100644 --- a/packages/vuetify/src/components/VForm/VForm.tsx +++ b/packages/vuetify/src/components/VForm/VForm.tsx @@ -1,10 +1,10 @@ // Composables import { createForm, makeFormProps } from '@/composables/form' +import { useForwardRef } from '@/composables/forwardRef' // Utilities import { ref } from 'vue' import { defineComponent, useRender } from '@/util' -import { useForwardRef } from '@/composables/forwardRef' // Types import type { SubmitEventPromise } from '@/composables/form'
354d07111e8023e3b6813bc43e6dbb5f5f4554d1
2018-04-05 08:18:56
John Leider
style(v-text-field): cleanup, display fix
false
cleanup, display fix
style
diff --git a/src/components/VTextField/VTextField.js b/src/components/VTextField/VTextField.js index d939e91043c..e8e5d5ae7ea 100755 --- a/src/components/VTextField/VTextField.js +++ b/src/components/VTextField/VTextField.js @@ -165,9 +165,12 @@ export default { if (this.isDirty && this.isSingle) return null const isSingleLine = this.isSingle - const left = (!this.prefix || this.isFocused || this.isDirty) - ? 0 - : 12 + let left = 0 + + if (this.prefix && + (isSingleLine || !this.isFocused) && + !this.isDirty + ) left = 12 const data = { props: { diff --git a/src/stylus/components/_messages.styl b/src/stylus/components/_messages.styl index 2af846ed5f7..a7a6ee08fdc 100644 --- a/src/stylus/components/_messages.styl +++ b/src/stylus/components/_messages.styl @@ -19,7 +19,3 @@ theme(v-messages, "v-messages") line-height: 1 position: absolute transition: $primary-transition - - // .slide-y-transition-leave, - // .slide-y-transition-leave-active - // position: absolute diff --git a/src/stylus/components/_text-fields.styl b/src/stylus/components/_text-fields.styl index 910422f3ae3..84b36843b79 100755 --- a/src/stylus/components/_text-fields.styl +++ b/src/stylus/components/_text-fields.styl @@ -50,6 +50,7 @@ theme(v-text-field, "v-text-field") padding: 8px 0 8px 4px &__wrapper + display: flex flex: 1 1 auto position: relative
11b6dea79f6a9e5b62e64632f30344dc367f4623
2022-07-09 19:54:57
Kael
fix(VSelect): don't show checkboxes if hideSelected is set
false
don't show checkboxes if hideSelected is set
fix
diff --git a/packages/vuetify/src/components/VAutocomplete/VAutocomplete.tsx b/packages/vuetify/src/components/VAutocomplete/VAutocomplete.tsx index feb8acd4c1d..f71a4f30628 100644 --- a/packages/vuetify/src/components/VAutocomplete/VAutocomplete.tsx +++ b/packages/vuetify/src/components/VAutocomplete/VAutocomplete.tsx @@ -263,7 +263,7 @@ export const VAutocomplete = genericComponent<new < onClick={ () => select(item) } > {{ - prepend: ({ isSelected }) => props.multiple ? ( + prepend: ({ isSelected }) => props.multiple && !props.hideSelected ? ( <VCheckboxBtn modelValue={ isSelected } ripple={ false } /> ) : undefined, title: () => { diff --git a/packages/vuetify/src/components/VCombobox/VCombobox.tsx b/packages/vuetify/src/components/VCombobox/VCombobox.tsx index ca8c99ebd65..9520439ed3b 100644 --- a/packages/vuetify/src/components/VCombobox/VCombobox.tsx +++ b/packages/vuetify/src/components/VCombobox/VCombobox.tsx @@ -345,7 +345,7 @@ export const VCombobox = genericComponent<new < onClick={ () => select(item) } > {{ - prepend: ({ isSelected }) => props.multiple ? ( + prepend: ({ isSelected }) => props.multiple && !props.hideSelected ? ( <VCheckboxBtn modelValue={ isSelected } ripple={ false } /> ) : undefined, title: () => { diff --git a/packages/vuetify/src/components/VSelect/VSelect.tsx b/packages/vuetify/src/components/VSelect/VSelect.tsx index f60b804eb1d..a5e741d7451 100644 --- a/packages/vuetify/src/components/VSelect/VSelect.tsx +++ b/packages/vuetify/src/components/VSelect/VSelect.tsx @@ -219,7 +219,7 @@ export const VSelect = genericComponent<new < onClick={ () => select(item) } > {{ - prepend: ({ isSelected }) => props.multiple ? ( + prepend: ({ isSelected }) => props.multiple && !props.hideSelected ? ( <VCheckboxBtn modelValue={ isSelected } ripple={ false } /> ) : undefined, }}
78fc0c4bafb289cb826545282817a08173b59216
2022-11-15 00:11:15
Zerio
docs(contribution): improve info & format (#16082)
false
improve info & format (#16082)
docs
diff --git a/packages/docs/src/pages/en/getting-started/contributing.md b/packages/docs/src/pages/en/getting-started/contributing.md index 51a4cf9fe23..2ba6599f4df 100644 --- a/packages/docs/src/pages/en/getting-started/contributing.md +++ b/packages/docs/src/pages/en/getting-started/contributing.md @@ -22,10 +22,11 @@ It is our job to enable you to create amazing applications. A lot of the time, y The issue list of this repo is exclusively for bug reports and feature requests. Non-conforming issues will be closed immediately. Before reporting an issue: - Search for similar [issues](https://github.com/vuetifyjs/vuetify/issues), it may have been answered already. + > If a similar issue already exists, you do not need to open another issue for this, if you want to help with it in any way, you can help by giving appropriate information in the already existing issue. - Try to reproduce with the [latest](https://github.com/vuetifyjs/vuetify/releases/latest) version in a [codepen](https://template.vuetifyjs.com/) or repository that can be cloned to produce the expected behavior. - Make sure that the reproduction is **MINIMAL** and concise -These steps ensure that we have all the information necessary to quickly triage and resolve your issue. Once your reproduction is complete, submit a new issue using the [Vuetify Issue Creator](https://issues.vuetifyjs.com/). +These steps ensure that we have all the information necessary to quickly triage and resolve your issue. Once your reproduction is complete, submit a new issue using the [Vuetify Issue Creator](https://issues.vuetifyjs.com/). Using this issue creator is required, otherwise the issue will be closed automatically. When writing an issue please provide as much detail as possible. Note that "reproduction steps" should be a series of actions another developer should take after clicking your reproduction link, not a recollection of how you discovered the bug. @@ -33,9 +34,9 @@ Issues that are convoluted and lacking a proper reproduction may be closed by a <alert type="success"> - **TIP** +**TIP** - When you create a reproduction, exclude all **elements, properties, and data variables** that are not needed for the reproduction. This helps drastically reduce the time it takes to triage the issue and ultimately resolve it. +When you create a reproduction, exclude all **elements, properties, and data variables** that are not needed for the reproduction. This helps drastically reduce the time it takes to triage the issue and ultimately resolve it. </alert> @@ -127,6 +128,12 @@ The documentation is located in `packages/docs` but also uses some files from `p If you want to see changes from Vuetify in the documentation you need to run `yarn build:lib` in the vuetify package before starting the documentation server. +<alert type="info"> + +Please note that Vuetify v3's documentation is located on the `next` branch and not on the `master` branch. + +</alert> + ### Submitting Changes / Pull Requests First you should create a fork of the vuetify repository to push your changes to. Information on forking repositories can be found in the [GitHub documentation](https://help.github.com/en/github/getting-started-with-github/fork-a-repo). @@ -145,12 +152,13 @@ git remote add fork [email protected]:YOUR_USERNAME/vuetify.git Before starting development you should know which branch to base your changes on. If in doubt use master as changes to master can usually be merged into a different branch without rebasing. -| Type of change | Branch | -| --- | --- | -| Documentation | `master` | -| Bug fixes | `master` | -| New features | `dev` | -| Features with breaking changes | `next` | +| Type of change | Branch | +| ------------------------------ | -------- | +| Documentation (v2) | `master` | +| Documentation (v3) | `next` | +| Bug fixes | `master` | +| New features | `dev` | +| Features with breaking changes | `next` | ```bash # Switch to the desired branch @@ -169,7 +177,7 @@ Commit your changes following [our guidelines](#commit-guidelines), then push th <alert type="warning"> - Pull requests that include unrelated commits or your local merges may be **closed** without notice. +Pull requests that include unrelated commits or your local merges may be **closed** without notice. </alert> @@ -227,7 +235,7 @@ In order to get a major feature added to Vuetify you must get your RFC merged in <alert type="error"> - RFCs that do not present convincing motivation, demonstrate understanding of the impact of the design, or are disingenuous about the drawbacks or alternatives tend to be poorly-received + RFCs that do not present convincing motivation, demonstrate understanding of the impact of the design, or are disingenuous about the drawbacks or alternatives tend to be poorly-received </alert> @@ -318,7 +326,7 @@ echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc <alert type="warning"> - Sometimes creating a `.czrc` file does not work using the **command prompt**. If you get unexpected results, create the file in your user folder located in the home directory. This is typically located on your primary harddrive in the `Users` folder. +Sometimes creating a `.czrc` file does not work using the **command prompt**. If you get unexpected results, create the file in your user folder located in the home directory. This is typically located on your primary harddrive in the `Users` folder. </alert> @@ -328,6 +336,6 @@ Once complete, instead of using <kbd>git commit</kbd> you will run the command < [commitizen]: https://github.com/commitizen/cz-cli [community]: https://community.vuetifyjs.com/ -[Core Team]: /introduction/meet-the-team/ +[core team]: /introduction/meet-the-team/ [pull request]: https://github.com/vuetifyjs/vuetify/pulls -[Issues]: https://github.com/vuetifyjs/vuetify/issues +[issues]: https://github.com/vuetifyjs/vuetify/issues
fea6d775282c8748a181d10646463fc1ea357206
2023-01-13 02:59:37
John Leider
chore(api-generator): add missing descriptions
false
add missing descriptions
chore
diff --git a/packages/api-generator/src/locale/en/delay.json b/packages/api-generator/src/locale/en/delay.json index d5c62d1e8d2..1067d7bb31d 100644 --- a/packages/api-generator/src/locale/en/delay.json +++ b/packages/api-generator/src/locale/en/delay.json @@ -1,6 +1,6 @@ { "props": { - "closeDelay": "MISSING DESCRIPTION ([edit in github](https://github.com/vuetifyjs/vuetify/tree/next/packages/api-generator/src/locale/en/delay.json))", - "openDelay": "MISSING DESCRIPTION ([edit in github](https://github.com/vuetifyjs/vuetify/tree/next/packages/api-generator/src/locale/en/delay.json))" + "closeDelay": "Milliseconds to wait before closing component. Only applies to hover and focus events.", + "openDelay": "Milliseconds to wait before opening component. Only applies to hover and focus events." } } diff --git a/packages/api-generator/src/locale/en/expand-transition.json b/packages/api-generator/src/locale/en/expand-transition.json index 16824e5ea16..53675a1d29a 100644 --- a/packages/api-generator/src/locale/en/expand-transition.json +++ b/packages/api-generator/src/locale/en/expand-transition.json @@ -1,5 +1,5 @@ { "props": { - "mode": "MISSING DESCRIPTION ([edit in github](https://github.com/vuetifyjs/vuetify/tree/next/packages/api-generator/src/locale/en/expand-transition.json))" + "mode": "Sets the transition mode (does not apply to transition-group)." } } diff --git a/packages/api-generator/src/locale/en/expand-x-transition.json b/packages/api-generator/src/locale/en/expand-x-transition.json index 1fd419ff1b5..53675a1d29a 100644 --- a/packages/api-generator/src/locale/en/expand-x-transition.json +++ b/packages/api-generator/src/locale/en/expand-x-transition.json @@ -1,5 +1,5 @@ { "props": { - "mode": "MISSING DESCRIPTION ([edit in github](https://github.com/vuetifyjs/vuetify/tree/next/packages/api-generator/src/locale/en/expand-x-transition.json))" + "mode": "Sets the transition mode (does not apply to transition-group)." } } diff --git a/packages/api-generator/src/locale/en/focus.json b/packages/api-generator/src/locale/en/focus.json index 032021e14de..353a69c6761 100644 --- a/packages/api-generator/src/locale/en/focus.json +++ b/packages/api-generator/src/locale/en/focus.json @@ -1,5 +1,5 @@ { "props": { - "focused": "MISSING DESCRIPTION ([edit in github](https://github.com/vuetifyjs/vuetify/tree/next/packages/api-generator/src/locale/en/focus.json))" + "focused": "Forces a focused state styling on the component." } } diff --git a/packages/api-generator/src/locale/en/form.json b/packages/api-generator/src/locale/en/form.json index 36799e84e23..1e867ad870a 100644 --- a/packages/api-generator/src/locale/en/form.json +++ b/packages/api-generator/src/locale/en/form.json @@ -1,10 +1,10 @@ { "props": { - "disabled": "MISSING DESCRIPTION ([edit in github](https://github.com/vuetifyjs/vuetify/tree/next/packages/api-generator/src/locale/en/form.json))", - "fastFail": "MISSING DESCRIPTION ([edit in github](https://github.com/vuetifyjs/vuetify/tree/next/packages/api-generator/src/locale/en/form.json))", - "lazyValidation": "MISSING DESCRIPTION ([edit in github](https://github.com/vuetifyjs/vuetify/tree/next/packages/api-generator/src/locale/en/form.json))", - "readonly": "MISSING DESCRIPTION ([edit in github](https://github.com/vuetifyjs/vuetify/tree/next/packages/api-generator/src/locale/en/form.json))", - "modelValue": "MISSING DESCRIPTION ([edit in github](https://github.com/vuetifyjs/vuetify/tree/next/packages/api-generator/src/locale/en/form.json))", - "validateOn": "MISSING DESCRIPTION ([edit in github](https://github.com/vuetifyjs/vuetify/tree/next/packages/api-generator/src/locale/en/form.json))" + "disabled": "Puts all children inputs into a disabled state.", + "fastFail": "Stop validation as soon as any rules fail.", + "lazyValidation": "If enabled, value will always be true unless there are visible validation errors. You can still call validate() to manually trigger validation.", + "readonly": "Puts all children inputs into a readonly state.", + "modelValue": "A boolean value representing the validity of the form.", + "validateOn": "Changes the events in which validation occurs." } }
93b5dacc71ec793a07049ad9e4d572bff0b766e0
2020-06-23 09:15:28
John Leider
docs: tuning pass on ads
false
tuning pass on ads
docs
diff --git a/packages/docs-next/src/components/ad/Ad.vue b/packages/docs-next/src/components/ad/Ad.vue index b818288a01d..44647b4afe5 100644 --- a/packages/docs-next/src/components/ad/Ad.vue +++ b/packages/docs-next/src/components/ad/Ad.vue @@ -1,7 +1,7 @@ <template> <v-sheet :style="styles" - class="d-inline-block my-2" + class="v-app-ad d-inline-flex flex-child-1 grow-shrink-0 my-2" rounded width="100%" v-bind="$attrs" @@ -23,6 +23,8 @@ mixins: [Density], + inheritAttrs: false, + computed: { minHeight () { if (this.compact) return 52 @@ -38,3 +40,12 @@ }, } </script> + +<style lang="sass"> + .v-app-ad + a + text-decoration: none + + .v-markdown p + margin-bottom: 0 +</style> diff --git a/packages/docs-next/src/components/ad/Carbon.vue b/packages/docs-next/src/components/ad/Carbon.vue index d2274d60ecc..b6b76cd5ab2 100644 --- a/packages/docs-next/src/components/ad/Carbon.vue +++ b/packages/docs-next/src/components/ad/Carbon.vue @@ -30,6 +30,8 @@ <style lang="sass"> #carbonads + width: 100% + > span display: flex position: relative diff --git a/packages/docs-next/src/components/ad/Inline.vue b/packages/docs-next/src/components/ad/Inline.vue new file mode 100644 index 00000000000..53c480c4d06 --- /dev/null +++ b/packages/docs-next/src/components/ad/Inline.vue @@ -0,0 +1,30 @@ +<template> + <app-md + v-if="current" + class="v-markdown--inline d-inline" + tag="span" + > + {{ current.metadata.description }} + </app-md> +</template> + +<script> + // Mixins + import Ad from '@/mixins/ad' + + export default { + name: 'InlineAd', + + mixins: [Ad], + } +</script> + +<style lang="sass"> + .v-markdown--inline + a + font-weight: 500 + text-decoration: none + p + display: inline + margin: 0 +</style> diff --git a/packages/docs-next/src/components/ad/Promoted.vue b/packages/docs-next/src/components/ad/Promoted.vue index d66ea76f76e..268e9874395 100644 --- a/packages/docs-next/src/components/ad/Promoted.vue +++ b/packages/docs-next/src/components/ad/Promoted.vue @@ -1,43 +1,60 @@ <template> <div class="mb-8"> - <vuetify-ad - v-bind="$attrs" - class="v-vuetify-ad--promoted" - compact - entry - max-width="720" - outlined - /> + <a v-bind="adAttrs"> + <app-ad + v-bind="$attrs" + class="v-vuetify-ad--promoted" + compact + entry + max-width="720" + outlined + > + <v-img + v-if="current.metadata.src" + :alt="`Link to ${current.title}`" + :src="current.metadata.src" + class="mx-4" + contain + height="56" + max-width="56" + /> + + <v-img + :src="current.metadata.bg" + class="flex-1-1-auto rounded-r px-3 px-sm-6 d-flex align-center" + dark + max-height="56" + > + <app-md + v-if="current.metadata.description" + class="text-subtitle-2 text-sm-h6 font-weight-light" + v-text="current.metadata.description" + /> + </v-img> + </app-ad> + </a> </div> </template> <script> + // Mixins + import Ad from '@/mixins/ad' + export default { name: 'PromotedAd', + mixins: [Ad], + inheritAttrs: false, } </script> <style lang="sass"> .v-vuetify-ad--promoted - .v-avatar - margin: 0 1rem 0 1rem - - .v-markdown p - font-size: 1.25rem - font-weight: 300 - - strong - font-weight: 700 + .v-markdown p strong + font-weight: 700 .v-vuetify-ad__bg border-bottom-right-radius: inherit border-top-right-radius: inherit - - .v-list-item__content - color: #FFFFFF - flex: 0 1 auto - height: 100% - padding: 0 24px </style> diff --git a/packages/docs-next/src/components/ad/Sponsored.vue b/packages/docs-next/src/components/ad/Sponsored.vue index e3bcc2dbd0e..9ab34662616 100644 --- a/packages/docs-next/src/components/ad/Sponsored.vue +++ b/packages/docs-next/src/components/ad/Sponsored.vue @@ -1,13 +1,64 @@ <template> - <vuetify-ad - v-bind="$attrs" - bg-color="#1976D21F" - color="light-blue--text text--darken-4" + <app-ad + class="v-app-ad--sponsored" compact max-width="512" - /> + v-bind="$attrs" + > + <v-hover> + <template v-slot="{ hover }"> + <a v-bind="adAttrs"> + <v-sheet + class="overflow-none position-relative d-flex px-4 py-2 align-center" + color="transparent" + rounded + > + <v-overlay + :color="color" + :opacity="hover ? .15 : .1" + absolute + /> + + <v-icon + :color="color" + class="mr-3" + x-large + v-text="icon" + /> + + <div + :class="dcolor" + class="text-subtitle-2 text-sm-subtitle-1 font-weight-medium" + v-text="current.metadata.description" + /> + </v-sheet> + </a> + </template> + </v-hover> + </app-ad> </template> <script> - export default { name: 'SponsoredAd' } + // Mixins + import Ad from '@/mixins/ad' + + export default { + name: 'SponsoredAd', + + mixins: [Ad], + + data: () => ({ + color: 'light-blue darken-4', + dcolor: 'light-blue--text text--darken-4', + }), + + computed: { + icon () { + switch (this.current.metadata.type) { + case 'Video': return '$mdiPlayCircle' + default: return '$mdiVuetify' + } + }, + }, + } </script> diff --git a/packages/docs-next/src/components/ad/Vuetify.vue b/packages/docs-next/src/components/ad/Vuetify.vue index 24dca0f85fa..ae73871a665 100644 --- a/packages/docs-next/src/components/ad/Vuetify.vue +++ b/packages/docs-next/src/components/ad/Vuetify.vue @@ -1,6 +1,5 @@ <template> <app-ad - :color="bgColor" class="v-vuetify-ad" v-bind="{ ...$attrs, @@ -9,14 +8,13 @@ > <v-list-item v-if="current" - :class="[entry ? 'px-0' : 'px-2']" - :color="bgColor" - class="rounded" + class="rounded px-2" style="min-height: inherit;" v-bind="adAttrs" > <v-list-item-avatar v-if="src" + class="my-0" size="56" tile > @@ -28,148 +26,57 @@ /> </v-list-item-avatar> - <v-icon - v-else-if="icon" - :class="[color]" - class="mr-3" - large - v-text="icon" - /> + <v-list-item-content class="py-1"> + <v-list-item-title + class="font-weight-medium mb-1 subtitle-1 hidden-xs-only" + v-text="current.title" + /> - <v-img - :src="metadata.bg" - class="v-vuetify-ad__bg" - max-height="56" - > - <v-list-item-content> - <v-list-item-title - v-if="!isSponsored" - class="font-weight-medium mb-1 subtitle-1" - v-text="current.title" + <div> + <app-md + v-if="current.metadata.description" + class="caption text--secondary" + v-text="current.metadata.description" /> - - <div - :class="{ - [color || 'text--secondary']: !entry, - 'body-1 font-weight-medium': isSponsored, - 'caption': !isSponsored, - 'white--text': entry, - }" - > - <app-md - v-if="metadata.description" - - v-text="metadata.description" - /> - </div> - </v-list-item-content> - - <i18n - v-if="!compact" - class="powered-by align-self-end justify-self-end pl-4 mt-2" - path="ads-via-vuetify" - tag="div" - /> - </v-img> + </div> + </v-list-item-content> + + <i18n + v-if="!compact" + class="powered-by align-self-end justify-self-end pl-4 my-2 hidden-sm-and-down" + path="ads-via-vuetify" + tag="div" + /> </v-list-item> </app-ad> </template> <script> - // Utilities - import { get } from 'vuex-pathify' + // Mixins + import Ad from '@/mixins/ad' + import Density from '@/mixins/density' export default { name: 'VuetifyAd', + mixins: [ + Ad, + Density, + ], + props: { - bgColor: String, color: String, - comfortable: Boolean, - compact: Boolean, - entry: Boolean, - discover: Boolean, - outlined: Boolean, slug: String, }, - - computed: { - all: get('ads/all'), - locale: get('route/params@locale'), - ads () { - if (!this.discover) return this.all - - return this.all.filter(ad => ad.metadata.type === 'Discovery') - }, - adAttrs () { - if (!this.current) return undefined - - const [url, query] = this.metadata.url.split('?') - - if (!url.startsWith('http')) { - return { to: `/${this.locale}${url}/` } - } - - return { - href: `${url}?ref=vuetifyjs.com${query ? `&${query}` : ''}`, - target: '_blank', - } - }, - icon () { - switch (this.metadata.type) { - case 'Video': return '$mdiPlayCircle' - default: return '$mdiVuetify' - } - }, - isSponsored () { - return this.metadata.sponsored - }, - current () { - const index = !this.slug - ? this.getRandomIndex() - : this.getSlugIndex() - - return this.ads[index] - }, - metadata () { - return this.current ? this.current.metadata : {} - }, - src () { - return this.entry || ( - this.metadata.src && - !this.compact - ) ? this.metadata.src : undefined - }, - }, - - methods: { - getSlugIndex () { - return this.ads.findIndex(ad => ad.slug === this.slug) - }, - getRandomIndex () { - return Math.floor(Math.random() * this.ads.length) - }, - }, } </script> <style lang="sass"> .v-vuetify-ad - .v-markdown p - margin-bottom: 0 - .powered-by color: rgba(0, 0, 0, .6) font-size: 0.625rem font-weight: 400 letter-spacing: 0.09375rem text-transform: uppercase - - &__bg.v-responsive - flex: 1 1 auto - flex-wrap: nowrap - - .v-responsive__content - align-items: center - display: flex </style> diff --git a/packages/docs-next/src/components/app/Link.vue b/packages/docs-next/src/components/app/Link.vue index 35b08df15eb..abc68972f1b 100644 --- a/packages/docs-next/src/components/app/Link.vue +++ b/packages/docs-next/src/components/app/Link.vue @@ -1,7 +1,7 @@ <template> <component :is="component" - class="text-decoration-none primary--text font-weight-medium d-inline-flex align-center" + class="app-link text-decoration-none primary--text font-weight-medium d-inline-flex align-center" v-bind="attrs" > <slot /> @@ -60,3 +60,9 @@ }, } </script> + +<style lang="sass"> + .app-link + p + margin-bottom: 0 +</style> diff --git a/packages/docs-next/src/components/app/Md.vue b/packages/docs-next/src/components/app/Md.vue index 3da2f3a254f..c13084bcc4c 100644 --- a/packages/docs-next/src/components/app/Md.vue +++ b/packages/docs-next/src/components/app/Md.vue @@ -25,8 +25,10 @@ : data.domProps ? data.domProps.textContent : '' const innerHTML = md.render(text, {}) + data.staticClass = `v-markdown ${data.staticClass || ''}`.trim() + return h(props.tag, { - staticClass: 'v-markdown', + ...data, domProps: { innerHTML }, }) }, diff --git a/packages/docs-next/src/mixins/ad.js b/packages/docs-next/src/mixins/ad.js new file mode 100644 index 00000000000..214e9944bf8 --- /dev/null +++ b/packages/docs-next/src/mixins/ad.js @@ -0,0 +1,76 @@ +// Utilities +import { get } from 'vuex-pathify' + +export default { + name: 'ad', + + props: { + discover: Boolean, + slug: { + type: String, + required: true, + }, + }, + + computed: { + all: get('ads/all'), + locale: get('route/params@locale'), + ads () { + if (!this.discover) return this.all + + return this.all.filter(ad => { + return ( + ad.metadata.type === 'Discovery' && + !ad.metadata.sponsored + ) + }) + }, + adAttrs () { + if (!this.current) return undefined + + return { + class: 'text-decoration-none', + href: this.href, + target: '_blank', + rel: 'noopener' + this.isSponsored ? ' sponsored' : '', + } + }, + current () { + const index = !this.slug + ? this.getRandomIndex() + : this.getSlugIndex() + + return this.ads[index] + }, + href () { + if (!this.current) return undefined + + const [url, query] = this.current.metadata.url.split('?') + + if (!url.startsWith('http')) { + return `/${this.locale}${url}/` + } + + return `${url}?ref=vuetifyjs.com${query ? `&${query}` : ''}` + }, + isSponsored () { + if (!this.current) return undefined + + return this.current.metadata.sponsored + }, + src () { + if (!this.current || this.compact) return undefined + + return this.current.metadata.src + }, + }, + + methods: { + getSlugIndex () { + return this.ads.findIndex(ad => ad.slug === this.slug) + }, + getRandomIndex () { + return Math.floor(Math.random() * this.ads.length) + }, + }, +} diff --git a/packages/docs-next/src/pages/en/company/advertising-with-us.md b/packages/docs-next/src/pages/en/company/advertising-with-us.md index 620b5397414..93a14593d57 100644 --- a/packages/docs-next/src/pages/en/company/advertising-with-us.md +++ b/packages/docs-next/src/pages/en/company/advertising-with-us.md @@ -14,6 +14,7 @@ Entry ads are placed at the front of pages after the introduction <entry-ad /> +## Promoted Ad Promoted ads replace the pages default entry ad <promoted-ad slug="vuemastery-getting-started" /> @@ -38,6 +39,11 @@ Exit ads are placed at the end of pages. <exit-ad /> +## Inline Ads +I am an inline ad. <inline-ad slug="scrimba-buttons" /> + +--- + <up-next /> <contribute /> diff --git a/packages/docs-next/src/pages/en/components/buttons.md b/packages/docs-next/src/pages/en/components/buttons.md index ee5be29ecdf..851d558f4ca 100644 --- a/packages/docs-next/src/pages/en/components/buttons.md +++ b/packages/docs-next/src/pages/en/components/buttons.md @@ -6,7 +6,7 @@ meta: --- # Buttons -Component description +The `v-btn` component replaces the standard html button with a material design theme and a multitude of options. Any color helper class can be used to alter the background or text color. <inline-ad slug="scrimba-buttons" /> <entry-ad /> diff --git a/packages/docs-next/src/styles/overrides.sass b/packages/docs-next/src/styles/overrides.sass index a540d40496b..e828acb2f18 100644 --- a/packages/docs-next/src/styles/overrides.sass +++ b/packages/docs-next/src/styles/overrides.sass @@ -15,3 +15,19 @@ h1 ul, ol margin-bottom: .5rem + +// Helpers +.flex-1-1-auto + flex: 1 1 auto !important + +.flex-1-0-auto + flex: 1 0 auto !important + +.flex-0-1-auto + flex: 0 1 auto !important + +.flex-0-0-auto + flex: 0 0 auto !important + +.position-relative + position: relative !important
457ff242f5431163d4decd78993bca4d8298de79
2021-07-10 03:11:10
John Leider
fix(VAlert): properly display active-color when active
false
properly display active-color when active
fix
diff --git a/packages/vuetify/src/components/VAlert/VAlert.tsx b/packages/vuetify/src/components/VAlert/VAlert.tsx index 370d7cc5a64..6c1c0e7e9a6 100644 --- a/packages/vuetify/src/components/VAlert/VAlert.tsx +++ b/packages/vuetify/src/components/VAlert/VAlert.tsx @@ -18,7 +18,7 @@ import { useProxiedModel } from '@/composables/proxiedModel' import { useTextColor } from '@/composables/color' // Utilities -import { computed } from 'vue' +import { computed, reactive, toRef } from 'vue' import { defineComponent } from '@/util' // Types @@ -94,20 +94,21 @@ export default defineComponent({ return props.icon ?? `$${props.type}` }) - const variantProps = computed(() => ({ - color: props.color ?? props.type, - variant: props.variant, - })) + const variantProps = reactive({ + color: computed(() => (props.color ?? props.type)), + textColor: toRef(props, 'textColor'), + variant: toRef(props, 'variant'), + }) const { themeClasses } = useTheme(props) const { borderClasses } = useBorder(borderProps.value, 'v-alert') - const { colorClasses, colorStyles, variantClasses } = useVariant(variantProps.value, 'v-alert') + const { colorClasses, colorStyles, variantClasses } = useVariant(variantProps, 'v-alert') const { densityClasses } = useDensity(props, 'v-alert') const { elevationClasses } = useElevation(props) const { positionClasses, positionStyles } = usePosition(props, 'v-alert') const { roundedClasses } = useRounded(props, 'v-alert') const { textColorClasses, textColorStyles } = useTextColor(computed(() => { - return props.borderColor ?? (props.tip ? variantProps.value.color : undefined) + return props.borderColor ?? (props.tip ? variantProps.color : undefined) })) function onCloseClick (e: MouseEvent) { diff --git a/packages/vuetify/src/components/VList/VListItem.tsx b/packages/vuetify/src/components/VList/VListItem.tsx index 71856dced82..9c65f3574db 100644 --- a/packages/vuetify/src/components/VList/VListItem.tsx +++ b/packages/vuetify/src/components/VList/VListItem.tsx @@ -23,7 +23,7 @@ import { genOverlays, makeVariantProps, useVariant } from '@/composables/variant import { Ripple } from '@/directives/ripple' // Utilities -import { computed } from 'vue' +import { computed, reactive, toRef } from 'vue' import { defineComponent } from '@/util' export default defineComponent({ @@ -60,9 +60,16 @@ export default defineComponent({ const isActive = computed(() => { return props.active || link.isExactActive?.value }) + const activeColor = props.activeColor ?? props.color + const variantProps = reactive({ + color: computed(() => (isActive.value ? activeColor : props.color)), + textColor: toRef(props, 'textColor'), + variant: toRef(props, 'variant'), + }) + const { themeClasses } = useTheme(props) const { borderClasses } = useBorder(props, 'v-list-item') - const { colorClasses, colorStyles, variantClasses } = useVariant(props, 'v-list-item') + const { colorClasses, colorStyles, variantClasses } = useVariant(variantProps, 'v-list-item') const { densityClasses } = useDensity(props, 'v-list-item') const { dimensionStyles } = useDimension(props) const { elevationClasses } = useElevation(props)
04c4adcd976bea7b5e20ca399f3a929f6499e571
2019-04-01 21:10:31
Kael
refactor: use a single theme mixin (#6889)
false
use a single theme mixin (#6889)
refactor
diff --git a/packages/vuetify/src/components/VAlert/VAlert.sass b/packages/vuetify/src/components/VAlert/VAlert.sass index dd6b50a591a..a3aeff4e365 100644 --- a/packages/vuetify/src/components/VAlert/VAlert.sass +++ b/packages/vuetify/src/components/VAlert/VAlert.sass @@ -1,13 +1,12 @@ // Imports @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' // Theme -.v-alert.theme--light - +alert-theme($material-light) -.v-alert.theme--dark - +alert-theme($material-dark) ++theme(v-alert) using ($material) + .v-alert--prominent .v-alert__icon + &:after + background: map-get($material, 'dividers') // Block .v-alert diff --git a/packages/vuetify/src/components/VAlert/_mixins.sass b/packages/vuetify/src/components/VAlert/_mixins.sass deleted file mode 100644 index b49a81283cb..00000000000 --- a/packages/vuetify/src/components/VAlert/_mixins.sass +++ /dev/null @@ -1,4 +0,0 @@ -@mixin alert-theme($material) - .v-alert--prominent .v-alert__icon - &:after - background: map-get($material, 'dividers') diff --git a/packages/vuetify/src/components/VApp/VApp.sass b/packages/vuetify/src/components/VApp/VApp.sass index b7e86f252c0..96cf1c631ce 100644 --- a/packages/vuetify/src/components/VApp/VApp.sass +++ b/packages/vuetify/src/components/VApp/VApp.sass @@ -1,5 +1,19 @@ @import '../../styles/styles.sass' -@import './_mixins.sass' + +// Theme ++theme(application) using ($material) + background: map-get($material, 'background') + color: map-deep-get($material, 'text', 'primary') + + .text + &--primary + color: map-deep-get($material, 'text', 'primary') !important + + &--secondary + color: map-deep-get($material, 'text', 'secondary') !important + + &--disabled + color: map-deep-get($material, 'text', 'disabled') !important .application display: flex @@ -19,12 +33,8 @@ max-width: 100% position: relative -.application.theme--light - +application-theme($material-light) -.application.theme--dark - +application-theme($material-dark) - -@include firefox() +// Firefox overrides +@-moz-document url-prefix() @media print .application display: block diff --git a/packages/vuetify/src/components/VApp/_mixins.sass b/packages/vuetify/src/components/VApp/_mixins.sass deleted file mode 100644 index 358fd5166e9..00000000000 --- a/packages/vuetify/src/components/VApp/_mixins.sass +++ /dev/null @@ -1,17 +0,0 @@ -@mixin application-theme($material) - background: map-get($material, 'background') - color: map-deep-get($material, 'text', 'primary') - - .text - &--primary - color: map-deep-get($material, 'text', 'primary') !important - - &--secondary - color: map-deep-get($material, 'text', 'secondary') !important - - &--disabled - color: map-deep-get($material, 'text', 'disabled') !important - -@mixin firefox() - @-moz-document url-prefix() - @content diff --git a/packages/vuetify/src/components/VBanner/VBanner.sass b/packages/vuetify/src/components/VBanner/VBanner.sass index 612733888ff..d98ef3d6db6 100644 --- a/packages/vuetify/src/components/VBanner/VBanner.sass +++ b/packages/vuetify/src/components/VBanner/VBanner.sass @@ -1,13 +1,11 @@ // Imports @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' // Theme -.v-banner.theme--light - +banner-theme($material-light) -.v-banner.theme--dark - +banner-theme($material-dark) ++theme(v-banner) using ($material) + .v-banner__wrapper + border-bottom: 1px solid map-get($material, 'dividers') // Block .v-banner diff --git a/packages/vuetify/src/components/VBanner/_mixins.sass b/packages/vuetify/src/components/VBanner/_mixins.sass deleted file mode 100644 index 550c18fc084..00000000000 --- a/packages/vuetify/src/components/VBanner/_mixins.sass +++ /dev/null @@ -1,3 +0,0 @@ -@mixin banner-theme($material) - .v-banner__wrapper - border-bottom: 1px solid map-get($material, 'dividers') diff --git a/packages/vuetify/src/components/VBottomNavigation/VBottomNavigation.sass b/packages/vuetify/src/components/VBottomNavigation/VBottomNavigation.sass index 489e59d2d1c..cef4a773ee0 100644 --- a/packages/vuetify/src/components/VBottomNavigation/VBottomNavigation.sass +++ b/packages/vuetify/src/components/VBottomNavigation/VBottomNavigation.sass @@ -1,15 +1,15 @@ @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' // Theme -.v-bottom-navigation.theme--light - +bottom-nav-theme($material-light) -.v-bottom-navigation.theme--dark - +bottom-nav-theme($material-dark) ++theme(v-bottom-navigation) using ($material) + background-color: map-get($material, 'cards') - .v-btn.v-btn--active - color: map-deep-get($material-dark, 'text', 'primary') + .v-btn + color: map-deep-get($material, 'text', 'secondary') !important + + &--active + color: map-deep-get($material, 'text', 'primary') !important // Block .v-item-group.v-bottom-navigation diff --git a/packages/vuetify/src/components/VBottomNavigation/_mixins.sass b/packages/vuetify/src/components/VBottomNavigation/_mixins.sass deleted file mode 100644 index 6022c1d1e14..00000000000 --- a/packages/vuetify/src/components/VBottomNavigation/_mixins.sass +++ /dev/null @@ -1,5 +0,0 @@ -@mixin bottom-nav-theme($material) - background-color: map-get($material, 'cards') - - .v-btn:not(.v-btn--active) - color: map-deep-get($material, 'text', 'secondary') !important diff --git a/packages/vuetify/src/components/VBreadcrumbs/VBreadcrumbs.sass b/packages/vuetify/src/components/VBreadcrumbs/VBreadcrumbs.sass index a6b029a5a03..b67d211c020 100644 --- a/packages/vuetify/src/components/VBreadcrumbs/VBreadcrumbs.sass +++ b/packages/vuetify/src/components/VBreadcrumbs/VBreadcrumbs.sass @@ -1,11 +1,10 @@ @import '../../styles/styles.sass' @import './_variables' -@import './_mixins' -.v-breadcrumbs.theme--light - +breadcrumbs-theme($material-light) -.v-breadcrumbs.theme--dark - +breadcrumbs-theme($material-dark) +// Theme ++theme(v-breadcrumbs) using ($material) + .v-breadcrumbs__divider, .v-breadcrumbs__item--disabled + color: map-deep-get($material, 'text', 'disabled') // Block .v-breadcrumbs diff --git a/packages/vuetify/src/components/VBreadcrumbs/_mixins.sass b/packages/vuetify/src/components/VBreadcrumbs/_mixins.sass deleted file mode 100644 index 5e1c81d792e..00000000000 --- a/packages/vuetify/src/components/VBreadcrumbs/_mixins.sass +++ /dev/null @@ -1,3 +0,0 @@ -@mixin breadcrumbs-theme($material) - .v-breadcrumbs__divider, .v-breadcrumbs__item--disabled - color: map-deep-get($material, 'text', 'disabled') diff --git a/packages/vuetify/src/components/VBtn/VBtn.sass b/packages/vuetify/src/components/VBtn/VBtn.sass index 516a195768c..0516aebf5b1 100644 --- a/packages/vuetify/src/components/VBtn/VBtn.sass +++ b/packages/vuetify/src/components/VBtn/VBtn.sass @@ -1,7 +1,6 @@ // Imports @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' // Theme .v-btn:not(.v-btn--outline) @@ -14,10 +13,27 @@ &.info color: map-deep-get($material-dark, 'text', 'primary') -.v-btn.theme--light - +btn-theme($material-light) -.v-btn.theme--dark - +btn-theme($material-dark) ++theme(v-btn) using ($material) + color: map-deep-get($material, 'text', 'primary') + + &.v-btn--disabled + color: map-deep-get($material, 'buttons', 'disabled') !important + + .v-icon, + .v-btn__loading + color: map-deep-get($material, 'buttons', 'disabled') !important + + &:not(.v-btn--flat):not(.v-btn--outline) + background-color: map-deep-get($material, 'buttons', 'focused') !important + + &:not(.v-btn--flat) + background-color: map-get($material, 'app-bar') + + &.v-btn--outline.v-btn--text + border-color: map-get($material, 'dividers') + + &.v-btn--icon + color: map-deep-get($material, 'icons', 'active') // Block .v-btn diff --git a/packages/vuetify/src/components/VBtn/_mixins.sass b/packages/vuetify/src/components/VBtn/_mixins.sass deleted file mode 100644 index 4bf4ed37eaa..00000000000 --- a/packages/vuetify/src/components/VBtn/_mixins.sass +++ /dev/null @@ -1,21 +0,0 @@ -@mixin btn-theme($material) - color: map-deep-get($material, 'text', 'primary') - - &.v-btn--disabled - color: map-deep-get($material, 'buttons', 'disabled') !important - - .v-icon, - .v-btn__loading - color: map-deep-get($material, 'buttons', 'disabled') !important - - &:not(.v-btn--flat):not(.v-btn--outline) - background-color: map-deep-get($material, 'buttons', 'focused') !important - - &:not(.v-btn--flat) - background-color: map-get($material, 'app-bar') - - &.v-btn--outline.v-btn--text - border-color: map-get($material, 'dividers') - - &.v-btn--icon - color: map-deep-get($material, 'icons', 'active') diff --git a/packages/vuetify/src/components/VBtnToggle/VBtnToggle.sass b/packages/vuetify/src/components/VBtnToggle/VBtnToggle.sass index 4f51b5c90e7..4a0683d1ab1 100644 --- a/packages/vuetify/src/components/VBtnToggle/VBtnToggle.sass +++ b/packages/vuetify/src/components/VBtnToggle/VBtnToggle.sass @@ -2,16 +2,8 @@ @import '../../styles/styles.sass' @import './_variables.sass' -// first function, should move to global functions -// does a deep map-get -@function map-deep-get($map, $keys...) - @each $key in $keys - $map: map-get($map, $key) - - @return $map - -// Mixins -@mixin button-toggle-theme($material) +// Theme ++theme(v-btn-toggle) using ($material) .v-btn.v-btn border-color: map-get($material, 'dividers') !important @@ -21,11 +13,6 @@ .v-icon color: map-deep-get($material, 'toggle-buttons', 'color') -.v-btn-toggle.theme--light - +button-toggle-theme($material-light) -.v-btn-toggle.theme--dark - +button-toggle-theme($material-dark) - // Block .v-btn-toggle border-radius: 2px diff --git a/packages/vuetify/src/components/VCalendar/VCalendarDaily.sass b/packages/vuetify/src/components/VCalendar/VCalendarDaily.sass index 7df83e7b833..4fcc5963b85 100644 --- a/packages/vuetify/src/components/VCalendar/VCalendarDaily.sass +++ b/packages/vuetify/src/components/VCalendar/VCalendarDaily.sass @@ -1,12 +1,38 @@ @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' // Theme -.v-calendar-daily.theme--light - +calendar-daily-theme($material-light) -.v-calendar-daily.theme--dark - +calendar-daily-theme($material-dark) ++theme(v-calendar-daily) using ($material) + background-color: map-deep-get($material, 'calendar', 'background-color') + + .v-calendar-daily__intervals-head + border-right: map-deep-get($material, 'calendar', 'line-color') 1px solid + + .v-calendar-daily_head-day + border-right: map-deep-get($material, 'calendar', 'line-color') 1px solid + border-bottom: map-deep-get($material, 'calendar', 'line-color') 1px solid + color: map-deep-get($material, 'calendar', 'text-color') + + &.v-past + .v-calendar-daily_head-weekday, + .v-calendar-daily_head-day-label + color: map-deep-get($material, 'calendar', 'past-color') + + .v-calendar-daily__intervals-body + border-right: map-deep-get($material, 'calendar', 'line-color') 1px solid + + .v-calendar-daily__interval-text + color: map-deep-get($material, 'calendar', 'interval-color') 1px solid + + .v-calendar-daily__day + border-right: map-deep-get($material, 'calendar', 'line-color') 1px solid + border-bottom: map-deep-get($material, 'calendar', 'line-color') 1px solid + + .v-calendar-daily__day-interval + border-top: map-deep-get($material, 'calendar', 'line-color') 1px solid + + &:first-child + border-top: none !important .v-calendar-daily display: flex diff --git a/packages/vuetify/src/components/VCalendar/VCalendarWeekly.sass b/packages/vuetify/src/components/VCalendar/VCalendarWeekly.sass index 2114d23fc3c..022513fea04 100644 --- a/packages/vuetify/src/components/VCalendar/VCalendarWeekly.sass +++ b/packages/vuetify/src/components/VCalendar/VCalendarWeekly.sass @@ -1,12 +1,27 @@ @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' // Theme -.v-calendar-weekly.theme--light - +calendar-weekly-theme($material-light) -.v-calendar-weekly.theme--dark - +calendar-weekly-theme($material-dark) ++theme(v-calendar-weekly) using ($material) + background-color: map-deep-get($material, 'calendar', 'background-color') + + .v-calendar-weekly__head-weekday + border-right: map-deep-get($material, 'calendar', 'line-color') 1px solid + color: map-deep-get($material, 'calendar', 'text-color') + + &.v-past + color: map-deep-get($material, 'calendar', 'past-color') + + &.v-outside + background-color: map-deep-get($material, 'calendar', 'outside-background-color') + + .v-calendar-weekly__day + border-right: map-deep-get($material, 'calendar', 'line-color') 1px solid + border-bottom: map-deep-get($material, 'calendar', 'line-color') 1px solid + color: map-deep-get($material, 'calendar', 'text-color') + + &.v-outside + background-color: map-deep-get($material, 'calendar', 'outside-background-color') .v-calendar-weekly width: 100% diff --git a/packages/vuetify/src/components/VCalendar/_mixins.sass b/packages/vuetify/src/components/VCalendar/_mixins.sass deleted file mode 100644 index e3f933dbd07..00000000000 --- a/packages/vuetify/src/components/VCalendar/_mixins.sass +++ /dev/null @@ -1,52 +0,0 @@ -@mixin calendar-daily-theme($material) - background-color: map-deep-get($material, 'calendar', 'background-color') - - .v-calendar-daily__intervals-head - border-right: map-deep-get($material, 'calendar', 'line-color') 1px solid - - .v-calendar-daily_head-day - border-right: map-deep-get($material, 'calendar', 'line-color') 1px solid - border-bottom: map-deep-get($material, 'calendar', 'line-color') 1px solid - color: map-deep-get($material, 'calendar', 'text-color') - - &.v-past - .v-calendar-daily_head-weekday, - .v-calendar-daily_head-day-label - color: map-deep-get($material, 'calendar', 'past-color') - - .v-calendar-daily__intervals-body - border-right: map-deep-get($material, 'calendar', 'line-color') 1px solid - - .v-calendar-daily__interval-text - color: map-deep-get($material, 'calendar', 'interval-color') 1px solid - - .v-calendar-daily__day - border-right: map-deep-get($material, 'calendar', 'line-color') 1px solid - border-bottom: map-deep-get($material, 'calendar', 'line-color') 1px solid - - .v-calendar-daily__day-interval - border-top: map-deep-get($material, 'calendar', 'line-color') 1px solid - - &:first-child - border-top: none !important - -@mixin calendar-weekly-theme($material) - background-color: map-deep-get($material, 'calendar', 'background-color') - - .v-calendar-weekly__head-weekday - border-right: map-deep-get($material, 'calendar', 'line-color') 1px solid - color: map-deep-get($material, 'calendar', 'text-color') - - &.v-past - color: map-deep-get($material, 'calendar', 'past-color') - - &.v-outside - background-color: map-deep-get($material, 'calendar', 'outside-background-color') - - .v-calendar-weekly__day - border-right: map-deep-get($material, 'calendar', 'line-color') 1px solid - border-bottom: map-deep-get($material, 'calendar', 'line-color') 1px solid - color: map-deep-get($material, 'calendar', 'text-color') - - &.v-outside - background-color: map-deep-get($material, 'calendar', 'outside-background-color') diff --git a/packages/vuetify/src/components/VCard/VCard.sass b/packages/vuetify/src/components/VCard/VCard.sass index 3b5fe637091..0f3e4e07b63 100644 --- a/packages/vuetify/src/components/VCard/VCard.sass +++ b/packages/vuetify/src/components/VCard/VCard.sass @@ -1,11 +1,15 @@ @import '../../styles/styles.sass' -@import './_mixins.sass' // Theme -.v-card.theme--light - +card-theme($material-light) -.v-card.theme--dark - +card-theme($material-dark) ++theme(v-card) using ($material) + background-color: map-get($material, 'cards') + color: map-deep-get($material, 'text', 'primary') + + .v-card__text + color: map-deep-get($material, 'text', 'secondary') + + &.v-card--outlined + border: 1px solid map-get($material, 'dividers') // Block .v-card diff --git a/packages/vuetify/src/components/VCard/_mixins.sass b/packages/vuetify/src/components/VCard/_mixins.sass deleted file mode 100644 index 5d6c3224b87..00000000000 --- a/packages/vuetify/src/components/VCard/_mixins.sass +++ /dev/null @@ -1,9 +0,0 @@ -@mixin card-theme($material) - background-color: map-get($material, 'cards') - color: map-deep-get($material, 'text', 'primary') - - .v-card__text - color: map-deep-get($material, 'text', 'secondary') - - &.v-card--outlined - border: 1px solid map-get($material, 'dividers') diff --git a/packages/vuetify/src/components/VChip/VChip.sass b/packages/vuetify/src/components/VChip/VChip.sass index 7e856ba3956..bafb0c1b1a6 100644 --- a/packages/vuetify/src/components/VChip/VChip.sass +++ b/packages/vuetify/src/components/VChip/VChip.sass @@ -1,6 +1,5 @@ // Imports @import '../../styles/styles.sass' -@import './_mixins.sass' @import './_variables.scss' // Theme @@ -14,10 +13,10 @@ &.info color: map-deep-get($material-dark, 'text', 'primary') -.v-chip.theme--light - +chip-theme($material-light) -.v-chip.theme--dark - +chip-theme($material-dark) ++theme(v-chip) using ($material) + background: map-get($material, 'chips') + border-color: map-get($material, 'dividers') + color: map-deep-get($material, 'text', 'primary') // Block .v-chip diff --git a/packages/vuetify/src/components/VChip/_mixins.sass b/packages/vuetify/src/components/VChip/_mixins.sass deleted file mode 100644 index d483b26f9de..00000000000 --- a/packages/vuetify/src/components/VChip/_mixins.sass +++ /dev/null @@ -1,4 +0,0 @@ -@mixin chip-theme($material) - background: map-get($material, 'chips') - border-color: map-get($material, 'dividers') - color: map-deep-get($material, 'text', 'primary') diff --git a/packages/vuetify/src/components/VCounter/VCounter.sass b/packages/vuetify/src/components/VCounter/VCounter.sass index aa92fdb2cb1..b174e59017b 100644 --- a/packages/vuetify/src/components/VCounter/VCounter.sass +++ b/packages/vuetify/src/components/VCounter/VCounter.sass @@ -1,12 +1,9 @@ @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' /* Theme */ -.v-counter.theme--light - +counter-theme($material-light) -.v-counter.theme--dark - +counter-theme($material-dark) ++theme(v-counter) using ($material) + color: map-deep-get($material, 'text', 'secondary') .v-counter flex: 0 1 auto diff --git a/packages/vuetify/src/components/VCounter/_mixins.sass b/packages/vuetify/src/components/VCounter/_mixins.sass deleted file mode 100644 index f547564bf3a..00000000000 --- a/packages/vuetify/src/components/VCounter/_mixins.sass +++ /dev/null @@ -1,2 +0,0 @@ -@mixin counter-theme($material) - color: map-deep-get($material, 'text', 'secondary') diff --git a/packages/vuetify/src/components/VDataTable/VDataTable.sass b/packages/vuetify/src/components/VDataTable/VDataTable.sass index 9cf23859493..e02a7cd5b76 100644 --- a/packages/vuetify/src/components/VDataTable/VDataTable.sass +++ b/packages/vuetify/src/components/VDataTable/VDataTable.sass @@ -1,13 +1,25 @@ // Imports @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' // Theme -.v-data-table.theme--light - +data-table-theme($material-light) -.v-data-table.theme--dark - +data-table-theme($material-dark) ++theme(v-data-table) using ($material) + tbody + tr + &:hover:not(.v-data-table__expand-row) + background: map-deep-get($material, 'table', 'hover') + + &.expanded + border-bottom: 0 + + &.expanded__row + background: map-deep-get($material, 'table', 'active') + + &.expanded__content + box-shadow: inset 0px 4px 8px -5px rgba(50, 50, 50, 0.75), inset 0px -4px 8px -5px rgba(50, 50, 50, 0.75) + + .v-data-footer + border-top: 1px solid rgba(map-get($material, 'fg-color'), map-get($material, 'divider-percent')) .v-data-table__mobile-row display: block diff --git a/packages/vuetify/src/components/VDataTable/VDataTableHeader.sass b/packages/vuetify/src/components/VDataTable/VDataTableHeader.sass index 28edc63ceca..0f5ce71e394 100644 --- a/packages/vuetify/src/components/VDataTable/VDataTableHeader.sass +++ b/packages/vuetify/src/components/VDataTable/VDataTableHeader.sass @@ -1,13 +1,25 @@ // Imports @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' // Theme -.v-data-table.theme--light - +data-table-header-theme($material-light) -.v-data-table.theme--dark - +data-table-header-theme($material-dark) ++theme(v-data-table-header) using ($material) + th.sortable + .v-icon + color: rgba(map-get($material, 'fg-color'), map-get($material, 'disabledORhints-text-percent')) + + &:hover + color: rgba(map-get($material, 'fg-color'), map-get($material, 'primary-text-percent')) + + &.active + color: rgba(map-get($material, 'fg-color'), map-get($material, 'primary-text-percent')) + + .v-icon + color: rgba(map-get($material, 'fg-color'), map-get($material, 'primary-text-percent')) + + &__sort-badge + background-color: rgba(map-get($material, 'fg-color'), map-get($material, 'divider-percent')) + color: map-deep-get($material, 'text', 'primary') // Block .v-data-table-header diff --git a/packages/vuetify/src/components/VDataTable/VEditDialog.sass b/packages/vuetify/src/components/VDataTable/VEditDialog.sass index b0db1cdbaf8..86281d54e3e 100644 --- a/packages/vuetify/src/components/VDataTable/VEditDialog.sass +++ b/packages/vuetify/src/components/VDataTable/VEditDialog.sass @@ -1,17 +1,13 @@ @import '../../styles/styles.sass' -@mixin small-dialog-theme($material) ++theme(v-small-dialog) using ($material) a color: rgba(map-get($material, 'fg-color'), map-get($material, 'primary-text-percent')) - .v-small-dialog__content, .v-small-dialog__actions + &__content, + &__actions background: map-get($material, 'cards') -.v-small-dialog.theme--light - +small-dialog-theme($material-light) -.v-small-dialog.theme--dark - +small-dialog-theme($material-dark) - .v-small-dialog display: block width: 100% diff --git a/packages/vuetify/src/components/VDataTable/VSimpleTable.sass b/packages/vuetify/src/components/VDataTable/VSimpleTable.sass index 083c91656aa..acaed826f67 100644 --- a/packages/vuetify/src/components/VDataTable/VSimpleTable.sass +++ b/packages/vuetify/src/components/VDataTable/VSimpleTable.sass @@ -1,13 +1,37 @@ // Imports @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' // Theme -.v-data-table.theme--light - +simple-table-theme($material-light) -.v-data-table.theme--dark - +simple-table-theme($material-dark) ++theme(v-data-table) using ($material) + background-color: map-get($material, 'cards') + color: map-deep-get($material, 'text', 'primary') + + colgroup + .divider + border-right: 1px solid rgba(map-get($material, 'fg-color'), map-get($material, 'divider-percent')) + + &.v-data-table--fixed-header + thead th + background: white + border-bottom: 0px !important + box-shadow: inset 0 -1px 0 rgba(map-get($material, 'fg-color'), map-get($material, 'divider-percent')) + + thead + tr + &:last-child th + border-bottom: 1px solid rgba(map-get($material, 'fg-color'), map-get($material, 'divider-percent')) + + th + color: rgba(map-get($material, 'text-color'), map-get($material, 'secondary-text-percent')) + + tbody + tr + &:not(:last-child) + border-bottom: 1px solid rgba(map-get($material, 'fg-color'), map-get($material, 'divider-percent')) + + &.active + background: map-deep-get($material, 'table', 'active') // Block .v-data-table diff --git a/packages/vuetify/src/components/VDataTable/VVirtualTable.sass b/packages/vuetify/src/components/VDataTable/VVirtualTable.sass index 43b2f8d8ce6..d9e3a2b041d 100644 --- a/packages/vuetify/src/components/VDataTable/VVirtualTable.sass +++ b/packages/vuetify/src/components/VDataTable/VVirtualTable.sass @@ -1,7 +1,6 @@ // Imports @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' .v-virtual-table position: relative diff --git a/packages/vuetify/src/components/VDataTable/_mixins.sass b/packages/vuetify/src/components/VDataTable/_mixins.sass deleted file mode 100644 index 4cbbb7abb26..00000000000 --- a/packages/vuetify/src/components/VDataTable/_mixins.sass +++ /dev/null @@ -1,66 +0,0 @@ -@mixin simple-table-theme($material) - background-color: map-get($material, 'cards') - color: map-deep-get($material, 'text', 'primary') - - colgroup - .divider - border-right: 1px solid rgba(map-get($material, 'fg-color'), map-get($material, 'divider-percent')) - - &.v-data-table--fixed-header - thead th - background: white - border-bottom: 0px !important - box-shadow: inset 0 -1px 0 rgba(map-get($material, 'fg-color'), map-get($material, 'divider-percent')) - - thead - tr - &:last-child th - border-bottom: 1px solid rgba(map-get($material, 'fg-color'), map-get($material, 'divider-percent')) - - th - color: rgba(map-get($material, 'text-color'), map-get($material, 'secondary-text-percent')) - - tbody - tr - &:not(:last-child) - border-bottom: 1px solid rgba(map-get($material, 'fg-color'), map-get($material, 'divider-percent')) - - &.active - background: map-deep-get($material, 'table', 'active') - -@mixin data-table-theme($material) - tbody - tr - &:hover:not(.v-data-table__expand-row) - background: map-deep-get($material, 'table', 'hover') - - &.expanded - border-bottom: 0 - - &.expanded__row - background: map-deep-get($material, 'table', 'active') - - &.expanded__content - box-shadow: inset 0px 4px 8px -5px rgba(50, 50, 50, 0.75), inset 0px -4px 8px -5px rgba(50, 50, 50, 0.75) - - .v-data-footer - border-top: 1px solid rgba(map-get($material, 'fg-color'), map-get($material, 'divider-percent')) - -@mixin data-table-header-theme($material) - .v-data-table-header - th.sortable - .v-icon - color: rgba(map-get($material, 'fg-color'), map-get($material, 'disabledORhints-text-percent')) - - &:hover - color: rgba(map-get($material, 'fg-color'), map-get($material, 'primary-text-percent')) - - &.active - color: rgba(map-get($material, 'fg-color'), map-get($material, 'primary-text-percent')) - - .v-icon - color: rgba(map-get($material, 'fg-color'), map-get($material, 'primary-text-percent')) - - .v-data-table-header__sort-badge - background-color: rgba(map-get($material, 'fg-color'), map-get($material, 'divider-percent')) - color: map-deep-get($material, 'text', 'primary') diff --git a/packages/vuetify/src/components/VDatePicker/VDatePickerHeader.sass b/packages/vuetify/src/components/VDatePicker/VDatePickerHeader.sass index 19e5b18c29f..30884e7b235 100644 --- a/packages/vuetify/src/components/VDatePicker/VDatePickerHeader.sass +++ b/packages/vuetify/src/components/VDatePicker/VDatePickerHeader.sass @@ -1,6 +1,6 @@ @import '../../styles/styles.sass' -@mixin date-picker-header-theme($material) ++theme(v-date-picker-header) using ($material) .v-date-picker-header__value:not(.v-date-picker-header__value--disabled) button:not(:hover):not(:focus) color: map-deep-get($material, 'text', 'primary') @@ -9,11 +9,6 @@ button color: map-deep-get($material, 'text', 'disabled') -.v-date-picker-header.theme--light - +date-picker-header-theme($material-light) -.v-date-picker-header.theme--dark - +date-picker-header-theme($material-dark) - .v-date-picker-header padding: 4px 16px diff --git a/packages/vuetify/src/components/VDatePicker/VDatePickerTable.sass b/packages/vuetify/src/components/VDatePicker/VDatePickerTable.sass index 2699193fbdd..c3967224d17 100644 --- a/packages/vuetify/src/components/VDatePicker/VDatePickerTable.sass +++ b/packages/vuetify/src/components/VDatePicker/VDatePickerTable.sass @@ -1,15 +1,10 @@ @import '../../styles/styles.sass' -@mixin date-picker-table-theme($material) ++theme(v-date-picker-table) using ($material) th, .v-date-picker-table--date__week color: map-deep-get($material, 'text', 'disabled') -.v-date-picker-table.theme--light - +date-picker-table-theme($material-light) -.v-date-picker-table.theme--dark - +date-picker-table-theme($material-dark) - .v-date-picker-table position: relative padding: 0 12px diff --git a/packages/vuetify/src/components/VDialog/VDialog.sass b/packages/vuetify/src/components/VDialog/VDialog.sass index 825d68caeb5..2caa8b147a1 100644 --- a/packages/vuetify/src/components/VDialog/VDialog.sass +++ b/packages/vuetify/src/components/VDialog/VDialog.sass @@ -1,6 +1,5 @@ @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' // Block .v-dialog @@ -79,3 +78,13 @@ > .v-card__text overflow-y: auto backface-visibility: hidden + +@keyframes animate-dialog + 0% + transform: scale(1) + + 50% + transform: scale(1.03) + + 100% + transform: scale(1) diff --git a/packages/vuetify/src/components/VDialog/_mixins.sass b/packages/vuetify/src/components/VDialog/_mixins.sass deleted file mode 100644 index b81a689dbd6..00000000000 --- a/packages/vuetify/src/components/VDialog/_mixins.sass +++ /dev/null @@ -1,9 +0,0 @@ -@keyframes animate-dialog - 0% - transform: scale(1) - - 50% - transform: scale(1.03) - - 100% - transform: scale(1) diff --git a/packages/vuetify/src/components/VDivider/VDivider.sass b/packages/vuetify/src/components/VDivider/VDivider.sass index 2ee30dc6984..76f6db448cc 100644 --- a/packages/vuetify/src/components/VDivider/VDivider.sass +++ b/packages/vuetify/src/components/VDivider/VDivider.sass @@ -1,11 +1,8 @@ @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' -.v-divider.theme--light - +divider-theme($material-light) -.v-alert.theme--dark - +divider-theme($material-dark) ++theme(v-divider) using ($material) + border-color: map-get($material, 'dividers') .v-divider display: block diff --git a/packages/vuetify/src/components/VDivider/_mixins.sass b/packages/vuetify/src/components/VDivider/_mixins.sass deleted file mode 100644 index bd1003dea33..00000000000 --- a/packages/vuetify/src/components/VDivider/_mixins.sass +++ /dev/null @@ -1,2 +0,0 @@ -@mixin divider-theme($material) - border-color: map-get($material, 'dividers') diff --git a/packages/vuetify/src/components/VExpansionPanel/VExpansionPanel.sass b/packages/vuetify/src/components/VExpansionPanel/VExpansionPanel.sass index e92d7b0891c..e50e4c928a8 100644 --- a/packages/vuetify/src/components/VExpansionPanel/VExpansionPanel.sass +++ b/packages/vuetify/src/components/VExpansionPanel/VExpansionPanel.sass @@ -1,12 +1,21 @@ @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' // Theme -.v-expansion-panels.theme--light - +expansion-panel-theme($material-light) -.v-expansion-panels.theme--dark - +expansion-panel-theme($material-dark) ++theme(v-expansion-panel) using ($material) + background-color: map-get($material, 'cards') + color: map-deep-get($material, 'text', 'primary') + + &::after + border-color: map-get($material, 'dividers') + + .v-expansion-panel-header + .v-expansion-panel-header__icon + .v-icon + color: map-deep-get($material, 'icons', 'active') + + &--disabled + color: map-deep-get($material, 'text', 'disabled') // Block .v-expansion-panels diff --git a/packages/vuetify/src/components/VExpansionPanel/_mixins.sass b/packages/vuetify/src/components/VExpansionPanel/_mixins.sass deleted file mode 100644 index 44a8c305290..00000000000 --- a/packages/vuetify/src/components/VExpansionPanel/_mixins.sass +++ /dev/null @@ -1,15 +0,0 @@ -@mixin expansion-panel-theme($material) - .v-expansion-panel - background-color: map-get($material, 'cards') - color: map-deep-get($material, 'text', 'primary') - - &::after - border-color: map-get($material, 'dividers') - - .v-expansion-panel-header - .v-expansion-panel-header__icon - .v-icon - color: map-deep-get($material, 'icons', 'active') - - &--disabled - color: map-deep-get($material, 'text', 'disabled') diff --git a/packages/vuetify/src/components/VFooter/VFooter.sass b/packages/vuetify/src/components/VFooter/VFooter.sass index 1cec14a8721..90429031431 100644 --- a/packages/vuetify/src/components/VFooter/VFooter.sass +++ b/packages/vuetify/src/components/VFooter/VFooter.sass @@ -1,12 +1,10 @@ @import '../../styles/styles.sass' -@import './_mixins.sass' @import './_variables.scss' // Theme -.v-footer.theme--light - +footer-theme($material-light) -.v-footer.theme--dark - +footer-theme($material-dark) ++theme(v-footer) using ($material) + background-color: map-get($material, 'app-bar') + color: map-deep-get($material, 'text', 'primary') // Block .v-footer diff --git a/packages/vuetify/src/components/VFooter/_mixins.sass b/packages/vuetify/src/components/VFooter/_mixins.sass deleted file mode 100644 index 8d4576d99a4..00000000000 --- a/packages/vuetify/src/components/VFooter/_mixins.sass +++ /dev/null @@ -1,3 +0,0 @@ -@mixin footer-theme($material) - background-color: map-get($material, 'app-bar') - color: map-deep-get($material, 'text', 'primary') diff --git a/packages/vuetify/src/components/VIcon/VIcon.sass b/packages/vuetify/src/components/VIcon/VIcon.sass index b7e94797fbd..7df9e69e5e5 100644 --- a/packages/vuetify/src/components/VIcon/VIcon.sass +++ b/packages/vuetify/src/components/VIcon/VIcon.sass @@ -1,13 +1,13 @@ // Imports @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' // Theme -.v-icon.theme--light - +icon-theme($material-light) -.v-icon.theme--dark - +icon-theme($material-dark) ++theme(v-icon) using ($material) + color: map-deep-get($material, 'icons', 'active') + + &--disabled + color: map-deep-get($material, 'icons', 'inactive') !important .v-icon align-items: center diff --git a/packages/vuetify/src/components/VIcon/_mixins.sass b/packages/vuetify/src/components/VIcon/_mixins.sass deleted file mode 100644 index 12c92d724ed..00000000000 --- a/packages/vuetify/src/components/VIcon/_mixins.sass +++ /dev/null @@ -1,5 +0,0 @@ -@mixin icon-theme($material) - color: map-deep-get($material, 'icons', 'active') - - &.v-icon--disabled - color: map-deep-get($material, 'icons', 'inactive') !important diff --git a/packages/vuetify/src/components/VInput/VInput.sass b/packages/vuetify/src/components/VInput/VInput.sass index 024bb03be68..d99f35c825f 100644 --- a/packages/vuetify/src/components/VInput/VInput.sass +++ b/packages/vuetify/src/components/VInput/VInput.sass @@ -1,11 +1,21 @@ @import '../../styles/styles.sass' -@import './_mixins.sass' /* Theme */ -.v-input.theme--light - +input-theme($material-light) -.v-input.theme--dark - +input-theme($material-dark) ++theme(v-input) using ($material) + &:not(.v-input--is-disabled) + input, + textarea + color: map-deep-get($material, 'text', 'primary') + + input::placeholder, + textarea::placeholder + color: map-deep-get($material, 'text', 'disabled') + + &--is-disabled + .v-label, + input, + textarea + color: map-deep-get($material, 'text', 'disabled') .v-input align-items: flex-start diff --git a/packages/vuetify/src/components/VInput/_mixins.sass b/packages/vuetify/src/components/VInput/_mixins.sass deleted file mode 100644 index 668e028d884..00000000000 --- a/packages/vuetify/src/components/VInput/_mixins.sass +++ /dev/null @@ -1,15 +0,0 @@ -@mixin input-theme($material) - &:not(.v-input--is-disabled) - input, - textarea - color: map-deep-get($material, 'text', 'primary') - - input::placeholder, - textarea::placeholder - color: map-deep-get($material, 'text', 'disabled') - - &--is-disabled - .v-label, - input, - textarea - color: map-deep-get($material, 'text', 'disabled') diff --git a/packages/vuetify/src/components/VLabel/VLabel.sass b/packages/vuetify/src/components/VLabel/VLabel.sass index e97e5a7d0f4..879c6ca8ed3 100644 --- a/packages/vuetify/src/components/VLabel/VLabel.sass +++ b/packages/vuetify/src/components/VLabel/VLabel.sass @@ -1,17 +1,12 @@ @import '../../styles/styles.sass' -@mixin label-theme($material) +// Theme ++theme(v-label) using ($material) color: map-deep-get($material, 'text', 'secondary') &--is-disabled color: map-deep-get($material, 'text', 'disabled') -// Theme -.v-label.theme--light - +label-theme($material-light) -.v-label.theme--dark - +label-theme($material-dark) - .v-label font-size: 16px line-height: 1 diff --git a/packages/vuetify/src/components/VList/VList.sass b/packages/vuetify/src/components/VList/VList.sass index 5f144427973..2a3e3dba2ce 100644 --- a/packages/vuetify/src/components/VList/VList.sass +++ b/packages/vuetify/src/components/VList/VList.sass @@ -3,9 +3,7 @@ @import './_mixins.sass' // Theme -.v-list.theme--light - +list-theme($material-light) - +.v-list &.primary, &.secondary, &.accent, @@ -16,8 +14,16 @@ > .v-list-item color: map-deep-get($material-dark, 'text', 'primary') -.v-list.theme--dark - +list-theme($material-dark) ++theme(v-list) using ($material) + background: map-get($material, 'cards') + color: map-deep-get($material, 'text','primary') + + .v-list--disabled + color: map-deep-get($material, 'text', 'disabled') + + .v-list-group--active:before, + .v-list-group--active:after + background: map-get($material, 'dividers') // Block .v-list diff --git a/packages/vuetify/src/components/VList/VListItem.sass b/packages/vuetify/src/components/VList/VListItem.sass index 314c12703f6..56f3f7dcd87 100644 --- a/packages/vuetify/src/components/VList/VListItem.sass +++ b/packages/vuetify/src/components/VList/VListItem.sass @@ -1,11 +1,17 @@ @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' -.v-list-item.theme--light - +list-item-theme($material-light) -.v-list-item.theme--dark - +list-item-theme($material-dark) +// Theme ++theme(v-list-item) using ($material) + color: map-deep-get($material, 'text', 'primary') + + &__mask + color: map-deep-get($material, 'text', 'disabled') + background: map-deep-get($material, 'expansion-panels', 'focus') + + &__subtitle, + &__action-text + color: map-deep-get($material, 'text', 'secondary') // Block .v-list-item diff --git a/packages/vuetify/src/components/VList/_mixins.sass b/packages/vuetify/src/components/VList/_mixins.sass index 6b0e2eee5b0..1d0f978eb1c 100644 --- a/packages/vuetify/src/components/VList/_mixins.sass +++ b/packages/vuetify/src/components/VList/_mixins.sass @@ -1,34 +1,5 @@ -@mixin list-theme($material) - background: map-get($material, 'cards') - color: map-deep-get($material, 'text','primary') - - .v-list--disabled - color: map-deep-get($material, 'text', 'disabled') - - .v-list-group--active:before, - .v-list-group--active:after - background: map-get($material, 'dividers') - @mixin list-shaped($size) .v-list-item, .v-list-item:before border-bottom-right-radius: #{$size * 0.6666666666666667} border-top-right-radius: #{$size * 0.6666666666666667} - -@mixin list-item-theme($material) - color: map-deep-get($material, 'text', 'primary') - - &.v-list-item__mask - color: map-deep-get($material, 'text', 'disabled') - background: map-deep-get($material, 'expansion-panels', 'focus') - - .v-list-item__subtitle, - .v-list-item__action-text - color: map-deep-get($material, 'text', 'secondary') - -@mixin list-rtl() - &__item - &__title - text-align: right - &__content - text-align: right diff --git a/packages/vuetify/src/components/VMessages/VMessages.sass b/packages/vuetify/src/components/VMessages/VMessages.sass index d1218ab742d..dbb9f96ce83 100644 --- a/packages/vuetify/src/components/VMessages/VMessages.sass +++ b/packages/vuetify/src/components/VMessages/VMessages.sass @@ -1,14 +1,9 @@ @import '../../styles/styles.sass' /* Theme */ -@mixin messages-theme($material) ++theme(v-messages) using ($material) color: map-deep-get($material, 'text', 'secondary') -.v-messages.theme--light - +messages-theme($material-light) -.v-messages.theme--dark - +messages-theme($material-dark) - .v-messages flex: 1 1 auto font-size: 12px diff --git a/packages/vuetify/src/components/VNavigationDrawer/VNavigationDrawer.sass b/packages/vuetify/src/components/VNavigationDrawer/VNavigationDrawer.sass index 1c80ae84c6b..6e79b285a4b 100644 --- a/packages/vuetify/src/components/VNavigationDrawer/VNavigationDrawer.sass +++ b/packages/vuetify/src/components/VNavigationDrawer/VNavigationDrawer.sass @@ -1,11 +1,15 @@ @import '../../styles/styles.sass' -@import './_mixins.sass' // Theme -.v-navigation-drawer.theme--light - +navigation-drawer-theme($material-light) -.v-navigation-drawer.theme--dark - +navigation-drawer-theme($material-dark) ++theme(v-navigation-drawer) using ($material) + background-color: map-get($material, 'cards') + + &:not(.v-navigation-drawer--floating) + .v-navigation-drawer__border + background-color: map-get($material, 'dividers') + + .v-divider + border-color: map-get($material, 'dividers') .v-navigation-drawer +bootable() diff --git a/packages/vuetify/src/components/VNavigationDrawer/_mixins.sass b/packages/vuetify/src/components/VNavigationDrawer/_mixins.sass deleted file mode 100644 index 3cc191f6476..00000000000 --- a/packages/vuetify/src/components/VNavigationDrawer/_mixins.sass +++ /dev/null @@ -1,9 +0,0 @@ -@mixin navigation-drawer-theme($material) - background-color: map-get($material, 'cards') - - &:not(.v-navigation-drawer--floating) - .v-navigation-drawer__border - background-color: map-get($material, 'dividers') - - .v-divider - border-color: map-get($material, 'dividers') diff --git a/packages/vuetify/src/components/VOverflowBtn/VOverflowBtn.sass b/packages/vuetify/src/components/VOverflowBtn/VOverflowBtn.sass index dc1ad439e91..bd44fa6e5bf 100644 --- a/packages/vuetify/src/components/VOverflowBtn/VOverflowBtn.sass +++ b/packages/vuetify/src/components/VOverflowBtn/VOverflowBtn.sass @@ -1,10 +1,24 @@ @import '../../styles/styles.sass' -@import './_mixins.sass' -.v-overflow-btn.theme--light - +overflow-btn-theme($material-light) -.v-overflow-btn.theme--dark - +overflow-btn-theme($material-dark) +// Theme ++theme(v-overflow-btn) using ($material) + .v-input__control, + .v-input__slot + &::before + background-color: map-get($material, 'dividers') !important // override v-text-field bottom border + + &--segmented, + &--editable:hover, + &--editable.v-input--is-focused, + &--editable.v-select--is-menu-active + .v-input__append-inner + border-left: 1px solid map-get($material, 'dividers') + + &:hover, + &.v-input--is-focused, + &.v-select--is-menu-active + .v-input__slot + background: map-get($material, 'cards') .v-overflow-btn margin-top: 12px diff --git a/packages/vuetify/src/components/VOverflowBtn/_mixins.sass b/packages/vuetify/src/components/VOverflowBtn/_mixins.sass deleted file mode 100644 index f39df08e062..00000000000 --- a/packages/vuetify/src/components/VOverflowBtn/_mixins.sass +++ /dev/null @@ -1,18 +0,0 @@ -@mixin overflow-btn-theme($material) - .v-input__control, - .v-input__slot - &::before - background-color: map-get($material, 'dividers') !important // override v-text-field bottom border - - &--segmented, - &--editable:hover, - &--editable.v-input--is-focused, - &--editable.v-select--is-menu-active - .v-input__append-inner - border-left: 1px solid map-get($material, 'dividers') - - &:hover, - &.v-input--is-focused, - &.v-select--is-menu-active - .v-input__slot - background: map-get($material, 'cards') diff --git a/packages/vuetify/src/components/VOverlay/VOverlay.sass b/packages/vuetify/src/components/VOverlay/VOverlay.sass index 17ffd9aa8c0..f791a5470ae 100644 --- a/packages/vuetify/src/components/VOverlay/VOverlay.sass +++ b/packages/vuetify/src/components/VOverlay/VOverlay.sass @@ -1,11 +1,8 @@ @import '../../styles/styles.sass' -@import './_mixins.sass' // Theme -.v-overlay.theme--light - +overlay-theme($material-light) -.v-overlay.theme--dark - +overlay-theme($material-dark) ++theme(v-overlay) using ($material) + color: map-deep-get($material, 'text', 'primary') // Block .v-overlay diff --git a/packages/vuetify/src/components/VOverlay/_mixins.sass b/packages/vuetify/src/components/VOverlay/_mixins.sass deleted file mode 100644 index e740d0f85e0..00000000000 --- a/packages/vuetify/src/components/VOverlay/_mixins.sass +++ /dev/null @@ -1,2 +0,0 @@ -@mixin overlay-theme($material) - color: map-deep-get($material, 'text', 'primary') diff --git a/packages/vuetify/src/components/VPagination/VPagination.sass b/packages/vuetify/src/components/VPagination/VPagination.sass index e3649d669da..9f1621cd9d5 100644 --- a/packages/vuetify/src/components/VPagination/VPagination.sass +++ b/packages/vuetify/src/components/VPagination/VPagination.sass @@ -1,10 +1,19 @@ @import '../../styles/styles.sass' -@import './_mixins.sass' -.v-pagination.theme--light - +pagination-theme($material-light) -.v-pagination.theme--dark - +pagination-theme($material-dark) +// Theme ++theme(v-pagination) using ($material) + .v-pagination__item + background: map-get($material, 'cards') + color: map-deep-get($material, 'text', 'primary') + min-width: 34px + padding: 0 5px + width: auto + + &--active + color: map-deep-get($material, 'text', 'theme') + + .v-pagination__navigation + background: map-get($material, 'cards') .v-pagination align-items: center diff --git a/packages/vuetify/src/components/VPagination/_mixins.sass b/packages/vuetify/src/components/VPagination/_mixins.sass deleted file mode 100644 index 3ab8ccc22eb..00000000000 --- a/packages/vuetify/src/components/VPagination/_mixins.sass +++ /dev/null @@ -1,13 +0,0 @@ -@mixin pagination-theme($material) - .v-pagination__item - background: map-get($material, 'cards') - color: map-deep-get($material, 'text', 'primary') - min-width: 34px - padding: 0 5px - width: auto - - &--active - color: map-deep-get($material, 'text', 'theme') - - .v-pagination__navigation - background: map-get($material, 'cards') diff --git a/packages/vuetify/src/components/VPicker/VPicker.sass b/packages/vuetify/src/components/VPicker/VPicker.sass index a286cd9871e..f50741176c1 100644 --- a/packages/vuetify/src/components/VPicker/VPicker.sass +++ b/packages/vuetify/src/components/VPicker/VPicker.sass @@ -1,17 +1,12 @@ @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' // Theme -.v-picker__title.theme--light - +picker-title-theme($material-light) -.v-picker__title.theme--dark - +picker-title-theme($material-dark) - -.v-picker__body.theme--light - +picker-body-theme($material-light) -.v-picker__body.theme--dark - +picker-body-theme($material-dark) ++theme(v-picker__title) using ($material) + background: map-deep-get($material, 'picker', 'title') + ++theme(v-picker__body) using ($material) + background: map-deep-get($material, 'picker', 'body') .v-picker border-radius: $picker-border-radius diff --git a/packages/vuetify/src/components/VPicker/_mixins.sass b/packages/vuetify/src/components/VPicker/_mixins.sass deleted file mode 100644 index a9150671322..00000000000 --- a/packages/vuetify/src/components/VPicker/_mixins.sass +++ /dev/null @@ -1,5 +0,0 @@ -@mixin picker-title-theme($material) - background: map-deep-get($material, 'picker', 'title') - -@mixin picker-body-theme($material) - background: map-deep-get($material, 'picker', 'body') diff --git a/packages/vuetify/src/components/VRadioGroup/VRadio.sass b/packages/vuetify/src/components/VRadioGroup/VRadio.sass index 86323a8b7d1..437861cbfa7 100644 --- a/packages/vuetify/src/components/VRadioGroup/VRadio.sass +++ b/packages/vuetify/src/components/VRadioGroup/VRadio.sass @@ -1,6 +1,7 @@ @import '../../styles/styles.sass' -@mixin radio-theme($material) +// Theme ++theme(v-radio) using ($material) &--is-disabled label color: map-deep-get($material, 'text', 'disabled') @@ -9,12 +10,6 @@ // needed for helper override color: map-deep-get($material, 'buttons', 'disabled') !important -// Theme -.v-radio.theme--light - +radio-theme($material-light) -.v-radio.theme--dark - +radio-theme($material-dark) - .v-radio align-items: center display: flex diff --git a/packages/vuetify/src/components/VRangeSlider/VRangeSlider.sass b/packages/vuetify/src/components/VRangeSlider/VRangeSlider.sass index 273f844a3e7..e04ca071b11 100644 --- a/packages/vuetify/src/components/VRangeSlider/VRangeSlider.sass +++ b/packages/vuetify/src/components/VRangeSlider/VRangeSlider.sass @@ -1,11 +1,11 @@ @import '../../styles/styles.sass' -@import './_mixins.sass' -/* Theme */ -.v-input--range-slider.theme--light - +range-slider-theme($material-light) -.v-input--range-slider.theme--dark - +range-slider-theme($material-dark) +// Theme ++theme(v-input--range-slider) using ($material) + &.v-input--slider.v-input--is-disabled + .v-slider.v-slider + .v-slider__thumb + background: map-deep-get($material, 'selection-controls', 'thumb', 'disabled') /** Input Group */ .v-input--range-slider diff --git a/packages/vuetify/src/components/VRangeSlider/_mixins.sass b/packages/vuetify/src/components/VRangeSlider/_mixins.sass deleted file mode 100644 index 6f574ac33cb..00000000000 --- a/packages/vuetify/src/components/VRangeSlider/_mixins.sass +++ /dev/null @@ -1,5 +0,0 @@ -@mixin range-slider-theme($material) - &.v-input--slider.v-input--is-disabled - .v-slider.v-slider - .v-slider__thumb - background: map-deep-get($material, 'selection-controls', 'thumb', 'disabled') diff --git a/packages/vuetify/src/components/VSelect/VSelect.sass b/packages/vuetify/src/components/VSelect/VSelect.sass index 2c509c2cd29..9708b473c7f 100644 --- a/packages/vuetify/src/components/VSelect/VSelect.sass +++ b/packages/vuetify/src/components/VSelect/VSelect.sass @@ -1,6 +1,7 @@ @import '../../styles/styles.sass' -@mixin select-theme($material) +// Theme ++theme(v-select) using ($material) // Needs an explicit color to override // higher level color .v-select__selections @@ -18,11 +19,6 @@ .v-select__selections color: map-deep-get($material, 'inputs', 'solo-inverted-focused-text') -.v-select.theme--light - +select-theme($material-light) -.v-select.theme--dark - +select-theme($material-dark) - .v-select position: relative // For **attach** prop diff --git a/packages/vuetify/src/components/VSelect/VSelectList.ts b/packages/vuetify/src/components/VSelect/VSelectList.ts index 8c4e32919df..c8b3eaa4374 100644 --- a/packages/vuetify/src/components/VSelect/VSelectList.ts +++ b/packages/vuetify/src/components/VSelect/VSelectList.ts @@ -123,7 +123,7 @@ export default mixins(Colorable, Themeable).extend({ return this.$createElement(VSubheader, { props }, props.header) }, genHighlight (text: string): string { - return `<span class="v-list__tile__mask">${escapeHTML(text)}</span>` + return `<span class="v-list__item__mask">${escapeHTML(text)}</span>` }, getMaskedCharacters (text: string): { start: string diff --git a/packages/vuetify/src/components/VSheet/VSheet.sass b/packages/vuetify/src/components/VSheet/VSheet.sass index d282dfd40e3..20f3d10301c 100644 --- a/packages/vuetify/src/components/VSheet/VSheet.sass +++ b/packages/vuetify/src/components/VSheet/VSheet.sass @@ -1,13 +1,12 @@ // Imports @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' -/* Theme */ -.v-sheet.theme--light - +sheet-theme($material-light) -.v-sheet.theme--dark - +sheet-theme($material-dark) +// Theme ++theme(v-sheet) using ($material) + background-color: map-get($material, 'cards') + border-color: map-get($material, 'cards') + color: map-deep-get($material, 'text', 'primary') .v-sheet display: block diff --git a/packages/vuetify/src/components/VSheet/_mixins.sass b/packages/vuetify/src/components/VSheet/_mixins.sass deleted file mode 100644 index 8df1e5113f7..00000000000 --- a/packages/vuetify/src/components/VSheet/_mixins.sass +++ /dev/null @@ -1,4 +0,0 @@ -@mixin sheet-theme($material) - background-color: map-get($material, 'cards') - border-color: map-get($material, 'cards') - color: map-deep-get($material, 'text', 'primary') diff --git a/packages/vuetify/src/components/VSlider/VSlider.sass b/packages/vuetify/src/components/VSlider/VSlider.sass index 953e112adcf..989cae9e8e8 100644 --- a/packages/vuetify/src/components/VSlider/VSlider.sass +++ b/packages/vuetify/src/components/VSlider/VSlider.sass @@ -1,13 +1,13 @@ // Imports @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' // Theme -.v-slider.theme--light - @include slider-theme($material-light) -.v-slider.theme--dark - @include slider-theme($material-dark) ++theme(v-slider) using ($material) + .v-slider__track-background, + .v-slider__track-fill, + .v-slider__thumb + background: map-deep-get($material, 'slider', 'inactive') // Block .v-slider diff --git a/packages/vuetify/src/components/VSlider/_mixins.sass b/packages/vuetify/src/components/VSlider/_mixins.sass deleted file mode 100644 index 27fa70978a5..00000000000 --- a/packages/vuetify/src/components/VSlider/_mixins.sass +++ /dev/null @@ -1,5 +0,0 @@ -@mixin slider-theme($material) - .v-slider__track-background, - .v-slider__track-fill, - .v-slider__thumb - background: map-deep-get($material, 'slider', 'inactive') diff --git a/packages/vuetify/src/components/VStepper/VStepper.sass b/packages/vuetify/src/components/VStepper/VStepper.sass index e3c60e44f7c..872c3d6f97b 100644 --- a/packages/vuetify/src/components/VStepper/VStepper.sass +++ b/packages/vuetify/src/components/VStepper/VStepper.sass @@ -1,6 +1,6 @@ @import '../../styles/styles.sass' -@mixin stepper-theme($material) ++theme(v-stepper) using ($material) background: map-get($material, 'bg-color') .v-stepper__step @@ -54,11 +54,6 @@ .v-stepper__content:not(:last-child) border-left: 1px solid rgba(map-get($material, 'fg-color'), map-get($material, 'divider-percent')) -.v-stepper.theme--light - +stepper-theme($material-light) -.v-stepper.theme--dark - +stepper-theme($material-dark) - .v-stepper overflow: hidden position: relative diff --git a/packages/vuetify/src/components/VSubheader/VSubheader.sass b/packages/vuetify/src/components/VSubheader/VSubheader.sass index 639f35ef2cd..5264507bf48 100644 --- a/packages/vuetify/src/components/VSubheader/VSubheader.sass +++ b/packages/vuetify/src/components/VSubheader/VSubheader.sass @@ -1,11 +1,8 @@ @import '../../styles/styles.sass' -@import './_mixins.sass' @import './_variables.scss' -.v-subheader.theme--light - +subheader-theme($material-light) -.v-subheader.theme--dark - +subheader-theme($material-dark) ++theme(v-subheader) using ($material) + color: map-deep-get($material, 'text', 'secondary') .v-subheader align-items: center diff --git a/packages/vuetify/src/components/VSubheader/_mixins.sass b/packages/vuetify/src/components/VSubheader/_mixins.sass deleted file mode 100644 index 72c2b442763..00000000000 --- a/packages/vuetify/src/components/VSubheader/_mixins.sass +++ /dev/null @@ -1,2 +0,0 @@ -@mixin subheader-theme($material) - color: map-deep-get($material, 'text', 'secondary') diff --git a/packages/vuetify/src/components/VSwitch/VSwitch.sass b/packages/vuetify/src/components/VSwitch/VSwitch.sass index 7c2d04e9922..e5df77d3775 100644 --- a/packages/vuetify/src/components/VSwitch/VSwitch.sass +++ b/packages/vuetify/src/components/VSwitch/VSwitch.sass @@ -1,12 +1,20 @@ @import '../../styles/styles.sass' -@import './_mixins.sass' @import './_variables.sass' // Theme -.v-input--switch.theme--light - +switch-theme($material-light) -.v-input--switch.theme--dark - +switch-theme($material-dark) ++theme(v-input--switch) using ($material) + .v-input--switch__thumb + color: map-deep-get($material, 'selection-controls', 'thumb', 'inactive') + + .v-input--switch__track + color: map-deep-get($material, 'selection-controls', 'track', 'inactive') + + &.v-input--is-disabled:not(.v-input--is-dirty) + .v-input--switch__thumb + color: map-deep-get($material, 'selection-controls', 'thumb', 'disabled') !important + + .v-input--switch__track + color: map-deep-get($material, 'selection-controls', 'track', 'disabled') !important .v-input--switch +rtl() diff --git a/packages/vuetify/src/components/VSwitch/_mixins.sass b/packages/vuetify/src/components/VSwitch/_mixins.sass deleted file mode 100644 index f355beb53fd..00000000000 --- a/packages/vuetify/src/components/VSwitch/_mixins.sass +++ /dev/null @@ -1,13 +0,0 @@ -@mixin switch-theme($material) - .v-input--switch__thumb - color: map-deep-get($material, 'selection-controls', 'thumb', 'inactive') - - .v-input--switch__track - color: map-deep-get($material, 'selection-controls', 'track', 'inactive') - - &.v-input--is-disabled:not(.v-input--is-dirty) - .v-input--switch__thumb - color: map-deep-get($material, 'selection-controls', 'thumb', 'disabled') !important - - .v-input--switch__track - color: map-deep-get($material, 'selection-controls', 'track', 'disabled') !important diff --git a/packages/vuetify/src/components/VSystemBar/VSystemBar.sass b/packages/vuetify/src/components/VSystemBar/VSystemBar.sass index 604bf24aea9..494b267d0a9 100644 --- a/packages/vuetify/src/components/VSystemBar/VSystemBar.sass +++ b/packages/vuetify/src/components/VSystemBar/VSystemBar.sass @@ -1,12 +1,16 @@ @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' /* Theme */ -.v-system-bar.theme--light - +system-bar-theme($material-light) -.v-system-bar.theme--dark - +system-bar-theme($material-dark) ++theme(v-system-bar) using ($material) + background-color: map-deep-get($material, 'status-bar', 'regular') + color: map-deep-get($material, 'text', 'secondary') + + .v-icon + color: map-deep-get($material, 'text', 'secondary') + + &--lights-out + background-color: map-deep-get($material, 'status-bar', 'lights-out') !important .v-system-bar align-items: center diff --git a/packages/vuetify/src/components/VSystemBar/_mixins.sass b/packages/vuetify/src/components/VSystemBar/_mixins.sass deleted file mode 100644 index 3f2cd4b150e..00000000000 --- a/packages/vuetify/src/components/VSystemBar/_mixins.sass +++ /dev/null @@ -1,9 +0,0 @@ -@mixin system-bar-theme($material) - background-color: map-deep-get($material, 'status-bar', 'regular') - color: map-deep-get($material, 'text', 'secondary') - - .v-icon - color: map-deep-get($material, 'text', 'secondary') - - &--lights-out - background-color: map-deep-get($material, 'status-bar', 'lights-out') !important diff --git a/packages/vuetify/src/components/VTabs/VTabs.sass b/packages/vuetify/src/components/VTabs/VTabs.sass index 2b03dd1865b..a496281c9ae 100644 --- a/packages/vuetify/src/components/VTabs/VTabs.sass +++ b/packages/vuetify/src/components/VTabs/VTabs.sass @@ -1,13 +1,14 @@ // Imports @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' -.v-tabs-bar.theme--light - +tabs-theme($material-light) -.v-tabs-bar.theme--dark - +tabs-theme($material-dark) ++theme(v-tabs) using ($material) + .v-tab:not(.v-tab--active), + .v-tab:not(.v-tab--active) > .v-icon, + .v-tab--disabled + color: map-get($material, 'tabs') +.v-tabs-bar.theme--dark .v-tab.v-tab--active:not(.v-tab--disabled), .v-tabs-slider-wrapper color: map-deep-get($material-dark, 'text', 'primary') diff --git a/packages/vuetify/src/components/VTabs/_mixins.sass b/packages/vuetify/src/components/VTabs/_mixins.sass deleted file mode 100644 index 271e61caf75..00000000000 --- a/packages/vuetify/src/components/VTabs/_mixins.sass +++ /dev/null @@ -1,5 +0,0 @@ -@mixin tabs-theme($material) - .v-tab:not(.v-tab--active), - .v-tab:not(.v-tab--active) > .v-icon, - .v-tab--disabled - color: map-get($material, 'tabs') diff --git a/packages/vuetify/src/components/VTextField/VTextField.sass b/packages/vuetify/src/components/VTextField/VTextField.sass index 00fbc17f36f..843998cc4d1 100644 --- a/packages/vuetify/src/components/VTextField/VTextField.sass +++ b/packages/vuetify/src/components/VTextField/VTextField.sass @@ -1,6 +1,6 @@ @import '../../styles/styles.sass' -@mixin text-field-theme($material) ++theme(v-text-field) using ($material) & > .v-input__control > .v-input__slot:before border-color: map-get($material, 'input-bottom-line') @@ -58,11 +58,6 @@ &:not(.v-input--is-focused):not(.v-input--has-state) > .v-input__control > .v-input__slot:hover border: 2px solid map-deep-get($material, 'text', 'primary') -.v-text-field.theme--light - +text-field-theme($material-light) -.v-text-field.theme--dark - +text-field-theme($material-dark) - .v-text-field padding-top: $text-field-active-label-height margin-top: $input-top-spacing - $text-field-active-label-height diff --git a/packages/vuetify/src/components/VTextarea/VTextarea.sass b/packages/vuetify/src/components/VTextarea/VTextarea.sass index 35294f892a9..75dc993c32d 100644 --- a/packages/vuetify/src/components/VTextarea/VTextarea.sass +++ b/packages/vuetify/src/components/VTextarea/VTextarea.sass @@ -1,16 +1,11 @@ @import '../../styles/styles.sass' -@mixin textarea-theme($material) ++theme(v-textarea) using ($material) &.v-text-field--solo-inverted.v-text-field--solo &.v-input--is-focused textarea color: map-deep-get($material, 'inputs', 'solo-inverted-focused-text') -.v-textarea.theme--light - +textarea-theme($material-light) -.v-textarea.theme--dark - +textarea-theme($material-dark) - .v-textarea textarea flex: 1 1 auto diff --git a/packages/vuetify/src/components/VTimePicker/VTimePickerClock.sass b/packages/vuetify/src/components/VTimePicker/VTimePickerClock.sass index ecac9ce825a..30f979ff175 100644 --- a/packages/vuetify/src/components/VTimePicker/VTimePickerClock.sass +++ b/packages/vuetify/src/components/VTimePicker/VTimePickerClock.sass @@ -1,12 +1,25 @@ @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' // Theme -.v-time-picker-clock.theme--light - +time-picker-clock-theme($material-light) -.v-time-picker-clock.theme--dark - +time-picker-clock-theme($material-dark) ++theme(v-time-picker-clock) using ($material) + background: map-deep-get($material, 'picker', 'clock') + + .v-time-picker-clock__item--disabled + color: map-deep-get($material, 'buttons', 'disabled') + + &.v-time-picker-clock__item--active + color: map-deep-get($material-dark, 'buttons', 'disabled') + + &--indeterminate + .v-time-picker-clock__hand + background-color: map-deep-get($material, 'picker', 'indeterminateTime') + + &:after + color: map-deep-get($material, 'picker', 'indeterminateTime') + + .v-time-picker-clock__item--active + background-color: map-deep-get($material, 'picker', 'indeterminateTime') .v-time-picker-clock border-radius: 100% diff --git a/packages/vuetify/src/components/VTimePicker/_mixins.sass b/packages/vuetify/src/components/VTimePicker/_mixins.sass deleted file mode 100644 index 4fa19cf62a8..00000000000 --- a/packages/vuetify/src/components/VTimePicker/_mixins.sass +++ /dev/null @@ -1,18 +0,0 @@ -@mixin time-picker-clock-theme($material) - background: map-deep-get($material, 'picker', 'clock') - - .v-time-picker-clock__item--disabled - color: map-deep-get($material, 'buttons', 'disabled') - - &.v-time-picker-clock__item--active - color: map-deep-get($material-dark, 'buttons', 'disabled') - - &--indeterminate - .v-time-picker-clock__hand - background-color: map-deep-get($material, 'picker', 'indeterminateTime') - - &:after - color: map-deep-get($material, 'picker', 'indeterminateTime') - - .v-time-picker-clock__item--active - background-color: map-deep-get($material, 'picker', 'indeterminateTime') diff --git a/packages/vuetify/src/components/VTimeline/VTimeline.sass b/packages/vuetify/src/components/VTimeline/VTimeline.sass index 81920987c2c..0884fc17e3b 100644 --- a/packages/vuetify/src/components/VTimeline/VTimeline.sass +++ b/packages/vuetify/src/components/VTimeline/VTimeline.sass @@ -4,10 +4,17 @@ @import './_mixins.sass' // Theme -.v-timeline.theme--light - +timeline-theme($material-light) -.v-timeline.theme--dark - +timeline-theme($material-dark) ++theme(v-timeline) using ($material) + &::before + background: map-get($material, 'dividers') + + .v-timeline-item + &__dot + background: map-get($material, 'cards') + + .v-card + &::before + border-right-color: $shadow-key-ambient-opacity // Elements .v-timeline diff --git a/packages/vuetify/src/components/VTimeline/_mixins.sass b/packages/vuetify/src/components/VTimeline/_mixins.sass index 591cae41c5c..159c1cfe91e 100644 --- a/packages/vuetify/src/components/VTimeline/_mixins.sass +++ b/packages/vuetify/src/components/VTimeline/_mixins.sass @@ -1,15 +1,3 @@ -@mixin timeline-theme($material) - &:before - background: map-get($material, 'dividers') - - .v-timeline-item - &__dot - background: map-get($material, 'cards') - - .v-card - &:before - border-right-color: $shadow-key-ambient-opacity - @mixin timeline-dots($dot-size, $inner-dot-size) height: $dot-size left: calc(50% - #{$dot-size / 2}) diff --git a/packages/vuetify/src/components/VTreeview/VTreeview.sass b/packages/vuetify/src/components/VTreeview/VTreeview.sass index fa2d8d3c087..7a4f53a8c05 100644 --- a/packages/vuetify/src/components/VTreeview/VTreeview.sass +++ b/packages/vuetify/src/components/VTreeview/VTreeview.sass @@ -1,12 +1,13 @@ @import '../../styles/styles.sass' @import './_variables.scss' -@import './_mixins.sass' -/* Theme */ -.v-treeview.theme--light - +treeview-theme($material-light) -.v-treeview.theme--dark - +treeview-theme($material-dark) +// Theme ++theme(v-treeview) using ($material) + color: map-deep-get($material, 'text', 'primary') + + &--hoverable .v-treeview-node__root:hover, + .v-treeview-node--active + background: map-get($material, 'dividers') .v-treeview > .v-treeview-node diff --git a/packages/vuetify/src/components/VTreeview/_mixins.sass b/packages/vuetify/src/components/VTreeview/_mixins.sass deleted file mode 100644 index 2764834a3e0..00000000000 --- a/packages/vuetify/src/components/VTreeview/_mixins.sass +++ /dev/null @@ -1,6 +0,0 @@ -@mixin treeview-theme($material) - color: map-deep-get($material, 'text', 'primary') - - &--hoverable .v-treeview-node__root:hover, - .v-treeview-node--active - background: map-get($material, 'dividers') diff --git a/packages/vuetify/src/styles/components/_mixins.sass b/packages/vuetify/src/styles/components/_mixins.sass deleted file mode 100644 index 40fdf71beaa..00000000000 --- a/packages/vuetify/src/styles/components/_mixins.sass +++ /dev/null @@ -1,5 +0,0 @@ -@mixin selection-control-theme($material) - &.v-input--is-disabled - .v-icon - // needed for helper override - color: map-deep-get($material, 'buttons', 'disabled') !important diff --git a/packages/vuetify/src/styles/components/_selection-controls.sass b/packages/vuetify/src/styles/components/_selection-controls.sass index fbd6ae36291..3af1ed5d9a8 100644 --- a/packages/vuetify/src/styles/components/_selection-controls.sass +++ b/packages/vuetify/src/styles/components/_selection-controls.sass @@ -1,11 +1,11 @@ @import '../styles.sass' -@import './_mixins.sass' // Theme -.v-input--selection-controls.theme--light - +selection-control-theme($material-light) -.v-input--selection-controls.theme--dark - +selection-control-theme($material-dark) ++theme(v-input--selection-controls) using ($material) + &.v-input--is-disabled + .v-icon + // needed for helper override + color: map-deep-get($material, 'buttons', 'disabled') !important .v-input--selection-controls margin-top: $input-top-spacing diff --git a/packages/vuetify/src/styles/tools/_index.sass b/packages/vuetify/src/styles/tools/_index.sass index 3a426461d37..25fe5663bb9 100644 --- a/packages/vuetify/src/styles/tools/_index.sass +++ b/packages/vuetify/src/styles/tools/_index.sass @@ -2,3 +2,4 @@ @import './_bootable' @import './_elevation' @import './_rtl' +@import './_theme' diff --git a/packages/vuetify/src/styles/tools/_theme.sass b/packages/vuetify/src/styles/tools/_theme.sass new file mode 100644 index 00000000000..6321ff0cb4d --- /dev/null +++ b/packages/vuetify/src/styles/tools/_theme.sass @@ -0,0 +1,5 @@ +@mixin theme ($component) + .theme--light.#{$component} + @content($material-light) + .theme--dark.#{$component} + @content($material-dark)
2dc8a91b5ee8ac3731d0fbbe186174c45ce3cc01
2023-03-24 01:08:07
John Leider
docs(themes): add back themes page
false
add back themes page
docs
diff --git a/packages/docs/src/components/doc/PremiumThemes.vue b/packages/docs/src/components/doc/PremiumThemes.vue new file mode 100644 index 00000000000..fd228062432 --- /dev/null +++ b/packages/docs/src/components/doc/PremiumThemes.vue @@ -0,0 +1,103 @@ +<template> + <v-row> + <template v-if="products.length === 0"> + <v-col> + <app-alert type="error">Problem fetching themes</app-alert> + </v-col> + </template> + + <template v-else> + <v-col + v-for="product in products" + :key="product.title" + cols="12" + md="6" + > + <a + :href="`https://store.vuetifyjs.com/products/${product.handle}?utm_source=vuetifyjs.com&utm_medium=themes`" + class="text-high-emphasis text-decoration-none" + rel="noopener" + target="_blank" + > + <app-figure + :alt="product.alt" + :name="product.title" + :src="product.src" + height="185" + max-height="185" + min-height="185" + > + <figcaption class="d-flex text-subtitle-2 align-center text-capitalize mt-3"> + <span v-text="product.title" /> + + <v-chip + v-if="product.isOnSale" + class="text-uppercase px-1 ms-2" + color="red-lighten-2" + label + size="x-small" + > + On Sale + </v-chip> + + <v-chip + v-if="product.isFree" + class="text-uppercase px-1 ms-2" + color="primary" + label + size="x-small" + > + Free + </v-chip> + + <span + v-else + class="ms-auto" + v-text="`$${product.price}`" + /> + </figcaption> + </app-figure> + </a> + </v-col> + </template> + </v-row> +</template> + +<script setup> + import { useShopifyStore } from '@/store/shopify' + import { computed, onMounted } from 'vue' + + const store = useShopifyStore() + + // const products = computed(() => []) + const products = computed(() => { + const all = [] + + for (const product of store.products) { + if (product.productType !== 'Themes') continue + const variant = product.variants[0] + const price = variant.price + + all.push({ + alt: product.images[0].alt, + src: product.images[0].src, + handle: product.handle, + isFree: Number(variant.price) === 0, + isOnSale: Number(variant.price) < Number(variant.compareAtPrice ?? 0), + title: product.title, + price, + variant, + }) + } + + return all.sort((a, b) => { + const aPrice = parseFloat(a.variants?.[0].price ?? a.variant?.price) + const bPrice = parseFloat(b.variants?.[0].price ?? b.variant?.price) + return aPrice < bPrice ? -1 : aPrice > bPrice ? 1 : 0 + }) + }) + + onMounted(async () => { + await store.fetch() + }) +</script> diff --git a/packages/docs/src/data/nav.json b/packages/docs/src/data/nav.json index 97b07069467..1e978d3d9b1 100644 --- a/packages/docs/src/data/nav.json +++ b/packages/docs/src/data/nav.json @@ -212,7 +212,8 @@ "activeIcon": "mdi-human-male-board", "items": [ "jobs-for-vue", - "ui-kits" + "ui-kits", + "themes" ] }, { diff --git a/packages/docs/src/layouts/home.vue b/packages/docs/src/layouts/home.vue index 1af3e76f985..ba3183e745e 100644 --- a/packages/docs/src/layouts/home.vue +++ b/packages/docs/src/layouts/home.vue @@ -25,6 +25,12 @@ import AppBar from '@/components/app/bar/Bar.vue' import AppSettingsDrawer from '@/components/app/settings/Drawer.vue' import HomeFooter from '@/components/home/Footer.vue' + + import { useShopifyStore } from '@/store/shopify' + + const store = useShopifyStore() + + store.fetch() </script> <style lang="sass"> diff --git a/packages/docs/src/pages/en/resources/themes.md b/packages/docs/src/pages/en/resources/themes.md index 32e8b866284..162aceef0cc 100644 --- a/packages/docs/src/pages/en/resources/themes.md +++ b/packages/docs/src/pages/en/resources/themes.md @@ -1,16 +1,24 @@ --- +nav: Vuetify Themes +emphasized: true meta: title: Free & Premium Vuetify themes description: Vuetify offers numerous pre-build starter and premium themes. Kickstart your next application today, no design skills needed. keywords: vuetify themes, pre-built material themes, premium themes related: - - /getting-started/wireframes/ - - /features/theme/ - /getting-started/installation/ + - /features/blueprints/ + - /features/theme/ --- +<script setup> + import PremiumThemes from '@/components/doc/PremiumThemes.vue' +</script> + # Vuetify Themes Vuetify offers both **free** and **premium** pre-made themes designed to get you started in a flash. Free themes are available to install through Vue CLI or you can simply download the source. -<!-- <premium-themes /> --> +<entry /> + +<premium-themes /> diff --git a/packages/docs/src/store/shopify.ts b/packages/docs/src/store/shopify.ts index bdf2d4fc44f..077262a8fc9 100644 --- a/packages/docs/src/store/shopify.ts +++ b/packages/docs/src/store/shopify.ts @@ -5,34 +5,38 @@ import { useCosmic } from '@/composables/cosmic' import { defineStore } from 'pinia' // Types -export type State = { - products: Product[] -} - -export interface ProductRecord { - metadata: { - products: string - } +interface Image { + src: string + altText: string | null } -export interface ProductImage { - src: string +interface VariantOption { + name: string + value: string } -export interface Variant { +interface Variant { + id: string + title: string price: string - compareAtPrice: string + available: boolean + selectedOptions: VariantOption[] } -export interface Product { - availableForSale: boolean - handle: string +interface Product { id: string - image: ProductImage - images: ProductImage[] - productType: string title: string + description: string + images: Image[] + options: unknown[] // type of options not provided in given JSON data variants: Variant[] + vendor: string + productType: string + onlineStoreUrl: string +} + +export type State = { + products: Product[] } export const useShopifyStore = defineStore('shopify', { @@ -44,7 +48,7 @@ export const useShopifyStore = defineStore('shopify', { async fetch () { if (this.products.length) return - const { bucket } = useCosmic<ProductRecord>( + const { bucket } = useCosmic<any>( import.meta.env.VITE_COSMIC_BUCKET_SLUG_STORE, import.meta.env.VITE_COSMIC_BUCKET_READ_KEY_STORE, )
d57187aa9c12c2b0cba165b3d02d77118c410267
2023-05-02 21:12:32
John Leider
chore(release): publish v3.2.2
false
publish v3.2.2
chore
diff --git a/lerna.json b/lerna.json index c8fe591efbe..662da2cce9e 100644 --- a/lerna.json +++ b/lerna.json @@ -13,6 +13,6 @@ } }, "npmClient": "yarn", - "version": "3.2.1", + "version": "3.2.2", "useWorkspaces": true } diff --git a/packages/api-generator/package.json b/packages/api-generator/package.json index 42a17d93db6..1705465aa91 100755 --- a/packages/api-generator/package.json +++ b/packages/api-generator/package.json @@ -1,6 +1,6 @@ { "name": "@vuetify/api-generator", - "version": "3.2.1", + "version": "3.2.2", "private": true, "description": "", "scripts": { @@ -18,7 +18,7 @@ "rimraf": "^3.0.2", "ts-morph": "^18.0.0", "vue": "^3.2.47", - "vuetify": "^3.2.1" + "vuetify": "^3.2.2" }, "devDependencies": { "@babel/node": "^7.20.7" diff --git a/packages/docs/package.json b/packages/docs/package.json index 6cef1b683b4..d3da77092e0 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -3,7 +3,7 @@ "description": "A Vue.js project", "private": true, "author": "John Leider <[email protected]>", - "version": "3.2.1", + "version": "3.2.2", "repository": { "type": "git", "url": "git+https://github.com/vuetifyjs/vuetify.git", @@ -40,7 +40,7 @@ "vue-i18n": "^9.3.0-beta.16", "vue-instantsearch": "^4.8.8", "vue-prism-component": "^2.0.0", - "vuetify": "^3.2.1" + "vuetify": "^3.2.2" }, "devDependencies": { "@emailjs/browser": "^3.10.0", @@ -52,7 +52,7 @@ "@vitejs/plugin-basic-ssl": "^1.0.1", "@vitejs/plugin-vue": "^4.1.0", "@vue/compiler-sfc": "^3.2.47", - "@vuetify/api-generator": "^3.2.1", + "@vuetify/api-generator": "^3.2.2", "@vuetify/vite-ssg": "^0.20.2", "ajv": "^8.12.0", "async-es": "^3.2.4", diff --git a/packages/vuetify/package.json b/packages/vuetify/package.json index 977f3f57ecd..3c5cbd11f9b 100755 --- a/packages/vuetify/package.json +++ b/packages/vuetify/package.json @@ -1,7 +1,7 @@ { "name": "vuetify", "description": "Vue Material Component Framework", - "version": "3.2.1", + "version": "3.2.2", "author": { "name": "John Leider", "email": "[email protected]"
0f3fa6a9204688abe23996d2df2be665f52a7e18
2019-10-12 00:00:21
Kirill Romanov
fix(VTextField): use scrollWidth to calculate label width (#9286)
false
use scrollWidth to calculate label width (#9286)
fix
diff --git a/packages/vuetify/src/components/VTextField/VTextField.ts b/packages/vuetify/src/components/VTextField/VTextField.ts index 1c3436a000e..89db50a5b95 100644 --- a/packages/vuetify/src/components/VTextField/VTextField.ts +++ b/packages/vuetify/src/components/VTextField/VTextField.ts @@ -451,7 +451,7 @@ export default baseMixins.extend<options>().extend({ setLabelWidth () { if (!this.outlined || !this.$refs.label) return - this.labelWidth = this.$refs.label.offsetWidth * 0.75 + 6 + this.labelWidth = this.$refs.label.scrollWidth * 0.75 + 6 }, setPrefixWidth () { if (!this.$refs.prefix) return
1d48e272ce8e12e1cbee0304b898dd55a05201c8
2018-04-05 08:18:19
John Leider
feat(v-select): finished initial re-impl
false
finished initial re-impl
feat
diff --git a/src/components/VSelect/VSelect.js b/src/components/VSelect/VSelect.js index 2c27e340288..f73c2169c96 100644 --- a/src/components/VSelect/VSelect.js +++ b/src/components/VSelect/VSelect.js @@ -3,10 +3,9 @@ import '../../stylus/components/_text-fields.styl' import '../../stylus/components/_select.styl' // Components -// import VBtn from '../../VBtn' import VCard from '../VCard' import VCheckbox from '../VCheckbox' -// import VChip from '../../VChip' +import VChip from '../VChip' import VDivider from '../VDivider' import VMenu from '../VMenu' import VSubheader from '../VSubheader' @@ -28,7 +27,10 @@ import Dependent from '../../mixins/dependent' import ClickOutside from '../../directives/click-outside' // Helpers -import { getObjectValueByPath } from '../../util/helpers' +import { + escapeHTML, + getObjectValueByPath +} from '../../util/helpers' export default { name: 'v-select', @@ -43,9 +45,10 @@ export default { Dependent ], - data: () => ({ + data: vm => ({ + cachedItems: vm.cacheItems ? vm.items : [], isMenuActive: false, - selectedItems: [] + selectedIndex: null }), props: { @@ -123,29 +126,110 @@ export default { computed: { classes () { - const classes = { - 'v-input--select v-input--text': true, - 'v-input--select--chips': this.chips, - 'v-input--select--autocomplete': this.isAutocomplete + return { + 'v-select v-input--text': true, + 'v-select--chips': this.chips, + 'v-select--is-menu-active': this.isMenuActive } - - return classes }, computedItems () { - return this.cachedItems.concat(this.items) + return this.filterDuplicates(this.cachedItems.concat(this.items)) }, - tileActiveClass () { - return Object.keys(this.addTextColorClassChecks()).join(' ') + directives () { + return [{ + name: 'click-outside', + value: () => { + this.selectedIndex = null + this.onKeyDown({ keyCode: 9 }) + }, + args: { + closeConditional: () => { + return true + } + } + }] }, dynamicHeight () { return this.chips ? 'auto' : '32px' + }, + isDirty () { + return this.selectedItems.length > 0 + }, + isDisabled () { + return this.disabled || this.readonly + }, + // Convert internalValue to always + // be an array and check for validity + selectedItems (val = this.inputValue) { + let selectedItems = this.computedItems.filter(i => { + if (!this.multiple) { + return this.getValue(i) === this.getValue(val) + } else { + // Always return Boolean + return this.findExistingIndex(i, this.internalValue) > -1 + } + }) + + return selectedItems + }, + tileActiveClass () { + return Object.keys(this.addTextColorClassChecks()).join(' ') } }, methods: { - findExistingIndex (item) { + changeSelectedIndex (keyCode) { + // backspace, left, right, delete + if (![8, 37, 39, 46].includes(keyCode)) return + + const indexes = this.selectedItems.length - 1 + + if (keyCode === 37) { // Left arrow + this.selectedIndex = this.selectedIndex === -1 + ? indexes + : this.selectedIndex - 1 + } else if (keyCode === 39) { // Right arrow + this.selectedIndex = this.selectedIndex >= indexes + ? -1 + : this.selectedIndex + 1 + } else if (this.selectedIndex === -1) { + this.selectedIndex = indexes + return + } + + // backspace/delete + if ([8, 46].includes(keyCode)) { + const newIndex = this.selectedIndex === indexes + ? this.selectedIndex - 1 + : this.selectedItems[this.selectedIndex + 1] + ? this.selectedIndex + : -1 + + this.selectItem(this.selectedItems[this.selectedIndex]) + this.selectedIndex = newIndex + } + }, + clearableCallback () { + this.internalValue = this.multiple ? [] : null + this.$emit('change', this.internalValue) + this.$nextTick(() => this.$refs.input.focus()) + + if (this.openOnClear) this.isMenuActive = true + }, + filterDuplicates (arr) { + const uniqueValues = new Map() + for (let index = 0; index < arr.length; ++index) { + const item = arr[index] + const val = this.getValue(item) + + !uniqueValues.has(val) && uniqueValues.set(val, item) + } + return Array.from(uniqueValues.values()) + }, + findExistingIndex (item, internalValue) { const itemValue = this.getValue(item) - return this.internalValue.findIndex(i => this.valueComparator(this.getValue(i), itemValue)) + + return (internalValue || []).findIndex(i => this.valueComparator(this.getValue(i), itemValue)) }, genAction (item, inputValue) { if (!this.multiple || this.isHidingSelected) return null @@ -168,18 +252,66 @@ export default { }) ]) }, + genChipSelection (item, index) { + const isDisabled = this.disabled || this.readonly + const click = e => { + if (isDisabled) return + + e.stopPropagation() + this.selectedIndex = index + this.onFocus() + } + + return this.$createElement(VChip, { + staticClass: 'chip--select-multi', + attrs: { + tabindex: this.isFocused ? null : '-1' + }, + props: { + close: this.deletableChips && !isDisabled, + dark: this.dark, + disabled: isDisabled, + selected: index === this.selectedIndex + }, + on: { + click: click, + focus: click, + input: () => { + if (this.multiple) this.selectItem(item) + else this.inputValue = null + + // If all items have been deleted, + // open `v-menu` + if (this.selectedItems.length === 0) { + this.isMenuActive = true + } + } + }, + key: this.getValue(item) + }, this.getText(item)) + }, + genClearIcon () { + if (!this.clearable || + !this.isDirty + ) return null + + return this.genSlot('append', 'inner', [ + this.genIcon('clear', this.clearableCallback || this.clearIconCb) + ]) + }, genCommaSelection (item, index, last) { + // Item may be an object + const key = JSON.stringify(this.getValue(item)) + return this.$createElement('div', { - staticClass: 'input-group__selections__comma', - 'class': { - 'input-group__selections__comma--active': index === this.selectedIndex - }, - key: JSON.stringify(this.getValue(item)) // Item may be an object + staticClass: 'v-select__selection', + key }, `${this.getText(item)}${last ? '' : ', '}`) }, genDefaultSlot () { const activator = this.$createElement('div', { - staticClass: 'v-input--select__slot', + staticClass: 'v-select__slot', + directives: this.directives, slot: 'activator' }, [ this.genLabel(), @@ -187,7 +319,8 @@ export default { this.genSelections(), this.genInput(), this.suffix ? this.genAffix('suffix') : null, - this.genIconSlot(), + this.genClearIcon(), + this.genSlot('append', 'inner', [this.genIcon('append')]), this.genProgress() ]) @@ -228,7 +361,9 @@ export default { ]) }, genMenu (activator) { - const props = { activator: this.$el } + const props = { + contentClass: this.contentClass + } // Later this might be filtered for (let prop of Object.keys(VMenu.props)) { @@ -239,11 +374,14 @@ export default { props.value = this.isMenuActive return this.$createElement(VMenu, { - ref: 'menu', props, on: { - input: val => (this.isMenuActive = val) - } + input: val => { + this.isMenuActive = val + this.isFocused = false + } + }, + ref: 'menu' }, [activator, this.genList()]) }, genSelections () { @@ -318,19 +456,19 @@ export default { : scopedSlot }, genTileContent (item) { + const innerHTML = escapeHTML((this.getText(item) || '').toString()) + return this.$createElement(VListTileContent, [this.$createElement(VListTileTitle, { - domProps: { - innerHTML: this.getText(item) - } + domProps: { innerHTML } })] ) }, getAvatar (item) { - return this.getPropertyFromItem(item, this.itemAvatar) + return getObjectValueByPath(item, this.itemAvatar) }, getDisabled (item) { - return this.getPropertyFromItem(item, this.itemDisabled) + return getObjectValueByPath(item, this.itemDisabled) }, getText (item) { return this.getPropertyFromItem(item, this.itemText) @@ -345,28 +483,43 @@ export default { return typeof value === 'undefined' ? item : value }, + needsTile (tile) { + // TODO: use the component name instead of tag + return tile.componentOptions == null || tile.componentOptions.tag !== 'v-list-tile' + }, + // Ignore default onBlur + onBlur () {}, + // Detect tab and call original onBlur method + onKeyDown (e) { + if (e.keyCode === 9) { + VTextField.methods.onBlur.call(this, e) + } else if ([13, 32, 38, 40].includes(e.keyCode)) { + this.isMenuActive = true + } + + this.changeSelectedIndex(e.keyCode) + }, onClick () { + if (this.isDisabled) return + this.isMenuActive = true + this.onFocus() }, selectItem (item) { if (!this.multiple) { this.internalValue = this.returnObject ? item : this.getValue(item) - this.selectedItems = [item] this.isMenuActive = false } else { - const selectedItems = [] - const internalValue = this.internalValue.slice() - const i = this.findExistingIndex(item) + const internalValue = this.selectedItems.slice() + const i = this.findExistingIndex(item, internalValue) i !== -1 ? internalValue.splice(i, 1) : internalValue.push(item) this.internalValue = internalValue.map(i => { - selectedItems.push(i) return this.returnObject ? i : this.getValue(i) }) - - this.selectedItems = selectedItems - this.selectedIndex = -1 } + + this.$emit('change', this.internalValue) } } } diff --git a/src/stylus/components/_chips.styl b/src/stylus/components/_chips.styl index 7100525608d..de5da970afa 100755 --- a/src/stylus/components/_chips.styl +++ b/src/stylus/components/_chips.styl @@ -52,7 +52,7 @@ theme(v-chip, "v-chip") &--selected &:not(.v-chip--disabled) border-color: rgba(#000, .13) - overflow: hidden + // overflow: hidden TEMP elevation(2) &:after diff --git a/src/stylus/components/_select.styl b/src/stylus/components/_select.styl index e1f7e2e8d51..55ea6840bb1 100755 --- a/src/stylus/components/_select.styl +++ b/src/stylus/components/_select.styl @@ -1,7 +1,13 @@ @import '../bootstrap' @import '../theme' -.v-input--select +v-select($material) + &__selection + color: $material.text.primary + +theme(v-select, 'v-select') + +.v-select .menu flex: 1 1 auto @@ -12,12 +18,11 @@ position: absolute left: 0 - &:not(.v-input--select--autocomplete) - input - opacity: 0 - pointer-events: none + input + opacity: 0 + pointer-events: none - &.v-input--is-focused + &.v-select--is-menu-active .v-input__icon--append .icon transform: rotate(180deg) @@ -28,178 +33,3 @@ &__slot align-items: center display: flex - -// selects($material) -// &.input-group -// &--editable, -// &--overflow, -// &--segmented -// .input-group__input:hover -// background: $material.cards - -// &.input-group--focused .input-group__input -// background: $material.cards - -// theme(selects, "input-group--select") - -// .input-group--select -// // TODO: revisit this -// .input-group--select__autocomplete -// display: block -// height: 0px - -// &--index -// background-color: transparent !important - -// .input-group__append-icon -// transition: .3s $transition.linear-out-slow-in - -// &.input-group__icon-clearable -// transition: none - -// &:not(.input-group--dirty), -// &.input-group--focused -// .input-group--select__autocomplete -// padding-bottom: 1px -// height: 30px - -// &.input-group--focused -// .input-group--select__autocomplete -// display: inline-block -// opacity: 1 - -// &.input-group--select--selecting-index -// .input-group--select__autocomplete -// opacity: 0 - -// &.input-group--open -// .input-group__append-icon:not(.input-group__icon-clearable) -// transform: rotate(-180deg) - -// .input-group__input -// cursor: pointer - -// &.input-group--disabled -// cursor: default -// pointer-events: none - -// .input-group--select -// .input-group__selections -// align-items: center -// display: flex -// flex-wrap: wrap -// position: relative -// width: 100% - -// &__comma -// display: inline-flex -// font-size: $input-font-size -// padding: 3px 4px 3px 0 - -// &--active -// color: inherit - -// .menu -// display: inline - -// .fade-transition-leave-active -// position: absolute -// left: 0 - -// &.input-group--autocomplete.input-group--search-focused -// .input-group__selections__comma -// display: none - -// .input-group--autocomplete -// .input-group__selections -// cursor: text - - -// .input-group -// &.input-group--chips -// .input-group__input -// padding-top: 0 -// padding-bottom: 0 - -// &.input-group--overflow, -// &.input-group--editable, -// &.input-group--segmented -// padding: 0 - -// .input-group__append-icon -// padding: 0 - -// .input-group__selections, -// input -// height: 48px - -// // Handle weird transition issue -// .input-group__selections__comma, input -// top: 0 -// left: 0 -// padding-left: 16px - -// .input-group__selections -// width: calc(100% - 55px) - -// .btn -// border-radius: 0 -// margin: 0 -// height: 48px -// width: 100% - -// .btn__content -// justify-content: start - -// .input-group__input -// transition: .3s $transition.swing - -// &.input-group--focused -// .input-group__input -// elevation(8) - -// label -// left: 16px !important -// top: 9px !important - -// .input-group__details -// &:after -// display: none - -// .input-group__input -// padding: 0 - -// &:before -// content: '' -// position: absolute -// left: 0 -// width: 100% -// height: 1px -// top: 0 -// transition: .3s $transition.swing - -// .input-group__append-icon -// width: 55px - -// &--segmented .input-group__input, -// &--editable .input-group__input:hover, -// &.input-group--focused.input-group--editable .input-group__input -// &:after -// background-color: rgba(0,0,0,0.12) -// content: '' -// position: absolute -// right: 55px -// height: 48px -// top: 0 -// width: 1px - -// .menu__content--select -// // // IE11 Fix for overflow -// .input-group--selection-controls__ripple -// display: none - -// .menu__content--autocomplete -// border-radius: 0 - -// > .card -// border-radius: 0 diff --git a/test/unit/components/VAutocomplete/VAutocomplete-autocomplete.old.js b/test/unit/components/VAutocomplete/VAutocomplete-autocomplete.old.js new file mode 100644 index 00000000000..0d23ae58f9b --- /dev/null +++ b/test/unit/components/VAutocomplete/VAutocomplete-autocomplete.old.js @@ -0,0 +1,319 @@ +// import { test } from '@/test' +// import VSelect from '@/components/VSelect' + +// test('VSelect - autocomplete', ({ mount }) => { +// it.skip('should have -1 tabindex when disabled', () => { +// const wrapper = mount(VSelect, { +// attachToDocument: true, +// propsData: { +// autocomplete: true, +// disabled: true +// } +// }) + +// expect(wrapper.vm.$refs.input.tabIndex).toBe(-1) +// expect(wrapper.vm.$el.tabIndex).toBe(-1) +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it('should have explicit tabindex passed through when autocomplete', () => { +// const wrapper = mount(VSelect, { +// attachToDocument: true, +// propsData: { +// autocomplete: true, +// tabindex: 10 +// } +// }) + +// expect(wrapper.vm.$refs.input.tabIndex).toBe(10) +// expect(wrapper.vm.$el.tabIndex).toBe(-1) +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it.skip('should have explicit tabindex passed through when not autocomplete', () => { +// const wrapper = mount(VSelect, { +// attachToDocument: true, +// propsData: { +// tabindex: 10 +// } +// }) + +// expect(wrapper.vm.$refs.input.tabIndex).toBe(-1) +// expect(wrapper.vm.$el.tabIndex).toBe(10) +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it.skip('should emit search input changes', async () => { +// const wrapper = mount(VSelect, { +// propsData: { +// autocomplete: true +// } +// }) + +// const input = wrapper.find('input')[0] + +// const update = jest.fn() +// wrapper.vm.$on('update:searchInput', update) + +// input.element.value = 'test' +// input.trigger('input') + +// expect(update).toBeCalledWith('test') +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it.skip('should filter autocomplete search results', () => { +// const wrapper = mount(VSelect, { +// propsData: { +// autocomplete: true, +// items: ['foo', 'bar'] +// } +// }) + +// wrapper.vm.searchValue = 'foo' + +// expect(wrapper.vm.filteredItems).toHaveLength(1) +// expect(wrapper.vm.filteredItems[0]).toBe('foo') +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it.skip('should filter numeric primitives', () => { +// const wrapper = mount(VSelect, { +// propsData: { +// autocomplete: true, +// items: [1, 2] +// } +// }) + +// wrapper.vm.searchValue = 1 + +// expect(wrapper.vm.filteredItems).toHaveLength(1) +// expect(wrapper.vm.filteredItems[0]).toBe(1) +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it.skip('should activate when search changes and not active', async () => { +// const wrapper = mount(VSelect, { +// attachToDocument: true, +// propsData: { +// autocomplete: true, +// items: [1, 2, 3, 4], +// multiple: true +// } +// }) + +// wrapper.vm.isActive = true +// await wrapper.vm.$nextTick() +// wrapper.vm.searchValue = 2 +// await wrapper.vm.$nextTick() + +// expect(wrapper.vm.isActive).toBe(true) +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it('should set searchValue to null when deactivated', async () => { +// const wrapper = mount(VSelect, { +// attachToDocument: true, +// propsData: { +// autocomplete: true, +// items: [1, 2, 3, 4], +// multiple: true +// } +// }) + +// wrapper.vm.isActive = true +// wrapper.vm.searchValue = 2 +// await wrapper.vm.$nextTick() +// wrapper.vm.isActive = false +// await wrapper.vm.$nextTick() + +// expect(wrapper.vm.searchValue).toBe(null) +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it.skip('should render role=combobox correctly when autocomplete', async () => { +// const wrapper = mount(VSelect, { +// propsData: { +// autocomplete: true +// } +// }) + +// const inputGroup = wrapper.find('.input-group--select')[0] +// expect(inputGroup.element.getAttribute('role')).toBeFalsy() + +// const input = wrapper.find('input')[0] +// expect(input.getAttribute('role')).toBe('combobox') + +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it.skip('should render role=combobox correctly when not autocomplete)', async () => { +// const wrapper = mount(VSelect) + +// const inputGroup = wrapper.find('.input-group--select')[0] +// expect(inputGroup.element.getAttribute('role')).toBe('combobox') + +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it('should not duplicate items after items update when caching is turned on', async () => { +// const wrapper = mount(VSelect, { +// propsData: { +// autocomplete: true, +// cacheItems: true, +// returnObject: true, +// itemText: 'text', +// itemValue: 'id', +// items: [], +// } +// }) + +// wrapper.setProps({ items: [{ id: 1, text: 'A' }] }) +// expect(wrapper.vm.computedItems).toHaveLength(1) +// wrapper.setProps({ items: [{ id: 1, text: 'A' }] }) +// expect(wrapper.vm.computedItems).toHaveLength(1) +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it.skip('should not display list with no items and autocomplete', async () => { +// const wrapper = mount(VSelect, { +// attachToDocument: true, +// propsData: { +// autocomplete: true, +// items: [] +// } +// }) + +// const input = wrapper.find('.input-group__input')[0] + +// input.trigger('click') +// await wrapper.vm.$nextTick() + +// expect(wrapper.vm.menuIsActive).toBe(false) +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it('should cache items', async () => { +// const wrapper = mount(VSelect, { +// attachToDocument: true, +// propsData: { +// autocomplete: true, +// cacheItems: true, +// items: [] +// } +// }) + +// wrapper.setProps({ items: ['bar', 'baz'] }) +// expect(wrapper.vm.computedItems).toHaveLength(2) + +// wrapper.setProps({ items: ['foo'] }) +// expect(wrapper.vm.computedItems).toHaveLength(3) + +// wrapper.setProps({ items: ['bar'] }) +// expect(wrapper.vm.computedItems).toHaveLength(3) + +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it('should cache items passed via prop', async () => { +// const wrapper = mount(VSelect, { +// attachToDocument: true, +// propsData: { +// autocomplete: true, +// cacheItems: true, +// items: [1, 2, 3, 4] +// } +// }) + +// expect(wrapper.vm.computedItems).toHaveLength(4) + +// wrapper.setProps({ items: [5] }) +// expect(wrapper.vm.computedItems).toHaveLength(5) + +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it.skip('should allow changing of browser autocomplete', () => { +// const wrapper = mount(VSelect, { +// attachToDocument: true, +// propsData: { +// autocomplete: true, +// browserAutocomplete: 'off' +// } +// }) + +// const input = wrapper.find('input')[0] + +// expect(input.getAttribute('autocomplete')).toBe('off') +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it('should show input when focused and autocomplete', async () => { +// const wrapper = mount(VSelect, { +// attachToDocument: true, +// propsData: { +// autocomplete: true +// } +// }) + +// const input = wrapper.find('input')[0] + +// expect(input.hasStyle('display', 'none')) + +// wrapper.trigger('focus') +// await wrapper.vm.$nextTick() +// expect(input.hasStyle('display', 'block')) + +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it.skip('should not filter text with no items', async () => { +// const wrapper = mount(VSelect, { +// attachToDocument: true, +// propsData: { +// autocomplete: true, +// items: ['foo', 'bar'] +// } +// }) + +// wrapper.setProps({ searchInput: 'asdf' }) +// wrapper.update() +// await wrapper.vm.$nextTick() +// const tile = wrapper.find('.list__tile__title')[0] + +// expect(tile.text()).toBe('No data available') +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it('should not display menu when tab focused', async () => { +// const wrapper = mount(VSelect, { +// attachToDocument: true, +// propsData: { +// autocomplete: true, +// items: [1 ,2], +// value: 1 +// } +// }) + +// const input = wrapper.find('input')[0] +// input.trigger('focus') +// await wrapper.vm.$nextTick() +// expect(wrapper.vm.menuIsActive).toBe(false) + +// wrapper.setProps({ +// items: [ +// { text: 'Foo', value: 1 }, +// { text: 'Bar', value: 2 } +// ] +// }) + +// wrapper.vm.blur() +// await wrapper.vm.$nextTick() +// input.trigger('focus') +// await wrapper.vm.$nextTick() + +// expect(wrapper.vm.menuIsActive).toBe(false) + +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) +// }) diff --git a/test/unit/components/VAutocomplete/VAutocomplete-combobox.old.js b/test/unit/components/VAutocomplete/VAutocomplete-combobox.old.js new file mode 100644 index 00000000000..703583e94d8 --- /dev/null +++ b/test/unit/components/VAutocomplete/VAutocomplete-combobox.old.js @@ -0,0 +1,127 @@ +// import { test } from '@/test' +// import VSelect from '@/components/VSelect' +// import VMenu from '@/components/VMenu' + +// test('VSelect - combobox', ({ mount }) => { +// it('should emit custom value on blur', async () => { +// const wrapper = mount(VSelect, { +// attachToDocument: true, +// propsData: { +// combobox: true, +// value: null +// } +// }) + +// const input = wrapper.find('input')[0] + +// const change = jest.fn() +// wrapper.vm.$on('input', change) + +// input.trigger('focus') +// await wrapper.vm.$nextTick() + +// input.element.value = 'foo' +// input.trigger('input') +// await wrapper.vm.$nextTick() + +// wrapper.vm.blur() +// await wrapper.vm.$nextTick() + +// expect(change).toHaveBeenCalledWith('foo') +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it('should evaluate the range of an integer', async () => { +// const wrapper = mount(VSelect, { +// propsData: { +// combobox: true, +// value: 11 +// } +// }) + +// await wrapper.vm.$nextTick() +// expect(wrapper.vm.currentRange).toBe(2) + +// wrapper.setProps({ value: 0 }) +// await wrapper.vm.$nextTick() +// expect(wrapper.vm.currentRange).toBe(1) + +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it('should not use search input when blurring', async () => { +// const wrapper = mount(VSelect, { +// attachToDocument: true, +// propsData: { +// combobox: true, +// items: [1, 12] +// } +// }) + +// const event = jest.fn() +// wrapper.vm.$on('input', event) + +// const input = wrapper.find('input')[0] +// input.trigger('focus') +// await wrapper.vm.$nextTick() + +// wrapper.setProps({ searchInput: '1' }) +// await wrapper.vm.$nextTick() + +// expect(wrapper.vm.searchValue).toBe('1') + +// const list = wrapper.find('.list > div')[1] +// list.trigger('click') +// await wrapper.vm.$nextTick() +// expect(event).toBeCalledWith(12) +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it('should not use search input if an option is selected from the menu', async () => { +// const item = { value: 123, text: 'Foo' } +// const wrapper = mount(VSelect, { +// propsData: { +// combobox: true, +// items: [item] +// } +// }) + +// const event = jest.fn() +// wrapper.vm.$on('input', event) + +// wrapper.setData({ isActive: true }) +// await wrapper.vm.$nextTick() + +// wrapper.vm.selectItem(item) +// await wrapper.vm.$nextTick() + +// wrapper.setData({ isActive: false }) +// await wrapper.vm.$nextTick() + +// expect(event).toBeCalledWith(item) +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it('should not populate search field if value is falsey', async () => { +// const wrapper = mount(VSelect, { +// propsData: { +// combobox: true +// } +// }) + +// const event = jest.fn() +// wrapper.vm.$on('input', event) + +// wrapper.setData({ isActive: true }) +// await wrapper.vm.$nextTick() + +// wrapper.setProps({ searchInput: '' }) +// await wrapper.vm.$nextTick() + +// wrapper.setData({ isActive: false }) +// await wrapper.vm.$nextTick() + +// expect(event).not.toBeCalled() +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) +// }) diff --git a/test/unit/components/VAutocomplete/VAutocomplete-segmented.old.js b/test/unit/components/VAutocomplete/VAutocomplete-segmented.old.js new file mode 100644 index 00000000000..24cc1201eff --- /dev/null +++ b/test/unit/components/VAutocomplete/VAutocomplete-segmented.old.js @@ -0,0 +1,107 @@ +// it.skip('should warn when using incorrect item together with segmented prop', async () => { +// const items = [ +// { text: 'Hello', callback: () => {} }, +// { text: 'Hello' } +// ] + +// const wrapper = mount(VSelect, { +// propsData: { +// segmented: true, +// items +// } +// }) + +// wrapper.vm.inputValue = items[1] + +// await wrapper.vm.$nextTick() + +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// expect('items must contain both a text and callback property').toHaveBeenTipped() +// }) + +// it.skip('should render buttons correctly when using items array with segmented prop', async () => { +// const items = [ +// { text: 'Hello', callback: () => {} } +// ] + +// const wrapper = mount(VSelect, { +// propsData: { +// segmented: true, +// items +// } +// }) + +// wrapper.vm.inputValue = items[0] + +// await wrapper.vm.$nextTick() + +// expect(wrapper.html()).toMatchSnapshot() +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it.skip('should render buttons correctly when using slot with segmented prop', async () => { +// const items = [ +// { text: 'Hello' } +// ] + +// const vm = new Vue() +// const selection = props => vm.$createElement('div', [props.item]) +// const component = Vue.component('test', { +// render (h) { +// return h(VSelect, { +// props: { +// segmented: true, +// items +// }, +// scopedSlots: { +// selection +// } +// }) +// } +// }) + +// const wrapper = mount(component) + +// wrapper.vm.$children[0].inputValue = items[0] + +// await wrapper.vm.$nextTick() + +// expect(wrapper.html()).toMatchSnapshot() +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + + + + // it('should have the proper nudge', async () => { + // const wrapper = mount(VSelect, { + // attachToDocument: true, + // propsData: { + // hideDetails: true, + // items: ['foo', 'bar'] + // } + // }) + + // expect(wrapper.vm.nudgeTop).toBe(-18) + + // wrapper.setProps({ autocomplete: true }) + + // expect(wrapper.vm.nudgeTop).toBe(0) + + // wrapper.setProps({ autocomplete: false, overflow: true }) + + // expect(wrapper.vm.nudgeTop).toBe(2) + + // wrapper.setProps({ auto: true, overflow: false }) + + // expect(wrapper.vm.nudgeTop).toBe(-18) + + // wrapper.setProps({ auto: false, overflow: true, hideDetails: false }) + + // expect(wrapper.vm.nudgeTop).toBe(26) + + // wrapper.setProps({ hideDetails: true }) + + // expect(wrapper.vm.nudgeTop).toBe(2) + + // expect('Unable to locate target [data-app]').toHaveBeenTipped() + // }) diff --git a/test/unit/components/VAutocomplete/VAutocomplete-tags.old.js b/test/unit/components/VAutocomplete/VAutocomplete-tags.old.js new file mode 100644 index 00000000000..425751e27e1 --- /dev/null +++ b/test/unit/components/VAutocomplete/VAutocomplete-tags.old.js @@ -0,0 +1,310 @@ +// import { test } from '@/test' +// import VSelect from '@/components/VSelect' +// import VMenu from '@/components/VMenu' + +// test('VSelect - tags', ({ mount, compileToFunctions }) => { +// const backspace = new Event('keydown') +// backspace.keyCode = 8 + +// function createTagsSelect (propsData) { +// const change = jest.fn() +// const wrapper = mount(VSelect, { +// attachToDocument: true, +// propsData: Object.assign({ +// tags: true, +// value: [] +// }, propsData) +// }) + +// wrapper.vm.$on('input', change) +// return { wrapper, change } +// } + +// it.skip('should create new values when tagging', async () => { +// const { wrapper, change } = createTagsSelect() + +// const input = wrapper.find('input')[0] + +// wrapper.vm.focus() +// await wrapper.vm.$nextTick() + +// input.element.value = 'foo' +// input.trigger('input') +// await wrapper.vm.$nextTick() +// await wrapper.vm.$nextTick() + +// input.trigger('keydown.enter') +// await wrapper.vm.$nextTick() + +// expect(change).toHaveBeenCalledWith(['foo']) +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it('should change selectedIndex with keyboard', async () => { +// const { wrapper } = createTagsSelect({ +// value: ['foo', 'bar'] +// }) + +// const input = wrapper.find('input')[0] + +// wrapper.vm.focus() +// await wrapper.vm.$nextTick() + +// for (const index of [1, 0, -1]) { +// input.trigger('keydown.left') +// await wrapper.vm.$nextTick() +// expect(wrapper.vm.selectedIndex).toBe(index) +// } + +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it('should delete a tagged item when selected and backspace/delete is pressed', async () => { +// const { wrapper, change } = createTagsSelect({ +// value: ['foo', 'bar'] +// }) + +// const input = wrapper.find('input')[0] + +// wrapper.vm.focus() + +// input.trigger('keydown.left') +// expect(wrapper.vm.selectedIndex).toBe(1) + +// input.trigger('keydown.delete') +// await wrapper.vm.$nextTick() +// expect(change).toHaveBeenCalledWith(['foo']) +// expect(wrapper.vm.selectedIndex).toBe(0) + +// input.element.dispatchEvent(backspace) // Avoriaz doesn't wrap keydown.backspace +// await wrapper.vm.$nextTick() +// expect(change).toHaveBeenCalledWith([]) +// expect(wrapper.vm.selectedIndex).toBe(-1) + +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it('should add a tag on tab using the first suggestion', async () => { +// const { wrapper, change } = createTagsSelect({ +// items: ['bar'] +// }) + +// const input = wrapper.find('input')[0] + +// wrapper.vm.focus() +// await wrapper.vm.$nextTick() + +// input.element.value = 'b' +// input.trigger('input') +// input.trigger('keydown.down') +// input.trigger('keydown.tab') +// await wrapper.vm.$nextTick() + +// expect(change).toBeCalledWith(['bar']) +// expect(wrapper.vm.getMenuIndex()).toBe(-1) +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it('should add a tag on tab using the current searchValue', async () => { +// const { wrapper, change } = createTagsSelect({ +// items: ['bar'] +// }) + +// const input = wrapper.find('input')[0] + +// wrapper.vm.focus() + +// wrapper.setProps({ searchInput: 'ba' }) +// input.trigger('keydown.tab') +// await wrapper.vm.$nextTick() +// expect(change).toBeCalledWith(['ba']) + +// wrapper.setProps({ searchInput: 'it' }) +// input.trigger('keydown.tab') +// await wrapper.vm.$nextTick() +// expect(change).toBeCalledWith(['ba', 'it']) + +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it.skip('should add a tag on enter using the current searchValue', async () => { +// const { wrapper, change } = createTagsSelect({ +// items: ['bar'] +// }) + +// const input = wrapper.find('input')[0] + +// wrapper.vm.focus() +// await wrapper.vm.$nextTick() + +// input.element.value = 'ba' +// input.trigger('input') +// await wrapper.vm.$nextTick() +// input.trigger('keydown.enter') +// await wrapper.vm.$nextTick() + +// expect(change).toBeCalledWith(['ba']) +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it.skip('should add a tag on left arrow and select the previous tag', async () => { +// const { wrapper, change } = createTagsSelect({ +// value: ['foo'], +// items: ['foo', 'bar'] +// }) + +// const input = wrapper.find('input')[0] + +// wrapper.vm.focus() +// await wrapper.vm.$nextTick() + +// input.element.value = 'b' +// input.trigger('input') +// await wrapper.vm.$nextTick() +// input.trigger('keydown.left') +// await wrapper.vm.$nextTick() + +// expect(change).toBeCalledWith(['foo', 'b']) +// expect(wrapper.vm.selectedIndex).toBe(0) +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it.skip('should remove a duplicate tag and add it to the end', async () => { +// const { wrapper, change } = createTagsSelect({ +// value: ['foo', 'bar'] +// }) + +// const input = wrapper.find('input')[0] + +// wrapper.vm.focus() +// await wrapper.vm.$nextTick() + +// input.element.value = 'foo' +// input.trigger('input') +// input.trigger('keydown.tab') +// await wrapper.vm.$nextTick() + +// expect(change).toBeCalledWith(['bar', 'foo']) +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it.skip('should add tag with valid search value on blur', async () => { +// const { wrapper, change } = createTagsSelect() + +// const input = wrapper.find('input')[0] + +// wrapper.vm.focus() +// await wrapper.vm.$nextTick() + +// input.element.value = 'bar' +// input.trigger('input') +// await wrapper.vm.$nextTick() + +// wrapper.vm.blur() +// await wrapper.vm.$nextTick() + +// expect(change).toBeCalledWith(['bar']) +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it.skip('should be able to add a tag from user input after deleting a tag with delete', async () => { +// const { wrapper, change } = createTagsSelect({ +// multiple: true, +// value: ['foo', 'bar'] +// }) + +// let input = wrapper.find('input')[0] + +// wrapper.vm.focus() +// await wrapper.vm.$nextTick() + +// input.trigger('keydown.left') +// await wrapper.vm.$nextTick() +// expect(wrapper.vm.selectedIndex).toBe(1) +// input.trigger('keydown.delete') +// await wrapper.vm.$nextTick() +// expect(change).toHaveBeenCalledWith(['foo']) +// expect(wrapper.vm.selectedIndex).toBe(0) + +// // Must be reset for input to update +// wrapper.vm.selectedIndex = -1 +// await wrapper.vm.$nextTick() + +// input.element.value = 'baz' +// await wrapper.vm.$nextTick() +// input.trigger('input') +// await wrapper.vm.$nextTick() +// input.trigger('keydown.enter') +// await wrapper.vm.$nextTick() + +// expect(change).toBeCalledWith(['foo', 'baz']) +// expect(wrapper.vm.selectedIndex).toBe(-1) + +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it.skip('should be able to add a tag from user input after clicking a deletable chip', async () => { +// const { wrapper, change } = createTagsSelect({ +// chips: true, +// clearable: true, +// deletableChips: true, +// multiple: true, +// value: ['foo', 'bar'] +// }) +// await wrapper.vm.$nextTick() + +// const input = wrapper.find('input')[0] +// const chip = wrapper.find('.chip')[1] +// const close = chip.find('.chip__close')[0] + +// wrapper.vm.focus() +// chip.trigger('click') +// await wrapper.vm.$nextTick() +// close.trigger('click') +// await wrapper.vm.$nextTick() +// expect(change).toHaveBeenCalledWith(['foo']) +// expect(wrapper.vm.selectedIndex).toBe(-1) + +// input.element.value = 'baz' +// await wrapper.vm.$nextTick() +// input.trigger('input') +// await wrapper.vm.$nextTick() +// expect(wrapper.vm.searchValue).toBe('baz') +// input.trigger('keydown.enter') +// await wrapper.vm.$nextTick() + +// expect(change).toBeCalledWith(['foo', 'baz']) +// expect(wrapper.vm.selectedIndex).toBe(-1) + +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) + +// it.skip('should not change search when selecting an index', () => { +// const { wrapper } = createTagsSelect({ +// chips: true, +// multiple: true, +// value: ['foo', 'bar'] +// }) + +// const input = wrapper.find('input')[0] + +// input.trigger('focus') +// expect(wrapper.vm.selectedIndex).toBe(-1) + +// input.trigger('keydown.left') +// expect(wrapper.vm.selectedIndex).toBe(1) + +// input.element.value = 'fizz' +// input.trigger('input') +// expect(wrapper.vm.searchValue).toBe(null) + +// input.trigger('keydown.right') +// expect(wrapper.vm.selectedIndex).toBe(-1) + +// input.element.value = 'fizz' +// input.trigger('input') +// expect(wrapper.vm.searchValue).toBe('fizz') + +// expect('Unable to locate target [data-app]').toHaveBeenTipped() +// }) +// }) diff --git a/test/unit/components/VDataIterator/__snapshots__/VDataIterator.spec.js.snap b/test/unit/components/VDataIterator/__snapshots__/VDataIterator.spec.js.snap index e17fede180d..d1062ac1e0b 100644 --- a/test/unit/components/VDataIterator/__snapshots__/VDataIterator.spec.js.snap +++ b/test/unit/components/VDataIterator/__snapshots__/VDataIterator.spec.js.snap @@ -12,7 +12,7 @@ exports[`VDataIterator.js should match a snapshot - footer slot 1`] = ` <div class="v-data-iterator__actions"> <div class="v-data-iterator__actions__select"> Items per page: - <div class="v-input v-input--select v-input--text theme--light"> + <div class="v-input v-select v-input--text v-input--is-label-active v-input--is-dirty theme--light"> <div class="v-input__control"> <div class="v-input__wrapper" style="height: 32px;" @@ -21,11 +21,14 @@ exports[`VDataIterator.js should match a snapshot - footer slot 1`] = ` style="display: inline-block;" > <div class="menu__activator"> - <div class="v-input--select__slot"> - <label class="v-label" + <div class="v-select__slot"> + <label class="v-label v-label--active" style="left: 0px; position: absolute;" > </label> + <div class="v-select__selection"> + 5 + </div> <input tabindex="0" type="text" > @@ -40,15 +43,15 @@ exports[`VDataIterator.js should match a snapshot - footer slot 1`] = ` </div> </div> </div> - <div class="menu__content menu__content--select menu__content--auto" - style="max-height: 200px; min-width: 75px; max-width: auto; top: 12px; left: 12px; z-index: 0; display: none;" + <div class="menu__content" + style="max-height: 200px; min-width: 16px; max-width: auto; top: 12px; left: 12px; z-index: 0; display: none;" > <div class="v-card" style="height: auto;" > <div class="list"> <div> - <a class="list__tile list__tile--link"> + <a class="list__tile list__tile--link list__tile--active primary--text"> <div class="list__tile__content"> <div class="list__tile__title"> 5 @@ -153,7 +156,7 @@ exports[`VDataIterator.js should match a snapshot - no data 1`] = ` <div class="v-data-iterator__actions"> <div class="v-data-iterator__actions__select"> Items per page: - <div class="v-input v-input--select v-input--text theme--light"> + <div class="v-input v-select v-input--text v-input--is-label-active v-input--is-dirty theme--light"> <div class="v-input__control"> <div class="v-input__wrapper" style="height: 32px;" @@ -162,11 +165,14 @@ exports[`VDataIterator.js should match a snapshot - no data 1`] = ` style="display: inline-block;" > <div class="menu__activator"> - <div class="v-input--select__slot"> - <label class="v-label" + <div class="v-select__slot"> + <label class="v-label v-label--active" style="left: 0px; position: absolute;" > </label> + <div class="v-select__selection"> + 5 + </div> <input tabindex="0" type="text" > @@ -181,15 +187,15 @@ exports[`VDataIterator.js should match a snapshot - no data 1`] = ` </div> </div> </div> - <div class="menu__content menu__content--select menu__content--auto" - style="max-height: 200px; min-width: 75px; max-width: auto; top: 12px; left: 12px; z-index: 0; display: none;" + <div class="menu__content" + style="max-height: 200px; min-width: 16px; max-width: auto; top: 12px; left: 12px; z-index: 0; display: none;" > <div class="v-card" style="height: auto;" > <div class="list"> <div> - <a class="list__tile list__tile--link"> + <a class="list__tile list__tile--link list__tile--active primary--text"> <div class="list__tile__content"> <div class="list__tile__title"> 5 @@ -285,7 +291,7 @@ exports[`VDataIterator.js should match a snapshot - no matching records 1`] = ` <div class="v-data-iterator__actions"> <div class="v-data-iterator__actions__select"> Items per page: - <div class="v-input v-input--select v-input--text theme--light"> + <div class="v-input v-select v-input--text v-input--is-label-active v-input--is-dirty theme--light"> <div class="v-input__control"> <div class="v-input__wrapper" style="height: 32px;" @@ -294,11 +300,14 @@ exports[`VDataIterator.js should match a snapshot - no matching records 1`] = ` style="display: inline-block;" > <div class="menu__activator"> - <div class="v-input--select__slot"> - <label class="v-label" + <div class="v-select__slot"> + <label class="v-label v-label--active" style="left: 0px; position: absolute;" > </label> + <div class="v-select__selection"> + 5 + </div> <input tabindex="0" type="text" > @@ -313,15 +322,15 @@ exports[`VDataIterator.js should match a snapshot - no matching records 1`] = ` </div> </div> </div> - <div class="menu__content menu__content--select menu__content--auto" - style="max-height: 200px; min-width: 75px; max-width: auto; top: 12px; left: 12px; z-index: 0; display: none;" + <div class="menu__content" + style="max-height: 200px; min-width: 16px; max-width: auto; top: 12px; left: 12px; z-index: 0; display: none;" > <div class="v-card" style="height: auto;" > <div class="list"> <div> - <a class="list__tile list__tile--link"> + <a class="list__tile list__tile--link list__tile--active primary--text"> <div class="list__tile__content"> <div class="list__tile__title"> 5 @@ -421,7 +430,7 @@ exports[`VDataIterator.js should match a snapshot - with data 1`] = ` <div class="v-data-iterator__actions"> <div class="v-data-iterator__actions__select"> Items per page: - <div class="v-input v-input--select v-input--text theme--light"> + <div class="v-input v-select v-input--text v-input--is-label-active v-input--is-dirty theme--light"> <div class="v-input__control"> <div class="v-input__wrapper" style="height: 32px;" @@ -430,11 +439,14 @@ exports[`VDataIterator.js should match a snapshot - with data 1`] = ` style="display: inline-block;" > <div class="menu__activator"> - <div class="v-input--select__slot"> - <label class="v-label" + <div class="v-select__slot"> + <label class="v-label v-label--active" style="left: 0px; position: absolute;" > </label> + <div class="v-select__selection"> + 5 + </div> <input tabindex="0" type="text" > @@ -449,15 +461,15 @@ exports[`VDataIterator.js should match a snapshot - with data 1`] = ` </div> </div> </div> - <div class="menu__content menu__content--select menu__content--auto" - style="max-height: 200px; min-width: 75px; max-width: auto; top: 12px; left: 12px; z-index: 0; display: none;" + <div class="menu__content" + style="max-height: 200px; min-width: 16px; max-width: auto; top: 12px; left: 12px; z-index: 0; display: none;" > <div class="v-card" style="height: auto;" > <div class="list"> <div> - <a class="list__tile list__tile--link"> + <a class="list__tile list__tile--link list__tile--active primary--text"> <div class="list__tile__content"> <div class="list__tile__title"> 5 diff --git a/test/unit/components/VDataTable/__snapshots__/VDataTable.spec.js.snap b/test/unit/components/VDataTable/__snapshots__/VDataTable.spec.js.snap index ce18fb45dd6..59bb39abeff 100644 --- a/test/unit/components/VDataTable/__snapshots__/VDataTable.spec.js.snap +++ b/test/unit/components/VDataTable/__snapshots__/VDataTable.spec.js.snap @@ -68,7 +68,7 @@ exports[`VDataTable.vue should match a snapshot - no data 1`] = ` <div class="v-datatable__actions"> <div class="v-datatable__actions__select"> Rows per page: - <div class="v-input v-input--select v-input--text theme--light"> + <div class="v-input v-select v-input--text theme--light"> <div class="v-input__control"> <div class="v-input__wrapper" style="height: 32px;" @@ -77,7 +77,7 @@ exports[`VDataTable.vue should match a snapshot - no data 1`] = ` style="display: inline-block;" > <div class="menu__activator"> - <div class="v-input--select__slot"> + <div class="v-select__slot"> <label class="v-label" style="left: 0px; position: absolute;" > @@ -96,8 +96,8 @@ exports[`VDataTable.vue should match a snapshot - no data 1`] = ` </div> </div> </div> - <div class="menu__content menu__content--select menu__content--auto" - style="max-height: 200px; min-width: 75px; max-width: auto; top: 12px; left: 12px; z-index: 0; display: none;" + <div class="menu__content" + style="max-height: 200px; min-width: 16px; max-width: auto; top: 12px; left: 12px; z-index: 0; display: none;" > <div class="v-card" style="height: auto;" @@ -254,7 +254,7 @@ exports[`VDataTable.vue should match a snapshot - no matching results 1`] = ` <div class="v-datatable__actions"> <div class="v-datatable__actions__select"> Rows per page: - <div class="v-input v-input--select v-input--text theme--light"> + <div class="v-input v-select v-input--text theme--light"> <div class="v-input__control"> <div class="v-input__wrapper" style="height: 32px;" @@ -263,7 +263,7 @@ exports[`VDataTable.vue should match a snapshot - no matching results 1`] = ` style="display: inline-block;" > <div class="menu__activator"> - <div class="v-input--select__slot"> + <div class="v-select__slot"> <label class="v-label" style="left: 0px; position: absolute;" > @@ -282,8 +282,8 @@ exports[`VDataTable.vue should match a snapshot - no matching results 1`] = ` </div> </div> </div> - <div class="menu__content menu__content--select menu__content--auto" - style="max-height: 200px; min-width: 75px; max-width: auto; top: 12px; left: 12px; z-index: 0; display: none;" + <div class="menu__content" + style="max-height: 200px; min-width: 16px; max-width: auto; top: 12px; left: 12px; z-index: 0; display: none;" > <div class="v-card" style="height: auto;" @@ -442,7 +442,7 @@ exports[`VDataTable.vue should match a snapshot - with data 1`] = ` <div class="v-datatable__actions"> <div class="v-datatable__actions__select"> Rows per page: - <div class="v-input v-input--select v-input--text theme--light"> + <div class="v-input v-select v-input--text theme--light"> <div class="v-input__control"> <div class="v-input__wrapper" style="height: 32px;" @@ -451,7 +451,7 @@ exports[`VDataTable.vue should match a snapshot - with data 1`] = ` style="display: inline-block;" > <div class="menu__activator"> - <div class="v-input--select__slot"> + <div class="v-select__slot"> <label class="v-label" style="left: 0px; position: absolute;" > @@ -470,8 +470,8 @@ exports[`VDataTable.vue should match a snapshot - with data 1`] = ` </div> </div> </div> - <div class="menu__content menu__content--select menu__content--auto" - style="max-height: 200px; min-width: 75px; max-width: auto; top: 12px; left: 12px; z-index: 0; display: none;" + <div class="menu__content" + style="max-height: 200px; min-width: 16px; max-width: auto; top: 12px; left: 12px; z-index: 0; display: none;" > <div class="v-card" style="height: auto;" diff --git a/test/unit/components/VInput/VInput.spec.js b/test/unit/components/VInput/VInput.spec.js index 580da12b144..bc9f2cff3a5 100644 --- a/test/unit/components/VInput/VInput.spec.js +++ b/test/unit/components/VInput/VInput.spec.js @@ -25,7 +25,7 @@ test('VInput.js', ({ mount }) => { wrapper.vm.$on('input', input) expect(wrapper.vm.lazyValue).toBe(undefined) - wrapper.vm.proxyValue = 'foo' + wrapper.vm.internalValue = 'foo' expect(input).toHaveBeenCalledWith('foo') expect(wrapper.vm.lazyValue).toBe('foo') }) diff --git a/test/unit/components/VSelect/VSelect-combobox.spec.js b/test/unit/components/VSelect/VSelect-combobox.spec.js deleted file mode 100644 index 4032ae70750..00000000000 --- a/test/unit/components/VSelect/VSelect-combobox.spec.js +++ /dev/null @@ -1,127 +0,0 @@ -import { test } from '@/test' -import VSelect from '@/components/VSelect' -import VMenu from '@/components/VMenu' - -test('VSelect - combobox', ({ mount }) => { - it('should emit custom value on blur', async () => { - const wrapper = mount(VSelect, { - attachToDocument: true, - propsData: { - combobox: true, - value: null - } - }) - - const input = wrapper.find('input')[0] - - const change = jest.fn() - wrapper.vm.$on('input', change) - - input.trigger('focus') - await wrapper.vm.$nextTick() - - input.element.value = 'foo' - input.trigger('input') - await wrapper.vm.$nextTick() - - wrapper.vm.blur() - await wrapper.vm.$nextTick() - - expect(change).toHaveBeenCalledWith('foo') - expect('Unable to locate target [data-app]').toHaveBeenTipped() - }) - - it('should evaluate the range of an integer', async () => { - const wrapper = mount(VSelect, { - propsData: { - combobox: true, - value: 11 - } - }) - - await wrapper.vm.$nextTick() - expect(wrapper.vm.currentRange).toBe(2) - - wrapper.setProps({ value: 0 }) - await wrapper.vm.$nextTick() - expect(wrapper.vm.currentRange).toBe(1) - - expect('Unable to locate target [data-app]').toHaveBeenTipped() - }) - - it('should not use search input when blurring', async () => { - const wrapper = mount(VSelect, { - attachToDocument: true, - propsData: { - combobox: true, - items: [1, 12] - } - }) - - const event = jest.fn() - wrapper.vm.$on('input', event) - - const input = wrapper.find('input')[0] - input.trigger('focus') - await wrapper.vm.$nextTick() - - wrapper.setProps({ searchInput: '1' }) - await wrapper.vm.$nextTick() - - expect(wrapper.vm.searchValue).toBe('1') - - const list = wrapper.find('.list > div')[1] - list.trigger('click') - await wrapper.vm.$nextTick() - expect(event).toBeCalledWith(12) - expect('Unable to locate target [data-app]').toHaveBeenTipped() - }) - - it('should not use search input if an option is selected from the menu', async () => { - const item = { value: 123, text: 'Foo' } - const wrapper = mount(VSelect, { - propsData: { - combobox: true, - items: [item] - } - }) - - const event = jest.fn() - wrapper.vm.$on('input', event) - - wrapper.setData({ isActive: true }) - await wrapper.vm.$nextTick() - - wrapper.vm.selectItem(item) - await wrapper.vm.$nextTick() - - wrapper.setData({ isActive: false }) - await wrapper.vm.$nextTick() - - expect(event).toBeCalledWith(item) - expect('Unable to locate target [data-app]').toHaveBeenTipped() - }) - - it('should not populate search field if value is falsey', async () => { - const wrapper = mount(VSelect, { - propsData: { - combobox: true - } - }) - - const event = jest.fn() - wrapper.vm.$on('input', event) - - wrapper.setData({ isActive: true }) - await wrapper.vm.$nextTick() - - wrapper.setProps({ searchInput: '' }) - await wrapper.vm.$nextTick() - - wrapper.setData({ isActive: false }) - await wrapper.vm.$nextTick() - - expect(event).not.toBeCalled() - expect('Unable to locate target [data-app]').toHaveBeenTipped() - }) -}) diff --git a/test/unit/components/VSelect/VSelect.spec.js b/test/unit/components/VSelect/VSelect.spec.js index 05cdf6fb5c3..37a1e423ae2 100644 --- a/test/unit/components/VSelect/VSelect.spec.js +++ b/test/unit/components/VSelect/VSelect.spec.js @@ -8,6 +8,10 @@ import { } from '@/components/VList' test('VSelect', ({ mount, compileToFunctions }) => { + const app = document.createElement('div') + app.setAttribute('data-app', true) + document.body.appendChild(app) + it('should return numeric 0', () => { const item = { value: 0, text: '0' } const wrapper = mount(VSelect, { @@ -23,31 +27,10 @@ test('VSelect', ({ mount, compileToFunctions }) => { wrapper.vm.selectItem(item) expect(change).toBeCalledWith([0]) - expect('Unable to locate target [data-app]').toHaveBeenTipped() - }) - - it('should be in an error state', async () => { - const wrapper = mount(VSelect, { - attachToDocument: true, - propsData: { - value: null, - items: [0, 1, 2], - rules: [(v) => !!v || 'Required'] - } - }) - - wrapper.trigger('focus') - await wrapper.vm.$nextTick() - wrapper.vm.blur() - await wrapper.vm.$nextTick() - - expect(wrapper.vm.hasError).toBe(true) - expect('Unable to locate target [data-app]').toHaveBeenTipped() }) it('should disable list items', () => { const wrapper = mount(VSelect, { - attachToDocument: true, propsData: { items: [{ text: 'item', @@ -56,82 +39,9 @@ test('VSelect', ({ mount, compileToFunctions }) => { } }) - const item = wrapper.find('div.text--disabled')[0] + const item = wrapper.first('div.text--disabled') expect(item.element.getAttribute('disabled')).toBe('disabled') - expect('Unable to locate target [data-app]').toHaveBeenTipped() - }) - - it.skip('should warn when using incorrect item together with segmented prop', async () => { - const items = [ - { text: 'Hello', callback: () => {} }, - { text: 'Hello' } - ] - - const wrapper = mount(VSelect, { - propsData: { - segmented: true, - items - } - }) - - wrapper.vm.inputValue = items[1] - - await wrapper.vm.$nextTick() - - expect('Unable to locate target [data-app]').toHaveBeenTipped() - expect('items must contain both a text and callback property').toHaveBeenTipped() - }) - - it.skip('should render buttons correctly when using items array with segmented prop', async () => { - const items = [ - { text: 'Hello', callback: () => {} } - ] - - const wrapper = mount(VSelect, { - propsData: { - segmented: true, - items - } - }) - - wrapper.vm.inputValue = items[0] - - await wrapper.vm.$nextTick() - - expect(wrapper.html()).toMatchSnapshot() - expect('Unable to locate target [data-app]').toHaveBeenTipped() - }) - - it.skip('should render buttons correctly when using slot with segmented prop', async () => { - const items = [ - { text: 'Hello' } - ] - - const vm = new Vue() - const selection = props => vm.$createElement('div', [props.item]) - const component = Vue.component('test', { - render (h) { - return h(VSelect, { - props: { - segmented: true, - items - }, - scopedSlots: { - selection - } - }) - } - }) - - const wrapper = mount(component) - - wrapper.vm.$children[0].inputValue = items[0] - - await wrapper.vm.$nextTick() - - expect(wrapper.html()).toMatchSnapshot() - expect('Unable to locate target [data-app]').toHaveBeenTipped() }) it('should render v-select correctly when using v-list-tile in item scope slot', async () => { @@ -152,12 +62,8 @@ test('VSelect', ({ mount, compileToFunctions }) => { const component = Vue.component('test', { render (h) { return h(VSelect, { - props: { - items - }, - scopedSlots: { - item: itemSlot - } + props: { items }, + scopedSlots: { item: itemSlot } }) } }) @@ -169,7 +75,6 @@ test('VSelect', ({ mount, compileToFunctions }) => { await wrapper.vm.$nextTick() expect(wrapper.html()).toMatchSnapshot() - expect('Unable to locate target [data-app]').toHaveBeenTipped() }) it('should render v-select correctly when not using v-list-tile in item scope slot', async () => { @@ -189,12 +94,8 @@ test('VSelect', ({ mount, compileToFunctions }) => { const component = Vue.component('test', { render (h) { return h(VSelect, { - props: { - items - }, - scopedSlots: { - item: itemSlot - } + props: { items }, + scopedSlots: { item: itemSlot } }) } }) @@ -206,7 +107,6 @@ test('VSelect', ({ mount, compileToFunctions }) => { await wrapper.vm.$nextTick() expect(wrapper.html()).toMatchSnapshot() - expect('Unable to locate target [data-app]').toHaveBeenTipped() }) it('should render v-select correctly when not using scope slot', async () => { @@ -215,9 +115,7 @@ test('VSelect', ({ mount, compileToFunctions }) => { const component = Vue.component('test', { render (h) { return h(VSelect, { - props: { - items - } + props: { items } }) } }) @@ -229,7 +127,6 @@ test('VSelect', ({ mount, compileToFunctions }) => { await wrapper.vm.$nextTick() expect(wrapper.html()).toMatchSnapshot() - expect('Unable to locate target [data-app]').toHaveBeenTipped() }) it('should not close menu when using multiple prop', async () => { @@ -245,7 +142,7 @@ test('VSelect', ({ mount, compileToFunctions }) => { wrapper.vm.$on('blur', blur) wrapper.trigger('click') - wrapper.trigger('blur') + wrapper.trigger('keydown.tab') await wrapper.vm.$nextTick() @@ -255,19 +152,17 @@ test('VSelect', ({ mount, compileToFunctions }) => { await wrapper.vm.$nextTick() expect(blur).not.toBeCalled() - expect(wrapper.vm.isActive).toBe(true) - expect('Unable to locate target [data-app]').toHaveBeenTipped() + expect(wrapper.vm.isMenuActive).toBe(true) }) - it.skip('should render aria-hidden=true on arrow icon', async () => { + it('should render aria-hidden=true on arrow icon', async () => { const wrapper = mount(VSelect) - const icon = wrapper.find('.input-group__append-icon')[0] + const icon = wrapper.first('.icon') expect(icon.hasAttribute('aria-hidden')).toBe(true) - expect('Unable to locate target [data-app]').toHaveBeenTipped() }) - it('should display a default value', async () => { + it('should only show items if they are in items', async () => { const wrapper = mount(VSelect, { propsData: { value: 'foo', @@ -275,20 +170,33 @@ test('VSelect', ({ mount, compileToFunctions }) => { } }) + expect(wrapper.vm.internalValue).toEqual('foo') expect(wrapper.vm.selectedItems).toEqual(['foo']) - expect('Unable to locate target [data-app]').toHaveBeenTipped() - }) + expect(wrapper.html()).toMatchSnapshot() - it('should not display a default value that is not in items', async () => { - const wrapper = mount(VSelect, { - propsData: { - value: 'foo', - items: ['bar'] - } - }) + wrapper.setProps({ value: 'bar' }) + + await wrapper.vm.$nextTick() + + expect(wrapper.vm.internalValue).toEqual('bar') + expect(wrapper.vm.selectedItems).toEqual([]) + expect(wrapper.html()).toMatchSnapshot() + + wrapper.setProps({ items: ['foo', 'bar'] }) + + await wrapper.vm.$nextTick() + + expect(wrapper.vm.internalValue).toEqual('bar') + expect(wrapper.vm.selectedItems).toEqual(['bar']) + expect(wrapper.html()).toMatchSnapshot() - expect(wrapper.vm.selectedItems).toHaveLength(0) - expect('Unable to locate target [data-app]').toHaveBeenTipped() + wrapper.setProps({ value: ['foo', 'bar'], multiple: true }) + + await wrapper.vm.$nextTick() + + expect(wrapper.vm.internalValue).toEqual(['foo', 'bar']) + expect(wrapper.vm.selectedItems).toEqual(['foo', 'bar']) + expect(wrapper.html()).toMatchSnapshot() }) it('should update the displayed value when items changes', async () => { @@ -301,8 +209,6 @@ test('VSelect', ({ mount, compileToFunctions }) => { wrapper.setProps({ items: [{ text: 'foo', value: 1 }] }) expect(wrapper.vm.selectedItems).toContainEqual({ text: 'foo', value: 1 }) - - expect('Unable to locate target [data-app]').toHaveBeenTipped() }) it('should render select menu with content class', async () => { @@ -317,79 +223,34 @@ test('VSelect', ({ mount, compileToFunctions }) => { const menu = wrapper.find('.menu__content')[0] expect(menu.element.classList).toContain('menu-class') - expect('Unable to locate target [data-app]').toHaveBeenTipped() }) - it.skip('should have deletable chips', async () => { + it('should have deletable chips', async () => { const wrapper = mount(VSelect, { attachToDocument: true, propsData: { chips: true, deletableChips: true, - tags: true, items: ['foo', 'bar'], - value: ['foo'] + value: 'foo' } }) await wrapper.vm.$nextTick() - const chip = wrapper.find('.v-chip')[0] + const chip = wrapper.first('.v-chip') expect(!!chip).toBe(true) - - expect('Unable to locate target [data-app]').toHaveBeenTipped() }) - it.skip('should escape items in menu', async () => { + it('should escape items in menu', async () => { const wrapper = mount(VSelect, { propsData: { - autocomplete: true, items: ['<strong>foo</strong>'] } }) const tileTitle = wrapper.find('.list__tile__title')[0] expect(tileTitle.html()).toMatchSnapshot() - - wrapper.setProps({ searchInput: 'str' }) - await wrapper.vm.$nextTick() - expect(tileTitle.html()).toMatchSnapshot() - - expect('Unable to locate target [data-app]').toHaveBeenTipped() - }) - - it.skip('should have the proper nudge', async () => { - const wrapper = mount(VSelect, { - attachToDocument: true, - propsData: { - hideDetails: true, - items: ['foo', 'bar'] - } - }) - - expect(wrapper.vm.nudgeTop).toBe(-18) - - wrapper.setProps({ autocomplete: true }) - - expect(wrapper.vm.nudgeTop).toBe(0) - - wrapper.setProps({ autocomplete: false, overflow: true }) - - expect(wrapper.vm.nudgeTop).toBe(2) - - wrapper.setProps({ auto: true, overflow: false }) - - expect(wrapper.vm.nudgeTop).toBe(-18) - - wrapper.setProps({ auto: false, overflow: true, hideDetails: false }) - - expect(wrapper.vm.nudgeTop).toBe(26) - - wrapper.setProps({ hideDetails: true }) - - expect(wrapper.vm.nudgeTop).toBe(2) - - expect('Unable to locate target [data-app]').toHaveBeenTipped() }) it('should use value comparator', async () => { @@ -411,10 +272,9 @@ test('VSelect', ({ mount, compileToFunctions }) => { expect(wrapper.vm.selectedItems).toHaveLength(1) expect(wrapper.vm.selectedItems[0].value).toBe(3) - expect('Unable to locate target [data-app]').toHaveBeenTipped() }) - it.skip('should not open if readonly', async () => { + it('should not open if readonly', async () => { const wrapper = mount(VSelect, { propsData: { readonly: true, @@ -424,30 +284,10 @@ test('VSelect', ({ mount, compileToFunctions }) => { wrapper.trigger('click') await wrapper.vm.$nextTick() - expect(wrapper.vm.menuIsActive).toBe(false) + expect(wrapper.vm.isMenuActive).toBe(false) - wrapper.find('.input-group__append-icon')[0].trigger('click') + wrapper.first('.v-input__append-inner').trigger('click') await wrapper.vm.$nextTick() - expect(wrapper.vm.menuIsActive).toBe(false) - - expect('Unable to locate target [data-app]').toHaveBeenTipped() - }) - - it.skip('should reset selected index when clicked', () => { - const wrapper = mount(VSelect, { - propsData: { - items: ['foo'] - } - }) - - const input = wrapper.find('input')[0] - - wrapper.vm.selectedIndex = 0 - input.trigger('focus') - expect(wrapper.vm.selectedIndex).toBe(0) - wrapper.trigger('click') - expect(wrapper.vm.selectedIndex).toBe(-1) - - expect('Unable to locate target [data-app]').toHaveBeenTipped() + expect(wrapper.vm.isMenuActive).toBe(false) }) }) diff --git a/test/unit/components/VSelect/VSelect2.spec.js b/test/unit/components/VSelect/VSelect2.spec.js index c8327fdec05..b00b58c0aa2 100644 --- a/test/unit/components/VSelect/VSelect2.spec.js +++ b/test/unit/components/VSelect/VSelect2.spec.js @@ -2,6 +2,10 @@ import { test } from '@/test' import VSelect from '@/components/VSelect' test('VSelect', ({ mount, compileToFunctions }) => { + const app = document.createElement('div') + app.setAttribute('data-app', true) + document.body.appendChild(app) + // Inspired by https://github.com/vuetifyjs/vuetify/pull/1425 - Thanks @kevmo314 it('should open the select when focused and enter, space, up or down are pressed', async () => { const wrapper = mount(VSelect, { @@ -11,21 +15,21 @@ test('VSelect', ({ mount, compileToFunctions }) => { } }) + const input = wrapper.first('input') + for (const key of ['up', 'down', 'space', 'enter']) { - wrapper.trigger('focus') + input.trigger('focus') await wrapper.vm.$nextTick() - expect(wrapper.vm.menuIsActive).toBe(false) - wrapper.trigger(`keydown.${key}`) + expect(wrapper.vm.isMenuActive).toBe(false) + input.trigger(`keydown.${key}`) await wrapper.vm.$nextTick() - expect(wrapper.vm.menuIsActive).toBe(true) - wrapper.vm.blur() + expect(wrapper.vm.isMenuActive).toBe(true) + wrapper.vm.isMenuActive = false // reset for next iteration await wrapper.vm.$nextTick() } - - expect('Unable to locate target [data-app]').toHaveBeenTipped() }) - it.skip('should clear input value', async () => { + it('should clear input value', async () => { const wrapper = mount(VSelect, { attachToDocument: true, propsData: { @@ -35,24 +39,22 @@ test('VSelect', ({ mount, compileToFunctions }) => { } }) - const clear = wrapper.find('.input-group__append-icon')[0] + const clear = wrapper.find('.icon')[0] const input = jest.fn() wrapper.vm.$on('input', input) await wrapper.vm.$nextTick() - expect(wrapper.vm.inputValue).toBe('foo') - + expect(wrapper.vm.internalValue).toBe('foo') clear.trigger('click') await wrapper.vm.$nextTick() - expect(wrapper.vm.inputValue).toBe(null) + expect(wrapper.vm.internalValue).toBe(null) expect(input).toHaveBeenCalledWith(null) - expect('Unable to locate target [data-app]').toHaveBeenTipped() }) - it.skip('should be clearable with prop, dirty and single select', async () => { + it('should be clearable with prop, dirty and single select', async () => { const wrapper = mount(VSelect, { attachToDocument: true, propsData: { @@ -62,22 +64,19 @@ test('VSelect', ({ mount, compileToFunctions }) => { } }) - const clear = wrapper.find('.input-group__append-icon')[0] + const clear = wrapper.first('.icon') await wrapper.vm.$nextTick() - expect(clear.element.classList).toContain('input-group__icon-clearable') - expect(wrapper.vm.inputValue).toBe(1) + expect(wrapper.vm.internalValue).toBe(1) expect(wrapper.html()).toMatchSnapshot() clear.trigger('click') await wrapper.vm.$nextTick() - expect(wrapper.vm.inputValue).toBe(null) - expect(wrapper.vm.menuIsVisible).toBe(false) - - expect('Unable to locate target [data-app]').toHaveBeenTipped() + expect(wrapper.vm.internalValue).toBe(null) + expect(wrapper.vm.isMenuActive).toBe(false) }) - it.skip('should be clearable with prop, dirty and multi select', async () => { + it('should be clearable with prop, dirty and multi select', async () => { const wrapper = mount(VSelect, { attachToDocument: true, propsData: { @@ -88,7 +87,7 @@ test('VSelect', ({ mount, compileToFunctions }) => { } }) - const clear = wrapper.find('.input-group__append-icon')[0] + const clear = wrapper.first('.icon') const change = jest.fn() wrapper.vm.$on('change', change) @@ -99,9 +98,7 @@ test('VSelect', ({ mount, compileToFunctions }) => { clear.trigger('click') await wrapper.vm.$nextTick() expect(change).toHaveBeenCalledWith([]) - expect(wrapper.vm.menuIsVisible).toBe(false) - - expect('Unable to locate target [data-app]').toHaveBeenTipped() + expect(wrapper.vm.isMenuActive).toBe(false) }) it('should prepropulate selectedItems', () => { @@ -132,7 +129,6 @@ test('VSelect', ({ mount, compileToFunctions }) => { expect(wrapper.vm.selectedItems).toHaveLength(1) expect(wrapper2.vm.selectedItems).toHaveLength(2) expect(wrapper3.vm.selectedItems).toHaveLength(0) - expect('Unable to locate target [data-app]').toHaveBeenTipped() }) it('should show input with placeholder and not dirty', async () => { @@ -144,7 +140,6 @@ test('VSelect', ({ mount, compileToFunctions }) => { }) expect(wrapper.find('input')[0].hasStyle('display', 'block')) - expect('Unable to locate target [data-app]').toHaveBeenTipped() }) it('should not show input with placeholder and dirty', async () => { @@ -158,11 +153,10 @@ test('VSelect', ({ mount, compileToFunctions }) => { }) expect(wrapper.find('input')[0].hasStyle('display', 'none')) - expect('Unable to locate target [data-app]').toHaveBeenTipped() }) // #1704 - it.skip('should populate select when using value as an object', async () => { + it('should populate select when using value as an object', async () => { const wrapper = mount(VSelect, { attachToDocument: true, propsData: { @@ -177,10 +171,9 @@ test('VSelect', ({ mount, compileToFunctions }) => { await wrapper.vm.$nextTick() - const selections = wrapper.find('.input-group__selections__comma') + const selections = wrapper.find('.v-select__selection') expect(selections.length).toBeGreaterThan(0) - expect('Unable to locate target [data-app]').toHaveBeenTipped() }) // Discovered when working on #1704 @@ -203,68 +196,25 @@ test('VSelect', ({ mount, compileToFunctions }) => { item.trigger('click') expect(wrapper.vm.selectedItems).toHaveLength(0) - expect('Unable to locate target [data-app]').toHaveBeenTipped() - }) - - it.skip('should open menu when arrow is clicked', async () => { - const wrapper = mount(VSelect, { - attachToDocument: true, - propsData: { - items: ['foo', 'bar'] - } - }) - - const arrow = wrapper.find('.input-group__append-icon')[0] - - expect(wrapper.vm.menuIsActive).toBe(false) - - arrow.trigger('click') - expect(wrapper.vm.menuIsActive).toBe(true) - - expect('Unable to locate target [data-app]').toHaveBeenTipped() }) - it.skip('should open menu when cleared with open-on-clear', async () => { + it('should open menu when cleared with open-on-clear', async () => { const wrapper = mount(VSelect, { propsData: { clearable: true, openOnClear: true, + items: [1], value: 1 } }) - const clear = wrapper.find('.input-group__append-icon')[0] + const clear = wrapper.first('.v-input__icon--clear .icon') clear.trigger('click') await wrapper.vm.$nextTick() - expect(wrapper.vm.menuIsActive).toBe(true) - - expect('Unable to locate target [data-app]').toHaveBeenTipped() - }) - - it.skip('should not rotate icon if menu is not open', async () => { - const wrapper = mount(VSelect, { - propsData: { - items: [1] - } - }) - - wrapper.trigger('focus') - - await wrapper.vm.$nextTick() - - expect(wrapper.vm.menuIsVisible).toBe(false) - expect(wrapper.hasClass('input-group--open')).toBe(false) - - wrapper.trigger('click') - - await wrapper.vm.$nextTick() - - expect(wrapper.vm.menuIsVisible).toBe(true) - expect(wrapper.hasClass('input-group--open')).toBe(true) + expect(wrapper.vm.isMenuActive).toBe(true) - expect('Unable to locate target [data-app]').toHaveBeenTipped() }) }) diff --git a/test/unit/components/VSelect/__snapshots__/VSelect.spec.js.snap b/test/unit/components/VSelect/__snapshots__/VSelect.spec.js.snap index b3f36b85c9f..4bfd6387536 100644 --- a/test/unit/components/VSelect/__snapshots__/VSelect.spec.js.snap +++ b/test/unit/components/VSelect/__snapshots__/VSelect.spec.js.snap @@ -8,135 +8,144 @@ exports[`VSelect should escape items in menu 1`] = ` `; -exports[`VSelect should escape items in menu 2`] = ` +exports[`VSelect should only show items if they are in items 1`] = ` -<div class="list__tile__title"> - &lt; - <span class="list__tile__mask"> - str - </span> - ong&gt;foo&lt;/strong&gt; +<div class="v-input v-select v-input--text v-input--is-label-active v-input--is-dirty theme--light"> + <div class="v-input__control"> + <div class="v-input__wrapper" + style="height: 32px;" + > + <div class="menu" + style="display: inline-block;" + > + <div class="menu__activator"> + <div class="v-select__slot"> + <label class="v-label v-label--active" + style="left: 0px; position: absolute;" + > + </label> + <div class="v-select__selection"> + foo + </div> + <input tabindex="0" + type="text" + > + <div class="v-input__append-inner"> + <div class="v-input__icon v-input__icon--append"> + <i aria-hidden="true" + class="icon material-icons" + > + arrow_drop_down + </i> + </div> + </div> + </div> + </div> + </div> + </div> + <div class="v-input--text__details"> + <div class="v-messages"> + <div class="v-messages__wrapper"> + </div> + </div> + </div> + </div> </div> `; -exports[`VSelect should render buttons correctly when using items array with segmented prop 1`] = ` +exports[`VSelect should only show items if they are in items 2`] = ` -<div tabindex="0" - data-uid="35" - role="combobox" - class="input-group input-group--dirty input-group--append-icon input-group--text-field input-group--select input-group--segmented input-group--single-line primary--text" -> - <div class="input-group__input"> - <div class="input-group__selections" - style="overflow: hidden;" - > - <button type="button" - class="v-btn v-btn--flat" - > - <div class="v-btn__content"> - Hello - </div> - </button> - <input disabled="disabled" - tabindex="-1" - class="input-group--select__autocomplete" - style="display: none;" - > - </div> - <div class="menu" - style="display: inline-block;" +<div class="v-input v-select v-input--text theme--light"> + <div class="v-input__control"> + <div class="v-input__wrapper" + style="height: 32px;" > - <div class="menu__content menu__content--select menu__content--dropdown" - style="max-height: 300px; min-width: 0px; max-width: auto; top: 12px; left: 0px; z-index: 0; display: none;" + <div class="menu" + style="display: inline-block;" > - <div class="v-card" - style="height: auto;" - > - <div class="list"> - <div> - <a class="list__tile list__tile--link list__tile--active primary--text"> - <div class="list__tile__content"> - <div class="list__tile__title"> - Hello - </div> - </div> - </a> + <div class="menu__activator"> + <div class="v-select__slot"> + <label class="v-label" + style="left: 0px; position: absolute;" + > + </label> + <input tabindex="0" + type="text" + > + <div class="v-input__append-inner"> + <div class="v-input__icon v-input__icon--append"> + <i aria-hidden="true" + class="icon material-icons" + > + arrow_drop_down + </i> + </div> </div> </div> </div> </div> </div> - <i aria-hidden="true" - class="icon material-icons input-group__append-icon input-group__icon-cb" - > - arrow_drop_down - </i> - </div> - <div class="input-group__details"> + <div class="v-input--text__details"> + <div class="v-messages"> + <div class="v-messages__wrapper"> + </div> + </div> + </div> </div> </div> `; -exports[`VSelect should render buttons correctly when using slot with segmented prop 1`] = ` +exports[`VSelect should only show items if they are in items 3`] = ` -<div tabindex="0" - data-uid="45" - role="combobox" - class="input-group input-group--dirty input-group--append-icon input-group--text-field input-group--select input-group--segmented input-group--single-line primary--text" -> - <div class="input-group__input"> - <div class="input-group__selections" - style="overflow: hidden;" - > - <div> - Hello - </div> - <input disabled="disabled" - tabindex="-1" - class="input-group--select__autocomplete" - style="display: none;" - > - </div> - <div class="menu" - style="display: inline-block;" +<div class="v-input v-select v-input--text v-input--is-label-active v-input--is-dirty theme--light"> + <div class="v-input__control"> + <div class="v-input__wrapper" + style="height: 32px;" > - <div class="menu__content menu__content--select menu__content--dropdown" - style="max-height: 300px; min-width: 0px; max-width: auto; top: 12px; left: 0px; z-index: 0; display: none;" + <div class="menu" + style="display: inline-block;" > - <div class="v-card" - style="height: auto;" - > - <div class="list"> - <div> - <a class="list__tile list__tile--link list__tile--active primary--text"> - <div class="list__tile__content"> - <div class="list__tile__title"> - Hello - </div> - </div> - </a> + <div class="menu__activator"> + <div class="v-select__slot"> + <label class="v-label v-label--active" + style="left: 0px; position: absolute;" + > + </label> + <div class="v-select__selection"> + bar + </div> + <input tabindex="0" + type="text" + > + <div class="v-input__append-inner"> + <div class="v-input__icon v-input__icon--append"> + <i aria-hidden="true" + class="icon material-icons" + > + arrow_drop_down + </i> + </div> </div> </div> </div> </div> </div> - <i aria-hidden="true" - class="icon material-icons input-group__append-icon input-group__icon-cb" - > - arrow_drop_down - </i> - </div> - <div class="input-group__details"> + <div class="v-input--text__details"> + <div class="v-messages"> + <div class="v-messages__wrapper"> + </div> + </div> + </div> </div> </div> `; -exports[`VSelect should render v-select correctly when not using scope slot 1`] = ` +exports[`VSelect should only show items if they are in items 4`] = ` -<div class="v-input v-input--select v-input--text v-input--is-label-active v-input--is-dirty theme--light"> +<div class="v-input v-select v-input--text v-input--is-label-active v-input--is-dirty theme--light"> <div class="v-input__control"> <div class="v-input__wrapper" style="height: 32px;" @@ -145,13 +154,16 @@ exports[`VSelect should render v-select correctly when not using scope slot 1`] style="display: inline-block;" > <div class="menu__activator"> - <div class="v-input--select__slot"> + <div class="v-select__slot"> <label class="v-label v-label--active" style="left: 0px; position: absolute;" > </label> - <div class="input-group__selections__comma"> - Text 0 + <div class="v-select__selection"> + foo, + </div> + <div class="v-select__selection"> + bar </div> <input tabindex="0" type="text" @@ -167,30 +179,45 @@ exports[`VSelect should render v-select correctly when not using scope slot 1`] </div> </div> </div> - <div class="menu__content menu__content--select" - style="max-height: 300px; min-width: 0px; max-width: auto; top: 12px; left: 0px; z-index: 0; display: none;" - > - <div class="v-card" - style="height: auto;" - > - <div class="list"> - <div> - <a class="list__tile list__tile--link list__tile--active "> - <div class="list__tile__content"> - <div class="list__tile__title"> - Text 0 - </div> - </div> - </a> - </div> - <div> - <a class="list__tile list__tile--link"> - <div class="list__tile__content"> - <div class="list__tile__title"> - Text 1 - </div> - </div> - </a> + </div> + </div> + <div class="v-input--text__details"> + <div class="v-messages"> + <div class="v-messages__wrapper"> + </div> + </div> + </div> + </div> +</div> + +`; + +exports[`VSelect should render v-select correctly when not using scope slot 1`] = ` + +<div class="v-input v-select v-input--text theme--light"> + <div class="v-input__control"> + <div class="v-input__wrapper" + style="height: 32px;" + > + <div class="menu" + style="display: inline-block;" + > + <div class="menu__activator"> + <div class="v-select__slot"> + <label class="v-label" + style="left: 0px; position: absolute;" + > + </label> + <input tabindex="0" + type="text" + > + <div class="v-input__append-inner"> + <div class="v-input__icon v-input__icon--append"> + <i aria-hidden="true" + class="icon material-icons" + > + arrow_drop_down + </i> </div> </div> </div> @@ -210,7 +237,7 @@ exports[`VSelect should render v-select correctly when not using scope slot 1`] exports[`VSelect should render v-select correctly when not using v-list-tile in item scope slot 1`] = ` -<div class="v-input v-input--select v-input--text v-input--is-label-active v-input--is-dirty theme--light"> +<div class="v-input v-select v-input--text theme--light"> <div class="v-input__control"> <div class="v-input__wrapper" style="height: 32px;" @@ -219,14 +246,11 @@ exports[`VSelect should render v-select correctly when not using v-list-tile in style="display: inline-block;" > <div class="menu__activator"> - <div class="v-input--select__slot"> - <label class="v-label v-label--active" + <div class="v-select__slot"> + <label class="v-label" style="left: 0px; position: absolute;" > </label> - <div class="input-group__selections__comma"> - Text 0 - </div> <input tabindex="0" type="text" > @@ -241,34 +265,6 @@ exports[`VSelect should render v-select correctly when not using v-list-tile in </div> </div> </div> - <div class="menu__content menu__content--select" - style="max-height: 300px; min-width: 0px; max-width: auto; top: 12px; left: 0px; z-index: 0; display: none;" - > - <div class="v-card" - style="height: auto;" - > - <div class="list"> - <div> - <a class="list__tile list__tile--link list__tile--active "> - <div class="list__tile__content"> - <div class="list__tile__title"> - 0 - </div> - </div> - </a> - </div> - <div> - <a class="list__tile list__tile--link"> - <div class="list__tile__content red lighten-1"> - <div class="list__tile__title"> - 1 - </div> - </div> - </a> - </div> - </div> - </div> - </div> </div> </div> <div class="v-input--text__details"> @@ -284,7 +280,7 @@ exports[`VSelect should render v-select correctly when not using v-list-tile in exports[`VSelect should render v-select correctly when using v-list-tile in item scope slot 1`] = ` -<div class="v-input v-input--select v-input--text v-input--is-label-active v-input--is-dirty theme--light"> +<div class="v-input v-select v-input--text theme--light"> <div class="v-input__control"> <div class="v-input__wrapper" style="height: 32px;" @@ -293,14 +289,11 @@ exports[`VSelect should render v-select correctly when using v-list-tile in item style="display: inline-block;" > <div class="menu__activator"> - <div class="v-input--select__slot"> - <label class="v-label v-label--active" + <div class="v-select__slot"> + <label class="v-label" style="left: 0px; position: absolute;" > </label> - <div class="input-group__selections__comma"> - Text 0 - </div> <input tabindex="0" type="text" > @@ -315,26 +308,6 @@ exports[`VSelect should render v-select correctly when using v-list-tile in item </div> </div> </div> - <div class="menu__content menu__content--select" - style="max-height: 300px; min-width: 0px; max-width: auto; top: 12px; left: 0px; z-index: 0; display: none;" - > - <div class="v-card" - style="height: auto;" - > - <div class="list"> - <div class> - <a class="list__tile list__tile--link list__tile--active "> - Text 0 - </a> - </div> - <div class="red lighten-1"> - <a class="list__tile list__tile--link"> - Text 1 - </a> - </div> - </div> - </div> - </div> </div> </div> <div class="v-input--text__details"> diff --git a/test/unit/components/VSelect/__snapshots__/VSelect2.spec.js.snap b/test/unit/components/VSelect/__snapshots__/VSelect2.spec.js.snap index 5a2420d6a2c..b444112bc98 100644 --- a/test/unit/components/VSelect/__snapshots__/VSelect2.spec.js.snap +++ b/test/unit/components/VSelect/__snapshots__/VSelect2.spec.js.snap @@ -2,107 +2,54 @@ exports[`VSelect should be clearable with prop, dirty and multi select 1`] = ` -<div tabindex="0" - data-uid="25" - role="combobox" - class="input-group input-group--dirty input-group--append-icon input-group--text-field input-group--select input-group--multiple primary--text" -> - <div class="input-group__input"> - <div class="input-group__selections" - style="overflow: hidden;" +<div class="v-input v-select v-input--text v-input--is-label-active v-input--is-dirty theme--light"> + <div class="v-input__control"> + <div class="v-input__wrapper" + style="height: 32px;" > - <div class="input-group__selections__comma"> - 1 - </div> - <input disabled="disabled" - tabindex="-1" - class="input-group--select__autocomplete" - style="display: none;" + <div class="menu" + style="display: inline-block;" > - </div> - <div class="menu" - style="display: inline-block;" - > - <div class="menu__content menu__content--select" - style="max-height: 300px; min-width: 0px; max-width: auto; top: 18px; left: 0px; z-index: 0; display: none;" - > - <div class="v-card" - style="height: auto;" - > - <div class="list"> - <div> - <a class="list__tile list__tile--link list__tile--active primary--text"> - <div class="list__tile__action list__tile__action--select-multi"> - <div tabindex="0" - role="checkbox" - aria-checked="true" - class="input-group input-group--dirty checkbox input-group--selection-controls input-group--active primary--text" - > - <div class="input-group__input"> - <i aria-hidden="true" - class="icon icon--selection-control material-icons fade-transition-leave fade-transition-leave-active" - > - check_box_outline_blank - </i> - <i aria-hidden="true" - class="icon icon--selection-control material-icons icon--checkbox fade-transition-enter fade-transition-enter-active" - style="-webkit-transform-origin: top center 0;" - > - check_box - </i> - <div class="input-group--selection-controls__ripple"> - </div> - </div> - <div class="input-group__details"> - </div> - </div> - </div> - <div class="list__tile__content"> - <div class="list__tile__title"> - 1 - </div> - </div> - </a> + <div class="menu__activator"> + <div class="v-select__slot"> + <label class="v-label v-label--active" + style="left: 0px; position: absolute;" + > + </label> + <div class="v-select__selection"> + 1 + </div> + <input tabindex="0" + type="text" + > + <div class="v-input__append-inner"> + <div class="v-input__icon v-input__icon--clear"> + <i aria-hidden="true" + class="icon icon--link material-icons" + > + clear + </i> + </div> </div> - <div> - <a class="list__tile list__tile--link"> - <div class="list__tile__action list__tile__action--select-multi"> - <div tabindex="0" - role="checkbox" - aria-checked="false" - class="input-group checkbox input-group--selection-controls primary--text" - > - <div class="input-group__input"> - <i aria-hidden="true" - class="icon icon--selection-control material-icons" - > - check_box_outline_blank - </i> - <div class="input-group--selection-controls__ripple"> - </div> - </div> - <div class="input-group__details"> - </div> - </div> - </div> - <div class="list__tile__content"> - <div class="list__tile__title"> - 2 - </div> - </div> - </a> + <div class="v-input__append-inner"> + <div class="v-input__icon v-input__icon--append"> + <i aria-hidden="true" + class="icon material-icons" + > + arrow_drop_down + </i> + </div> </div> </div> </div> </div> </div> - <i aria-hidden="true" - class="icon material-icons input-group__append-icon input-group__icon-cb input-group__icon-clearable" - > - clear - </i> - </div> - <div class="input-group__details"> + <div class="v-input--text__details"> + <div class="v-messages"> + <div class="v-messages__wrapper"> + </div> + </div> + </div> </div> </div> @@ -110,63 +57,54 @@ exports[`VSelect should be clearable with prop, dirty and multi select 1`] = ` exports[`VSelect should be clearable with prop, dirty and single select 1`] = ` -<div tabindex="0" - data-uid="17" - role="combobox" - class="input-group input-group--dirty input-group--append-icon input-group--text-field input-group--select primary--text" -> - <div class="input-group__input"> - <div class="input-group__selections" - style="overflow: hidden;" +<div class="v-input v-select v-input--text v-input--is-label-active v-input--is-dirty theme--light"> + <div class="v-input__control"> + <div class="v-input__wrapper" + style="height: 32px;" > - <div class="input-group__selections__comma"> - 1 - </div> - <input disabled="disabled" - tabindex="-1" - class="input-group--select__autocomplete" - style="display: none;" + <div class="menu" + style="display: inline-block;" > - </div> - <div class="menu" - style="display: inline-block;" - > - <div class="menu__content menu__content--select" - style="max-height: 300px; min-width: 0px; max-width: auto; top: 18px; left: 0px; z-index: 0; display: none;" - > - <div class="v-card" - style="height: auto;" - > - <div class="list"> - <div> - <a class="list__tile list__tile--link list__tile--active primary--text"> - <div class="list__tile__content"> - <div class="list__tile__title"> - 1 - </div> - </div> - </a> + <div class="menu__activator"> + <div class="v-select__slot"> + <label class="v-label v-label--active" + style="left: 0px; position: absolute;" + > + </label> + <div class="v-select__selection"> + 1 + </div> + <input tabindex="0" + type="text" + > + <div class="v-input__append-inner"> + <div class="v-input__icon v-input__icon--clear"> + <i aria-hidden="true" + class="icon icon--link material-icons" + > + clear + </i> + </div> </div> - <div> - <a class="list__tile list__tile--link"> - <div class="list__tile__content"> - <div class="list__tile__title"> - 2 - </div> - </div> - </a> + <div class="v-input__append-inner"> + <div class="v-input__icon v-input__icon--append"> + <i aria-hidden="true" + class="icon material-icons" + > + arrow_drop_down + </i> + </div> </div> </div> </div> </div> </div> - <i aria-hidden="true" - class="icon material-icons input-group__append-icon input-group__icon-cb input-group__icon-clearable" - > - clear - </i> - </div> - <div class="input-group__details"> + <div class="v-input--text__details"> + <div class="v-messages"> + <div class="v-messages__wrapper"> + </div> + </div> + </div> </div> </div> diff --git a/test/unit/components/VTextField/VTextField.spec.js b/test/unit/components/VTextField/VTextField.spec.js index d39f9fb0bfe..ce77128dfa5 100644 --- a/test/unit/components/VTextField/VTextField.spec.js +++ b/test/unit/components/VTextField/VTextField.spec.js @@ -139,7 +139,7 @@ test('VTextField.js', ({ mount }) => { const input = jest.fn() wrapper.vm.$on('input', input) - expect(wrapper.vm.proxyValue).toBe('foo') + expect(wrapper.vm.internalValue).toBe('foo') clear.trigger('click') @@ -161,7 +161,7 @@ test('VTextField.js', ({ mount }) => { const icon = wrapper.find('.v-input__icon--append .icon')[0] icon.trigger('click') await wrapper.vm.$nextTick() - expect(wrapper.vm.proxyValue).toBe('foo') + expect(wrapper.vm.internalValue).toBe('foo') expect(appendIconCb.mock.calls).toHaveLength(1) }) @@ -176,7 +176,7 @@ test('VTextField.js', ({ mount }) => { const icon = wrapper.find('.v-input__icon--append .icon')[0] icon.trigger('click') await wrapper.vm.$nextTick() - expect(wrapper.vm.proxyValue).toBe('foo') + expect(wrapper.vm.internalValue).toBe('foo') }) it('should start validating on blur', async () => {
e57229d09e33a920575f0fdaa3c4b2edff513d4f
2018-03-09 18:07:28
John Leider
fix($data-iterator): changed watcher (#3513)
false
changed watcher (#3513)
fix
diff --git a/src/mixins/data-iterable.js b/src/mixins/data-iterable.js index e1d1a3ec1a1..0dad927099f 100644 --- a/src/mixins/data-iterable.js +++ b/src/mixins/data-iterable.js @@ -212,8 +212,8 @@ export default { }, watch: { - search () { - this.updatePagination({ page: 1, totalItems: this.itemsLength }) + itemsLength (totalItems) { + this.updatePagination({ page: 1, totalItems }) } },
458ba58a5ed3dd747436bfc466964cc019270f25
2018-11-30 03:44:57
Dmitriy Sharshakov aka. sh7dm
docs: refactor headers (#5689)
false
refactor headers (#5689)
docs
diff --git a/packages/vuetifyjs.com/src/lang/en/framework/ALaCarte.json b/packages/vuetifyjs.com/src/lang/en/framework/ALaCarte.json index fc96949404e..585e54236ad 100644 --- a/packages/vuetifyjs.com/src/lang/en/framework/ALaCarte.json +++ b/packages/vuetifyjs.com/src/lang/en/framework/ALaCarte.json @@ -1,27 +1,27 @@ { - "header": "Overview", + "header": "# Overview", "headerText": "Being a component framework, Vuetify will always grow horizontally. Depending on your project, a small **package size** may be a requirement. The A la carte system enables you to pick and choose which components to import, drastically _lowering_ your build size.", - "header2": "Example", + "header2": "# Example", "headerText2": "For a pre-built project demonstrating single component imports, install the **a-la-carte** template from the cli, using the command `vue init vuetifyjs/a-la-carte`. Some of our other templates also include options for enabling a-la-carte components. More information is located in the [Quick start guide](/getting-started/quick-start).", - "importHeader": "Importing components", + "importHeader": "## Importing components", "webpackVersionWarning": "Tree shaking only works with webpack 4 in production mode", "importText1": "Vuetify v1.3 brings support for tree-shaking with webpack. Simply import your components from `'vuetify/lib'`", "optionsDirectivesNotice": "The options object that you pass as the second argument to `Vue.use` can also include both a _directives_ and a _transitions_ property.", "importText2": "You can also import components in .vue files, as seen below. When doing so it's important that you import all named exports, and then destructure them in components. Otherwise child components such as `v-card-text` or `v-expansion-panel-content` will not be available.", - "styleHeader": "Required styles", + "styleHeader": "## Required styles", "styleText1": "To obtain all the required styles, we need to import them in stylus. In order for webpack to handle this, you will need to install `stylus` and the `stylus-loader` from **npm**.", "stylusDetailNotice": "For a more detailed explanation on how to setup your application to handle stylus, please navigate to the [theme page](/style/theme#stylus-guide).", "styleText2": "Now you will need to require the stylus from the entry point of your application. This is the same place where you're importing Vue and Vuetify (usually `main.js` or `app.js`). Keep in mind, requiring this in your main `App.vue` can cause slow load times as it is re-processed when you make updates.", - "loaderHeader": "vuetify-loader", + "loaderHeader": "## vuetify-loader", "loaderText1": "Keeping track of all the components you're using can be a real chore, so we wrote a webpack loader to help you. [**vuetify-loader**](https://github.com/vuetifyjs/vuetify-loader) will automatically import all the vuetify components you use, where you use them.\nThis will also make code-splitting more effective, as webpack will only load the components required for that chunk to be displayed.", "loaderText2": "Now any Vuetify component used in a template will be automatically added to an in-component import like above.", - "loaderLimitationsHeader": "Limitations", + "loaderLimitationsHeader": "## Limitations", "loaderLimitationsText1": "When using the `vuetify-loader`, there are a few secnarios which will require manual importing of components.", - "loaderLimitationsDynamicHeader": "Dynamic components", + "loaderLimitationsDynamicHeader": "## Dynamic components", "loaderLimitationsDynamicText1": "`v-data-iterator` can use any component via the **content-tag** prop. This component must be registered [globally](#global-import):", "loaderLimitationsDynamicText2": "Dynamic components used with `<component :is=\"\">` can be registered [locally](#local-import):", - "loaderLimitationsFunctionalHeader": "Functional components", + "loaderLimitationsFunctionalHeader": "## Functional components", "loaderLimitationsFunctionalText1": "Functional components are inlined at runtime by vue, and cannot have a `components` property in their options. Any vuetify components used in a custom functional component must either be registered globally (recommended), or locally whereever the custom component is used.", - "loaderLimitationsPugHeader": "Pre-processors (pug, HAML)", + "loaderLimitationsPugHeader": "## Pre-processors (pug, HAML)", "loaderLimitationsPugText1": "Vuetify-loader currently cannot parse non-html templates such as pug. Anything used in these templates must be imported manually as above." } diff --git a/packages/vuetifyjs.com/src/lang/en/framework/Icons.json b/packages/vuetifyjs.com/src/lang/en/framework/Icons.json index 1c1d64dd9bf..2f6eae3a6a7 100644 --- a/packages/vuetifyjs.com/src/lang/en/framework/Icons.json +++ b/packages/vuetifyjs.com/src/lang/en/framework/Icons.json @@ -1,9 +1,9 @@ { - "header": "Icons", + "header": "# Icons", "headerText": "Vuetify comes bootstrapped with support for Material Icons, Material Design Icons, Font Awesome 4 and Font Awesome 5. By default, applications will default to use Google's [Material Icons](https://material.io/tools/icons/?style=baseline).", "usageText1": "In order to change your font library, add the `iconfont` option during instantiation.", "usageText2": "Using a predefined option will prefill defaults based upon the selected preset. This will overwrite the defaults of components that have default **icon** values. Click [here](https://github.com/vuetifyjs/vuetify/blob/dev/src/components/Vuetify/mixins/icons.js) to view icon values by preset.", - "installHeader": "Installing fonts", + "installHeader": "## Installing fonts", "installText1": "You are required to include the specified icon library (even if using default). This can be done by including a CDN link or importing the icon library into your application", "installMD": "Install Material Icons", "installMDText1": "This is the default icon font for Vuetify. For projects without a build process, it is recommended to import the icons from CDN", @@ -19,12 +19,12 @@ "installFA4Text1": "Same as above. Installing FontAwesome through cdn is the easiest way to check it out within your project:", "installFA4Text2": "Installing FontAwesome**4** is the same as its newer version, just from a different repository. You will be targeting the `font-awesome` repo as opposed to `@fortawesome` one.", "installFA4Text3": "Don't forget, your project will need to recognize css. If you are using webpack, install and setup the [css loader](https://github.com/webpack-contrib/css-loader).", - "customIconsHeader": "Using custom icons", + "customIconsHeader": "## Using custom icons", "customIconsText1": "Let's say your application calls for a custom icon in a Vuetify component. Instead of creating a wrapper component or manually defining the specific icon each time a component appears, you can configure it at a global level.", "customIconsText2": "If you are using a icon library that does not have a preset, you can create a custom one.", - "reusableHeader": "Reusable custom icons", + "reusableHeader": "## Reusable custom icons", "reusableText1": "Vuetify will _automatically_ merge any icon strings provided into the pool of available presets. This allows you to create custom strings that can be utilized in your application by simply referencing the **global icons**.", "reusableText2": "This can help ensure your application is always using a specific icon given a provided string. Here are a few ways that you can use `<v-icon>` with this system.", - "customComponentHeader": "Custom components", + "customComponentHeader": "## Custom components", "customComponentText1": "You can utilize the same icon strings in your own custom components. Any time **$vuetify.icons** is passed in through _v-text_, _v-html_ or as text, `<v-icon>` will look up that specified value. This allows you to create customized solutions that are easy to build and easy to manage." } diff --git a/packages/vuetifyjs.com/src/lang/en/framework/Internationalization.json b/packages/vuetifyjs.com/src/lang/en/framework/Internationalization.json index d69b56314e9..baa95f2edb3 100644 --- a/packages/vuetifyjs.com/src/lang/en/framework/Internationalization.json +++ b/packages/vuetifyjs.com/src/lang/en/framework/Internationalization.json @@ -1,22 +1,22 @@ { - "header": "Internationalization", + "header": "# Internationalization", "headerText": "Vuetify supports language internationalization of its components. When installing Vuetify you can specify available locales and the currently active locale with the `lang` option. See the Getting started section. ", - "gettingStarted": "Getting started", + "gettingStarted": "## Getting started", "gettingStartedText": "To set the available locales or the current locale, supply the `lang` option when installing Vuetify. The provided `locales` property will be merged with the already existing locales. You can change the locale during runtime through the `$vuetify` object on the Vue instance.", "availableLocalesText": "Currently Vuetify provides translations in the following languages:", - "createTranslation": "Create translation", + "createTranslation": "## Create translation", "createTranslationText": "To create your own translation, use the code below or copy and rename the file `vuetify/src/locale/en.ts` to your project and make your changes.", - "customComponents": "Custom components", + "customComponents": "## Custom components", "customComponentsText": "If you are building custom Vuetify components that need to hook into the internationalization engine, you can use the `t` function which exists both directly on the `$vuetify` object and on `$vuetify.lang`.", "api": { "current": "Current locale", "locales": "Available locales", "t": "Translation function used internally" }, - "vueI18nHeader": "Vue i18n", + "vueI18nHeader": "## Vue i18n", "vueI18nText1": "If you are using the vue-i18n package, you can very easily integrate it with Vuetify. This allows you to keep all of your translations in one place. Simply create an entry for $vuetify within your messages and add the corresponding language changes. Then hook up vue-i18n to Vuetify by supplying a custom translation function (as seen in the example below). For a complete list of all available keys, [navigate here](#create-translation).", "vueI18nText2": "An important note when using external localization plugins is that vuetify will not automatically fall back to using english if no localization exists for the current locale. So be sure to supply the plugin with the english localizations as well as your own.", - "rtlHeader": "RTL support", + "rtlHeader": "## RTL support", "rtlText1": "Vuetify supports RTL (right to left) languages through the **rtl** prop during bootstrap. This value is dynamic and will apply custom styles to change the orientation of your components.", "rtlText2": "That's it! In order to change this value dynamically, you can modify the **$vuetify.rtl** property at any time within your application." } diff --git a/packages/vuetifyjs.com/src/lang/en/getting-started/ConsultingAndSupport.json b/packages/vuetifyjs.com/src/lang/en/getting-started/ConsultingAndSupport.json index 2131261f97d..83514c7bcd5 100644 --- a/packages/vuetifyjs.com/src/lang/en/getting-started/ConsultingAndSupport.json +++ b/packages/vuetifyjs.com/src/lang/en/getting-started/ConsultingAndSupport.json @@ -1,4 +1,4 @@ { - "header": "Consulting & Support", + "header": "# Consulting & Support", "headerText": "John Leider, the creator of Vuetify, is now offering Consulting Services for your Vuetify based application. Utilize John's in-demand services for guidance and advice on advanced implementations and best practices or in-depth training for your project's developers." } diff --git a/packages/vuetifyjs.com/src/lang/en/getting-started/Contributing.json b/packages/vuetifyjs.com/src/lang/en/getting-started/Contributing.json index 94a79f80462..8995adfe64e 100644 --- a/packages/vuetifyjs.com/src/lang/en/getting-started/Contributing.json +++ b/packages/vuetifyjs.com/src/lang/en/getting-started/Contributing.json @@ -1,18 +1,18 @@ { - "header": "Be a part of something bigger!", + "header": "# Be a part of something bigger!", "headerText": "Vuetify is made possible by an amazing community that submits issues, creates pull requests, and provides invaluable feedback. It is our job to enable you to create amazing applications. A lot of the time, you come across something that can be made better. Maybe you find a bug, or you have an idea for additional functionality. That's great! It's as easy as cloning the Vuetify repository to get started working in a development environment.", - "issuesHeader": "Reporting issues", + "issuesHeader": "## Reporting issues", "issue1": "The issue list of this repo is exclusively for bug reports and feature requests. Non-conforming issues will be closed immediately.", "issue2": "For general questions, please join the [community](https://chat.vuetifyjs.com).", "issue3": "Try to search for your issue, it may have been answered.", "issue4": "See if the error is reproducible with the latest version.", "issue5": "If reproducible, please provide a simple [codepen](https://template.vuetifyjs.com) or repository that can be cloned to produce the expected behavior.", "issue6": "Please use the [issue creator](https://issues.vuetifyjs.com) to create a new issue.", - "pullRequestsHeader": "Pull requests", + "pullRequestsHeader": "## Pull requests", "pullRequest1": "All PRs should be made to the `dev` branch of Vuetify.", "pullRequest2": "For changes and feature requests, please include an example of what you are trying to solve and an example of the markup", "pullRequest3": "For bug fixes please reference the issue # that the PR resolves", - "localDevHeader": "Setup local dev", + "localDevHeader": "## Setup local dev", "localDevText1": "Vuetify contains a local dev environment that you can bootup to test new features, functionality, and components. First, clone the repository:", "localDevText2": "After cloned, use your cli to <kbd>cd vuetify</kbd>. Once in the directory, you will need to create a new file in the <kbd>dev</kbd> directory called `Playground.vue`. An example has been provided, `Playground.example.vue`, which you can rename. Keep in mind, this file is not tracked by version control. Once copied, go back to your cli and run:", "localDevText3": "This will start a local node server located at [http://localhost:8080](http://localhost:8080). Now from your code editor you can easily load components and test whatever you want at lightning speed!" diff --git a/packages/vuetifyjs.com/src/lang/en/getting-started/FrequentlyAskedQuestions.json b/packages/vuetifyjs.com/src/lang/en/getting-started/FrequentlyAskedQuestions.json index 6449e4ced52..735975130da 100644 --- a/packages/vuetifyjs.com/src/lang/en/getting-started/FrequentlyAskedQuestions.json +++ b/packages/vuetifyjs.com/src/lang/en/getting-started/FrequentlyAskedQuestions.json @@ -1,5 +1,5 @@ { - "header": "Frequently asked questions", + "header": "# Frequently asked questions", "headerText": "Stuck on a particular problem? Check some of these common gotchas before creating a ticket. If you still cannot find what you are looking for, submit an [issue](https://issues.vuetifyjs.com) on github or ask the community in [discord](https://community.vuetifyjs.com).", "question": "Question:", "answer": "Answer", @@ -90,6 +90,6 @@ "a": "In order to ensure all required information is provided, we have created an [Issue Generator](https://github.com/vuetifyjs/vuetify-issue-helper) that helps you through the process. Any issue created not using the generator will automatically be closed, so please use this." } ], - "questionHeader": "Have something that you think belongs here?", + "questionHeader": "## Have something that you think belongs here?", "questionButton": "Let us know" } diff --git a/packages/vuetifyjs.com/src/lang/en/getting-started/Roadmap.json b/packages/vuetifyjs.com/src/lang/en/getting-started/Roadmap.json index 032a60cd620..b025a1edbdf 100644 --- a/packages/vuetifyjs.com/src/lang/en/getting-started/Roadmap.json +++ b/packages/vuetifyjs.com/src/lang/en/getting-started/Roadmap.json @@ -1,5 +1,5 @@ { - "header": "What's coming up", + "header": "# What's coming up", "headerText": "Vuetify is always under development. We are constantly working towards improving the existing codebase, as well as adding new features and functionality that help make building applications even easier. Below is a tentative list of planned features. This is not an exhaustive list and is subject to change at any time without notice.", "roadmap": [ { diff --git a/packages/vuetifyjs.com/src/lang/en/getting-started/SponsorsAndBackers.json b/packages/vuetifyjs.com/src/lang/en/getting-started/SponsorsAndBackers.json index b9d76339f0b..db330a241f4 100644 --- a/packages/vuetifyjs.com/src/lang/en/getting-started/SponsorsAndBackers.json +++ b/packages/vuetifyjs.com/src/lang/en/getting-started/SponsorsAndBackers.json @@ -1,19 +1,19 @@ { "header": "# Support Vuetify's development", "headerText": "Vuetify is an open source project under the [MIT license](https://opensource.org/licenses/MIT). It is and will always be free to use. The time and dedication it takes to maintain the core framework and all supplementing packages is substantial. One-time Donors, Patreon Backers, Affiliates and Special Sponsor contributions allow for continual development of additional functionality even after the completion of Material Design spec. You can support Vuetify’s open-source project by becoming a backer through one of the following means:", - "backersSubHeader": "Diamond ($500/mo)", - "backersSubHeader2": "Palladium ($250/mo)", - "backersSubHeader3": "Platinum ($100/mo)", - "backersSubHeader4": "Gold ($50/mo)", - "affiliatesHeader": "Affiliates:", + "backersSubHeader": "### Diamond ($500/mo)", + "backersSubHeader2": "### Palladium ($250/mo)", + "backersSubHeader3": "### Platinum ($100/mo)", + "backersSubHeader4": "### Gold ($50/mo)", + "affiliatesHeader": "## Affiliates:", "openCollective": "Open Collective:", "openCollectiveBlurb": "Open Collective backers are monthly donors that directly support the Core Development Team.", "patrons": "Patreon Backers:", "patreon": "Patreon:", "patreonBlurb": "Patreon backers are monthly donors that directly support the Author, John Leider.", - "sponsorsHeader": "Service sponsors:", + "sponsorsHeader": "## Service sponsors:", "oneTime": "One Time Donation:", "oneTimeBlurb": "Vuetify is grateful for any one-time donations received through:", - "questionHeader": "Have additional questions?", + "questionHeader": "## Have additional questions?", "questionButton": "Contact Us" } diff --git a/packages/vuetifyjs.com/src/lang/en/getting-started/WhyVuetify.json b/packages/vuetifyjs.com/src/lang/en/getting-started/WhyVuetify.json index ff67c804c79..5fbb2472ec4 100644 --- a/packages/vuetifyjs.com/src/lang/en/getting-started/WhyVuetify.json +++ b/packages/vuetifyjs.com/src/lang/en/getting-started/WhyVuetify.json @@ -1,5 +1,5 @@ { - "header": "What's the difference?", + "header": "# What's the difference?", "headerText": "Choosing a framework can be a daunting task, and I'm not even talking about component frameworks. You've arrived at Vue and now it's time to start developing your next great idea. There are many options to choose from, and everyone says that they are great. So you have to decide, what are my metrics for success?", "philosophies": [ { @@ -21,13 +21,13 @@ ], "whyText1": "This was me almost a year ago. There were plenty of **UI toolkits** to choose from, but none them had everything that I needed...yeah, you've heard that before. Often enough though, it _is_ the reason individual's attempts to create products that fill gaps, and is why I started working on Vuetify.", "whyText2": "But now you are the one searching for that perfect framework, and Vuetify is another on a list of many, vying for your attention. While my opinion will be subjective, I will try to outline features that I believe will be valuable to you and/or your organization.", - "designHeader": "Design principles", + "designHeader": "## Design principles", "designText": "Vuetify is developed exactly according to Material Design spec. Every component is hand crafted to bring you the best possible UI tools to your next great app. The development doesn't stop at the core components outlined in Google's spec. Through the support of community members and sponsors, additional components will be designed and made available for everyone to enjoy.", - "communityHeader": "Active help", + "communityHeader": "## Active help", "communityText": "Developing with Vuetify means you will never be alone. Get help immediately from the dev team and other community members in the official Discord server. Get the opportunity to speak with talented individuals that want you to succeed in your efforts. Need premium support? Become a [Patreon backer](https://www.patreon.com/vuetify) and get access to the #patron or #elite-patron support channels.", - "comparisonHeader": "Comparison to other Frameworks", + "comparisonHeader": "## Comparison to other Frameworks", "comparisonText": "Vuetify is not the only Vue material framework out there. Plenty of other talented developers have created some amazing applications under the guise of Google's Material Design spec. Each offer their own unique take on development and process, however, here are a few things that set Vuetify apart:", - "featuresHeader": "What you get:", + "featuresHeader": "## What you get:", "featuresList": [ "Vibrant Community", "Easy to learn API", @@ -41,6 +41,6 @@ "letterFromAuthor": "I am extremely humbled that you have considered using Vuetify as your next UI Framework. A lot of care has went into forging the perfect setup for taking any idea from conception to production. I look forward to you joining the Vuetify community and am excited to see what incredible interfaces you create!", "authorOfVuetify": "Author of Vuetify", "contactMe": "Contact Me", - "questionHeader": "Still have questions?", + "questionHeader": "## Still have questions?", "questionButton": "Ask the Community" }
78bb19f6f8362cacccb3bd2e7d94210fb257d0f3
2023-05-02 20:33:45
Kael
fix(VIcon): default slot reactivity
false
default slot reactivity
fix
diff --git a/packages/vuetify/src/components/VIcon/VIcon.tsx b/packages/vuetify/src/components/VIcon/VIcon.tsx index 44ecf1bf186..47e542ea916 100644 --- a/packages/vuetify/src/components/VIcon/VIcon.tsx +++ b/packages/vuetify/src/components/VIcon/VIcon.tsx @@ -10,12 +10,9 @@ import { makeThemeProps, provideTheme } from '@/composables/theme' import { useTextColor } from '@/composables/color' // Utilities -import { computed, Text, toRef } from 'vue' +import { computed, ref, Text, toRef } from 'vue' import { convertToUnit, genericComponent, propsFactory, useRender } from '@/util' -// Types -import type { ComputedRef } from 'vue' - export const makeVIconProps = propsFactory({ color: String, start: Boolean, @@ -34,55 +31,54 @@ export const VIcon = genericComponent()({ props: makeVIconProps(), setup (props, { attrs, slots }) { - let slotIcon: ComputedRef<string | undefined> | undefined - if (slots.default) { - slotIcon = computed(() => { - const slot = slots.default?.() - if (!slot) return - - return slot.filter(node => - node.type === Text && node.children && typeof node.children === 'string' - )[0]?.children as string - }) - } + const slotIcon = ref<string>() const { themeClasses } = provideTheme(props) - const { iconData } = useIcon(slotIcon || props) + const { iconData } = useIcon(computed(() => slotIcon.value || props.icon)) const { sizeClasses } = useSize(props) const { textColorClasses, textColorStyles } = useTextColor(toRef(props, 'color')) - useRender(() => ( - <iconData.value.component - tag={ props.tag } - icon={ iconData.value.icon } - class={[ - 'v-icon', - 'notranslate', - themeClasses.value, - sizeClasses.value, - textColorClasses.value, - { - 'v-icon--clickable': !!attrs.onClick, - 'v-icon--start': props.start, - 'v-icon--end': props.end, - }, - props.class, - ]} - style={[ - !sizeClasses.value ? ({ - fontSize: convertToUnit(props.size), - height: convertToUnit(props.size), - width: convertToUnit(props.size), - }) : undefined, - textColorStyles.value, - props.style, - ]} - role={ attrs.onClick ? 'button' : undefined } - aria-hidden={ !attrs.onClick } - > - { slots.default?.() } - </iconData.value.component> - )) + useRender(() => { + const slotValue = slots.default?.() + if (slotValue) { + slotIcon.value = slotValue.filter(node => + node.type === Text && node.children && typeof node.children === 'string' + )[0]?.children as string + } + + return ( + <iconData.value.component + tag={ props.tag } + icon={ iconData.value.icon } + class={[ + 'v-icon', + 'notranslate', + themeClasses.value, + sizeClasses.value, + textColorClasses.value, + { + 'v-icon--clickable': !!attrs.onClick, + 'v-icon--start': props.start, + 'v-icon--end': props.end, + }, + props.class, + ]} + style={[ + !sizeClasses.value ? ({ + fontSize: convertToUnit(props.size), + height: convertToUnit(props.size), + width: convertToUnit(props.size), + }) : undefined, + textColorStyles.value, + props.style, + ]} + role={ attrs.onClick ? 'button' : undefined } + aria-hidden={ !attrs.onClick } + > + { slotValue } + </iconData.value.component> + ) + }) return {} }, diff --git a/packages/vuetify/src/composables/__tests__/icons.spec.ts b/packages/vuetify/src/composables/__tests__/icons.spec.ts index a7d17554182..a6f3ddb5cf5 100644 --- a/packages/vuetify/src/composables/__tests__/icons.spec.ts +++ b/packages/vuetify/src/composables/__tests__/icons.spec.ts @@ -2,7 +2,7 @@ import { useIcon } from '../icons' // Utilities -import { defineComponent } from 'vue' +import { defineComponent, toRef } from 'vue' import { createVuetify } from '@/framework' import { mount } from '@vue/test-utils' import { describe, expect, it } from '@jest/globals' @@ -13,7 +13,7 @@ describe('icons.tsx', () => { icon: String, }, setup (props) { - const { iconData } = useIcon(props) + const { iconData } = useIcon(toRef(props, 'icon')) return () => iconData.value.icon }, diff --git a/packages/vuetify/src/composables/icons.tsx b/packages/vuetify/src/composables/icons.tsx index 8c7f1758ccf..ee25f37e907 100644 --- a/packages/vuetify/src/composables/icons.tsx +++ b/packages/vuetify/src/composables/icons.tsx @@ -2,7 +2,7 @@ import { aliases, mdi } from '@/iconsets/mdi' // Utilities -import { computed, inject, isRef } from 'vue' +import { computed, inject, unref } from 'vue' import { defineComponent, genericComponent, mergeDeep, propsFactory } from '@/util' // Types @@ -187,13 +187,13 @@ export function createIcons (options?: IconOptions) { }, options) } -export const useIcon = (props: Ref<string | undefined> | { icon?: IconValue }) => { +export const useIcon = (props: Ref<IconValue | undefined>) => { const icons = inject(IconSymbol) if (!icons) throw new Error('Missing Vuetify Icons provide!') const iconData: Ref<IconInstance> = computed(() => { - const iconAlias = isRef(props) ? props.value : props.icon + const iconAlias = unref(props) if (!iconAlias) return { component: VComponentIcon }
957b4bc1cc8f870ba155e37be2dca6d5de4e588a
2024-05-23 16:21:21
Kael
fix: remove circular imports
false
remove circular imports
fix
diff --git a/packages/vuetify/src/components/VExpansionPanel/VExpansionPanel.tsx b/packages/vuetify/src/components/VExpansionPanel/VExpansionPanel.tsx index 4e913e6ffe5..881a6f6c0c4 100644 --- a/packages/vuetify/src/components/VExpansionPanel/VExpansionPanel.tsx +++ b/packages/vuetify/src/components/VExpansionPanel/VExpansionPanel.tsx @@ -1,5 +1,5 @@ // Components -import { VExpansionPanelSymbol } from './VExpansionPanels' +import { VExpansionPanelSymbol } from './shared' import { makeVExpansionPanelTextProps, VExpansionPanelText } from './VExpansionPanelText' import { makeVExpansionPanelTitleProps, VExpansionPanelTitle } from './VExpansionPanelTitle' diff --git a/packages/vuetify/src/components/VExpansionPanel/VExpansionPanelText.tsx b/packages/vuetify/src/components/VExpansionPanel/VExpansionPanelText.tsx index cf9f1f4ceea..6c0211b4150 100644 --- a/packages/vuetify/src/components/VExpansionPanel/VExpansionPanelText.tsx +++ b/packages/vuetify/src/components/VExpansionPanel/VExpansionPanelText.tsx @@ -1,5 +1,5 @@ // Components -import { VExpansionPanelSymbol } from './VExpansionPanels' +import { VExpansionPanelSymbol } from './shared' import { VExpandTransition } from '@/components/transitions' // Composables diff --git a/packages/vuetify/src/components/VExpansionPanel/VExpansionPanelTitle.tsx b/packages/vuetify/src/components/VExpansionPanel/VExpansionPanelTitle.tsx index 50083b3850b..54cc401592c 100644 --- a/packages/vuetify/src/components/VExpansionPanel/VExpansionPanelTitle.tsx +++ b/packages/vuetify/src/components/VExpansionPanel/VExpansionPanelTitle.tsx @@ -1,5 +1,5 @@ // Components -import { VExpansionPanelSymbol } from './VExpansionPanels' +import { VExpansionPanelSymbol } from './shared' import { VIcon } from '@/components/VIcon' // Composables diff --git a/packages/vuetify/src/components/VExpansionPanel/VExpansionPanels.tsx b/packages/vuetify/src/components/VExpansionPanel/VExpansionPanels.tsx index f60ccb44420..ac5d7e6e9f5 100644 --- a/packages/vuetify/src/components/VExpansionPanel/VExpansionPanels.tsx +++ b/packages/vuetify/src/components/VExpansionPanel/VExpansionPanels.tsx @@ -2,6 +2,7 @@ import './VExpansionPanel.sass' // Components +import { VExpansionPanelSymbol } from './shared' import { makeVExpansionPanelProps } from './VExpansionPanel' // Composables @@ -14,10 +15,7 @@ import { computed, toRef } from 'vue' import { genericComponent, propsFactory, useRender } from '@/util' // Types -import type { InjectionKey, PropType } from 'vue' -import type { GroupItemProvide } from '@/composables/group' - -export const VExpansionPanelSymbol: InjectionKey<GroupItemProvide> = Symbol.for('vuetify:v-expansion-panel') +import type { PropType } from 'vue' const allowedVariants = ['default', 'accordion', 'inset', 'popout'] as const diff --git a/packages/vuetify/src/components/VExpansionPanel/shared.ts b/packages/vuetify/src/components/VExpansionPanel/shared.ts new file mode 100644 index 00000000000..002b0a0379e --- /dev/null +++ b/packages/vuetify/src/components/VExpansionPanel/shared.ts @@ -0,0 +1,5 @@ +// Types +import type { InjectionKey } from 'vue' +import type { GroupItemProvide } from '@/composables/group' + +export const VExpansionPanelSymbol: InjectionKey<GroupItemProvide> = Symbol.for('vuetify:v-expansion-panel') diff --git a/packages/vuetify/src/components/VStepper/VStepper.tsx b/packages/vuetify/src/components/VStepper/VStepper.tsx index 1350134118c..c00678e8133 100644 --- a/packages/vuetify/src/components/VStepper/VStepper.tsx +++ b/packages/vuetify/src/components/VStepper/VStepper.tsx @@ -2,6 +2,7 @@ import './VStepper.sass' // Components +import { VStepperSymbol } from './shared' import { makeVStepperActionsProps, VStepperActions } from './VStepperActions' import { VStepperHeader } from './VStepperHeader' import { VStepperItem } from './VStepperItem' @@ -19,11 +20,8 @@ import { computed, toRefs } from 'vue' import { genericComponent, getPropertyFromItem, only, propsFactory, useRender } from '@/util' // Types -import type { InjectionKey, PropType } from 'vue' +import type { PropType } from 'vue' import type { StepperItem, StepperItemSlot } from './VStepperItem' -import type { GroupItemProvide } from '@/composables/group' - -export const VStepperSymbol: InjectionKey<GroupItemProvide> = Symbol.for('vuetify:v-stepper') export type VStepperSlot = { prev: () => void diff --git a/packages/vuetify/src/components/VStepper/VStepperItem.tsx b/packages/vuetify/src/components/VStepper/VStepperItem.tsx index 42766e6221a..7873532a86c 100644 --- a/packages/vuetify/src/components/VStepper/VStepperItem.tsx +++ b/packages/vuetify/src/components/VStepper/VStepperItem.tsx @@ -14,7 +14,7 @@ import { Ripple } from '@/directives/ripple' // Utilities import { computed } from 'vue' -import { VStepperSymbol } from './VStepper' +import { VStepperSymbol } from './shared' import { genericComponent, propsFactory, useRender } from '@/util' // Types diff --git a/packages/vuetify/src/components/VStepper/VStepperWindow.tsx b/packages/vuetify/src/components/VStepper/VStepperWindow.tsx index b59f2da9023..146fec2fd28 100644 --- a/packages/vuetify/src/components/VStepper/VStepperWindow.tsx +++ b/packages/vuetify/src/components/VStepper/VStepperWindow.tsx @@ -1,4 +1,5 @@ // Components +import { VStepperSymbol } from './shared' import { makeVWindowProps, VWindow } from '@/components/VWindow/VWindow' // Composables @@ -8,12 +9,6 @@ import { useProxiedModel } from '@/composables/proxiedModel' import { computed, inject } from 'vue' import { genericComponent, omit, propsFactory, useRender } from '@/util' -// Types -import type { InjectionKey } from 'vue' -import type { GroupProvide } from '@/composables/group' - -export const VStepperSymbol: InjectionKey<GroupProvide> = Symbol.for('vuetify:v-stepper') - export const makeVStepperWindowProps = propsFactory({ ...omit(makeVWindowProps(), ['continuous', 'nextIcon', 'prevIcon', 'showArrows', 'touch', 'mandatory']), }, 'VStepperWindow') diff --git a/packages/vuetify/src/components/VStepper/shared.ts b/packages/vuetify/src/components/VStepper/shared.ts new file mode 100644 index 00000000000..0612889d89d --- /dev/null +++ b/packages/vuetify/src/components/VStepper/shared.ts @@ -0,0 +1,5 @@ +// Types +import type { InjectionKey } from 'vue' +import type { GroupProvide } from '@/composables/group' + +export const VStepperSymbol: InjectionKey<GroupProvide> = Symbol.for('vuetify:v-stepper') diff --git a/packages/vuetify/src/composables/defaults.ts b/packages/vuetify/src/composables/defaults.ts index 701c61824b9..395354152b3 100644 --- a/packages/vuetify/src/composables/defaults.ts +++ b/packages/vuetify/src/composables/defaults.ts @@ -1,6 +1,8 @@ // Utilities import { computed, inject, provide, ref, shallowRef, unref, watchEffect } from 'vue' -import { getCurrentInstance, injectSelf, mergeDeep, toKebabCase } from '@/util' +import { getCurrentInstance } from '@/util/getCurrentInstance' +import { mergeDeep, toKebabCase } from '@/util/helpers' +import { injectSelf } from '@/util/injectSelf' // Types import type { ComputedRef, InjectionKey, Ref, VNode } from 'vue' diff --git a/packages/vuetify/src/labs/VStepperVertical/VStepperVerticalItem.tsx b/packages/vuetify/src/labs/VStepperVertical/VStepperVerticalItem.tsx index fb2f13c0e7c..e2d719e06da 100644 --- a/packages/vuetify/src/labs/VStepperVertical/VStepperVerticalItem.tsx +++ b/packages/vuetify/src/labs/VStepperVertical/VStepperVerticalItem.tsx @@ -5,8 +5,7 @@ import './VStepperVerticalItem.sass' import { VStepperVerticalActions } from './VStepperVerticalActions' import { VAvatar } from '@/components/VAvatar/VAvatar' import { VDefaultsProvider } from '@/components/VDefaultsProvider/VDefaultsProvider' -import { VExpansionPanel } from '@/components/VExpansionPanel' -import { makeVExpansionPanelProps } from '@/components/VExpansionPanel/VExpansionPanel' +import { makeVExpansionPanelProps, VExpansionPanel } from '@/components/VExpansionPanel/VExpansionPanel' import { VIcon } from '@/components/VIcon/VIcon' import { makeStepperItemProps } from '@/components/VStepper/VStepperItem' diff --git a/packages/vuetify/src/labs/VTreeview/VTreeviewItem.tsx b/packages/vuetify/src/labs/VTreeview/VTreeviewItem.tsx index 738bc411533..6fae4204548 100644 --- a/packages/vuetify/src/labs/VTreeview/VTreeviewItem.tsx +++ b/packages/vuetify/src/labs/VTreeview/VTreeviewItem.tsx @@ -5,6 +5,7 @@ import './VTreeviewItem.sass' import { VBtn } from '@/components/VBtn' import { VListItemAction } from '@/components/VList' import { makeVListItemProps, VListItem } from '@/components/VList/VListItem' +import { VProgressCircular } from '@/components/VProgressCircular' // Composables import { IconValue } from '@/composables/icons' @@ -16,7 +17,6 @@ import { genericComponent, propsFactory, useRender } from '@/util' // Types import { VTreeviewSymbol } from './shared' -import { VProgressCircular } from '../allComponents' import type { VListItemSlots } from '@/components/VList/VListItem' export const makeVTreeviewItemProps = propsFactory({
65317e56fe76a954ef3be22fd7d1dbf14899cbe8
2019-01-13 06:58:13
Albert Kaaman
feat(VTreeview): add return-object prop (#6064)
false
add return-object prop (#6064)
feat
diff --git a/packages/docs/src/lang/en/components/Treeview.json b/packages/docs/src/lang/en/components/Treeview.json index 1aeaad19690..b3ec606cd06 100644 --- a/packages/docs/src/lang/en/components/Treeview.json +++ b/packages/docs/src/lang/en/components/Treeview.json @@ -38,6 +38,7 @@ "open": "Syncable prop that allows one to control which nodes are open. The array consists of the `item-key` of each open item.", "openAll": "When `true` will cause all branch nodes to be opened when component is mounted", "openOnClick": "When `true` will cause nodes to be opened by clicking anywhere on it, instead of only opening by clicking on expand icon. When using this prop with `activatable` you will be unable to mark nodes with children as active.", + "returnObject": "When `true` will make v-model, `active.sync` and `open.sync` return the complete object instead of just the key", "selectable": "Will render a checkbox next to each node allowing them to be selected", "selectedColor": "The color of the selection checkbox", "transition": "Applies a transition when nodes are opened and closed", diff --git a/packages/vuetify/src/components/VTreeview/VTreeview.ts b/packages/vuetify/src/components/VTreeview/VTreeview.ts index a7f93ad77d3..971284fbda9 100644 --- a/packages/vuetify/src/components/VTreeview/VTreeview.ts +++ b/packages/vuetify/src/components/VTreeview/VTreeview.ts @@ -60,6 +60,10 @@ export default mixins( default: () => ([]) } as PropValidator<NodeArray>, openAll: Boolean, + returnObject: { + type: Boolean, + default: false // TODO: Should be true in next major + }, value: { type: Array, default: () => ([]) @@ -102,29 +106,14 @@ export default mixins( }, deep: true }, - active (value: (string | number)[]) { - const old = [...this.activeCache] - if (!value || deepEqual(old, value)) return - - old.forEach(key => this.updateActive(key, false)) - value.forEach(key => this.updateActive(key, true)) - this.emitActive() + active (value: (string | number | any)[]) { + this.handleNodeCacheWatcher(value, this.activeCache, this.updateActive, this.emitActive) }, - value (value: (string | number)[]) { - const old = [...this.selectedCache] - if (!value || deepEqual(old, value)) return - - old.forEach(key => this.updateSelected(key, false)) - value.forEach(key => this.updateSelected(key, true)) - this.emitSelected() + value (value: (string | number | any)[]) { + this.handleNodeCacheWatcher(value, this.selectedCache, this.updateSelected, this.emitSelected) }, - open (value: (string | number)[]) { - const old = [...this.openCache] - if (deepEqual(old, value)) return - - old.forEach(key => this.updateOpen(key, false)) - value.forEach(key => this.updateOpen(key, true)) - this.emitOpen() + open (value: (string | number | any)[]) { + this.handleNodeCacheWatcher(value, this.openCache, this.updateOpen, this.emitOpen) } }, @@ -217,13 +206,26 @@ export default mixins( return node }, emitOpen () { - this.$emit('update:open', [...this.openCache]) + this.emitNodeCache('update:open', this.openCache) }, emitSelected () { - this.$emit('input', [...this.selectedCache]) + this.emitNodeCache('input', this.selectedCache) }, emitActive () { - this.$emit('update:active', [...this.activeCache]) + this.emitNodeCache('update:active', this.activeCache) + }, + emitNodeCache (event: string, cache: NodeCache) { + this.$emit(event, this.returnObject ? [...cache].map(key => this.nodes[key].item) : [...cache]) + }, + handleNodeCacheWatcher (value: any[], cache: NodeCache, updateFn: Function, emitFn: Function) { + value = this.returnObject ? value.map(v => getObjectValueByPath(v, this.itemKey)) : value + const old = [...cache] + if (deepEqual(old, value)) return + + old.forEach(key => updateFn(key, false)) + value.forEach(key => updateFn(key, true)) + + emitFn() }, getDescendants (key: string | number, descendants: NodeArray = []) { const children = this.nodes[key].children diff --git a/packages/vuetify/test/unit/components/VTreeview/VTreeview.spec.js b/packages/vuetify/test/unit/components/VTreeview/VTreeview.spec.js index b85a08c32bf..a4c8ea51d5c 100644 --- a/packages/vuetify/test/unit/components/VTreeview/VTreeview.spec.js +++ b/packages/vuetify/test/unit/components/VTreeview/VTreeview.spec.js @@ -132,7 +132,8 @@ test('VTreeView.ts', ({ mount }) => { const wrapper = mount(VTreeview, { propsData: { items: [{ id: 0, name: 'Root', children: [{ id: 1, name: 'Child' }] }], - value: [] + value: [], + selectable: true } }) @@ -146,7 +147,7 @@ test('VTreeView.ts', ({ mount }) => { expect(wrapper.find('.v-treeview-node--selected').length).toBe(2) expect(wrapper.html()).toMatchSnapshot() - wrapper.setProps({ value: undefined }) + wrapper.setProps({ value: [] }) await wrapper.vm.$nextTick() expect(wrapper.html()).toMatchSnapshot() }) @@ -410,4 +411,42 @@ test('VTreeView.ts', ({ mount }) => { expect(Object.keys(wrapper.vm.nodes).length).toBe(2) }) + + it('should emit objects when return-object prop is used', async () => { + const items = [{ id: 0, name: 'Root', children: [{ id: 1, name: 'Child' }] }] + + const wrapper = mount(VTreeview, { + propsData: { + items, + activatable: true, + selectable: true, + returnObject: true + } + }) + + const active = jest.fn() + wrapper.vm.$on('update:active', active) + const selected = jest.fn() + wrapper.vm.$on('input', selected) + const open = jest.fn() + wrapper.vm.$on('update:open', open) + + wrapper.find('.v-treeview-node__root')[0].trigger('click') + await wrapper.vm.$nextTick() + + expect(active).toHaveBeenCalledTimes(1) + expect(active).toHaveBeenCalledWith([items[0]]) + + wrapper.find('.v-treeview-node__checkbox')[0].trigger('click') + await wrapper.vm.$nextTick() + + expect(selected).toHaveBeenCalledTimes(1) + expect(selected).toHaveBeenCalledWith([items[0], items[0].children[0]]) + + wrapper.find('.v-treeview-node__toggle')[0].trigger('click') + await wrapper.vm.$nextTick() + + expect(open).toHaveBeenCalledTimes(1) + expect(open).toHaveBeenCalledWith([items[0]]) + }) }) diff --git a/packages/vuetify/test/unit/components/VTreeview/__snapshots__/VTreeview.spec.js.snap b/packages/vuetify/test/unit/components/VTreeview/__snapshots__/VTreeview.spec.js.snap index 428bc436201..3c279617d49 100644 --- a/packages/vuetify/test/unit/components/VTreeview/__snapshots__/VTreeview.spec.js.snap +++ b/packages/vuetify/test/unit/components/VTreeview/__snapshots__/VTreeview.spec.js.snap @@ -533,6 +533,11 @@ exports[`VTreeView.ts should update selection when selected prop changes 1`] = ` > arrow_drop_down </i> + <i aria-hidden="true" + class="v-icon v-treeview-node__checkbox v-icon--link material-icons theme--light" + > + check_box_outline_blank + </i> <div class="v-treeview-node__content"> <div class="v-treeview-node__label"> Root @@ -554,6 +559,11 @@ exports[`VTreeView.ts should update selection when selected prop changes 2`] = ` > arrow_drop_down </i> + <i aria-hidden="true" + class="v-icon v-treeview-node__checkbox v-icon--link material-icons theme--light accent--text" + > + check_box + </i> <div class="v-treeview-node__content"> <div class="v-treeview-node__label"> Root @@ -563,6 +573,11 @@ exports[`VTreeView.ts should update selection when selected prop changes 2`] = ` <div class="v-treeview-node__children"> <div class="v-treeview-node v-treeview-node--leaf v-treeview-node--selected"> <div class="v-treeview-node__root"> + <i aria-hidden="true" + class="v-icon v-treeview-node__checkbox v-icon--link material-icons theme--light accent--text" + > + check_box + </i> <div class="v-treeview-node__content"> <div class="v-treeview-node__label"> Child @@ -579,13 +594,18 @@ exports[`VTreeView.ts should update selection when selected prop changes 2`] = ` exports[`VTreeView.ts should update selection when selected prop changes 3`] = ` <div class="v-treeview theme--light"> - <div class="v-treeview-node v-treeview-node--selected"> + <div class="v-treeview-node"> <div class="v-treeview-node__root"> <i aria-hidden="true" class="v-icon v-treeview-node__toggle v-icon--link material-icons theme--light v-treeview-node__toggle--open" > arrow_drop_down </i> + <i aria-hidden="true" + class="v-icon v-treeview-node__checkbox v-icon--link material-icons theme--light" + > + check_box_outline_blank + </i> <div class="v-treeview-node__content"> <div class="v-treeview-node__label"> Root @@ -593,8 +613,13 @@ exports[`VTreeView.ts should update selection when selected prop changes 3`] = ` </div> </div> <div class="v-treeview-node__children"> - <div class="v-treeview-node v-treeview-node--leaf v-treeview-node--selected"> + <div class="v-treeview-node v-treeview-node--leaf"> <div class="v-treeview-node__root"> + <i aria-hidden="true" + class="v-icon v-treeview-node__checkbox v-icon--link material-icons theme--light" + > + check_box_outline_blank + </i> <div class="v-treeview-node__content"> <div class="v-treeview-node__label"> Child
5a7e4cc8ead20a2ef024c6d9142482cbc07ff36d
2025-03-18 10:50:18
Kael
docs: update roadmap
false
update roadmap
docs
diff --git a/packages/docs/src/pages/en/introduction/roadmap.md b/packages/docs/src/pages/en/introduction/roadmap.md index e5334ab9a6c..6031f5852cb 100644 --- a/packages/docs/src/pages/en/introduction/roadmap.md +++ b/packages/docs/src/pages/en/introduction/roadmap.md @@ -18,28 +18,29 @@ Vuetify is always under development. We are constantly working towards improving <PromotedEntry /> -## 2024 Component Roadmap - -The following is a list of all planned components for the year 2024. - -| Component | Entering Labs | Production Release | -|-------------------------------------------------------------------------|---------------|-------------------------------| -| [v3.8 (Andromeda)](https://github.com/vuetifyjs/vuetify/milestone/74) | | Q1 2025 { .bg-surface-light } | -| [v-number-input](/components/number-inputs/) | * | | -| [v-snackbar-queue](/components/snackbar-queue/) | * | | -| [v-time-picker](/components/time-pickers/) | * | | -| [v-treeview](/components/treeview/) | * | | -| [v-stepper-vertical](/components/vertical-steppers/) | * | | -| [v4.0 (Revisionist)](https://github.com/vuetifyjs/vuetify/milestone/62) | | 2025 { .bg-surface-light } | -| [v-date-input](/components/date-inputs/) | * | | -| [v-calendar](/components/calendars/) | * | | -| [v-time-input](https://github.com/vuetifyjs/vuetify/pull/19709) | Q1 2025 | | -| Future - v4.1+ | | TBD { .bg-surface-light } | -| [v-file-upload](https://github.com/vuetifyjs/vuetify/pull/19667) | * | | -| v-date-time-picker | Q1 2025 | | -| v-date-range-picker | Q1 2025 | | -| v-video | TBD | | -| v-feature-discovery | TBD | | +## 2025 Component Roadmap + +The following is a list of all planned components for the year 2025. + +| Component | Entering Labs | Production Release | +|-------------------------------------------------------------------------|---------------|----------------------------------| +| [v3.8 (Andromeda)](https://github.com/vuetifyjs/vuetify/milestone/74) | | March 2025 { .bg-surface-light } | +| [v-number-input](/components/number-inputs/) | * | | +| [v-snackbar-queue](/components/snackbar-queue/) | * | | +| [v-time-picker](/components/time-pickers/) | * | | +| [v-stepper-vertical](/components/vertical-steppers/) | * | | +| [v3.9 (Zealot)](https://github.com/vuetifyjs/vuetify/milestone/78) | | Q2 2025 { .bg-surface-light } | +| [v-treeview](/components/treeview/) | * | | +| [v-file-upload](/components/file-upload/) | * | | +| [v4.0 (Revisionist)](https://github.com/vuetifyjs/vuetify/milestone/62) | | 2025 { .bg-surface-light } | +| [v-date-input](/components/date-inputs/) | * | | +| [v-calendar](/components/calendars/) | * | | +| [v-time-input](https://github.com/vuetifyjs/vuetify/pull/19709) | Q1 2025 | | +| Future - [v4.1](https://github.com/vuetifyjs/vuetify/milestone/77)+ | | TBD { .bg-surface-light } | +| v-date-time-picker | Q2 2025 | | +| v-date-range-picker | Q2 2025 | | +| v-video | TBD | | +| v-feature-discovery | TBD | | \* Already in Labs { .text-caption }
eeefd9cb112aea7a7edf60629c470fdbd0b08721
2021-02-10 02:50:48
John Leider
chore(release): publish v2.4.4
false
publish v2.4.4
chore
diff --git a/lerna.json b/lerna.json index 58a6be84d34..53a838dddc3 100644 --- a/lerna.json +++ b/lerna.json @@ -13,6 +13,6 @@ } }, "npmClient": "yarn", - "version": "2.4.3", + "version": "2.4.4", "useWorkspaces": true } diff --git a/packages/api-generator/package.json b/packages/api-generator/package.json index de32f498369..e5042fdf9b9 100755 --- a/packages/api-generator/package.json +++ b/packages/api-generator/package.json @@ -1,6 +1,6 @@ { "name": "@vuetify/api-generator", - "version": "2.4.3", + "version": "2.4.4", "private": true, "description": "", "main": "src/index.js", @@ -17,7 +17,7 @@ "deepmerge": "^4.0.0", "rimraf": "^3.0.2", "vue": "^2.6.11", - "vuetify": "^2.4.3" + "vuetify": "^2.4.4" }, "devDependencies": { "@babel/node": "^7.5.5", diff --git a/packages/docs/package.json b/packages/docs/package.json index 9e4267676ff..be97f650c23 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -3,7 +3,7 @@ "description": "A Vue.js project", "private": true, "author": "John Leider <[email protected]>", - "version": "2.4.3", + "version": "2.4.4", "repository": { "type": "git", "url": "git+https://github.com/vuetifyjs/vuetify.git", @@ -30,7 +30,7 @@ "register-service-worker": "^1.7.1", "vue-i18n": "^8.17.7", "vue-router": "^3.1.6", - "vuetify": "^2.4.3", + "vuetify": "^2.4.4", "vuex": "^3.4.0", "webpack-node-externals": "^2.5.1" }, @@ -41,7 +41,7 @@ "@vue/cli-plugin-router": "~4.5.3", "@vue/cli-plugin-vuex": "~4.5.3", "@vue/cli-service": "~4.5.3", - "@vuetify/api-generator": "^2.4.3", + "@vuetify/api-generator": "^2.4.4", "@vuetify/vue-cli-plugin-base": "~0.3.5", "cosmicjs": "^3.2.43", "date-fns": "^2.14.0", diff --git a/packages/vuetify/package.json b/packages/vuetify/package.json index cfb12377ba4..345301bbcf6 100644 --- a/packages/vuetify/package.json +++ b/packages/vuetify/package.json @@ -1,7 +1,7 @@ { "name": "vuetify", "description": "Vue Material Component Framework", - "version": "2.4.3", + "version": "2.4.4", "author": { "name": "John Leider", "email": "[email protected]"
cfd4b70fa719b1445bf5f9175e3a29ef26044f2d
2022-03-07 21:18:38
John Leider
feat(VSystemBar): add color support, update sass and variables
false
add color support, update sass and variables
feat
diff --git a/packages/vuetify/src/components/VSystemBar/VSystemBar.sass b/packages/vuetify/src/components/VSystemBar/VSystemBar.sass index 24f7b177e2d..eeb06fa8397 100644 --- a/packages/vuetify/src/components/VSystemBar/VSystemBar.sass +++ b/packages/vuetify/src/components/VSystemBar/VSystemBar.sass @@ -4,35 +4,29 @@ .v-system-bar align-items: center - background: $system-bar-background display: flex flex: $system-bar-flex - font-size: $system-bar-font-size - font-weight: $system-bar-font-weight height: $system-bar-height - justify-content: flex-end + justify-content: $system-bar-justify-content padding: $system-bar-padding position: relative + text-align: $system-bar-text-align - i - color: $system-bar-icon-color + .v-icon font-size: $system-bar-icon-font-size + margin-inline-start: $system-bar-icon-margin-inline-start + opacity: $system-bar-icon-opacity - // Defaults missing in variables @include border($system-bar-query) @include tools.elevation($system-bar-elevation) @include tools.position($system-bar-positions) - @include tools.rounded($system-bar-border-radius) - - text-align: end - - &--lights-out - background: $system-bar-lights-out-background + @include tools.theme($system-bar-theme...) + @include tools.typography($system-bar-typography...) &--rounded - @include tools.rounded($system-bar-rounded-border-radius) + @include tools.rounded($system-bar-border-radius) &--window height: $system-bar-window-height - i + .v-icon font-size: $system-bar-window-icon-font-size diff --git a/packages/vuetify/src/components/VSystemBar/VSystemBar.tsx b/packages/vuetify/src/components/VSystemBar/VSystemBar.tsx index d9f90916680..c168d9111de 100644 --- a/packages/vuetify/src/components/VSystemBar/VSystemBar.tsx +++ b/packages/vuetify/src/components/VSystemBar/VSystemBar.tsx @@ -2,25 +2,25 @@ import './VSystemBar.sass' // Composables -import { makeBorderProps, useBorder } from '@/composables/border' import { makeDimensionProps, useDimension } from '@/composables/dimensions' import { makeElevationProps, useElevation } from '@/composables/elevation' import { makePositionProps, usePosition } from '@/composables/position' import { makeRoundedProps, useRounded } from '@/composables/rounded' import { makeTagProps } from '@/composables/tag' import { makeThemeProps, provideTheme } from '@/composables/theme' +import { useBackgroundColor } from '@/composables/color' // Utilities import { defineComponent } from '@/util' +import { toRef } from 'vue' export const VSystemBar = defineComponent({ name: 'VSystemBar', props: { - lightsOut: Boolean, + color: String, window: Boolean, - ...makeBorderProps(), ...makeDimensionProps(), ...makeElevationProps(), ...makePositionProps(), @@ -31,7 +31,7 @@ export const VSystemBar = defineComponent({ setup (props, { slots }) { const { themeClasses } = provideTheme(props) - const { borderClasses } = useBorder(props) + const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'color')) const { dimensionStyles } = useDimension(props) const { elevationClasses } = useElevation(props) const { positionClasses, positionStyles } = usePosition(props) @@ -40,18 +40,16 @@ export const VSystemBar = defineComponent({ return () => ( <props.tag class={[ - { - 'v-system-bar': true, - 'v-system-bar--lights-out': props.lightsOut, - 'v-system-bar--window': props.window, - }, + 'v-system-bar', + { 'v-system-bar--window': props.window }, themeClasses.value, - borderClasses.value, + backgroundColorClasses.value, elevationClasses.value, positionClasses.value, roundedClasses.value, ]} style={[ + backgroundColorStyles.value, dimensionStyles.value, positionStyles.value, ]} diff --git a/packages/vuetify/src/components/VSystemBar/_variables.scss b/packages/vuetify/src/components/VSystemBar/_variables.scss index a967020b2d0..d11261ce144 100644 --- a/packages/vuetify/src/components/VSystemBar/_variables.scss +++ b/packages/vuetify/src/components/VSystemBar/_variables.scss @@ -3,28 +3,37 @@ @use '../../styles/tools'; // Defaults -$system-bar-background: rgba(var(--v-theme-on-background), 0.02) !default; +$system-bar-background: rgba(var(--v-theme-on-surface-variant)) !default; $system-bar-border-radius: map.get(settings.$rounded, 0) !default; -$system-bar-icon-color: rgba(var(--v-theme-on-background), 0.50) !default; +$system-bar-color: rgba(var(--v-theme-on-variant), var(--v-medium-emphasis-opacity)) !default; $system-bar-elevation: 0 !default; $system-bar-flex: 1 1 auto !default; -$system-bar-font-size: tools.map-deep-get(settings.$typography, 'body-1', 'size') !default; -$system-bar-font-weight: tools.map-deep-get(settings.$typography, 'body-1', 'weight') !default; +$system-bar-font-size: tools.map-deep-get(settings.$typography, 'caption', 'size') !default; +$system-bar-font-weight: tools.map-deep-get(settings.$typography, 'caption', 'weight') !default; $system-bar-height: 24px !default; -$system-bar-icon-font-size: 16px !default; +$system-bar-icon-font-size: tools.map-deep-get(settings.$typography, 'caption', 'size') !default; +$system-bar-icon-margin-inline-start: 8px !default; +$system-bar-icon-opacity: var(--v-medium-emphasis-opacity) !default; +$system-bar-justify-content: flex-end !default; +$system-bar-letter-spacing: tools.map-deep-get(settings.$typography, 'caption', 'letter-spacing') !default; $system-bar-lights-out-background: rgba(var(--v-theme-background), 0.7) !default; +$system-bar-line-height: tools.map-deep-get(settings.$typography, 'caption', 'line-height') !default; $system-bar-padding: 0 8px !default; $system-bar-positions: absolute fixed !default; -$system-bar-rounded-border-radius: map.get(settings.$rounded, 0) !default; +$system-bar-text-align: end !default; +$system-bar-text-transform: tools.map-deep-get(settings.$typography, 'caption', 'text-transform') !default; $system-bar-window-height: 32px !default; -$system-bar-window-icon-font-size: 20px !default; +$system-bar-window-icon-font-size: tools.map-deep-get(settings.$typography, 'body-1', 'size') !default; -$system-bar-query: () !default; -$system-bar-query: tools.map-deep-merge( - ( - 'border-radius': $system-bar-border-radius, - 'elevation': $system-bar-elevation, - 'position': $system-bar-positions - ), - $system-bar-query -) !default; +$system-bar-theme: ( + $system-bar-background, + $system-bar-color +); + +$system-bar-typography: ( + $system-bar-font-size, + $system-bar-font-weight, + $system-bar-letter-spacing, + $system-bar-line-height, + $system-bar-text-transform +);
6002d8c4d982dfeeaddd37754d6cdb4f954ca627
2019-06-30 23:43:08
Andrew Henry
docs(api): add and fix linting (#7704)
false
add and fix linting (#7704)
docs
diff --git a/packages/api-generator/package.json b/packages/api-generator/package.json index 3ac3018de41..9e72c73e213 100755 --- a/packages/api-generator/package.json +++ b/packages/api-generator/package.json @@ -6,7 +6,9 @@ "main": "dist/api.js", "scripts": { "debug": "babel-node inspect src/index.js", - "build": "node src/index.js" + "build": "node src/index.js", + "lint": "eslint --ext .js src", + "lint:fix": "yarn lint --fix" }, "author": "", "license": "ISC", diff --git a/packages/api-generator/src/index.js b/packages/api-generator/src/index.js index 518921ce8b1..34efe7d737a 100755 --- a/packages/api-generator/src/index.js +++ b/packages/api-generator/src/index.js @@ -89,14 +89,14 @@ function genProp (name, props, mixins) { name, type, default: getPropDefault(prop.default, type), - source + source, } } function parseComponent (component) { return { props: parseProps(component), - mixins: parseMixins(component) + mixins: parseMixins(component), } } @@ -211,7 +211,7 @@ function writePlainFile (content, file) { const tags = Object.keys(components).reduce((t, k) => { t[k] = { attributes: components[k].props.map(p => p.name.replace(/([A-Z])/g, g => `-${g[0].toLowerCase()}`)).sort(), - description: '' + description: '', } return t @@ -229,7 +229,7 @@ const attributes = Object.keys(components).reduce((attrs, k) => { a[`${k}/${name}`] = { type, - description: '' + description: '', } return a @@ -240,7 +240,7 @@ const attributes = Object.keys(components).reduce((attrs, k) => { const fakeComponents = ts => { const imports = [ - `import Vue from 'vue'` + `import Vue from 'vue'`, ] if (ts) imports.push(`import { PropValidator } from 'vue/types/options'`) const inspection = ts ? '' : `// noinspection JSUnresolvedFunction\n` diff --git a/packages/api-generator/src/maps/$vuetify.js b/packages/api-generator/src/maps/$vuetify.js index 01f47e38971..b8039be14a8 100644 --- a/packages/api-generator/src/maps/$vuetify.js +++ b/packages/api-generator/src/maps/$vuetify.js @@ -3,8 +3,8 @@ module.exports = { functions: [ { name: 'goTo', - signature: '(target: string | number | HTMLElement | VueComponent, options?: object): void' - } - ] - } + signature: '(target: string | number | HTMLElement | VueComponent, options?: object): void', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/internationalization.js b/packages/api-generator/src/maps/internationalization.js index 9df15d3574b..77a26ced906 100644 --- a/packages/api-generator/src/maps/internationalization.js +++ b/packages/api-generator/src/maps/internationalization.js @@ -4,18 +4,18 @@ module.exports = { { name: 'locales', default: '{ en: VuetifyLocale }', - type: 'Record<string, VuetifyLocale>' + type: 'Record<string, VuetifyLocale>', }, { name: 'current', default: 'en', - type: 'string' + type: 'string', }, { name: 't', default: '(key: string, ...params: Array<string | number>): string', - type: 'Function' - } - ] - } + type: 'Function', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-app-bar.js b/packages/api-generator/src/maps/v-app-bar.js index 53c2b6189d7..83bd2e9d9e4 100644 --- a/packages/api-generator/src/maps/v-app-bar.js +++ b/packages/api-generator/src/maps/v-app-bar.js @@ -4,8 +4,8 @@ module.exports = { scopedSlots: [{ name: 'img', props: { - props: '{ height: string, src: string | srcObject }' - } - }] - } + props: '{ height: string, src: string | srcObject }', + }, + }], + }, } diff --git a/packages/api-generator/src/maps/v-app.js b/packages/api-generator/src/maps/v-app.js index a6ebb6b79da..5bbd13d6d6e 100644 --- a/packages/api-generator/src/maps/v-app.js +++ b/packages/api-generator/src/maps/v-app.js @@ -1,5 +1,5 @@ module.exports = { 'v-app': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-autocomplete.js b/packages/api-generator/src/maps/v-autocomplete.js index 527cbd4f505..c1573bed826 100644 --- a/packages/api-generator/src/maps/v-autocomplete.js +++ b/packages/api-generator/src/maps/v-autocomplete.js @@ -1,5 +1,5 @@ const { VSelect } = require('../variables') module.exports = { - 'v-autocomplete': VSelect + 'v-autocomplete': VSelect, } diff --git a/packages/api-generator/src/maps/v-avatar.js b/packages/api-generator/src/maps/v-avatar.js index af830449b8d..8e305b26ee0 100644 --- a/packages/api-generator/src/maps/v-avatar.js +++ b/packages/api-generator/src/maps/v-avatar.js @@ -1,5 +1,5 @@ module.exports = { 'v-avatar': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-badge.js b/packages/api-generator/src/maps/v-badge.js index 9cdd802237e..a966d0ea9a9 100644 --- a/packages/api-generator/src/maps/v-badge.js +++ b/packages/api-generator/src/maps/v-badge.js @@ -1,5 +1,5 @@ module.exports = { 'v-badge': { - slots: ['badge', 'default'] - } + slots: ['badge', 'default'], + }, } diff --git a/packages/api-generator/src/maps/v-bottom-navigation.js b/packages/api-generator/src/maps/v-bottom-navigation.js index 037c79145bf..7da28429365 100644 --- a/packages/api-generator/src/maps/v-bottom-navigation.js +++ b/packages/api-generator/src/maps/v-bottom-navigation.js @@ -4,12 +4,12 @@ module.exports = { events: [ { name: 'input', - value: 'boolean' + value: 'boolean', }, { name: 'update:inputValue', - value: 'string | number' - } - ] - } + value: 'string | number', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-bottom-sheet.js b/packages/api-generator/src/maps/v-bottom-sheet.js index 3a0d260e6cd..c6bc95823fb 100644 --- a/packages/api-generator/src/maps/v-bottom-sheet.js +++ b/packages/api-generator/src/maps/v-bottom-sheet.js @@ -1,5 +1,5 @@ module.exports = { 'v-bottom-sheet': { - slots: ['activator', 'default'] - } + slots: ['activator', 'default'], + }, } diff --git a/packages/api-generator/src/maps/v-breadcrumbs-item.js b/packages/api-generator/src/maps/v-breadcrumbs-item.js index d4faf2a4e51..414f19086bf 100644 --- a/packages/api-generator/src/maps/v-breadcrumbs-item.js +++ b/packages/api-generator/src/maps/v-breadcrumbs-item.js @@ -1,5 +1,5 @@ module.exports = { 'v-breadcrumbs-item': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-breadcrumbs.js b/packages/api-generator/src/maps/v-breadcrumbs.js index 0dcb93ce0bb..3131900d91f 100644 --- a/packages/api-generator/src/maps/v-breadcrumbs.js +++ b/packages/api-generator/src/maps/v-breadcrumbs.js @@ -5,9 +5,9 @@ module.exports = { { name: 'item', props: { - item: 'any[]' - } - } - ] - } + item: 'any[]', + }, + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-btn-toggle.js b/packages/api-generator/src/maps/v-btn-toggle.js index 3c54927eec8..c83db6536b6 100644 --- a/packages/api-generator/src/maps/v-btn-toggle.js +++ b/packages/api-generator/src/maps/v-btn-toggle.js @@ -4,8 +4,8 @@ module.exports = { events: [ { name: 'change', - value: 'any[] | any' - } - ] - } + value: 'any[] | any', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-btn.js b/packages/api-generator/src/maps/v-btn.js index a0a06360a5f..2456052de28 100644 --- a/packages/api-generator/src/maps/v-btn.js +++ b/packages/api-generator/src/maps/v-btn.js @@ -1,5 +1,5 @@ module.exports = { 'v-btn': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-card-actions.js b/packages/api-generator/src/maps/v-card-actions.js index 108d0d98d79..e81a8fa2c12 100644 --- a/packages/api-generator/src/maps/v-card-actions.js +++ b/packages/api-generator/src/maps/v-card-actions.js @@ -1,5 +1,5 @@ module.exports = { 'v-card-actions': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-card-text.js b/packages/api-generator/src/maps/v-card-text.js index 3a3daa0a0c3..696f4fbb726 100644 --- a/packages/api-generator/src/maps/v-card-text.js +++ b/packages/api-generator/src/maps/v-card-text.js @@ -1,5 +1,5 @@ module.exports = { 'v-card-text': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-card-title.js b/packages/api-generator/src/maps/v-card-title.js index f371bc88744..8a47802ccaa 100644 --- a/packages/api-generator/src/maps/v-card-title.js +++ b/packages/api-generator/src/maps/v-card-title.js @@ -1,5 +1,5 @@ module.exports = { 'v-card-title': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-card.js b/packages/api-generator/src/maps/v-card.js index d1ca47680be..c166553a729 100644 --- a/packages/api-generator/src/maps/v-card.js +++ b/packages/api-generator/src/maps/v-card.js @@ -1,5 +1,5 @@ module.exports = { 'v-card': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-carousel-item.js b/packages/api-generator/src/maps/v-carousel-item.js index 2c0f7ba4450..c706011a95c 100644 --- a/packages/api-generator/src/maps/v-carousel-item.js +++ b/packages/api-generator/src/maps/v-carousel-item.js @@ -1,5 +1,5 @@ module.exports = { 'v-carousel-item': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-carousel.js b/packages/api-generator/src/maps/v-carousel.js index 3ea83ba3340..7fc605b584a 100644 --- a/packages/api-generator/src/maps/v-carousel.js +++ b/packages/api-generator/src/maps/v-carousel.js @@ -4,8 +4,8 @@ module.exports = { events: [ { name: 'input', - value: 'number' - } - ] - } + value: 'number', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-checkbox.js b/packages/api-generator/src/maps/v-checkbox.js index 02bcb01802a..46c0097afa9 100644 --- a/packages/api-generator/src/maps/v-checkbox.js +++ b/packages/api-generator/src/maps/v-checkbox.js @@ -2,6 +2,6 @@ const { inputSlots } = require('../variables') module.exports = { 'v-checkbox': { - slots: inputSlots.concat(['label']) - } + slots: inputSlots.concat(['label']), + }, } diff --git a/packages/api-generator/src/maps/v-chip.js b/packages/api-generator/src/maps/v-chip.js index c58a7e3ea1c..9c5c7cdeb26 100644 --- a/packages/api-generator/src/maps/v-chip.js +++ b/packages/api-generator/src/maps/v-chip.js @@ -4,8 +4,8 @@ module.exports = { events: [ { name: 'input', - value: 'boolean' - } - ] - } + value: 'boolean', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-color-picker.js b/packages/api-generator/src/maps/v-color-picker.js index c47754d27cc..43cceb39751 100644 --- a/packages/api-generator/src/maps/v-color-picker.js +++ b/packages/api-generator/src/maps/v-color-picker.js @@ -6,21 +6,21 @@ const VColorPickerColor = { h: 'number', s: 'number', l: 'number', - a: 'number' + a: 'number', }, hsva: { h: 'number', s: 'number', v: 'number', - a: 'number' + a: 'number', }, hue: 'number', rgba: { r: 'number', g: 'number', b: 'number', - a: 'number' - } + a: 'number', + }, } module.exports = { @@ -28,16 +28,16 @@ module.exports = { events: [ { name: 'input', - value: 'string | object' + value: 'string | object', }, { name: 'update:color', - value: VColorPickerColor + value: VColorPickerColor, }, { name: 'update:mode', - value: 'string' - } - ] - } + value: 'string', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-combobox.js b/packages/api-generator/src/maps/v-combobox.js index 4408a793f40..36004ebb1bb 100644 --- a/packages/api-generator/src/maps/v-combobox.js +++ b/packages/api-generator/src/maps/v-combobox.js @@ -1,5 +1,5 @@ const { VSelect } = require('../variables') module.exports = { - 'v-combobox': VSelect + 'v-combobox': VSelect, } diff --git a/packages/api-generator/src/maps/v-container.js b/packages/api-generator/src/maps/v-container.js index dd609aa7ac8..9869df05989 100644 --- a/packages/api-generator/src/maps/v-container.js +++ b/packages/api-generator/src/maps/v-container.js @@ -7,14 +7,14 @@ module.exports = { 'name': 'grid-list-{xs through xl}', 'type': 'Boolean', 'default': 'false', - 'source': null + 'source': null, }, { 'name': 'fluid', 'type': 'Boolean', 'default': 'false', - 'source': null - } - ].concat(sharedGridProps) - } + 'source': null, + }, + ].concat(sharedGridProps), + }, } diff --git a/packages/api-generator/src/maps/v-data-footer.js b/packages/api-generator/src/maps/v-data-footer.js index 230531f9ef0..40ffb4ee56a 100644 --- a/packages/api-generator/src/maps/v-data-footer.js +++ b/packages/api-generator/src/maps/v-data-footer.js @@ -1,15 +1,15 @@ const DataFooterSlots = [ - { name: 'pageText' } + { name: 'pageText' }, ] const DataFooterEvents = [ - { name: 'update:options' } + { name: 'update:options' }, ] const DataFooterPageTextScopedProps = { pageStart: 'number', pageStop: 'number', - itemsLength: 'number' + itemsLength: 'number', } module.exports = { @@ -17,11 +17,11 @@ module.exports = { slots: DataFooterSlots, scopedSlots: { name: 'page-text', - props: DataFooterPageTextScopedProps + props: DataFooterPageTextScopedProps, }, - events: DataFooterEvents + events: DataFooterEvents, }, DataFooterSlots, DataFooterEvents, - DataFooterPageTextScopedProps + DataFooterPageTextScopedProps, } diff --git a/packages/api-generator/src/maps/v-data-iterator.js b/packages/api-generator/src/maps/v-data-iterator.js index bf55adc99a8..aa99046384c 100644 --- a/packages/api-generator/src/maps/v-data-iterator.js +++ b/packages/api-generator/src/maps/v-data-iterator.js @@ -11,40 +11,40 @@ const DataIteratorProps = [ { name: 'noResultsText', source: 'v-data-iterator' }, { name: 'noDataText', source: 'v-data-iterator' }, { name: 'hideDefaultFooter', source: 'v-data-iterator' }, - { name: 'footerProps', source: 'v-data-iterator' } + { name: 'footerProps', source: 'v-data-iterator' }, ].concat(DataProps) const DataIteratorEvents = [ { name: 'input', source: 'v-data', value: 'any[]' }, { name: 'update:expanded', source: 'v-data', value: 'any[]' }, { name: 'item-selected', source: 'v-data', value: '{ item: any, value: boolean }' }, - { name: 'item-expanded', source: 'v-data', value: '{ item: any, value: boolean }' } + { name: 'item-expanded', source: 'v-data', value: '{ item: any, value: boolean }' }, ].concat(DataEvents) const DataIteratorSlots = [ { name: 'loading', source: 'data-iterator' }, { name: 'no-data', source: 'data-iterator' }, - { name: 'no-results', source: 'data-iterator' } + { name: 'no-results', source: 'data-iterator' }, ] const DataIteratorItemScopedProps = { item: 'any', select: { props: { - value: 'boolean' + value: 'boolean', }, on: { - input: '(v: boolean) => void' - } + input: '(v: boolean) => void', + }, }, expand: { props: { - value: 'boolean' + value: 'boolean', }, on: { - input: '(v: boolean) => void' - } - } + input: '(v: boolean) => void', + }, + }, } const DataIteratorScopedSlots = [ @@ -55,30 +55,30 @@ const DataIteratorScopedSlots = [ isSelected: 'boolean', select: '(item: any, value: boolean): void', isExpanded: 'boolean', - expand: '(item: any, value: boolean): void' + expand: '(item: any, value: boolean): void', }, - source: 'data-iterator' + source: 'data-iterator', }, { name: 'footer', props: DataDefaultScopedSlotProps, - source: 'data-iterator' + source: 'data-iterator', }, { name: 'footer.page-text', props: DataFooterPageTextScopedProps, - source: 'data-iterator' + source: 'data-iterator', }, { name: 'header', props: DataDefaultScopedSlotProps, - source: 'data-iterator' + source: 'data-iterator', }, { name: 'item', props: DataIteratorItemScopedProps, - source: 'data-iterator' - } + source: 'data-iterator', + }, ] module.exports = { @@ -86,10 +86,10 @@ module.exports = { props: DataIteratorProps, slots: DataIteratorSlots, scopedSlots: DataIteratorScopedSlots, - events: DataIteratorEvents + events: DataIteratorEvents, }, DataIteratorProps, DataIteratorEvents, DataIteratorSlots, - DataIteratorScopedSlots + DataIteratorScopedSlots, } diff --git a/packages/api-generator/src/maps/v-data.js b/packages/api-generator/src/maps/v-data.js index 14e3e9ba5c0..508e85215bf 100644 --- a/packages/api-generator/src/maps/v-data.js +++ b/packages/api-generator/src/maps/v-data.js @@ -6,7 +6,7 @@ const DataOptions = { groupBy: 'string[]', groupDesc: 'boolean[]', multiSort: 'boolean', - mustSort: 'boolean' + mustSort: 'boolean', } const DataPagination = { @@ -15,7 +15,7 @@ const DataPagination = { pageStart: 'number', pageStop: 'number', pageCount: 'number', - itemsLength: 'number' + itemsLength: 'number', } const DataProps = [ @@ -37,7 +37,7 @@ const DataProps = [ { name: 'disableFiltering', source: 'v-data' }, { name: 'search', source: 'v-data' }, { name: 'customFilter', source: 'v-data', default: '(items: any[], search: string): any[]' }, - { name: 'serverItemsLength', source: 'v-data' } + { name: 'serverItemsLength', source: 'v-data' }, ] const DataDefaultScopedSlotProps = { @@ -47,7 +47,7 @@ const DataDefaultScopedSlotProps = { updateOptions: '(obj: any): void', sort: '(value: string): void', group: '(value: string): void', - groupedItems: 'Record<string, any[]>' + groupedItems: 'Record<string, any[]>', } const DataEvents = [ @@ -62,7 +62,7 @@ const DataEvents = [ { name: 'update:group-by', source: 'v-data', value: 'string | string[]' }, { name: 'update:group-desc', source: 'v-data', value: 'boolean | boolean[]' }, { name: 'update:multi-sort', source: 'v-data', value: 'boolean' }, - { name: 'update:must-sort', source: 'v-data', value: 'boolean' } + { name: 'update:must-sort', source: 'v-data', value: 'boolean' }, ] module.exports = { @@ -70,12 +70,12 @@ module.exports = { props: DataProps, events: DataEvents, scopedSlots: { - default: DataDefaultScopedSlotProps - } + default: DataDefaultScopedSlotProps, + }, }, DataOptions, DataPagination, DataProps, DataDefaultScopedSlotProps, - DataEvents + DataEvents, } diff --git a/packages/api-generator/src/maps/v-date-picker.js b/packages/api-generator/src/maps/v-date-picker.js index 99489ae3751..96d50edc001 100644 --- a/packages/api-generator/src/maps/v-date-picker.js +++ b/packages/api-generator/src/maps/v-date-picker.js @@ -3,34 +3,34 @@ module.exports = { events: [ { name: 'input', - value: 'string' - } + value: 'string', + }, ], functions: [ { name: 'titleDateFormat', - signature: '(date: string, locale: string): string' + signature: '(date: string, locale: string): string', }, { name: 'dayFormat', - signature: '(date: string, locale: string): string' + signature: '(date: string, locale: string): string', }, { name: 'headerDateFormat', - signature: '(date: string, locale: string): string' + signature: '(date: string, locale: string): string', }, { name: 'monthFormat', - signature: '(date: string, locale: string): string' + signature: '(date: string, locale: string): string', }, { name: 'yearFormat', - signature: '(date: string, locale: string): string' + signature: '(date: string, locale: string): string', }, { name: 'allowedDates', - signature: '(date: string): boolean' - } - ] - } + signature: '(date: string): boolean', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-dialog.js b/packages/api-generator/src/maps/v-dialog.js index 59417eadab2..26153616e50 100644 --- a/packages/api-generator/src/maps/v-dialog.js +++ b/packages/api-generator/src/maps/v-dialog.js @@ -5,13 +5,13 @@ module.exports = { name: 'activator', props: { on: '{ [eventName]: eventHandler }', - value: 'boolean' - } + value: 'boolean', + }, }, { name: 'default', props: { - value: 'boolean' - } - }] - } + value: 'boolean', + }, + }], + }, } diff --git a/packages/api-generator/src/maps/v-edit-dialog.js b/packages/api-generator/src/maps/v-edit-dialog.js index 06117de89ac..16ae73e452f 100644 --- a/packages/api-generator/src/maps/v-edit-dialog.js +++ b/packages/api-generator/src/maps/v-edit-dialog.js @@ -4,20 +4,20 @@ module.exports = { events: [ { name: 'cancel', - value: 'void' + value: 'void', }, { name: 'close', - value: 'void' + value: 'void', }, { name: 'open', - value: 'void' + value: 'void', }, { name: 'save', - value: 'void' - } - ] - } + value: 'void', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-expansion-panel.js b/packages/api-generator/src/maps/v-expansion-panel.js index d4de4a54ffe..945598388b1 100644 --- a/packages/api-generator/src/maps/v-expansion-panel.js +++ b/packages/api-generator/src/maps/v-expansion-panel.js @@ -1,5 +1,5 @@ module.exports = { 'v-expansion-panel': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-flex.js b/packages/api-generator/src/maps/v-flex.js index 9dd0fab4fd9..55cbeeceec2 100644 --- a/packages/api-generator/src/maps/v-flex.js +++ b/packages/api-generator/src/maps/v-flex.js @@ -5,56 +5,56 @@ module.exports = { 'name': 'offset-(size)(0-12)', 'type': 'Boolean', 'default': 'false', - 'source': null + 'source': null, }, { 'name': 'order-(size)(1-12)', 'type': 'Boolean', 'default': 'false', - 'source': null + 'source': null, }, { 'name': '(size)(1-12)', 'type': 'Boolean', 'default': 'false', - 'source': null + 'source': null, }, { 'name': 'alignSelfStart', 'type': 'Boolean', 'default': 'false', - 'source': null + 'source': null, }, { 'name': 'alignSelfEnd', 'type': 'Boolean', 'default': 'false', - 'source': null + 'source': null, }, { 'name': 'alignSelfCenter', 'type': 'Boolean', 'default': 'false', - 'source': null + 'source': null, }, { 'name': 'alignSelfBaseline', 'type': 'Boolean', 'default': 'false', - 'source': null + 'source': null, }, { 'name': 'grow', 'type': 'Boolean', 'default': 'false', - 'source': null + 'source': null, }, { 'name': 'shrink', 'type': 'Boolean', 'default': 'false', - 'source': null - } - ] - } + 'source': null, + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-footer.js b/packages/api-generator/src/maps/v-footer.js index ce79c278796..673d208bba4 100644 --- a/packages/api-generator/src/maps/v-footer.js +++ b/packages/api-generator/src/maps/v-footer.js @@ -1,5 +1,5 @@ module.exports = { 'v-footer': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-form.js b/packages/api-generator/src/maps/v-form.js index f482c2b81f4..19ed58f020b 100644 --- a/packages/api-generator/src/maps/v-form.js +++ b/packages/api-generator/src/maps/v-form.js @@ -4,22 +4,22 @@ module.exports = { functions: [ { name: 'reset', - signature: '(): void' + signature: '(): void', }, { name: 'resetValidation', - signature: '(): void' + signature: '(): void', }, { name: 'validate', - signature: '(): boolean' - } + signature: '(): boolean', + }, ], events: [ { name: 'input', - value: 'boolean' - } - ] - } + value: 'boolean', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-hover.js b/packages/api-generator/src/maps/v-hover.js index d2b194089a6..604d5bb72c7 100644 --- a/packages/api-generator/src/maps/v-hover.js +++ b/packages/api-generator/src/maps/v-hover.js @@ -4,9 +4,9 @@ module.exports = { { name: 'default', props: { - hover: 'boolean' - } - } - ] - } + hover: 'boolean', + }, + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-icon.js b/packages/api-generator/src/maps/v-icon.js index 45bec249397..d7e7642cb11 100644 --- a/packages/api-generator/src/maps/v-icon.js +++ b/packages/api-generator/src/maps/v-icon.js @@ -6,8 +6,8 @@ module.exports = { name: 'dense', type: 'boolean', default: 'false', - 'source': null - } - ] - } + 'source': null, + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-input.js b/packages/api-generator/src/maps/v-input.js index fa9710b924f..a764bb02e6d 100644 --- a/packages/api-generator/src/maps/v-input.js +++ b/packages/api-generator/src/maps/v-input.js @@ -3,10 +3,10 @@ const { inputEvents, inputSlots } = require('../variables') module.exports = { 'v-input': { events: [ - ...inputEvents + ...inputEvents, ], slots: [ - ...inputSlots - ] - } + ...inputSlots, + ], + }, } diff --git a/packages/api-generator/src/maps/v-layout.js b/packages/api-generator/src/maps/v-layout.js index f69e17b2a47..1f062e1a939 100644 --- a/packages/api-generator/src/maps/v-layout.js +++ b/packages/api-generator/src/maps/v-layout.js @@ -7,26 +7,26 @@ module.exports = { 'name': 'row', 'type': 'Boolean', 'default': 'true', - 'source': null + 'source': null, }, { 'name': 'column', 'type': 'Boolean', 'default': 'false', - 'source': null + 'source': null, }, { 'name': 'reverse', 'type': 'Boolean', 'default': 'false', - 'source': null + 'source': null, }, { 'name': 'wrap', 'type': 'Boolean', 'default': 'false', - 'source': null - } - ].concat(sharedGridProps) - } + 'source': null, + }, + ].concat(sharedGridProps), + }, } diff --git a/packages/api-generator/src/maps/v-list-group.js b/packages/api-generator/src/maps/v-list-group.js index 453ccb90281..6269433638a 100644 --- a/packages/api-generator/src/maps/v-list-group.js +++ b/packages/api-generator/src/maps/v-list-group.js @@ -1,5 +1,5 @@ module.exports = { 'v-list-group': { - slots: ['activator', 'default'] - } + slots: ['activator', 'default'], + }, } diff --git a/packages/api-generator/src/maps/v-list-item-action.js b/packages/api-generator/src/maps/v-list-item-action.js index 6d1c57a50c8..923a8104631 100644 --- a/packages/api-generator/src/maps/v-list-item-action.js +++ b/packages/api-generator/src/maps/v-list-item-action.js @@ -1,5 +1,5 @@ module.exports = { 'v-list-item-action': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-list-item-avatar.js b/packages/api-generator/src/maps/v-list-item-avatar.js index a009ca286f7..19bd8c1fae7 100644 --- a/packages/api-generator/src/maps/v-list-item-avatar.js +++ b/packages/api-generator/src/maps/v-list-item-avatar.js @@ -1,5 +1,5 @@ module.exports = { 'v-list-item-avatar': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-list-item-subtitle.js b/packages/api-generator/src/maps/v-list-item-subtitle.js index 003cecac333..86f59e3fb65 100644 --- a/packages/api-generator/src/maps/v-list-item-subtitle.js +++ b/packages/api-generator/src/maps/v-list-item-subtitle.js @@ -1,5 +1,5 @@ module.exports = { 'v-list-item-subtitle': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-list-item-title.js b/packages/api-generator/src/maps/v-list-item-title.js index 52a589958d1..e8e433a3d97 100644 --- a/packages/api-generator/src/maps/v-list-item-title.js +++ b/packages/api-generator/src/maps/v-list-item-title.js @@ -1,5 +1,5 @@ module.exports = { 'v-list-item-title': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-list-item.js b/packages/api-generator/src/maps/v-list-item.js index 0dc69b9b521..4734a62f0eb 100644 --- a/packages/api-generator/src/maps/v-list-item.js +++ b/packages/api-generator/src/maps/v-list-item.js @@ -1,5 +1,5 @@ module.exports = { 'v-list-item': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-list.js b/packages/api-generator/src/maps/v-list.js index 464a8261069..c7ffaef23b6 100644 --- a/packages/api-generator/src/maps/v-list.js +++ b/packages/api-generator/src/maps/v-list.js @@ -1,5 +1,5 @@ module.exports = { 'v-list': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-menu.js b/packages/api-generator/src/maps/v-menu.js index a5d6e1c2487..22ef77295f6 100644 --- a/packages/api-generator/src/maps/v-menu.js +++ b/packages/api-generator/src/maps/v-menu.js @@ -5,13 +5,13 @@ module.exports = { name: 'activator', props: { on: '{ [eventName]: eventHandler }', - value: 'boolean' - } + value: 'boolean', + }, }, { name: 'default', props: { - value: 'boolean' - } - }] - } + value: 'boolean', + }, + }], + }, } diff --git a/packages/api-generator/src/maps/v-navigation-drawer.js b/packages/api-generator/src/maps/v-navigation-drawer.js index 1a69a20a34c..162098f9afd 100644 --- a/packages/api-generator/src/maps/v-navigation-drawer.js +++ b/packages/api-generator/src/maps/v-navigation-drawer.js @@ -3,17 +3,17 @@ module.exports = { slots: ['default', 'prepend', 'append'], scopedSlots: [{ name: 'img', - props: { height: 'string', src: 'string | srcObject' } + props: { height: 'string', src: 'string | srcObject' }, }], events: [ { name: 'input', - value: 'boolean' + value: 'boolean', }, { name: 'update:miniVariant', - value: 'boolean' - } - ] - } + value: 'boolean', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-overflow-btn.js b/packages/api-generator/src/maps/v-overflow-btn.js index 4453e9f405c..aa2bffe3887 100644 --- a/packages/api-generator/src/maps/v-overflow-btn.js +++ b/packages/api-generator/src/maps/v-overflow-btn.js @@ -3,8 +3,8 @@ module.exports = { props: [ { name: 'menuProps', - default: '{"closeOnClick":false, "closeOnContentClick":false, "openOnClick":false, "maxHeight":300, "offsetY":true, "offsetOverflow":true, "transition":false}' - } - ] - } + default: '{"closeOnClick":false, "closeOnContentClick":false, "openOnClick":false, "maxHeight":300, "offsetY":true, "offsetOverflow":true, "transition":false}', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-overlay.js b/packages/api-generator/src/maps/v-overlay.js index fb59acbc201..ce89a576c68 100644 --- a/packages/api-generator/src/maps/v-overlay.js +++ b/packages/api-generator/src/maps/v-overlay.js @@ -1,5 +1,5 @@ module.exports = { 'v-overlay': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-pagination.js b/packages/api-generator/src/maps/v-pagination.js index 49fd67c2037..11cd69b796e 100644 --- a/packages/api-generator/src/maps/v-pagination.js +++ b/packages/api-generator/src/maps/v-pagination.js @@ -3,16 +3,16 @@ module.exports = { events: [ { name: 'input', - value: 'number' + value: 'number', }, { name: 'next', - value: 'void' + value: 'void', }, { name: 'previous', - value: 'void' - } - ] - } + value: 'void', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-parallax.js b/packages/api-generator/src/maps/v-parallax.js index 815f33ae265..5e5427ce06f 100644 --- a/packages/api-generator/src/maps/v-parallax.js +++ b/packages/api-generator/src/maps/v-parallax.js @@ -1,5 +1,5 @@ module.exports = { 'v-parallax': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-progress-circular.js b/packages/api-generator/src/maps/v-progress-circular.js index c3448f35b37..f4882e9678f 100644 --- a/packages/api-generator/src/maps/v-progress-circular.js +++ b/packages/api-generator/src/maps/v-progress-circular.js @@ -1,5 +1,5 @@ module.exports = { 'v-progress-circular': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-progress-linear.js b/packages/api-generator/src/maps/v-progress-linear.js index e8a244b26e1..3a1afc0805f 100644 --- a/packages/api-generator/src/maps/v-progress-linear.js +++ b/packages/api-generator/src/maps/v-progress-linear.js @@ -5,9 +5,9 @@ module.exports = { { name: 'default', props: { - value: 'number' - } - } - ] - } + value: 'number', + }, + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-radio-group.js b/packages/api-generator/src/maps/v-radio-group.js index f2d35d0adb5..e0750ff299e 100644 --- a/packages/api-generator/src/maps/v-radio-group.js +++ b/packages/api-generator/src/maps/v-radio-group.js @@ -6,8 +6,8 @@ module.exports = { events: [ { name: 'change', - value: 'any' - } - ].concat(validatableEvents) - } + value: 'any', + }, + ].concat(validatableEvents), + }, } diff --git a/packages/api-generator/src/maps/v-radio.js b/packages/api-generator/src/maps/v-radio.js index 5d4ce3708c7..da2c371ca7d 100644 --- a/packages/api-generator/src/maps/v-radio.js +++ b/packages/api-generator/src/maps/v-radio.js @@ -3,8 +3,8 @@ module.exports = { events: [ { name: 'change', - value: 'any' - } - ] - } + value: 'any', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-range-slider.js b/packages/api-generator/src/maps/v-range-slider.js index f951f3783a7..b6ece3bf5c3 100644 --- a/packages/api-generator/src/maps/v-range-slider.js +++ b/packages/api-generator/src/maps/v-range-slider.js @@ -1,5 +1,5 @@ const { VSlider } = require('../variables') module.exports = { - 'v-range-slider': VSlider + 'v-range-slider': VSlider, } diff --git a/packages/api-generator/src/maps/v-resize.js b/packages/api-generator/src/maps/v-resize.js index 0bc35419ab1..4ed165493c8 100644 --- a/packages/api-generator/src/maps/v-resize.js +++ b/packages/api-generator/src/maps/v-resize.js @@ -4,13 +4,13 @@ module.exports = { { name: 'modifiers.quiet', default: 'false', - type: 'Boolean' + type: 'Boolean', }, { name: 'value', default: 'undefined', - type: 'Function' - } - ] - } + type: 'Function', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-ripple.js b/packages/api-generator/src/maps/v-ripple.js index 2efa111d6d2..c46e241c61d 100644 --- a/packages/api-generator/src/maps/v-ripple.js +++ b/packages/api-generator/src/maps/v-ripple.js @@ -4,18 +4,18 @@ module.exports = { { name: 'value', default: '{}', - type: 'Object' + type: 'Object', }, { name: 'center', default: 'false', - type: 'Boolean' + type: 'Boolean', }, { name: 'class', default: '""', - type: 'string' - } - ] - } + type: 'string', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-scroll.js b/packages/api-generator/src/maps/v-scroll.js index e7d3ea3ec0f..1935d95bb77 100644 --- a/packages/api-generator/src/maps/v-scroll.js +++ b/packages/api-generator/src/maps/v-scroll.js @@ -4,13 +4,13 @@ module.exports = { { name: 'arg:target', default: 'window', - type: 'String' + type: 'String', }, { name: 'value', default: '(): {}', - type: 'Function' - } - ] - } + type: 'Function', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-select.js b/packages/api-generator/src/maps/v-select.js index 62b02794006..e69585748d9 100644 --- a/packages/api-generator/src/maps/v-select.js +++ b/packages/api-generator/src/maps/v-select.js @@ -1,5 +1,5 @@ const { VSelect } = require('../variables') module.exports = { - 'v-select': VSelect + 'v-select': VSelect, } diff --git a/packages/api-generator/src/maps/v-sheet.js b/packages/api-generator/src/maps/v-sheet.js index 36080c60034..902cb4acf95 100644 --- a/packages/api-generator/src/maps/v-sheet.js +++ b/packages/api-generator/src/maps/v-sheet.js @@ -5,12 +5,12 @@ module.exports = { { name: 'tag', type: 'String', - default: 'div' + default: 'div', }, { name: 'tile', - type: 'Boolean' - } - ] - } + type: 'Boolean', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-slider.js b/packages/api-generator/src/maps/v-slider.js index e78d0403fe5..0636cc35d2a 100644 --- a/packages/api-generator/src/maps/v-slider.js +++ b/packages/api-generator/src/maps/v-slider.js @@ -1,5 +1,5 @@ const { VSlider } = require('../variables') module.exports = { - 'v-slider': VSlider + 'v-slider': VSlider, } diff --git a/packages/api-generator/src/maps/v-snackbar.js b/packages/api-generator/src/maps/v-snackbar.js index 71cf6085f89..0dfb4069656 100644 --- a/packages/api-generator/src/maps/v-snackbar.js +++ b/packages/api-generator/src/maps/v-snackbar.js @@ -1,5 +1,5 @@ module.exports = { 'v-snackbar': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-speed-dial.js b/packages/api-generator/src/maps/v-speed-dial.js index 9a34aeb7498..e463ba09ea5 100644 --- a/packages/api-generator/src/maps/v-speed-dial.js +++ b/packages/api-generator/src/maps/v-speed-dial.js @@ -1,5 +1,5 @@ module.exports = { 'v-speed-dial': { - slots: ['activator', 'default'] - } + slots: ['activator', 'default'], + }, } diff --git a/packages/api-generator/src/maps/v-stepper-content.js b/packages/api-generator/src/maps/v-stepper-content.js index d08b8acec44..15f1b8ea1bd 100644 --- a/packages/api-generator/src/maps/v-stepper-content.js +++ b/packages/api-generator/src/maps/v-stepper-content.js @@ -1,5 +1,5 @@ module.exports = { 'v-stepper-content': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-stepper-header.js b/packages/api-generator/src/maps/v-stepper-header.js index feebafad70f..b336b1578cb 100644 --- a/packages/api-generator/src/maps/v-stepper-header.js +++ b/packages/api-generator/src/maps/v-stepper-header.js @@ -1,5 +1,5 @@ module.exports = { 'v-stepper-header': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-stepper-items.js b/packages/api-generator/src/maps/v-stepper-items.js index 906011af011..dba0ce65af0 100644 --- a/packages/api-generator/src/maps/v-stepper-items.js +++ b/packages/api-generator/src/maps/v-stepper-items.js @@ -1,5 +1,5 @@ module.exports = { 'v-stepper-items': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-stepper-step.js b/packages/api-generator/src/maps/v-stepper-step.js index 9860303a27a..eef3d577db6 100644 --- a/packages/api-generator/src/maps/v-stepper-step.js +++ b/packages/api-generator/src/maps/v-stepper-step.js @@ -1,5 +1,5 @@ module.exports = { 'v-stepper-step': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-stepper.js b/packages/api-generator/src/maps/v-stepper.js index 67fad5559f4..ff0964aa727 100644 --- a/packages/api-generator/src/maps/v-stepper.js +++ b/packages/api-generator/src/maps/v-stepper.js @@ -4,8 +4,8 @@ module.exports = { events: [ { name: 'input', - value: 'number' - } - ] - } + value: 'number', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-subheader.js b/packages/api-generator/src/maps/v-subheader.js index 07dd860cab3..0025ccadc44 100644 --- a/packages/api-generator/src/maps/v-subheader.js +++ b/packages/api-generator/src/maps/v-subheader.js @@ -1,5 +1,5 @@ module.exports = { 'v-subheader': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-switch.js b/packages/api-generator/src/maps/v-switch.js index 2ce2d0b4dfd..9402fa05ab3 100644 --- a/packages/api-generator/src/maps/v-switch.js +++ b/packages/api-generator/src/maps/v-switch.js @@ -2,6 +2,6 @@ const { inputSlots } = require('../variables') module.exports = { 'v-switch': { - slots: inputSlots.concat(['label']) - } + slots: inputSlots.concat(['label']), + }, } diff --git a/packages/api-generator/src/maps/v-tab-item.js b/packages/api-generator/src/maps/v-tab-item.js index 4715b4f7e86..bde9c1a88c9 100644 --- a/packages/api-generator/src/maps/v-tab-item.js +++ b/packages/api-generator/src/maps/v-tab-item.js @@ -1,5 +1,5 @@ module.exports = { 'v-tab-item': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-tab.js b/packages/api-generator/src/maps/v-tab.js index e3e75655fd8..ff2fc0cff83 100644 --- a/packages/api-generator/src/maps/v-tab.js +++ b/packages/api-generator/src/maps/v-tab.js @@ -1,5 +1,5 @@ module.exports = { 'v-tab': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-tabs-items.js b/packages/api-generator/src/maps/v-tabs-items.js index 5cabe8c885a..c7048125d59 100644 --- a/packages/api-generator/src/maps/v-tabs-items.js +++ b/packages/api-generator/src/maps/v-tabs-items.js @@ -4,8 +4,8 @@ module.exports = { events: [ { name: 'change', - value: 'string' - } - ] - } + value: 'string', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-tabs.js b/packages/api-generator/src/maps/v-tabs.js index 4260b777d8d..e1c2a8d7dc6 100644 --- a/packages/api-generator/src/maps/v-tabs.js +++ b/packages/api-generator/src/maps/v-tabs.js @@ -4,8 +4,8 @@ module.exports = { events: [ { name: 'change', - value: 'string' - } - ] - } + value: 'string', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-text-field.js b/packages/api-generator/src/maps/v-text-field.js index cf6688014af..76b2e442a04 100644 --- a/packages/api-generator/src/maps/v-text-field.js +++ b/packages/api-generator/src/maps/v-text-field.js @@ -5,17 +5,17 @@ module.exports = { events: [ { name: 'input', - value: 'string' + value: 'string', }, { name: 'change', - value: 'string' + value: 'string', }, ...inputEvents, - ...textEvents + ...textEvents, ].concat(validatableEvents), slots: [ - ...textFieldSlots - ] - } + ...textFieldSlots, + ], + }, } diff --git a/packages/api-generator/src/maps/v-textarea.js b/packages/api-generator/src/maps/v-textarea.js index c67ae2fc918..d2022a6bc7f 100644 --- a/packages/api-generator/src/maps/v-textarea.js +++ b/packages/api-generator/src/maps/v-textarea.js @@ -5,17 +5,17 @@ module.exports = { events: [ { name: 'input', - value: 'string' + value: 'string', }, { name: 'change', - value: 'string' + value: 'string', }, ...inputEvents, - ...textEvents + ...textEvents, ].concat(validatableEvents), slots: [ - ...textFieldSlots - ] - } + ...textFieldSlots, + ], + }, } diff --git a/packages/api-generator/src/maps/v-time-picker-clock.js b/packages/api-generator/src/maps/v-time-picker-clock.js index ccf5651dba9..a77a013e1ec 100644 --- a/packages/api-generator/src/maps/v-time-picker-clock.js +++ b/packages/api-generator/src/maps/v-time-picker-clock.js @@ -3,8 +3,8 @@ module.exports = { props: [ { name: 'format', - default: '(val: string): string' - } - ] - } + default: '(val: string): string', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-time-picker.js b/packages/api-generator/src/maps/v-time-picker.js index fe61cc191f0..d3062ac71bb 100644 --- a/packages/api-generator/src/maps/v-time-picker.js +++ b/packages/api-generator/src/maps/v-time-picker.js @@ -3,24 +3,24 @@ module.exports = { events: [ { name: 'input', - value: 'string' + value: 'string', }, { name: 'change', - value: 'string' + value: 'string', }, { name: 'click:hour', - value: 'string' + value: 'string', }, { name: 'click:minute', - value: 'string' + value: 'string', }, { name: 'click:second', - value: 'string' - } - ] - } + value: 'string', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-toolbar-items.js b/packages/api-generator/src/maps/v-toolbar-items.js index 79187784b4d..7b1fbf194c8 100644 --- a/packages/api-generator/src/maps/v-toolbar-items.js +++ b/packages/api-generator/src/maps/v-toolbar-items.js @@ -1,5 +1,5 @@ module.exports = { 'v-toolbar-items': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-toolbar-title.js b/packages/api-generator/src/maps/v-toolbar-title.js index 28352143a08..7a51345ff4b 100644 --- a/packages/api-generator/src/maps/v-toolbar-title.js +++ b/packages/api-generator/src/maps/v-toolbar-title.js @@ -1,5 +1,5 @@ module.exports = { 'v-toolbar-title': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-toolbar.js b/packages/api-generator/src/maps/v-toolbar.js index 8f06354e8d9..6c0b8dff529 100644 --- a/packages/api-generator/src/maps/v-toolbar.js +++ b/packages/api-generator/src/maps/v-toolbar.js @@ -4,8 +4,8 @@ module.exports = { scopedSlots: [{ name: 'img', props: { - props: '{ height: string, src: string | srcObject }' - } - }] - } + props: '{ height: string, src: string | srcObject }', + }, + }], + }, } diff --git a/packages/api-generator/src/maps/v-tooltip.js b/packages/api-generator/src/maps/v-tooltip.js index fe957608ed5..c5a40fe846a 100644 --- a/packages/api-generator/src/maps/v-tooltip.js +++ b/packages/api-generator/src/maps/v-tooltip.js @@ -5,13 +5,13 @@ module.exports = { name: 'activator', props: { on: '{ [eventName]: eventHandler }', - value: 'boolean' - } + value: 'boolean', + }, }, { name: 'default', props: { - value: 'boolean' - } - }] - } + value: 'boolean', + }, + }], + }, } diff --git a/packages/api-generator/src/maps/v-touch.js b/packages/api-generator/src/maps/v-touch.js index 1e274137693..c98475ce8ce 100644 --- a/packages/api-generator/src/maps/v-touch.js +++ b/packages/api-generator/src/maps/v-touch.js @@ -4,8 +4,8 @@ module.exports = { { name: 'value', default: '{}', - type: 'Object' - } - ] - } + type: 'Object', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-treeview.js b/packages/api-generator/src/maps/v-treeview.js index 7d66987d9f7..bb0fbef298c 100644 --- a/packages/api-generator/src/maps/v-treeview.js +++ b/packages/api-generator/src/maps/v-treeview.js @@ -5,22 +5,22 @@ module.exports = { scopedSlots: [ { name: 'prepend', - props: VTreeviewScopedProps + props: VTreeviewScopedProps, }, { name: 'label', - props: VTreeviewScopedProps + props: VTreeviewScopedProps, }, { name: 'append', - props: VTreeviewScopedProps - } + props: VTreeviewScopedProps, + }, ], functions: [ { name: 'updateAll', - signature: '(val: boolean): void' - } - ] - } + signature: '(val: boolean): void', + }, + ], + }, } diff --git a/packages/api-generator/src/maps/v-window-item.js b/packages/api-generator/src/maps/v-window-item.js index 6020507d117..c666a1ed589 100644 --- a/packages/api-generator/src/maps/v-window-item.js +++ b/packages/api-generator/src/maps/v-window-item.js @@ -1,5 +1,5 @@ module.exports = { 'v-window-item': { - slots: ['default'] - } + slots: ['default'], + }, } diff --git a/packages/api-generator/src/maps/v-window.js b/packages/api-generator/src/maps/v-window.js index de5d2078b93..2f2500deeea 100644 --- a/packages/api-generator/src/maps/v-window.js +++ b/packages/api-generator/src/maps/v-window.js @@ -5,10 +5,10 @@ module.exports = { name: 'touch', example: { left: 'Function', - right: 'Function' - } - } + right: 'Function', + }, + }, ], - slots: ['default'] - } + slots: ['default'], + }, }
27d5fdd32dc7c8a9af38f823d1574d92b211d405
2019-07-03 01:07:30
John Leider
chore: fix BACKERS.md links
false
fix BACKERS.md links
chore
diff --git a/BACKERS.md b/BACKERS.md index 63105b314f5..e6d2cac25b5 100644 --- a/BACKERS.md +++ b/BACKERS.md @@ -26,9 +26,9 @@ You can join them in supporting Vuetify.js by [pledging on Patreon](https://www. - Elfo s.r.l. - Codefirst - Dan Trevino -- [https://www.customessaymeister.com/](customessaymeister) -- [https://blokt.com/](blokt) -- [https://www.loomio.org/](Loomio) +- [customessaymeister](https://www.customessaymeister.com/) +- [blokt](https://blokt.com/) +- [Loomio](https://www.loomio.org/) - Hannes Kochniß ### $20+
120eb3185403bf88f34c3a164d679b82d1f6a8e0
2018-10-18 19:49:46
John Leider
feat(v-paper): create new component
false
create new component
feat
diff --git a/src/components/VPaper/VPaper.ts b/src/components/VPaper/VPaper.ts new file mode 100644 index 00000000000..2e21126280f --- /dev/null +++ b/src/components/VPaper/VPaper.ts @@ -0,0 +1,65 @@ +// Styles +import '../../stylus/components/_paper.styl' + +// Mixins +import Colorable from '../../mixins/colorable' +import Elevatable from '../../mixins/elevatable' +import Measurable from '../../mixins/measurable' +import Themeable from '../../mixins/themeable' + +// Helpers +import { convertToUnit } from '../../util/helpers' +import mixins from '../../util/mixins' + +// Types +import { VNode } from 'vue' + +/* @vue/component */ +export default mixins( + Colorable, + Elevatable, + Measurable, + Themeable +).extend({ + name: 'v-paper', + + props: { + tag: { + type: String, + default: 'div' + }, + tile: Boolean + }, + + computed: { + classes (): object { + return { + 'v-paper': true, + 'v-paper--tile': this.tile, + ...this.themeClasses, + ...this.elevationClasses + } + }, + styles (): object { + return { + height: convertToUnit(this.height), + maxHeight: convertToUnit(this.maxHeight), + maxWidth: convertToUnit(this.maxWidth), + width: convertToUnit(this.width) + } + } + }, + + render (h): VNode { + const data = { + class: this.classes, + style: this.styles + } + + return h( + this.tag, + this.setBackgroundColor(this.color, data), + this.$slots.default + ) + } +}) diff --git a/src/components/VPaper/index.ts b/src/components/VPaper/index.ts new file mode 100644 index 00000000000..4d993ed38c2 --- /dev/null +++ b/src/components/VPaper/index.ts @@ -0,0 +1,4 @@ +import VPaper from './VPaper' + +export { VPaper } +export default VPaper diff --git a/src/components/index.ts b/src/components/index.ts index 695bb0f9fd4..963e72b1cd5 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -36,6 +36,7 @@ export * from './VMessages' export * from './VNavigationDrawer' export * from './VOverflowBtn' export * from './VPagination' +export * from './VPaper' export * from './VParallax' export * from './VPicker' export * from './VProgressCircular' diff --git a/src/stylus/components/_paper.styl b/src/stylus/components/_paper.styl new file mode 100644 index 00000000000..50c8e703a29 --- /dev/null +++ b/src/stylus/components/_paper.styl @@ -0,0 +1,18 @@ +@import '../bootstrap' +@import '../theme' + +/* Themes */ +v-paper($material) + background-color: $material.cards + border-color: $material.cards + color: $material.text.primary + +theme(v-paper, "v-paper") + +.v-paper + display: block + border-radius: $paper-border-radius + position: relative + + &--tile + border-radius: 0 diff --git a/src/stylus/settings/_variables.styl b/src/stylus/settings/_variables.styl index f78ae8d65d4..02e37808b8d 100644 --- a/src/stylus/settings/_variables.styl +++ b/src/stylus/settings/_variables.styl @@ -261,6 +261,8 @@ $list-item-dense-avatar-height := 38px $list-dense-subheader-height := $list-item-dense-single-height $list-dense-subheader-group-height := $list-dense-subheader-height //the subheader under a group menu +// Paper +$paper-border-radius := 2px // Pickers $time-picker-number-font-size := 16px diff --git a/test/integration/__snapshots__/importA-la-carte.spec.js.snap b/test/integration/__snapshots__/importA-la-carte.spec.js.snap index 7335fcd6644..2af3591948c 100644 --- a/test/integration/__snapshots__/importA-la-carte.spec.js.snap +++ b/test/integration/__snapshots__/importA-la-carte.spec.js.snap @@ -75,6 +75,7 @@ Array [ "VNavigationDrawer", "VOverflowBtn", "VPagination", + "VPaper", "VParallax", "VPicker", "VProgressCircular", diff --git a/test/integration/__snapshots__/importFull.spec.js.snap b/test/integration/__snapshots__/importFull.spec.js.snap index ae10763d1ee..6c19805f776 100644 --- a/test/integration/__snapshots__/importFull.spec.js.snap +++ b/test/integration/__snapshots__/importFull.spec.js.snap @@ -90,6 +90,7 @@ Array [ "VNavigationDrawer", "VOverflowBtn", "VPagination", + "VPaper", "VParallax", "VPicker", "VProgressCircular", diff --git a/test/integration/__snapshots__/importLib.spec.js.snap b/test/integration/__snapshots__/importLib.spec.js.snap index 26965c16d28..67cc071fb3f 100644 --- a/test/integration/__snapshots__/importLib.spec.js.snap +++ b/test/integration/__snapshots__/importLib.spec.js.snap @@ -75,6 +75,7 @@ Array [ "VNavigationDrawer", "VOverflowBtn", "VPagination", + "VPaper", "VParallax", "VPicker", "VProgressCircular", diff --git a/test/integration/importA-la-carte.spec.js b/test/integration/importA-la-carte.spec.js index 684d39a89fd..bc89d0bca1c 100644 --- a/test/integration/importA-la-carte.spec.js +++ b/test/integration/importA-la-carte.spec.js @@ -38,6 +38,7 @@ import VMessages from '@/components/VMessages' import VNavigationDrawer from '@/components/VNavigationDrawer' import VOverflowBtn from '@/components/VOverflowBtn' import VPagination from '@/components/VPagination' +import VPaper from '@/components/VPaper' import VParallax from '@/components/VParallax' import VPicker from '@/components/VPicker' import VProgressCircular from '@/components/VProgressCircular' @@ -105,6 +106,7 @@ const components = { VNavigationDrawer, VOverflowBtn, VPagination, + VPaper, VParallax, VPicker, VProgressCircular, diff --git a/test/integration/importLib.spec.js b/test/integration/importLib.spec.js index 944c87331f5..c8a21b0448d 100644 --- a/test/integration/importLib.spec.js +++ b/test/integration/importLib.spec.js @@ -67,6 +67,7 @@ import Vuetify, { VNavigationDrawer, VOverflowBtn, VPagination, + VPaper, VParallax, VPicker, VProgressCircular, @@ -199,6 +200,7 @@ const components = { VNavigationDrawer, VOverflowBtn, VPagination, + VPaper, VParallax, VPicker, VProgressCircular,
20a7a1a06a683b696921bc0a877d814e6f76bdc0
2019-12-17 21:04:46
Philip Diffenderfer
feat(VCalendar): redo event overlap logic (#9974)
false
redo event overlap logic (#9974)
feat
diff --git a/packages/api-generator/src/helpers/variables.js b/packages/api-generator/src/helpers/variables.js index c2440235fe2..b2aab0d81a0 100644 --- a/packages/api-generator/src/helpers/variables.js +++ b/packages/api-generator/src/helpers/variables.js @@ -271,6 +271,34 @@ const VTimestamp = { future: 'boolean', } +const VCalendarDay = { + outside: 'boolean', + index: 'number', + week: [VTimestamp], + date: 'string', + time: 'string', + year: 'number', + month: 'number', + day: 'number', + hour: 'number', + minute: 'number', + weekday: 'number', + hasDay: 'boolean', + hasTime: 'boolean', + past: 'boolean', + present: 'boolean', + future: 'boolean', +} + +const VCalendarEventSlot = { + event: 'any', + day: VCalendarDay, + outside: 'boolean', + start: 'boolean', + end: 'boolean', + timed: 'boolean', +} + const VTimestampWithTime = { date: 'string', time: 'string', @@ -286,6 +314,8 @@ const VTimestampWithTime = { present: 'boolean', future: 'boolean', timeToY: '(time: string | number | {hour: number, minute: number}, clamp: boolean = false): number', + minutesToPixels: '(minutes: number): number', + week: [VTimestamp], } const VSlider = { @@ -339,6 +369,8 @@ module.exports = { VSlider, VTimestamp, VTimestampWithTime, + VCalendarDay, + VCalendarEventSlot, inputSlots, inputEvents, sharedGridProps, diff --git a/packages/api-generator/src/maps/v-calendar.js b/packages/api-generator/src/maps/v-calendar.js index 796ab73de78..b64b605c8f8 100644 --- a/packages/api-generator/src/maps/v-calendar.js +++ b/packages/api-generator/src/maps/v-calendar.js @@ -1,11 +1,15 @@ -const { VTimestamp, VTimestampWithTime } = require('../helpers/variables') +const { VTimestamp, VTimestampWithTime, VCalendarDay, VCalendarEventSlot } = require('../helpers/variables') module.exports = { 'v-calendar': { slots: [ + { + name: 'event', + props: VCalendarEventSlot, + }, { name: 'day', - props: VTimestamp, + props: VCalendarDay, }, { name: 'day-body', @@ -13,7 +17,7 @@ module.exports = { }, { name: 'day-header', - props: VTimestamp, + props: VTimestampWithTime, }, { name: 'day-label', @@ -61,6 +65,10 @@ module.exports = { name: 'scrollToTime', signature: '(time: number | string | { hour: number, minute: number }): boolean', }, + { + name: 'getVisibleEvents', + signature: '(): CalendarEventParsed[]', + }, ], events: [ { @@ -83,6 +91,10 @@ module.exports = { name: 'contextmenu:date', value: VTimestampWithTime, }, + { + name: 'click:more', + value: VTimestamp, + }, { name: 'click:day', value: VTimestampWithTime, diff --git a/packages/docs/src/examples/calendars/complex/events.vue b/packages/docs/src/examples/calendars/complex/events.vue index 295d8a37a34..f560d2f9a15 100644 --- a/packages/docs/src/examples/calendars/complex/events.vue +++ b/packages/docs/src/examples/calendars/complex/events.vue @@ -3,13 +3,13 @@ <v-col> <v-sheet height="64"> <v-toolbar flat color="white"> - <v-btn outlined class="mr-4" @click="setToday"> + <v-btn outlined class="mr-4" color="grey darken-2" @click="setToday"> Today </v-btn> - <v-btn fab text small @click="prev"> + <v-btn fab text small color="grey darken-2" @click="prev"> <v-icon small>mdi-chevron-left</v-icon> </v-btn> - <v-btn fab text small @click="next"> + <v-btn fab text small color="grey darken-2" @click="next"> <v-icon small>mdi-chevron-right</v-icon> </v-btn> <v-toolbar-title>{{ title }}</v-toolbar-title> @@ -18,6 +18,7 @@ <template v-slot:activator="{ on }"> <v-btn outlined + color="grey darken-2" v-on="on" > <span>{{ typeToLabel[type] }}</span> @@ -48,7 +49,6 @@ color="primary" :events="events" :event-color="getEventColor" - :event-margin-bottom="3" :now="today" :type="type" @click:event="showEvent" @@ -60,7 +60,6 @@ v-model="selectedOpen" :close-on-content-click="false" :activator="selectedElement" - full-width offset-x > <v-card @@ -106,8 +105,7 @@ <script> export default { data: () => ({ - today: '2019-01-01', - focus: '2019-01-01', + focus: '', type: 'month', typeToLabel: { month: 'Month', @@ -120,132 +118,9 @@ selectedEvent: {}, selectedElement: null, selectedOpen: false, - events: [ - { - name: 'Vacation', - details: 'Going to the beach!', - start: '2018-12-29', - end: '2019-01-01', - color: 'blue', - }, - { - name: 'Meeting', - details: 'Spending time on how we do not have enough time', - start: '2019-01-07 09:00', - end: '2019-01-07 09:30', - color: 'indigo', - }, - { - name: 'Large Event', - details: 'This starts in the middle of an event and spans over multiple events', - start: '2018-12-31', - end: '2019-01-04', - color: 'deep-purple', - }, - { - name: '3rd to 7th', - details: 'Testing', - start: '2019-01-03', - end: '2019-01-07', - color: 'cyan', - }, - { - name: 'Big Meeting', - details: 'A very important meeting about nothing', - start: '2019-01-07 08:00', - end: '2019-01-07 11:30', - color: 'red', - }, - { - name: 'Another Meeting', - details: 'Another important meeting about nothing', - start: '2019-01-07 10:00', - end: '2019-01-07 13:30', - color: 'brown', - }, - { - name: '7th to 8th', - start: '2019-01-07', - end: '2019-01-08', - color: 'blue', - }, - { - name: 'Lunch', - details: 'Time to feed', - start: '2019-01-07 12:00', - end: '2019-01-07 15:00', - color: 'deep-orange', - }, - { - name: '30th Birthday', - details: 'Celebrate responsibly', - start: '2019-01-03', - color: 'teal', - }, - { - name: 'New Year', - details: 'Eat chocolate until you pass out', - start: '2019-01-01', - end: '2019-01-02', - color: 'green', - }, - { - name: 'Conference', - details: 'The best time of my life', - start: '2019-01-21', - end: '2019-01-28', - color: 'grey darken-1', - }, - { - name: 'Hackathon', - details: 'Code like there is no tommorrow', - start: '2019-01-30 23:00', - end: '2019-02-01 08:00', - color: 'black', - }, - { - name: 'event 1', - start: '2019-01-14 18:00', - end: '2019-01-14 19:00', - color: '#4285F4', - }, - { - name: 'event 2', - start: '2019-01-14 18:00', - end: '2019-01-14 19:00', - color: '#4285F4', - }, - { - name: 'event 5', - start: '2019-01-14 18:00', - end: '2019-01-14 19:00', - color: '#4285F4', - }, - { - name: 'event 3', - start: '2019-01-14 18:30', - end: '2019-01-14 20:30', - color: '#4285F4', - }, - { - name: 'event 4', - start: '2019-01-14 19:00', - end: '2019-01-14 20:00', - color: '#4285F4', - }, - { - name: 'event 6', - start: '2019-01-14 21:00', - end: '2019-01-14 23:00', - color: '#4285F4', - }, - { - name: 'event 7', - start: '2019-01-14 22:00', - end: '2019-01-14 23:00', - color: '#4285F4', - }, - ], + events: [], + colors: ['blue', 'indigo', 'deep-purple', 'cyan', 'green', 'orange', 'grey darken-1'], + names: ['Meeting', 'Holiday', 'PTO', 'Travel', 'Event', 'Birthday', 'Conference', 'Party'], }), computed: { title () { @@ -319,15 +194,45 @@ nativeEvent.stopPropagation() }, updateRange ({ start, end }) { - // You could load events from an outside source (like database) now that we have the start and end dates on the calendar + const events = [] + + const min = new Date(`${start.date}T00:00:00`) + const max = new Date(`${end.date}T23:59:59`) + const days = (max.getTime() - min.getTime()) / 86400000 + const eventCount = this.rnd(days, days + 20) + + for (let i = 0; i < eventCount; i++) { + const allDay = this.rnd(0, 3) === 0 + const firstTimestamp = this.rnd(min.getTime(), max.getTime()) + const first = new Date(firstTimestamp - (firstTimestamp % 900000)) + const secondTimestamp = this.rnd(2, allDay ? 288 : 8) * 900000 + const second = new Date(first.getTime() + secondTimestamp) + + events.push({ + name: this.names[this.rnd(0, this.names.length - 1)], + start: this.formatDate(first, !allDay), + end: this.formatDate(second, !allDay), + color: this.colors[this.rnd(0, this.colors.length - 1)], + }) + } + this.start = start this.end = end + this.events = events }, nth (d) { return d > 3 && d < 21 ? 'th' : ['th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th'][d % 10] }, + rnd (a, b) { + return Math.floor((b - a + 1) * Math.random()) + a + }, + formatDate (a, withTime) { + return withTime + ? `${a.getFullYear()}-${a.getMonth() + 1}-${a.getDate()} ${a.getHours()}:${a.getMinutes()}` + : `${a.getFullYear()}-${a.getMonth() + 1}-${a.getDate()}` + }, }, } </script> diff --git a/packages/docs/src/examples/calendars/playground.vue b/packages/docs/src/examples/calendars/playground.vue index 199031cbcfc..d6d03444576 100644 --- a/packages/docs/src/examples/calendars/playground.vue +++ b/packages/docs/src/examples/calendars/playground.vue @@ -7,7 +7,6 @@ > <v-btn fab - outlined small absolute left @@ -18,7 +17,6 @@ </v-btn> <v-btn fab - outlined small absolute right @@ -32,27 +30,38 @@ v-model="type" :items="typeOptions" label="Type" + hide-details + outlined + dense ></v-select> <v-checkbox v-model="dark" label="Dark" + hide-details ></v-checkbox> <v-checkbox v-model="shortIntervals" label="Short intervals" + hide-details ></v-checkbox> <v-checkbox v-model="shortMonths" label="Short months" + hide-details ></v-checkbox> <v-checkbox v-model="shortWeekdays" label="Short weekdays" + hide-details ></v-checkbox> <v-select v-model="color" :items="colorOptions" + class="mt-3" label="Color" + hide-details + outlined + dense ></v-select> <v-menu ref="startMenu" @@ -63,14 +72,17 @@ transition="scale-transition" min-width="290px" offset-y - full-width > <template v-slot:activator="{ on }"> <v-text-field v-model="start" + class="mt-3" label="Start Date" prepend-icon="event" + dense readonly + outlined + hide-details v-on="on" ></v-text-field> </template> @@ -106,14 +118,17 @@ transition="scale-transition" min-width="290px" offset-y - full-width > <template v-slot:activator="{ on }"> <v-text-field v-model="end" + class="mt-3" label="End Date" prepend-icon="event" + dense readonly + outlined + hide-details v-on="on" ></v-text-field> </template> @@ -148,14 +163,17 @@ transition="scale-transition" min-width="290px" offset-y - full-width > <template v-slot:activator="{ on }"> <v-text-field v-model="now" + class="mt-3" label="Today" prepend-icon="event" + dense readonly + outlined + hide-details v-on="on" ></v-text-field> </template> @@ -181,14 +199,31 @@ </v-btn> </v-date-picker> </v-menu> + <v-select + v-model="mode" + :items="modeOptions" + dense + outlined + hide-details + class="mt-3" + label="Event Overlap Mode" + ></v-select> <v-select v-model="weekdays" :items="weekdaysOptions" + dense + outlined + hide-details + class="mt-3" label="Weekdays" ></v-select> <v-text-field v-if="type === 'custom-weekly'" v-model="minWeeks" + dense + outlined + hide-details + class="mt-3" label="Minimum Weeks" type="number" ></v-text-field> @@ -196,18 +231,30 @@ v-if="hasIntervals" v-model="intervals" :items="intervalsOptions" + dense + outlined + hide-details + class="mt-3" label="Intervals" ></v-select> <v-select v-if="type === 'custom-daily'" v-model="maxDays" :items="maxDaysOptions" + dense + outlined + hide-details + class="mt-3" label="# of Days" ></v-select> <v-select v-if="hasIntervals" v-model="styleInterval" :items="styleIntervalOptions" + dense + outlined + hide-details + class="mt-3" label="Styling" ></v-select> </v-col> @@ -216,7 +263,7 @@ lg="9" class="pl-4" > - <v-sheet height="500"> + <v-sheet height="600"> <v-calendar ref="calendar" v-model="start" @@ -238,33 +285,12 @@ :short-months="shortMonths" :short-weekdays="shortWeekdays" :color="color" - > - <template v-slot:day="day"> - <v-sheet - v-if="day.day % 3 === 0" - :color="color" - class="white--text pa-1" - > - day slot {{ day.date }} - </v-sheet> - </template> - <template v-slot:header="day"> - <div - v-if="day.weekday % 2" - class="day-header" - > - day-header slot {{ day.date }} - </div> - </template> - <template v-slot:day-body="day"> - <div - v-if="day.weekday % 3 === 2" - class="day-body" - > - day-body slot {{ day.date }} - </div> - </template> - </v-calendar> + :events="events" + :event-overlap-mode="mode" + :event-overlap-threshold="45" + :event-color="getEventColor" + @change="getEvents" + ></v-calendar> </v-sheet> </v-col> </v-row> @@ -277,7 +303,7 @@ first: 0, minutes: 60, count: 24, - height: 40, + height: 48, } const stylings = { @@ -315,6 +341,9 @@ nowMenu: false, minWeeks: 1, now: null, + events: [], + colors: ['blue', 'indigo', 'deep-purple', 'cyan', 'green', 'orange', 'grey darken-1'], + names: ['Meeting', 'Holiday', 'PTO', 'Travel', 'Event', 'Birthday', 'Conference', 'Party'], type: 'month', typeOptions: [ { text: 'Day', value: 'day' }, @@ -324,6 +353,11 @@ { text: 'Custom Daily', value: 'custom-daily' }, { text: 'Custom Weekly', value: 'custom-weekly' }, ], + mode: 'stack', + modeOptions: [ + { text: 'Stack', value: 'stack' }, + { text: 'Column', value: 'column' }, + ], weekdays: weekdaysDefault, weekdaysOptions: [ { text: 'Sunday - Saturday', value: weekdaysDefault }, @@ -334,7 +368,7 @@ intervals: intervalsDefault, intervalsOptions: [ { text: 'Default', value: intervalsDefault }, - { text: 'Workday', value: { first: 16, minutes: 30, count: 20, height: 40 } }, + { text: 'Workday', value: { first: 16, minutes: 30, count: 20, height: 48 } }, ], maxDays: 7, maxDaysOptions: [ @@ -405,6 +439,39 @@ showIntervalLabel (interval) { return interval.minute === 0 }, + getEvents ({ start, end }) { + const events = [] + + const min = new Date(`${start.date}T00:00:00`) + const max = new Date(`${end.date}T23:59:59`) + const days = (max.getTime() - min.getTime()) / 86400000 + const eventCount = this.rnd(days, days + 20) + + for (let i = 0; i < eventCount; i++) { + const allDay = this.rnd(0, 3) === 0 + const firstTimestamp = this.rnd(min.getTime(), max.getTime()) + const first = new Date(firstTimestamp - (firstTimestamp % 900000)) + const secondTimestamp = this.rnd(2, allDay ? 288 : 8) * 900000 + const second = new Date(first.getTime() + secondTimestamp) + + events.push({ + name: this.names[this.rnd(0, this.names.length - 1)], + start: this.formatDate(first, !allDay), + end: this.formatDate(second, !allDay), + color: this.colors[this.rnd(0, this.colors.length - 1)], + }) + } + + this.events = events + }, + rnd (a, b) { + return Math.floor((b - a + 1) * Math.random()) + a + }, + formatDate (a, withTime) { + return withTime + ? `${a.getFullYear()}-${a.getMonth() + 1}-${a.getDate()} ${a.getHours()}:${a.getMinutes()}` + : `${a.getFullYear()}-${a.getMonth() + 1}-${a.getDate()}` + }, }, } </script> diff --git a/packages/docs/src/examples/calendars/simple/weekly.vue b/packages/docs/src/examples/calendars/simple/weekly.vue index 6bb07b1b0e9..367d1bf73b8 100644 --- a/packages/docs/src/examples/calendars/simple/weekly.vue +++ b/packages/docs/src/examples/calendars/simple/weekly.vue @@ -9,35 +9,7 @@ :events="events" color="primary" type="week" - > - <!-- the events at the top (all-day) --> - <template v-slot:day-header="{ date }"> - <template v-for="event in eventsMap[date]"> - <!-- all day events don't have time --> - <div - v-if="!event.time" - :key="event.title" - class="my-event" - @click="open(event)" - v-html="event.title" - ></div> - </template> - </template> - <!-- the events at the bottom (timed) --> - <template v-slot:day-body="{ date, timeToY, minutesToPixels }"> - <template v-for="event in eventsMap[date]"> - <!-- timed events --> - <div - v-if="event.time" - :key="event.title" - :style="{ top: timeToY(event.time) + 'px', height: minutesToPixels(event.duration) + 'px' }" - class="my-event with-time" - @click="open(event)" - v-html="event.title" - ></div> - </template> - </template> - </v-calendar> + ></v-calendar> </v-sheet> </v-col> </v-row> diff --git a/packages/docs/src/examples/calendars/usage.vue b/packages/docs/src/examples/calendars/usage.vue index d2d719bfde6..f19c3fde571 100755 --- a/packages/docs/src/examples/calendars/usage.vue +++ b/packages/docs/src/examples/calendars/usage.vue @@ -1,45 +1,126 @@ <template> - <v-sheet height="500"> - <v-calendar - type="month" - now="2019-01-08" - value="2019-01-08" - :events="events" - ></v-calendar> - </v-sheet> + <div> + <v-sheet + tile + height="54" + color="grey lighten-3" + class="d-flex" + > + <v-btn + icon + class="ma-2" + @click="$refs.calendar.prev()" + > + <v-icon>mdi-chevron-left</v-icon> + </v-btn> + <v-select + v-model="type" + :items="types" + dense + outlined + hide-details + class="ma-2" + label="type" + ></v-select> + <v-select + v-model="mode" + :items="modes" + dense + outlined + hide-details + label="event-overlap-mode" + class="ma-2" + ></v-select> + <v-select + v-model="weekday" + :items="weekdays" + dense + outlined + hide-details + label="weekdays" + class="ma-2" + ></v-select> + <v-spacer></v-spacer> + <v-btn + icon + class="ma-2" + @click="$refs.calendar.next()" + > + <v-icon>mdi-chevron-right</v-icon> + </v-btn> + </v-sheet> + <v-sheet height="600"> + <v-calendar + ref="calendar" + v-model="value" + :weekdays="weekday" + :type="type" + :events="events" + :event-overlap-mode="mode" + :event-overlap-threshold="30" + :event-color="getEventColor" + @change="getEvents" + ></v-calendar> + </v-sheet> + </div> </template> <script> export default { data: () => ({ - events: [ - { - name: 'Vacation', - start: '2018-12-30', - end: '2019-01-02', - }, - { - name: 'Meeting', - start: '2019-01-07', - }, - { - name: '30th Birthday', - start: '2019-01-03', - }, - { - name: 'New Year', - start: '2019-01-01', - }, - { - name: 'Conference', - start: '2019-01-21', - }, - { - name: 'Hackathon', - start: '2019-01-30', - end: '2019-02-01', - }, + type: 'month', + types: ['month', 'week', 'day', '4day'], + mode: 'stack', + modes: ['stack', 'column'], + weekday: [0, 1, 2, 3, 4, 5, 6], + weekdays: [ + { text: 'Sun - Sat', value: [0, 1, 2, 3, 4, 5, 6] }, + { text: 'Mon - Sun', value: [1, 2, 3, 4, 5, 6, 0] }, + { text: 'Mon - Fri', value: [1, 2, 3, 4, 5] }, + { text: 'Mon, Wed, Fri', value: [1, 3, 5] }, ], + value: '', + events: [], + colors: ['blue', 'indigo', 'deep-purple', 'cyan', 'green', 'orange', 'grey darken-1'], + names: ['Meeting', 'Holiday', 'PTO', 'Travel', 'Event', 'Birthday', 'Conference', 'Party'], }), + methods: { + getEvents ({ start, end }) { + const events = [] + + const min = new Date(`${start.date}T00:00:00`) + const max = new Date(`${end.date}T23:59:59`) + const days = (max.getTime() - min.getTime()) / 86400000 + const eventCount = this.rnd(days, days + 20) + + for (let i = 0; i < eventCount; i++) { + const allDay = this.rnd(0, 3) === 0 + const firstTimestamp = this.rnd(min.getTime(), max.getTime()) + const first = new Date(firstTimestamp - (firstTimestamp % 900000)) + const secondTimestamp = this.rnd(2, allDay ? 288 : 8) * 900000 + const second = new Date(first.getTime() + secondTimestamp) + + events.push({ + name: this.names[this.rnd(0, this.names.length - 1)], + start: this.formatDate(first, !allDay), + end: this.formatDate(second, !allDay), + color: this.colors[this.rnd(0, this.colors.length - 1)], + }) + } + + this.events = events + }, + getEventColor (event) { + return event.color + }, + rnd (a, b) { + return Math.floor((b - a + 1) * Math.random()) + a + }, + formatDate (a, withTime) { + return withTime + ? `${a.getFullYear()}-${a.getMonth() + 1}-${a.getDate()} ${a.getHours()}:${a.getMinutes()}` + : `${a.getFullYear()}-${a.getMonth() + 1}-${a.getDate()}` + }, + }, } </script> diff --git a/packages/docs/src/lang/en/components/Calendars.json b/packages/docs/src/lang/en/components/Calendars.json index 563c8267967..74a8639ceca 100644 --- a/packages/docs/src/lang/en/components/Calendars.json +++ b/packages/docs/src/lang/en/components/Calendars.json @@ -32,6 +32,7 @@ "eventMore": "Whether the more 'button' is displayed on a calendar with too many events in a given day. It will say something like '5 more' and when clicked generates a `click:more` event.", "eventMoreText": "The text to display in the more 'button' given the number of hidden events.", "eventName": "Set property of *event*'s displayed name, or a function which accepts an event object passed to the calendar as the first argument and a flag signalling whether the name is for a timed event (true) or an event over a day.", + "eventOverlapMode": "One of `stack`, `column`, or a custom render function", "eventOverlapThreshold": "A value in minutes that's used to determine whether two timed events should be placed in column beside each other or should be treated as slightly overlapping events.", "eventRipple": "Applies the `v-ripple` directive.", "events": "An array of event objects with a property for a start timestamp and optionally a name and end timestamp. If an end timestamp is not given, the value of start will be used. If no name is given, you must provide an implementation for the `event` slot.", @@ -42,6 +43,7 @@ "intervalCount": "The number of intervals to display in the `day` view.", "intervalFormat": "Formats time of day string that appears in the interval gutter of the `day` and `week` view to specified locale", "intervalHeight": "The height of an interval in pixels in the `day` view.", + "intervalWidth": "The width of the interval gutter on the left side in the `day` view.", "intervalMinutes": "The number of minutes the intervals are in the `day` view. A common interval is 60 minutes so the intervals are an hour.", "intervalStyle": "Returns CSS styling to apply to the interval.", "locale": "The locale of the calendar.", @@ -72,7 +74,8 @@ "scrollToTime": "Scrolls the scrollable area in the `day` view to the given time. If the time is not in a valid format or if the calendar is not in the `day` view then false is returned.", "timeToY": "Converts a time to a pixel value on the y-axis for the `day` view. If the time is not in a valid format or if the calendar is not in the `day` view then false is returned.", "updateEventVisibility": "If the calendar has events and `event-more` is truthy the days with too many events contain a 'button' to represent how many events had to be hidden.", - "updateTimes": "Updates now & today in the calendar, possibly updating the styles in the calendar." + "updateTimes": "Updates now & today in the calendar, possibly updating the styles in the calendar.", + "getVisibleEvents": "Returns the list of events seen on the current calendar where each element returned has the following properties:<br>- `input`: the event passed in the `events` prop.<br>- `start`: a CalendarTimestamp of the start timestamp parsed.<br>- `startIdentifier`: a number which represents the day the event starts on.<br>- `startTimestampIdentifier`: a number which represents the day and time the event starts on.<br>- `end`: a CalendarTimestamp of the end timestamp parsed.<br>- `endIdentifier`: a number which represents the day the event ends on.<br>- `endTimestampIdentifier`: a number which represents the day & time the event ends on.<br>- `allDay`: if this is an all-day event (has no time specified in the `start`/`end` on the event).<br>- `index`: the index of the event in the given array." }, "slots": { "day-body": "The content that is placed in a `day` view in the scrollable interval container. The day & time object is passed through this slots scope.", @@ -80,8 +83,9 @@ "day-label": "The content that is placed in the day of the month space in the `week` or `month` view. The day & time object is passed through this slots scope.", "day-month": "The content that is placed in the month space in the `week` or `month` view. The day & time object is passed through this slots scope.", "day": "The content that is placed in a `week` or `month` view. The day & time object is passed through this slots scope.", - "event": "The content placed in an event. The following variables are available: event, day, outside, start, end, timed.", - "interval": "The content that is placed in the interval space in the `day` view. The day & time object is passed through this slots scope." + "event": "The content placed in an event. This ignores the `event-name` prop.", + "interval": "The content that is placed in the interval space in the `day` view. The day & time object is passed through this slots scope.", + "interval-header": "The content that is placed in the interval space in the top left of the `day` view." }, "events": { "change": "The range of days displayed on the calendar changed. This is triggered on initialization. The event passed is an object with start and end date objects.", diff --git a/packages/vuetify/src/components/VCalendar/VCalendar.ts b/packages/vuetify/src/components/VCalendar/VCalendar.ts index 77c1c34b3c2..da15b6db2dd 100644 --- a/packages/vuetify/src/components/VCalendar/VCalendar.ts +++ b/packages/vuetify/src/components/VCalendar/VCalendar.ts @@ -59,8 +59,8 @@ export default CalendarWithEvents.extend({ computed: { parsedValue (): CalendarTimestamp { return (validateTimestamp(this.value) - ? parseTimestamp(this.value) - : (this.parsedStart || this.times.today)) as CalendarTimestamp + ? parseTimestamp(this.value, true) + : (this.parsedStart || this.times.today)) }, renderProps (): VCalendarRenderProps { const around = this.parsedValue @@ -123,8 +123,11 @@ export default CalendarWithEvents.extend({ methods: { checkChange (): void { + const { lastStart, lastEnd } = this const { start, end } = this.renderProps - if (start !== this.lastStart || end !== this.lastEnd) { + if (!lastStart || !lastEnd || + start.date !== lastStart.date || + end.date !== lastEnd.date) { this.lastStart = start this.lastEnd = end this.$emit('change', { start, end }) diff --git a/packages/vuetify/src/components/VCalendar/VCalendarDaily.sass b/packages/vuetify/src/components/VCalendar/VCalendarDaily.sass index 57d70994f92..6e408d0c7e0 100644 --- a/packages/vuetify/src/components/VCalendar/VCalendarDaily.sass +++ b/packages/vuetify/src/components/VCalendar/VCalendarDaily.sass @@ -3,15 +3,19 @@ // Theme +theme(v-calendar-daily) using ($material) background-color: map-deep-get($material, 'calendar', 'background-color') - border-left: map-deep-get($material, 'calendar', 'line-color') 1px solid - border-top: map-deep-get($material, 'calendar', 'line-color') 1px solid + border-left: map-deep-get($material, 'calendar', 'line-color') $calendar-line-width solid + border-top: map-deep-get($material, 'calendar', 'line-color') $calendar-line-width solid .v-calendar-daily__intervals-head - border-right: map-deep-get($material, 'calendar', 'line-color') 1px solid + border-right: map-deep-get($material, 'calendar', 'line-color') $calendar-line-width solid + &::after + background: map-deep-get($material, 'calendar', 'line-color') + background: linear-gradient(90deg, transparent, map-deep-get($material, 'calendar', 'line-color')) + .v-calendar-daily_head-day - border-right: map-deep-get($material, 'calendar', 'line-color') 1px solid - border-bottom: map-deep-get($material, 'calendar', 'line-color') 1px solid + border-right: map-deep-get($material, 'calendar', 'line-color') $calendar-line-width solid + border-bottom: map-deep-get($material, 'calendar', 'line-color') $calendar-line-width solid color: map-deep-get($material, 'calendar', 'text-color') &.v-past @@ -20,21 +24,24 @@ color: map-deep-get($material, 'calendar', 'past-color') .v-calendar-daily__intervals-body - border-right: map-deep-get($material, 'calendar', 'line-color') 1px solid + border-right: map-deep-get($material, 'calendar', 'line-color') $calendar-line-width solid .v-calendar-daily__interval-text - color: map-deep-get($material, 'calendar', 'interval-color') 1px solid + color: map-deep-get($material, 'calendar', 'interval-color') .v-calendar-daily__day - border-right: map-deep-get($material, 'calendar', 'line-color') 1px solid - border-bottom: map-deep-get($material, 'calendar', 'line-color') 1px solid + border-right: map-deep-get($material, 'calendar', 'line-color') $calendar-line-width solid + border-bottom: map-deep-get($material, 'calendar', 'line-color') $calendar-line-width solid .v-calendar-daily__day-interval - border-top: map-deep-get($material, 'calendar', 'line-color') 1px solid + border-top: map-deep-get($material, 'calendar', 'line-color') $calendar-line-width solid &:first-child border-top: none !important + .v-calendar-daily__interval::after + border-top: map-deep-get($material, 'calendar', 'line-color') $calendar-line-width solid + .v-calendar-daily display: flex flex-direction: column @@ -47,6 +54,15 @@ .v-calendar-daily__intervals-head flex: none + position: relative + + &::after + position: absolute + bottom: 0px + height: $calendar-line-width + left: 0 + right: 0 + content: '' .v-calendar-daily_head-day flex: 1 1 auto @@ -98,14 +114,25 @@ .v-calendar-daily__interval text-align: $calendar-daily-interval-gutter-align - padding-right: $calendar-daily-interval-gutter-left + padding-right: $calendar-daily-interval-gutter-line-width border-bottom: none + position: relative + + &::after + width: $calendar-daily-interval-gutter-line-width + position: absolute + height: $calendar-line-width + display: block + content: '' + right: 0 + bottom: -$calendar-line-width .v-calendar-daily__interval-text display: block position: relative top: $calendar-daily-interval-gutter-top font-size: $calendar-daily-interval-gutter-font-size + padding-right: $calendar-daily-interval-gutter-width .v-calendar-daily__day flex: 1 diff --git a/packages/vuetify/src/components/VCalendar/VCalendarDaily.ts b/packages/vuetify/src/components/VCalendar/VCalendarDaily.ts index 46db2bac1b7..da99b24828e 100644 --- a/packages/vuetify/src/components/VCalendar/VCalendarDaily.ts +++ b/packages/vuetify/src/components/VCalendar/VCalendarDaily.ts @@ -2,7 +2,7 @@ import './VCalendarDaily.sass' // Types -import { VNode, VNodeChildren } from 'vue' +import { VNode } from 'vue' // Directives import Resize from '../../directives/resize' @@ -14,7 +14,7 @@ import VBtn from '../VBtn' import CalendarWithIntervals from './mixins/calendar-with-intervals' // Util -import { convertToUnit } from '../../util/helpers' +import { convertToUnit, getSlot } from '../../util/helpers' import { CalendarTimestamp } from 'types' /* @vue/component */ @@ -72,13 +72,15 @@ export default CalendarWithIntervals.extend({ style: { width, }, - }) + }, getSlot(this, 'interval-header')) }, genHeadDays (): VNode[] { return this.days.map(this.genHeadDay) }, genHeadDay (day: CalendarTimestamp, index: number): VNode { - const slot = this.$scopedSlots['day-header'] + const header = getSlot(this, 'day-header', () => ({ + week: this.days, ...day, index, + })) return this.$createElement('div', { key: day.date, @@ -90,7 +92,7 @@ export default CalendarWithIntervals.extend({ }, [ this.genHeadWeekday(day), this.genHeadDayLabel(day), - slot ? slot({ ...day, index }) : '', + ...(header || []), ]) }, genHeadWeekday (day: CalendarTimestamp): VNode { @@ -162,9 +164,6 @@ export default CalendarWithIntervals.extend({ return this.days.map(this.genDay) }, genDay (day: CalendarTimestamp, index: number): VNode { - const slot = this.$scopedSlots['day-body'] - const scope = this.getSlotScope(day) - return this.$createElement('div', { key: day.date, staticClass: 'v-calendar-daily__day', @@ -174,7 +173,7 @@ export default CalendarWithIntervals.extend({ }), }, [ ...this.genDayIntervals(index), - slot ? slot(scope) : '', + ...(getSlot(this, 'day-body', () => this.getSlotScope(day)) || []), ]) }, genDayIntervals (index: number): VNode[] { @@ -183,8 +182,6 @@ export default CalendarWithIntervals.extend({ genDayInterval (interval: CalendarTimestamp): VNode { const height: string | undefined = convertToUnit(this.intervalHeight) const styler = this.intervalStyle || this.intervalStyleDefault - const slot = this.$scopedSlots.interval - const scope = this.getSlotScope(interval) const data = { key: interval.time, @@ -195,7 +192,7 @@ export default CalendarWithIntervals.extend({ }, } - const children = slot ? slot(scope) as VNodeChildren : undefined + const children = getSlot(this, 'interval', () => this.getSlotScope(interval)) return this.$createElement('div', data, children) }, diff --git a/packages/vuetify/src/components/VCalendar/VCalendarMonthly.ts b/packages/vuetify/src/components/VCalendar/VCalendarMonthly.ts index c35269edbaf..27717e2000d 100644 --- a/packages/vuetify/src/components/VCalendar/VCalendarMonthly.ts +++ b/packages/vuetify/src/components/VCalendar/VCalendarMonthly.ts @@ -17,10 +17,10 @@ export default VCalendarWeekly.extend({ return 'v-calendar-monthly v-calendar-weekly' }, parsedStart (): CalendarTimestamp { - return getStartOfMonth(parseTimestamp(this.start) as CalendarTimestamp) + return getStartOfMonth(parseTimestamp(this.start, true)) }, parsedEnd (): CalendarTimestamp { - return getEndOfMonth(parseTimestamp(this.end) as CalendarTimestamp) + return getEndOfMonth(parseTimestamp(this.end, true)) }, }, diff --git a/packages/vuetify/src/components/VCalendar/VCalendarWeekly.sass b/packages/vuetify/src/components/VCalendar/VCalendarWeekly.sass index 56552cce544..3adb892c0d7 100644 --- a/packages/vuetify/src/components/VCalendar/VCalendarWeekly.sass +++ b/packages/vuetify/src/components/VCalendar/VCalendarWeekly.sass @@ -3,11 +3,11 @@ // Theme +theme(v-calendar-weekly) using ($material) background-color: map-deep-get($material, 'calendar', 'background-color') - border-top: map-deep-get($material, 'calendar', 'line-color') 1px solid - border-left: map-deep-get($material, 'calendar', 'line-color') 1px solid + border-top: map-deep-get($material, 'calendar', 'line-color') $calendar-line-width solid + border-left: map-deep-get($material, 'calendar', 'line-color') $calendar-line-width solid .v-calendar-weekly__head-weekday - border-right: map-deep-get($material, 'calendar', 'line-color') 1px solid + border-right: map-deep-get($material, 'calendar', 'line-color') $calendar-line-width solid color: map-deep-get($material, 'calendar', 'text-color') &.v-past @@ -17,8 +17,8 @@ background-color: map-deep-get($material, 'calendar', 'outside-background-color') .v-calendar-weekly__day - border-right: map-deep-get($material, 'calendar', 'line-color') 1px solid - border-bottom: map-deep-get($material, 'calendar', 'line-color') 1px solid + border-right: map-deep-get($material, 'calendar', 'line-color') $calendar-line-width solid + border-bottom: map-deep-get($material, 'calendar', 'line-color') $calendar-line-width solid color: map-deep-get($material, 'calendar', 'text-color') &.v-outside diff --git a/packages/vuetify/src/components/VCalendar/VCalendarWeekly.ts b/packages/vuetify/src/components/VCalendar/VCalendarWeekly.ts index 9b2f7b18d44..1b4aa14a762 100644 --- a/packages/vuetify/src/components/VCalendar/VCalendarWeekly.ts +++ b/packages/vuetify/src/components/VCalendar/VCalendarWeekly.ts @@ -2,7 +2,7 @@ import './VCalendarWeekly.sass' // Types -import { VNode, VNodeChildren } from 'vue' +import { VNode } from 'vue' // Components import VBtn from '../VBtn' @@ -11,6 +11,7 @@ import VBtn from '../VBtn' import CalendarBase from './mixins/calendar-base' // Util +import { getSlot } from '../../util/helpers' import props from './util/props' import { createDayList, @@ -36,7 +37,7 @@ export default CalendarBase.extend({ return parseInt(this.minWeeks) }, days (): CalendarTimestamp[] { - const minDays = this.parsedMinWeeks * this.weekdays.length + const minDays = this.parsedMinWeeks * this.parsedWeekdays.length const start = this.getStartOfWeek(this.parsedStart) const end = this.getEndOfWeek(this.parsedEnd) @@ -117,12 +118,10 @@ export default CalendarBase.extend({ return this.$createElement('div', { key: week[0].date, staticClass: 'v-calendar-weekly__week', - }, week.map(this.genDay)) + }, week.map((day, index) => this.genDay(day, index, week))) }, - genDay (day: CalendarTimestamp, index: number): VNode { + genDay (day: CalendarTimestamp, index: number, week: CalendarTimestamp[]): VNode { const outside = this.isOutside(day) - const slot = this.$scopedSlots.day - const scope = { outside, index, ...day } return this.$createElement('div', { key: day.date, @@ -131,19 +130,13 @@ export default CalendarBase.extend({ on: this.getDefaultMouseEventHandlers(':day', _e => day), }, [ this.genDayLabel(day), - slot ? slot(scope) : '', - // renders the orginial month text - // (day.day === 1 && this.showMonthOnFirst) ? this.genDayMonth(day) : '', + ...(getSlot(this, 'day', () => ({ outside, index, week, ...day })) || []), ]) }, genDayLabel (day: CalendarTimestamp): VNode { - const slot = this.$scopedSlots['day-label'] - return this.$createElement('div', { staticClass: 'v-calendar-weekly__day-label', - }, [ - slot ? slot(day) as VNodeChildren : this.genDayLabelButton(day), - ]) + }, getSlot(this, 'day-label', day) || [this.genDayLabelButton(day)]) }, genDayLabelButton (day: CalendarTimestamp): VNode { const color = day.present ? this.color : 'transparent' @@ -167,11 +160,10 @@ export default CalendarBase.extend({ }, genDayMonth (day: CalendarTimestamp): VNode | string { const color = day.present ? this.color : undefined - const slot = this.$scopedSlots['day-month'] return this.$createElement('div', this.setTextColor(color, { staticClass: 'v-calendar-weekly__day-month', - }), slot ? slot(day) as VNodeChildren : this.monthFormatter(day, this.shortMonths)) + }), getSlot(this, 'day-month', day) || this.monthFormatter(day, this.shortMonths)) }, }, diff --git a/packages/vuetify/src/components/VCalendar/__tests__/__snapshots__/VCalendar.spec.ts.snap b/packages/vuetify/src/components/VCalendar/__tests__/__snapshots__/VCalendar.spec.ts.snap index 08ed283c451..bcf00bbf1ec 100644 --- a/packages/vuetify/src/components/VCalendar/__tests__/__snapshots__/VCalendar.spec.ts.snap +++ b/packages/vuetify/src/components/VCalendar/__tests__/__snapshots__/VCalendar.spec.ts.snap @@ -6,7 +6,7 @@ exports[`VCalendar should go to correct day when using next/prev public function style="margin-right: 0px;" > <div class="v-calendar-daily__intervals-head" - style="width: 45px;" + style="width: 60px;" > </div> <div class="v-calendar-daily_head-day v-past"> @@ -27,174 +27,174 @@ exports[`VCalendar should go to correct day when using next/prev public function <div class="v-calendar-daily__body"> <div class="v-calendar-daily__scroll-area"> <div class="v-calendar-daily__pane" - style="height: 960px;" + style="height: 1152px;" > <div class="v-calendar-daily__day-container"> <div class="v-calendar-daily__intervals-body" - style="width: 45px;" + style="width: 60px;" > <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 12 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11 PM @@ -203,99 +203,99 @@ exports[`VCalendar should go to correct day when using next/prev public function </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> @@ -312,7 +312,7 @@ exports[`VCalendar should go to correct day when using next/prev public function style="margin-right: 0px;" > <div class="v-calendar-daily__intervals-head" - style="width: 45px;" + style="width: 60px;" > </div> <div class="v-calendar-daily_head-day v-past"> @@ -333,174 +333,174 @@ exports[`VCalendar should go to correct day when using next/prev public function <div class="v-calendar-daily__body"> <div class="v-calendar-daily__scroll-area"> <div class="v-calendar-daily__pane" - style="height: 960px;" + style="height: 1152px;" > <div class="v-calendar-daily__day-container"> <div class="v-calendar-daily__intervals-body" - style="width: 45px;" + style="width: 60px;" > <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 12 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11 PM @@ -509,99 +509,99 @@ exports[`VCalendar should go to correct day when using next/prev public function </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> @@ -618,7 +618,7 @@ exports[`VCalendar should go to correct day when using next/prev public function style="margin-right: 0px;" > <div class="v-calendar-daily__intervals-head" - style="width: 45px;" + style="width: 60px;" > </div> <div class="v-calendar-daily_head-day v-past"> @@ -639,174 +639,174 @@ exports[`VCalendar should go to correct day when using next/prev public function <div class="v-calendar-daily__body"> <div class="v-calendar-daily__scroll-area"> <div class="v-calendar-daily__pane" - style="height: 960px;" + style="height: 1152px;" > <div class="v-calendar-daily__day-container"> <div class="v-calendar-daily__intervals-body" - style="width: 45px;" + style="width: 60px;" > <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 12 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11 PM @@ -815,99 +815,99 @@ exports[`VCalendar should go to correct day when using next/prev public function </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> @@ -924,7 +924,7 @@ exports[`VCalendar should render day view 1`] = ` style="margin-right: 0px;" > <div class="v-calendar-daily__intervals-head" - style="width: 45px;" + style="width: 60px;" > </div> <div class="v-calendar-daily_head-day v-past"> @@ -945,174 +945,174 @@ exports[`VCalendar should render day view 1`] = ` <div class="v-calendar-daily__body"> <div class="v-calendar-daily__scroll-area"> <div class="v-calendar-daily__pane" - style="height: 960px;" + style="height: 1152px;" > <div class="v-calendar-daily__day-container"> <div class="v-calendar-daily__intervals-body" - style="width: 45px;" + style="width: 60px;" > <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 12 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11 PM @@ -1121,99 +1121,99 @@ exports[`VCalendar should render day view 1`] = ` </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> @@ -1653,7 +1653,7 @@ exports[`VCalendar should render week view 1`] = ` style="margin-right: 0px;" > <div class="v-calendar-daily__intervals-head" - style="width: 45px;" + style="width: 60px;" > </div> <div class="v-calendar-daily_head-day v-past"> @@ -1758,174 +1758,174 @@ exports[`VCalendar should render week view 1`] = ` <div class="v-calendar-daily__body"> <div class="v-calendar-daily__scroll-area"> <div class="v-calendar-daily__pane" - style="height: 960px;" + style="height: 1152px;" > <div class="v-calendar-daily__day-container"> <div class="v-calendar-daily__intervals-body" - style="width: 45px;" + style="width: 60px;" > <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 12 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11 PM @@ -1934,687 +1934,687 @@ exports[`VCalendar should render week view 1`] = ` </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> diff --git a/packages/vuetify/src/components/VCalendar/__tests__/__snapshots__/VCalendarDaily.spec.ts.snap b/packages/vuetify/src/components/VCalendar/__tests__/__snapshots__/VCalendarDaily.spec.ts.snap index 1b5a3d04f27..c853e6ec267 100644 --- a/packages/vuetify/src/components/VCalendar/__tests__/__snapshots__/VCalendarDaily.spec.ts.snap +++ b/packages/vuetify/src/components/VCalendar/__tests__/__snapshots__/VCalendarDaily.spec.ts.snap @@ -6,7 +6,7 @@ exports[`VCalendarDaily should render component and have v-calendar-daily class style="margin-right: 0px;" > <div class="v-calendar-daily__intervals-head" - style="width: 45px;" + style="width: 60px;" > </div> <div class="v-calendar-daily_head-day v-past"> @@ -111,174 +111,174 @@ exports[`VCalendarDaily should render component and have v-calendar-daily class <div class="v-calendar-daily__body"> <div class="v-calendar-daily__scroll-area"> <div class="v-calendar-daily__pane" - style="height: 960px;" + style="height: 1152px;" > <div class="v-calendar-daily__day-container"> <div class="v-calendar-daily__intervals-body" - style="width: 45px;" + style="width: 60px;" > <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 12 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11 PM @@ -287,687 +287,687 @@ exports[`VCalendarDaily should render component and have v-calendar-daily class </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> @@ -984,7 +984,7 @@ exports[`VCalendarDaily should render correctly with firstInterval prop 1`] = ` style="margin-right: 0px;" > <div class="v-calendar-daily__intervals-head" - style="width: 45px;" + style="width: 60px;" > </div> <div class="v-calendar-daily_head-day v-past"> @@ -1089,174 +1089,174 @@ exports[`VCalendarDaily should render correctly with firstInterval prop 1`] = ` <div class="v-calendar-daily__body"> <div class="v-calendar-daily__scroll-area"> <div class="v-calendar-daily__pane" - style="height: 960px;" + style="height: 1152px;" > <div class="v-calendar-daily__day-container"> <div class="v-calendar-daily__intervals-body" - style="width: 45px;" + style="width: 60px;" > <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 12 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 12 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> @@ -1264,687 +1264,687 @@ exports[`VCalendarDaily should render correctly with firstInterval prop 1`] = ` </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> @@ -1961,7 +1961,7 @@ exports[`VCalendarDaily should render correctly with intervalCount prop 1`] = ` style="margin-right: 0px;" > <div class="v-calendar-daily__intervals-head" - style="width: 45px;" + style="width: 60px;" > </div> <div class="v-calendar-daily_head-day v-past"> @@ -2066,90 +2066,90 @@ exports[`VCalendarDaily should render correctly with intervalCount prop 1`] = ` <div class="v-calendar-daily__body"> <div class="v-calendar-daily__scroll-area"> <div class="v-calendar-daily__pane" - style="height: 480px;" + style="height: 576px;" > <div class="v-calendar-daily__day-container"> <div class="v-calendar-daily__intervals-body" - style="width: 45px;" + style="width: 60px;" > <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11 AM @@ -2158,351 +2158,351 @@ exports[`VCalendarDaily should render correctly with intervalCount prop 1`] = ` </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> @@ -2519,7 +2519,7 @@ exports[`VCalendarDaily should render correctly with intervalHeight prop 1`] = ` style="margin-right: 0px;" > <div class="v-calendar-daily__intervals-head" - style="width: 45px;" + style="width: 60px;" > </div> <div class="v-calendar-daily_head-day v-past"> @@ -2628,7 +2628,7 @@ exports[`VCalendarDaily should render correctly with intervalHeight prop 1`] = ` > <div class="v-calendar-daily__day-container"> <div class="v-calendar-daily__intervals-body" - style="width: 45px;" + style="width: 60px;" > <div class="v-calendar-daily__interval" style="height: 70px;" @@ -3497,7 +3497,7 @@ exports[`VCalendarDaily should render correctly with intervalMinutes prop 1`] = style="margin-right: 0px;" > <div class="v-calendar-daily__intervals-head" - style="width: 45px;" + style="width: 60px;" > </div> <div class="v-calendar-daily_head-day v-past"> @@ -3602,174 +3602,174 @@ exports[`VCalendarDaily should render correctly with intervalMinutes prop 1`] = <div class="v-calendar-daily__body"> <div class="v-calendar-daily__scroll-area"> <div class="v-calendar-daily__pane" - style="height: 960px;" + style="height: 1152px;" > <div class="v-calendar-daily__day-container"> <div class="v-calendar-daily__intervals-body" - style="width: 45px;" + style="width: 60px;" > <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 12:40 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1:20 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2:40 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3:20 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4:40 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5:20 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6:40 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7:20 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8:40 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9:20 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10:40 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11:20 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 12 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 12:40 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1:20 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2:40 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3:20 PM @@ -3778,687 +3778,687 @@ exports[`VCalendarDaily should render correctly with intervalMinutes prop 1`] = </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> @@ -4475,7 +4475,7 @@ exports[`VCalendarDaily should render correctly with maxDays prop 1`] = ` style="margin-right: 0px;" > <div class="v-calendar-daily__intervals-head" - style="width: 45px;" + style="width: 60px;" > </div> <div class="v-calendar-daily_head-day v-past"> @@ -4552,174 +4552,174 @@ exports[`VCalendarDaily should render correctly with maxDays prop 1`] = ` <div class="v-calendar-daily__body"> <div class="v-calendar-daily__scroll-area"> <div class="v-calendar-daily__pane" - style="height: 960px;" + style="height: 1152px;" > <div class="v-calendar-daily__day-container"> <div class="v-calendar-daily__intervals-body" - style="width: 45px;" + style="width: 60px;" > <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 12 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11 PM @@ -4728,491 +4728,491 @@ exports[`VCalendarDaily should render correctly with maxDays prop 1`] = ` </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> @@ -5230,7 +5230,7 @@ exports[`VCalendarDaily should render correctly without shortIntervals prop 1`] style="margin-right: 0px;" > <div class="v-calendar-daily__intervals-head" - style="width: 45px;" + style="width: 60px;" > </div> <div class="v-calendar-daily_head-day v-past"> @@ -5335,174 +5335,174 @@ exports[`VCalendarDaily should render correctly without shortIntervals prop 1`] <div class="v-calendar-daily__body"> <div class="v-calendar-daily__scroll-area"> <div class="v-calendar-daily__pane" - style="height: 960px;" + style="height: 1152px;" > <div class="v-calendar-daily__day-container"> <div class="v-calendar-daily__intervals-body" - style="width: 45px;" + style="width: 60px;" > <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1:00 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2:00 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3:00 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4:00 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5:00 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6:00 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7:00 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8:00 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9:00 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10:00 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11:00 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 12:00 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1:00 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2:00 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3:00 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4:00 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5:00 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6:00 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7:00 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8:00 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9:00 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10:00 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11:00 PM @@ -5511,687 +5511,687 @@ exports[`VCalendarDaily should render correctly without shortIntervals prop 1`] </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> @@ -6209,7 +6209,7 @@ exports[`VCalendarDaily should use custom interval formatter and render correctl style="margin-right: 0px;" > <div class="v-calendar-daily__intervals-head" - style="width: 45px;" + style="width: 60px;" > </div> <div class="v-calendar-daily_head-day v-past"> @@ -6314,174 +6314,174 @@ exports[`VCalendarDaily should use custom interval formatter and render correctl <div class="v-calendar-daily__body"> <div class="v-calendar-daily__scroll-area"> <div class="v-calendar-daily__pane" - style="height: 960px;" + style="height: 1152px;" > <div class="v-calendar-daily__day-container"> <div class="v-calendar-daily__intervals-body" - style="width: 45px;" + style="width: 60px;" > <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 01:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 02:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 03:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 04:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 05:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 06:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 07:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 08:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 09:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 10:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 11:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 12:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 13:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 14:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 15:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 16:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 17:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 18:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 19:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 20:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 21:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 22:00 </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> test: 2019-01-29 23:00 @@ -6490,687 +6490,687 @@ exports[`VCalendarDaily should use custom interval formatter and render correctl </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> @@ -7187,7 +7187,7 @@ exports[`VCalendarDaily should use custom interval style function and render cor style="margin-right: 0px;" > <div class="v-calendar-daily__intervals-head" - style="width: 45px;" + style="width: 60px;" > </div> <div class="v-calendar-daily_head-day v-past"> @@ -7292,174 +7292,174 @@ exports[`VCalendarDaily should use custom interval style function and render cor <div class="v-calendar-daily__body"> <div class="v-calendar-daily__scroll-area"> <div class="v-calendar-daily__pane" - style="height: 960px;" + style="height: 1152px;" > <div class="v-calendar-daily__day-container"> <div class="v-calendar-daily__intervals-body" - style="width: 45px;" + style="width: 60px;" > <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 12 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 1 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 3 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 5 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 7 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 9 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 11 PM @@ -7468,687 +7468,687 @@ exports[`VCalendarDaily should use custom interval style function and render cor </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0;" + style="height: 48px; opacity: 0;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.041666666666666664;" + style="height: 48px; opacity: 0.041666666666666664;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.08333333333333333;" + style="height: 48px; opacity: 0.08333333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.125;" + style="height: 48px; opacity: 0.125;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.16666666666666666;" + style="height: 48px; opacity: 0.16666666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.20833333333333334;" + style="height: 48px; opacity: 0.20833333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.25;" + style="height: 48px; opacity: 0.25;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.2916666666666667;" + style="height: 48px; opacity: 0.2916666666666667;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.3333333333333333;" + style="height: 48px; opacity: 0.3333333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.375;" + style="height: 48px; opacity: 0.375;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.4166666666666667;" + style="height: 48px; opacity: 0.4166666666666667;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.4583333333333333;" + style="height: 48px; opacity: 0.4583333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5;" + style="height: 48px; opacity: 0.5;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5416666666666666;" + style="height: 48px; opacity: 0.5416666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5833333333333334;" + style="height: 48px; opacity: 0.5833333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.625;" + style="height: 48px; opacity: 0.625;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.6666666666666666;" + style="height: 48px; opacity: 0.6666666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.7083333333333334;" + style="height: 48px; opacity: 0.7083333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.75;" + style="height: 48px; opacity: 0.75;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.7916666666666666;" + style="height: 48px; opacity: 0.7916666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.8333333333333334;" + style="height: 48px; opacity: 0.8333333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.875;" + style="height: 48px; opacity: 0.875;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.9166666666666666;" + style="height: 48px; opacity: 0.9166666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.9583333333333334;" + style="height: 48px; opacity: 0.9583333333333334;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0;" + style="height: 48px; opacity: 0;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.041666666666666664;" + style="height: 48px; opacity: 0.041666666666666664;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.08333333333333333;" + style="height: 48px; opacity: 0.08333333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.125;" + style="height: 48px; opacity: 0.125;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.16666666666666666;" + style="height: 48px; opacity: 0.16666666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.20833333333333334;" + style="height: 48px; opacity: 0.20833333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.25;" + style="height: 48px; opacity: 0.25;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.2916666666666667;" + style="height: 48px; opacity: 0.2916666666666667;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.3333333333333333;" + style="height: 48px; opacity: 0.3333333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.375;" + style="height: 48px; opacity: 0.375;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.4166666666666667;" + style="height: 48px; opacity: 0.4166666666666667;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.4583333333333333;" + style="height: 48px; opacity: 0.4583333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5;" + style="height: 48px; opacity: 0.5;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5416666666666666;" + style="height: 48px; opacity: 0.5416666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5833333333333334;" + style="height: 48px; opacity: 0.5833333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.625;" + style="height: 48px; opacity: 0.625;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.6666666666666666;" + style="height: 48px; opacity: 0.6666666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.7083333333333334;" + style="height: 48px; opacity: 0.7083333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.75;" + style="height: 48px; opacity: 0.75;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.7916666666666666;" + style="height: 48px; opacity: 0.7916666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.8333333333333334;" + style="height: 48px; opacity: 0.8333333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.875;" + style="height: 48px; opacity: 0.875;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.9166666666666666;" + style="height: 48px; opacity: 0.9166666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.9583333333333334;" + style="height: 48px; opacity: 0.9583333333333334;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0;" + style="height: 48px; opacity: 0;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.041666666666666664;" + style="height: 48px; opacity: 0.041666666666666664;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.08333333333333333;" + style="height: 48px; opacity: 0.08333333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.125;" + style="height: 48px; opacity: 0.125;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.16666666666666666;" + style="height: 48px; opacity: 0.16666666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.20833333333333334;" + style="height: 48px; opacity: 0.20833333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.25;" + style="height: 48px; opacity: 0.25;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.2916666666666667;" + style="height: 48px; opacity: 0.2916666666666667;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.3333333333333333;" + style="height: 48px; opacity: 0.3333333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.375;" + style="height: 48px; opacity: 0.375;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.4166666666666667;" + style="height: 48px; opacity: 0.4166666666666667;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.4583333333333333;" + style="height: 48px; opacity: 0.4583333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5;" + style="height: 48px; opacity: 0.5;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5416666666666666;" + style="height: 48px; opacity: 0.5416666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5833333333333334;" + style="height: 48px; opacity: 0.5833333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.625;" + style="height: 48px; opacity: 0.625;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.6666666666666666;" + style="height: 48px; opacity: 0.6666666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.7083333333333334;" + style="height: 48px; opacity: 0.7083333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.75;" + style="height: 48px; opacity: 0.75;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.7916666666666666;" + style="height: 48px; opacity: 0.7916666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.8333333333333334;" + style="height: 48px; opacity: 0.8333333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.875;" + style="height: 48px; opacity: 0.875;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.9166666666666666;" + style="height: 48px; opacity: 0.9166666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.9583333333333334;" + style="height: 48px; opacity: 0.9583333333333334;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0;" + style="height: 48px; opacity: 0;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.041666666666666664;" + style="height: 48px; opacity: 0.041666666666666664;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.08333333333333333;" + style="height: 48px; opacity: 0.08333333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.125;" + style="height: 48px; opacity: 0.125;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.16666666666666666;" + style="height: 48px; opacity: 0.16666666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.20833333333333334;" + style="height: 48px; opacity: 0.20833333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.25;" + style="height: 48px; opacity: 0.25;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.2916666666666667;" + style="height: 48px; opacity: 0.2916666666666667;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.3333333333333333;" + style="height: 48px; opacity: 0.3333333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.375;" + style="height: 48px; opacity: 0.375;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.4166666666666667;" + style="height: 48px; opacity: 0.4166666666666667;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.4583333333333333;" + style="height: 48px; opacity: 0.4583333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5;" + style="height: 48px; opacity: 0.5;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5416666666666666;" + style="height: 48px; opacity: 0.5416666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5833333333333334;" + style="height: 48px; opacity: 0.5833333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.625;" + style="height: 48px; opacity: 0.625;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.6666666666666666;" + style="height: 48px; opacity: 0.6666666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.7083333333333334;" + style="height: 48px; opacity: 0.7083333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.75;" + style="height: 48px; opacity: 0.75;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.7916666666666666;" + style="height: 48px; opacity: 0.7916666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.8333333333333334;" + style="height: 48px; opacity: 0.8333333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.875;" + style="height: 48px; opacity: 0.875;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.9166666666666666;" + style="height: 48px; opacity: 0.9166666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.9583333333333334;" + style="height: 48px; opacity: 0.9583333333333334;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0;" + style="height: 48px; opacity: 0;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.041666666666666664;" + style="height: 48px; opacity: 0.041666666666666664;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.08333333333333333;" + style="height: 48px; opacity: 0.08333333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.125;" + style="height: 48px; opacity: 0.125;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.16666666666666666;" + style="height: 48px; opacity: 0.16666666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.20833333333333334;" + style="height: 48px; opacity: 0.20833333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.25;" + style="height: 48px; opacity: 0.25;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.2916666666666667;" + style="height: 48px; opacity: 0.2916666666666667;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.3333333333333333;" + style="height: 48px; opacity: 0.3333333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.375;" + style="height: 48px; opacity: 0.375;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.4166666666666667;" + style="height: 48px; opacity: 0.4166666666666667;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.4583333333333333;" + style="height: 48px; opacity: 0.4583333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5;" + style="height: 48px; opacity: 0.5;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5416666666666666;" + style="height: 48px; opacity: 0.5416666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5833333333333334;" + style="height: 48px; opacity: 0.5833333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.625;" + style="height: 48px; opacity: 0.625;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.6666666666666666;" + style="height: 48px; opacity: 0.6666666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.7083333333333334;" + style="height: 48px; opacity: 0.7083333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.75;" + style="height: 48px; opacity: 0.75;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.7916666666666666;" + style="height: 48px; opacity: 0.7916666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.8333333333333334;" + style="height: 48px; opacity: 0.8333333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.875;" + style="height: 48px; opacity: 0.875;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.9166666666666666;" + style="height: 48px; opacity: 0.9166666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.9583333333333334;" + style="height: 48px; opacity: 0.9583333333333334;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0;" + style="height: 48px; opacity: 0;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.041666666666666664;" + style="height: 48px; opacity: 0.041666666666666664;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.08333333333333333;" + style="height: 48px; opacity: 0.08333333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.125;" + style="height: 48px; opacity: 0.125;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.16666666666666666;" + style="height: 48px; opacity: 0.16666666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.20833333333333334;" + style="height: 48px; opacity: 0.20833333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.25;" + style="height: 48px; opacity: 0.25;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.2916666666666667;" + style="height: 48px; opacity: 0.2916666666666667;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.3333333333333333;" + style="height: 48px; opacity: 0.3333333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.375;" + style="height: 48px; opacity: 0.375;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.4166666666666667;" + style="height: 48px; opacity: 0.4166666666666667;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.4583333333333333;" + style="height: 48px; opacity: 0.4583333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5;" + style="height: 48px; opacity: 0.5;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5416666666666666;" + style="height: 48px; opacity: 0.5416666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5833333333333334;" + style="height: 48px; opacity: 0.5833333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.625;" + style="height: 48px; opacity: 0.625;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.6666666666666666;" + style="height: 48px; opacity: 0.6666666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.7083333333333334;" + style="height: 48px; opacity: 0.7083333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.75;" + style="height: 48px; opacity: 0.75;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.7916666666666666;" + style="height: 48px; opacity: 0.7916666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.8333333333333334;" + style="height: 48px; opacity: 0.8333333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.875;" + style="height: 48px; opacity: 0.875;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.9166666666666666;" + style="height: 48px; opacity: 0.9166666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.9583333333333334;" + style="height: 48px; opacity: 0.9583333333333334;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0;" + style="height: 48px; opacity: 0;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.041666666666666664;" + style="height: 48px; opacity: 0.041666666666666664;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.08333333333333333;" + style="height: 48px; opacity: 0.08333333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.125;" + style="height: 48px; opacity: 0.125;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.16666666666666666;" + style="height: 48px; opacity: 0.16666666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.20833333333333334;" + style="height: 48px; opacity: 0.20833333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.25;" + style="height: 48px; opacity: 0.25;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.2916666666666667;" + style="height: 48px; opacity: 0.2916666666666667;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.3333333333333333;" + style="height: 48px; opacity: 0.3333333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.375;" + style="height: 48px; opacity: 0.375;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.4166666666666667;" + style="height: 48px; opacity: 0.4166666666666667;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.4583333333333333;" + style="height: 48px; opacity: 0.4583333333333333;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5;" + style="height: 48px; opacity: 0.5;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5416666666666666;" + style="height: 48px; opacity: 0.5416666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.5833333333333334;" + style="height: 48px; opacity: 0.5833333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.625;" + style="height: 48px; opacity: 0.625;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.6666666666666666;" + style="height: 48px; opacity: 0.6666666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.7083333333333334;" + style="height: 48px; opacity: 0.7083333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.75;" + style="height: 48px; opacity: 0.75;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.7916666666666666;" + style="height: 48px; opacity: 0.7916666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.8333333333333334;" + style="height: 48px; opacity: 0.8333333333333334;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.875;" + style="height: 48px; opacity: 0.875;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.9166666666666666;" + style="height: 48px; opacity: 0.9166666666666666;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px; opacity: 0.9583333333333334;" + style="height: 48px; opacity: 0.9583333333333334;" > </div> </div> @@ -8165,7 +8165,7 @@ exports[`VCalendarDaily should use custom showIntervalLabel function and render style="margin-right: 0px;" > <div class="v-calendar-daily__intervals-head" - style="width: 45px;" + style="width: 60px;" > </div> <div class="v-calendar-daily_head-day v-past"> @@ -8270,164 +8270,164 @@ exports[`VCalendarDaily should use custom showIntervalLabel function and render <div class="v-calendar-daily__body"> <div class="v-calendar-daily__scroll-area"> <div class="v-calendar-daily__pane" - style="height: 960px;" + style="height: 1152px;" > <div class="v-calendar-daily__day-container"> <div class="v-calendar-daily__intervals-body" - style="width: 45px;" + style="width: 60px;" > <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 12 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 AM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 12 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 2 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 4 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 6 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 8 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> 10 PM </div> </div> <div class="v-calendar-daily__interval" - style="height: 40px;" + style="height: 48px;" > <div class="v-calendar-daily__interval-text"> </div> @@ -8435,687 +8435,687 @@ exports[`VCalendarDaily should use custom showIntervalLabel function and render </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> <div class="v-calendar-daily__day v-past"> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> <div class="v-calendar-daily__day-interval" - style="height: 40px;" + style="height: 48px;" > </div> </div> diff --git a/packages/vuetify/src/components/VCalendar/_variables.scss b/packages/vuetify/src/components/VCalendar/_variables.scss index e0f756127e6..fbbcd9a092f 100644 --- a/packages/vuetify/src/components/VCalendar/_variables.scss +++ b/packages/vuetify/src/components/VCalendar/_variables.scss @@ -1,12 +1,15 @@ @import '../../styles/styles.sass'; +$calendar-line-width: 1px !default; + $calendar-daily-weekday-padding: 3px 0px 0px 0px !default; $calendar-daily-weekday-font-size: 11px !default; $calendar-daily-day-padding: 0px 0px 3px 0px !default; $calendar-daily-day-font-size: 40px !default; $calendar-daily-interval-gutter-top: -6px !default; -$calendar-daily-interval-gutter-left: 4px !default; +$calendar-daily-interval-gutter-width: 4px !default; $calendar-daily-interval-gutter-align: right; +$calendar-daily-interval-gutter-line-width: 8px !default; $calendar-daily-interval-gutter-font-size: 10px !default; $calendar-weekly-weekday-padding: 0px 4px 0px 4px !default; @@ -18,6 +21,7 @@ $calendar-weekly-day-label-margin: 4px 0 0 0 !default; $calendar-weekly-day-month-left: 36px !default; $calendar-event-bottom-space: 1px !default; +$calendar-event-border-width: 1px !default; $calendar-event-border-radius: $border-radius-root !default; $calendar-event-font-size: 12px !default; $calendar-event-right-empty: 10px !default; \ No newline at end of file diff --git a/packages/vuetify/src/components/VCalendar/mixins/__tests__/calendar-with-events.spec.ts b/packages/vuetify/src/components/VCalendar/mixins/__tests__/calendar-with-events.spec.ts index 87c64e0b0e3..a7d65f64720 100644 --- a/packages/vuetify/src/components/VCalendar/mixins/__tests__/calendar-with-events.spec.ts +++ b/packages/vuetify/src/components/VCalendar/mixins/__tests__/calendar-with-events.spec.ts @@ -128,36 +128,6 @@ describe('calendar-with-events.ts', () => { expect(wrapper.vm.formatTime(testData4, true)).toBe('3 PM') }) - it('should hide events', async () => { - const wrapper = mountFunction({ - render: h => h('div', [ - h('div', { - ref: 'events', - refInFor: true, - attrs: { - 'data-event': 'test', - }, - }), - h('div', { - ref: 'events', - refInFor: true, - attrs: { - 'data-event': 'test1', - }, - }), - ]), - }) - - expect(wrapper.vm.$refs.events[0].style.display).not.toEqual('none') - expect(wrapper.vm.$refs.events[1].style.display).not.toEqual('none') - wrapper.vm.hideEvents('test') - expect(wrapper.vm.$refs.events[0].style.display).toEqual('none') - expect(wrapper.vm.$refs.events[1].style.display).not.toEqual('none') - wrapper.vm.hideEvents('test1') - expect(wrapper.vm.$refs.events[0].style.display).toEqual('none') - expect(wrapper.vm.$refs.events[1].style.display).toEqual('none') - }) - it('should get events map', async () => { const wrapper = mountFunction({ render: h => h('div', [ @@ -192,46 +162,6 @@ describe('calendar-with-events.ts', () => { expect(wrapper.vm.getEventsMap()).toMatchSnapshot() }) - it('should update event visibility', async () => { - const wrapper = mountFunction({ - computed: { - noEvents: () => false, - }, - render: h => h('div', [ - h('div', { - ref: 'events', - refInFor: true, - attrs: { - 'data-event': 'test', - 'data-date': '2019-02-12', - }, - }), - h('div', { - ref: 'events', - refInFor: true, - attrs: { - 'data-event': 'test1', - 'data-date': '2019-02-13', - }, - }), - h('div', { - ref: 'events', - refInFor: true, - attrs: { - 'data-event': 'test2', - 'data-date': '2019-02-13', - }, - }), - ]), - }) - - expect(wrapper.vm.$refs.events[0].style.display).not.toEqual('none') - wrapper.vm.hideEvents('test') - expect(wrapper.vm.$refs.events[0].style.display).toEqual('none') - wrapper.vm.updateEventVisibility() - expect(wrapper.vm.$refs.events[0].style.display).not.toEqual('none') - }) - it('should get events for day', async () => { const wrapper = mount(Mock, { propsData: { @@ -250,8 +180,8 @@ describe('calendar-with-events.ts', () => { expect(wrapper.vm.getEventsForDay(parseTimestamp('2019-02-10'))).toHaveLength(0) expect(wrapper.vm.getEventsForDay(parseTimestamp('2019-02-11'))).toHaveLength(1) - expect(wrapper.vm.getEventsForDay(parseTimestamp('2019-02-12'))).toHaveLength(2) - expect(wrapper.vm.getEventsForDay(parseTimestamp('2019-02-13'))).toHaveLength(1) + expect(wrapper.vm.getEventsForDay(parseTimestamp('2019-02-12'))).toHaveLength(1) + expect(wrapper.vm.getEventsForDay(parseTimestamp('2019-02-13'))).toHaveLength(0) expect(wrapper.vm.getEventsForDay(parseTimestamp('2019-02-14'))).toHaveLength(0) }) @@ -273,8 +203,8 @@ describe('calendar-with-events.ts', () => { expect(wrapper.vm.getEventsForDayAll(parseTimestamp('2019-02-10'))).toHaveLength(0) expect(wrapper.vm.getEventsForDayAll(parseTimestamp('2019-02-11'))).toHaveLength(1) - expect(wrapper.vm.getEventsForDayAll(parseTimestamp('2019-02-12'))).toHaveLength(1) - expect(wrapper.vm.getEventsForDayAll(parseTimestamp('2019-02-13'))).toHaveLength(1) + expect(wrapper.vm.getEventsForDayAll(parseTimestamp('2019-02-12'))).toHaveLength(0) + expect(wrapper.vm.getEventsForDayAll(parseTimestamp('2019-02-13'))).toHaveLength(0) expect(wrapper.vm.getEventsForDayAll(parseTimestamp('2019-02-14'))).toHaveLength(0) }) @@ -300,69 +230,4 @@ describe('calendar-with-events.ts', () => { expect(wrapper.vm.getEventsForDayTimed(parseTimestamp('2019-02-13'))).toHaveLength(0) expect(wrapper.vm.getEventsForDayTimed(parseTimestamp('2019-02-14'))).toHaveLength(0) }) - - it('should check if is same column', async () => { - const events = [ - { - start: '2019-02-12 8:30', - end: '2019-02-12 12:00', - }, - { - start: '2019-02-11', - end: '2019-02-13', - }, - { - start: '2019-02-24', - }, - ] - const parsedEvents = events.map((e, i) => parseEvent(e, i, 'start', 'end')) - const visualEvents = parsedEvents.map(e => ({ event: e })) - - const wrapper = mount(Mock, { - propsData: { - eventOverlapThreshold: 500, - }, - }) - - expect(wrapper.vm.isSameColumn(visualEvents[0], visualEvents[1])).toBeFalsy() - expect(wrapper.vm.isSameColumn(visualEvents[0], visualEvents[2])).toBeFalsy() - - wrapper.setProps({ - eventOverlapThreshold: 1000, - }) - - expect(wrapper.vm.isSameColumn(visualEvents[0], visualEvents[1])).toBeTruthy() - expect(wrapper.vm.isSameColumn(visualEvents[0], visualEvents[2])).toBeTruthy() - }) - - it('should check if is overlapping', async () => { - const events = [ - { - start: '2019-02-11', - end: '2019-02-13', - offset: 0, - }, - { - start: '2019-02-10', - end: '2019-02-13', - offset: 10, - }, - ] - const parsedEvents = events.map((e, i) => parseEvent(e, i, 'start', 'end')) - const visualEvents = parsedEvents.map((e, i) => ({ event: e, offset: events[i].offset })) - - const wrapper = mount(Mock, { - propsData: { - eventOverlapThreshold: 500, - }, - }) - - expect(wrapper.vm.isOverlapping(visualEvents[0], visualEvents[1])).toBeFalsy() - - wrapper.setProps({ - eventOverlapThreshold: 1000, - }) - - expect(wrapper.vm.isOverlapping(visualEvents[0], visualEvents[1])).toBeFalsy() - }) }) diff --git a/packages/vuetify/src/components/VCalendar/mixins/__tests__/calendar-with-intervals.spec.ts b/packages/vuetify/src/components/VCalendar/mixins/__tests__/calendar-with-intervals.spec.ts index 85e1855e002..fa12a811f45 100644 --- a/packages/vuetify/src/components/VCalendar/mixins/__tests__/calendar-with-intervals.spec.ts +++ b/packages/vuetify/src/components/VCalendar/mixins/__tests__/calendar-with-intervals.spec.ts @@ -1,5 +1,6 @@ import CalendarWithIntervals from '../calendar-with-intervals' -import { parseTimestamp, VTimestamp } from '../../util/timestamp' +import { CalendarTimestamp } from 'types' +import { parseTimestamp } from '../../util/timestamp' import { mount, Wrapper, @@ -151,12 +152,12 @@ describe('calendar-with-intervals.ts', () => { it.skip('should format interval', async () => { const wrapper = mountFunction() - expect(wrapper.vm.intervalFormatter({ date: '2019-02-08', hour: 8, minute: 30 } as VTimestamp, false)).toBe('8:30 AM') - expect(wrapper.vm.intervalFormatter({ date: '2019-02-08', hour: 20, minute: 30 } as VTimestamp, false)).toBe('8:30 PM') - expect(wrapper.vm.intervalFormatter({ date: '2019-02-08', hour: 0, minute: 30 } as VTimestamp, false)).toBe('12:30 AM') - expect(wrapper.vm.intervalFormatter({ date: '2019-02-08', hour: 8, minute: 30 } as VTimestamp, true)).toBe('8:30 AM') - expect(wrapper.vm.intervalFormatter({ date: '2019-02-08', hour: 20, minute: 30 } as VTimestamp, true)).toBe('8:30 PM') - expect(wrapper.vm.intervalFormatter({ date: '2019-02-08', hour: 0, minute: 30 } as VTimestamp, true)).toBe('12:30 AM') + expect(wrapper.vm.intervalFormatter({ date: '2019-02-08', hour: 8, minute: 30 } as CalendarTimestamp, false)).toBe('8:30 AM') + expect(wrapper.vm.intervalFormatter({ date: '2019-02-08', hour: 20, minute: 30 } as CalendarTimestamp, false)).toBe('8:30 PM') + expect(wrapper.vm.intervalFormatter({ date: '2019-02-08', hour: 0, minute: 30 } as CalendarTimestamp, false)).toBe('12:30 AM') + expect(wrapper.vm.intervalFormatter({ date: '2019-02-08', hour: 8, minute: 30 } as CalendarTimestamp, true)).toBe('8:30 AM') + expect(wrapper.vm.intervalFormatter({ date: '2019-02-08', hour: 20, minute: 30 } as CalendarTimestamp, true)).toBe('8:30 PM') + expect(wrapper.vm.intervalFormatter({ date: '2019-02-08', hour: 0, minute: 30 } as CalendarTimestamp, true)).toBe('12:30 AM') }) it('should return intervalFormat if has one', async () => { @@ -177,7 +178,11 @@ describe('calendar-with-intervals.ts', () => { expect(wrapper.vm.getSlotScope(parseTimestamp('2019-02-08'))).toBeDefined() expect(wrapper.vm.getSlotScope(parseTimestamp('2019-02-08')).date).toBe('2019-02-08') - expect(wrapper.vm.getSlotScope(parseTimestamp('2019-02-08'))).toMatchSnapshot() + + const scope = wrapper.vm.getSlotScope(parseTimestamp('2019-02-08')) + delete scope.week + + expect(scope).toMatchSnapshot() expect(typeof wrapper.vm.getSlotScope(parseTimestamp('2019-02-08')).timeToY).toBe('function') expect(typeof wrapper.vm.getSlotScope(parseTimestamp('2019-02-08')).minutesToPixels).toBe('function') }) @@ -187,9 +192,9 @@ describe('calendar-with-intervals.ts', () => { expect(typeof wrapper.vm.timeToY).toBe('function') expect(wrapper.vm.timeToY('08:30')).toBeDefined() - expect(wrapper.vm.timeToY('08:30')).toBe(340) - expect(wrapper.vm.timeToY('09:30')).toBe(380) - expect(Math.round(wrapper.vm.timeToY('23:50') || 0)).toBe(953) + expect(wrapper.vm.timeToY('08:30')).toBe(408) + expect(wrapper.vm.timeToY('09:30')).toBe(456) + expect(Math.round(wrapper.vm.timeToY('23:50') || 0)).toBe(1144) wrapper.setProps({ firstInterval: 5, @@ -198,15 +203,15 @@ describe('calendar-with-intervals.ts', () => { bodyHeight: 400, }) - expect(wrapper.vm.timeToY('08:30')).toBe(200) - expect(wrapper.vm.timeToY('09:30')).toBe(200) - expect(wrapper.vm.timeToY('23:50')).toBe(200) + expect(wrapper.vm.timeToY('08:30')).toBe(240) + expect(wrapper.vm.timeToY('09:30')).toBe(240) + expect(wrapper.vm.timeToY('23:50')).toBe(240) expect(wrapper.vm.timeToY('00:05')).toBe(0) - expect(Math.round(wrapper.vm.timeToY('08:30', false) || 0)).toBe(1840) - expect(wrapper.vm.timeToY('09:30', false)).toBe(2080) - expect(wrapper.vm.timeToY('23:50', false)).toBe(5520) + expect(Math.round(wrapper.vm.timeToY('08:30', false) || 0)).toBe(2208) + expect(wrapper.vm.timeToY('09:30', false)).toBe(2496) + expect(wrapper.vm.timeToY('23:50', false)).toBe(6624) expect(wrapper.vm.timeToY('bad')).toBe(false) }) @@ -223,18 +228,18 @@ describe('calendar-with-intervals.ts', () => { expect(typeof wrapper.vm.minutesToPixels).toBe('function') expect(wrapper.vm.minutesToPixels(5)).toBeDefined() - expect(wrapper.vm.minutesToPixels(5)).toBe(40) - expect(wrapper.vm.minutesToPixels(10)).toBe(80) - expect(wrapper.vm.minutesToPixels(50)).toBe(400) + expect(wrapper.vm.minutesToPixels(5)).toBe(48) + expect(wrapper.vm.minutesToPixels(10)).toBe(96) + expect(wrapper.vm.minutesToPixels(50)).toBe(480) wrapper.setProps({ intervalMinutes: 10, bodyHeight: 400, }) - expect(wrapper.vm.minutesToPixels(5)).toBe(20) - expect(wrapper.vm.minutesToPixels(10)).toBe(40) - expect(wrapper.vm.minutesToPixels(50)).toBe(200) + expect(wrapper.vm.minutesToPixels(5)).toBe(24) + expect(wrapper.vm.minutesToPixels(10)).toBe(48) + expect(wrapper.vm.minutesToPixels(50)).toBe(240) }) it('should scroll to time', async () => { @@ -247,11 +252,11 @@ describe('calendar-with-intervals.ts', () => { }) wrapper.vm.scrollToTime('8:30') - expect((wrapper.vm.$refs.scrollArea as any).scrollTop).toBe(340) + expect((wrapper.vm.$refs.scrollArea as any).scrollTop).toBe(408) wrapper.vm.scrollToTime('12:30') - expect(Math.round((wrapper.vm.$refs.scrollArea as any).scrollTop)).toBe(500) + expect(Math.round((wrapper.vm.$refs.scrollArea as any).scrollTop)).toBe(600) wrapper.vm.scrollToTime('20:00') - expect((wrapper.vm.$refs.scrollArea as any).scrollTop).toBe(800) + expect((wrapper.vm.$refs.scrollArea as any).scrollTop).toBe(960) wrapper.setProps({ intervalMinutes: 5, @@ -259,11 +264,11 @@ describe('calendar-with-intervals.ts', () => { }) wrapper.vm.scrollToTime('8:30') - expect((wrapper.vm.$refs.scrollArea as any).scrollTop).toBe(960) + expect((wrapper.vm.$refs.scrollArea as any).scrollTop).toBe(1152) wrapper.vm.scrollToTime('12:30') - expect((wrapper.vm.$refs.scrollArea as any).scrollTop).toBe(960) + expect((wrapper.vm.$refs.scrollArea as any).scrollTop).toBe(1152) wrapper.vm.scrollToTime('20:30') - expect((wrapper.vm.$refs.scrollArea as any).scrollTop).toBe(960) + expect((wrapper.vm.$refs.scrollArea as any).scrollTop).toBe(1152) wrapper.setProps({ intervalMinutes: 30, @@ -271,11 +276,11 @@ describe('calendar-with-intervals.ts', () => { }) wrapper.vm.scrollToTime('8:30') - expect((wrapper.vm.$refs.scrollArea as any).scrollTop).toBe(680) + expect((wrapper.vm.$refs.scrollArea as any).scrollTop).toBe(816) wrapper.vm.scrollToTime('12:30') - expect((wrapper.vm.$refs.scrollArea as any).scrollTop).toBe(960) + expect((wrapper.vm.$refs.scrollArea as any).scrollTop).toBe(1152) wrapper.vm.scrollToTime('20:30') - expect((wrapper.vm.$refs.scrollArea as any).scrollTop).toBe(960) + expect((wrapper.vm.$refs.scrollArea as any).scrollTop).toBe(1152) expect(wrapper.vm.scrollToTime('20:19')).toBe(true) expect(wrapper.vm.scrollToTime('bad')).toBe(false) @@ -286,9 +291,9 @@ describe('calendar-with-intervals.ts', () => { expect(typeof wrapper.vm.getTimestampAtEvent).toBe('function') - expect(wrapper.vm.getTimestampAtEvent(createMouseEvent(0, 100) as unknown as MouseEvent, { time: '20:00' } as VTimestamp)).toMatchObject({ hour: 2, minute: 30 }) - expect(wrapper.vm.getTimestampAtEvent(createMouseEvent(0, 150) as unknown as MouseEvent, { time: '20:00' } as VTimestamp)).toMatchObject({ hour: 3, minute: 45 }) - expect(wrapper.vm.getTimestampAtEvent(createMouseEvent(0, 200) as unknown as MouseEvent, { time: '20:00' } as VTimestamp)).toMatchObject({ hour: 5, minute: 0 }) + expect(wrapper.vm.getTimestampAtEvent(createMouseEvent(0, 100) as unknown as MouseEvent, { time: '20:00' } as CalendarTimestamp)).toMatchObject({ hour: 2, minute: 5 }) + expect(wrapper.vm.getTimestampAtEvent(createMouseEvent(0, 150) as unknown as MouseEvent, { time: '20:00' } as CalendarTimestamp)).toMatchObject({ hour: 3, minute: 7 }) + expect(wrapper.vm.getTimestampAtEvent(createMouseEvent(0, 200) as unknown as MouseEvent, { time: '20:00' } as CalendarTimestamp)).toMatchObject({ hour: 4, minute: 10 }) }) it('should get timestamp at touch event', async () => { @@ -296,16 +301,16 @@ describe('calendar-with-intervals.ts', () => { expect(typeof wrapper.vm.getTimestampAtEvent).toBe('function') - expect(wrapper.vm.getTimestampAtEvent(createTouchEvent(0, 100) as unknown as TouchEvent, { time: '20:00' } as VTimestamp)).toMatchObject({ hour: 2, minute: 30 }) - expect(wrapper.vm.getTimestampAtEvent(createTouchEvent(0, 150) as unknown as TouchEvent, { time: '20:00' } as VTimestamp)).toMatchObject({ hour: 3, minute: 45 }) - expect(wrapper.vm.getTimestampAtEvent(createTouchEvent(0, 200) as unknown as TouchEvent, { time: '20:00' } as VTimestamp)).toMatchObject({ hour: 5, minute: 0 }) + expect(wrapper.vm.getTimestampAtEvent(createTouchEvent(0, 100) as unknown as TouchEvent, { time: '20:00' } as CalendarTimestamp)).toMatchObject({ hour: 2, minute: 5 }) + expect(wrapper.vm.getTimestampAtEvent(createTouchEvent(0, 150) as unknown as TouchEvent, { time: '20:00' } as CalendarTimestamp)).toMatchObject({ hour: 3, minute: 7 }) + expect(wrapper.vm.getTimestampAtEvent(createTouchEvent(0, 200) as unknown as TouchEvent, { time: '20:00' } as CalendarTimestamp)).toMatchObject({ hour: 4, minute: 10 }) }) it('should get style', async () => { const wrapper = mountFunction() expect(typeof wrapper.vm.intervalStyleDefault).toBe('function') - expect(wrapper.vm.intervalStyleDefault({} as VTimestamp)).toBeUndefined() + expect(wrapper.vm.intervalStyleDefault({} as CalendarTimestamp)).toBeUndefined() }) it('should show interval label', async () => { @@ -319,9 +324,9 @@ describe('calendar-with-intervals.ts', () => { expect(typeof wrapper.vm.showIntervalLabelDefault).toBe('function') expect(wrapper.vm.showIntervalLabelDefault({})).toBeTruthy() - expect(wrapper.vm.showIntervalLabelDefault({ hour: 0, minute: 5 } as VTimestamp)).toBeTruthy() - expect(wrapper.vm.showIntervalLabelDefault({ hour: 12, minute: 30 } as VTimestamp)).toBeTruthy() - expect(wrapper.vm.showIntervalLabelDefault({ hour: 13, minute: 0 } as VTimestamp)).toBeTruthy() - expect(wrapper.vm.showIntervalLabelDefault({ hour: 13, minute: 30 } as VTimestamp)).toBeTruthy() + expect(wrapper.vm.showIntervalLabelDefault({ hour: 0, minute: 5 } as CalendarTimestamp)).toBeTruthy() + expect(wrapper.vm.showIntervalLabelDefault({ hour: 12, minute: 30 } as CalendarTimestamp)).toBeTruthy() + expect(wrapper.vm.showIntervalLabelDefault({ hour: 13, minute: 0 } as CalendarTimestamp)).toBeTruthy() + expect(wrapper.vm.showIntervalLabelDefault({ hour: 13, minute: 30 } as CalendarTimestamp)).toBeTruthy() }) }) diff --git a/packages/vuetify/src/components/VCalendar/mixins/__tests__/times.spec.ts b/packages/vuetify/src/components/VCalendar/mixins/__tests__/times.spec.ts index 90f574103a0..3d7932c8292 100644 --- a/packages/vuetify/src/components/VCalendar/mixins/__tests__/times.spec.ts +++ b/packages/vuetify/src/components/VCalendar/mixins/__tests__/times.spec.ts @@ -5,7 +5,7 @@ import { MountOptions, } from '@vue/test-utils' import { ExtractVue } from '../../../../util/mixins' -import { VTimestamp } from '../../util/timestamp' +import { CalendarTimestamp } from 'types' const Mock = Times.extend({ render: h => h('div'), @@ -43,7 +43,7 @@ describe('times.ts', () => { day: '8', weekday: '4', } - wrapper.vm.updateDay(now as unknown as VTimestamp, target as unknown as VTimestamp) + wrapper.vm.updateDay(now as unknown as CalendarTimestamp, target as unknown as CalendarTimestamp) expect(target).toEqual(now) }) @@ -59,7 +59,7 @@ describe('times.ts', () => { day: '8', weekday: '4', } - wrapper.vm.updateDay(now as unknown as VTimestamp, target as unknown as VTimestamp) + wrapper.vm.updateDay(now as unknown as CalendarTimestamp, target as unknown as CalendarTimestamp) expect(target).not.toEqual(now) }) @@ -73,7 +73,7 @@ describe('times.ts', () => { hour: '8', minute: '30', } - wrapper.vm.updateTime(now as unknown as VTimestamp, target as unknown as VTimestamp) + wrapper.vm.updateTime(now as unknown as CalendarTimestamp, target as unknown as CalendarTimestamp) expect(target).not.toEqual(now) }) }) diff --git a/packages/vuetify/src/components/VCalendar/mixins/calendar-base.ts b/packages/vuetify/src/components/VCalendar/mixins/calendar-base.ts index d1f6dd266e5..ad87a45299c 100644 --- a/packages/vuetify/src/components/VCalendar/mixins/calendar-base.ts +++ b/packages/vuetify/src/components/VCalendar/mixins/calendar-base.ts @@ -19,6 +19,7 @@ import { createNativeLocaleFormatter, getStartOfWeek, getEndOfWeek, + getTimestampIdentifier, } from '../util/timestamp' import { CalendarTimestamp, CalendarFormatter } from 'types' @@ -53,10 +54,13 @@ export default mixins( return reversed }, parsedStart (): CalendarTimestamp { - return parseTimestamp(this.start) as CalendarTimestamp + return parseTimestamp(this.start, true) }, parsedEnd (): CalendarTimestamp { - return (this.end ? parseTimestamp(this.end) : this.parsedStart) as CalendarTimestamp + const start = this.parsedStart + const end: CalendarTimestamp = this.end ? parseTimestamp(this.end) || start : start + + return getTimestampIdentifier(end) < getTimestampIdentifier(start) ? start : end }, days (): CalendarTimestamp[] { return createDayList( @@ -103,10 +107,10 @@ export default mixins( } }, getStartOfWeek (timestamp: CalendarTimestamp): CalendarTimestamp { - return getStartOfWeek(timestamp, this.weekdays, this.times.today) + return getStartOfWeek(timestamp, this.parsedWeekdays, this.times.today) }, getEndOfWeek (timestamp: CalendarTimestamp): CalendarTimestamp { - return getEndOfWeek(timestamp, this.weekdays, this.times.today) + return getEndOfWeek(timestamp, this.parsedWeekdays, this.times.today) }, getFormatter (options: object): CalendarFormatter { return createNativeLocaleFormatter( diff --git a/packages/vuetify/src/components/VCalendar/mixins/calendar-with-events.sass b/packages/vuetify/src/components/VCalendar/mixins/calendar-with-events.sass index 43816a63b6f..5757dde776e 100644 --- a/packages/vuetify/src/components/VCalendar/mixins/calendar-with-events.sass +++ b/packages/vuetify/src/components/VCalendar/mixins/calendar-with-events.sass @@ -3,7 +3,13 @@ +theme(v-calendar-events) using ($material) .v-event-timed - border: 1px solid !important + border: $calendar-event-border-width solid !important + + .v-event-more + background-color: map-deep-get($material, 'calendar', 'background-color') + + &.v-outside + background-color: map-deep-get($material, 'calendar', 'outside-background-color') .v-calendar .v-event @@ -13,16 +19,9 @@ white-space: nowrap font-size: $calendar-event-font-size cursor: pointer - margin-right: -1px - - &.v-event-start - border-top-left-radius: $calendar-event-border-radius - border-bottom-left-radius: $calendar-event-border-radius - - &.v-event-end - width: 95% - border-top-right-radius: $calendar-event-border-radius - border-bottom-right-radius: $calendar-event-border-radius + margin-right: -$calendar-line-width + z-index: 1 + border-radius: $calendar-event-border-radius .v-event-more overflow: hidden @@ -30,9 +29,9 @@ white-space: nowrap font-size: $calendar-event-font-size cursor: pointer - border-radius: $calendar-event-border-radius font-weight: bold - margin-right: $calendar-event-right-empty + z-index: 1 + position: relative .v-event-timed-container position: absolute @@ -54,5 +53,8 @@ pointer-events: all &.v-calendar-events + .v-calendar-weekly__head-weekday + margin-right: -$calendar-line-width .v-calendar-weekly__day overflow: visible + margin-right: -$calendar-line-width diff --git a/packages/vuetify/src/components/VCalendar/mixins/calendar-with-events.ts b/packages/vuetify/src/components/VCalendar/mixins/calendar-with-events.ts index dd9ad750470..d49860155ae 100644 --- a/packages/vuetify/src/components/VCalendar/mixins/calendar-with-events.ts +++ b/packages/vuetify/src/components/VCalendar/mixins/calendar-with-events.ts @@ -16,32 +16,38 @@ import { escapeHTML } from '../../../util/helpers' // Util import props from '../util/props' import { - getDayIdentifier, - parseTime, + CalendarEventOverlapModes, +} from '../modes' +import { + getDayIdentifier, diffMinutes, } from '../util/timestamp' import { - VEventParsed, parseEvent, + isEventStart, isEventOn, + isEventOverlapping, } from '../util/events' -import { CalendarTimestamp, CalendarEvent } from 'types' +import { + CalendarTimestamp, + CalendarEventParsed, + CalendarEventVisual, + CalendarEventColorFunction, + CalendarEventNameFunction, + CalendarDaySlotScope, + CalendarDayBodySlotScope, + CalendarEventOverlapMode, +} from 'types' // Types -type VColorFunction = (event: CalendarEvent) => string - -type VNameFunction = (event: VEventParsed, timedEvent: boolean) => string - -type VTimeToY = (time: CalendarTimestamp | number | string) => number - -type VEventResetCheck = (date: CalendarTimestamp) => void +type VEventGetter = (day: CalendarTimestamp) => CalendarEventParsed[] -type VEventVisualGetOffset = (visual: VEventVisual, visuals: VEventVisual[]) => number +type VEventVisualToNode<D> = (visual: CalendarEventVisual, day: D) => VNode -type VEventGetter = (day: CalendarTimestamp) => VEventParsed[] - -type VEventVisualGetter = (events: VEventParsed[], timed: boolean) => VEventVisual[] - -type VEventVisualToNode<D> = (visual: VEventVisual, index: number, day: D) => VNode +type VEventsToNodes = <D extends CalendarDaySlotScope>( + day: D, + getter: VEventGetter, + mapper: VEventVisualToNode<D>, + timed: boolean) => VNode[] | undefined type VDailyEventsMap = { [date: string]: { @@ -51,21 +57,9 @@ type VDailyEventsMap = { } } -interface VEventVisual { - offset: number - event: VEventParsed - columnCount: number - column: number -} - -interface VDaySlotScope extends CalendarTimestamp { - outside: boolean - index: number -} - -interface VDayBodySlotScope extends VDaySlotScope { - timeToY: VTimeToY -} +const WIDTH_FULL = 100 +const WIDTH_START = 95 +const MINUTES_IN_DAY = 1440 /* @vue/component */ export default CalendarBase.extend({ @@ -81,22 +75,25 @@ export default CalendarBase.extend({ noEvents (): boolean { return this.events.length === 0 }, - parsedEvents (): VEventParsed[] { + parsedEvents (): CalendarEventParsed[] { return this.events.map((input, index) => parseEvent(input, index, this.eventStart, this.eventEnd)) }, - eventColorFunction (): VColorFunction { + parsedEventOverlapThreshold (): number { + return parseInt(this.eventOverlapThreshold) + }, + eventColorFunction (): CalendarEventColorFunction { return typeof this.eventColor === 'function' - ? this.eventColor as VColorFunction + ? this.eventColor as CalendarEventColorFunction : () => (this.eventColor as string) }, - eventTextColorFunction (): VColorFunction { + eventTextColorFunction (): CalendarEventColorFunction { return typeof this.eventTextColor === 'function' - ? this.eventTextColor as VColorFunction + ? this.eventTextColor as CalendarEventColorFunction : () => (this.eventTextColor as string) }, - eventNameFunction (): VNameFunction { + eventNameFunction (): CalendarEventNameFunction { return typeof this.eventName === 'function' - ? this.eventName as VNameFunction + ? this.eventName as CalendarEventNameFunction : (event, timedEvent) => { const name = escapeHTML(event.input[this.eventName as string] as string) if (event.start.hasTime) { @@ -104,7 +101,9 @@ export default CalendarBase.extend({ const showStart = event.start.hour < 12 && event.end.hour >= 12 const start = this.formatTime(event.start, showStart) const end = this.formatTime(event.end, true) - return `<strong>${name}</strong><br>${start} - ${end}` + const singline = diffMinutes(event.start, event.end) <= this.parsedEventOverlapThreshold + const separator = singline ? ', ' : '<br>' + return `<strong>${name}</strong>${separator}${start} - ${end}` } else { const time = this.formatTime(event.start, true) return `<strong>${time}</strong> ${name}` @@ -113,6 +112,11 @@ export default CalendarBase.extend({ return name } }, + eventModeFunction (): CalendarEventOverlapMode { + return typeof this.eventOverlapMode === 'function' + ? this.eventOverlapMode as CalendarEventOverlapMode + : CalendarEventOverlapModes[this.eventOverlapMode] + }, }, methods: { @@ -138,19 +142,21 @@ export default CalendarBase.extend({ if (!more) { break } + const parentBounds = parent.getBoundingClientRect() const last = events.length - 1 let hide = false let hidden = 0 + for (let i = 0; i <= last; i++) { if (!hide) { const eventBounds = events[i].getBoundingClientRect() - hide = (eventBounds.bottom + eventHeight > parentBounds.bottom && i !== last) || - events[i].style.display === 'none' + hide = i === last + ? (eventBounds.bottom > parentBounds.bottom) + : (eventBounds.bottom + eventHeight > parentBounds.bottom) } if (hide) { - const id = events[i].getAttribute('data-event') as string - this.hideEvents(id) + events[i].style.display = 'none' hidden++ } } @@ -163,15 +169,6 @@ export default CalendarBase.extend({ } } }, - hideEvents (id: string) { - const elements = this.$refs.events as HTMLElement[] - - elements.forEach(el => { - if (el.getAttribute('data-event') === id) { - el.style.display = 'none' - } - }) - }, getEventsMap (): VDailyEventsMap { const eventsMap: VDailyEventsMap = {} const elements = this.$refs.events as HTMLElement[] @@ -201,16 +198,29 @@ export default CalendarBase.extend({ return eventsMap }, - genDayEvent ({ offset, event }: VEventVisual, index: number, day: VDaySlotScope): VNode { + genDayEvent ({ event }: CalendarEventVisual, day: CalendarDaySlotScope): VNode { const eventHeight = this.eventHeight const eventMarginBottom = this.eventMarginBottom - const relativeOffset = (offset - index) * (eventHeight + eventMarginBottom) // 1 = margin bottom const dayIdentifier = getDayIdentifier(day) + const week = day.week const start = dayIdentifier === event.startIdentifier - const end = dayIdentifier === event.endIdentifier + let end = dayIdentifier === event.endIdentifier + let width = WIDTH_START + for (let i = day.index + 1; i < week.length; i++) { + const weekdayIdentifier = getDayIdentifier(week[i]) + if (event.endIdentifier >= weekdayIdentifier) { + width += WIDTH_FULL + if (weekdayIdentifier === event.endIdentifier) { + end = true + } + } else { + end = true + break + } + } const scope = { event: event.input, day, outside: day.outside, start, end, timed: false } - return this.genEvent(event, scope, start || day.index === 0, false, { + return this.genEvent(event, scope, false, { staticClass: 'v-event', class: { 'v-event-start': start, @@ -218,44 +228,37 @@ export default CalendarBase.extend({ }, style: { height: `${eventHeight}px`, - top: `${relativeOffset}px`, + width: `${width}%`, 'margin-bottom': `${eventMarginBottom}px`, }, attrs: { 'data-date': day.date, - 'data-event': event.index, }, key: event.index, ref: 'events', refInFor: true, }) }, - genTimedEvent ({ offset, event, columnCount, column }: VEventVisual, index: number, day: VDayBodySlotScope): VNode { + genTimedEvent ({ event, left, width }: CalendarEventVisual, day: CalendarDayBodySlotScope): VNode { const dayIdentifier = getDayIdentifier(day) const start = event.startIdentifier >= dayIdentifier const end = event.endIdentifier > dayIdentifier const top = start ? day.timeToY(event.start) : 0 - const bottom = end ? day.timeToY(1440) : day.timeToY(event.end) + const bottom = end ? day.timeToY(MINUTES_IN_DAY) : day.timeToY(event.end) const height = Math.max(this.eventHeight, bottom - top) - const left = columnCount === -1 - ? offset * 5 - : column * 100 / columnCount - const right = columnCount === -1 - ? 0 - : Math.max(0, (columnCount - column - 2) * 100 / columnCount + 10) const scope = { event: event.input, day, outside: day.outside, start, end, timed: true } - return this.genEvent(event, scope, true, true, { + return this.genEvent(event, scope, true, { staticClass: 'v-event-timed', style: { top: `${top}px`, height: `${height}px`, left: `${left}%`, - right: `${right}%`, + width: `${width}%`, }, }) }, - genEvent (event: VEventParsed, scope: object, showName: boolean, timedEvent: boolean, data: VNodeData): VNode { + genEvent (event: CalendarEventParsed, scope: object, timedEvent: boolean, data: VNodeData): VNode { const slot = this.$scopedSlots.event const text = this.eventTextColorFunction(event.input) const background = this.eventColorFunction(event.input) @@ -272,10 +275,10 @@ export default CalendarBase.extend({ }) ), slot ? slot(scope) - : (showName ? [this.genName(event, timedEvent)] : undefined) + : [this.genName(event, timedEvent)] ) }, - genName (event: VEventParsed, timedEvent: boolean): VNode { + genName (event: CalendarEventParsed, timedEvent: boolean): VNode { return this.$createElement('div', { staticClass: 'pl-1', domProps: { @@ -283,9 +286,29 @@ export default CalendarBase.extend({ }, }) }, - genMore (day: CalendarTimestamp): VNode { + genPlaceholder (day: CalendarTimestamp): VNode { + const height = this.eventHeight + this.eventMarginBottom + + return this.$createElement('div', { + style: { + height: `${height}px`, + }, + attrs: { + 'data-date': day.date, + }, + ref: 'events', + refInFor: true, + }) + }, + genMore (day: CalendarDaySlotScope): VNode { + const eventHeight = this.eventHeight + const eventMarginBottom = this.eventMarginBottom + return this.$createElement('div', { staticClass: 'v-event-more pl-1', + class: { + 'v-outside': day.outside, + }, attrs: { 'data-date': day.date, 'data-more': 1, @@ -299,165 +322,78 @@ export default CalendarBase.extend({ }, style: { display: 'none', + height: `${eventHeight}px`, + 'margin-bottom': `${eventMarginBottom}px`, }, ref: 'events', refInFor: true, }) }, - getEventsForDay (day: CalendarTimestamp): VEventParsed[] { - const identifier = getDayIdentifier(day) + getVisibleEvents (): CalendarEventParsed[] { + const start = getDayIdentifier(this.days[0]) + const end = getDayIdentifier(this.days[this.days.length - 1]) return this.parsedEvents.filter( - event => isEventOn(event, identifier) + event => isEventOverlapping(event, start, end) ) }, - getEventsForDayAll (day: CalendarTimestamp): VEventParsed[] { + getEventsForDay (day: CalendarTimestamp): CalendarEventParsed[] { const identifier = getDayIdentifier(day) + const firstWeekday = this.parsedWeekdays[0] return this.parsedEvents.filter( - event => event.allDay && isEventOn(event, identifier) + event => isEventStart(event, day, identifier, firstWeekday) ) }, - getEventsForDayTimed (day: CalendarTimestamp): VEventParsed[] { + getEventsForDayAll (day: CalendarTimestamp): CalendarEventParsed[] { const identifier = getDayIdentifier(day) + const firstWeekday = this.parsedWeekdays[0] return this.parsedEvents.filter( - event => !event.allDay && isEventOn(event, identifier) + event => event.allDay && isEventStart(event, day, identifier, firstWeekday) ) }, - isSameColumn (a: VEventVisual, b: VEventVisual): boolean { - const astart = parseTime(a.event.start) as number - const bstart = parseTime(b.event.start) as number - const diff = astart - bstart - const abs = diff < 0 ? -diff : diff - - return abs < this.eventOverlapThreshold - }, - isOverlapping (a: VEventVisual, b: VEventVisual): boolean { - const astart = parseTime(a.event.start) as number - const bstart = parseTime(b.event.start) as number - - if (a.offset < b.offset && bstart < astart) { - const aend = astart + this.eventOverlapThreshold - const bend = parseTime(b.event.end) as number - return !(astart >= bend || aend <= bstart) - } + getEventsForDayTimed (day: CalendarTimestamp): CalendarEventParsed[] { + const identifier = getDayIdentifier(day) - return false + return this.parsedEvents.filter( + event => !event.allDay && isEventOn(event, identifier) + ) }, getScopedSlots () { if (this.noEvents) { return this.$scopedSlots } - /** - * Over the span of a week (for example) we want to maintain an event in the same row (for weekly and monthly views). - * We keep track of those rows by indexToOffset. If the value in that array is -1, then we can place an event at that spot. - * For a daily view with timed events we arrange them based on columns and offsets. If two or more events start at around the - * same time (eventOverlapThreshold) they go into columns. If one event starts inside another it is indented the appropriate amount. - * If one event overlaps another after those adjustments are made those events are placed in columns together instead of any defined - * indents. - */ - - const parsedEvents = this.parsedEvents - const indexToOffset: number[] = parsedEvents.map(event => -1) - const resetOnWeekday = this.parsedWeekdays[0] - - const checkReset: VEventResetCheck = day => { - if (day.weekday === resetOnWeekday) { - for (let i = 0; i < indexToOffset.length; i++) { - indexToOffset[i] = -1 - } - } - } + const mode = this.eventModeFunction( + this.parsedEvents, + this.parsedWeekdays[0], + this.parsedEventOverlapThreshold + ) - const getOffset: VEventVisualGetOffset = (visual, visuals) => { - let offset = indexToOffset[visual.event.index] - if (offset === -1) { - let min = Number.MAX_SAFE_INTEGER - let max = -1 - visuals.forEach(other => { - const otherOffset = indexToOffset[other.event.index] - if (otherOffset !== -1) { - min = Math.min(min, otherOffset) - max = Math.max(max, otherOffset) - } - }) - offset = min > 0 && max !== -1 ? min - 1 : max + 1 - indexToOffset[visual.event.index] = offset + const getSlotChildren: VEventsToNodes = (day, getter, mapper, timed) => { + const events = getter(day) + + if (events.length === 0) { + return } - return offset - } - const getVisuals: VEventVisualGetter = (events, timed) => { - const visuals: VEventVisual[] = events.map(event => ({ event, offset: 0, columnCount: -1, column: -1 })) - // sort events by start date/time - visuals.sort((a, b) => a.event.startTimestampIdentifier - b.event.startTimestampIdentifier) + const visuals = mode(day, events, timed) + if (timed) { - // timed events can be organized into columns - visuals.forEach(visual => { - if (visual.columnCount !== -1) { - return - } - const columns: VEventVisual[] = [] - visuals.forEach(other => { - if (other.columnCount === -1 && this.isSameColumn(visual, other)) { - columns.push(other) - } - }) - if (columns.length > 1) { - columns.forEach((visual, visualIndex) => { - visual.column = visualIndex - visual.columnCount = columns.length - }) - } - }) - // for any not organized into columns, if they overlap another event - // not in a column they are offset - visuals.forEach(visual => { - if (visual.columnCount === -1) { - visuals.forEach(other => { - const otherOffset = indexToOffset[other.event.index] - if (otherOffset !== -1 && other.event.endTimestampIdentifier <= visual.event.startTimestampIdentifier) { - indexToOffset[other.event.index] = -1 - } - }) - visual.offset = getOffset(visual, visuals) - } - }) - // for any not organized into columns, if a previous event overlaps this event - // join them into the columns - visuals.forEach(visual => { - if (visual.columnCount === -1) { - const columns: VEventVisual[] = [visual] - visuals.forEach(other => { - if (other !== visual && other.columnCount === -1 && this.isOverlapping(visual, other)) { - columns.push(other) - } - }) - if (columns.length > 1) { - columns.forEach((visual, visualIndex) => { - visual.column = visualIndex - visual.columnCount = columns.length - }) - } - } - }) - } else { - visuals.forEach(visual => { - visual.offset = getOffset(visual, visuals) - }) + return visuals.map(visual => mapper(visual, day)) } - visuals.sort((a, b) => (a.offset - b.offset) || (a.column - b.column)) - return visuals - } - const getSlotChildren = <D extends VDaySlotScope>(day: D, getter: VEventGetter, mapper: VEventVisualToNode<D>, timed: boolean) => { - checkReset(day) - const events = getter(day) - return events.length === 0 - ? undefined - : getVisuals(events, timed).map((visual, index) => mapper(visual, index, day)) + const children: VNode[] = [] + + visuals.forEach((visual, index) => { + while (children.length < visual.column) { + children.push(this.genPlaceholder(day)) + } + children.push(mapper(visual, day)) + }) + + return children } const slots = this.$scopedSlots @@ -467,7 +403,7 @@ export default CalendarBase.extend({ return { ...slots, - day: (day: VDaySlotScope) => { + day: (day: CalendarDaySlotScope) => { let children = getSlotChildren(day, this.getEventsForDay, this.genDayEvent, false) if (children && children.length > 0 && this.eventMore) { children.push(this.genMore(day)) @@ -480,7 +416,7 @@ export default CalendarBase.extend({ } return children }, - 'day-header': (day: VDaySlotScope) => { + 'day-header': (day: CalendarDaySlotScope) => { let children = getSlotChildren(day, this.getEventsForDayAll, this.genDayEvent, false) if (slotDayHeader) { @@ -491,7 +427,7 @@ export default CalendarBase.extend({ } return children }, - 'day-body': (day: VDayBodySlotScope) => { + 'day-body': (day: CalendarDayBodySlotScope) => { const events = getSlotChildren(day, this.getEventsForDayTimed, this.genTimedEvent, true) let children: VNode[] = [ this.$createElement('div', { diff --git a/packages/vuetify/src/components/VCalendar/mixins/calendar-with-intervals.ts b/packages/vuetify/src/components/VCalendar/mixins/calendar-with-intervals.ts index 0d393b8553e..8b3a1e3ec03 100644 --- a/packages/vuetify/src/components/VCalendar/mixins/calendar-with-intervals.ts +++ b/packages/vuetify/src/components/VCalendar/mixins/calendar-with-intervals.ts @@ -101,6 +101,7 @@ export default CalendarBase.extend({ const scope = copyTimestamp(timestamp) as any scope.timeToY = this.timeToY scope.minutesToPixels = this.minutesToPixels + scope.week = this.days return scope }, scrollToTime (time: VTime): boolean { diff --git a/packages/vuetify/src/components/VCalendar/mixins/times.ts b/packages/vuetify/src/components/VCalendar/mixins/times.ts index c2f3e91ebb5..9e2a961cf2b 100644 --- a/packages/vuetify/src/components/VCalendar/mixins/times.ts +++ b/packages/vuetify/src/components/VCalendar/mixins/times.ts @@ -19,14 +19,14 @@ export default Vue.extend({ data: () => ({ times: { - now: parseTimestamp('0000-00-00 00:00') as CalendarTimestamp, - today: parseTimestamp('0000-00-00') as CalendarTimestamp, + now: parseTimestamp('0000-00-00 00:00', true), + today: parseTimestamp('0000-00-00', true), }, }), computed: { parsedNow (): CalendarTimestamp | null { - return this.now ? parseTimestamp(this.now) : null + return this.now ? parseTimestamp(this.now, true) : null }, }, diff --git a/packages/vuetify/src/components/VCalendar/modes/__tests__/__snapshots__/common.spec.ts.snap b/packages/vuetify/src/components/VCalendar/modes/__tests__/__snapshots__/common.spec.ts.snap new file mode 100644 index 00000000000..15f3ee66a7f --- /dev/null +++ b/packages/vuetify/src/components/VCalendar/modes/__tests__/__snapshots__/common.spec.ts.snap @@ -0,0 +1,181 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`common.ts should get visuals 1 1`] = ` +Object { + "allDay": true, + "end": Object { + "date": "2019-02-14", + "day": 14, + "future": false, + "hasDay": true, + "hasTime": false, + "hour": 0, + "minute": 0, + "month": 2, + "past": false, + "present": false, + "time": "", + "weekday": 4, + "year": 2019, + }, + "endIdentifier": 20190214, + "endTimestampIdentifier": 201902142359, + "index": 0, + "input": Object { + "end": "2019-02-14", + "start": "2019-02-13", + }, + "start": Object { + "date": "2019-02-13", + "day": 13, + "future": false, + "hasDay": true, + "hasTime": false, + "hour": 0, + "minute": 0, + "month": 2, + "past": false, + "present": false, + "time": "", + "weekday": 3, + "year": 2019, + }, + "startIdentifier": 20190213, + "startTimestampIdentifier": 201902130000, +} +`; + +exports[`common.ts should get visuals 1 2`] = ` +Object { + "allDay": true, + "end": Object { + "date": "2019-02-14", + "day": 14, + "future": false, + "hasDay": true, + "hasTime": false, + "hour": 0, + "minute": 0, + "month": 2, + "past": false, + "present": false, + "time": "", + "weekday": 4, + "year": 2019, + }, + "endIdentifier": 20190214, + "endTimestampIdentifier": 201902142359, + "index": 0, + "input": Object { + "a": "2019-02-13", + "b": "2019-02-14", + }, + "start": Object { + "date": "2019-02-13", + "day": 13, + "future": false, + "hasDay": true, + "hasTime": false, + "hour": 0, + "minute": 0, + "month": 2, + "past": false, + "present": false, + "time": "", + "weekday": 3, + "year": 2019, + }, + "startIdentifier": 20190213, + "startTimestampIdentifier": 201902130000, +} +`; + +exports[`common.ts should get visuals 1 3`] = ` +Object { + "allDay": true, + "end": Object { + "date": "2019-02-14", + "day": 14, + "future": false, + "hasDay": true, + "hasTime": false, + "hour": 0, + "minute": 0, + "month": 2, + "past": false, + "present": false, + "time": "", + "weekday": 4, + "year": 2019, + }, + "endIdentifier": 20190214, + "endTimestampIdentifier": 201902142359, + "index": 1, + "input": Object { + "end": "2019-02-14", + "start": "2019-02-13", + }, + "start": Object { + "date": "2019-02-13", + "day": 13, + "future": false, + "hasDay": true, + "hasTime": false, + "hour": 0, + "minute": 0, + "month": 2, + "past": false, + "present": false, + "time": "", + "weekday": 3, + "year": 2019, + }, + "startIdentifier": 20190213, + "startTimestampIdentifier": 201902130000, +} +`; + +exports[`common.ts should get visuals 1 4`] = ` +Object { + "allDay": true, + "end": Object { + "date": "2019-02-14", + "day": 14, + "future": false, + "hasDay": true, + "hasTime": false, + "hour": 0, + "minute": 0, + "month": 2, + "past": false, + "present": false, + "time": "", + "weekday": 4, + "year": 2019, + }, + "endIdentifier": 20190214, + "endTimestampIdentifier": 201902142359, + "index": 1, + "input": Object { + "a": "2019-02-13", + "b": "2019-02-14", + }, + "start": Object { + "date": "2019-02-13", + "day": 13, + "future": false, + "hasDay": true, + "hasTime": false, + "hour": 0, + "minute": 0, + "month": 2, + "past": false, + "present": false, + "time": "", + "weekday": 3, + "year": 2019, + }, + "startIdentifier": 20190213, + "startTimestampIdentifier": 201902130000, +} +`; diff --git a/packages/vuetify/src/components/VCalendar/modes/__tests__/common.spec.ts b/packages/vuetify/src/components/VCalendar/modes/__tests__/common.spec.ts new file mode 100644 index 00000000000..7d2d1f16b47 --- /dev/null +++ b/packages/vuetify/src/components/VCalendar/modes/__tests__/common.spec.ts @@ -0,0 +1,77 @@ +import { parseEvent } from '../../util/events' +import { + getVisuals, hasOverlap, +} from '../common' + +describe('common.ts', () => { + it('should get visuals 1', () => { + expect(getVisuals([])).toEqual([]) + expect(parseEvent({ + start: '2019-02-13', + end: '2019-02-14', + }, 0, 'start', 'end')).toMatchSnapshot() + expect(parseEvent({ + a: '2019-02-13', + b: '2019-02-14', + }, 0, 'a', 'b')).toMatchSnapshot() + expect(parseEvent({ + start: '2019-02-13', + end: '2019-02-14', + }, 1, 'start', 'end')).toMatchSnapshot() + expect(parseEvent({ + a: '2019-02-13', + b: '2019-02-14', + }, 1, 'a', 'b')).toMatchSnapshot() + }) + it('should get visuals 2', () => { + const p0 = parseEvent({ + start: '2019-02-13', + end: '2019-02-14', + }, 0, 'start', 'end') + const p1 = parseEvent({ + start: '2019-02-13', + end: '2019-02-15', + }, 0, 'start', 'end') + const p2 = parseEvent({ + start: '2019-02-13 08:00', + end: '2019-02-13 09:00', + }, 0, 'start', 'end') + const p3 = parseEvent({ + start: '2019-02-13 07:30', + end: '2019-02-13 08:30', + }, 0, 'start', 'end') + const p4 = parseEvent({ + start: '2019-02-13 08:00', + end: '2019-02-13 10:00', + }, 0, 'start', 'end') + const visualDefaults = { + columnCount: 0, + column: 0, + left: 0, + width: 100, + } + + expect(getVisuals([p0, p1, p2, p3, p4])).toEqual([ + { event: p1, ...visualDefaults }, + { event: p0, ...visualDefaults }, + { event: p3, ...visualDefaults }, + { event: p4, ...visualDefaults }, + { event: p2, ...visualDefaults }, + ]) + }) + it('should overlap', () => { + expect(hasOverlap(0, 1, 1, 2)).toBeFalsy() + expect(hasOverlap(0, 1, 1, 2, false)).toBeTruthy() + expect(hasOverlap(1, 2, 0, 1)).toBeFalsy() + expect(hasOverlap(1, 2, 0, 1, false)).toBeTruthy() + expect(hasOverlap(0, 1, 2, 3)).toBeFalsy() + expect(hasOverlap(2, 3, 0, 1)).toBeFalsy() + expect(hasOverlap(1, 4, 1, 4)).toBeTruthy() + expect(hasOverlap(1, 4, 1, 3)).toBeTruthy() + expect(hasOverlap(1, 3, 1, 4)).toBeTruthy() + expect(hasOverlap(1, 4, 2, 3)).toBeTruthy() + expect(hasOverlap(2, 3, 1, 4)).toBeTruthy() + expect(hasOverlap(1, 4, 3, 5)).toBeTruthy() + expect(hasOverlap(3, 5, 1, 4)).toBeTruthy() + }) +}) diff --git a/packages/vuetify/src/components/VCalendar/modes/column.ts b/packages/vuetify/src/components/VCalendar/modes/column.ts new file mode 100644 index 00000000000..31c704a7a9f --- /dev/null +++ b/packages/vuetify/src/components/VCalendar/modes/column.ts @@ -0,0 +1,21 @@ +import { CalendarEventOverlapMode } from 'types' +import { getOverlapGroupHandler } from './common' + +const FULL_WIDTH = 100 + +export const column: CalendarEventOverlapMode = (events, firstWeekday, overlapThreshold) => { + const handler = getOverlapGroupHandler(firstWeekday) + + return (day, dayEvents, timed) => { + const visuals = handler.getVisuals(day, dayEvents, timed) + + if (timed) { + visuals.forEach(visual => { + visual.left = visual.column * FULL_WIDTH / visual.columnCount + visual.width = FULL_WIDTH / visual.columnCount + }) + } + + return visuals + } +} diff --git a/packages/vuetify/src/components/VCalendar/modes/common.ts b/packages/vuetify/src/components/VCalendar/modes/common.ts new file mode 100644 index 00000000000..7392f9faef1 --- /dev/null +++ b/packages/vuetify/src/components/VCalendar/modes/common.ts @@ -0,0 +1,136 @@ +import { CalendarEventParsed, CalendarEventVisual, CalendarTimestamp } from 'types' +import { getTimestampIdentifier } from '../util/timestamp' + +const MILLIS_IN_DAY = 86400000 + +export type GetRange = (event: CalendarEventParsed) => [number, number] + +export function getVisuals (events: CalendarEventParsed[], minStart = 0): CalendarEventVisual[] { + const visuals = events.map(event => ({ + event, + columnCount: 0, + column: 0, + left: 0, + width: 100, + })) + + visuals.sort((a, b) => { + return (Math.max(minStart, a.event.startTimestampIdentifier) - Math.max(minStart, b.event.startTimestampIdentifier)) || + (b.event.endTimestampIdentifier - a.event.endTimestampIdentifier) + }) + + return visuals +} + +export interface ColumnGroup { + start: number + end: number + visuals: CalendarEventVisual[] +} + +export function hasOverlap (s0: number, e0: number, s1: number, e1: number, exclude = true): boolean { + return exclude ? !(s0 >= e1 || e0 <= s1) : !(s0 > e1 || e0 < s1) +} + +export function setColumnCount (groups: ColumnGroup[]) { + groups.forEach(group => { + group.visuals.forEach(groupVisual => { + groupVisual.columnCount = groups.length + }) + }) +} + +export function getRange (event: CalendarEventParsed): [number, number] { + return [event.startTimestampIdentifier, event.endTimestampIdentifier] +} + +export function getDayRange (event: CalendarEventParsed): [number, number] { + return [event.startIdentifier, event.endIdentifier] +} + +export function getNormalizedRange (event: CalendarEventParsed, dayStart: number): [number, number] { + return [Math.max(dayStart, event.startTimestampIdentifier), Math.min(dayStart + MILLIS_IN_DAY, event.endTimestampIdentifier)] +} + +export function getOpenGroup (groups: ColumnGroup[], start: number, end: number, timed: boolean) { + for (let i = 0; i < groups.length; i++) { + const group = groups[i] + let intersected = false + + if (hasOverlap(start, end, group.start, group.end, timed)) { + for (let k = 0; k < group.visuals.length; k++) { + const groupVisual = group.visuals[k] + const [groupStart, groupEnd] = timed ? getRange(groupVisual.event) : getDayRange(groupVisual.event) + + if (hasOverlap(start, end, groupStart, groupEnd, timed)) { + intersected = true + break + } + } + } + + if (!intersected) { + return i + } + } + + return -1 +} + +export function getOverlapGroupHandler (firstWeekday: number) { + const handler = { + groups: [] as ColumnGroup[], + min: -1, + max: -1, + reset: () => { + handler.groups = [] + handler.min = handler.max = -1 + }, + getVisuals: (day: CalendarTimestamp, dayEvents: CalendarEventParsed[], timed: boolean) => { + if (day.weekday === firstWeekday || timed) { + handler.reset() + } + + const dayStart = getTimestampIdentifier(day) + const visuals = getVisuals(dayEvents, dayStart) + + visuals.forEach(visual => { + const [start, end] = timed ? getRange(visual.event) : getDayRange(visual.event) + + if (handler.groups.length > 0 && !hasOverlap(start, end, handler.min, handler.max, timed)) { + setColumnCount(handler.groups) + handler.reset() + } + + let targetGroup = getOpenGroup(handler.groups, start, end, timed) + + if (targetGroup === -1) { + targetGroup = handler.groups.length + + handler.groups.push({ start, end, visuals: [] }) + } + + const target = handler.groups[targetGroup] + target.visuals.push(visual) + target.start = Math.min(target.start, start) + target.end = Math.max(target.end, end) + + visual.column = targetGroup + + if (handler.min === -1) { + handler.min = start + handler.max = end + } else { + handler.min = Math.min(handler.min, start) + handler.max = Math.max(handler.max, end) + } + }) + + setColumnCount(handler.groups) + + return visuals + }, + } + + return handler +} diff --git a/packages/vuetify/src/components/VCalendar/modes/index.ts b/packages/vuetify/src/components/VCalendar/modes/index.ts new file mode 100644 index 00000000000..18dbfa57dea --- /dev/null +++ b/packages/vuetify/src/components/VCalendar/modes/index.ts @@ -0,0 +1,8 @@ +import { CalendarEventOverlapMode } from 'types' +import { stack } from './stack' +import { column } from './column' + +export const CalendarEventOverlapModes: Record<string, CalendarEventOverlapMode> = { + stack, + column, +} diff --git a/packages/vuetify/src/components/VCalendar/modes/stack.ts b/packages/vuetify/src/components/VCalendar/modes/stack.ts new file mode 100644 index 00000000000..ca432cdcfe5 --- /dev/null +++ b/packages/vuetify/src/components/VCalendar/modes/stack.ts @@ -0,0 +1,255 @@ +import { CalendarEventOverlapMode, CalendarEventVisual } from 'types' +import { getOverlapGroupHandler, getVisuals, hasOverlap, getNormalizedRange } from './common' +import { getTimestampIdentifier } from '../util/timestamp' + +interface Group { + start: number + end: number + visuals: CalendarEventVisual[] +} + +interface Node { + parent: Node | null + sibling: boolean + index: number + visual: CalendarEventVisual + start: number + end: number + children: Node[] +} + +const FULL_WIDTH = 100 + +const DEFAULT_OFFSET = 5 + +const WIDTH_MULTIPLIER = 1.7 + +/** + * Variation of column mode where events can be stacked. The priority of this + * mode is to stack events together taking up the least amount of space while + * trying to ensure the content of the event is always visible as well as its + * start and end. A sibling column has intersecting event content and must be + * placed beside each other. Non-sibling columns are offset by 5% from the + * previous column. The width is scaled by 1.7 so the events overlap and + * whitespace is reduced. If there is a hole in columns the event width is + * scaled up so it intersects with the next column. The columns have equal + * width in the space they are given. If the event doesn't have any to the + * right of it that intersect with it's content it's right side is extended + * to the right side. + */ + +export const stack: CalendarEventOverlapMode = (events, firstWeekday, overlapThreshold) => { + const handler = getOverlapGroupHandler(firstWeekday) + + // eslint-disable-next-line max-statements + return (day, dayEvents, timed) => { + if (!timed) { + return handler.getVisuals(day, dayEvents, timed) + } + + const dayStart = getTimestampIdentifier(day) + const visuals = getVisuals(dayEvents, dayStart) + const groups = getGroups(visuals, dayStart) + + for (const group of groups) { + const nodes: Node[] = [] + + for (const visual of group.visuals) { + const child = getNode(visual, dayStart) + const index = getNextIndex(child, nodes) + + if (index === false) { + const parent = getParent(child, nodes) + if (parent) { + child.parent = parent + child.sibling = hasOverlap(child.start, child.end, parent.start, addTime(parent.start, overlapThreshold)) + child.index = parent.index + 1 + parent.children.push(child) + } + } else { + const [parent] = getOverlappingRange(child, nodes, index - 1, index - 1) + const children = getOverlappingRange(child, nodes, index + 1, index + nodes.length, true) + + child.children = children + child.index = index + + if (parent) { + child.parent = parent + child.sibling = hasOverlap(child.start, child.end, parent.start, addTime(parent.start, overlapThreshold)) + parent.children.push(child) + } + + for (const grand of children) { + if (grand.parent === parent) { + grand.parent = child + } + + const grandNext = grand.index - child.index <= 1 + if (grandNext && child.sibling && + hasOverlap(child.start, addTime(child.start, overlapThreshold), grand.start, grand.end)) { + grand.sibling = true + } + } + } + + nodes.push(child) + } + + calculateBounds(nodes, overlapThreshold) + } + + visuals.sort((a, b) => (a.left - b.left) || (a.event.startTimestampIdentifier - b.event.startTimestampIdentifier)) + + return visuals + } +} + +function calculateBounds (nodes: Node[], overlapThreshold: number) { + for (const node of nodes) { + const { visual, parent } = node + const columns = getMaxChildIndex(node) + 1 + const spaceLeft = parent ? parent.visual.left : 0 + const spaceWidth = FULL_WIDTH - spaceLeft + const offset = Math.min(DEFAULT_OFFSET, FULL_WIDTH / columns) + const columnWidthMultiplier = getColumnWidthMultiplier(node, nodes) + const columnOffset = spaceWidth / (columns - node.index + 1) + const columnWidth = spaceWidth / (columns - node.index + (node.sibling ? 1 : 0)) * columnWidthMultiplier + + if (parent) { + visual.left = node.sibling + ? spaceLeft + columnOffset + : spaceLeft + offset + } + + visual.width = hasFullWidth(node, nodes, overlapThreshold) + ? FULL_WIDTH - visual.left + : Math.min(FULL_WIDTH - visual.left, columnWidth * WIDTH_MULTIPLIER) + } +} + +function getColumnWidthMultiplier (node: Node, nodes: Node[]): number { + if (!node.children.length) { + return 1 + } + + const maxColumn = node.index + nodes.length + const minColumn = node.children.reduce((min, c) => Math.min(min, c.index), maxColumn) + + return minColumn - node.index +} + +function getOverlappingIndices (node: Node, nodes: Node[]): number[] { + const indices: number[] = [] + for (const other of nodes) { + if (hasOverlap(node.start, node.end, other.start, other.end)) { + indices.push(other.index) + } + } + return indices +} + +function getNextIndex (node: Node, nodes: Node[]): number | false { + const indices = getOverlappingIndices(node, nodes) + indices.sort() + + for (let i = 0; i < indices.length; i++) { + if (i < indices[i]) { + return i + } + } + return false +} + +function getOverlappingRange (node: Node, nodes: Node[], indexMin: number, indexMax: number, returnFirstColumn = false): Node[] { + const overlapping: Node[] = [] + for (const other of nodes) { + if (other.index >= indexMin && other.index <= indexMax && hasOverlap(node.start, node.end, other.start, other.end)) { + overlapping.push(other) + } + } + if (returnFirstColumn && overlapping.length > 0) { + const first = overlapping.reduce((min, n) => Math.min(min, n.index), overlapping[0].index) + return overlapping.filter(n => n.index === first) + } + return overlapping +} + +function getParent (node: Node, nodes: Node[]): Node | null { + let parent: Node | null = null + for (const other of nodes) { + if (hasOverlap(node.start, node.end, other.start, other.end) && (parent === null || other.index > parent.index)) { + parent = other + } + } + return parent +} + +function hasFullWidth (node: Node, nodes: Node[], overlapThreshold: number): boolean { + for (const other of nodes) { + if (other !== node && + other.index > node.index && + hasOverlap(node.start, addTime(node.start, overlapThreshold), other.start, other.end)) { + return false + } + } + + return true +} + +function getGroups (visuals: CalendarEventVisual[], dayStart: number): Group[] { + const groups: Group[] = [] + + for (const visual of visuals) { + const [start, end] = getNormalizedRange(visual.event, dayStart) + let added = false + + for (const group of groups) { + if (hasOverlap(start, end, group.start, group.end)) { + group.visuals.push(visual) + group.end = Math.max(group.end, end) + added = true + break + } + } + + if (!added) { + groups.push({ start, end, visuals: [visual] }) + } + } + + return groups +} + +function getNode (visual: CalendarEventVisual, dayStart: number): Node { + const [start, end] = getNormalizedRange(visual.event, dayStart) + + return { + parent: null, + sibling: true, + index: 0, + visual, + start, + end, + children: [], + } +} + +function getMaxChildIndex (node: Node): number { + let max = node.index + for (const child of node.children) { + const childMax = getMaxChildIndex(child) + if (childMax > max) { + max = childMax + } + } + return max +} + +function addTime (identifier: number, minutes: number): number { + const removeMinutes = identifier % 100 + const totalMinutes = removeMinutes + minutes + const addHours = Math.floor(totalMinutes / 60) + const addMinutes = totalMinutes % 60 + + return identifier - removeMinutes + addHours * 100 + addMinutes +} diff --git a/packages/vuetify/src/components/VCalendar/util/__tests__/__snapshots__/events.spec.ts.snap b/packages/vuetify/src/components/VCalendar/util/__tests__/__snapshots__/events.spec.ts.snap index e4bb721f956..c02ec9c28d0 100644 --- a/packages/vuetify/src/components/VCalendar/util/__tests__/__snapshots__/events.spec.ts.snap +++ b/packages/vuetify/src/components/VCalendar/util/__tests__/__snapshots__/events.spec.ts.snap @@ -19,7 +19,7 @@ Object { "year": 2019, }, "endIdentifier": 20190214, - "endTimestampIdentifier": 201902140000, + "endTimestampIdentifier": 201902142359, "index": 0, "input": Object { "end": "2019-02-14", @@ -64,7 +64,7 @@ Object { "year": 2019, }, "endIdentifier": 20190214, - "endTimestampIdentifier": 201902140000, + "endTimestampIdentifier": 201902142359, "index": 0, "input": Object { "a": "2019-02-13", @@ -109,7 +109,7 @@ Object { "year": 2019, }, "endIdentifier": 20190214, - "endTimestampIdentifier": 201902140000, + "endTimestampIdentifier": 201902142359, "index": 1, "input": Object { "end": "2019-02-14", @@ -154,7 +154,7 @@ Object { "year": 2019, }, "endIdentifier": 20190214, - "endTimestampIdentifier": 201902140000, + "endTimestampIdentifier": 201902142359, "index": 1, "input": Object { "a": "2019-02-13", diff --git a/packages/vuetify/src/components/VCalendar/util/__tests__/events.spec.ts b/packages/vuetify/src/components/VCalendar/util/__tests__/events.spec.ts index 8440dc4b4f1..d335d7c6b0e 100644 --- a/packages/vuetify/src/components/VCalendar/util/__tests__/events.spec.ts +++ b/packages/vuetify/src/components/VCalendar/util/__tests__/events.spec.ts @@ -57,6 +57,6 @@ describe('events.ts', () => { end: '2019-02-15', }, 0, 'start', 'end') - expect(fn).toThrow('The start property is required on all events to be a valid timestamp in the format YYYY-MM-DD or YYYY-MM-DD hh:mm') + expect(fn).toThrow('undefined is not a valid timestamp. It must be in the format of YYYY-MM-DD or YYYY-MM-DD hh:mm. Zero-padding is optional and seconds are ignored.') }) }) diff --git a/packages/vuetify/src/components/VCalendar/util/__tests__/timestamp.spec.ts b/packages/vuetify/src/components/VCalendar/util/__tests__/timestamp.spec.ts index dd1639d3b5f..2ec6aae91d9 100644 --- a/packages/vuetify/src/components/VCalendar/util/__tests__/timestamp.spec.ts +++ b/packages/vuetify/src/components/VCalendar/util/__tests__/timestamp.spec.ts @@ -170,12 +170,12 @@ describe('VCalendar/util/timestamp.ts', () => { // eslint-disable-line max-state }) it('should parse timestamp and update relative flags', () => { - expect(parseTimestamp('2019-01-03', parseTimestamp('2019-02-08'))).toMatchObject({ + expect(parseTimestamp('2019-01-03', true, parseTimestamp('2019-02-08'))).toMatchObject({ past: true, present: false, future: false, }) - expect(parseTimestamp('2019-01-03 07:00', parseTimestamp('2019-01-03 07:00'))).toMatchObject({ + expect(parseTimestamp('2019-01-03 07:00', true, parseTimestamp('2019-01-03 07:00'))).toMatchObject({ past: false, present: true, future: false, diff --git a/packages/vuetify/src/components/VCalendar/util/events.ts b/packages/vuetify/src/components/VCalendar/util/events.ts index c9255085ea7..bc1ace9a210 100644 --- a/packages/vuetify/src/components/VCalendar/util/events.ts +++ b/packages/vuetify/src/components/VCalendar/util/events.ts @@ -3,40 +3,29 @@ import { getDayIdentifier, getTimestampIdentifier, } from './timestamp' -import { CalendarTimestamp, CalendarEvent } from 'types' +import { CalendarTimestamp, CalendarEvent, CalendarEventParsed } from 'types' -export interface VEventParsed { - input: CalendarEvent - start: CalendarTimestamp - startIdentifier: number - startTimestampIdentifier: number - end: CalendarTimestamp - endIdentifier: number - endTimestampIdentifier: number - allDay: boolean - index: number -} - -export function parseEvent (input: CalendarEvent, index: number, startProperty: string, endProperty: string): VEventParsed { - if (!(startProperty in input)) { - throw new Error('The ' + startProperty + ' property is required on all events to be a valid timestamp in the format YYYY-MM-DD or YYYY-MM-DD hh:mm') - } - - const start: CalendarTimestamp = parseTimestamp(input[startProperty]) as CalendarTimestamp - const end: CalendarTimestamp = (input[endProperty] ? parseTimestamp(input[endProperty]) : start) as CalendarTimestamp +export function parseEvent (input: CalendarEvent, index: number, startProperty: string, endProperty: string): CalendarEventParsed { + const start: CalendarTimestamp = parseTimestamp(input[startProperty], true) + const end: CalendarTimestamp = (input[endProperty] ? parseTimestamp(input[endProperty], true) : start) const startIdentifier: number = getDayIdentifier(start) const startTimestampIdentifier: number = getTimestampIdentifier(start) const endIdentifier: number = getDayIdentifier(end) - const endTimestampIdentifier: number = getTimestampIdentifier(end) + const endOffset: number = start.hasTime ? 0 : 2359 + const endTimestampIdentifier: number = getTimestampIdentifier(end) + endOffset const allDay: boolean = !start.hasTime return { input, start, startIdentifier, startTimestampIdentifier, end, endIdentifier, endTimestampIdentifier, allDay, index } } -export function isEventOn (event: VEventParsed, dayIdentifier: number): boolean { +export function isEventOn (event: CalendarEventParsed, dayIdentifier: number): boolean { return dayIdentifier >= event.startIdentifier && dayIdentifier <= event.endIdentifier } -export function isEventOverlapping (event: VEventParsed, startIdentifier: number, endIdentifier: number): boolean { +export function isEventStart (event: CalendarEventParsed, day: CalendarTimestamp, dayIdentifier: number, firstWeekday: number): boolean { + return dayIdentifier === event.startIdentifier || (firstWeekday === day.weekday && isEventOn(event, dayIdentifier)) +} + +export function isEventOverlapping (event: CalendarEventParsed, startIdentifier: number, endIdentifier: number): boolean { return startIdentifier <= event.endIdentifier && endIdentifier >= event.startIdentifier } diff --git a/packages/vuetify/src/components/VCalendar/util/props.ts b/packages/vuetify/src/components/VCalendar/util/props.ts index 2174c9e6973..baa606f72fa 100644 --- a/packages/vuetify/src/components/VCalendar/util/props.ts +++ b/packages/vuetify/src/components/VCalendar/util/props.ts @@ -1,7 +1,9 @@ -import { validateTimestamp, parseDate } from './timestamp' +import { validateTimestamp, parseDate, DAYS_IN_WEEK } from './timestamp' import { PropType } from 'vue' -import { CalendarEvent, CalendarFormatter, CalendarTimestamp } from 'types' +import { CalendarEvent, CalendarFormatter, CalendarTimestamp, CalendarEventOverlapMode } from 'types' +import { CalendarEventOverlapModes } from '../modes' +import { PropValidator } from 'vue/types/options' export default { base: { @@ -15,9 +17,10 @@ export default { validate: validateTimestamp, }, weekdays: { - type: Array as PropType<number[]>, + type: [Array, String], default: () => [0, 1, 2, 3, 4, 5, 6], - }, + validate: validateWeekdays, + } as PropValidator<number[] | string>, hideHeader: { type: Boolean, default: false, @@ -46,12 +49,12 @@ export default { }, intervalHeight: { type: [Number, String], - default: 40, + default: 48, validate: validateNumber, }, intervalWidth: { type: [Number, String], - default: 45, + default: 60, validate: validateNumber, }, intervalMinutes: { @@ -112,9 +115,9 @@ export default { }, events: { events: { - type: Array as PropType<CalendarEvent[]>, + type: Array, default: () => [], - }, + } as PropValidator<CalendarEvent[]>, eventStart: { type: String, default: 'start', @@ -129,7 +132,7 @@ export default { }, eventColor: { type: [String, Function], - default: 'secondary', + default: 'primary', }, eventTextColor: { type: [String, Function], @@ -140,9 +143,14 @@ export default { default: 'name', }, eventOverlapThreshold: { - type: Number, + type: [String, Number], default: 60, }, + eventOverlapMode: { + type: [String, Function], + default: 'stack', + validate: (mode: any) => mode in CalendarEventOverlapModes || typeof mode === 'function', + } as PropValidator<'stack' | 'column' | CalendarEventOverlapMode>, eventMore: { type: Boolean, default: true, @@ -165,3 +173,49 @@ export default { export function validateNumber (input: any): boolean { return isFinite(parseInt(input)) } + +export function validateWeekdays (input: string | (number | string)[]): boolean { + if (typeof input === 'string') { + input = input.split(',') + } + + if (Array.isArray(input)) { + const ints = input.map(x => parseInt(x)) + + if (ints.length > DAYS_IN_WEEK || ints.length === 0) { + return false + } + + const visited: Record<number, boolean> = {} + let wrapped = false + + for (let i = 0; i < ints.length; i++) { + const x = ints[i] + + if (!isFinite(x) || x < 0 || x >= DAYS_IN_WEEK) { + return false + } + + if (i > 0) { + const d = x - ints[i - 1] + if (d < 0) { + if (wrapped) { + return false + } + wrapped = true + } else if (d === 0) { + return false + } + } + + if (visited[x]) { + return false + } + visited[x] = true + } + + return true + } + + return false +} diff --git a/packages/vuetify/src/components/VCalendar/util/timestamp.ts b/packages/vuetify/src/components/VCalendar/util/timestamp.ts index b7471dc9560..eeafbe2219c 100644 --- a/packages/vuetify/src/components/VCalendar/util/timestamp.ts +++ b/packages/vuetify/src/components/VCalendar/util/timestamp.ts @@ -85,11 +85,19 @@ export function validateTimestamp (input: any): boolean { return !!PARSE_REGEX.exec(input) } -export function parseTimestamp (input: string, now?: CalendarTimestamp): CalendarTimestamp | null { +export function parseTimestamp (input: string): CalendarTimestamp | null +export function parseTimestamp (input: string, required: false, now?: CalendarTimestamp): CalendarTimestamp | null +export function parseTimestamp (input: string, required: true, now?: CalendarTimestamp): CalendarTimestamp +export function parseTimestamp (input: string, required = false, now?: CalendarTimestamp): CalendarTimestamp | null { // YYYY-MM-DD hh:mm:ss const parts = PARSE_REGEX.exec(input) - if (!parts) return null + if (!parts) { + if (required) { + throw new Error(`${input} is not a valid timestamp. It must be in the format of YYYY-MM-DD or YYYY-MM-DD hh:mm. Zero-padding is optional and seconds are ignored.`) + } + return null + } const timestamp: CalendarTimestamp = { date: input, @@ -135,11 +143,11 @@ export function parseDate (date: Date): CalendarTimestamp { }) } -export function getDayIdentifier (timestamp: CalendarTimestamp): number { +export function getDayIdentifier (timestamp: { year: number, month: number, day: number }): number { return timestamp.year * 10000 + timestamp.month * 100 + timestamp.day } -export function getTimeIdentifier (timestamp: CalendarTimestamp): number { +export function getTimeIdentifier (timestamp: { hour: number, minute: number }): number { return timestamp.hour * 100 + timestamp.minute } @@ -296,6 +304,16 @@ export function relativeDays ( return timestamp } +export function diffMinutes (min: CalendarTimestamp, max: CalendarTimestamp) { + const Y = (max.year - min.year) * 525600 + const M = (max.month - min.month) * 43800 + const D = (max.day - min.day) * 1440 + const h = (max.hour - min.hour) * 60 + const m = (max.minute - min.minute) + + return Y + M + D + h + m +} + export function findWeekday (timestamp: CalendarTimestamp, weekday: number, mover: CalendarTimestampOperation = nextDay, maxDays = 6): CalendarTimestamp { while (timestamp.weekday !== weekday && --maxDays >= 0) mover(timestamp) diff --git a/packages/vuetify/src/util/helpers.ts b/packages/vuetify/src/util/helpers.ts index afca6aa7133..ceafe6eb555 100644 --- a/packages/vuetify/src/util/helpers.ts +++ b/packages/vuetify/src/util/helpers.ts @@ -361,9 +361,9 @@ export function getPrefixedScopedSlots (prefix: string, scopedSlots: any) { }, {}) } -export function getSlot (vm: Vue, name = 'default', data?: object, optional = false) { +export function getSlot (vm: Vue, name = 'default', data?: object | (() => object), optional = false) { if (vm.$scopedSlots[name]) { - return vm.$scopedSlots[name]!(data) + return vm.$scopedSlots[name]!(data instanceof Function ? data() : data) } else if (vm.$slots[name] && (!data || optional)) { return vm.$slots[name] } diff --git a/packages/vuetify/types/index.d.ts b/packages/vuetify/types/index.d.ts index f710ce52c21..64d1b65824e 100644 --- a/packages/vuetify/types/index.d.ts +++ b/packages/vuetify/types/index.d.ts @@ -192,6 +192,44 @@ export interface CalendarEvent { [prop: string]: any } +export interface CalendarEventParsed { + input: CalendarEvent + start: CalendarTimestamp + startIdentifier: number + startTimestampIdentifier: number + end: CalendarTimestamp + endIdentifier: number + endTimestampIdentifier: number + allDay: boolean + index: number +} + +export interface CalendarEventVisual { + event: CalendarEventParsed + columnCount: number + column: number + left: number + width: number +} + +export interface CalendarDaySlotScope extends CalendarTimestamp { + outside: boolean + index: number + week: CalendarTimestamp[] +} + +export type CalendarTimeToY = (time: CalendarTimestamp | number | string) => number + +export interface CalendarDayBodySlotScope extends CalendarDaySlotScope { + timeToY: CalendarTimeToY +} + +export type CalendarEventOverlapMode = (events: CalendarEventParsed[], firstWeekday: number, overlapThreshold: number) => (day: CalendarDaySlotScope, dayEvents: CalendarEventParsed[], timed: boolean) => CalendarEventVisual[] + +export type CalendarEventColorFunction = (event: CalendarEvent) => string + +export type CalendarEventNameFunction = (event: CalendarEventParsed, timedEvent: boolean) => string + export type DataTableFilterFunction = (value: any, search: string | null, item: any) => boolean export interface DataTableHeader<T extends any = any> {
39fc0cdeb9e6e2b4002fb6fd0061608e6ceace23
2019-07-13 19:09:50
Jacek Karczmarczyk
docs: fix dark mode in dark/youtube layouts
false
fix dark mode in dark/youtube layouts
docs
diff --git a/packages/docs/src/examples/layouts/dark.vue b/packages/docs/src/examples/layouts/dark.vue index 71683a12bfd..16a9d80a320 100644 --- a/packages/docs/src/examples/layouts/dark.vue +++ b/packages/docs/src/examples/layouts/dark.vue @@ -1,5 +1,5 @@ <template> - <v-app id="inspire" dark> + <v-app id="inspire"> <v-navigation-drawer v-model="drawer" clipped @@ -67,5 +67,8 @@ props: { source: String, }, + created () { + this.$vuetify.dark = true + }, } </script> diff --git a/packages/docs/src/examples/layouts/google-youtube.vue b/packages/docs/src/examples/layouts/google-youtube.vue index 73265931c12..b3ed424b9ea 100644 --- a/packages/docs/src/examples/layouts/google-youtube.vue +++ b/packages/docs/src/examples/layouts/google-youtube.vue @@ -1,8 +1,5 @@ <template> - <v-app - id="inspire" - dark - > + <v-app id="inspire"> <v-navigation-drawer v-model="drawer" fixed @@ -116,5 +113,8 @@ props: { source: String, }, + created () { + this.$vuetify.dark = true + }, } </script>
d80c7f28b07ec2a475e0b8f94699d0213343096b
2018-11-22 20:06:46
John Leider
docs: update snackbar for store sale
false
update snackbar for store sale
docs
diff --git a/packages/vuetifyjs.com/src/App.vue b/packages/vuetifyjs.com/src/App.vue index 037a7cde159..c7c7b886f07 100755 --- a/packages/vuetifyjs.com/src/App.vue +++ b/packages/vuetifyjs.com/src/App.vue @@ -45,12 +45,12 @@ this.getReleases() this.snackbar({ - color: 'default', + color: 'store', close: true, - id: 'october-2018-22572142', - text: 'Go to video', - msg: 'October framework update', - href: 'https://www.patreon.com/posts/october-2018-22572142', + id: 'thanksgiving-sale', + text: 'Shop now', + msg: 'Holiday Store Sale', + to: '/store/', timeout: 0 }) }, diff --git a/packages/vuetifyjs.com/src/components/core/Snackbar.vue b/packages/vuetifyjs.com/src/components/core/Snackbar.vue index f3c74495b1a..68bed0c1268 100644 --- a/packages/vuetifyjs.com/src/components/core/Snackbar.vue +++ b/packages/vuetifyjs.com/src/components/core/Snackbar.vue @@ -25,11 +25,12 @@ /> <v-spacer /> <v-btn - :color="!computedIcon ? 'primary lighten-3' : null" + :color="computedColor" :ripple="false" v-bind="bind" + :flat="snackbar.color !== 'store'" dark - flat + depressed @click="onClick" > {{ snackbar.text }} @@ -71,8 +72,16 @@ return {} }, + computedColor () { + if (this.snackbar.color !== 'store') { + return !this.computedIcon ? 'primary lighten-3' : null + } + + return 'green' + }, computedIcon () { switch (this.snackbar.color) { + case 'store': return 'mdi-cart' case 'success': return 'check' case 'info': return 'info' case 'warning': return 'warning'
0a0bd5e6fb8c91ce7c888229dbf478ec892b65c6
2021-04-14 19:49:34
Kael
fix(VImg): set srcset before src
false
set srcset before src
fix
diff --git a/packages/vuetify/src/components/VImg/VImg.ts b/packages/vuetify/src/components/VImg/VImg.ts index c8bcb42cb3c..37d28e3befa 100644 --- a/packages/vuetify/src/components/VImg/VImg.ts +++ b/packages/vuetify/src/components/VImg/VImg.ts @@ -217,9 +217,9 @@ export default mixins( image.onerror = this.onError this.hasError = false - image.src = this.normalisedSrc.src this.sizes && (image.sizes = this.sizes) this.normalisedSrc.srcset && (image.srcset = this.normalisedSrc.srcset) + image.src = this.normalisedSrc.src this.aspectRatio || this.pollForSize(image) this.getSrc()
7e9dab28955215890e5b9182f27e13a1cd618dac
2018-11-27 21:57:22
John Leider
docs: remove cyber monday snackbar
false
remove cyber monday snackbar
docs
diff --git a/packages/vuetifyjs.com/src/App.vue b/packages/vuetifyjs.com/src/App.vue index d8f1130ddfa..8ad458644aa 100755 --- a/packages/vuetifyjs.com/src/App.vue +++ b/packages/vuetifyjs.com/src/App.vue @@ -44,15 +44,15 @@ mounted () { this.getReleases() - this.snackbar({ - color: 'store', - close: true, - id: 'cyber-monday-sale', - text: 'Shop now', - msg: 'Happy Cyber Monday', - to: '/store/', - timeout: 0 - }) + // this.snackbar({ + // color: 'store', + // close: true, + // id: 'cyber-monday-sale', + // text: 'Shop now', + // msg: 'Happy Cyber Monday', + // to: '/store/', + // timeout: 0 + // }) }, methods: {
78f6783fbe1408c6c161d12dde9b2b89bdf2ac94
2025-03-04 22:08:29
Kael
docs(common-concepts): add new section (#16763)
false
add new section (#16763)
docs
diff --git a/packages/docs/src/data/nav.json b/packages/docs/src/data/nav.json index d0f83422675..7fbac0bbfbb 100644 --- a/packages/docs/src/data/nav.json +++ b/packages/docs/src/data/nav.json @@ -76,6 +76,18 @@ "text-and-typography" ] }, + { + "title": "concepts", + "inactiveIcon": "mdi-puzzle-outline", + "activeIcon": "mdi-puzzle", + "items": [ + "density-and-sizing", + "items", + "routing", + "v-model", + "variants" + ] + }, { "title": "components", "inactiveIcon": "mdi-view-dashboard-outline", diff --git a/packages/docs/src/examples/concepts/density-and-size.vue b/packages/docs/src/examples/concepts/density-and-size.vue new file mode 100644 index 00000000000..452d37d07b3 --- /dev/null +++ b/packages/docs/src/examples/concepts/density-and-size.vue @@ -0,0 +1,137 @@ +<template> + <v-container class="pa-4"> + <v-row> + <v-col cols="12" md="6"> + <v-slider + v-model="size" + class="pt-6" + label="Size" + max="4" + min="0" + step="1" + thumb-label="always" + hide-details + > + <template v-slot:thumb-label="{ modelValue }"> + <div class="text-no-wrap"> + {{ sizes[modelValue] }} + </div> + </template> + </v-slider> + </v-col> + + <v-col cols="12" md="6"> + <v-slider + v-model="density" + class="pt-6" + label="Density" + max="2" + min="0" + step="1" + thumb-label="always" + hide-details + > + <template v-slot:thumb-label="{ modelValue }"> + <div class="text-no-wrap"> + {{ densities[modelValue] }} + </div> + </template> + </v-slider> + </v-col> + + <v-divider class="flex-grow-1 my-2 mx-n1"></v-divider> + + <v-col cols="12"> + <v-list-subheader>Buttons</v-list-subheader> + + <v-btn + :density="densities[density]" + :size="sizes[size]" + class="me-2 mb-2" + prepend-icon="$vuetify" + text="Default Button" + ></v-btn> + + <v-btn + :density="densities[density]" + :size="sizes[size]" + append-icon="mdi-account-outline" + class="me-2 mb-2" + text="User Profile" + variant="tonal" + ></v-btn> + + <v-btn + :density="densities[density]" + :size="sizes[size]" + class="me-2 mb-2" + icon="$vuetify" + ></v-btn> + </v-col> + + <v-col cols="12"> + <v-list-subheader>Chips</v-list-subheader> + + <v-chip + :density="densities[density]" + :size="sizes[size]" + class="me-2 mb-2" + + text="Complete" + ></v-chip> + + <v-chip + :density="densities[density]" + :size="sizes[size]" + class="me-2 mb-2" + text="Reset" + variant="outlined" + ></v-chip> + + <v-chip + :density="densities[density]" + :size="sizes[size]" + class="me-2 mb-2" + text="Disabled" + disabled + ></v-chip> + </v-col> + + <v-col cols="12"> + <v-list-subheader>Avatars</v-list-subheader> + + <v-avatar + :density="densities[density]" + :size="sizes[size]" + color="surface-variant" + image="https://cdn.vuetifyjs.com/docs/images/avatars/grass.png" + ></v-avatar> + + <v-avatar + :density="densities[density]" + :size="sizes[size]" + class="ms-2" + image="https://cdn.vuetifyjs.com/docs/images/avatars/gold.png" + ></v-avatar> + + <v-avatar + :density="densities[density]" + :size="sizes[size]" + class="ms-2" + color="surface-variant" + image="https://cdn.vuetifyjs.com/docs/images/avatars/planet.png" + ></v-avatar> + </v-col> + </v-row> + </v-container> +</template> + +<script setup> + import { shallowRef } from 'vue' + + const size = shallowRef(2) + const density = shallowRef(2) + + const densities = ['compact', 'comfortable', 'default'] + const sizes = ['x-small', 'small', 'default', 'large', 'x-large'] +</script> diff --git a/packages/docs/src/examples/concepts/density.vue b/packages/docs/src/examples/concepts/density.vue new file mode 100644 index 00000000000..a8983c7b816 --- /dev/null +++ b/packages/docs/src/examples/concepts/density.vue @@ -0,0 +1,130 @@ +<template> + <v-container class="pa-2"> + <v-row> + <v-col cols="12"> + <v-label class="d-block mb-4">Density Scale</v-label> + + <v-btn-toggle + v-model="density" + class="overflow-auto" + color="primary" + density="compact" + variant="outlined" + divided + > + <v-btn text="Default" value="default"></v-btn> + + <v-btn text="Comfortable" value="comfortable"></v-btn> + + <v-btn text="Compact" value="compact"></v-btn> + </v-btn-toggle> + </v-col> + + <v-divider class="flex-grow-1 mt-1 mx-n1"></v-divider> + + <v-col cols="12"> + <v-list-subheader>Buttons</v-list-subheader> + + <v-btn + :density="density" + class="me-2 mb-2" + text="Submit" + ></v-btn> + + <v-btn + :density="density" + class="me-2 mb-2" + text="Load More" + variant="text" + ></v-btn> + + <v-btn + :density="density" + class="me-2 mb-2" + text="Cancel" + variant="outlined" + ></v-btn> + </v-col> + + <v-col cols="12"> + <v-list-subheader>Chips</v-list-subheader> + + <v-chip + :density="density" + class="me-2 mb-2" + text="In Progress" + ></v-chip> + + <v-chip + :density="density" + class="me-2 mb-2" + text="High Priority" + ></v-chip> + + <v-chip + :density="density" + class="me-2 mb-2" + text="Assigned" + ></v-chip> + </v-col> + + <v-col cols="12"> + <v-list-subheader>Toolbars</v-list-subheader> + + <v-toolbar + :density="density" + class="mb-2" + elevation="2" + title="Daily Reports" + ></v-toolbar> + + <v-toolbar + :density="density" + class="mb-2" + title="User Dashboard" + ></v-toolbar> + + <v-toolbar + :density="density" + color="transparent" + title="Project Settings" + border + ></v-toolbar> + </v-col> + + <v-col cols="12"> + <v-list-subheader>Text Fields</v-list-subheader> + + <v-text-field + :density="density" + label="Search Query" + model-value="Data tables" + prepend-inner-icon="mdi-magnify" + variant="solo" + ></v-text-field> + + <v-text-field + :density="density" + label="Email Address" + model-value="[email protected]" + prepend-inner-icon="mdi-email-outline" + ></v-text-field> + + <v-text-field + :density="density" + label="Username" + model-value="John Leider" + prepend-inner-icon="mdi-account-outline" + variant="outlined" + hide-details + ></v-text-field> + </v-col> + </v-row> + </v-container> +</template> + +<script setup> + import { shallowRef } from 'vue' + + const density = shallowRef('default') +</script> diff --git a/packages/docs/src/examples/concepts/size.vue b/packages/docs/src/examples/concepts/size.vue new file mode 100644 index 00000000000..c9bdd7cd7b4 --- /dev/null +++ b/packages/docs/src/examples/concepts/size.vue @@ -0,0 +1,130 @@ +<template> + <v-container class="pa-2"> + <v-row> + <v-col cols="12"> + <v-label class="d-block mb-4">Size Scale</v-label> + + <v-btn-toggle + v-model="size" + class="overflow-auto" + color="primary" + density="compact" + direction="vertical" + variant="outlined" + divided + > + <v-btn text="X-small" value="x-small"></v-btn> + + <v-btn text="Small" value="small"></v-btn> + + <v-btn text="Default" value="default"></v-btn> + + <v-btn text="Large" value="large"></v-btn> + + <v-btn text="x-large" value="x-large"></v-btn> + </v-btn-toggle> + </v-col> + + <v-divider class="flex-grow-1 my-2 mx-n1"></v-divider> + + <v-col cols="12"> + <v-list-subheader>Buttons</v-list-subheader> + + <v-btn + :size="size" + class="me-2 mb-2" + text="Export" + ></v-btn> + + <v-btn + :size="size" + class="me-2 mb-2" + text="Edit" + variant="text" + ></v-btn> + + <v-btn + :size="size" + class="me-2 mb-2" + text="Preview" + variant="outlined" + ></v-btn> + </v-col> + + <v-col cols="12"> + <v-list-subheader>Chips</v-list-subheader> + + <v-chip + :size="size" + class="me-2 mb-2" + text="Completed" + ></v-chip> + + <v-chip + :size="size" + class="me-2 mb-2" + text="Archived" + ></v-chip> + + <v-chip + :size="size" + class="me-2 mb-2" + text="New" + ></v-chip> + </v-col> + + <v-col cols="12"> + <v-list-subheader>Ratings</v-list-subheader> + + <v-rating + :size="size" + label="Customer Satisfaction" + length="3" + ></v-rating> + + <br> + + <v-rating + :size="size" + label="Ease of Use" + length="4" + ></v-rating> + + <br> + + <v-rating + :size="size" + label="Quality" + ></v-rating> + </v-col> + + <v-col cols="12"> + <v-list-subheader>Avatars</v-list-subheader> + + <v-avatar + :size="size" + class="mb-2 me-2" + image="https://cdn.vuetifyjs.com/docs/images/avatars/dark.png" + ></v-avatar> + + <v-avatar + :size="size" + class="mb-2 me-2" + image="https://cdn.vuetifyjs.com/docs/images/avatars/blackhole.png" + ></v-avatar> + + <v-avatar + :size="size" + class="mb-2 me-2" + image="https://cdn.vuetifyjs.com/docs/images/avatars/meteor.png" + ></v-avatar> + </v-col> + </v-row> + </v-container> +</template> + +<script setup> + import { shallowRef } from 'vue' + + const size = shallowRef('default') +</script> diff --git a/packages/docs/src/i18n/messages/en.json b/packages/docs/src/i18n/messages/en.json index 2f567580423..6303486c2ea 100644 --- a/packages/docs/src/i18n/messages/en.json +++ b/packages/docs/src/i18n/messages/en.json @@ -68,6 +68,7 @@ }, "component": "Component", "components": "Components", + "concepts": "Common concepts", "contents": "Contents", "containment": "Containment", "contribute": { diff --git a/packages/docs/src/pages/en/concepts/density-and-sizing.md b/packages/docs/src/pages/en/concepts/density-and-sizing.md new file mode 100644 index 00000000000..2ee68674983 --- /dev/null +++ b/packages/docs/src/pages/en/concepts/density-and-sizing.md @@ -0,0 +1,69 @@ +--- +meta: + nav: Density and sizing + title: Density and sizing + description: Density and sizing + keywords: density, sizing +related: + - /components/buttons/ + - /components/chips/ + - /components/lists/ +--- + +# Density and sizing + +The **size** and **density** props are used to reduce the overall space a component takes up, and sometimes font-size, height, padding, and margins. + +<PageFeatures /> + +<PromotedEntry /> + +## Guide + +The **size** and **density** props are used to reduce the overall space a component takes up, and sometimes font-size, height, padding, and margins. + +### Size + +This property reduces or increases the vertical and horizontal width a component takes up, as well as font-size. + +- x-small +- small +- default +- large +- x-large + +**Example** + +The following example shows the size for various components: + +<ExamplesExample file="concepts/size" preview /> + +### Density + +Reduces vertical padding and sometimes font size. Square/round components like icons will also reduce horizontal padding. + +- default +- comfortable +- compact + +**Example** + +The following example shows the density for various components: + +<ExamplesExample file="concepts/density" preview /> + +::: warning + +Not all components have a default transition that animates height when changing density. + +::: + +### Combined + +Combine the **size** and **density** props to easily change the overall size of a component. + +**Example** + +The following example shows the size and density for various components: + +<ExamplesExample file="concepts/density-and-size" preview /> diff --git a/packages/docs/src/pages/en/concepts/items.md b/packages/docs/src/pages/en/concepts/items.md new file mode 100644 index 00000000000..b1f40840790 --- /dev/null +++ b/packages/docs/src/pages/en/concepts/items.md @@ -0,0 +1,67 @@ +--- +meta: + nav: Items + title: Items + description: Items + keywords: items +related: + - /components/lists/ + - /components/selects/ + - /components/data-tables/ +--- + +# Items + +Items are the data that is displayed in a component. They can be passed as an array of objects or strings. + +<PageFeatures /> + +<PromotedEntry /> + +## Guide + +Item props allow you to map the properties of each item to the component's props. This allows you to customize the display of each item without having to manually extract the data. + +### Accessor props + +Accessor props are they keys to look for in each item object. They can be set to a string, array, or function. + +- **item-title:** The title of each item. +- **item-value:** The value of each item. +- **item-children:** The children of each item. +- **item-props:** The props of each item. + +### String + +Specify the property to use for the title when you have an array of user objects: + +```html +<v-component + item-title="name" + item-title="user.name" +/> +``` + +This makes it easy to display nested properties without manually extracting them. + +### Array + +Lookup on each item object. Like dot notation (each member is a key in the current object), but can be used if the key contains a dot. + +```html +<v-component + :item-title="['name']" + :item-title="['user', 'name']" +/> +``` + +### Function + +A function that returns the value to use for the title. This is useful if you need to format the value or access a property that is not a direct child of the item. + +```html +<v-component + :item-title="item => item.name" + :item-title="item => item.user.name" +/> +``` diff --git a/packages/docs/src/pages/en/concepts/routing.md b/packages/docs/src/pages/en/concepts/routing.md new file mode 100644 index 00000000000..7920a7aba4a --- /dev/null +++ b/packages/docs/src/pages/en/concepts/routing.md @@ -0,0 +1,67 @@ +--- +meta: + nav: Routing + title: Routing + description: Routing + keywords: routing +related: + - /components/buttons/ + - /components/lists/ + - /components/overlays/ +--- + +# Routing + +Routing is the process of navigating between different views or pages in an application. + +<PageFeatures /> + +<PromotedEntry /> + +## Guide + +[Vue Router](https://router.vuejs.org/) is the official router for Vue. It allows you to define routes and map them to components, enabling navigation between different views in your application. + +The following components have built in support for routing: + +- [v-breadcrumbs](/components/breadcrumbs/) +- [v-btn](/api/v-btn/) +- [v-card](/api/v-card/) +- [v-chip](/api/v-chip/) +- [v-list](/api/v-list-item/) + +These components can act like a [router-link](https://router.vuejs.org/guide/advanced/extending-router-link.html) and have access to props such as **to** and **exact**: + +```html +<v-btn to="/home" text="Home"></v-btn> +``` + +## Router view transitions + +Vue Router lets you add transitions between different views. The **router-view** component is used to render the current route's component, and you can use the **transition** component to add transitions between different views. + +```html { resource="src/App.vue" } +<template> + <v-app> + <v-app-bar app> + <v-toolbar-title>My App</v-toolbar-title> + </v-app-bar> + + <v-main> + <router-view v-slot="{ Component }"> + <v-fade-transition hide-on-leave> + <component :is="Component" /> + </v-fade-transition> + </router-view> + </v-main> + </v-app> +</template> +``` + +Visit the [Transitions](/styles/transitions) page for more information. + +::: tip + +Overlay components can be closed with the browser back button, but this also triggers when calling `router.back()`. Use `:close-on-back="false"` to disable this behavior. + +::: diff --git a/packages/docs/src/pages/en/concepts/v-model.md b/packages/docs/src/pages/en/concepts/v-model.md new file mode 100644 index 00000000000..0bb500a32bb --- /dev/null +++ b/packages/docs/src/pages/en/concepts/v-model.md @@ -0,0 +1,104 @@ +--- +meta: + nav: v-model + title: v-model + description: v-model + keywords: v-model +related: + - /components/lists + - /components/text-fields +--- + +# v-model + +v-model is a built in Vue directive that allows you to create two-way data bindings. + +<PageFeatures /> + +<PromotedEntry /> + +## Guide + +v-model is a directive that allows you to create two-way data bindings between a component and its parent. It is commonly used with form elements, such as input fields, checkboxes, and select boxes, to bind the value of the element to a data property in the parent component. + +### Binding models + +- **v-model:** is shorthand for **model-value** and **@update:model-value** +- **v-model:prop:** is shorthand for binding specific properties as a model + +If both prop and event are defined, the model is "controlled" and the prop is used as the value. If only the prop is defined, the model is "uncontrolled" and the prop is used as the initial value. + +```html +<template> + <v-text-field v-model="foo" /> +</template> + +<script setup> + import { shallowRef } from 'vue' + + const foo = shallowRef('foo') +</script> +``` + +Is the same as: + +```html +<template> + <v-text-field :model-value="foo" @update:model-value="onUpdateModel" /> +</template> + +<script setup> + import { shallowRef } from 'vue' + + const foo = shallowRef('foo') + + function onUpdateModel (value) { + foo.value = value + } +</script> +``` + +Controlled models must be handled externally, if the updated value is not passed back to the prop, the component will not update. This can be useful for conditionally ignoring updates or preventing certain values from being entered. + +A static value can be set by defining the prop with an initial value, and defining the event with a noop function. + +```html +<template> + <v-text-field model-value="Foobar" @update:model-value="onUpdateModel" /> +</template> + +<script setup> + function onUpdateModel (value) { + // noop + } +</script> +``` + +### Binding specific properties + +Some components such as [v-list](/components/lists/) and [v-text-field](/components/text-fields/) have specific properties that can be bound as a model. + +```html +<template> + <v-list + v-model:active="active" + v-model:opened="opened" + v-model:selected="selected" + /> + + <v-text-field + v-model="model" + v-model:focus="focus" + /> +</template> + +<script setup> + import { shallowRef } from 'vue' + + const active = shallowRef([]) + const opened = shallowRef([]) + const selected = shallowRef([1]) + const model = shallowRef('') + const focus = shallowRef(false) +</script> +``` diff --git a/packages/docs/src/pages/en/concepts/variants.md b/packages/docs/src/pages/en/concepts/variants.md new file mode 100644 index 00000000000..28e512fdd79 --- /dev/null +++ b/packages/docs/src/pages/en/concepts/variants.md @@ -0,0 +1,46 @@ +--- +meta: + nav: Variants + title: Variants + description: Understanding and utilizing the variant prop in Vuetify + keywords: variant, Vuetify +related: + - /components/buttons/ + - /components/lists/ + - /components/fields/ +--- + +# Variants + +Variants are a powerful feature that allows you to customize the appearance and behavior of components. + +<PageFeatures /> + +<PromotedEntry /> + +## Sheet components + +Sheet components in Vuetify offer different stylistic variants to make it easy to fit them into different design contexts. Below is a table summarizing the six available variants. + +| Variant | Description | +|------------|------------------------------------------------------------| +| `elevated` | Provides a subtle box-shadow for a depth effect. | +| `flat` | No shadow or depth, lies flat against the content. | +| `tonal` | Adjusts the tone of the component's background. | +| `outlined` | Adds a colored border around the component. | +| `text` | Removes the background color and elevation. | +| `plain` | No styles, offering a clean slate for customization. | + +## Field components + +Field components in Vuetify offer a comprehensive set of stylistic variants to elevate your forms and input fields. Whether you're into Material Design or love to experiment, there's a variant for every design challenge. + +| Variant | Description | +| -------------- | ------------- | +| `underlined` | A Material Design 2 variant with a focus underline. | +| `outlined` | Adds a border that lifts the label when the field is focused. | +| `filled` | The input field features a filled background. | +| `solo` | Stands alone with subtle elevation for a distinct look. | +| `solo-inverted`| Similar to `solo` but inverts input color when focused. | +| `solo-filled` | Like `solo`, but with a filled background. | +| `plain` | Strips away most styles for an almost blank slate. | diff --git a/packages/docs/src/plugins/icons.ts b/packages/docs/src/plugins/icons.ts index 531221d59e9..001b70a38d8 100644 --- a/packages/docs/src/plugins/icons.ts +++ b/packages/docs/src/plugins/icons.ts @@ -315,6 +315,7 @@ export { mdiPost, mdiPound, mdiPower, + mdiPuzzle, mdiPuzzleOutline, mdiRadioboxBlank, mdiRadioboxMarked, diff --git a/templates/page.md b/templates/page.md new file mode 100644 index 00000000000..95be1c172ee --- /dev/null +++ b/templates/page.md @@ -0,0 +1,13 @@ +--- +nav: TITLE +meta: + title: TITLE + description: #### + keywords: ####, #### +related: + - #### + - #### + - #### +--- + +# TITLE
aa2ecd5a4a81fd2b786692f1b72c3320664e1001
2018-09-29 00:03:53
John Leider
refactor(group-components): cleanup typings and structure
false
cleanup typings and structure
refactor
diff --git a/src/components/VCarousel/VCarousel.ts b/src/components/VCarousel/VCarousel.ts index c214dbf010d..0224d2ae61b 100644 --- a/src/components/VCarousel/VCarousel.ts +++ b/src/components/VCarousel/VCarousel.ts @@ -2,13 +2,14 @@ import '../../stylus/components/_carousel.styl' // Extensions -import { BaseWindow } from '../VWindow/VWindow' +import VWindow from '../VWindow/VWindow' // Components import VBtn from '../VBtn' import VIcon from '../VIcon' // Mixins +// TODO: Move this into core components v2.0 import ButtonGroup from '../../mixins/button-group' // Utilities @@ -18,15 +19,9 @@ import { convertToUnit } from '../../util/helpers' import { VNode } from 'vue' import { VNodeDirective } from 'vue/types/vnode' -export default BaseWindow.extend({ +export default VWindow.extend({ name: 'v-carousel', - provide (): object { - return { - windowGroup: this - } - }, - props: { cycle: { type: Boolean, @@ -170,7 +165,7 @@ export default BaseWindow.extend({ }, children) }, init () { - BaseWindow.options.methods.init.call(this) + VWindow.options.methods.init.call(this) this.startTimeout() }, @@ -190,7 +185,7 @@ export default BaseWindow.extend({ if (this.changedByControls) { this.changedByControls = false - BaseWindow.options.methods.updateReverse.call(this, val, oldVal) + VWindow.options.methods.updateReverse.call(this, val, oldVal) } } }, diff --git a/src/components/VCarousel/VCarouselItem.ts b/src/components/VCarousel/VCarouselItem.ts index 2edee4b9ece..52c8e935d02 100644 --- a/src/components/VCarousel/VCarouselItem.ts +++ b/src/components/VCarousel/VCarouselItem.ts @@ -1,22 +1,11 @@ +// Extensions +import VWindowItem from '../VWindow/VWindowItem' + // Components import { VImg } from '../VImg' -import { BaseWindowItem } from '../VWindow/VWindowItem' - -// Mixins -import { factory as GroupableFactory } from '../../mixins/groupable' - -// Utilities -import { ExtractVue } from './../../util/mixins' -import mixins from '../../util/mixins' - -// Types -type options = ExtractVue<[typeof BaseWindowItem]> /* @vue/component */ -export default mixins<options>( - BaseWindowItem, - GroupableFactory('windowGroup', 'v-carousel-item', 'v-carousel') -).extend({ +export default VWindowItem.extend({ name: 'v-carousel-item', inheritAttrs: false, diff --git a/src/components/VItemGroup/VItem.ts b/src/components/VItemGroup/VItem.ts index 8b0525644bd..70e848dff26 100644 --- a/src/components/VItemGroup/VItem.ts +++ b/src/components/VItemGroup/VItem.ts @@ -1,5 +1,5 @@ // Mixins -import Groupable from '../../mixins/groupable' +import { factory as GroupableFactory } from '../../mixins/groupable' // Utilities import mixins from '../../util/mixins' @@ -8,8 +8,10 @@ import { consoleWarn } from '../../util/console' // Types import { VNode, VNodeChildrenArrayContents } from 'vue/types/vnode' -/* @vue/component */ -export default mixins(Groupable).extend({ +export default mixins( + GroupableFactory('itemGroup', 'v-item', 'v-item-group') + /* @vue/component */ +).extend({ name: 'v-item', props: { diff --git a/src/components/VItemGroup/VItemGroup.ts b/src/components/VItemGroup/VItemGroup.ts index d0c65f9db63..e8948e12cbb 100644 --- a/src/components/VItemGroup/VItemGroup.ts +++ b/src/components/VItemGroup/VItemGroup.ts @@ -19,7 +19,7 @@ export const BaseItemGroup = mixins( Proxyable, Themeable ).extend({ - name: 'v-item-group', + name: 'base-item-group', props: { activeClass: { @@ -217,6 +217,8 @@ export const BaseItemGroup = mixins( }) export default BaseItemGroup.extend({ + name: 'v-item-group', + provide (): object { return { itemGroup: this diff --git a/src/components/VWindow/VWindow.ts b/src/components/VWindow/VWindow.ts index 4a71ee0da8c..31526d8511d 100644 --- a/src/components/VWindow/VWindow.ts +++ b/src/components/VWindow/VWindow.ts @@ -11,9 +11,15 @@ import Touch from '../../directives/touch' import { VNode, VNodeDirective } from 'vue/types/vnode' /* @vue/component */ -export const BaseWindow = BaseItemGroup.extend({ +export default BaseItemGroup.extend({ name: 'v-window', + provide (): object { + return { + windowGroup: this + } + }, + directives: { Touch }, props: { @@ -84,7 +90,7 @@ export const BaseWindow = BaseItemGroup.extend({ BaseItemGroup.options.methods.init.call(this) // Ensure no entry animation - this.isBooted = true + this.$nextTick(() => (this.isBooted = true)) }, next () { this.isReverse = false @@ -124,11 +130,3 @@ export const BaseWindow = BaseItemGroup.extend({ return h('div', data, [this.genContainer()]) } }) - -export default BaseWindow.extend({ - provide (): object { - return { - windowGroup: this - } - } -}) diff --git a/src/components/VWindow/VWindowItem.ts b/src/components/VWindow/VWindowItem.ts index 9c7eb86d486..6a6d2096f49 100644 --- a/src/components/VWindow/VWindowItem.ts +++ b/src/components/VWindow/VWindowItem.ts @@ -1,5 +1,5 @@ // Components -import { BaseWindow } from './VWindow' +import VWindow from './VWindow' // Mixins import Bootable from '../../mixins/bootable' @@ -13,20 +13,22 @@ import { addOnceEventListener, convertToUnit } from '../../util/helpers' -import mixins, { ExtractVue } from '../../util/mixins' +import { ExtractVue } from './../../util/mixins' +import mixins from '../../util/mixins' // Types import Vue from 'vue' import { VNode, VNodeDirective } from 'vue/types' -type VBaseWindow = InstanceType<typeof BaseWindow> +type VBaseWindow = InstanceType<typeof VWindow> interface options extends Vue { windowGroup: VBaseWindow } -export const BaseWindowItem = mixins<options & ExtractVue<[typeof Bootable]>>( - Bootable +export default mixins<options & ExtractVue<[typeof Bootable]>>( + Bootable, + GroupableFactory('windowGroup', 'v-window-item', 'v-window') /* @vue/component */ ).extend({ name: 'v-window-item', @@ -127,7 +129,3 @@ export const BaseWindowItem = mixins<options & ExtractVue<[typeof Bootable]>>( }, [div]) } }) - -export default BaseWindowItem.extend({ - mixins: [GroupableFactory('windowGroup', 'v-window-item', 'v-window')] -}) diff --git a/test/unit/components/VCarousel/VCarouselItem.spec.js b/test/unit/components/VCarousel/VCarouselItem.spec.js index 66ee4c19c08..a97cf61ace7 100644 --- a/test/unit/components/VCarousel/VCarouselItem.spec.js +++ b/test/unit/components/VCarousel/VCarouselItem.spec.js @@ -2,7 +2,7 @@ import { test } from '@/test' import { VCarouselItem } from '@/components/VCarousel' const imageSrc = 'https://vuetifyjs.com/static/doc-images/cards/sunshine.jpg' -const warning = '[Vuetify] The v-carousel-item component must be used inside a v-carousel' +const warning = '[Vuetify] The v-window-item component must be used inside a v-window' test('VCarouselItem.js', ({ mount }) => { it('should throw warning when not used inside v-carousel', () => { diff --git a/test/unit/components/VCarousel/__snapshots__/VCarousel.spec.js.snap b/test/unit/components/VCarousel/__snapshots__/VCarousel.spec.js.snap index 4e91a9c14c3..a798977efbe 100644 --- a/test/unit/components/VCarousel/__snapshots__/VCarousel.spec.js.snap +++ b/test/unit/components/VCarousel/__snapshots__/VCarousel.spec.js.snap @@ -160,7 +160,7 @@ exports[`VCarousel.ts should render component with custom icon and match snapsho </div> </div> <div class="v-window__container"> - <div class="v-window-item v-window-x-transition-enter v-window-x-transition-enter-active" + <div class="v-window-item v-enter v-enter-active" style > <div class="v-responsive v-image v-carousel__item" @@ -408,7 +408,7 @@ exports[`VCarousel.ts should render component with selected active item 1`] = ` </div> </div> </div> - <div class="v-window-item v-window-x-transition-enter v-window-x-transition-enter-active" + <div class="v-window-item v-enter v-enter-active" style > <div class="v-responsive v-image v-carousel__item" @@ -467,7 +467,7 @@ exports[`VCarousel.ts should render component without delimiters 1`] = ` </button> </div> <div class="v-window__container"> - <div class="v-window-item v-window-x-transition-enter v-window-x-transition-enter-active" + <div class="v-window-item v-enter v-enter-active" style > <div class="v-responsive v-image v-carousel__item" diff --git a/test/unit/components/VItemGroup/VItem.spec.js b/test/unit/components/VItemGroup/VItem.spec.js index 2caed77e6fd..38fb9235e36 100644 --- a/test/unit/components/VItemGroup/VItem.spec.js +++ b/test/unit/components/VItemGroup/VItem.spec.js @@ -2,11 +2,14 @@ import Vue from 'vue' import { test } from '@/test' import VItem from '@/components/VItemGroup/VItem' +const itemWarning = '[Vuetify] The v-item component must be used inside a v-item-group' + test('VItem', ({ mount }) => { it('should warn if missing default scopedSlot', () => { mount(VItem) expect('v-item is missing a default scopedSlot').toHaveBeenTipped() + expect(itemWarning).toHaveBeenTipped() }) it('should warn if multiple elements', () => { @@ -23,6 +26,7 @@ test('VItem', ({ mount }) => { mount(Mock) expect('v-item should only contain a single element').toHaveBeenTipped() + expect(itemWarning).toHaveBeenTipped() }) it('should match snapshot activeClass', async () => { @@ -46,5 +50,6 @@ test('VItem', ({ mount }) => { await wrapper.vm.$nextTick() expect(wrapper.html()).toMatchSnapshot() + expect(itemWarning).toHaveBeenTipped() }) })
ad78ae7379d861b30150bc55bec31bf8e6cb53f2
2019-03-19 00:44:34
John Leider
refactor(VSheet): clean-up styles and inherited transitions
false
clean-up styles and inherited transitions
refactor
diff --git a/packages/vuetify/src/components/VSheet/VSheet.sass b/packages/vuetify/src/components/VSheet/VSheet.sass index f2b0b619a65..d282dfd40e3 100644 --- a/packages/vuetify/src/components/VSheet/VSheet.sass +++ b/packages/vuetify/src/components/VSheet/VSheet.sass @@ -13,7 +13,7 @@ display: block border-radius: $sheet-border-radius position: relative - transition: .3s box-shadow map-get($transition, 'fast-in-slow-out') + +elevationTransition() > *:first-child:not(.v-btn):not(.v-chip) border-top-left-radius: inherit diff --git a/packages/vuetify/src/components/VToolbar/VToolbar.sass b/packages/vuetify/src/components/VToolbar/VToolbar.sass index 263ed3b8c90..b294075ce57 100644 --- a/packages/vuetify/src/components/VToolbar/VToolbar.sass +++ b/packages/vuetify/src/components/VToolbar/VToolbar.sass @@ -3,7 +3,9 @@ // Block .v-toolbar - transition: $toolbar-transition + // Needs increased specificity + &.v-sheet + transition: $toolbar-transition +elevation(4) diff --git a/packages/vuetify/src/components/VToolbar/_variables.scss b/packages/vuetify/src/components/VToolbar/_variables.scss index 6c90f425771..567eeaa972f 100644 --- a/packages/vuetify/src/components/VToolbar/_variables.scss +++ b/packages/vuetify/src/components/VToolbar/_variables.scss @@ -4,5 +4,7 @@ $toolbar-content-padding-x: 16px !default; $toolbar-title-padding: 20px !default; $toolbar-transition: 0.2s map-get($transition, 'fast-out-slow-in') transform, 0.2s map-get($transition, 'fast-out-slow-in') background-color, + 0.2s map-get($transition, 'fast-out-slow-in') left, + 0.2s map-get($transition, 'fast-out-slow-in') right, 280ms map-get($transition, 'fast-out-slow-in') box-shadow, 0.25s map-get($transition, 'fast-out-slow-in') width !default; diff --git a/packages/vuetify/src/stylus/components/_cards.styl b/packages/vuetify/src/stylus/components/_cards.styl index 0e34746cb11..720f0b0d456 100644 --- a/packages/vuetify/src/stylus/components/_cards.styl +++ b/packages/vuetify/src/stylus/components/_cards.styl @@ -11,6 +11,8 @@ theme(v-card, "v-card") .v-card elevation(2) + // Use +elevationTransition() in 2.0 + box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1) text-decoration: none > *:first-child:not(.v-btn):not(.v-chip) diff --git a/packages/vuetify/src/stylus/components/_navigation-drawer.styl b/packages/vuetify/src/stylus/components/_navigation-drawer.styl index c06588bcf51..e3bbe1513f7 100644 --- a/packages/vuetify/src/stylus/components/_navigation-drawer.styl +++ b/packages/vuetify/src/stylus/components/_navigation-drawer.styl @@ -24,7 +24,6 @@ theme(v-navigation-drawer, "v-navigation-drawer") pointer-events: auto top: 0 will-change: transform - z-index: 3 -webkit-overflow-scrolling: touch &[data-booted="true"] @@ -50,9 +49,16 @@ theme(v-navigation-drawer, "v-navigation-drawer") right: auto left: 0 + &--absolute, + &--fixed + z-index: 6 + &--absolute position: absolute + &--clipped + z-index: 4 + &--fixed position: fixed @@ -62,25 +68,6 @@ theme(v-navigation-drawer, "v-navigation-drawer") &--mini-variant overflow: hidden - // .v-list-group__header__prepend-icon - // flex: 1 0 auto - // justify-content: center - // width: 100% - - // .v-list-item__action, - // .v-list-item__avatar - // justify-content: center - // min-width: 48px - - // .v-list-item__content, - // .v-list-item:after - // opacity: 0 - - // .v-subheader, - // .v-divider, - // .v-list--group - // display: none !important - &--temporary, &--is-mobile z-index: 6 @@ -90,24 +77,3 @@ theme(v-navigation-drawer, "v-navigation-drawer") .v-list background: inherit - - // > .v-list - // .v-list-item - // transition: none - // font-weight: $navigation-drawer-item-font-weight - - // &--active - // .v-list-item__title - // color: inherit - - // .v-list--group - // .v-list-item - // font-weight: $navigation-drawer-group-item-font-weight - - // &__header--active - // &:after - // background: transparent - - // > .v-list:not(.v-list--dense) - // .v-list-item - // font-size: $navigation-drawer-item-font-size
c64bbf24e33e927a07d85e97a089a494ec362b7c
2018-10-28 15:14:35
nekosaur
fix: updated toolbar page, added example
false
updated toolbar page, added example
fix
diff --git a/packages/vuetifyjs.com/examples/toolbars/appBarItems.vue b/packages/vuetifyjs.com/examples/toolbars/appBarItems.vue new file mode 100644 index 00000000000..f182b5198e6 --- /dev/null +++ b/packages/vuetifyjs.com/examples/toolbars/appBarItems.vue @@ -0,0 +1,10 @@ +<template> + <v-toolbar> + <v-spacer></v-spacer> + <v-toolbar-items> + <v-btn flat>Link One</v-btn> + <v-btn flat>Link Two</v-btn> + <v-btn flat>Link Three</v-btn> + </v-toolbar-items> + </v-toolbar> +</template> diff --git a/packages/vuetifyjs.com/examples/toolbars/default.vue b/packages/vuetifyjs.com/examples/toolbars/usage.vue similarity index 80% rename from packages/vuetifyjs.com/examples/toolbars/default.vue rename to packages/vuetifyjs.com/examples/toolbars/usage.vue index 1b05f51d9c5..1a764f9f5a9 100644 --- a/packages/vuetifyjs.com/examples/toolbars/default.vue +++ b/packages/vuetifyjs.com/examples/toolbars/usage.vue @@ -1,8 +1,8 @@ <template> <v-toolbar> + <v-toolbar-side-icon></v-toolbar-side-icon> <v-toolbar-title>Title</v-toolbar-title> <v-spacer></v-spacer> - <v-toolbar-side-icon class="hidden-md-and-up"></v-toolbar-side-icon> <v-toolbar-items class="hidden-sm-and-down"> <v-btn flat>Link One</v-btn> <v-btn flat>Link Two</v-btn> diff --git a/packages/vuetifyjs.com/lang/en/components/Toolbars.js b/packages/vuetifyjs.com/lang/en/components/Toolbars.js index 808076fbec4..2b350ef4a69 100644 --- a/packages/vuetifyjs.com/lang/en/components/Toolbars.js +++ b/packages/vuetifyjs.com/lang/en/components/Toolbars.js @@ -3,20 +3,21 @@ export default { headerText: 'The `v-toolbar` component is pivotal to any gui, as it generally is the primary source of site navigation. The toolbar component works great in conjunction with a navigation drawer for hiding links and presenting an activator to open the sidebar on mobile.', components: [ 'v-toolbar', - 'v-toolbar-title', - 'v-toolbar-items', - 'v-toolbar-side-icon', 'v-system-bar' ], examples: [{ - default: { - header: 'Default', - desc: 'A toolbar is a flexible container that can be utilized in a number of ways. By default, the toolbar is 64px high on desktop, 56px high on mobile portrait and 48px high on mobile landscape. These can be overwritten using the `dense` and `prominent` props.' + usage: { + header: 'Usage', + desc: 'A toolbar is a flexible container that can be utilized in a number of ways. By default, the toolbar is 64px high on desktop, 56px high on mobile portrait and 48px high on mobile landscape. There are a number of helper components available to use with the toolbar. These are `v-toolbar-side-icon`, `v-toolbar-title` and `v-toolbar-items`.' }, appBar: { header: 'App bar', desc: 'An App bar is the primary toolbar of your application. It can contain icons, menus and more.' }, + appBarItems: { + header: 'App bar with items', + desc: 'Utilizing the `v-toolbar-items` component you can use regular `v-btn` components to create app bar items. Don\'t forget to apply the `flat` prop to each button.' + }, appBarExtension: { header: 'App bar with extension', desc: 'An extension can be used that creates a much more prominent bar. If a title is placed within the extension, it will automatically be shifted to the right to match the normal location it would be at in the main bar.'
1e51ee62aa542e7522d4c9d93c5614b00eeb5dec
2019-03-21 02:13:54
John Leider
refactor(VList): extend `v-sheet`
false
extend `v-sheet`
refactor
diff --git a/packages/vuetify/src/components/VList/VList.sass b/packages/vuetify/src/components/VList/VList.sass index 975c98aec51..a4336430aaa 100644 --- a/packages/vuetify/src/components/VList/VList.sass +++ b/packages/vuetify/src/components/VList/VList.sass @@ -5,6 +5,17 @@ // Theme .v-list.theme--light +list-theme($material-light) + + &.primary, + &.secondary, + &.accent, + &.success, + &.error, + &.warning, + &.info + > .v-list-item + color: map-deep-get($material-dark, 'text', 'primary') + .v-list.theme--dark +list-theme($material-dark) diff --git a/packages/vuetify/src/components/VList/VList.ts b/packages/vuetify/src/components/VList/VList.ts index ddd7b8eafb8..e3ef6556515 100644 --- a/packages/vuetify/src/components/VList/VList.ts +++ b/packages/vuetify/src/components/VList/VList.ts @@ -2,19 +2,16 @@ import './VList.sass' import VListGroup from './VListGroup' -// Mixins -import Themeable from '../../mixins/themeable' +// Components +import VSheet from '../VSheet/VSheet' // Types -import mixins from '../../util/mixins' import { VNode } from 'vue' type VListGroupInstance = InstanceType<typeof VListGroup> -export default mixins( - Themeable - /* @vue/component */ -).extend({ +/* @vue/component */ +export default VSheet.extend({ name: 'v-list', provide (): object { @@ -32,6 +29,10 @@ export default mixins( shaped: Boolean, subheader: Boolean, threeLine: Boolean, + tile: { + type: Boolean, + default: true + }, twoLine: Boolean }, @@ -42,6 +43,7 @@ export default mixins( computed: { classes (): object { return { + ...VSheet.options.computed.classes.call(this), 'v-list--dense': this.dense, 'v-list--disabled': this.disabled, 'v-list--flat': this.flat, @@ -49,8 +51,7 @@ export default mixins( 'v-list--shaped': this.shaped, 'v-list--subheader': this.subheader, 'v-list--two-line': this.twoLine, - 'v-list--three-line': this.threeLine, - ...this.themeClasses + 'v-list--three-line': this.threeLine } } }, @@ -82,6 +83,6 @@ export default mixins( } } - return h('div', data, [this.$slots.default]) + return h('div', this.setBackgroundColor(this.color, data), [this.$slots.default]) } })
40ddf95b5d8c4aeda84f584edcd9ed6e4b49a27b
2025-02-21 06:19:47
John Leider
docs(long-term-support): update page content
false
update page content
docs
diff --git a/packages/docs/src/pages/en/introduction/long-term-support.md b/packages/docs/src/pages/en/introduction/long-term-support.md index 2b39e79cad8..65d1259e83a 100644 --- a/packages/docs/src/pages/en/introduction/long-term-support.md +++ b/packages/docs/src/pages/en/introduction/long-term-support.md @@ -21,12 +21,8 @@ We understand that many projects that utilize Vuetify have development cycles th | Version | Status | Initial Release Date | LTS Start Date | LTS End Date | | - | - | - | - | - | -| [Vuetify 3.x](https://vuetifyjs.com/) | 🚀 Active Development | November 1st, 2022 | N/A | N/A | -| [Vuetify 2.7](https://v2.vuetifyjs.com/) | 🛠️ Archived | July 23rd, 2019 | July 5th, 2023 | January 23rd, 2025 | +| [Vuetify 3.x](https://vuetifyjs.com/) | 🚀 Active | November 1st, 2022 | N/A | N/A | +| [Vuetify 2.7](https://v2.vuetifyjs.com/) | 📦 Archived | July 23rd, 2019 | July 5th, 2023 | January 23rd, 2025 | | [Vuetify 1.5](https://v15.vuetifyjs.com/) | 📦 Archived | February 5th, 2019 | July 31st, 2019 | July 31st, 2020 | Have questions? Reach out to us in our [Discord community](https://community.vuetifyjs.com). - -::: tip - Sign-up for Enterprise support and get a personalized service plan from the team behind Vuetify. [Book a consultation](/introduction/enterprise-support/) for your business today! -:::
e9f73036807f473d1708bfd916817d3a2099c504
2019-03-19 03:54:39
MajesticPotatoe
docs(api): add activator to v-list-group
false
add activator to v-list-group
docs
diff --git a/packages/api-generator/src/map.js b/packages/api-generator/src/map.js index 930465f091c..acc38f41101 100755 --- a/packages/api-generator/src/map.js +++ b/packages/api-generator/src/map.js @@ -959,6 +959,9 @@ module.exports = { 'v-list': { slots: ['default'] }, + 'v-list-group': { + slots: ['activator'] + }, 'v-list-tile': { slots: ['default'] },
13fe68acce40ce31615e2ae1d7b7d093d0042919
2025-03-07 08:12:11
John Leider
docs(UsageExample): width issues when displaying datatable usage
false
width issues when displaying datatable usage
docs
diff --git a/packages/docs/src/components/examples/UsageExample.vue b/packages/docs/src/components/examples/UsageExample.vue index ad9459ed5fc..4116ff5f70a 100644 --- a/packages/docs/src/components/examples/UsageExample.vue +++ b/packages/docs/src/components/examples/UsageExample.vue @@ -82,7 +82,7 @@ min-height="300" rounded="0" > - <div class="flex-fill"> + <div class="flex-fill w-100"> <slot /> </div> </v-sheet>
f2303f1daac83a9ea0a25800b8f96aebcc7a322f
2019-04-22 19:19:01
kuromoka
fix(VDialog): remove console error on escape keypress (#7030)
false
remove console error on escape keypress (#7030)
fix
diff --git a/packages/vuetify/src/components/VDialog/VDialog.js b/packages/vuetify/src/components/VDialog/VDialog.js index afc63091fd4..44009a00fe3 100644 --- a/packages/vuetify/src/components/VDialog/VDialog.js +++ b/packages/vuetify/src/components/VDialog/VDialog.js @@ -234,7 +234,7 @@ export default { if (el) return el } - consoleError('No activator found') + return null }, genActivator () { if (!this.hasActivator) return null diff --git a/packages/vuetify/test/unit/components/VDialog/VDialog.spec.js b/packages/vuetify/test/unit/components/VDialog/VDialog.spec.js index f4c1efb7eeb..b083a793547 100644 --- a/packages/vuetify/test/unit/components/VDialog/VDialog.spec.js +++ b/packages/vuetify/test/unit/components/VDialog/VDialog.spec.js @@ -1,5 +1,6 @@ import VDialog from '@/components/VDialog' import { test } from '@/test' +import { keyCodes } from '@/util/helpers' import Vue from 'vue' test('VDialog.js', ({ mount, compileToFunctions }) => { @@ -252,4 +253,17 @@ test('VDialog.js', ({ mount, compileToFunctions }) => { expect('Unable to locate target [data-app]').toHaveBeenTipped() }) + + it('should close dialog on escape keydown', () => { + const wrapper = mount(VDialog, { + propsData: { value: true } + }) + + const escape = new Event('keydown') + escape.keyCode = keyCodes.esc + wrapper.vm.$refs.content.dispatchEvent(escape) + expect(wrapper.vm.isActive).toBe(false) + + expect('Unable to locate target [data-app]').toHaveBeenTipped() + }) })
2923d346ae79febd9d9a1dab2603e47d7e705637
2019-06-08 00:42:18
sh7dm
chore: update snapshots
false
update snapshots
chore
diff --git a/packages/vuetify/src/components/VIcon/__tests__/__snapshots__/VIcon.spec.ts.snap b/packages/vuetify/src/components/VIcon/__tests__/__snapshots__/VIcon.spec.ts.snap index da4ea2bba61..4848c88780b 100644 --- a/packages/vuetify/src/components/VIcon/__tests__/__snapshots__/VIcon.spec.ts.snap +++ b/packages/vuetify/src/components/VIcon/__tests__/__snapshots__/VIcon.spec.ts.snap @@ -6,7 +6,8 @@ exports[`VIcon for component icon should render an svg icon 1`] = ` viewbox="0 0 24 24" height="24" width="24" - role="icon" + role="img" + aria-hidden="true" class="v-icon v-icon--svg theme--light" > <path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"> @@ -21,7 +22,8 @@ exports[`VIcon for component icon should render an svg icon 2`] = ` viewbox="0 0 24 24" height="36px" width="36px" - role="icon" + role="img" + aria-hidden="true" class="v-icon v-icon--svg theme--light" style="font-size: 36px; height: 36px; width: 36px;" > diff --git a/packages/vuetify/src/services/icons/__tests__/__snapshots__/icons.spec.ts.snap b/packages/vuetify/src/services/icons/__tests__/__snapshots__/icons.spec.ts.snap index 5d8c3a1e9df..e3acd2e5176 100644 --- a/packages/vuetify/src/services/icons/__tests__/__snapshots__/icons.spec.ts.snap +++ b/packages/vuetify/src/services/icons/__tests__/__snapshots__/icons.spec.ts.snap @@ -18,6 +18,7 @@ Object { "first": "mdi-page-first", "info": "mdi-information", "last": "mdi-page-last", + "loading": "mdi-cached", "menu": "mdi-menu", "next": "mdi-chevron-right", "prev": "mdi-chevron-left", @@ -52,6 +53,7 @@ Object { "first": "fa fa-step-backward", "info": "fa fa-info-circle", "last": "fa fa-step-forward", + "loading": "fa fa-refresh", "menu": "fa fa-bars", "next": "fa fa-chevron-right", "prev": "fa fa-chevron-left",
646e845db3b3069271ddf8401b1a19e1d51241ca
2021-12-14 12:21:37
Albert Kaaman
feat(VSlider): update to v3 (#14123)
false
update to v3 (#14123)
feat
diff --git a/packages/vuetify/src/components/VField/VField.sass b/packages/vuetify/src/components/VField/VField.sass index bd75950529a..1cf7c37d537 100644 --- a/packages/vuetify/src/components/VField/VField.sass +++ b/packages/vuetify/src/components/VField/VField.sass @@ -121,16 +121,15 @@ /* region AFFIXES */ .v-field__prepend-inner, .v-field__append-inner, -.v-field__clearable, -.v-field .v-input__prepend, -.v-field .v-input__append +.v-field__clearable align-items: center display: flex .v-field__prepend-inner, -.v-field__append-inner, -.v-input__prepend, -.v-input__append +.v-field__append-inner + .v-field--focused & + opacity: 1 + .v-field--variant-plain &, .v-field--variant-underlined & $root: & @@ -154,7 +153,7 @@ transition: $field-transition-timing transition-property: opacity, transform, width - .v-field--focused &, + .v-input--focused &, .v-field__control:hover &, .v-field--persistent-clear & opacity: 1 diff --git a/packages/vuetify/src/components/VField/VField.tsx b/packages/vuetify/src/components/VField/VField.tsx index d7b208ebeb6..a6ca6e8f9d1 100644 --- a/packages/vuetify/src/components/VField/VField.tsx +++ b/packages/vuetify/src/components/VField/VField.tsx @@ -12,6 +12,7 @@ import { LoaderSlot, makeLoaderProps, useLoader } from '@/composables/loader' import { makeThemeProps, useTheme } from '@/composables/theme' import { useBackgroundColor, useTextColor } from '@/composables/color' import { useProxiedModel } from '@/composables/proxiedModel' +import { useFocus } from '@/composables/focus' // Utilities import { computed, ref, toRef, watch, watchEffect } from 'vue' @@ -36,7 +37,6 @@ type Variant = typeof allowedVariants[number] export interface DefaultInputSlot { isActive: boolean - isDirty: boolean isFocused: boolean inputRef: Ref<HTMLInputElement | undefined> controlRef: Ref<HTMLElement | undefined> @@ -57,7 +57,6 @@ export const makeVFieldProps = propsFactory({ default: '$clear', }, color: String, - id: String, label: String, persistentClear: Boolean, prependInnerIcon: String, @@ -100,8 +99,6 @@ export const VField = genericComponent<new <T>() => { props: { active: Boolean, - dirty: Boolean, - ...makeVFieldProps(), }, @@ -118,16 +115,17 @@ export const VField = genericComponent<new <T>() => { const { themeClasses } = useTheme(props) const { loaderClasses } = useLoader(props, 'v-field') const isActive = useProxiedModel(props, 'active') + const { isFocused, focus, blur } = useFocus() + const uid = getUid() const labelRef = ref<VFieldLabel>() const floatingLabelRef = ref<VFieldLabel>() const controlRef = ref<HTMLElement>() const inputRef = ref<HTMLInputElement>() - const isFocused = ref(false) const id = computed(() => props.id || `input-${uid}`) - watchEffect(() => isActive.value = isFocused.value || props.dirty) + watchEffect(() => isActive.value = isFocused.value) const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'bgColor')) const { textColorClasses, textColorStyles } = useTextColor(computed(() => { @@ -174,17 +172,8 @@ export const VField = genericComponent<new <T>() => { } }, { flush: 'post' }) - function focus () { - isFocused.value = true - } - - function blur () { - isFocused.value = false - } - const slotProps = computed<DefaultInputSlot>(() => ({ isActive: isActive.value, - isDirty: props.dirty, isFocused: isFocused.value, inputRef, controlRef, @@ -220,7 +209,6 @@ export const VField = genericComponent<new <T>() => { { 'v-field--active': isActive.value, 'v-field--appended': hasAppend, - 'v-field--dirty': props.dirty, 'v-field--focused': isFocused.value, 'v-field--has-background': !!props.bgColor, 'v-field--persistent-clear': props.persistentClear, @@ -236,8 +224,8 @@ export const VField = genericComponent<new <T>() => { style={[ textColorStyles.value, ]} - focused={ isFocused.value } { ...inputProps } + focused={ isFocused.value } { ...attrs } v-slots={{ prepend: slots.prepend ? props => slots.prepend?.({ ...props, ...slotProps.value }) : undefined, @@ -304,7 +292,7 @@ export const VField = genericComponent<new <T>() => { <div class="v-field__clearable" onClick={ (e: Event) => emit('click:clear', e) } - v-show={ props.dirty } + v-show={ props.active } > { slots.clear ? slots.clear() diff --git a/packages/vuetify/src/components/VFileInput/VFileInput.sass b/packages/vuetify/src/components/VFileInput/VFileInput.sass index b2406e5fd69..0e4761f739a 100644 --- a/packages/vuetify/src/components/VFileInput/VFileInput.sass +++ b/packages/vuetify/src/components/VFileInput/VFileInput.sass @@ -35,12 +35,12 @@ .v-file-input__clearable opacity: 0 - &.v-input--dirty + &.v-input--active .v-input__control:hover .v-file-input__clearable opacity: 1 - &.v-input--focused.v-input--dirty + &.v-input--focused.v-input--active .v-file-input__clearable opacity: 1 diff --git a/packages/vuetify/src/components/VFileInput/VFileInput.tsx b/packages/vuetify/src/components/VFileInput/VFileInput.tsx index 4b1b50d46a5..807bf5fe76b 100644 --- a/packages/vuetify/src/components/VFileInput/VFileInput.tsx +++ b/packages/vuetify/src/components/VFileInput/VFileInput.tsx @@ -113,7 +113,6 @@ export const VFileInput = defineComponent({ ref={ fieldRef } class="v-file-input" active={ isDirty.value } - dirty={ isDirty.value } prepend-icon={ props.prependIcon } onUpdate:active={ val => internalDirty.value = val } onClick:control={ click } diff --git a/packages/vuetify/src/components/VInput/VInput.sass b/packages/vuetify/src/components/VInput/VInput.sass index 66918c5a1df..14fbb069192 100644 --- a/packages/vuetify/src/components/VInput/VInput.sass +++ b/packages/vuetify/src/components/VInput/VInput.sass @@ -5,9 +5,6 @@ .v-input display: grid flex: 1 1 auto - grid-template-areas: "prepend control append" "a messages b" - grid-template-columns: max-content auto max-content - grid-template-rows: auto auto input color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity)) @@ -29,6 +26,28 @@ @include tools.density('v-input', $input-density) using ($modifier) --v-input-control-height: #{$input-control-height + $modifier} +.v-input--vertical + grid-template-areas: "append" "control" "prepend" + grid-template-rows: max-content auto max-content + grid-template-columns: min-content + + .v-input__prepend + margin-block-start: $input-affix-margin-inside + + .v-input__append + margin-block-end: $input-affix-margin-inside + +.v-input--horizontal + grid-template-areas: "prepend control append" "a messages b" + grid-template-columns: max-content auto max-content + grid-template-rows: auto auto + + .v-input__prepend + margin-inline-end: $input-affix-margin-inside + + .v-input__append + margin-inline-start: $input-affix-margin-inside + .v-input__details align-items: flex-end display: flex @@ -51,10 +70,14 @@ align-items: center align-self: center + .v-input--focused & + opacity: 1 + .v-input__prepend - margin-inline-end: $input-affix-margin-inside grid-area: prepend .v-input__append - margin-inline-start: $input-affix-margin-inside grid-area: append + +.v-input__control + grid-area: control diff --git a/packages/vuetify/src/components/VInput/VInput.tsx b/packages/vuetify/src/components/VInput/VInput.tsx index bc227108480..432f7e0403f 100644 --- a/packages/vuetify/src/components/VInput/VInput.tsx +++ b/packages/vuetify/src/components/VInput/VInput.tsx @@ -11,16 +11,17 @@ import { makeValidationProps, useValidation } from '@/composables/validation' // Utilities import { computed } from 'vue' -import { genericComponent, pick, propsFactory } from '@/util' +import { genericComponent, getUid, pick, propsFactory } from '@/util' // Types import type { ComputedRef, ExtractPropTypes, PropType, Ref } from 'vue' import type { MakeSlots } from '@/util' -export type VInputSlot = { +export interface VInputSlot { + id: ComputedRef<string> isDisabled: ComputedRef<boolean> isReadonly: ComputedRef<boolean> - isPristine: Ref<boolean | null> + isPristine: Ref<boolean> isValid: ComputedRef<boolean | null> isValidating: Ref<boolean> reset: () => void @@ -29,6 +30,7 @@ export type VInputSlot = { } export const makeVInputProps = propsFactory({ + id: String, appendIcon: String, prependIcon: String, hideDetails: [Boolean, String] as PropType<boolean | 'auto'>, @@ -38,6 +40,11 @@ export const makeVInputProps = propsFactory({ default: () => ([]), }, persistentHint: Boolean, + direction: { + type: String as PropType<'horizontal' | 'vertical'>, + default: 'horizontal', + validator: (v: any) => ['horizontal', 'vertical'].includes(v), + }, ...makeDensityProps(), ...makeValidationProps(), @@ -79,7 +86,11 @@ export const VInput = genericComponent<new <T>() => { validationClasses, } = useValidation(props, 'v-input') + const uid = getUid() + const id = computed(() => props.id || `input-${uid}`) + const slotProps = computed<VInputSlot>(() => ({ + id, isDisabled, isReadonly, isPristine, @@ -111,6 +122,7 @@ export const VInput = genericComponent<new <T>() => { return ( <div class={[ 'v-input', + `v-input--${props.direction}`, densityClasses.value, validationClasses.value, ]} @@ -128,7 +140,9 @@ export const VInput = genericComponent<new <T>() => { </div> ) } - { slots.default?.(slotProps.value) } + <div class="v-input__control"> + { slots.default?.(slotProps.value) } + </div> { hasAppend && ( <div diff --git a/packages/vuetify/src/components/VRangeSlider/VRangeSlider.sass b/packages/vuetify/src/components/VRangeSlider/VRangeSlider.sass deleted file mode 100644 index e04ca071b11..00000000000 --- a/packages/vuetify/src/components/VRangeSlider/VRangeSlider.sass +++ /dev/null @@ -1,19 +0,0 @@ -@import '../../styles/styles.sass' - -// Theme -+theme(v-input--range-slider) using ($material) - &.v-input--slider.v-input--is-disabled - .v-slider.v-slider - .v-slider__thumb - background: map-deep-get($material, 'selection-controls', 'thumb', 'disabled') - -/** Input Group */ -.v-input--range-slider - &.v-input--is-disabled - .v-slider__track-fill - display: none - - &.v-input--slider - .v-slider.v-slider - .v-slider__thumb - border-color: transparent diff --git a/packages/vuetify/src/components/VRangeSlider/VRangeSlider.ts b/packages/vuetify/src/components/VRangeSlider/VRangeSlider.ts deleted file mode 100644 index 3afb93fa2f2..00000000000 --- a/packages/vuetify/src/components/VRangeSlider/VRangeSlider.ts +++ /dev/null @@ -1,258 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ - -// Styles -import './VRangeSlider.sass' - -// Components -import VSlider from '../VSlider' - -// Helpers -import { - addOnceEventListener, - createRange, - deepEqual, - passiveSupported, -} from '../../util/helpers' - -// Types -import { PropValidator } from 'vue/types/options' - -/* @vue/component */ -export default VSlider.extend({ - name: 'v-range-slider', - - props: { - value: { - type: Array, - default: () => ([0, 0]), - } as unknown as PropValidator<[number, number]>, - }, - - data () { - return { - activeThumb: null as null | number, - lazyValue: this.value, - } - }, - - computed: { - classes (): object { - return { - ...VSlider.options.computed.classes.call(this), - 'v-input--range-slider': true, - } - }, - internalValue: { - get (): number[] { - return this.lazyValue - }, - set (val: number[]) { - // Round value to ensure the - // entire slider range can - // be selected with step - let value = val.map((v = 0) => this.roundValue(Math.min(Math.max(v, this.minValue), this.maxValue))) - - // Switch values if range and wrong order - if (value[0] > value[1] || value[1] < value[0]) { - if (this.activeThumb !== null) { - const toFocus = this.activeThumb === 1 ? 0 : 1 - const el = this.$refs[`thumb_${toFocus}`] as HTMLElement - el.focus() - } - value = [value[1], value[0]] - } - - this.lazyValue = value - if (!deepEqual(value, this.value)) this.$emit('input', value) - - this.validate() - }, - }, - inputWidth (): number[] { - return this.internalValue.map((v: number) => ( - this.roundValue(v) - this.minValue) / (this.maxValue - this.minValue) * 100 - ) - }, - }, - - methods: { - getTrackStyle (startLength: number, endLength: number, startPadding = 0, endPadding = 0) { - const startDir = this.vertical ? this.$vuetify.rtl ? 'top' : 'bottom' : this.$vuetify.rtl ? 'right' : 'left' - const endDir = this.vertical ? 'height' : 'width' - - const start = `calc(${startLength}% + ${startPadding}px)` - const end = `calc(${endLength}% + ${endPadding}px)` - - return { - transition: this.trackTransition, - [startDir]: start, - [endDir]: end, - } - }, - getIndexOfClosestValue (arr: number[], v: number) { - if (Math.abs(arr[0] - v) < Math.abs(arr[1] - v)) return 0 - else return 1 - }, - genInput () { - return createRange(2).map(i => { - const input = VSlider.options.methods.genInput.call(this) - - input.data = input.data || {} - input.data.attrs = input.data.attrs || {} - input.data.attrs.value = this.internalValue[i] - input.data.attrs.id = `input-${i ? 'max' : 'min'}-${this._uid}` - - return input - }) - }, - genTrackContainer () { - const children = [] - - const padding = this.isDisabled ? 10 : 0 - const sections: { class: string, color: string | undefined, styles: [number, number, number, number] }[] = [ - { - class: 'v-slider__track-background', - color: this.computedTrackColor, - styles: [0, this.inputWidth[0], 0, -padding], - }, - { - class: this.isDisabled ? 'v-slider__track-background' : 'v-slider__track-fill', - color: this.isDisabled ? this.computedTrackColor : this.computedTrackFillColor, - styles: [this.inputWidth[0], Math.abs(this.inputWidth[1] - this.inputWidth[0]), padding, padding * -2], - }, - { - class: 'v-slider__track-background', - color: this.computedTrackColor, - styles: [this.inputWidth[1], Math.abs(100 - this.inputWidth[1]), padding, -padding], - }, - ] - - if (this.$vuetify.rtl) sections.reverse() - - children.push(...sections.map(section => this.$createElement('div', this.setBackgroundColor(section.color, { - staticClass: section.class, - style: this.getTrackStyle(...section.styles), - })))) - - return this.$createElement('div', { - staticClass: 'v-slider__track-container', - ref: 'track', - }, children) - }, - genChildren () { - return [ - this.genInput(), - this.genTrackContainer(), - this.genSteps(), - createRange(2).map(index => { - const value = this.internalValue[index] - const onFocus = (e: Event) => { - this.isFocused = true - this.activeThumb = index - - this.$emit('focus', e) - } - - const onBlur = (e: Event) => { - this.isFocused = false - this.activeThumb = null - - this.$emit('blur', e) - } - - const valueWidth = this.inputWidth[index] - const isActive = this.isActive && this.activeThumb === index - const isFocused = this.isFocused && this.activeThumb === index - - return this.genThumbContainer(value, valueWidth, isActive, isFocused, onFocus, onBlur, `thumb_${index}`) - }), - ] - }, - reevaluateSelected (value: number) { - this.activeThumb = this.getIndexOfClosestValue(this.internalValue, value) - const refName = `thumb_${this.activeThumb}` - const thumbRef = this.$refs[refName] as HTMLElement - thumbRef.focus() - }, - onSliderMouseDown (e: MouseEvent | TouchEvent) { - const value = this.parseMouseMove(e) - - this.reevaluateSelected(value) - - this.oldValue = this.internalValue - this.isActive = true - - if ((e.target as Element)?.matches('.v-slider__thumb-container, .v-slider__thumb-container *')) { - this.thumbPressed = true - const domRect = (e.target as Element).getBoundingClientRect() - const touch = 'touches' in e ? e.touches[0] : e - this.startOffset = this.vertical - ? touch.clientY - (domRect.top + domRect.height / 2) - : touch.clientX - (domRect.left + domRect.width / 2) - } else { - this.startOffset = 0 - window.clearTimeout(this.mouseTimeout) - this.mouseTimeout = window.setTimeout(() => { - this.thumbPressed = true - }, 300) - } - - const mouseUpOptions = passiveSupported ? { passive: true, capture: true } : true - const mouseMoveOptions = passiveSupported ? { passive: true } : false - - const isTouchEvent = 'touches' in e - - this.onMouseMove(e) - this.app.addEventListener(isTouchEvent ? 'touchmove' : 'mousemove', this.onMouseMove, mouseMoveOptions) - addOnceEventListener(this.app, isTouchEvent ? 'touchend' : 'mouseup', this.onSliderMouseUp, mouseUpOptions) - - this.$emit('start', this.internalValue) - }, - onSliderClick (e: MouseEvent) { - if (!this.isActive) { - if (this.noClick) { - this.noClick = false - return - } - - const value = this.parseMouseMove(e) - - this.reevaluateSelected(value) - - this.setInternalValue(value) - - this.$emit('change', this.internalValue) - } - }, - onMouseMove (e: MouseEvent | TouchEvent) { - const value = this.parseMouseMove(e) - - if (e.type === 'mousemove') { - this.thumbPressed = true - } - - if (this.activeThumb === null) { - this.activeThumb = this.getIndexOfClosestValue(this.internalValue, value) - } - - this.setInternalValue(value) - }, - onKeyDown (e: KeyboardEvent) { - if (this.activeThumb === null) return - - const value = this.parseKeyDown(e, this.internalValue[this.activeThumb]) - - if (value == null) return - - this.setInternalValue(value) - this.$emit('change', this.internalValue) - }, - setInternalValue (value: number) { - this.internalValue = this.internalValue.map((v: number, i: number) => { - if (i === this.activeThumb) return value - else return Number(v) - }) - }, - }, -}) diff --git a/packages/vuetify/src/components/VRangeSlider/VRangeSlider.tsx b/packages/vuetify/src/components/VRangeSlider/VRangeSlider.tsx new file mode 100644 index 00000000000..fb65ad76fd6 --- /dev/null +++ b/packages/vuetify/src/components/VRangeSlider/VRangeSlider.tsx @@ -0,0 +1,227 @@ +// Components +import { VInput } from '../VInput' +import { VSliderThumb } from '../VSlider/VSliderThumb' +import { VSliderTrack } from '../VSlider/VSliderTrack' + +// Composables +import { useProxiedModel } from '@/composables/proxiedModel' +import { getOffset, makeSliderProps, useSlider } from '../VSlider/slider' +import { useFocus } from '@/composables/focus' + +// Utilities +import { computed, defineComponent, ref } from 'vue' + +// Types +import type { PropType, WritableComputedRef } from 'vue' +import { filterInputProps, makeVInputProps } from '../VInput/VInput' + +export const VRangeSlider = defineComponent({ + name: 'VRangeSlider', + + props: { + ...makeVInputProps(), + ...makeSliderProps(), + + modelValue: { + type: Array as PropType<number[]>, + default: () => ([0, 0]), + }, + }, + + emits: { + 'update:modelValue': (value: [number, number]) => true, + }, + + setup (props, { slots, attrs }) { + const startThumbRef = ref<VSliderThumb>() + const stopThumbRef = ref<VSliderThumb>() + const focusedThumb = ref<VSliderThumb | null>() + const inputRef = ref<VInput>() + + let canSwitch = false + function getActiveThumb (e: MouseEvent | TouchEvent) { + if (!startThumbRef.value || !stopThumbRef.value) return + + canSwitch = true + + const startOffset = getOffset(e, startThumbRef.value.$el, props.direction) + const stopOffset = getOffset(e, stopThumbRef.value.$el, props.direction) + + const a = Math.abs(startOffset) + const b = Math.abs(stopOffset) + + return (a < b || (a === b && startOffset < 0)) ? startThumbRef.value?.$el : stopThumbRef.value?.$el + } + + const { + min, + max, + mousePressed, + roundValue, + onSliderMousedown, + onSliderTouchstart, + trackContainerRef, + position, + hasLabels, + } = useSlider({ + /* eslint-disable @typescript-eslint/no-use-before-define */ + props, + handleSliderMouseUp: newValue => { + model.value = focusedThumb.value === startThumbRef.value ? [newValue, model.value[1]] : [model.value[0], newValue] + }, + handleMouseMove: newValue => { + if (focusedThumb.value === startThumbRef.value) { + model.value = [Math.min(newValue, model.value[1]), model.value[1]] + } else { + model.value = [model.value[0], Math.max(model.value[0], newValue)] + } + if (canSwitch && model.value[0] === model.value[1]) { + focusedThumb.value = newValue > model.value[0] ? stopThumbRef.value : startThumbRef.value + } + canSwitch = false + }, + getActiveThumb, + /* eslint-enable @typescript-eslint/no-use-before-define */ + }) + + const model = useProxiedModel( + props, + 'modelValue', + undefined, + arr => { + if (!arr || !arr.length) return [0, 0] + + return arr.map(value => roundValue(value)) + }, + ) as WritableComputedRef<[number, number]> + + const { isFocused, focus, blur } = useFocus() + const trackStart = computed(() => position(model.value[0])) + const trackStop = computed(() => position(model.value[1])) + + return () => { + const [inputProps, _] = filterInputProps(props) + + return ( + <VInput + class={[ + 'v-slider', + 'v-range-slider', + { + 'v-slider--has-labels': !!slots['tick-label'] || hasLabels.value, + 'v-slider--focused': isFocused.value, + 'v-slider--pressed': mousePressed.value, + 'v-slider--disabled': props.disabled, + }, + ]} + ref={ inputRef } + { ...inputProps } + focused={ isFocused.value } + v-slots={{ + ...slots, + default: ({ id }) => ( + <div + class="v-slider__container" + onMousedown={ onSliderMousedown } + onTouchstartPassive={ onSliderTouchstart } + > + <input + id={ `${id.value}_start` } + name={ props.name || id.value } + disabled={ props.disabled } + readonly={ props.readonly } + tabindex="-1" + value={ model.value[0] } + /> + + <input + id={ `${id.value}_stop` } + name={ props.name || id.value } + disabled={ props.disabled } + readonly={ props.readonly } + tabindex="-1" + value={ model.value[1] } + /> + + <VSliderTrack + ref={ trackContainerRef } + start={ trackStart.value } + stop={ trackStop.value } + v-slots={{ + 'tick-label': slots['tick-label'], + }} + /> + + <VSliderThumb + ref={ startThumbRef } + focused={ isFocused && focusedThumb.value === startThumbRef.value } + modelValue={ model.value[0] } + onUpdate:modelValue={ v => (model.value = [v, model.value[1]]) } + onFocus={ (e: FocusEvent) => { + focus() + focusedThumb.value = startThumbRef.value + + // Make sure second thumb is focused if + // the thumbs are on top of each other + // and they are both at minimum value + // but only if focused from outside. + if ( + model.value[0] === model.value[1] && + model.value[1] === min.value && + e.relatedTarget !== stopThumbRef.value?.$el + ) stopThumbRef.value?.$el.focus() + } } + onBlur={ () => { + blur() + focusedThumb.value = null + } } + v-slots={{ + 'thumb-label': slots['thumb-label'], + }} + min={ min.value } + max={ model.value[1] } + position={ trackStart.value } + /> + + <VSliderThumb + ref={ stopThumbRef } + focused={ isFocused && focusedThumb.value === stopThumbRef.value } + modelValue={ model.value[1] } + onUpdate:modelValue={ v => (model.value = [model.value[0], v]) } + onFocus={ (e: FocusEvent) => { + focus() + focusedThumb.value = stopThumbRef.value + + // Make sure first thumb is focused if + // the thumbs are on top of each other + // and they are both at maximum value + // but only if focused from outside. + if ( + model.value[0] === model.value[1] && + model.value[0] === max.value && + e.relatedTarget !== startThumbRef.value?.$el + ) { + startThumbRef.value?.$el.focus() + } + } } + onBlur={ () => { + blur() + focusedThumb.value = null + } } + v-slots={{ + 'thumb-label': slots['thumb-label'], + }} + min={ model.value[0] } + max={ max.value } + position={ trackStop.value } + /> + </div> + ), + }} + /> + ) + } + }, +}) + +export type VRangeSlider = InstanceType<typeof VRangeSlider> diff --git a/packages/vuetify/src/components/VRangeSlider/index.ts b/packages/vuetify/src/components/VRangeSlider/index.ts index b3dff3481ea..0337c29a732 100644 --- a/packages/vuetify/src/components/VRangeSlider/index.ts +++ b/packages/vuetify/src/components/VRangeSlider/index.ts @@ -1,4 +1 @@ -import VRangeSlider from './VRangeSlider' - -export { VRangeSlider } -export default VRangeSlider +export { VRangeSlider } from './VRangeSlider' diff --git a/packages/vuetify/src/components/VSlider/VSlider.sass b/packages/vuetify/src/components/VSlider/VSlider.sass index 725f3fda596..c717192b201 100644 --- a/packages/vuetify/src/components/VSlider/VSlider.sass +++ b/packages/vuetify/src/components/VSlider/VSlider.sass @@ -1,22 +1,13 @@ // Imports -@import './_variables.scss' - -// Theme -+theme(v-slider) using ($material) - .v-slider__track-background, - .v-slider__track-fill, - .v-slider__thumb - background: map-deep-get($material, 'slider', 'inactive') +@forward './variables' +@use 'sass:map' +@use 'sass:selector' +@use '../../styles/settings' +@use '../../styles/tools' +@use './variables' as * // Block .v-slider - cursor: default - display: flex - align-items: center - position: relative - flex: 1 - user-select: none - input cursor: default padding: 0 @@ -24,282 +15,32 @@ display: none // Elements -.v-slider__track-container - position: absolute - border-radius: $slider-track-border-radius - -.v-slider__track - &-background, &-fill - position: absolute - transition: $slider-transition - -.v-slider__thumb-container - outline: none - position: absolute - transition: $slider-transition - top: 50% - - &:hover - .v-slider__thumb:before - transform: scale(1) - -.v-slider__thumb - position: absolute - width: $slider-thumb-size - height: $slider-thumb-size - left: -$slider-thumb-size * .5 - top: 50% - border-radius: $slider-thumb-border-radius - transition: $slider-transition - transform: translateY(-50%) - user-select: none - - &:before - transition: $primary-transition - content: '' - color: inherit - width: #{$slider-thumb-size + $slider-thumb-focused-size-increase} - height: #{$slider-thumb-size + $slider-thumb-focused-size-increase} - border-radius: $slider-thumb-border-radius - background: currentColor - opacity: $slider-thumb-before-opacity - position: absolute - left: -$slider-thumb-focused-size-increase * .5 - top: -$slider-thumb-focused-size-increase * .5 - transform: scale(0.1) - pointer-events: none - - &::after - content: '' - width: $slider-thumb-touch-size - height: $slider-thumb-touch-size - position: absolute - top: 50% - left: 50% - transform: translate(-50%, -50%) - -.v-slider__ticks-container - position: absolute - -.v-slider__tick - position: absolute - opacity: 0 - background-color: rgba(0, 0, 0, 0.5) // TODO: move to theme mixin? - transition: $slider-transition - border-radius: $slider-tick-border-radius - - &--filled - background-color: rgba(255, 255, 255, 0.5) // TODO: move to theme mixin? - - &:first-child .v-slider__tick-label - +ltr() - transform: none - - +rtl() - transform: translateX(100%) - - &:last-child .v-slider__tick-label - +ltr() - transform: translateX(-100%) - - +rtl() - transform: none - -.v-slider__tick-label - position: absolute - user-select: none - white-space: nowrap - -.v-slider__thumb-label-container - position: absolute - left: 0 - top: 0 - transition: $slider-thumb-label-transition - -.v-slider__thumb-label +.v-slider__container + position: relative + width: 100% + height: 100% display: flex - align-items: center justify-content: center - font-size: $slider-thumb-label-font-size - color: #fff // TODO: move to theme mixin? - width: $slider-thumb-label-width - height: $slider-thumb-label-height - border-radius: 50% 50% 0 - position: absolute - left: 0 - bottom: 100% - user-select: none - transition: $slider-thumb-label-transition + align-items: center + cursor: pointer // Modifiers -.v-slider--horizontal - min-height: $slider-horizontal-min-height +.v-slider.v-input--horizontal margin-left: $slider-horizontal-left margin-right: $slider-horizontal-right - .v-slider__track - &-container - width: 100% - height: $slider-track-width - left: 0 - top: 50% - transform: translateY(-50%) - - &-background, &-fill - height: 100% - - .v-slider__ticks-container - left: 0 - height: $slider-track-width - width: 100% - - .v-slider__tick - &:first-child .v-slider__tick-label - +ltr() - transform: translateX(0%) - - +rtl() - transform: translateX(0%) - - &:last-child .v-slider__tick-label - +ltr() - transform: translateX(-100%) - - +rtl() - transform: translateX(100%) + .v-input__control + min-height: $slider-horizontal-min-height - .v-slider__tick-label - top: 8px - - +ltr() - transform: translateX(-50%) - - +rtl() - transform: translateX(50%) - - .v-slider__thumb-label - // Needed for IE11 which does not - // process translateY(calc(-20% - 12px)) - // or translate(-50%, calc(-20% - 12px)) - transform: translateY(-20%) translateY(-12px) translateX(-50%) rotate(45deg) - - > * - transform: rotate(-45deg) - -.v-slider--vertical - min-height: $slider-vertical-min-height +.v-slider.v-input--vertical margin-top: $slider-vertical-margin-top margin-bottom: $slider-vertical-margin-bottom - .v-slider__track - &-container - height: 100% - width: $slider-track-width - left: 50% - top: 0 - transform: translateX(-50%) - - &-background, &-fill - width: 100% - - .v-slider__thumb-container - left: 50% - - .v-slider__ticks-container - top: 0 - width: $slider-track-width - height: 100% - left: 50% - transform: translateX(-50%) - - .v-slider__tick - .v-slider__tick-label, - &:first-child .v-slider__tick-label, - &:last-child .v-slider__tick-label - +ltr() - transform: translateY(-50%) - left: 12px - - +rtl() - transform: translateY(-50%) - right: 12px - - .v-slider__thumb-label - // Needed for IE11 which does not - // process translateY(calc(-20% - 12px)) - // or translate(-50%, calc(-20% - 12px)) - // transform: translateY(20%) translateY(10px) translateX(55%) rotate(135deg) - - > * - transform: rotate(-135deg) - -.v-slider__thumb-container--focused - .v-slider__thumb:before - transform: scale(1) - -.v-slider--active - .v-slider__tick - opacity: 1 - -.v-slider__thumb-container--active - .v-slider__thumb:before - transform: scale(1.5) !important + .v-input__control + min-height: $slider-vertical-min-height -.v-slider--disabled +.v-slider.v-input--disabled pointer-events: none - .v-slider__thumb - width: $slider-thumb-size - 4 - height: $slider-thumb-size - 4 - left: -($slider-thumb-size - 4) * .5 - - &:before - display: none - -.v-slider__ticks-container--always-show - .v-slider__tick - opacity: 1 - -// Input -.v-input__slider - &.v-input--is-readonly > .v-input__control - pointer-events: none - - .v-input__slot .v-label - +ltr() - margin-left: 0 - margin-right: $slider-label-margin-end - - +rtl() - margin-right: 0 - margin-left: $slider-label-margin-end - -.v-input__slider--inverse-label - .v-input__slot .v-label - +ltr() - margin-right: 0 - margin-left: $slider-label-margin-start - - +rtl() - margin-left: 0 - margin-right: $slider-label-margin-start - -.v-input__slider--vertical - align-items: center - - +ltr() - flex-direction: column-reverse - - +rtl() - flex-direction: column - - .v-input - &__slot, &__prepend-outer, &__append-outer - margin: 0 - - .v-messages - display: none - -.v-input--has-state - .v-slider__track-background - opacity: $slider-state-track-background-opacity +.v-slider--has-labels .v-input__control + margin-bottom: $slider-tick-label-margin-bottom * .5 diff --git a/packages/vuetify/src/components/VSlider/VSlider.ts b/packages/vuetify/src/components/VSlider/VSlider.ts deleted file mode 100644 index 0f664533b6d..00000000000 --- a/packages/vuetify/src/components/VSlider/VSlider.ts +++ /dev/null @@ -1,607 +0,0 @@ -// @ts-nocheck -/* eslint-disable */ - -import './VSlider.sass' - -// Components -import VInput from '../VInput' -import { VScaleTransition } from '../transitions' - -// Mixins -import mixins, { ExtractVue } from '../../util/mixins' -import Loadable from '../../mixins/loadable' - -// Directives -import ClickOutside from '../../directives/click-outside' - -// Helpers -import { addOnceEventListener, deepEqual, keyCodes, createRange, convertToUnit, passiveSupported } from '../../util/helpers' -import { consoleWarn } from '../../util/console' - -// Types -import Vue, { VNode, VNodeChildrenArrayContents, PropType } from 'vue' -import { ScopedSlotChildren } from 'vue/types/vnode' -import { PropValidator } from 'vue/types/options' - -interface options extends Vue { - $refs: { - track: HTMLElement - } -} - -export default mixins<options & -/* eslint-disable indent */ - ExtractVue<[ - typeof VInput, - typeof Loadable - ]> -/* eslint-enable indent */ ->( - VInput, - Loadable -/* @vue/component */ -).extend({ - name: 'v-slider', - - directives: { - ClickOutside, - }, - - mixins: [Loadable], - - props: { - disabled: Boolean, - inverseLabel: Boolean, - max: { - type: [Number, String], - default: 100, - }, - min: { - type: [Number, String], - default: 0, - }, - step: { - type: [Number, String], - default: 1, - }, - thumbColor: String, - thumbLabel: { - type: [Boolean, String] as PropType<boolean | 'always' | undefined>, - default: undefined, - validator: v => typeof v === 'boolean' || v === 'always', - }, - thumbSize: { - type: [Number, String], - default: 32, - }, - tickLabels: { - type: Array, - default: () => ([]), - } as PropValidator<string[]>, - ticks: { - type: [Boolean, String] as PropType<boolean | 'always'>, - default: false, - validator: v => typeof v === 'boolean' || v === 'always', - }, - tickSize: { - type: [Number, String], - default: 2, - }, - trackColor: String, - trackFillColor: String, - value: [Number, String], - vertical: Boolean, - }, - - data: () => ({ - app: null as any, - oldValue: null as any, - thumbPressed: false, - mouseTimeout: -1, - isFocused: false, - isActive: false, - noClick: false, // Prevent click event if dragging took place, hack for #7915 - startOffset: 0, - }), - - computed: { - classes (): object { - return { - ...VInput.options.computed.classes.call(this), - 'v-input__slider': true, - 'v-input__slider--vertical': this.vertical, - 'v-input__slider--inverse-label': this.inverseLabel, - } - }, - internalValue: { - get (): number { - return this.lazyValue - }, - set (val: number) { - val = isNaN(val) ? this.minValue : val - // Round value to ensure the - // entire slider range can - // be selected with step - const value = this.roundValue(Math.min(Math.max(val, this.minValue), this.maxValue)) - - if (value === this.lazyValue) return - - this.lazyValue = value - - this.$emit('input', value) - }, - }, - trackTransition (): string { - return this.thumbPressed - ? this.showTicks || this.stepNumeric - ? '0.1s cubic-bezier(0.25, 0.8, 0.5, 1)' - : 'none' - : '' - }, - minValue (): number { - return parseFloat(this.min) - }, - maxValue (): number { - return parseFloat(this.max) - }, - stepNumeric (): number { - return this.step > 0 ? parseFloat(this.step) : 0 - }, - inputWidth (): number { - const inputWidth = (this.roundValue(this.internalValue) - this.minValue) / (this.maxValue - this.minValue) * 100 - - return isNaN(inputWidth) ? 0 : inputWidth - }, - trackFillStyles (): Partial<CSSStyleDeclaration> { - const startDir = this.vertical ? 'bottom' : 'left' - const endDir = this.vertical ? 'top' : 'right' - const valueDir = this.vertical ? 'height' : 'width' - - const start = this.$vuetify.rtl ? 'auto' : '0' - const end = this.$vuetify.rtl ? '0' : 'auto' - const value = this.isDisabled ? `calc(${this.inputWidth}% - 10px)` : `${this.inputWidth}%` - - return { - transition: this.trackTransition, - [startDir]: start, - [endDir]: end, - [valueDir]: value, - } - }, - trackStyles (): Partial<CSSStyleDeclaration> { - const startDir = this.vertical ? this.$vuetify.rtl ? 'bottom' : 'top' : this.$vuetify.rtl ? 'left' : 'right' - const endDir = this.vertical ? 'height' : 'width' - - const start = '0px' - const end = this.isDisabled ? `calc(${100 - this.inputWidth}% - 10px)` : `calc(${100 - this.inputWidth}%)` - - return { - transition: this.trackTransition, - [startDir]: start, - [endDir]: end, - } - }, - showTicks (): boolean { - return this.tickLabels.length > 0 || - !!(!this.isDisabled && this.stepNumeric && this.ticks) - }, - numTicks (): number { - return Math.ceil((this.maxValue - this.minValue) / this.stepNumeric) - }, - showThumbLabel (): boolean { - return !this.isDisabled && !!( - this.thumbLabel || - this.$scopedSlots['thumb-label'] - ) - }, - computedTrackColor (): string | undefined { - if (this.isDisabled) return undefined - if (this.trackColor) return this.trackColor - if (this.isDark) return this.validationState - return this.validationState || 'primary lighten-3' - }, - computedTrackFillColor (): string | undefined { - if (this.isDisabled) return undefined - if (this.trackFillColor) return this.trackFillColor - return this.validationState || this.computedColor - }, - computedThumbColor (): string | undefined { - if (this.thumbColor) return this.thumbColor - return this.validationState || this.computedColor - }, - }, - - watch: { - min (val) { - const parsed = parseFloat(val) - parsed > this.internalValue && this.$emit('input', parsed) - }, - max (val) { - const parsed = parseFloat(val) - parsed < this.internalValue && this.$emit('input', parsed) - }, - value: { - handler (v: number) { - this.internalValue = v - }, - }, - }, - - // If done in as immediate in - // value watcher, causes issues - // with vue-test-utils - beforeMount () { - this.internalValue = this.value - }, - - mounted () { - // Without a v-app, iOS does not work with body selectors - this.app = document.querySelector('[data-app]') || - consoleWarn('Missing v-app or a non-body wrapping element with the [data-app] attribute', this) - }, - - methods: { - genDefaultSlot (): VNodeChildrenArrayContents { - const children: VNodeChildrenArrayContents = [this.genLabel()] - const slider = this.genSlider() - this.inverseLabel - ? children.unshift(slider) - : children.push(slider) - - children.push(this.genProgress()) - - return children - }, - genSlider (): VNode { - return this.$createElement('div', { - class: { - 'v-slider': true, - 'v-slider--horizontal': !this.vertical, - 'v-slider--vertical': this.vertical, - 'v-slider--focused': this.isFocused, - 'v-slider--active': this.isActive, - 'v-slider--disabled': this.isDisabled, - 'v-slider--readonly': this.isReadonly, - ...this.themeClasses, - }, - directives: [{ - name: 'click-outside', - value: this.onBlur, - }], - on: { - click: this.onSliderClick, - mousedown: this.onSliderMouseDown, - touchstart: this.onSliderMouseDown, - }, - }, this.genChildren()) - }, - genChildren (): VNodeChildrenArrayContents { - return [ - this.genInput(), - this.genTrackContainer(), - this.genSteps(), - this.genThumbContainer( - this.internalValue, - this.inputWidth, - this.isActive, - this.isFocused, - this.onFocus, - this.onBlur, - ), - ] - }, - genInput (): VNode { - return this.$createElement('input', { - attrs: { - value: this.internalValue, - id: this.computedId, - disabled: true, - readonly: true, - tabindex: -1, - ...this.$attrs, - }, - // on: this.genListeners(), // TODO: do we need to attach the listeners to input? - }) - }, - genTrackContainer (): VNode { - const children = [ - this.$createElement('div', this.setBackgroundColor(this.computedTrackColor, { - staticClass: 'v-slider__track-background', - style: this.trackStyles, - })), - this.$createElement('div', this.setBackgroundColor(this.computedTrackFillColor, { - staticClass: 'v-slider__track-fill', - style: this.trackFillStyles, - })), - ] - - return this.$createElement('div', { - staticClass: 'v-slider__track-container', - ref: 'track', - }, children) - }, - genSteps (): VNode | null { - if (!this.step || !this.showTicks) return null - - const tickSize = parseFloat(this.tickSize) - const range = createRange(this.numTicks + 1) - const direction = this.vertical ? 'bottom' : (this.$vuetify.rtl ? 'right' : 'left') - const offsetDirection = this.vertical ? (this.$vuetify.rtl ? 'left' : 'right') : 'top' - - if (this.vertical) range.reverse() - - const ticks = range.map(index => { - const children = [] - - if (this.tickLabels[index]) { - children.push(this.$createElement('div', { - staticClass: 'v-slider__tick-label', - }, this.tickLabels[index])) - } - - const width = index * (100 / this.numTicks) - const filled = this.$vuetify.rtl ? (100 - this.inputWidth) < width : width < this.inputWidth - - return this.$createElement('span', { - key: index, - staticClass: 'v-slider__tick', - class: { - 'v-slider__tick--filled': filled, - }, - style: { - width: `${tickSize}px`, - height: `${tickSize}px`, - [direction]: `calc(${width}% - ${tickSize / 2}px)`, - [offsetDirection]: `calc(50% - ${tickSize / 2}px)`, - }, - }, children) - }) - - return this.$createElement('div', { - staticClass: 'v-slider__ticks-container', - class: { - 'v-slider__ticks-container--always-show': this.ticks === 'always' || this.tickLabels.length > 0, - }, - }, ticks) - }, - genThumbContainer ( - value: number, - valueWidth: number, - isActive: boolean, - isFocused: boolean, - onFocus: Function, - onBlur: Function, - ref = 'thumb' - ): VNode { - const children = [this.genThumb()] - - const thumbLabelContent = this.genThumbLabelContent(value) - this.showThumbLabel && children.push(this.genThumbLabel(thumbLabelContent)) - - return this.$createElement('div', this.setTextColor(this.computedThumbColor, { - ref, - key: ref, - staticClass: 'v-slider__thumb-container', - class: { - 'v-slider__thumb-container--active': isActive, - 'v-slider__thumb-container--focused': isFocused, - 'v-slider__thumb-container--show-label': this.showThumbLabel, - }, - style: this.getThumbContainerStyles(valueWidth), - attrs: { - role: 'slider', - tabindex: this.isDisabled ? -1 : this.$attrs.tabindex ? this.$attrs.tabindex : 0, - 'aria-label': this.$attrs['aria-label'] || this.label, - 'aria-valuemin': this.min, - 'aria-valuemax': this.max, - 'aria-valuenow': this.internalValue, - 'aria-readonly': String(this.isReadonly), - 'aria-orientation': this.vertical ? 'vertical' : 'horizontal', - }, - on: { - focus: onFocus, - blur: onBlur, - keydown: this.onKeyDown, - }, - }), children) - }, - genThumbLabelContent (value: number | string): ScopedSlotChildren { - return this.$scopedSlots['thumb-label'] - ? this.$scopedSlots['thumb-label']!({ value }) - : [this.$createElement('span', [String(value)])] - }, - genThumbLabel (content: ScopedSlotChildren): VNode { - const size = convertToUnit(this.thumbSize) - - const transform = this.vertical - ? `translateY(20%) translateY(${(Number(this.thumbSize) / 3) - 1}px) translateX(55%) rotate(135deg)` - : `translateY(-20%) translateY(-12px) translateX(-50%) rotate(45deg)` - - return this.$createElement(VScaleTransition, { - props: { origin: 'bottom center' }, - }, [ - this.$createElement('div', { - staticClass: 'v-slider__thumb-label-container', - directives: [{ - name: 'show', - value: this.isFocused || this.isActive || this.thumbLabel === 'always', - }], - }, [ - this.$createElement('div', this.setBackgroundColor(this.computedThumbColor, { - staticClass: 'v-slider__thumb-label', - style: { - height: size, - width: size, - transform, - }, - }), [this.$createElement('div', content)]), - ]), - ]) - }, - genThumb (): VNode { - return this.$createElement('div', this.setBackgroundColor(this.computedThumbColor, { - staticClass: 'v-slider__thumb', - })) - }, - getThumbContainerStyles (width: number): object { - const direction = this.vertical ? 'top' : 'left' - let value = this.$vuetify.rtl ? 100 - width : width - value = this.vertical ? 100 - value : value - - return { - transition: this.trackTransition, - [direction]: `${value}%`, - } - }, - onSliderMouseDown (e: MouseEvent | TouchEvent) { - e.preventDefault() - - this.oldValue = this.internalValue - this.isActive = true - - if ((e.target as Element)?.matches('.v-slider__thumb-container, .v-slider__thumb-container *')) { - this.thumbPressed = true - const domRect = (e.target as Element).getBoundingClientRect() - const touch = 'touches' in e ? e.touches[0] : e - this.startOffset = this.vertical - ? touch.clientY - (domRect.top + domRect.height / 2) - : touch.clientX - (domRect.left + domRect.width / 2) - } else { - this.startOffset = 0 - window.clearTimeout(this.mouseTimeout) - this.mouseTimeout = window.setTimeout(() => { - this.thumbPressed = true - }, 300) - } - - const mouseUpOptions = passiveSupported ? { passive: true, capture: true } : true - const mouseMoveOptions = passiveSupported ? { passive: true } : false - - const isTouchEvent = 'touches' in e - - this.onMouseMove(e) - this.app.addEventListener(isTouchEvent ? 'touchmove' : 'mousemove', this.onMouseMove, mouseMoveOptions) - addOnceEventListener(this.app, isTouchEvent ? 'touchend' : 'mouseup', this.onSliderMouseUp, mouseUpOptions) - - this.$emit('start', this.internalValue) - }, - onSliderMouseUp (e: Event) { - e.stopPropagation() - window.clearTimeout(this.mouseTimeout) - this.thumbPressed = false - const mouseMoveOptions = passiveSupported ? { passive: true } : false - this.app.removeEventListener('touchmove', this.onMouseMove, mouseMoveOptions) - this.app.removeEventListener('mousemove', this.onMouseMove, mouseMoveOptions) - - this.$emit('mouseup', e) - this.$emit('end', this.internalValue) - if (!deepEqual(this.oldValue, this.internalValue)) { - this.$emit('change', this.internalValue) - this.noClick = true - } - - this.isActive = false - }, - onMouseMove (e: MouseEvent | TouchEvent) { - if (e.type === 'mousemove') { - this.thumbPressed = true - } - this.internalValue = this.parseMouseMove(e) - }, - onKeyDown (e: KeyboardEvent) { - if (!this.isInteractive) return - - const value = this.parseKeyDown(e, this.internalValue) - - if ( - value == null || - value < this.minValue || - value > this.maxValue - ) return - - this.internalValue = value - this.$emit('change', value) - }, - onSliderClick (e: MouseEvent) { - if (this.noClick) { - this.noClick = false - return - } - const thumb = this.$refs.thumb as HTMLElement - thumb.focus() - - this.onMouseMove(e) - this.$emit('change', this.internalValue) - }, - onBlur (e: Event) { - this.isFocused = false - - this.$emit('blur', e) - }, - onFocus (e: Event) { - this.isFocused = true - - this.$emit('focus', e) - }, - parseMouseMove (e: MouseEvent | TouchEvent) { - const start = this.vertical ? 'top' : 'left' - const length = this.vertical ? 'height' : 'width' - const click = this.vertical ? 'clientY' : 'clientX' - - const { - [start]: trackStart, - [length]: trackLength, - } = this.$refs.track.getBoundingClientRect() - const clickOffset = 'touches' in e ? e.touches[0][click] : e[click] - - // It is possible for left to be NaN, force to number - let clickPos = Math.min(Math.max((clickOffset - trackStart - this.startOffset) / trackLength, 0), 1) || 0 - - if (this.vertical) clickPos = 1 - clickPos - if (this.$vuetify.rtl) clickPos = 1 - clickPos - - return parseFloat(this.min) + clickPos * (this.maxValue - this.minValue) - }, - parseKeyDown (e: KeyboardEvent, value: number) { - if (!this.isInteractive) return - - const { pageup, pagedown, end, home, left, right, down, up } = keyCodes - - if (![pageup, pagedown, end, home, left, right, down, up].includes(e.keyCode)) return - - e.preventDefault() - const step = this.stepNumeric || 1 - const steps = (this.maxValue - this.minValue) / step - if ([left, right, down, up].includes(e.keyCode)) { - const increase = this.$vuetify.rtl ? [left, up] : [right, up] - const direction = increase.includes(e.keyCode) ? 1 : -1 - const multiplier = e.shiftKey ? 3 : (e.ctrlKey ? 2 : 1) - - value = value + (direction * step * multiplier) - } else if (e.keyCode === home) { - value = this.minValue - } else if (e.keyCode === end) { - value = this.maxValue - } else { - const direction = e.keyCode === pagedown ? 1 : -1 - value = value - (direction * step * (steps > 100 ? steps / 10 : 10)) - } - - return value - }, - roundValue (value: number): number { - if (!this.stepNumeric) return value - // Format input value using the same number - // of decimals places as in the step prop - const trimmedStep = this.step.toString().trim() - const decimals = trimmedStep.indexOf('.') > -1 - ? (trimmedStep.length - trimmedStep.indexOf('.') - 1) - : 0 - const offset = this.minValue % this.stepNumeric - - const newValue = Math.round((value - offset) / this.stepNumeric) * this.stepNumeric + offset - - return parseFloat(Math.min(newValue, this.maxValue).toFixed(decimals)) - }, - }, -}) diff --git a/packages/vuetify/src/components/VSlider/VSlider.tsx b/packages/vuetify/src/components/VSlider/VSlider.tsx new file mode 100644 index 00000000000..8a66a951065 --- /dev/null +++ b/packages/vuetify/src/components/VSlider/VSlider.tsx @@ -0,0 +1,140 @@ +// Styles +import './VSlider.sass' + +// Components +import { VInput } from '../VInput' +import { VSliderThumb } from './VSliderThumb' +import { VSliderTrack } from './VSliderTrack' + +// Composables +import { useProxiedModel } from '@/composables/proxiedModel' +import { useFocus } from '@/composables/focus' +import { makeSliderProps, useSlider } from './slider' + +// Helpers +import { defineComponent } from '@/util' + +// Types +import { computed, ref } from 'vue' +import { filterInputProps, makeVInputProps } from '../VInput/VInput' + +export const VSlider = defineComponent({ + name: 'VSlider', + + props: { + ...makeSliderProps(), + ...makeVInputProps(), + + modelValue: { + type: [Number, String], + default: 0, + }, + }, + + emits: { + 'update:modelValue': (v: number) => true, + }, + + setup (props, { attrs, slots }) { + const thumbContainerRef = ref() + + const { + min, + max, + mousePressed, + roundValue, + onSliderMousedown, + onSliderTouchstart, + trackContainerRef, + position, + hasLabels, + } = useSlider({ + props, + // eslint-disable-next-line @typescript-eslint/no-use-before-define + handleSliderMouseUp: newValue => model.value = roundValue(newValue), + // eslint-disable-next-line @typescript-eslint/no-use-before-define + handleMouseMove: newValue => model.value = roundValue(newValue), + getActiveThumb: () => thumbContainerRef.value?.$el, + }) + + const model = useProxiedModel( + props, + 'modelValue', + undefined, + v => { + const value = typeof v === 'string' ? parseFloat(v) : v == null ? min.value : v + + return roundValue(value) + }, + ) + + const { isFocused, focus, blur } = useFocus() + const trackStop = computed(() => position(model.value)) + + return () => { + const [inputProps, _] = filterInputProps(props) + + return ( + <VInput + class={[ + 'v-slider', + { + 'v-slider--has-labels': !!slots['tick-label'] || hasLabels.value, + 'v-slider--focused': isFocused.value, + 'v-slider--pressed': mousePressed.value, + 'v-slider--disabled': props.disabled, + }, + ]} + { ...inputProps } + focused={ isFocused.value } + v-slots={{ + ...slots, + default: ({ id }) => ( + <div + class="v-slider__container" + onMousedown={ onSliderMousedown } + onTouchstartPassive={ onSliderTouchstart } + > + <input + id={ id.value } + name={ props.name || id.value } + disabled={ props.disabled } + readonly={ props.readonly } + tabindex="-1" + value={ model.value } + /> + + <VSliderTrack + ref={ trackContainerRef } + start={ 0 } + stop={ trackStop.value } + v-slots={{ + 'tick-label': slots['tick-label'], + }} + /> + + <VSliderThumb + ref={ thumbContainerRef } + focused={ isFocused.value } + min={ min.value } + max={ max.value } + modelValue={ model.value } + onUpdate:modelValue={ v => (model.value = v) } + position={ trackStop.value } + elevation={ props.elevation } + onFocus={ focus } + onBlur={ blur } + v-slots={{ + 'thumb-label': slots['thumb-label'], + }} + /> + </div> + ), + }} + /> + ) + } + }, +}) + +export type VSlider = InstanceType<typeof VSlider> diff --git a/packages/vuetify/src/components/VSlider/VSliderThumb.sass b/packages/vuetify/src/components/VSlider/VSliderThumb.sass new file mode 100644 index 00000000000..bfab4f523c9 --- /dev/null +++ b/packages/vuetify/src/components/VSlider/VSliderThumb.sass @@ -0,0 +1,139 @@ +// Imports +@forward './variables' +@use 'sass:map' +@use 'sass:selector' +@use 'sass:math' +@use '../../styles/settings' +@use '../../styles/tools' +@use './variables' as * + +// Theme +.v-slider-thumb + color: rgb(var(--v-theme-surface-variant)) + +.v-slider-thumb__label + background: rgba(var(--v-theme-surface-variant), .7) + color: rgb(var(--v-theme-on-surface-variant)) + + &::before + color: rgba(var(--v-theme-surface-variant), .7) + +// Block +.v-slider-thumb + outline: none + position: absolute + transition: $slider-transition + +.v-slider-thumb__surface + cursor: pointer + width: var(--v-slider-thumb-size) + height: var(--v-slider-thumb-size) + border-radius: $slider-thumb-border-radius + user-select: none + background-color: currentColor + + &::before + transition: 0.3s settings.$standard-easing + content: '' + color: inherit + width: 100% + height: 100% + border-radius: $slider-thumb-border-radius + background: currentColor + position: absolute + pointer-events: none + opacity: 0 + + &::after + content: '' + width: $slider-thumb-touch-size + height: $slider-thumb-touch-size + position: absolute + top: 50% + left: 50% + transform: translate(-50%, -50%) + +.v-slider-thumb__label-container + position: absolute + transition: $slider-thumb-label-transition + +.v-slider-thumb__label + display: flex + align-items: center + justify-content: center + font-size: $slider-thumb-label-font-size + width: $slider-thumb-label-width + height: $slider-thumb-label-height + border-radius: $slider-thumb-label-border-radius + position: absolute + user-select: none + transition: $slider-thumb-label-transition + + &::before + content: '' + width: 0 + height: 0 + position: absolute + +.v-slider-thumb__ripple + position: absolute + left: calc(var(--v-slider-thumb-size) / -2) + top: calc(var(--v-slider-thumb-size) / -2) + width: calc(var(--v-slider-thumb-size) * 2) + height: calc(var(--v-slider-thumb-size) * 2) + background: inherit + +// Horizontal +.v-slider.v-input--horizontal + .v-slider-thumb + top: 50% + transform: translateY(-50%) + + .v-slider-thumb__label-container + left: calc(var(--v-slider-thumb-size) / 2) + top: 0 + + .v-slider-thumb__label + left: math.div($slider-thumb-label-width, -2) + bottom: $slider-thumb-label-offset + + &::before + border-left: $slider-thumb-label-wedge-size solid transparent + border-right: $slider-thumb-label-wedge-size solid transparent + border-top: $slider-thumb-label-wedge-size solid currentColor + bottom: -$slider-thumb-label-wedge-size + +// Vertical +.v-slider.v-input--vertical + .v-slider-thumb__label-container + top: calc(var(--v-slider-thumb-size) / 2) + right: 0 + + .v-slider-thumb__label + top: math.div($slider-thumb-label-height, -2) + left: $slider-thumb-label-offset + + &::before + border-right: $slider-thumb-label-wedge-size solid currentColor + border-top: $slider-thumb-label-wedge-size solid transparent + border-bottom: $slider-thumb-label-wedge-size solid transparent + left: -$slider-thumb-label-wedge-size + +// Modifiers +.v-slider-thumb--focused, .v-slider-thumb:hover + .v-slider-thumb__surface::before + transform: scale(2) + +.v-slider-thumb--focused + .v-slider-thumb__surface::before + opacity: $slider-thumb-focus-opacity + +.v-slider-thumb--pressed + transition: none + + .v-slider-thumb__surface::before + opacity: $slider-thumb-pressed-opacity + +.v-slider-thumb:hover:not(.v-slider-thumb--focused) + .v-slider-thumb__surface::before + opacity: $slider-thumb-hover-opacity diff --git a/packages/vuetify/src/components/VSlider/VSliderThumb.tsx b/packages/vuetify/src/components/VSlider/VSliderThumb.tsx new file mode 100644 index 00000000000..53da70d05ce --- /dev/null +++ b/packages/vuetify/src/components/VSlider/VSliderThumb.tsx @@ -0,0 +1,179 @@ +// Styles +import './VSliderThumb.sass' + +// Components +import { VScaleTransition } from '../transitions' +import { VSliderSymbol } from './slider' +import { useElevation } from '@/composables/elevation' + +// Directives +import Ripple from '@/directives/ripple' + +// Composables +import { useTextColor } from '@/composables/color' + +// Utilities +import { computed, inject } from 'vue' +import { convertToUnit, defineComponent, keyValues } from '@/util' + +export const VSliderThumb = defineComponent({ + name: 'VSliderThumb', + + directives: { Ripple }, + + props: { + focused: Boolean, + max: { + type: Number, + required: true, + }, + min: { + type: Number, + required: true, + }, + modelValue: { + type: Number, + required: true, + }, + position: { + type: Number, + required: true, + }, + }, + + emits: { + 'update:modelValue': (v: number) => true, + }, + + setup (props, { slots, emit }) { + const slider = inject(VSliderSymbol) + + if (!slider) throw new Error('[Vuetify] v-slider-thumb must be used inside v-slider or v-range-slider') + + const { + thumbColor, + step, + vertical, + disabled, + thumbSize, + thumbLabel, + direction, + label, + readonly, + elevation, + isReversed, + horizontalDirection, + mousePressed, + } = slider + + const { textColorClasses, textColorStyles } = useTextColor(thumbColor) + + const { pageup, pagedown, end, home, left, right, down, up } = keyValues + const relevantKeys = [pageup, pagedown, end, home, left, right, down, up] + + const multipliers = computed(() => { + if (step.value) return [1, 2, 3] + else return [1, 5, 10] + }) + + function parseKeydown (e: KeyboardEvent, value: number) { + if (!relevantKeys.includes(e.key)) return + + e.preventDefault() + + const _step = step.value || 0.1 + const steps = (props.max - props.min) / _step + if ([left, right, down, up].includes(e.key)) { + const increase = isReversed.value ? [left, up] : [right, up] + const direction = increase.includes(e.key) ? 1 : -1 + const multiplier = e.shiftKey ? 2 : (e.ctrlKey ? 1 : 0) + + value = value + (direction * _step * multipliers.value[multiplier]) + } else if (e.key === home) { + value = props.min + } else if (e.key === end) { + value = props.max + } else { + const direction = e.key === pagedown ? 1 : -1 + value = value - (direction * _step * (steps > 100 ? steps / 10 : 10)) + } + + return Math.max(props.min, Math.min(props.max, value)) + } + + function onKeydown (e: KeyboardEvent) { + const newValue = parseKeydown(e, props.modelValue) + + newValue != null && emit('update:modelValue', newValue) + } + + return () => { + const positionPercentage = convertToUnit(vertical.value ? 100 - props.position : props.position, '%') + const inset = vertical.value ? 'block' : 'inline' + const { elevationClasses } = useElevation(computed(() => !disabled.value ? elevation.value : undefined)) + + return ( + <div + class={[ + 'v-slider-thumb', + { + 'v-slider-thumb--focused': props.focused, + 'v-slider-thumb--pressed': props.focused && mousePressed.value, + }, + ]} + style={{ + [`inset-${inset}-start`]: `calc(${positionPercentage} - var(--v-slider-thumb-size) / 2)`, + '--v-slider-thumb-size': convertToUnit(thumbSize.value), + direction: !vertical.value ? horizontalDirection.value : undefined, + }} + role="slider" + tabindex={ disabled.value ? -1 : 0 } + aria-label={ label.value } + aria-valuemin={ props.min } + aria-valuemax={ props.max } + aria-valuenow={ props.modelValue } + aria-readonly={ readonly.value } + aria-orientation={ direction.value } + onKeydown={ onKeydown } + > + <div + class={[ + 'v-slider-thumb__surface', + textColorClasses.value, + elevationClasses.value, + ]} + style={{ + ...textColorStyles.value, + }} + /> + <div + class={[ + 'v-slider-thumb__ripple', + textColorClasses.value, + ]} + style={ textColorStyles.value } + v-ripple={[true, null, ['circle', 'center']]} + /> + <VScaleTransition origin="bottom center"> + <div + class="v-slider-thumb__label-container" + v-show={ (thumbLabel.value && props.focused) || thumbLabel.value === 'always' } + > + <div + class={[ + 'v-slider-thumb__label', + ]} + > + <div> + { slots['thumb-label']?.({ modelValue: props.modelValue }) ?? props.modelValue.toFixed(1) } + </div> + </div> + </div> + </VScaleTransition> + </div> + ) + } + }, +}) + +export type VSliderThumb = InstanceType<typeof VSliderThumb> diff --git a/packages/vuetify/src/components/VSlider/VSliderTrack.sass b/packages/vuetify/src/components/VSlider/VSliderTrack.sass new file mode 100644 index 00000000000..953f91d6bc6 --- /dev/null +++ b/packages/vuetify/src/components/VSlider/VSliderTrack.sass @@ -0,0 +1,156 @@ +// Imports +@forward './variables' +@use 'sass:map' +@use 'sass:selector' +@use '../../styles/settings' +@use '../../styles/tools' +@use './variables' as * + +// Theme +.v-slider-track__background + background-color: rgb(var(--v-theme-surface-variant)) + +.v-slider-track__fill + background-color: rgb(var(--v-theme-surface-variant)) + +.v-slider-track__tick + background-color: rgb(var(--v-theme-surface-variant)) + + &--filled + background-color: rgb(var(--v-theme-on-surface-variant)) + +// Elements +.v-slider-track + border-radius: $slider-track-border-radius + +.v-slider-track + &__background, &__fill + position: absolute + transition: $slider-transition + border-radius: inherit + + .v-slider--pressed & + transition: none + +.v-slider-track__ticks + height: 100% + width: 100% + position: relative + +.v-slider-track__tick + position: absolute + opacity: 0 + transition: 0.2s opacity settings.$standard-easing + border-radius: $slider-tick-border-radius + width: var(--v-slider-tick-size) + height: var(--v-slider-tick-size) + transform: translate(calc(var(--v-slider-tick-size) / -2), calc(var(--v-slider-tick-size) / -2)) + + &:first-child .v-slider-track__tick-label + @include tools.ltr() + transform: none + + @include tools.rtl() + transform: translateX(100%) + + &:last-child .v-slider-track__tick-label + @include tools.ltr() + transform: translateX(-100%) + + @include tools.rtl() + transform: none + +.v-slider-track__tick-label + position: absolute + user-select: none + white-space: nowrap + +// Horizontal +.v-slider.v-input--horizontal + .v-slider-track + display: flex + align-items: center + width: 100% + height: calc(var(--v-slider-track-size) + 2px) + touch-action: pan-y + + &__background + height: var(--v-slider-track-size) + + &__fill + height: inherit + + .v-slider-track__tick + margin-block-start: calc((var(--v-slider-track-size) / 2) + 1px) + + @include tools.rtl() + transform: translate(calc(var(--v-slider-tick-size) / 2), calc(var(--v-slider-tick-size) / -2)) + + &:first-child + margin-inline-start: calc(var(--v-slider-tick-size) + 1px) + + .v-slider-track__tick-label + @include tools.ltr() + transform: translateX(0%) + + @include tools.rtl() + transform: translateX(0%) + + &:last-child + margin-inline-start: calc(100% - var(--v-slider-tick-size) - 1px) + + .v-slider-track__tick-label + @include tools.ltr() + transform: translateX(-100%) + + @include tools.rtl() + transform: translateX(100%) + + .v-slider-track__tick-label + bottom: calc((var(--v-slider-track-size) / -2) - #{$slider-tick-label-margin-bottom}) + + @include tools.ltr() + transform: translateX(-50%) + + @include tools.rtl() + transform: translateX(50%) + +// Vertical +.v-slider.v-input--vertical + .v-slider-track + height: 100% + display: flex + justify-content: center + width: calc(var(--v-slider-track-size, $slider-track-width) + 2px) + touch-action: pan-x + + &__background + width: var(--v-slider-track-size) + + &__fill + width: inherit + + .v-slider-track__ticks + height: 100% + + .v-slider-track__tick + margin-inline-start: calc((var(--v-slider-track-size) / 2) + 1px) + transform: translate(calc(var(--v-slider-tick-size) / -2), calc(var(--v-slider-tick-size) / 2)) + + @include tools.rtl() + transform: translate(calc(var(--v-slider-tick-size) / 2), calc(var(--v-slider-tick-size) / 2)) + + &:last-child + inset-block-end: calc(0% + var(--v-slider-tick-size) + 1px) + + .v-slider-track__tick-label + margin-inline-start: calc(var(--v-slider-track-size) + 20px) + transform: translateY(-50%) + +// Modifiers +.v-slider-track__ticks--always-show, .v-slider--focused + .v-slider-track__tick + opacity: 1 + +.v-slider-track__background--opacity + opacity: 0.38 diff --git a/packages/vuetify/src/components/VSlider/VSliderTrack.tsx b/packages/vuetify/src/components/VSlider/VSliderTrack.tsx new file mode 100644 index 00000000000..90a7cf2350e --- /dev/null +++ b/packages/vuetify/src/components/VSlider/VSliderTrack.tsx @@ -0,0 +1,165 @@ +// Styles +import './VSliderTrack.sass' + +// Components +import { VSliderSymbol } from './slider' + +// Composables +import { useBackgroundColor } from '@/composables/color' +import { useRounded } from '@/composables/rounded' + +// Utilities +import { computed, inject } from 'vue' +import { convertToUnit, defineComponent } from '@/util' + +export const VSliderTrack = defineComponent({ + name: 'VSliderTrack', + + props: { + start: { + type: Number, + required: true, + }, + stop: { + type: Number, + required: true, + }, + }, + + emits: {}, + + setup (props, { slots }) { + const slider = inject(VSliderSymbol) + + if (!slider) throw new Error('[Vuetify] v-slider-track must be inside v-slider or v-range-slider') + + const { + trackColor, + trackFillColor, + vertical, + tickSize, + showTicks, + trackSize, + color, + rounded, + parsedTicks, + horizontalDirection, + } = slider + + const { roundedClasses } = useRounded(rounded, 'v-slider-track') + + const { + backgroundColorClasses: trackFillColorClasses, + backgroundColorStyles: trackFillColorStyles, + } = useBackgroundColor(trackFillColor) + + const { + backgroundColorClasses: trackColorClasses, + backgroundColorStyles: trackColorStyles, + } = useBackgroundColor(trackColor) + + const startDir = computed(() => `inset-${vertical.value ? 'block-end' : 'inline-start'}`) + const endDir = computed(() => vertical.value ? 'height' : 'width') + + const backgroundStyles = computed(() => { + return { + [startDir.value]: '0%', + [endDir.value]: '100%', + } + }) + + const trackFillWidth = computed(() => props.stop - props.start) + + const trackFillStyles = computed(() => { + return { + [startDir.value]: convertToUnit(props.start, '%'), + [endDir.value]: convertToUnit(trackFillWidth.value, '%'), + } + }) + + const computedTicks = computed(() => { + const ticks = vertical.value ? parsedTicks.value.slice().reverse() : parsedTicks.value + + return ticks.map((tick, index) => { + const directionProperty = vertical.value ? 'inset-block-end' : 'margin-inline-start' + return ( + <div + key={ tick.value } + class={[ + 'v-slider-track__tick', + { + 'v-slider-track__tick--filled': tick.position >= props.start && tick.position <= props.stop, + }, + ]} + style={{ + [directionProperty]: (tick.position > 0 && tick.position < 100) && convertToUnit(tick.position, '%'), + }} + > + { + (tick.label || slots['tick-label']) && ( + <div class="v-slider-track__tick-label"> + { slots['tick-label']?.({ tick, index }) ?? tick.label } + </div> + ) + } + </div> + ) + }) + }) + + return () => { + return ( + <div + class={[ + 'v-slider-track', + roundedClasses.value, + ]} + style={{ + '--v-slider-track-size': convertToUnit(trackSize.value), + '--v-slider-tick-size': convertToUnit(tickSize.value), + direction: !vertical.value ? horizontalDirection.value : undefined, + }} + > + <div + class={[ + 'v-slider-track__background', + trackColorClasses.value, + { + 'v-slider-track__background--opacity': !!color.value || !trackFillColor.value, + }, + ]} + style={{ + ...backgroundStyles.value, + ...trackColorStyles.value, + }} + /> + <div + class={[ + 'v-slider-track__fill', + trackFillColorClasses.value, + ]} + style={{ + ...trackFillStyles.value, + ...trackFillColorStyles.value, + }} + /> + + { showTicks.value && ( + <div + class={[ + 'v-slider-track__ticks', + { + 'v-slider-track__ticks--always-show': showTicks.value === 'always', + }, + ]} + > + { computedTicks.value } + </div> + ) } + </div> + ) + } + }, +}) + +export type VSliderTrack = InstanceType<typeof VSliderTrack> diff --git a/packages/vuetify/src/components/VSlider/_variables.scss b/packages/vuetify/src/components/VSlider/_variables.scss index bcae2df70be..c59287be807 100644 --- a/packages/vuetify/src/components/VSlider/_variables.scss +++ b/packages/vuetify/src/components/VSlider/_variables.scss @@ -1,26 +1,30 @@ -@import '../../styles/styles.sass'; +@use '../../styles/settings'; +@use '../../styles/tools'; -$chip-group-no-color-opacity: .22 !default; -$chip-group-opacity: .32 !default; $slider-horizontal-left: 8px !default; $slider-horizontal-min-height: 32px !default; $slider-horizontal-right: 8px !default; $slider-label-margin-end: 12px !default; $slider-label-margin-start: 12px !default; $slider-state-track-background-opacity: 0.4 !default; -$slider-thumb-before-opacity: 0.3 !default; +$slider-thumb-hover-opacity: var(--v-hover-opacity) !default; +$slider-thumb-focus-opacity: var(--v-focus-opacity) !default; +$slider-thumb-pressed-opacity: var(--v-pressed-opacity) !default; $slider-thumb-border-radius: 50% !default; $slider-thumb-focused-size-increase: 24px !default; -$slider-thumb-label-font-size: map-deep-get($typography, 'caption', 'size') !default; -$slider-thumb-label-height: 32px !default; -$slider-thumb-label-transition: .3s map-get($transition, 'fast-in-fast-out') !default; -$slider-thumb-label-width: 32px !default; -$slider-thumb-size: 12px !default; +$slider-thumb-label-font-size: tools.map-deep-get(settings.$typography, 'caption', 'size') !default; +$slider-thumb-label-border-radius: 4px !default; +$slider-thumb-label-height: 25px !default; +$slider-thumb-label-width: 35px !default; +$slider-thumb-label-wedge-size: 6px !default; +$slider-thumb-label-offset: calc(var(--v-slider-thumb-size) / 2) !default; +$slider-thumb-label-transition: .2s settings.$accelerated-easing !default; $slider-thumb-touch-size: 42px !default; -$slider-tick-border-radius: 0 !default; -$slider-track-border-radius: 0 !default; +$slider-tick-border-radius: 2px !default; +$slider-tick-label-margin-bottom: 25px !default; +$slider-track-border-radius: 6px !default; $slider-track-width: 2px !default; -$slider-transition: .3s map-get($transition, 'swing') !default; +$slider-transition: .3s cubic-bezier(0.25, 0.8, 0.5, 1) !default; $slider-vertical-margin-bottom: 12px !default; $slider-vertical-margin-top: 12px !default; -$slider-vertical-min-height: 150px !default; +$slider-vertical-min-height: 300px !default; diff --git a/packages/vuetify/src/components/VSlider/index.ts b/packages/vuetify/src/components/VSlider/index.ts index 2083d316016..cc44fe43c7f 100644 --- a/packages/vuetify/src/components/VSlider/index.ts +++ b/packages/vuetify/src/components/VSlider/index.ts @@ -1,4 +1 @@ -import VSlider from './VSlider' - -export { VSlider } -export default VSlider +export { VSlider } from './VSlider' diff --git a/packages/vuetify/src/components/VSlider/slider.ts b/packages/vuetify/src/components/VSlider/slider.ts new file mode 100644 index 00000000000..8585fb3e47f --- /dev/null +++ b/packages/vuetify/src/components/VSlider/slider.ts @@ -0,0 +1,357 @@ +/* eslint-disable max-statements */ +// Composables +import { useRtl } from '@/composables/rtl' +import { makeRoundedProps } from '@/composables/rounded' +import { makeElevationProps } from '@/composables/elevation' + +// Utilities +import { computed, provide, ref, toRef } from 'vue' +import { clamp, createRange, propsFactory } from '@/util' + +// Types +import type { ExtractPropTypes, InjectionKey, PropType, Ref } from 'vue' +import type { VSliderTrack } from './VSliderTrack' + +type Tick = { + value: number + position: number + label?: string +} + +type SliderProvide = { + color: Ref<string | undefined> + decimals: Ref<number> + direction: Ref<'vertical' | 'horizontal'> + disabled: Ref<boolean | undefined> + elevation: Ref<number | string | undefined> + label: Ref<string | undefined> + min: Ref<number> + max: Ref<number> + mousePressed: Ref<boolean> + numTicks: Ref<number> + onSliderMousedown: (e: MouseEvent) => void + onSliderTouchstart: (e: TouchEvent) => void + parseMouseMove: (e: MouseEvent | TouchEvent) => number + position: (val: number) => number + readonly: Ref<boolean | undefined> + rounded: Ref<boolean | number | string | undefined> + roundValue: (value: number) => number + thumbLabel: Ref<boolean | string | undefined> + showTicks: Ref<boolean | 'always'> + startOffset: Ref<number> + step: Ref<number> + thumbSize: Ref<number> + thumbColor: Ref<string | undefined> + trackColor: Ref<string | undefined> + trackFillColor: Ref<string | undefined> + trackSize: Ref<number> + ticks: Ref<number[] | Record<string, string> | undefined> + tickSize: Ref<number> + trackContainerRef: Ref<VSliderTrack | undefined> + vertical: Ref<boolean> + showTickLabels: Ref<boolean | undefined> + parsedTicks: Ref<Tick[]> + hasLabels: Ref<boolean> + isReversed: Ref<boolean> + horizontalDirection: Ref<'ltr' | 'rtl'> +} + +export const VSliderSymbol: InjectionKey<SliderProvide> = Symbol.for('vuetify:v-slider') + +export function getOffset (e: MouseEvent | TouchEvent, el: HTMLElement, direction: string) { + const vertical = direction === 'vertical' + const rect = el.getBoundingClientRect() + const touch = 'touches' in e ? e.touches[0] : e + return vertical + ? touch.clientY - (rect.top + rect.height / 2) + : touch.clientX - (rect.left + rect.width / 2) +} + +function getPosition (e: MouseEvent | TouchEvent, position: 'clientX' | 'clientY'): number { + if ('touches' in e && e.touches.length) return e.touches[0][position] + else if ('changedTouches' in e && e.changedTouches.length) return e.changedTouches[0][position] + else return (e as MouseEvent)[position] +} + +export const makeSliderProps = propsFactory({ + disabled: Boolean, + readonly: Boolean, + max: { + type: [Number, String], + default: 100, + }, + min: { + type: [Number, String], + default: 0, + }, + step: { + type: [Number, String], + default: 0, + }, + thumbColor: String, + thumbLabel: { + type: [Boolean, String] as PropType<boolean | 'always' | undefined>, + default: undefined, + validator: (v: any) => typeof v === 'boolean' || v === 'always', + }, + thumbSize: { + type: [Number, String], + default: 20, + }, + showTicks: { + type: [Boolean, String] as PropType<boolean | 'always'>, + default: true, + validator: (v: any) => typeof v === 'boolean' || v === 'always', + }, + showTickLabels: { + type: Boolean, + default: false, + }, + ticks: { + type: [Array, Object] as PropType<number[] | Record<string, string>>, + }, + tickSize: { + type: [Number, String], + default: 2, + }, + color: String, + trackColor: String, + trackFillColor: String, + trackSize: { + type: [Number, String], + default: 4, + }, + direction: { + type: String as PropType<'horizontal' | 'vertical'>, + default: 'horizontal', + validator: (v: any) => ['vertical', 'horizontal'].includes(v), + }, + reverse: Boolean, + label: String, + + ...makeRoundedProps(), + ...makeElevationProps({ + elevation: 2, + }), +}, 'slider') + +type SliderProps = ExtractPropTypes<ReturnType<typeof makeSliderProps>> + +export const useSlider = ({ + props, + handleSliderMouseUp, + handleMouseMove, + getActiveThumb, +}: { + props: SliderProps + handleSliderMouseUp: (v: number) => void + handleMouseMove: (v: number) => void + getActiveThumb: (e: MouseEvent | TouchEvent) => HTMLElement +}) => { + const { isRtl } = useRtl() + const isReversed = computed(() => isRtl.value !== props.reverse) + const horizontalDirection = computed(() => { + let hd: 'ltr' | 'rtl' = isRtl.value ? 'rtl' : 'ltr' + + if (props.reverse) { + hd = hd === 'rtl' ? 'ltr' : 'rtl' + } + + return hd + }) + const min = computed(() => parseFloat(props.min)) + const max = computed(() => parseFloat(props.max)) + const step = computed(() => props.step > 0 ? parseFloat(props.step) : 0) + const decimals = computed(() => { + const trimmedStep = step.value.toString().trim() + return trimmedStep.includes('.') + ? (trimmedStep.length - trimmedStep.indexOf('.') - 1) + : 0 + }) + + const thumbSize = computed(() => parseInt(props.thumbSize, 10)) + const tickSize = computed(() => parseInt(props.tickSize, 10)) + const trackSize = computed(() => parseInt(props.trackSize, 10)) + const numTicks = computed(() => (max.value - min.value) / step.value) + const disabled = toRef(props, 'disabled') + const vertical = computed(() => props.direction === 'vertical') + + const thumbColor = computed(() => props.disabled ? undefined : props.thumbColor ?? props.color) + const trackColor = computed(() => props.disabled ? undefined : props.trackColor ?? props.color) + const trackFillColor = computed(() => props.disabled ? undefined : props.trackFillColor ?? props.color) + + const mousePressed = ref(false) + + const startOffset = ref(0) + const trackContainerRef = ref<VSliderTrack | undefined>() + + function roundValue (value: number) { + if (step.value <= 0) return value + + const clamped = clamp(value, min.value, max.value) + const offset = min.value % step.value + const newValue = Math.round((clamped - offset) / step.value) * step.value + offset + + return parseFloat(Math.min(newValue, max.value).toFixed(decimals.value)) + } + + function parseMouseMove (e: MouseEvent | TouchEvent): number { + const vertical = props.direction === 'vertical' + const start = vertical ? 'top' : 'left' + const length = vertical ? 'height' : 'width' + const position = vertical ? 'clientY' : 'clientX' + + const { + [start]: trackStart, + [length]: trackLength, + } = trackContainerRef.value?.$el.getBoundingClientRect() + const clickOffset = getPosition(e, position) + + // It is possible for left to be NaN, force to number + let clickPos = Math.min(Math.max((clickOffset - trackStart - startOffset.value) / trackLength, 0), 1) || 0 + + if (vertical || isReversed.value) clickPos = 1 - clickPos + + return roundValue(min.value + clickPos * (max.value - min.value)) + } + + let thumbMoved = false + + const handleStop = (e: MouseEvent | TouchEvent) => { + if (!thumbMoved) { + startOffset.value = 0 + handleSliderMouseUp(parseMouseMove(e)) + } + + mousePressed.value = false + thumbMoved = false + startOffset.value = 0 + } + + const handleStart = (e: MouseEvent | TouchEvent) => { + const activeThumb = getActiveThumb(e) + + if (!activeThumb) return + + activeThumb.focus() + mousePressed.value = true + + if (activeThumb.contains(e.target as Node)) { + thumbMoved = true + startOffset.value = getOffset(e, activeThumb, props.direction) + } else { + startOffset.value = 0 + handleMouseMove(parseMouseMove(e)) + } + } + + const moveListenerOptions = { passive: true, capture: true } + + function onMouseMove (e: MouseEvent | TouchEvent) { + thumbMoved = true + handleMouseMove(parseMouseMove(e)) + } + + function onSliderMouseUp (e: MouseEvent) { + e.stopPropagation() + e.preventDefault() + + handleStop(e) + + window.removeEventListener('mousemove', onMouseMove, moveListenerOptions) + window.removeEventListener('mouseup', onSliderMouseUp) + } + + function onSliderTouchend (e: TouchEvent) { + e.stopPropagation() + e.preventDefault() + + handleStop(e) + + window.removeEventListener('touchmove', onMouseMove, moveListenerOptions) + window.removeEventListener('touchend', onSliderTouchend) + } + + function onSliderTouchstart (e: TouchEvent) { + handleStart(e) + + window.addEventListener('touchmove', onMouseMove, moveListenerOptions) + window.addEventListener('touchend', onSliderTouchend, { passive: false }) + } + + function onSliderMousedown (e: MouseEvent) { + e.preventDefault() + + handleStart(e) + + window.addEventListener('mousemove', onMouseMove, moveListenerOptions) + window.addEventListener('mouseup', onSliderMouseUp, { passive: false }) + } + + const position = (val: number) => { + const percentage = (val - min.value) / (max.value - min.value) * 100 + return clamp(isNaN(percentage) ? 0 : percentage, 0, 100) + } + + const parsedTicks = computed<Tick[]>(() => { + if (!props.ticks) { + return numTicks.value !== Infinity ? createRange(numTicks.value + 1).map(t => { + const value = min.value + (t * step.value) + return { + value, + position: position(value), + } + }) : [] + } + if (Array.isArray(props.ticks)) return props.ticks.map(t => ({ value: t, position: position(t), label: t.toString() })) + return Object.keys(props.ticks).map(key => ({ + value: parseInt(key, 10), + position: position(parseInt(key, 10)), + label: (props.ticks as Record<string, string>)[key], + })) + }) + + const hasLabels = computed(() => parsedTicks.value.some(({ label }) => !!label)) + + const data: SliderProvide = { + color: toRef(props, 'color'), + decimals, + disabled, + direction: toRef(props, 'direction'), + elevation: toRef(props, 'elevation'), + hasLabels, + horizontalDirection, + isReversed, + label: toRef(props, 'label'), + min, + max, + mousePressed, + numTicks, + onSliderMousedown, + onSliderTouchstart, + parsedTicks, + parseMouseMove, + position, + readonly: toRef(props, 'readonly'), + rounded: toRef(props, 'rounded'), + roundValue, + showTickLabels: toRef(props, 'showTickLabels'), + showTicks: toRef(props, 'showTicks'), + startOffset, + step, + thumbSize, + thumbColor, + thumbLabel: toRef(props, 'thumbLabel'), + ticks: toRef(props, 'ticks'), + tickSize, + trackColor, + trackContainerRef, + trackFillColor, + trackSize, + vertical, + } + + provide(VSliderSymbol, data) + + return data +} diff --git a/packages/vuetify/src/components/VTooltip/_variables.scss b/packages/vuetify/src/components/VTooltip/_variables.scss index 55463984a85..5683a639f89 100644 --- a/packages/vuetify/src/components/VTooltip/_variables.scss +++ b/packages/vuetify/src/components/VTooltip/_variables.scss @@ -1,7 +1,7 @@ @use '../../styles/settings'; -$tooltip-background-color: rgba(var(--v-theme-on-surface), 0.5) !default; -$tooltip-text-color: rgb(var(--v-theme-surface)) !default; +$tooltip-background-color: rgba(var(--v-theme-surface-variant), .7) !default; +$tooltip-text-color: rgb(var(--v-theme-on-surface-variant)) !default; $tooltip-border-radius: settings.$border-radius-root !default; $tooltip-font-size: .875rem !default; $tooltip-line-height: 1.6 !default; diff --git a/packages/vuetify/src/components/index.ts b/packages/vuetify/src/components/index.ts index c911398536f..41523751108 100644 --- a/packages/vuetify/src/components/index.ts +++ b/packages/vuetify/src/components/index.ts @@ -59,9 +59,9 @@ export * from './VParallax' // export * from './VPicker' export * from './VProgressCircular' export * from './VProgressLinear' -export * from './VRadioGroup' -// export * from './VRangeSlider' export * from './VRadio' +export * from './VRadioGroup' +export * from './VRangeSlider' export * from './VRating' export * from './VResponsive' // export * from './VSelect' @@ -70,7 +70,7 @@ export * from './VSelectionControlGroup' export * from './VSheet' // export * from './VSkeletonLoader' // export * from './VSlideGroup' -// export * from './VSlider' +export * from './VSlider' // export * from './VSnackbar' // export * from './VSparkline' // export * from './VSpeedDial' diff --git a/packages/vuetify/src/composables/__tests__/__snapshots__/theme.spec.ts.snap b/packages/vuetify/src/composables/__tests__/__snapshots__/theme.spec.ts.snap index 2aee2e54554..ddcdf70e245 100644 --- a/packages/vuetify/src/composables/__tests__/__snapshots__/theme.spec.ts.snap +++ b/packages/vuetify/src/composables/__tests__/__snapshots__/theme.spec.ts.snap @@ -11,6 +11,9 @@ exports[`createTheme should create style element 1`] = ` --v-theme-background-overlay-multiplier: 1; --v-theme-surface: 255,255,255; --v-theme-surface-overlay-multiplier: 1; + --v-theme-surface-variant: 66,66,66; + --v-theme-surface-variant-overlay-multiplier: 2; + --v-theme-on-surface-variant: 238,238,238; --v-theme-primary: 98,0,238; --v-theme-primary-overlay-multiplier: 2; --v-theme-primary-darken-1: 55,0,179; @@ -42,13 +45,13 @@ exports[`createTheme should create style element 1`] = ` --v-high-emphasis-opacity: 0.87; --v-medium-emphasis-opacity: 0.6; --v-disabled-opacity: 0.38; - --v-activated-opacity: 0.12; --v-idle-opacity: 0.04; - --v-hover-opacity: 0.12; + --v-hover-opacity: 0.04; --v-focus-opacity: 0.12; --v-selected-opacity: 0.08; + --v-activated-opacity: 0.12; + --v-pressed-opacity: 0.12; --v-dragged-opacity: 0.08; - --v-pressed-opacity: 0.16; --v-kbd-background-color: 33, 37, 41; --v-kbd-color: 255, 255, 255; --v-code-background-color: 194, 194, 194; @@ -58,6 +61,9 @@ exports[`createTheme should create style element 1`] = ` --v-theme-background-overlay-multiplier: 1; --v-theme-surface: 33,33,33; --v-theme-surface-overlay-multiplier: 1; + --v-theme-surface-variant: 189,189,189; + --v-theme-surface-variant-overlay-multiplier: 2; + --v-theme-on-surface-variant: 66,66,66; --v-theme-primary: 187,134,252; --v-theme-primary-overlay-multiplier: 2; --v-theme-primary-darken-1: 55,0,179; @@ -89,13 +95,13 @@ exports[`createTheme should create style element 1`] = ` --v-high-emphasis-opacity: 0.87; --v-medium-emphasis-opacity: 0.6; --v-disabled-opacity: 0.38; - --v-activated-opacity: 0.12; --v-idle-opacity: 0.1; --v-hover-opacity: 0.04; --v-focus-opacity: 0.12; --v-selected-opacity: 0.08; - --v-dragged-opacity: 0.08; + --v-activated-opacity: 0.12; --v-pressed-opacity: 0.16; + --v-dragged-opacity: 0.08; --v-kbd-background-color: 33, 37, 41; --v-kbd-color: 255, 255, 255; --v-code-background-color: 183, 183, 183; @@ -122,6 +128,20 @@ exports[`createTheme should create style element 1`] = ` .border-surface { --v-border-color: var(--v-theme-surface); } + .bg-surface-variant { + --v-theme-overlay-multiplier: var(--v-theme-surface-variant-overlay-multiplier); + background: rgb(var(--v-theme-surface-variant)); + color: rgb(var(--v-theme-on-surface-variant)); + } + .text-surface-variant { + color: rgb(var(--v-theme-surface-variant)); + } + .border-surface-variant { + --v-border-color: var(--v-theme-surface-variant); + } + .on-surface-variant { + color: rgb(var(--v-theme-on-surface-variant)); + } .bg-primary { --v-theme-overlay-multiplier: var(--v-theme-primary-overlay-multiplier); background: rgb(var(--v-theme-primary)); diff --git a/packages/vuetify/src/composables/elevation.ts b/packages/vuetify/src/composables/elevation.ts index 8a2f1bf2a18..56089addffd 100644 --- a/packages/vuetify/src/composables/elevation.ts +++ b/packages/vuetify/src/composables/elevation.ts @@ -1,8 +1,9 @@ // Utilities -import { computed } from 'vue' +import { computed, isRef } from 'vue' import { propsFactory } from '@/util' // Types +import type { Ref } from 'vue' export interface ElevationProps { elevation?: number | string | null } @@ -25,13 +26,18 @@ export const makeElevationProps = propsFactory({ }, }, 'elevation') -export function useElevation (props: ElevationProps) { +type ElevationData = { + elevationClasses: Ref<string[]> +} + +export function useElevation (props: ElevationProps | Ref<number | string | undefined>): ElevationData { const elevationClasses = computed(() => { + const elevation = isRef(props) ? props.value : props.elevation const classes: string[] = [] - if (props.elevation == null) return classes + if (elevation == null) return classes - classes.push(`elevation-${props.elevation}`) + classes.push(`elevation-${elevation}`) return classes }) diff --git a/packages/vuetify/src/composables/focus.ts b/packages/vuetify/src/composables/focus.ts new file mode 100644 index 00000000000..7347e8b9d3a --- /dev/null +++ b/packages/vuetify/src/composables/focus.ts @@ -0,0 +1,15 @@ +import { ref } from 'vue' + +export const useFocus = () => { + const isFocused = ref(false) + + function focus () { + isFocused.value = true + } + + function blur () { + isFocused.value = false + } + + return { isFocused, focus, blur } +} diff --git a/packages/vuetify/src/composables/rounded.ts b/packages/vuetify/src/composables/rounded.ts index b4b3d175d86..aba4fa926b7 100644 --- a/packages/vuetify/src/composables/rounded.ts +++ b/packages/vuetify/src/composables/rounded.ts @@ -1,35 +1,41 @@ // Utilities -import { computed } from 'vue' +import { computed, isRef } from 'vue' import { propsFactory } from '@/util' // Types +import type { Ref } from 'vue' + +type RoundedValue = boolean | string | number | null | undefined + export interface RoundedProps { - rounded?: boolean | string | number | null + rounded?: RoundedValue tile?: boolean } +type RoundedData = { + roundedClasses: Ref<string[]> +} + // Composables export const makeRoundedProps = propsFactory({ rounded: { type: [Boolean, Number, String], default: undefined, }, - tile: Boolean, }, 'rounded') -export function useRounded (props: RoundedProps, name: string) { +export function useRounded (props: RoundedProps | Ref<RoundedValue>, name: string): RoundedData { const roundedClasses = computed(() => { + const rounded = isRef(props) ? props.value : props.rounded const classes: string[] = [] - if (props.tile) { - classes.push(`${name}--tile`) - } else if (props.rounded === true || props.rounded === '') { + if (rounded === true || rounded === '') { classes.push(`${name}--rounded`) } else if ( - typeof props.rounded === 'string' || - props.rounded === 0 + typeof rounded === 'string' || + rounded === 0 ) { - for (const value of String(props.rounded).split(' ')) { + for (const value of String(rounded).split(' ')) { classes.push(`rounded-${value}`) } } diff --git a/packages/vuetify/src/composables/theme.ts b/packages/vuetify/src/composables/theme.ts index 150b644056e..e70de91a9fd 100644 --- a/packages/vuetify/src/composables/theme.ts +++ b/packages/vuetify/src/composables/theme.ts @@ -102,6 +102,8 @@ const defaultThemeOptions: ThemeOptions = { colors: { background: '#FFFFFF', surface: '#FFFFFF', + 'surface-variant': '#424242', + 'on-surface-variant': '#EEEEEE', primary: '#6200EE', 'primary-darken-1': '#3700B3', secondary: '#03DAC6', @@ -117,13 +119,13 @@ const defaultThemeOptions: ThemeOptions = { 'high-emphasis-opacity': 0.87, 'medium-emphasis-opacity': 0.60, 'disabled-opacity': 0.38, - 'activated-opacity': 0.12, 'idle-opacity': 0.04, - 'hover-opacity': 0.12, + 'hover-opacity': 0.04, 'focus-opacity': 0.12, 'selected-opacity': 0.08, + 'activated-opacity': 0.12, + 'pressed-opacity': 0.12, 'dragged-opacity': 0.08, - 'pressed-opacity': 0.16, 'kbd-background-color': '#212529', 'kbd-color': '#FFFFFF', 'code-background-color': '#C2C2C2', @@ -134,6 +136,8 @@ const defaultThemeOptions: ThemeOptions = { colors: { background: '#121212', surface: '#212121', + 'surface-variant': '#BDBDBD', + 'on-surface-variant': '#424242', primary: '#BB86FC', 'primary-darken-1': '#3700B3', secondary: '#03DAC5', @@ -149,13 +153,13 @@ const defaultThemeOptions: ThemeOptions = { 'high-emphasis-opacity': 0.87, 'medium-emphasis-opacity': 0.60, 'disabled-opacity': 0.38, - 'activated-opacity': 0.12, 'idle-opacity': 0.10, 'hover-opacity': 0.04, 'focus-opacity': 0.12, 'selected-opacity': 0.08, - 'dragged-opacity': 0.08, + 'activated-opacity': 0.12, 'pressed-opacity': 0.16, + 'dragged-opacity': 0.08, 'kbd-background-color': '#212529', 'kbd-color': '#FFFFFF', 'code-background-color': '#B7B7B7',
14c76404ffbc5b0881634eefa3da2d7ab61087f3
2023-02-14 20:36:38
Kael
fix(VOverlay): don't try to run scrollStrategy after closing
false
don't try to run scrollStrategy after closing
fix
diff --git a/packages/vuetify/src/components/VOverlay/scrollStrategies.ts b/packages/vuetify/src/components/VOverlay/scrollStrategies.ts index 98cb32c1850..1e98c67a6ad 100644 --- a/packages/vuetify/src/components/VOverlay/scrollStrategies.ts +++ b/packages/vuetify/src/components/VOverlay/scrollStrategies.ts @@ -50,7 +50,7 @@ export function useScrollStrategies ( scope = effectScope() await nextTick() - scope.run(() => { + scope.active && scope.run(() => { if (typeof props.scrollStrategy === 'function') { props.scrollStrategy(data, props, scope!) } else {
bb1dffc40232fa564aa7318ba1ab600fd9ded6cc
2022-08-30 15:54:47
Kael
docs: remove hardcoded white toolbar from notifications
false
remove hardcoded white toolbar from notifications
docs
diff --git a/packages/docs/src/components/app/bar/NotificationsMenu.vue b/packages/docs/src/components/app/bar/NotificationsMenu.vue index de7a14b67df..d08c1e80103 100644 --- a/packages/docs/src/components/app/bar/NotificationsMenu.vue +++ b/packages/docs/src/components/app/bar/NotificationsMenu.vue @@ -29,7 +29,7 @@ <v-toolbar class="pl-4 pr-5" - color="white" + color="surface" density="compact" > <v-btn
ee643cba71a63e446b2813a8baf7fc9ad1e8cfbe
2019-01-19 22:03:06
John Leider
chore(playground): remove package
false
remove package
chore
diff --git a/ecosystem.config.js b/ecosystem.config.js index e20e1bd169e..45558703522 100644 --- a/ecosystem.config.js +++ b/ecosystem.config.js @@ -1,5 +1,11 @@ module.exports = { apps: [ + { + name: 'vuetify-dev', + script: 'yarn.js', + cwd: './packages/vuetify/', + args: 'dev' + }, { name: 'vuetify-build', script: 'yarn.js', @@ -20,12 +26,6 @@ module.exports = { script: 'yarn.js', cwd: './packages/kitchen/', args: 'dev' - }, - { - name: 'vuetify-playground', - script: 'yarn.js', - cwd: './packages/playground/', - args: 'dev' } ] } diff --git a/packages/playground/.browserslistrc b/packages/playground/.browserslistrc deleted file mode 100644 index 9dee6464636..00000000000 --- a/packages/playground/.browserslistrc +++ /dev/null @@ -1,3 +0,0 @@ -> 1% -last 2 versions -not ie <= 8 diff --git a/packages/playground/.editorconfig b/packages/playground/.editorconfig deleted file mode 100644 index 7053c49a045..00000000000 --- a/packages/playground/.editorconfig +++ /dev/null @@ -1,5 +0,0 @@ -[*.{js,jsx,ts,tsx,vue}] -indent_style = space -indent_size = 2 -trim_trailing_whitespace = true -insert_final_newline = true diff --git a/packages/playground/.eslintignore b/packages/playground/.eslintignore deleted file mode 100644 index b6b317cbf5f..00000000000 --- a/packages/playground/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -/node_modules -/src/views -/dist diff --git a/packages/playground/.gitignore b/packages/playground/.gitignore deleted file mode 100644 index 7b73bc88fca..00000000000 --- a/packages/playground/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Built files -/dist/ -Playground.vue diff --git a/packages/playground/babel.config.js b/packages/playground/babel.config.js deleted file mode 100644 index ba179669a12..00000000000 --- a/packages/playground/babel.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - presets: [ - '@vue/app' - ] -} diff --git a/packages/playground/package.json b/packages/playground/package.json deleted file mode 100644 index 79ac7f1416b..00000000000 --- a/packages/playground/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "@vuetify/playground", - "version": "2.0.0-alpha.0", - "private": true, - "scripts": { - "dev": "vue-cli-service serve", - "lint": "vue-cli-service lint" - }, - "dependencies": { - "sass-loader": "^7.0.1", - "vue": "^2.5.21", - "vue-router": "^3.0.1", - "vue-template-compiler": "^2.5.21", - "vuetify": "^2.0.0-alpha.0" - }, - "devDependencies": { - "@vue/cli-plugin-babel": "^3.2.0", - "@vue/cli-plugin-eslint": "^3.2.0", - "@vue/cli-service": "^3.2.0", - "babel-eslint": "^10.0.1", - "eslint": "^5.12.0", - "stylus": "^0.54.5", - "stylus-loader": "^3.0.2" - } -} diff --git a/packages/playground/public/favicon.ico b/packages/playground/public/favicon.ico deleted file mode 100644 index 2ec647c439f..00000000000 Binary files a/packages/playground/public/favicon.ico and /dev/null differ diff --git a/packages/playground/public/index.html b/packages/playground/public/index.html deleted file mode 100644 index 25a21e3cb1f..00000000000 --- a/packages/playground/public/index.html +++ /dev/null @@ -1,21 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="viewport" content="width=device-width,initial-scale=1.0"> - <link rel="icon" href="<%= BASE_URL %>favicon.ico"> - <title>The Vuetify Playground</title> - <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"> - <link rel="stylesheet" href="https://cdn.materialdesignicons.com/2.5.94/css/materialdesignicons.min.css"> - <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css"> - </head> - <body> - <noscript> - <strong>We're sorry but the Vuetify Kitchen is closed for those who wish to browse the web without JavaScript enabled.</strong> - </noscript> - <div id="app"></div> - <!-- built files will be auto injected --> - </body> -</html> diff --git a/packages/playground/src/App.vue b/packages/playground/src/App.vue deleted file mode 100644 index 4f21c35466e..00000000000 --- a/packages/playground/src/App.vue +++ /dev/null @@ -1,5 +0,0 @@ -<template> - <v-app> - <router-view /> - </v-app> -</template> diff --git a/packages/playground/src/assets/angryman.png b/packages/playground/src/assets/angryman.png deleted file mode 100644 index c9ac54277b7..00000000000 Binary files a/packages/playground/src/assets/angryman.png and /dev/null differ diff --git a/packages/playground/src/components/Boilerplate.vue b/packages/playground/src/components/Boilerplate.vue deleted file mode 100644 index 8c8b16b7a88..00000000000 --- a/packages/playground/src/components/Boilerplate.vue +++ /dev/null @@ -1,25 +0,0 @@ -<template> - <v-app> - <v-content> - <v-container - fluid - fill-height - > - <v-layout - align-center - justify-center - > - <v-flex xs8> - <slot /> - </v-flex> - </v-layout> - </v-container> - </v-content> - </v-app> -</template> - -<script> - export default { - name: 'Boilerplate' - } -</script> diff --git a/packages/playground/src/main.js b/packages/playground/src/main.js deleted file mode 100644 index 3290651f25b..00000000000 --- a/packages/playground/src/main.js +++ /dev/null @@ -1,14 +0,0 @@ -import Vue from 'vue' -import './plugins/vuetify' -import App from './App.vue' -import router from './router' -import Boilerplate from '@/components/Boilerplate' - -Vue.component('boilerplate', Boilerplate) - -Vue.config.productionTip = false - -new Vue({ - router, - render: h => h(App) -}).$mount('#app') diff --git a/packages/playground/src/plugins/vuetify.js b/packages/playground/src/plugins/vuetify.js deleted file mode 100644 index 2947c70f800..00000000000 --- a/packages/playground/src/plugins/vuetify.js +++ /dev/null @@ -1,7 +0,0 @@ -import Vue from 'vue' -import Vuetify from 'vuetify' -import 'vuetify/dist/vuetify.css' - -Vue.use(Vuetify, { - iconfont: 'mdi' -}) diff --git a/packages/playground/src/router.js b/packages/playground/src/router.js deleted file mode 100644 index edaae477751..00000000000 --- a/packages/playground/src/router.js +++ /dev/null @@ -1,31 +0,0 @@ -import Vue from 'vue' -import Router from 'vue-router' - -Vue.use(Router) - -const router = new Router({ - mode: 'history', - base: process.env.BASE_URL, - routes: [ - { - path: '/', - name: 'Playground', - component: () => import('@/views/Playground') - } - ] -}) - -// Bootstrap Analytics -// Set in .env -// https://github.com/MatteoGabriele/vue-analytics -if (process.env.VUE_APP_GOOGLE_ANALYTICS) { - Vue.use(require('vue-analytics').default, { - id: process.env.VUE_APP_GOOGLE_ANALYTICS, - router, - autoTracking: { - page: process.env.NODE_ENV !== 'development' - } - }) -} - -export default router diff --git a/packages/playground/src/views/Playground.template.vue b/packages/playground/src/views/Playground.template.vue deleted file mode 100644 index 1f914fa9ee3..00000000000 --- a/packages/playground/src/views/Playground.template.vue +++ /dev/null @@ -1,13 +0,0 @@ -<template> - <boilerplate> - <!-- --> - </boilerplate> -</template> - -<script> -export default { - data: () => ({ - // - }) -} -</script> diff --git a/packages/playground/vue.config.js b/packages/playground/vue.config.js deleted file mode 100644 index b1be11777b0..00000000000 --- a/packages/playground/vue.config.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = { - devServer: { - disableHostCheck: true - }, - configureWebpack: { - resolve: { - symlinks: false - } - } -} diff --git a/scripts/dev.js b/scripts/dev.js index 954a1fea70e..46990371524 100644 --- a/scripts/dev.js +++ b/scripts/dev.js @@ -1,15 +1,14 @@ -const shell = require('shelljs') - -let target = process.argv[2] -const alias = { - docs: 'vuetifyjs.com', - kitchen: '@vuetify/kitchen', - playground: '@vuetify/playground' -} -target = alias[target] || target - -if (!target) { - shell.exec('lerna run dev --scope vuetify --stream') -} else { - shell.exec(`lerna run dev --scope ${target} --stream`) -} +const shell = require('shelljs') + +let target = process.argv[2] +const alias = { + docs: 'vuetifyjs.com', + kitchen: '@vuetify/kitchen' +} +target = alias[target] || target + +if (!target) { + shell.exec('lerna run dev --scope vuetify --stream') +} else { + shell.exec(`lerna run dev --scope ${target} --stream`) +} diff --git a/scripts/post-install.js b/scripts/post-install.js index 0352a8211e9..d3e225b04f8 100644 --- a/scripts/post-install.js +++ b/scripts/post-install.js @@ -2,18 +2,9 @@ const shell = require('shelljs') const fs = require('fs') const path = require('path') const resolve = target => path.resolve(__dirname, target) -const playgroundTargetFolder = '../packages/playground/src/views' -const playgroundTargetFile = `${playgroundTargetFolder}/Playground.vue` const devTargetFolder = '../packages/vuetify/dev' const devTargetFile = `${devTargetFolder}/Playground.vue` -if (!fs.existsSync(resolve(playgroundTargetFile))) { - shell.cp( - resolve(`${playgroundTargetFolder}/Playground.template.vue`), - resolve(playgroundTargetFile) - ) -} - if (!fs.existsSync(resolve(devTargetFile))) { shell.cp( resolve(`${devTargetFolder}/Playground.template.vue`),
15c32ee386f5b1b43fc8630062e53a4cef5b1ffd
2020-04-23 20:59:13
John Leider
docs(presets): update language / link
false
update language / link
docs
diff --git a/packages/docs/src/lang/en/customization/Presets.json b/packages/docs/src/lang/en/customization/Presets.json index 9a320f91d37..c32d48a25b0 100644 --- a/packages/docs/src/lang/en/customization/Presets.json +++ b/packages/docs/src/lang/en/customization/Presets.json @@ -50,5 +50,5 @@ "devHeading5": "#### preset/overrides.sass", "devText5a": "This is a catch all for style modifications that do not have corresponding variables to target. This is useful when you need to add new CSS properties to existing components.", "devHeading6": "#### preset/variables.scss", - "devText6a": "This is a Vuetify SASS variables file which will overwrite existing framework values. You can find more information about available variables on the [Vuetify SASS Variables](https://vuetifyjs.com/en/customization/sass-variables#variable-api) documentation page or within the API section of a component." + "devText6a": "This is a SASS/SCSS variables file which will overwrite existing framework values. You can find more information about available variables on the [Vuetify SASS Variables](/customization/sass-variables#variable-api) documentation page or within the API section of a component." }
a7fb8e0ed61a09f22168673f0e284bf43d0907e5
2025-03-10 19:04:57
John Leider
docs(VFab): usage example color issue
false
usage example color issue
docs
diff --git a/packages/docs/src/examples/v-fab/usage.vue b/packages/docs/src/examples/v-fab/usage.vue index 0c4715ff2bd..2352018effd 100644 --- a/packages/docs/src/examples/v-fab/usage.vue +++ b/packages/docs/src/examples/v-fab/usage.vue @@ -32,7 +32,7 @@ const props = computed(() => { return { - color: color.value, + color: color.value || undefined, extended: extended.value || undefined, icon: !extended.value ? '$vuetify' : undefined, 'prepend-icon': extended.value ? '$vuetify' : undefined,
12acaa1272e121a411d4cd8461c820b192041937
2018-12-17 21:19:24
cherry
docs: Typo in Korean translation (#5922)
false
Typo in Korean translation (#5922)
docs
diff --git a/packages/vuetifyjs.com/src/lang/ko/framework/Display.json b/packages/vuetifyjs.com/src/lang/ko/framework/Display.json index 4cf98b256db..63a263e82d6 100644 --- a/packages/vuetifyjs.com/src/lang/ko/framework/Display.json +++ b/packages/vuetifyjs.com/src/lang/ko/framework/Display.json @@ -23,7 +23,7 @@ "displays": [ "`d-inline-flex` - 요소의 display 속성을 `inline-flex` 로 정합니다.", "`d-flex` - 요소의 display 속성을 `flex` 로 정합니다.", - "`d-inline-block` - 요소의 display 속성을 `inline-block` 으로 저앟ㅂ니다.", + "`d-inline-block` - 요소의 display 속성을 `inline-block` 으로 정합니다.", "`d-block` - 요소의 display 속성을 `block` 으로 정합니다.", "`d-inline` - 요소의 display 속성을 `inline` 으로 정합니다.", "`d-none` - 요소의 display 속성을 `none` 으로 정합니다."
6153f0d18533f877f2c531e3b853a7e192484280
2022-12-06 18:09:01
Rémi Esperon
fix(VRow): correct gutter between rows (#16212)
false
correct gutter between rows (#16212)
fix
diff --git a/packages/vuetify/src/components/VGrid/VGrid.sass b/packages/vuetify/src/components/VGrid/VGrid.sass index f32ee40cf95..72a71b8171f 100644 --- a/packages/vuetify/src/components/VGrid/VGrid.sass +++ b/packages/vuetify/src/components/VGrid/VGrid.sass @@ -14,7 +14,7 @@ .v-row +make-row - & + .row + & + .v-row margin-top: settings.$grid-gutter * .5 &--dense
6243ad984aaa14968e16a34febca06f6a46060d4
2019-05-07 02:27:06
Dmitry Sharshakov
docs(VCalendar): update examples (#7091)
false
update examples (#7091)
docs
diff --git a/packages/docs/src/data/pages/components/Calendars.json b/packages/docs/src/data/pages/components/Calendars.json index 1b350708686..04cc856757a 100644 --- a/packages/docs/src/data/pages/components/Calendars.json +++ b/packages/docs/src/data/pages/components/Calendars.json @@ -26,17 +26,25 @@ } ] }, + { + "type": "section", + "children": [ + { + "type": "playground", + "value": "playground" + } + ] + }, { "type": "section", "children": [ { "type": "examples", "value": [ - "slots", - "events", - "weekly", - "daily", - "features" + "simple/weekly", + "simple/daily", + "intermediate/slots", + "complex/events" ] } ] diff --git a/packages/docs/src/examples/calendars/events.vue b/packages/docs/src/examples/calendars/complex/events.vue similarity index 100% rename from packages/docs/src/examples/calendars/events.vue rename to packages/docs/src/examples/calendars/complex/events.vue diff --git a/packages/docs/src/examples/calendars/slots.vue b/packages/docs/src/examples/calendars/intermediate/slots.vue similarity index 100% rename from packages/docs/src/examples/calendars/slots.vue rename to packages/docs/src/examples/calendars/intermediate/slots.vue diff --git a/packages/docs/src/examples/calendars/features.vue b/packages/docs/src/examples/calendars/playground.vue similarity index 95% rename from packages/docs/src/examples/calendars/features.vue rename to packages/docs/src/examples/calendars/playground.vue index 53d173fd9ba..69e2e793ef6 100644 --- a/packages/docs/src/examples/calendars/features.vue +++ b/packages/docs/src/examples/calendars/playground.vue @@ -43,6 +43,18 @@ v-model="dark" label="Dark" ></v-checkbox> + <v-checkbox + v-model="shortIntervals" + label="Short intervals" + ></v-checkbox> + <v-checkbox + v-model="shortMonths" + label="Short months" + ></v-checkbox> + <v-checkbox + v-model="shortWeekdays" + label="Short weekdays" + ></v-checkbox> <v-select v-model="color" :items="colorOptions" @@ -228,6 +240,9 @@ :interval-height="intervals.height" :interval-style="intervalStyle" :show-interval-label="showIntervalLabel" + :short-intervals="shortIntervals" + :short-months="shortMonths" + :short-weekdays="shortWeekdays" :color="color" > <template v-slot:day="day"> @@ -365,7 +380,10 @@ { text: 'Blue Gray', value: 'blue-gray' }, { text: 'Gray', value: 'gray' }, { text: 'Black', value: 'black' } - ] + ], + shortIntervals: true, + shortMonths: false, + shortWeekdays: false }), computed: { intervalStyle () { diff --git a/packages/docs/src/examples/calendars/daily.vue b/packages/docs/src/examples/calendars/simple/daily.vue similarity index 100% rename from packages/docs/src/examples/calendars/daily.vue rename to packages/docs/src/examples/calendars/simple/daily.vue diff --git a/packages/docs/src/examples/calendars/weekly.vue b/packages/docs/src/examples/calendars/simple/weekly.vue similarity index 100% rename from packages/docs/src/examples/calendars/weekly.vue rename to packages/docs/src/examples/calendars/simple/weekly.vue diff --git a/packages/docs/src/lang/en/components/Calendars.json b/packages/docs/src/lang/en/components/Calendars.json index 4ac355d5d68..aab4d6d656e 100644 --- a/packages/docs/src/lang/en/components/Calendars.json +++ b/packages/docs/src/lang/en/components/Calendars.json @@ -20,10 +20,6 @@ "daily": { "header": "### Daily", "desc": "This is an example of calendar with content in each interval slot and a type of `day`." - }, - "features": { - "header": "### Features", - "desc": "This example allows you to explore many of the features of the `v-calendar` component." } }, "props": {
855b9b56f6a69d5bd0e904e85bb3cc8a301d1946
2024-09-11 20:34:49
Kael
chore: update @vuetify/one
false
update @vuetify/one
chore
diff --git a/packages/docs/package.json b/packages/docs/package.json index 576eed5dea9..8effcb4813e 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -24,7 +24,7 @@ "@vue/compiler-dom": "^3.4.27", "@vuelidate/core": "^2.0.3", "@vuelidate/validators": "^2.0.4", - "@vuetify/one": "^1.9.2", + "@vuetify/one": "^1.9.4", "algoliasearch": "^4.23.3", "fflate": "^0.8.2", "isomorphic-fetch": "^3.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 531e1121337..44b296c0172 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -236,8 +236,8 @@ importers: specifier: ^2.0.4 version: 2.0.4([email protected]([email protected])) '@vuetify/one': - specifier: ^1.9.2 - version: 1.9.2(@mdi/[email protected](patch_hash=wt4lkgr52gphla2wb445bnli3i))([email protected])([email protected]([email protected]))(vuetify@packages+vuetify) + specifier: ^1.9.4 + version: 1.9.4(@mdi/[email protected](patch_hash=wt4lkgr52gphla2wb445bnli3i))([email protected])([email protected]([email protected]))(vuetify@packages+vuetify) algoliasearch: specifier: ^4.23.3 version: 4.23.3 @@ -2826,8 +2826,8 @@ packages: vue: ^3.0.0 vuetify: ^3.0.0 - '@vuetify/[email protected]': - resolution: {integrity: sha512-bD8b391KpGGaKhxZ/o6F7t2SJGseWw4HC4yQuhAqq0RKrm07Dh44Pl0wPXdUbDDVdvlCA7hVyJt4J+4rOCW24A==} + '@vuetify/[email protected]': + resolution: {integrity: sha512-0cYhsR+nvz6aaBIL3pIlkF0927P9Iuv/WhpgQWdCmPYPzwPtjP9CHTKEd9IW81Bc1BYUBXQ0oBWdjIzbv5p1BA==} peerDependencies: '@mdi/js': 7.4.47 lodash-es: ^4.17.21 @@ -11661,7 +11661,7 @@ snapshots: vue: 3.4.27([email protected]) vuetify: link:packages/vuetify - '@vuetify/[email protected](@mdi/[email protected](patch_hash=wt4lkgr52gphla2wb445bnli3i))([email protected])([email protected]([email protected]))(vuetify@packages+vuetify)': + '@vuetify/[email protected](@mdi/[email protected](patch_hash=wt4lkgr52gphla2wb445bnli3i))([email protected])([email protected]([email protected]))(vuetify@packages+vuetify)': dependencies: '@mdi/js': 7.4.47(patch_hash=wt4lkgr52gphla2wb445bnli3i) lodash-es: 4.17.21
a427b9602763f0dba87d0f574d75c56723564d82
2022-04-21 15:49:26
Saúl Ortega
fix(locale): improve spanish translations (#14965)
false
improve spanish translations (#14965)
fix
diff --git a/packages/vuetify/src/locale/es.ts b/packages/vuetify/src/locale/es.ts index a8dd6ec14b2..99a8507454b 100644 --- a/packages/vuetify/src/locale/es.ts +++ b/packages/vuetify/src/locale/es.ts @@ -12,8 +12,8 @@ export default { sortAscending: 'Orden ascendente.', sortNone: 'Sin ordenar.', activateNone: 'Pulse para quitar orden.', - activateDescending: 'Pulse para ordenar descendente.', - activateAscending: 'Pulse para ordenar ascendente.', + activateDescending: 'Pulse para ordenar de forma descendente.', + activateAscending: 'Pulse para ordenar de forma ascendente.', }, sortBy: 'Ordenado por', }, @@ -22,7 +22,7 @@ export default { itemsPerPageAll: 'Todos', nextPage: 'Página siguiente', prevPage: 'Página anterior', - firstPage: 'Primer página', + firstPage: 'Primera página', lastPage: 'Última página', pageText: '{0}-{1} de {2}', },
ee7ad4f61b1c78acf34d2a5a5633da1556aa3c78
2018-02-09 21:02:33
Kael
fix(stackable): return a z-index of 0 in SSR)
false
return a z-index of 0 in SSR)
fix
diff --git a/src/mixins/stackable.js b/src/mixins/stackable.js index 80806532864..b97dd01b0d4 100644 --- a/src/mixins/stackable.js +++ b/src/mixins/stackable.js @@ -19,6 +19,8 @@ export default { * @return {number} */ activeZIndex () { + if (typeof window === 'undefined') return 0 + const content = this.stackElement || this.$refs.content // Return current zindex if not active
cf94c0bd9ba3d2b591bcd1942cd6fc9fe7b06ab2
2019-06-27 21:05:58
John Leider
fix(VAvatar): ensure text is always aligned properly
false
ensure text is always aligned properly
fix
diff --git a/packages/vuetify/src/components/VAvatar/VAvatar.sass b/packages/vuetify/src/components/VAvatar/VAvatar.sass index 96159dc51b6..0fe0fc127be 100644 --- a/packages/vuetify/src/components/VAvatar/VAvatar.sass +++ b/packages/vuetify/src/components/VAvatar/VAvatar.sass @@ -5,6 +5,7 @@ border-radius: 50% display: inline-flex justify-content: center + line-height: normal position: relative text-align: center vertical-align: middle
9a208584ffc6970b0d56f4d0415e75e8efe7cb63
2023-08-01 21:57:01
Bogdan Ciuca
fix(VRatingItem): add missing aria label (#17904)
false
add missing aria label (#17904)
fix
diff --git a/packages/vuetify/src/components/VRating/VRating.tsx b/packages/vuetify/src/components/VRating/VRating.tsx index 1eaacc76b65..062c0b236d3 100644 --- a/packages/vuetify/src/components/VRating/VRating.tsx +++ b/packages/vuetify/src/components/VRating/VRating.tsx @@ -178,7 +178,10 @@ export const VRating = genericComponent<VRatingSlots>()({ rating: normalizedValue.value, }) : ( - <VBtn { ...btnProps } /> + <VBtn + aria-label={ t(props.itemAriaLabel, value, props.length) } + { ...btnProps } + /> ) } </label>
06df9b121f15a29ac16e73b50584f14627200296
2018-04-06 01:47:43
John Leider
fix(v-tabs): avoid referencing undefined obj
false
avoid referencing undefined obj
fix
diff --git a/src/components/VTabs/VTabs.js b/src/components/VTabs/VTabs.js index ab5f2d97875..7b850cd441c 100644 --- a/src/components/VTabs/VTabs.js +++ b/src/components/VTabs/VTabs.js @@ -67,7 +67,12 @@ export default { tabsContainer: null, tabs: [], tabItems: null, - transitionTime: 300 + transitionTime: 300, + widths: { + bar: 0, + container: 0, + wrapper: 0 + } } }, @@ -89,13 +94,10 @@ export default { }, checkNextIcon () { // Check one scroll ahead to know the width of right-most item - const container = this.$refs.container - const wrapper = this.$refs.wrapper - - return container.clientWidth > this.scrollOffset + wrapper.clientWidth + return this.widths.container > this.scrollOffset + this.widths.wrapper }, callSlider () { - this.setOverflow() + this.setWidths() if (this.hideSlider || !this.activeTab) return false // Give screen time to paint @@ -132,7 +134,16 @@ export default { this.scrollOffset = this.newOffset(direction) }, setOverflow () { - this.isOverflowing = this.$refs.bar.clientWidth < this.$refs.container.clientWidth + this.isOverflowing = this.widths.bar < this.widths.container + }, + setWidths () { + const bar = this.$refs.bar ? this.$refs.bar.clientWidth : 0 + const container = this.$refs.container ? this.$refs.container.clientWidth : 0 + const wrapper = this.$refs.wrapper ? this.$refs.wrapper.clientWidth : 0 + + this.widths = { bar, container, wrapper } + + this.setOverflow() }, findActiveLink () { if (!this.tabs.length || this.lazyValue) return @@ -185,8 +196,7 @@ export default { if (!this.activeTab) return false const { clientWidth, offsetLeft } = this.activeTab.$el - const wrapperWidth = this.$refs.wrapper.clientWidth - const totalWidth = wrapperWidth + this.scrollOffset + const totalWidth = this.widths.wrapper + this.scrollOffset const itemOffset = clientWidth + offsetLeft const additionalOffset = clientWidth * 0.3 diff --git a/test/unit/components/VTabs/VTabs.spec.js b/test/unit/components/VTabs/VTabs.spec.js index fd2c5100095..233c9bedb94 100644 --- a/test/unit/components/VTabs/VTabs.spec.js +++ b/test/unit/components/VTabs/VTabs.spec.js @@ -459,4 +459,19 @@ test('VTabs', ({ mount, shallow }) => { expect(onResize).toHaveBeenCalledTimes(1) expect(wrapper.vm.tabs.length).toBe(0) }) + + it('should not error if processing resize on destroy', () => { + const wrapper = mount(VTabs, { + slots: { + default: [{ + functional: true, + render: h => h(VTab) + }] + } + }) + + // Will kill test if fails + delete wrapper.vm.$refs.bar + wrapper.vm.setOverflow() + }) })
040f5edc8180807ae8fbe3c6fae03b543069ba6c
2017-10-28 12:17:07
jacekkarczmarczyk
fix: jest toHaveBeenWarned matched
false
jest toHaveBeenWarned matched
fix
diff --git a/src/util/to-have-been-warned.js b/src/util/to-have-been-warned.js index d81a3b32b3a..3b99c9b69e2 100644 --- a/src/util/to-have-been-warned.js +++ b/src/util/to-have-been-warned.js @@ -21,6 +21,7 @@ function createCompareFn (spy) { arg.toString().includes(msg) ))) return true } + return false } return { @@ -32,8 +33,8 @@ function createCompareFn (spy) { return { pass: warned, message: warned - ? `Expected message "${msg}" not to have been warned` - : `Expected message "${msg}" to have been warned` + ? () => (`Expected message "${msg}" not to have been warned`) + : () => (`Expected message "${msg}" to have been warned`) } } }
0505bd0e4df2a9f5e096cf3f574975ef774497d4
2019-01-15 10:09:53
Jacek Karczmarczyk
refactor(VLabel): convert to typescript
false
convert to typescript
refactor
diff --git a/packages/vuetify/src/components/VLabel/VLabel.js b/packages/vuetify/src/components/VLabel/VLabel.ts similarity index 87% rename from packages/vuetify/src/components/VLabel/VLabel.js rename to packages/vuetify/src/components/VLabel/VLabel.ts index e59db65943a..9ee9c91a6e3 100644 --- a/packages/vuetify/src/components/VLabel/VLabel.js +++ b/packages/vuetify/src/components/VLabel/VLabel.ts @@ -5,17 +5,19 @@ import '../../stylus/components/_labels.styl' import Colorable from '../../mixins/colorable' import Themeable, { functionalThemeClasses } from '../../mixins/themeable' +// Types +import { VNode, RenderContext } from 'vue' +import mixins from '../../util/mixins' + // Helpers import { convertToUnit } from '../../util/helpers' /* @vue/component */ -export default { +export default mixins(Themeable).extend({ name: 'v-label', functional: true, - mixins: [Themeable], - props: { absolute: Boolean, color: { @@ -36,7 +38,7 @@ export default { value: Boolean }, - render (h, ctx) { + render (h, ctx: RenderContext): VNode { const { children, listeners, props } = ctx const data = { staticClass: 'v-label', @@ -59,4 +61,4 @@ export default { return h('label', Colorable.options.methods.setTextColor(props.focused && props.color, data), children) } -} +}) diff --git a/packages/vuetify/src/components/VLabel/index.js b/packages/vuetify/src/components/VLabel/index.ts similarity index 100% rename from packages/vuetify/src/components/VLabel/index.js rename to packages/vuetify/src/components/VLabel/index.ts
20cd4263be109488bd38079e5fad512bcb8759f2
2019-03-21 18:28:29
Kael
chore: update dependencies
false
update dependencies
chore
diff --git a/package.json b/package.json index 601bee7a24f..c3b0405c9c9 100644 --- a/package.json +++ b/package.json @@ -20,9 +20,9 @@ "postversion": "node scripts/post-release-merge.js" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "^1.4.1", - "@typescript-eslint/parser": "^1.4.1", - "eslint": "^5.14.1", + "@typescript-eslint/eslint-plugin": "^1.5.0", + "@typescript-eslint/parser": "^1.5.0", + "eslint": "^5.15.3", "eslint-config-standard": "^12.0.0", "eslint-plugin-import": "^2.16.0", "eslint-plugin-local-rules": "^0.1.0", @@ -36,18 +36,18 @@ "jest-cli": "^21.2.1", "jest-css-modules": "^1.1.0", "jest-serializer-html": "^5.0.0", - "lerna": "^3.13.0", + "lerna": "^3.13.1", "semver": "^5.6.0", - "shelljs": "^0.8.2", - "ts-jest": "^21.2.1", - "tslint": "^5.13.0", - "typescript": "^3.3.3333", + "shelljs": "^0.8.3", + "ts-jest": "^21.2.4", + "tslint": "^5.14.0", + "typescript": "^3.3.4000", "typestrict": "^1.0.2", - "vue": "^2.6.7", - "vue-loader": "^15.6.4", - "vue-template-compiler": "^2.6.7", - "webpack": "^4.29.5", - "webpack-cli": "^3.2.3", + "vue": "^2.6.10", + "vue-loader": "^15.7.0", + "vue-template-compiler": "^2.6.10", + "webpack": "^4.29.6", + "webpack-cli": "^3.3.0", "webpack-merge": "^4.2.1" } } diff --git a/packages/api-generator/package.json b/packages/api-generator/package.json index d121a3f7a93..8644bc86b1b 100755 --- a/packages/api-generator/package.json +++ b/packages/api-generator/package.json @@ -12,11 +12,11 @@ "license": "ISC", "dependencies": { "deepmerge": "^2.2.1", - "vue": "^2.6.5", + "vue": "^2.6.10", "vuetify": "^2.0.0-alpha.10" }, "devDependencies": { "babel-cli": "^6.26.0", - "babel-preset-env": "^1.6.1" + "babel-preset-env": "^1.7.0" } } diff --git a/packages/docs/package.json b/packages/docs/package.json index 07b2fd98e96..505394495e0 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -17,31 +17,30 @@ "dependencies": { "@vuetify/api-generator": "^2.0.0-alpha.10", "babel-polyfill": "^6.26.0", - "chokidar": "^2.0.4", - "compression": "^1.7.3", + "chokidar": "^2.1.2", + "compression": "^1.7.4", "cookie-parser": "^1.4.4", "cross-env": "^5.2.0", - "date-fns": "^1.29.0", + "date-fns": "^1.30.1", "dotenv": "^6.2.0", - "es6-promise": "^4.2.5", + "es6-promise": "^4.2.6", "express": "^4.16.4", "iso-639-1": "^2.0.3", "lodash": "^4.17.11", "lru-cache": "^4.1.3", "memory-fs": "^0.4.1", - "moment": "^2.22.2", + "moment": "^2.24.0", "node-fetch": "^2.3.0", "pluralize": "^7.0.0", - "rollbar": "^2.5.2", + "rollbar": "^2.5.4", "route-cache": "^0.4.4", "serve-favicon": "^2.5.0", - "vee-validate": "^2.1.7", - "vue-analytics": "^5.16.2", - "vue-i18n": "^7.8.1", - "vue-no-ssr": "^0.2.2", - "vue-rollbar": "^0.2.4", + "vee-validate": "^2.2.0", + "vue-analytics": "^5.16.4", + "vue-i18n": "^8.9.0", + "vue-no-ssr": "^1.1.1", "vue-router": "^3.0.2", - "vue-server-renderer": "^2.6.7", + "vue-server-renderer": "^2.6.10", "vuelidate": "^0.6.2", "vuetify": "^2.0.0-alpha.10", "vuex": "^3.1.0", @@ -49,8 +48,8 @@ "webfontloader": "^1.6.28" }, "devDependencies": { - "@mdi/font": "^3.2.89", - "autoprefixer": "^9.4.8", + "@mdi/font": "^3.5.95", + "autoprefixer": "^9.5.0", "babel-core": "^6.26.3", "babel-loader": "^7.1.5", "babel-plugin-syntax-async-functions": "^6.13.0", @@ -62,23 +61,22 @@ "babel-preset-stage-2": "^6.24.1", "babel-register": "^6.26.0", "concurrently": "^4.1.0", - "css-loader": "^2.1.0", + "css-loader": "^2.1.1", "deepmerge": "^2.2.1", "docsearch.js": "^2.6.2", "eslint-plugin-json": "^1.4.0", "event-source-polyfill": "^0.0.12", "file-loader": "^3.0.1", "friendly-errors-webpack-plugin": "^1.7.0", - "fs-extra": "^6.0.1", "html-webpack-plugin": "^3.2.0", - "marked": "^0.4.0", + "marked": "^0.6.1", "mini-css-extract-plugin": "^0.5.0", "null-loader": "^0.1.1", "ouch": "^1.1.0", "prismjs": "^1.15.0", "pug": "^2.0.3", "pug-plain-loader": "^1.0.0", - "raw-loader": "^0.5.1", + "raw-loader": "^2.0.0", "rimraf": "^2.6.3", "source-map-loader": "^0.2.4", "style-loader": "^0.23.1", @@ -86,10 +84,10 @@ "stylus-loader": "^3.0.2", "sw-precache-webpack-plugin": "^0.11.5", "url-loader": "^1.1.2", - "vue-color": "^2.4.6", + "vue-color": "^2.7.0", "vue-prism-component": "^1.1.1", "vue-style-loader": "^4.1.2", - "webpack-dev-middleware": "^3.6.0", + "webpack-dev-middleware": "^3.6.1", "webpack-hot-middleware": "^2.24.3", "webpack-node-externals": "^1.7.2" } diff --git a/packages/kitchen/package.json b/packages/kitchen/package.json index e0bad280609..c39f8f1d168 100644 --- a/packages/kitchen/package.json +++ b/packages/kitchen/package.json @@ -14,8 +14,8 @@ "vuetify": "^2.0.0-alpha.10" }, "devDependencies": { - "@vue/cli-plugin-babel": "^3.4.1", - "@vue/cli-service": "^3.4.1", + "@vue/cli-plugin-babel": "^3.5.1", + "@vue/cli-service": "^3.5.1", "babel-eslint": "^10.0.1", "stylus": "^0.54.5", "stylus-loader": "^3.0.2" diff --git a/packages/vuetify/package.json b/packages/vuetify/package.json index 723f4645271..2674628e2d6 100644 --- a/packages/vuetify/package.json +++ b/packages/vuetify/package.json @@ -38,9 +38,9 @@ }, "devDependencies": { "@types/jest": "^22.2.3", - "@types/node": "^11.9.4", + "@types/node": "^11.11.4", "@vue/test-utils": "^1.0.0-beta.29", - "autoprefixer": "^9.4.8", + "autoprefixer": "^9.5.0", "avoriaz": "^6.3.0", "babel-cli": "^6.26.0", "babel-core": "^6.26.3", @@ -53,13 +53,13 @@ "babel-preset-env": "^1.7.0", "concurrently": "^4.1.0", "cross-env": "^5.2.0", - "css-loader": "^2.1.0", + "css-loader": "^2.1.1", "css-mqpacker": "^7.0.0", "cssnano": "^4.1.10", "eslint-loader": "^2.1.2", - "eslint-plugin-jest": "^22.3.0", + "eslint-plugin-jest": "^22.4.1", "file-loader": "^3.0.1", - "fork-ts-checker-webpack-plugin": "^0.5.2", + "fork-ts-checker-webpack-plugin": "^1.0.0", "friendly-errors-webpack-plugin": "^1.7.0", "happypack": "^5.0.1", "identity-obj-proxy": "^3.0.0", @@ -78,10 +78,10 @@ "url-loader": "^1.1.2", "vue-router": "^3.0.2", "vuetify-loader": "^1.2.1", - "webpack-dev-server": "^3.2.0" + "webpack-dev-server": "^3.2.1" }, "peerDependencies": { - "vue": "^2.5.18" + "vue": "^2.6.4" }, "publishConfig": { "access": "public" diff --git a/packages/vuetify/src/mixins/colorable/index.ts b/packages/vuetify/src/mixins/colorable/index.ts index 09f27d42b8d..9b46cb25d8e 100644 --- a/packages/vuetify/src/mixins/colorable/index.ts +++ b/packages/vuetify/src/mixins/colorable/index.ts @@ -1,5 +1,6 @@ import Vue from 'vue' import { VNodeData } from 'vue/types/vnode' +import { consoleError } from '../../util/console' function isCssColor (color?: string | false): boolean { return !!color && !!color.match(/^(#|(rgb|hsl)a?\()/) @@ -14,6 +15,14 @@ export default Vue.extend({ methods: { setBackgroundColor (color?: string | false, data: VNodeData = {}): VNodeData { + if (typeof data.style === 'string') { + consoleError('style must be an object', this) + return data + } + if (typeof data.class === 'string') { + consoleError('class must be an object', this) + return data + } if (isCssColor(color)) { data.style = { ...data.style, @@ -31,6 +40,14 @@ export default Vue.extend({ }, setTextColor (color?: string | false, data: VNodeData = {}): VNodeData { + if (typeof data.style === 'string') { + consoleError('style must be an object', this) + return data + } + if (typeof data.class === 'string') { + consoleError('class must be an object', this) + return data + } if (isCssColor(color)) { data.style = { ...data.style, diff --git a/yarn.lock b/yarn.lock index ba4645bb422..5df17a50a6e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1296,7 +1296,7 @@ npmlog "^4.1.2" write-file-atomic "^2.3.0" -"@mdi/font@^3.2.89": +"@mdi/font@^3.5.95": version "3.5.95" resolved "https://registry.yarnpkg.com/@mdi/font/-/font-3.5.95.tgz#422d1982566b4a0577b457cd0acc2168ee8343c3" integrity sha512-WHSJ0TJ70qkn+EPsW9w22pQU+kjEnRZlfN4N7xsFFmKa6VhpdQcwTWqj9PDH3oq6Be2p0IW/VDURJvPWDnBAUw== @@ -1314,10 +1314,10 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== -"@octokit/endpoint@^3.1.1": - version "3.1.3" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-3.1.3.tgz#f6e9c2521b83b74367600e474b24efec2b0471c4" - integrity sha512-vAWzeoj9Lzpl3V3YkWKhGzmDUoMfKpyxJhpq74/ohMvmLXDoEuAGnApy/7TRi3OmnjyX2Lr+e9UGGAD0919ohA== +"@octokit/endpoint@^3.2.0": + version "3.2.3" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-3.2.3.tgz#bd9aea60cd94ce336656b57a5c9cb7f10be8f4f3" + integrity sha512-yUPCt4vMIOclox13CUxzuKiPJIFo46b/6GhUnUTw5QySczN1L0DtSxgmIZrZV4SAb9EyAqrceoyrWoYVnfF2AA== dependencies: deepmerge "3.2.0" is-plain-object "^2.0.4" @@ -1325,16 +1325,16 @@ url-template "^2.0.8" "@octokit/plugin-enterprise-rest@^2.1.1": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-2.2.0.tgz#7ee72a187e8a034d6fc21b8174bef40e34c22f02" - integrity sha512-/uXIvjK5bxmMKI1MDZXxVSiheiyvqv7GCWjoN1s43jF3MMrfqnErOwbZkreeL0CgO1R2lNW6dESDV5NbRiWEQA== + version "2.2.2" + resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-2.2.2.tgz#c0e22067a043e19f96ff9c7832e2a3019f9be75c" + integrity sha512-CTZr64jZYhGWNTDGlSJ2mvIlFsm9OEO3LqWn9I/gmoHI4jRBp4kpHoFYNemG4oA75zUAcmbuWblb7jjP877YZw== -"@octokit/[email protected]": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-2.4.1.tgz#98c4d6870e4abe3ccdd2b9799034b4ae3f441c30" - integrity sha512-nN8W24ZXEpJQJoVgMsGZeK9FOzxkc39Xn9ykseUpPpPMNEDFSvqfkCeqqKrjUiXRm72ubGLWG1SOz0aJPcgGww== +"@octokit/[email protected]": + version "2.4.2" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-2.4.2.tgz#87c36e820dd1e43b1629f4f35c95b00cd456320b" + integrity sha512-lxVlYYvwGbKSHXfbPk5vxEA8w4zHOH1wobado4a9EfsyD3Cbhuhus1w0Ye9Ro0eMubGO8kNy5d+xNFisM3Tvaw== dependencies: - "@octokit/endpoint" "^3.1.1" + "@octokit/endpoint" "^3.2.0" deprecation "^1.0.1" is-plain-object "^2.0.4" node-fetch "^2.3.0" @@ -1342,17 +1342,19 @@ universal-user-agent "^2.0.1" "@octokit/rest@^16.16.0": - version "16.17.0" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.17.0.tgz#3a8c0ff5290e25a48b11f6957aa90791c672c91e" - integrity sha512-1RB7e4ptR/M+1Ik3Qn84pbppbSadBaCtpgFqgqsXn6s4ZVE6hqW9SOm6UW5yd3KT7ObVfdYUkhMlgR937oKyDw== + version "16.20.0" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.20.0.tgz#54462b6e540b5d40063850d370ce8e084cf127d6" + integrity sha512-tN5j64P6QymlMzKo94DG1LRNHCwMnLg5poZlVhsCfkHhEWKpofZ1qBDr2/0w6qDLav4EA1XXMmZdNpvGhc9BDQ== dependencies: - "@octokit/request" "2.4.1" + "@octokit/request" "2.4.2" before-after-hook "^1.4.0" btoa-lite "^1.0.0" + deprecation "^1.0.1" lodash.get "^4.4.2" lodash.set "^4.3.2" lodash.uniq "^4.5.0" octokit-pagination-methods "^1.1.0" + once "^1.4.0" universal-user-agent "^2.0.0" url-template "^2.0.8" @@ -1406,39 +1408,44 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== -"@types/node@*", "@types/node@^11.9.4": +"@types/node@*": version "11.10.5" resolved "https://registry.yarnpkg.com/@types/node/-/node-11.10.5.tgz#fbaca34086bdc118011e1f05c47688d432f2d571" integrity sha512-DuIRlQbX4K+d5I+GMnv+UfnGh+ist0RdlvOp+JZ7ePJ6KQONCFQv/gKYSU1ZzbVdFSUCKZOltjmpFAGGv5MdYA== +"@types/node@^11.11.4": + version "11.11.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-11.11.4.tgz#8808bd5a82bbf6f5d412eff1c228d178e7c24bb3" + integrity sha512-02tIL+QIi/RW4E5xILdoAMjeJ9kYq5t5S2vciUdFPXv/ikFTb0zK8q9vXkg4+WAJuYXGiVT1H28AkD2C+IkXVw== + "@types/q@^1.5.1": version "1.5.1" resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.1.tgz#48fd98c1561fe718b61733daed46ff115b496e18" integrity sha512-eqz8c/0kwNi/OEHQfvIuJVLTst3in0e7uTKeuY+WL/zfKn0xVujOTp42bS/vUUokhK5P2BppLd9JXMOMHcgbjA== -"@typescript-eslint/eslint-plugin@^1.4.1": - version "1.4.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.4.2.tgz#370bc32022d1cc884a5dcf62624ef2024182769d" - integrity sha512-6WInypy/cK4rM1dirKbD5p7iFW28DbSRKT/+PGn+DYzBWEvHq5KnZAqQ5cX25JBc0qMkFxJNxNfBbFXJyyzVcw== +"@typescript-eslint/eslint-plugin@^1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.5.0.tgz#85c509bcfc2eb35f37958fa677379c80b7a8f66f" + integrity sha512-TZ5HRDFz6CswqBUviPX8EfS+iOoGbclYroZKT3GWGYiGScX0qo6QjHc5uuM7JN920voP2zgCkHgF5SDEVlCtjQ== dependencies: - "@typescript-eslint/parser" "1.4.2" - "@typescript-eslint/typescript-estree" "1.4.2" + "@typescript-eslint/parser" "1.5.0" + "@typescript-eslint/typescript-estree" "1.5.0" requireindex "^1.2.0" tsutils "^3.7.0" -"@typescript-eslint/[email protected]", "@typescript-eslint/parser@^1.4.1": - version "1.4.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.4.2.tgz#acfdee2019958a41d308d768e53ded975ef90ce8" - integrity sha512-OqLkY9295DXXaWToItUv3olO2//rmzh6Th6Sc7YjFFEpEuennsm5zhygLLvHZjPxPlzrQgE8UDaOPurDylaUuw== +"@typescript-eslint/[email protected]", "@typescript-eslint/parser@^1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.5.0.tgz#a96114d195dff2a49534e4c4850fb676f905a072" + integrity sha512-pRWTnJrnxuT0ragdY26hZL+bxqDd4liMlftpH2CBlMPryOIOb1J+MdZuw6R4tIu6bWVdwbHKPTs+Q34LuGvfGw== dependencies: - "@typescript-eslint/typescript-estree" "1.4.2" + "@typescript-eslint/typescript-estree" "1.5.0" eslint-scope "^4.0.0" eslint-visitor-keys "^1.0.0" -"@typescript-eslint/[email protected]": - version "1.4.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.4.2.tgz#b16bc36c9a4748a7fca92cba4c2d73c5325c8a85" - integrity sha512-wKgi/w6k1v3R4b6oDc20cRWro2gBzp0wn6CAeYC8ExJMfvXMfiaXzw2tT9ilxdONaVWMCk7B9fMdjos7bF/CWw== +"@typescript-eslint/[email protected]": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.5.0.tgz#986b356ecdf5a0c3bc9889d221802149cf5dbd4e" + integrity sha512-XqR14d4BcYgxcrpxIwcee7UEjncl9emKc/MgkeUfIk2u85KlsGYyaxC7Zxjmb17JtWERk/NaO+KnBsqgpIXzwA== dependencies: lodash.unescape "4.0.1" semver "5.5.0" @@ -1460,10 +1467,10 @@ lodash.kebabcase "^4.1.1" svg-tags "^1.0.0" -"@vue/babel-preset-app@^3.4.1": - version "3.4.1" - resolved "https://registry.yarnpkg.com/@vue/babel-preset-app/-/babel-preset-app-3.4.1.tgz#98a0bf3f207b989e00a9ec27dd0d2d1b4f27402b" - integrity sha512-io04dFwNgAtjT/5c9l69rDjH0HYOamlgafDRaRz69NEvo59dkOELYlB6G1so7S7Nj25El+0iZTTJ9zPN0qLgeA== +"@vue/babel-preset-app@^3.5.1": + version "3.5.1" + resolved "https://registry.yarnpkg.com/@vue/babel-preset-app/-/babel-preset-app-3.5.1.tgz#133fe832ccb9a557ba946fa66035dbe5b9c61e59" + integrity sha512-pgZUkMv5a3NBtzuPLtmyf83yMd+D4j16HtWbHCE/v4GDkxeT+v2wle3mOC7rex3jbuxDGtEKT+rdknLXCKStig== dependencies: "@babel/plugin-proposal-class-properties" "^7.0.0" "@babel/plugin-proposal-decorators" "^7.1.0" @@ -1524,38 +1531,38 @@ "@vue/babel-plugin-transform-vue-jsx" "^1.0.0-beta.2" camelcase "^5.0.0" -"@vue/cli-overlay@^3.4.1": - version "3.4.1" - resolved "https://registry.yarnpkg.com/@vue/cli-overlay/-/cli-overlay-3.4.1.tgz#f850c2f8d7cd42b475d03ec6658ccf2ec9830511" - integrity sha512-mO0680PClML4lj6ruH+YV3BwPjxvJ4HkgsyMlmCyOZimQBxifvjK/6MX2p179M1QoJtSaz8omRJ7a6/mAP5SXg== +"@vue/cli-overlay@^3.5.1": + version "3.5.1" + resolved "https://registry.yarnpkg.com/@vue/cli-overlay/-/cli-overlay-3.5.1.tgz#8d9214d73c8c9a303147190f1476c134ef726ff9" + integrity sha512-DqzfkbKJfuzcNbJouA7ZaLX77xn7FCcVUJaPYVH8qm3pNhIz2tmbfN6WVBLU8XC5FNFFWzLjHmg9rpaEBq7RCA== -"@vue/cli-plugin-babel@^3.4.1": - version "3.4.1" - resolved "https://registry.yarnpkg.com/@vue/cli-plugin-babel/-/cli-plugin-babel-3.4.1.tgz#f84fe329966ab5c82c80da1bd62da4db4089090b" - integrity sha512-KimYe71sU7elxjUUN4U8+/mggoDSZE9ooYA0CCZdSR+Le0LDF65Kd7PdgE2MODESYCpsMccuA0peM7nVzoBU2A== +"@vue/cli-plugin-babel@^3.5.1": + version "3.5.1" + resolved "https://registry.yarnpkg.com/@vue/cli-plugin-babel/-/cli-plugin-babel-3.5.1.tgz#ab8729ff53bb508613b998cdd2e25a78defd30c8" + integrity sha512-b5k8AG21k9y3i5JxNvJzqg0YVFIxN0W/j4urC8Sn3kiNVRii9TBCxoldjKOSWALCJe4mPClR52ivqFWjX4D4/A== dependencies: "@babel/core" "^7.0.0" - "@vue/babel-preset-app" "^3.4.1" - "@vue/cli-shared-utils" "^3.4.1" + "@vue/babel-preset-app" "^3.5.1" + "@vue/cli-shared-utils" "^3.5.1" babel-loader "^8.0.5" webpack ">=4 < 4.29" -"@vue/cli-service@^3.4.1": - version "3.4.1" - resolved "https://registry.yarnpkg.com/@vue/cli-service/-/cli-service-3.4.1.tgz#65ef3ed00b8e6eeeca736308a703c264cfa280cc" - integrity sha512-HAF2yeafVJVKiBaapvbVIK4cM+lDU4r6aJzbKLOonzQrnI45T2NLEvYC+9uW7C5LvC1d4g1XUx25Q8ixSBKegQ== +"@vue/cli-service@^3.5.1": + version "3.5.1" + resolved "https://registry.yarnpkg.com/@vue/cli-service/-/cli-service-3.5.1.tgz#d400ab956569a87f3947e7d6972f35c97de84145" + integrity sha512-c3xzj2+yrnyziDvkKBTD1cB2jDBs0E4G5gk21hHzvAwzyNSpMPTqwAaeAfUtKHWSgs1dKxi/gURfIgFGUJPn+Q== dependencies: "@intervolga/optimize-cssnano-plugin" "^1.0.5" "@soda/friendly-errors-webpack-plugin" "^1.7.1" - "@vue/cli-overlay" "^3.4.1" - "@vue/cli-shared-utils" "^3.4.1" - "@vue/component-compiler-utils" "^2.5.2" + "@vue/cli-overlay" "^3.5.1" + "@vue/cli-shared-utils" "^3.5.1" + "@vue/component-compiler-utils" "^2.6.0" "@vue/preload-webpack-plugin" "^1.1.0" "@vue/web-component-wrapper" "^1.2.0" acorn "^6.1.0" acorn-walk "^6.1.1" address "^1.0.3" - autoprefixer "^9.4.7" + autoprefixer "^9.4.8" cache-loader "^2.0.1" case-sensitive-paths-webpack-plugin "^2.2.0" chalk "^2.4.2" @@ -1566,6 +1573,7 @@ cssnano "^4.1.10" debug "^4.1.1" dotenv "^6.2.0" + dotenv-expand "^4.2.0" escape-string-regexp "^1.0.5" file-loader "^3.0.1" fs-extra "^7.0.1" @@ -1590,18 +1598,18 @@ terser-webpack-plugin "^1.2.2" thread-loader "^2.1.2" url-loader "^1.1.2" - vue-loader "^15.6.2" + vue-loader "^15.6.4" webpack ">=4 < 4.29" webpack-bundle-analyzer "^3.0.4" webpack-chain "^4.11.0" - webpack-dev-server "^3.1.14" + webpack-dev-server "^3.2.0" webpack-merge "^4.2.1" yorkie "^2.0.0" -"@vue/cli-shared-utils@^3.4.1": - version "3.4.1" - resolved "https://registry.yarnpkg.com/@vue/cli-shared-utils/-/cli-shared-utils-3.4.1.tgz#963454d2d2bc549d027c8988666c939903be6d7e" - integrity sha512-IbAQP1J48+q1ChjcHGnE06SdcCEeO77BERcPapjqZl3qJ6aPnq7z8VrNrZxo6oOnBJm7elGOvz4kJ6hirK9aPA== +"@vue/cli-shared-utils@^3.5.1": + version "3.5.1" + resolved "https://registry.yarnpkg.com/@vue/cli-shared-utils/-/cli-shared-utils-3.5.1.tgz#71d66f06fc619ba28df279bd7d37ba1ba29c9066" + integrity sha512-hCB7UbKeeC41w2Q8+Q7jmw3gHdq+ltRqp80S3uDRRGxwiOhxrSmdBHMzKUjh01L8bXOBRgvLey+BERi1Nj9n6Q== dependencies: chalk "^2.4.1" execa "^1.0.0" @@ -1610,13 +1618,13 @@ lru-cache "^5.1.1" node-ipc "^9.1.1" opn "^5.3.0" - ora "^3.0.0" + ora "^3.1.0" request "^2.87.0" - request-promise-native "^1.0.5" + request-promise-native "^1.0.7" semver "^5.5.0" string.prototype.padstart "^3.0.0" -"@vue/component-compiler-utils@^2.5.1", "@vue/component-compiler-utils@^2.5.2": +"@vue/component-compiler-utils@^2.5.1", "@vue/component-compiler-utils@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@vue/component-compiler-utils/-/component-compiler-utils-2.6.0.tgz#aa46d2a6f7647440b0b8932434d22f12371e543b" integrity sha512-IHjxt7LsOFYc0DkTncB7OXJL7UzwOLPPQCfEUNyxL2qt+tF12THV+EO33O1G2Uk4feMSWua3iD39Itszx0f0bw== @@ -2405,13 +2413,13 @@ [email protected]: dependencies: immediate "^3.2.3" -autoprefixer@^9.4.7, autoprefixer@^9.4.8: - version "9.4.10" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.4.10.tgz#e1be61fc728bacac8f4252ed242711ec0dcc6a7b" - integrity sha512-XR8XZ09tUrrSzgSlys4+hy5r2/z4Jp7Ag3pHm31U4g/CTccYPOVe19AkaJ4ey/vRd1sfj+5TtuD6I0PXtutjvQ== +autoprefixer@^9.4.8, autoprefixer@^9.5.0: + version "9.5.0" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.5.0.tgz#7e51d0355c11596e6cf9a0afc9a44e86d1596c70" + integrity sha512-hMKcyHsZn5+qL6AUeP3c8OyuteZ4VaUlg+fWbyl8z7PqsKHF/Bf8/px3K6AT8aMzDkBo8Bc11245MM+itDBOxQ== dependencies: browserslist "^4.4.2" - caniuse-lite "^1.0.30000940" + caniuse-lite "^1.0.30000947" normalize-range "^0.1.2" num2fraction "^1.2.2" postcss "^7.0.14" @@ -3077,7 +3085,7 @@ babel-polyfill@^6.26.0: core-js "^2.5.0" regenerator-runtime "^0.10.5" -babel-preset-env@^1.6.1, babel-preset-env@^1.7.0: +babel-preset-env@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.7.0.tgz#dea79fa4ebeb883cd35dab07e260c1c9c04df77a" integrity sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg== @@ -3710,11 +3718,16 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30000939, caniuse-lite@^1.0.30000940: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000939: version "1.0.30000942" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000942.tgz#454139b28274bce70bfe1d50c30970df7430c6e4" integrity sha512-wLf+IhZUy2rfz48tc40OH7jHjXjnvDFEYqBHluINs/6MgzoNLPf25zhE4NOVzqxLKndf+hau81sAW0RcGHIaBQ== +caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30000947: + version "1.0.30000951" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000951.tgz#c7c2fd4d71080284c8677dd410368df8d83688fe" + integrity sha512-eRhP+nQ6YUkIcNQ6hnvdhMkdc7n3zadog0KXNRxAZTT2kHjUb1yGn71OrPhSn8MOvlX97g5CR97kGVj8fMsXWg== + capture-exit@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-1.2.0.tgz#1c5fcc489fd0ab00d4f1ac7ae1072e3173fbab6f" @@ -3798,7 +3811,7 @@ chokidar@^1.6.0, chokidar@^1.6.1: optionalDependencies: fsevents "^1.0.0" -chokidar@^2.0.0, chokidar@^2.0.2, chokidar@^2.0.4: +chokidar@^2.0.0, chokidar@^2.0.2, chokidar@^2.0.4, chokidar@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.2.tgz#9c23ea40b01638439e0513864d362aeacc5ad058" integrity sha512-IwXUx0FXc5ibYmPC2XeEj5mpXoV66sR+t3jqu2NS2GYwCktt3KF1/Qqjws/NkegajBA4RbZ5+DDwlOiJsxDHEg== @@ -4061,14 +4074,14 @@ component-emitter@^1.2.1: resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= -compressible@~2.0.14: +compressible@~2.0.14, compressible@~2.0.16: version "2.0.16" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.16.tgz#a49bf9858f3821b64ce1be0296afc7380466a77f" integrity sha512-JQfEOdnI7dASwCuSPWIeVYwc/zMsu/+tRhoUvEfXz2gxOA2DNjmG5vhtFdBlhWPPGo+RdT9S3tgc/uH5qgDiiA== dependencies: mime-db ">= 1.38.0 < 2" -compression@^1.5.2, compression@^1.7.3: +compression@^1.5.2: version "1.7.3" resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.3.tgz#27e0e176aaf260f7f2c2813c3e440adb9f1993db" integrity sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg== @@ -4081,6 +4094,19 @@ compression@^1.5.2, compression@^1.7.3: safe-buffer "5.1.2" vary "~1.1.2" +compression@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" + integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== + dependencies: + accepts "~1.3.5" + bytes "3.0.0" + compressible "~2.0.16" + debug "2.6.9" + on-headers "~1.0.2" + safe-buffer "5.1.2" + vary "~1.1.2" + [email protected]: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -4509,7 +4535,7 @@ css-loader@^1.0.1: postcss-value-parser "^3.3.0" source-list-map "^2.0.0" -css-loader@^2.1.0: +css-loader@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-2.1.1.tgz#d8254f72e412bb2238bb44dd674ffbef497333ea" integrity sha512-OcKJU/lt232vl1P9EEDamhoO9iKY3tIjY5GU+XDLblAykTdgs6Ux9P1hTHve8nFKy5KPpOXOsVI/hIwi3841+w== @@ -4732,7 +4758,7 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -date-fns@^1.23.0, date-fns@^1.29.0: +date-fns@^1.23.0, date-fns@^1.30.1: version "1.30.1" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw== @@ -5156,6 +5182,11 @@ dot-prop@^4.1.0, dot-prop@^4.1.1, dot-prop@^4.2.0: dependencies: is-obj "^1.0.0" +dotenv-expand@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-4.2.0.tgz#def1f1ca5d6059d24a766e587942c21106ce1275" + integrity sha1-3vHxyl1gWdJKdm5YeULCEQbOEnU= + dotenv@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-6.2.0.tgz#941c0410535d942c8becf28d3f357dbd9d476064" @@ -5204,11 +5235,16 @@ ejs@^2.3.1, ejs@^2.6.1: resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.6.1.tgz#498ec0d495655abc6f23cd61868d926464071aa0" integrity sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ== -electron-to-chromium@^1.3.113, electron-to-chromium@^1.3.47: +electron-to-chromium@^1.3.113: version "1.3.113" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.113.tgz#b1ccf619df7295aea17bc6951dc689632629e4a9" integrity sha512-De+lPAxEcpxvqPTyZAXELNpRZXABRxf+uL/rSykstQhzj/B0l1150G/ExIIxKc16lI89Hgz81J0BHAcbTqK49g== +electron-to-chromium@^1.3.47: + version "1.3.118" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.118.tgz#5c82b0445a40934e6cae9c2f40bfaaa986ea44a3" + integrity sha512-/1FpHvmKmKo2Z6CCza2HfkrKvKhU7Rq4nvyX1FOherdTrdTufhVrJbCrcrIqgqUCI+BG6JC2rlY4z5QA1G0NOw== + elliptic@^6.0.0: version "6.4.1" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.1.tgz#c2d0b7776911b86722c632c3c06c60f2f819939a" @@ -5327,7 +5363,7 @@ es-to-primitive@^1.2.0: is-date-object "^1.0.1" is-symbol "^1.0.2" -es6-promise@^4.0.3, es6-promise@^4.0.5, es6-promise@^4.1.0, es6-promise@^4.2.5: +es6-promise@^4.0.3, es6-promise@^4.0.5, es6-promise@^4.1.0, es6-promise@^4.2.6: version "4.2.6" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.6.tgz#b685edd8258886365ea62b57d30de28fadcd974f" integrity sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q== @@ -5417,10 +5453,10 @@ eslint-plugin-import@^2.16.0: read-pkg-up "^2.0.0" resolve "^1.9.0" -eslint-plugin-jest@^22.3.0: - version "22.3.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.3.0.tgz#a10f10dedfc92def774ec9bb5bfbd2fb8e1c96d2" - integrity sha512-P1mYVRNlOEoO5T9yTqOfucjOYf1ktmJ26NjwjH8sxpCFQa6IhBGr5TpKl3hcAAT29hOsRJVuMWmTsHoUVo9FoA== +eslint-plugin-jest@^22.4.1: + version "22.4.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.4.1.tgz#a5fd6f7a2a41388d16f527073b778013c5189a9c" + integrity sha512-gcLfn6P2PrFAVx3AobaOzlIEevpAEf9chTpFZz7bYfc7pz8XRv7vuKTIE4hxPKZSha6XWKKplDQ0x9Pq8xX2mg== eslint-plugin-json@^1.4.0: version "1.4.0" @@ -5471,7 +5507,7 @@ [email protected]: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-scope@^4.0.0, eslint-scope@^4.0.2: +eslint-scope@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.2.tgz#5f10cd6cabb1965bf479fa65745673439e21cb0e" integrity sha512-5q1+B/ogmHl8+paxtOKx38Z8LtWkVGuNt3+GQNErqwLl6ViNp/gdJGMCjZNxZ8j/VYjDNZ2Fo+eQc1TAVPIzbg== @@ -5479,6 +5515,14 @@ eslint-scope@^4.0.0, eslint-scope@^4.0.2: esrecurse "^4.1.0" estraverse "^4.1.1" +eslint-scope@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" + integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + eslint-utils@^1.3.0, eslint-utils@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.3.1.tgz#9a851ba89ee7c460346f97cf8939c7298827e512" @@ -5489,10 +5533,10 @@ eslint-visitor-keys@^1.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== -eslint@^5.14.1: - version "5.15.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.15.1.tgz#8266b089fd5391e0009a047050795b1d73664524" - integrity sha512-NTcm6vQ+PTgN3UBsALw5BMhgO6i5EpIjQF/Xb5tIh3sk9QhrFafujUOczGz4J24JBlzWclSB9Vmx8d+9Z6bFCg== +eslint@^5.15.3: + version "5.15.3" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.15.3.tgz#c79c3909dc8a7fa3714fb340c11e30fd2526b8b5" + integrity sha512-vMGi0PjCHSokZxE0NLp2VneGw5sio7SSiDNgIUn2tC0XkWJRNOIoHIg3CliLVfXnJsiHxGAYrkw0PieAu8+KYQ== dependencies: "@babel/code-frame" "^7.0.0" ajv "^6.9.1" @@ -5500,7 +5544,7 @@ eslint@^5.14.1: cross-spawn "^6.0.5" debug "^4.0.1" doctrine "^3.0.0" - eslint-scope "^4.0.2" + eslint-scope "^4.0.3" eslint-utils "^1.3.1" eslint-visitor-keys "^1.0.0" espree "^5.0.1" @@ -6103,16 +6147,17 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= -fork-ts-checker-webpack-plugin@^0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-0.5.2.tgz#a73b3630bd0a69409a6e4824e54c03a62fe82d8f" - integrity sha512-a5IG+xXyKnpruI0CP/anyRLAoxWtp3lzdG6flxicANnoSzz64b12dJ7ASAVRrI2OaWwZR2JyBaMHFQqInhWhIw== +fork-ts-checker-webpack-plugin@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-1.0.0.tgz#0f9ff0219f9b6f1a1b10fa25d7cc5015e60c997a" + integrity sha512-Kc7LI0OlnWB0FRbDQO+nnDCfZr+LhFSJIP8kZppDXvuXI/opeMg3IrlMedBX/EGgOUK0ma5Hafgkdp3DuxgYdg== dependencies: babel-code-frame "^6.22.0" chalk "^2.4.1" chokidar "^2.0.4" micromatch "^3.1.10" minimatch "^3.0.4" + semver "^5.6.0" tapable "^1.0.0" form-data@~2.3.2: @@ -6167,15 +6212,6 @@ fs-extra@^4.0.2: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-6.0.1.tgz#8abc128f7946e310135ddc93b98bddb410e7a34b" - integrity sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs-extra@^7.0.0, fs-extra@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" @@ -8244,7 +8280,7 @@ lcid@^2.0.0: dependencies: invert-kv "^2.0.0" -lerna@^3.13.0: +lerna@^3.13.1: version "3.13.1" resolved "https://registry.yarnpkg.com/lerna/-/lerna-3.13.1.tgz#feaff562176f304bd82329ca29ce46ab6c033463" integrity sha512-7kSz8LLozVsoUNTJzJzy+b8TnV9YdviR2Ee2PwGZSlVw3T1Rn7kOAPZjEi+3IWnOPC96zMPHVmjCmzQ4uubalw== @@ -8648,10 +8684,10 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" -marked@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.4.0.tgz#9ad2c2a7a1791f10a852e0112f77b571dce10c66" - integrity sha512-tMsdNBgOsrUophCAFQl0XPe6Zqk/uy9gnue+jIIKhykO51hxyu6uNx7zBPy0+y/WKYVZZMspV9YeXLNdKk+iYw== +marked@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/marked/-/marked-0.6.1.tgz#a63addde477bca9613028de4b2bc3629e53a0562" + integrity sha512-+H0L3ibcWhAZE02SKMqmvYsErLo4EAVJxu5h3bHBBDvvjeWXtl92rGUSBYHL2++5Y+RSNgl8dYOAXcYe7lp1fA== material-colors@^1.0.0: version "1.2.6" @@ -8973,7 +9009,7 @@ modify-values@^1.0.0: resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== -moment@^2.22.2: +moment@^2.24.0: version "2.24.0" resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== @@ -9487,7 +9523,7 @@ on-finished@~2.3.0: dependencies: ee-first "1.1.1" -on-headers@~1.0.1: +on-headers@~1.0.1, on-headers@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== @@ -9546,7 +9582,7 @@ optionator@^0.8.1, optionator@^0.8.2: type-check "~0.3.2" wordwrap "~1.0.0" -ora@^3.0.0, ora@^3.1.0: +ora@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ora/-/ora-3.2.0.tgz#67e98a7e11f7f0ac95deaaaf11bb04de3d09e481" integrity sha512-XHMZA5WieCbtg+tu0uPF8CjvwQdNzKCX6BVh3N6GFsEXH40mTk5dsw/ya1lBTUGJslcEFJFQ8cBhOgkkZXQtMA== @@ -10813,10 +10849,13 @@ [email protected]: iconv-lite "0.4.23" unpipe "1.0.0" -raw-loader@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-0.5.1.tgz#0c3d0beaed8a01c966d9787bf778281252a979aa" - integrity sha1-DD0L6u2KAclm2Xh793goElKpeao= +raw-loader@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-2.0.0.tgz#e2813d9e1e3f80d1bbade5ad082e809679e20c26" + integrity sha512-kZnO5MoIyrojfrPWqrhFNLZemIAX8edMOCp++yC5RKxzFB3m92DqKNhKlU6+FvpOhWtvyh3jOaD7J6/9tpdIKg== + dependencies: + loader-utils "^1.1.0" + schema-utils "^1.0.0" rc@^1.0.1, rc@^1.1.6, rc@^1.2.7: version "1.2.8" @@ -11185,7 +11224,7 @@ [email protected]: dependencies: lodash "^4.17.11" -request-promise-native@^1.0.5: +request-promise-native@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.7.tgz#a49868a624bdea5069f1251d0a836e0d89aa2c59" integrity sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w== @@ -11342,10 +11381,10 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -rollbar@^2.4.6, rollbar@^2.5.2: - version "2.5.3" - resolved "https://registry.yarnpkg.com/rollbar/-/rollbar-2.5.3.tgz#cc6e468dbb6334da856a0936672b7acdf7063b89" - integrity sha512-42mhWYsT1s1Z97UYKkUoyJ5v/ErJOjgchwLYE1ATsHt1KXvpRHjNv1I1WcszkjA5pcAZt36ijS72t4ICQiGxuA== +rollbar@^2.5.4: + version "2.5.4" + resolved "https://registry.yarnpkg.com/rollbar/-/rollbar-2.5.4.tgz#8b2ec6de999aaeee04c784110ecb40268a38c71d" + integrity sha512-JIcDNTqnHstU/vXBRafrh0pKB9Wc1FXP/wI33xhs84MJyCGw00vQ2nVDjH8Zq6M/EH0Fmezrr8vA4AikTvsISA== dependencies: async "~1.2.1" console-polyfill "0.3.0" @@ -11678,7 +11717,7 @@ shell-quote@^1.6.1: array-reduce "~0.0.0" jsonify "~0.0.0" -shelljs@^0.8.2: +shelljs@^0.8.3: version "0.8.3" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097" integrity sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A== @@ -12665,7 +12704,7 @@ tryer@^1.0.0: resolved "https://registry.yarnpkg.com/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8" integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA== -ts-jest@^21.2.1: +ts-jest@^21.2.4: version "21.2.4" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-21.2.4.tgz#8fbcfbfbf0c58cced10dcc34a5190acc8c5312ef" integrity sha512-Plk49Us+DcncpQcC8fhYwDUdhW96QB0Dv02etOLhzq+2HAvXfrEUys3teZ/BeyQ+r1rHxfGdNj4dB0Q5msZR3g== @@ -12711,10 +12750,10 @@ tslint-sonarts@^1.8.0: dependencies: immutable "^3.8.2" -tslint@^5.13.0: - version "5.13.1" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.13.1.tgz#fbc0541c425647a33cd9108ce4fd4cd18d7904ed" - integrity sha512-fplQqb2miLbcPhyHoMV4FU9PtNRbgmm/zI5d3SZwwmJQM6V0eodju+hplpyfhLWpmwrDNfNYU57uYRb8s0zZoQ== +tslint@^5.14.0: + version "5.14.0" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.14.0.tgz#be62637135ac244fc9b37ed6ea5252c9eba1616e" + integrity sha512-IUla/ieHVnB8Le7LdQFRGlVJid2T/gaJe5VkjzRVSRR6pA2ODYrnfR1hmxi+5+au9l50jBwpbBL34txgv4NnTQ== dependencies: babel-code-frame "^6.22.0" builtin-modules "^1.1.1" @@ -12728,14 +12767,7 @@ tslint@^5.13.0: resolve "^1.3.2" semver "^5.3.0" tslib "^1.8.0" - tsutils "^2.27.2" - -tsutils@^2.27.2: - version "2.29.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" - integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== - dependencies: - tslib "^1.8.1" + tsutils "^2.29.0" "tsutils@^2.27.2 <2.29.0": version "2.28.0" @@ -12744,6 +12776,13 @@ tsutils@^2.27.2: dependencies: tslib "^1.8.1" +tsutils@^2.29.0: + version "2.29.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" + integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== + dependencies: + tslib "^1.8.1" + tsutils@^3.7.0: version "3.8.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.8.0.tgz#7a3dbadc88e465596440622b65c04edc8e187ae5" @@ -12788,10 +12827,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^3.3.3333: - version "3.3.3333" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.3.3333.tgz#171b2c5af66c59e9431199117a3bcadc66fdcfd6" - integrity sha512-JjSKsAfuHBE/fB2oZ8NxtRTk5iGcg6hkYXMnZ3Wc+b2RSqejEqTaem11mHASMnFilHrax3sLK0GDzcJrekZYLw== +typescript@^3.3.4000: + version "3.3.4000" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.3.4000.tgz#76b0f89cfdbf97827e1112d64f283f1151d6adf0" + integrity sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA== typestrict@^1.0.2: version "1.0.2" @@ -13110,10 +13149,10 @@ vary@~1.1.2: resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= -vee-validate@^2.1.7: - version "2.1.7" - resolved "https://registry.yarnpkg.com/vee-validate/-/vee-validate-2.1.7.tgz#33984454d8a633cdc4825a2cf5857747d91bae67" - integrity sha512-IyPDTTvIRY6o9y14jXlgfY76Qv+hmvYDwNaMn9JY5KbQN8a1tJAu7H/+a/+EdHg1w8Zl9tsdG8lndGqY1lyMzQ== +vee-validate@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/vee-validate/-/vee-validate-2.2.0.tgz#0dcb6251a50cde9a3a1e924c917cc3d0a543b661" + integrity sha512-s72VQcl1DWTNQKQyHtUDcU536dIx/GYDnCObDj4AXDZtWnqM3rXbgp7FCT3D2q9HFKw7IykW9bVrClhPBeQnrw== vendors@^1.0.0: version "1.0.2" @@ -13171,12 +13210,12 @@ vue-add-globals@^2.0.0: resolved "https://registry.yarnpkg.com/vue-add-globals/-/vue-add-globals-2.0.1.tgz#c9fba6faac44f679ec15d5a9637f518b181fc44d" integrity sha512-NvpO+te1DsZfZq9ecPR6lJrsVm+d+R2yTgQZUEme9zS23Q+wfGYojIPgBkr7Z0ZCv3OpbEG+xd/3KSiB856QOg== -vue-analytics@^5.16.2: - version "5.16.2" - resolved "https://registry.yarnpkg.com/vue-analytics/-/vue-analytics-5.16.2.tgz#37724aeec71bb830b1cf2d52a969cf190ef120c1" - integrity sha512-5JKGnVF33VHlXFREzht9z3Z11N4IA8vXNnpvYeAf72rEUyAuuU9Q9kX34bULW2CxMrahr8m06IB8+91GX0Ruag== +vue-analytics@^5.16.4: + version "5.16.4" + resolved "https://registry.yarnpkg.com/vue-analytics/-/vue-analytics-5.16.4.tgz#7f9e197cbc64afac96884a05214b17efaf8e9d09" + integrity sha512-M67cUqpPeyk2rftrvlx2uU+BQ/C4E8SkF2Ct9LizOYUoTccZtCCJwhMJfQ3XL8xep6p3K8KYz58FzRWvx5zlPw== -vue-color@^2.4.6: +vue-color@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/vue-color/-/vue-color-2.7.0.tgz#31e898370a5786fd6c3007388cb7242db6ba6988" integrity sha512-fak9oPRL3BsYtakTGmWIS2yNRppRYNlMgGGq78CMH34ipU8fLgi/bT9JiSPcscpdTNLGracuOFuZ8OFeml+SQQ== @@ -13203,12 +13242,12 @@ vue-hot-reload-api@^2.3.0: resolved "https://registry.yarnpkg.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.3.tgz#2756f46cb3258054c5f4723de8ae7e87302a1ccf" integrity sha512-KmvZVtmM26BQOMK1rwUZsrqxEGeKiYSZGA7SNWE6uExx8UX/cj9hq2MRV/wWC3Cq6AoeDGk57rL9YMFRel/q+g== -vue-i18n@^7.8.1: - version "7.8.1" - resolved "https://registry.yarnpkg.com/vue-i18n/-/vue-i18n-7.8.1.tgz#2ce4b6efde679a1e05ddb5d907bfc1bc218803b2" - integrity sha512-BzB+EAPo/iFyFn/GXd/qVdDe67jfk+gmQaWUKD5BANhUclGrFxzRExzW2pYEAbhNm2pg0F12Oo+gL2IMLDcTAw== +vue-i18n@^8.9.0: + version "8.9.0" + resolved "https://registry.yarnpkg.com/vue-i18n/-/vue-i18n-8.9.0.tgz#5f084001fe5b4c7ad8c00ee5f11396a88ff2e55b" + integrity sha512-8wr/D9yU8CLC8ne9stdQn/N58E7GRSUSO75bCucj2AIFTDyjGfoze5RxFvh2w3e7yxgnz5x+ooOIcoX59PHguQ== -vue-loader@^15.6.2, vue-loader@^15.6.4: +vue-loader@^15.6.4, vue-loader@^15.7.0: version "15.7.0" resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-15.7.0.tgz#27275aa5a3ef4958c5379c006dd1436ad04b25b3" integrity sha512-x+NZ4RIthQOxcFclEcs8sXGEWqnZHodL2J9Vq+hUz+TDZzBaDIh1j3d9M2IUlTjtrHTZy4uMuRdTi8BGws7jLA== @@ -13219,32 +13258,25 @@ vue-loader@^15.6.2, vue-loader@^15.6.4: vue-hot-reload-api "^2.3.0" vue-style-loader "^4.1.0" -vue-no-ssr@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/vue-no-ssr/-/vue-no-ssr-0.2.2.tgz#e1a0ef0ba39fc54972edd71a2ae11a7988312b19" - integrity sha512-JRiKLrefDdFCMDkDiOIGXd2kLCeLDVcUIihnMydxGtGlIphOvIyz1HolTAlD4yBYXvpVZest2Im0ku2LBFf1GA== +vue-no-ssr@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/vue-no-ssr/-/vue-no-ssr-1.1.1.tgz#875f3be6fb0ae41568a837f3ac1a80eaa137b998" + integrity sha512-ZMjqRpWabMPqPc7gIrG0Nw6vRf1+itwf0Itft7LbMXs2g3Zs/NFmevjZGN1x7K3Q95GmIjWbQZTVerxiBxI+0g== vue-prism-component@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/vue-prism-component/-/vue-prism-component-1.1.1.tgz#df0e375f7f9b367b069b2d54e6ed86facde96030" integrity sha512-M4wM7gMIagWgf3YNS5Hrq7YDYu0pYbqMaJOhkVDfCfJ1col4ZCv+uyWpW/gkYZCuG3ic8UF3EAV22asm4pWjMA== -vue-rollbar@^0.2.4: - version "0.2.4" - resolved "https://registry.yarnpkg.com/vue-rollbar/-/vue-rollbar-0.2.4.tgz#415c719bc9d7e5b21b9b3f4b65c30f9b5c4642e5" - integrity sha512-7Z7Ee5XNsPXhwkWxfPtsm3hdRCGUfy3syQE8aQNpN0zjREy5hA6dnZQRQGpZmJw+ql+6+F4HBjwZrzRYfIogyA== - dependencies: - rollbar "^2.4.6" - vue-router@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.0.2.tgz#dedc67afe6c4e2bc25682c8b1c2a8c0d7c7e56be" integrity sha512-opKtsxjp9eOcFWdp6xLQPLmRGgfM932Tl56U9chYTnoWqKxQ8M20N7AkdEbM5beUh6wICoFGYugAX9vQjyJLFg== -vue-server-renderer@^2.6.7: - version "2.6.8" - resolved "https://registry.yarnpkg.com/vue-server-renderer/-/vue-server-renderer-2.6.8.tgz#7f191eede16778d96916f2f9199efa781fd30879" - integrity sha512-aiN2Fz3Sw35KRDQYqSSdsWjOtYcDWpm8rjcf3oSf/iiwFF/i1Q9UjDWvxQv4mbqVRBXGhdoICClQ005IZJoVbQ== +vue-server-renderer@^2.6.10: + version "2.6.10" + resolved "https://registry.yarnpkg.com/vue-server-renderer/-/vue-server-renderer-2.6.10.tgz#cb2558842ead360ae2ec1f3719b75564a805b375" + integrity sha512-UYoCEutBpKzL2fKCwx8zlRtRtwxbPZXKTqbl2iIF4yRZUNO/ovrHyDAJDljft0kd+K0tZhN53XRHkgvCZoIhug== dependencies: chalk "^1.1.3" hash-sum "^1.0.2" @@ -13263,10 +13295,10 @@ vue-style-loader@^4.1.0, vue-style-loader@^4.1.2: hash-sum "^1.0.2" loader-utils "^1.0.2" -vue-template-compiler@^2.6.7: - version "2.6.8" - resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.6.8.tgz#750802604595134775b9c53141b9850b35255e1c" - integrity sha512-SwWKANE5ee+oJg+dEJmsdxsxWYICPsNwk68+1AFjOS8l0O/Yz2845afuJtFqf3UjS/vXG7ECsPeHHEAD65Cjng== +vue-template-compiler@^2.6.10: + version "2.6.10" + resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.6.10.tgz#323b4f3495f04faa3503337a82f5d6507799c9cc" + integrity sha512-jVZkw4/I/HT5ZMvRnhv78okGusqe0+qH2A0Em0Cp8aq78+NK9TII263CDVz2QXZsIT+yyV/gZc/j/vlwa+Epyg== dependencies: de-indent "^1.0.2" he "^1.1.0" @@ -13276,15 +13308,10 @@ vue-template-es2015-compiler@^1.9.0: resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz#1ee3bc9a16ecbf5118be334bb15f9c46f82f5825" integrity sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw== -vue@^2.6.5: - version "2.6.9" - resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.9.tgz#415c1cc1a5ed00c8f0acdd0a948139d12b7ea6b3" - integrity sha512-t1+tvH8hybPM86oNne3ZozCD02zj/VoZIiojOBPJLjwBn7hxYU5e1gBObFpq8ts1NEn1VhPf/hVXBDAJ3X5ljg== - -vue@^2.6.7: - version "2.6.8" - resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.8.tgz#f21cbc536bfc14f7d1d792a137bb12f69e60ea91" - integrity sha512-+vp9lEC2Kt3yom673pzg1J7T1NVGuGzO9j8Wxno+rQN2WYVBX2pyo/RGQ3fXCLh2Pk76Skw/laAPCuBuEQ4diw== +vue@^2.6.10: + version "2.6.10" + resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.10.tgz#a72b1a42a4d82a721ea438d1b6bf55e66195c637" + integrity sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ== vuelidate@^0.6.2: version "0.6.2" @@ -13388,10 +13415,10 @@ webpack-chain@^4.11.0: deepmerge "^1.5.2" javascript-stringify "^1.6.0" -webpack-cli@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.2.3.tgz#13653549adfd8ccd920ad7be1ef868bacc22e346" - integrity sha512-Ik3SjV6uJtWIAN5jp5ZuBMWEAaP5E4V78XJ2nI+paFPh8v4HPSwo/myN0r29Xc/6ZKnd2IdrAlpSgNOu2CDQ6Q== +webpack-cli@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.3.0.tgz#55c8a74cae1e88117f9dda3a801c7272e93ca318" + integrity sha512-t1M7G4z5FhHKJ92WRKwZ1rtvi7rHc0NZoZRbSkol0YKl4HvcC8+DsmGDmK7MmZxHSAetHagiOsjOB6MmzC2TUw== dependencies: chalk "^2.4.1" cross-spawn "^6.0.5" @@ -13403,9 +13430,9 @@ webpack-cli@^3.2.3: loader-utils "^1.1.0" supports-color "^5.5.0" v8-compile-cache "^2.0.2" - yargs "^12.0.4" + yargs "^12.0.5" -webpack-dev-middleware@^3.5.1, webpack-dev-middleware@^3.6.0: +webpack-dev-middleware@^3.5.1, webpack-dev-middleware@^3.6.1: version "3.6.1" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.6.1.tgz#91f2531218a633a99189f7de36045a331a4b9cd4" integrity sha512-XQmemun8QJexMEvNFbD2BIg4eSKrmSIMrTfnl2nql2Sc6OGAYFyb8rwuYrCjl/IiEYYuyTEiimMscu7EXji/Dw== @@ -13415,7 +13442,7 @@ webpack-dev-middleware@^3.5.1, webpack-dev-middleware@^3.6.0: range-parser "^1.0.3" webpack-log "^2.0.0" -webpack-dev-server@^3.1.14, webpack-dev-server@^3.2.0: +webpack-dev-server@^3.2.0, webpack-dev-server@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.2.1.tgz#1b45ce3ecfc55b6ebe5e36dab2777c02bc508c4e" integrity sha512-sjuE4mnmx6JOh9kvSbPYw3u/6uxCLHNWfhWaIPwcXWsvWOPN+nc5baq4i9jui3oOBRXGonK9+OI0jVkaz6/rCw== @@ -13519,7 +13546,7 @@ webpack-sources@^1.1.0, webpack-sources@^1.3.0: watchpack "^1.5.0" webpack-sources "^1.3.0" -webpack@^4.29.5: +webpack@^4.29.6: version "4.29.6" resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.29.6.tgz#66bf0ec8beee4d469f8b598d3988ff9d8d90e955" integrity sha512-MwBwpiE1BQpMDkbnUUaW6K8RFZjljJHArC6tWQJoFm0oQtfoSebtg4Y7/QHnJ/SddtjYLHaKGX64CFjG5rehJw== @@ -13832,7 +13859,7 @@ yargs@^10.0.3: y18n "^3.2.1" yargs-parser "^8.1.0" -yargs@^12.0.1, yargs@^12.0.4: +yargs@^12.0.1, yargs@^12.0.5: version "12.0.5" resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==
86e785f6d5ce9b265c7facc133d307ce3f261a70
2023-09-18 17:42:27
Eduardo Paixão
docs(getting-started): 'global' to 'globals' in the vitest config (#18272)
false
'global' to 'globals' in the vitest config (#18272)
docs
diff --git a/packages/docs/src/pages/en/getting-started/unit-testing.md b/packages/docs/src/pages/en/getting-started/unit-testing.md index 5d02d587e2d..d1fdcf4aa1b 100644 --- a/packages/docs/src/pages/en/getting-started/unit-testing.md +++ b/packages/docs/src/pages/en/getting-started/unit-testing.md @@ -33,7 +33,7 @@ import { defineConfig } from 'vite' export default defineConfig({ test: { - global: true, + globals: true, environment: 'jsdom', deps: { inline: ['vuetify'],
d57684d034d75f9dc3eaced66f32c9a93796753f
2021-05-06 22:06:06
Kael
feat(styles): move theme-overlay-multiplier variable to :root
false
move theme-overlay-multiplier variable to :root
feat
diff --git a/packages/vuetify/src/components/VApp/VApp.sass b/packages/vuetify/src/components/VApp/VApp.sass index ed7cd4f60b5..38ac74c9866 100644 --- a/packages/vuetify/src/components/VApp/VApp.sass +++ b/packages/vuetify/src/components/VApp/VApp.sass @@ -4,7 +4,6 @@ display: flex background: rgb(var(--v-theme-background)) color: rgb(var(--v-theme-on-background)) - --v-theme-overlay-multiplier: var(--v-theme-background-overlay-multiplier) a cursor: pointer diff --git a/packages/vuetify/src/styles/elements/_global.sass b/packages/vuetify/src/styles/elements/_global.sass index 8c5259cb476..3ca795490e3 100644 --- a/packages/vuetify/src/styles/elements/_global.sass +++ b/packages/vuetify/src/styles/elements/_global.sass @@ -11,6 +11,9 @@ html html.overflow-y-hidden overflow-y: hidden !important +:root + --v-theme-overlay-multiplier: 1 + // iOS Safari hack to allow click events on body @supports (-webkit-touch-callout: none) body
648c02dc71e56212b2b8c46b2b701d9045d17c90
2018-09-29 08:27:29
John Leider
fix(v-tabs): cleanup and improve feel
false
cleanup and improve feel
fix
diff --git a/src/components/VTabs/VTabs.js b/src/components/VTabs/VTabs.js index 74b09dd87e5..f0ca7722e0f 100644 --- a/src/components/VTabs/VTabs.js +++ b/src/components/VTabs/VTabs.js @@ -92,15 +92,6 @@ export default BaseItemGroup.extend({ tabs: 'onResize' }, - mounted () { - this.checkIcons() - - /* istanbul ignore next */ - if (this.$listeners['input']) { - deprecate('@input', '@change', this) - } - }, - methods: { checkIcons () { this.prevIconVisible = this.checkPrevIcon() @@ -130,7 +121,14 @@ export default BaseItemGroup.extend({ // painted init () { BaseItemGroup.options.methods.init.call(this) - setTimeout(this.callSlider, 0) + this.checkIcons() + + /* istanbul ignore next */ + if (this.$listeners['input']) { + deprecate('@input', '@change', this) + } + + setTimeout(this.callSlider, 33) }, /** * When v-navigation-drawer changes the diff --git a/src/components/VWindow/VWindowItem.ts b/src/components/VWindow/VWindowItem.ts index 6a6d2096f49..d8eb6fc0e18 100644 --- a/src/components/VWindow/VWindowItem.ts +++ b/src/components/VWindow/VWindowItem.ts @@ -97,10 +97,19 @@ export default mixins<options & ExtractVue<[typeof Bootable]>>( this.wasCancelled = true }, onEnter (el: HTMLElement, done: () => void) { - addOnceEventListener(el, 'transitionend', done) + const isBooted = this.windowGroup.isBooted + + if (isBooted) { + addOnceEventListener(el, 'transitionend', done) + } requestAnimationFrame(() => { this.windowGroup.internalHeight = convertToUnit(el.clientHeight) + + // On initial render, there is no transition + // Vue leaves a `enter` transition class + // if done is called too fast + !isBooted && setTimeout(done, 100) }) } },
ff21b188d0b8e3f0e53ffa33c88236deb1f0990d
2022-04-19 14:48:31
John Leider
docs(buttons): update page opening structure
false
update page opening structure
docs
diff --git a/packages/docs/src/examples/v-btn/usage.vue b/packages/docs/src/examples/v-btn/usage.vue index e9a5c31e102..dbf35ed7ac4 100644 --- a/packages/docs/src/examples/v-btn/usage.vue +++ b/packages/docs/src/examples/v-btn/usage.vue @@ -1,78 +1,33 @@ <template> - <v-row - align="center" - justify="center" + <usage-example + v-model="model" + :options="options" + name="v-btn" > - <v-btn - v-bind="$attrs" - > - <v-icon v-if="$attrs.fab || $attrs.icon"> - $mdiVuetify - </v-icon> - - <span v-else>Click Me</span> - </v-btn> - </v-row> + <div class="text-center"> + <v-defaults-provider + :defaults="{ + VBtn: { + prependIcon: model === 'prepend' ? 'mdi-vuetify' : undefined, + appendIcon: model === 'append' ? 'mdi-account-circle' : undefined, + } + }" + > + <v-btn> + Button text + </v-btn> + </v-defaults-provider> + </div> + </usage-example> </template> <script> export default { - name: 'Usage', - - inheritAttrs: false, + name: 'VBtnUsageExample', data: () => ({ - defaults: { - block: false, - color: null, - depressed: false, - disabled: false, - elevation: 2, - fab: false, - icon: false, - large: false, - loading: false, - outlined: false, - plain: false, - rounded: false, - small: false, - text: false, - tile: false, - 'x-large': false, - 'x-small': false, - }, - options: { - booleans: [ - 'block', - 'disabled', - 'large', - 'loading', - 'small', - 'x-large', - 'x-small', - ], - sliders: { - elevation: [0, 24], - }, - selects: { - color: [ - 'accent', - 'primary', - 'secondary', - ], - }, - }, - tabs: [ - 'depressed', - 'icon', - 'outlined', - 'plain', - 'raised', - 'rounded', - 'fab', - 'text', - 'tile', - ], + model: 'default', + options: ['prepend', 'append'], }), } </script> diff --git a/packages/docs/src/pages/en/components/all.md b/packages/docs/src/pages/en/components/all.md index 6530d5a241f..fc4f6aa02c2 100644 --- a/packages/docs/src/pages/en/components/all.md +++ b/packages/docs/src/pages/en/components/all.md @@ -36,6 +36,12 @@ Vuetify Components are interactive building blocks for creating user interfaces. </components-list-item> +<components-list-item name="banners"> + + Banners are used to communicate important information to the user. + +</components-list-item> + <components-list-item name="breadcrumbs"> Breadcrumbs are navigational helpers for router pages. diff --git a/packages/docs/src/pages/en/components/buttons.md b/packages/docs/src/pages/en/components/buttons.md index 951902ed607..e314908f9e6 100644 --- a/packages/docs/src/pages/en/components/buttons.md +++ b/packages/docs/src/pages/en/components/buttons.md @@ -14,25 +14,38 @@ related: The `v-btn` component replaces the standard html button with a material design theme and a multitude of options. Any color helper class can be used to alter the background or text color. <inline slug="scrimba-buttons" /> -<entry /> +![Button Entry](https://cdn.vuetifyjs.com/docs/images/components-temp/v-btn/v-btn-entry.png) + +--- ## Usage Buttons in their simplest form contain uppercase text, a slight elevation, hover effect, and a ripple effect on click. -<!-- <usage name="v-btn" /> --> +<usage name="v-btn" /> -## API +<entry /> + +## Anatomy -<api-inline /> +The recommended placement of elements inside of `v-btn` is: -## Caveats +* Place text in the center +* Place visual content around container text -<alert type="warning"> +![Button Anatomy](https://cdn.vuetifyjs.com/docs/images/components-temp/v-btn/v-btn-anatomy.png) - `v-btn` is the only component that behaves differently when using the **dark** prop. Normally components use the **dark** prop to denote that they have a dark colored background and need their text to be white. While this will work for `v-btn`, it is advised to only use the prop when the button **IS ON** a colored background due to the disabled state blending in with white backgrounds. If you need white text, simply add the `white--text` class. +| Element / Area | Description | +| - | - | +| 1. Container | In addition to text, the Button container typically holds a [v-icon](/components/icons/) component | +| 2. Icon (optional) | Leading media content intended to improve visual context | +| 3. Text | A content area for displaying text and other inline elements | + +## API -</alert> +| Component | Description | +| - | - | +| [v-btn](/api/v-btn) | Primary Component | ## Examples
c6f3a2cd396f70abe9e2c85e5fe1352646d20bf6
2019-04-24 01:41:28
John Leider
fix(VParallax): show image if no translation is available (#7042)
false
show image if no translation is available (#7042)
fix
diff --git a/packages/vuetify/src/components/VParallax/VParallax.ts b/packages/vuetify/src/components/VParallax/VParallax.ts index 4ed51401ce6..ad113525cfd 100644 --- a/packages/vuetify/src/components/VParallax/VParallax.ts +++ b/packages/vuetify/src/components/VParallax/VParallax.ts @@ -5,18 +5,20 @@ import './VParallax.sass' import Translatable from '../../mixins/translatable' // Types -import Vue from 'vue' import { VNode, VNodeData } from 'vue/types/vnode' -import mixins, { ExtractVue } from '../../util/mixins' +import mixins from '../../util/mixins' -interface options extends Vue { +const baseMixins = mixins( + Translatable +) +interface options extends InstanceType<typeof baseMixins> { $refs: { img: HTMLImageElement } } /* @vue/component */ -export default mixins<options & ExtractVue<typeof Translatable>>(Translatable).extend({ +export default baseMixins.extend<options>().extend({ name: 'v-parallax', props: { @@ -45,12 +47,6 @@ export default mixins<options & ExtractVue<typeof Translatable>>(Translatable).e } }, - watch: { - parallax () { - this.isBooted = true - } - }, - mounted () { this.init() }, @@ -70,6 +66,8 @@ export default mixins<options & ExtractVue<typeof Translatable>>(Translatable).e this.listeners() }, false) } + + this.isBooted = true }, objHeight () { return this.$refs.img.naturalHeight diff --git a/packages/vuetify/src/components/VParallax/__tests__/__snapshots__/VParallax.spec.ts.snap b/packages/vuetify/src/components/VParallax/__tests__/__snapshots__/VParallax.spec.ts.snap index d10a4bdaaa9..a24bdd9cda1 100644 --- a/packages/vuetify/src/components/VParallax/__tests__/__snapshots__/VParallax.spec.ts.snap +++ b/packages/vuetify/src/components/VParallax/__tests__/__snapshots__/VParallax.spec.ts.snap @@ -25,7 +25,7 @@ exports[`VParallax.ts should use alt tag when supplied 1`] = ` <div class="v-parallax__image-container"> <img alt="name" class="v-parallax__image" - style="display: block; opacity: 0; transform: translate(-50%, 0px);" + style="display: block; opacity: 1; transform: translate(-50%, 0px);" > </div> <div class="v-parallax__content"> @@ -42,7 +42,7 @@ exports[`VParallax.ts should use empty alt tag when not supplied 1`] = ` <div class="v-parallax__image-container"> <img alt class="v-parallax__image" - style="display: block; opacity: 0; transform: translate(-50%, 0px);" + style="display: block; opacity: 1; transform: translate(-50%, 0px);" > </div> <div class="v-parallax__content">
4302f3f8e1c03d8d3f4802e65afd64f06452c5fa
2018-10-28 15:17:29
Kael
fix: don't crash if the url contains "product"
false
don't crash if the url contains "product"
fix
diff --git a/packages/vuetifyjs.com/mixins/meta.js b/packages/vuetifyjs.com/mixins/meta.js index 67bb5531a2c..89b08680287 100644 --- a/packages/vuetifyjs.com/mixins/meta.js +++ b/packages/vuetifyjs.com/mixins/meta.js @@ -73,7 +73,7 @@ export default { const lang = this.$route.path.split('/')[1] const meta = this.$i18n.getLocaleMessage(lang).meta || {} - if (this.$route.path.indexOf('product') > -1) { + if (this.$route.name === 'store/Product') { return (this.meta = this.getProductMeta()) }
0310e4013b3b203995c9c3408def6148ab8a0ac5
2018-05-03 15:04:03
Kael
chore: replace tslint with eslint-plugin-typescript
false
replace tslint with eslint-plugin-typescript
chore
diff --git a/.eslintrc.js b/.eslintrc.js index a9326518de1..f0909ea4171 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,7 +1,7 @@ module.exports = { root: true, + parser: 'typescript-eslint-parser', parserOptions: { - parser: 'babel-eslint', ecmaVersion: 2017, sourceType: 'module' }, @@ -19,6 +19,7 @@ module.exports = { 'process': true }, plugins: [ + 'typescript', 'eslint-plugin-local-rules' ], rules: { @@ -51,6 +52,26 @@ module.exports = { named: 'always', asyncArrow: 'always' } - ] - } + ], + 'no-return-await': 'warn' + }, + overrides: [ + { + files: '**/*.ts', + rules: { + // https://github.com/eslint/typescript-eslint-parser#known-issues + 'no-undef': 'off', + 'no-unused-vars': 'off', + + // https://github.com/eslint/typescript-eslint-parser/issues/445 + // 'typescript/no-unused-vars': 'error' + + // https://github.com/eslint/eslint/issues/10260 + 'space-infix-ops': false, + + // Can't overload function exports with this enabled + 'import/export': false + } + } + ] } diff --git a/.tslint.js b/.tslint.js deleted file mode 100644 index 4c65e2b4972..00000000000 --- a/.tslint.js +++ /dev/null @@ -1,26 +0,0 @@ -module.exports = { - defaultSeverity: 'error', - extends: 'tslint-config-standard', - linterOptions: { - exclude: [ - './build/*', - './es5/**/*', - './dev/**/*', - './src/stylus/*.styl', - './src/util/testing.js', - './src/util/to-have-been-warned.js', - '**/*.spec.js', - './node_modules/**/*' - ] - }, - jsRules: { - 'max-line-length': [true, 140], - 'no-debugger': process.env.NODE_ENV === 'production' - }, - rules: { - 'max-line-length': [true, 140], - 'no-debugger': process.env.NODE_ENV === 'production', - 'strict-type-predicates': false - }, - rulesDirectory: [] -} diff --git a/build/webpack.dev.config.js b/build/webpack.dev.config.js index d4c721c688b..88b9aa9161b 100644 --- a/build/webpack.dev.config.js +++ b/build/webpack.dev.config.js @@ -48,26 +48,9 @@ module.exports = merge(baseWebpackConfig, { }, 'eslint-loader'], exclude: /node_modules/ }, - // { - // test: /\.[jt]s$/, - // enforce: 'pre', - // loader: 'tslint-loader', - // options: { - // failOnHint: true, - // typeCheck: true, - // configFile: resolve('../.tslint.js'), - // tsConfigFile: resolve('../tsconfig.json') - // }, - // exclude: /node_modules/ - // }, { - test: /\.ts$/, - loaders: ['ts-loader'], - exclude: /node_modules/ - }, - { - test: /\.js$/, - loaders: ['babel-loader'], + test: /\.[jt]s$/, + loaders: ['babel-loader', 'ts-loader', 'eslint-loader'], exclude: /node_modules/ }, { diff --git a/build/webpack.prod.config.js b/build/webpack.prod.config.js index 9113cfd0a80..948a82f68cb 100644 --- a/build/webpack.prod.config.js +++ b/build/webpack.prod.config.js @@ -29,21 +29,9 @@ module.exports = merge(baseWebpackConfig, { module: { noParse: /es6-promise\.js$/, // avoid webpack shimming process rules: [ - { - test: /\.ts$/, - enforce: 'pre', - loader: 'tslint-loader', - options: { - failOnHint: true, - typeCheck: true, - configFile: resolve('../.tslint.js'), - tsConfigFile: resolve('../tsconfig.json') - }, - exclude: /node_modules/ - }, { test: /\.[jt]s$/, - loaders: ['babel-loader', 'ts-loader'], + loaders: ['babel-loader', 'ts-loader', 'eslint-loader'], exclude: /node_modules/ }, { diff --git a/package.json b/package.json index a2aad04737b..4399fc7d92d 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "test:unix": "cross-env NODE_ENV=test jest", "test:win32": "cross-env NODE_ENV=test jest -i", "test:coverage": "cross-env NODE_ENV=test jest --coverage", - "lint": "tslint -p . -c .tslint.js src/**/*.{ts,js}", + "lint": "eslint --ext .js,.ts src", "preparecommitmsg": "node dev/prepare-commit-message.js", "commitmsg": "node dev/lint-commit-message.js", "precommit": "node dev/warn-npm-install.js && yarn lint && yarn test" @@ -56,15 +56,16 @@ "css-mqpacker": "^6.0.2", "cssnano": "3.10.0", "dotenv": "4.0.0", - "eslint": "4.15.0", - "eslint-config-standard": "^11.0.0-beta.0", + "eslint": "4.19.1", + "eslint-config-standard": "^11.0.0", "eslint-friendly-formatter": "3.0.0", "eslint-loader": "1.9.0", "eslint-plugin-import": "^2.8.0", "eslint-plugin-local-rules": "^0.1.0", "eslint-plugin-node": "^5.2.1", "eslint-plugin-promise": "^3.6.0", - "eslint-plugin-standard": "^3.0.1", + "eslint-plugin-standard": "^3.1.0", + "eslint-plugin-typescript": "^0.12.0", "eventsource-polyfill": "0.9.6", "extract-text-webpack-plugin": "3.0.2", "friendly-errors-webpack-plugin": "1.6.1", @@ -92,10 +93,8 @@ "stylus-loader": "^3.0.2", "ts-jest": "^22.4.2", "ts-loader": "^3.5.0", - "tslint": "^5.9.1", - "tslint-config-standard": "^7.0.0", - "tslint-loader": "^3.6.0", - "typescript": "^2.8.1", + "typescript": "^2.8.3", + "typescript-eslint-parser": "^15.0.0", "uglifyjs-webpack-plugin": "1.1.6", "vue": "^2.5.16", "vue-loader": "^14.2.2", diff --git a/src/components/VIcon/VIcon.ts b/src/components/VIcon/VIcon.ts index ba21f15f051..f289e022d5f 100644 --- a/src/components/VIcon/VIcon.ts +++ b/src/components/VIcon/VIcon.ts @@ -67,18 +67,18 @@ export default mixins(Colorable, Themeable).extend({ xLarge: Boolean }, - render (h, context): VNode { - const { props, data, parent } = context + render (h, { props, data, parent, children }): VNode { const { small, medium, large, xLarge } = props const sizes = { small, medium, large, xLarge } const explicitSize = keys(sizes).find(key => sizes[key] && !!key) const fontSize = (explicitSize && SIZE_MAP[explicitSize]) || convertToUnit(props.size) - const children: VNodeChildren = [] + + const newChildren: VNodeChildren = [] if (fontSize) data.style = { fontSize, ...data.style } let iconName = '' - if (context.children.length) iconName = context.children[0].text + if (children.length) iconName = children[0].text // Support usage of v-text and v-html else if (data.domProps) { iconName = data.domProps.textContent || @@ -106,7 +106,7 @@ export default mixins(Colorable, Themeable).extend({ if (isFontAwesome5(iconType)) iconType = '' // Assume if not a custom icon // is Material Icon font - } else children.push(iconName) + } else newChildren.push(iconName) data.attrs = data.attrs || {} if (!('aria-hidden' in data.attrs)) { @@ -135,6 +135,6 @@ export default mixins(Colorable, Themeable).extend({ ].reduce((prev, curr) => curr ? `${prev} ${curr}` : prev) .trim() - return h('i', data, children) + return h('i', data, newChildren) } }) diff --git a/src/globals.d.ts b/src/globals.d.ts index 8d231d582aa..255e0f83695 100644 --- a/src/globals.d.ts +++ b/src/globals.d.ts @@ -1,3 +1,5 @@ +/* eslint-disable max-len */ + import { VueConstructor, ComponentOptions, PluginFunction, FunctionalComponentOptions } from 'vue' import { CombinedVueInstance, Vue } from 'vue/types/vue' import { @@ -17,7 +19,13 @@ declare global { } declare module 'vue/types/vue' { - export type OptionsVue<Instance extends Vue, Data, Methods, Computed, Props, RawProps = undefined> = VueConstructor<CombinedVueInstance<Instance, Data, Methods, Computed, Props> & Vue, Data, Methods, Computed, RawProps> + export type OptionsVue<Instance extends Vue, Data, Methods, Computed, Props, RawProps = undefined> = VueConstructor< + CombinedVueInstance<Instance, Data, Methods, Computed, Props> & Vue, + Data, + Methods, + Computed, + RawProps + > export interface RawComponentOptions<V extends Vue = Vue, Data = {}, Methods = {}, Computed = {}, Props = {}> { data?: Data, diff --git a/src/mixins/routable.ts b/src/mixins/routable.ts index 98f9d1b2356..98fb75315c4 100644 --- a/src/mixins/routable.ts +++ b/src/mixins/routable.ts @@ -27,7 +27,7 @@ export default Vue.extend({ }, methods: { - click (e: MouseEvent): void {/**/}, + click (e: MouseEvent): void { /**/ }, generateRouteLink () { let exact = this.exact let tag diff --git a/src/mixins/toggleable.ts b/src/mixins/toggleable.ts index 5900cccf6ac..dbe24326c40 100644 --- a/src/mixins/toggleable.ts +++ b/src/mixins/toggleable.ts @@ -1,9 +1,7 @@ import Vue from 'vue' import { ExtendedVue } from 'vue/types/vue' -declare type Toggleable<T extends string> = ExtendedVue<Vue, { isActive: boolean }, {}, {}, Record<T, any>> - -export function factory<T extends string> (prop?: T, event?: string): Toggleable<T> +export function factory<T extends string> (prop?: T, event?: string): ExtendedVue<Vue, { isActive: boolean }, {}, {}, Record<T, any>> export function factory (prop = 'value', event = 'input') { return Vue.extend({ model: { prop, event }, diff --git a/src/util/component.ts b/src/util/component.ts index 29e2d387375..988e8856007 100644 --- a/src/util/component.ts +++ b/src/util/component.ts @@ -1,4 +1,4 @@ -/* tslint:disable:max-line-length */ +/* eslint-disable max-len, import/export */ import { ComponentOptions, RecordPropsDefinition, diff --git a/src/util/mixins.ts b/src/util/mixins.ts index 14370580e0e..2c99276982d 100644 --- a/src/util/mixins.ts +++ b/src/util/mixins.ts @@ -1,4 +1,4 @@ -/* tslint:disable:max-line-length */ +/* eslint-disable max-len, import/export */ import Vue, { VueConstructor, ComponentOptions } from 'vue' type Component<T extends Vue> = ComponentOptions<T> | VueConstructor<T> diff --git a/yarn.lock b/yarn.lock index 30a245b4c6a..6dc469ec37a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -155,18 +155,10 @@ acorn@^5.0.0, acorn@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.1.1.tgz#53fe161111f912ab999ee887a90a0bc52822fd75" -acorn@^5.2.1: - version "5.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.3.0.tgz#7446d39459c54fb49a80e6ee6478149b940ec822" - -acorn@^5.3.0: +acorn@^5.3.0, acorn@^5.5.0: version "5.5.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.3.tgz#f473dd47e0277a08e28e9bec5aeeb04751f0b8c9" -ajv-keywords@^1.0.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" - ajv-keywords@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" @@ -175,7 +167,7 @@ ajv-keywords@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.1.0.tgz#ac2b27939c543e95d2c06e7f7f5c27be4aa543be" -ajv@^4.7.0, ajv@^4.9.1: +ajv@^4.9.1: version "4.11.8" resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" dependencies: @@ -191,7 +183,7 @@ ajv@^5.0.0: json-schema-traverse "^0.3.0" json-stable-stringify "^1.0.1" -ajv@^5.1.0, ajv@^5.3.0: +ajv@^5.1.0, ajv@^5.2.3, ajv@^5.3.0: version "5.5.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" dependencies: @@ -1838,10 +1830,6 @@ commander@^2.11.0, commander@^2.7.1, commander@^2.9.0: version "2.11.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" -commander@^2.12.1: - version "2.15.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" - commander@~2.13.0: version "2.13.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" @@ -2383,16 +2371,9 @@ [email protected]: esutils "^2.0.2" isarray "^1.0.0" -doctrine@^0.7.2: - version "0.7.2" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-0.7.2.tgz#7cb860359ba3be90e040b26b729ce4bfa654c523" - dependencies: - esutils "^1.1.6" - isarray "0.0.1" - -doctrine@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.2.tgz#68f96ce8efc56cc42651f1faadb4f175273b0075" +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" dependencies: esutils "^2.0.2" @@ -2649,9 +2630,9 @@ escope@^3.6.0: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-config-standard@^11.0.0-beta.0: - version "11.0.0-beta.0" - resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-11.0.0-beta.0.tgz#f8afe69803d95c685a4b8392b8793188eb03cbb3" +eslint-config-standard@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-11.0.0.tgz#87ee0d3c9d95382dc761958cbb23da9eea31e0ba" [email protected]: version "3.0.0" @@ -2719,9 +2700,15 @@ eslint-plugin-promise@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.6.0.tgz#54b7658c8f454813dc2a870aff8152ec4969ba75" -eslint-plugin-standard@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-3.0.1.tgz#34d0c915b45edc6f010393c7eef3823b08565cf2" +eslint-plugin-standard@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-3.1.0.tgz#2a9e21259ba4c47c02d53b2d0c9135d4b1022d47" + +eslint-plugin-typescript@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-typescript/-/eslint-plugin-typescript-0.12.0.tgz#e23d58cb27fe28e89fc641a1f20e8d862cb99aef" + dependencies: + requireindex "~1.1.0" eslint-scope@^3.7.1, eslint-scope@~3.7.1: version "3.7.1" @@ -2734,9 +2721,9 @@ eslint-visitor-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" [email protected]: - version "4.15.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.15.0.tgz#89ab38c12713eec3d13afac14e4a89e75ef08145" [email protected]: + version "4.19.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300" dependencies: ajv "^5.3.0" babel-code-frame "^6.22.0" @@ -2744,10 +2731,10 @@ [email protected]: concat-stream "^1.6.0" cross-spawn "^5.1.0" debug "^3.1.0" - doctrine "^2.0.2" + doctrine "^2.1.0" eslint-scope "^3.7.1" eslint-visitor-keys "^1.0.0" - espree "^3.5.2" + espree "^3.5.4" esquery "^1.0.0" esutils "^2.0.2" file-entry-cache "^2.0.0" @@ -2769,18 +2756,19 @@ [email protected]: path-is-inside "^1.0.2" pluralize "^7.0.0" progress "^2.0.0" + regexpp "^1.0.1" require-uncached "^1.0.3" semver "^5.3.0" strip-ansi "^4.0.0" strip-json-comments "~2.0.1" - table "^4.0.1" + table "4.0.2" text-table "~0.2.0" -espree@^3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.2.tgz#756ada8b979e9dcfcdb30aad8d1a9304a905e1ca" +espree@^3.5.4: + version "3.5.4" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7" dependencies: - acorn "^5.2.1" + acorn "^5.5.0" acorn-jsx "^3.0.0" esprima@^2.6.0: @@ -2816,10 +2804,6 @@ estree-walker@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.3.1.tgz#e6b1a51cf7292524e7237c312e5fe6660c1ce1aa" -esutils@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-1.1.6.tgz#c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375" - esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" @@ -4166,10 +4150,6 @@ is-wsl@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" [email protected]: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - [email protected], isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -4973,11 +4953,15 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "~3.0.0" [email protected]: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c" + lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" [email protected], lodash@^4.0.0, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.5.1: [email protected], lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.5.1: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -6555,6 +6539,10 @@ regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" +regexpp@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.1.0.tgz#0e3516dd0b7904f413d2d4193dce4618c3a689ab" + regexpu-core@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" @@ -6713,6 +6701,10 @@ require-uncached@^1.0.3: caller-path "^0.1.0" resolve-from "^1.0.0" +requireindex@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.1.0.tgz#e5404b81557ef75db6e49c5a72004893fe03e162" + [email protected], [email protected]: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" @@ -6749,12 +6741,6 @@ resolve@^1.1.6, resolve@^1.1.7, resolve@^1.2.0, resolve@^1.3.3, resolve@^1.4.0: dependencies: path-parse "^1.0.5" -resolve@^1.3.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" - dependencies: - path-parse "^1.0.5" - [email protected]: version "1.2.2" resolved "https://registry.yarnpkg.com/ress/-/ress-1.2.2.tgz#4fd00681c8d3ceaa79f5de1e54aaad15617e9777" @@ -6782,7 +6768,7 @@ rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.1: dependencies: glob "^7.0.5" [email protected], rimraf@^2.4.4, rimraf@^2.5.4: [email protected], rimraf@^2.5.4: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" dependencies: @@ -6886,7 +6872,7 @@ [email protected]: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" -semver@^5.5.0: [email protected], semver@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" @@ -7049,9 +7035,11 @@ slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" [email protected]: - version "0.0.4" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" [email protected]: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" + dependencies: + is-fullwidth-code-point "^2.0.0" snapdragon-node@^2.0.1: version "2.1.1" @@ -7458,16 +7446,16 @@ symbol-tree@^3.2.1, symbol-tree@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" -table@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/table/-/table-4.0.1.tgz#a8116c133fac2c61f4a420ab6cdf5c4d61f0e435" [email protected]: + version "4.0.2" + resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" dependencies: - ajv "^4.7.0" - ajv-keywords "^1.0.0" - chalk "^1.1.1" - lodash "^4.0.0" - slice-ansi "0.0.4" - string-width "^2.0.0" + ajv "^5.2.3" + ajv-keywords "^2.1.0" + chalk "^2.1.0" + lodash "^4.17.4" + slice-ansi "1.0.0" + string-width "^2.1.1" tapable@^0.2.7: version "0.2.8" @@ -7687,65 +7675,6 @@ ts-loader@^3.5.0: micromatch "^3.1.4" semver "^5.0.1" -tslib@^1.0.0, tslib@^1.7.1: - version "1.8.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.8.0.tgz#dc604ebad64bcbf696d613da6c954aa0e7ea1eb6" - -tslib@^1.8.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8" - -tslint-config-standard@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/tslint-config-standard/-/tslint-config-standard-7.0.0.tgz#47bbf25578ed2212456f892d51e1abe884a29f15" - dependencies: - tslint-eslint-rules "^4.1.1" - -tslint-eslint-rules@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/tslint-eslint-rules/-/tslint-eslint-rules-4.1.1.tgz#7c30e7882f26bc276bff91d2384975c69daf88ba" - dependencies: - doctrine "^0.7.2" - tslib "^1.0.0" - tsutils "^1.4.0" - -tslint-loader@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/tslint-loader/-/tslint-loader-3.6.0.tgz#12ed4d5ef57d68be25cd12692fb2108b66469d76" - dependencies: - loader-utils "^1.0.2" - mkdirp "^0.5.1" - object-assign "^4.1.1" - rimraf "^2.4.4" - semver "^5.3.0" - -tslint@^5.9.1: - version "5.9.1" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.9.1.tgz#1255f87a3ff57eb0b0e1f0e610a8b4748046c9ae" - dependencies: - babel-code-frame "^6.22.0" - builtin-modules "^1.1.1" - chalk "^2.3.0" - commander "^2.12.1" - diff "^3.2.0" - glob "^7.1.1" - js-yaml "^3.7.0" - minimatch "^3.0.4" - resolve "^1.3.2" - semver "^5.3.0" - tslib "^1.8.0" - tsutils "^2.12.1" - -tsutils@^1.4.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-1.9.1.tgz#b9f9ab44e55af9681831d5f28d0aeeaf5c750cb0" - -tsutils@^2.12.1: - version "2.12.1" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.12.1.tgz#f4d95ce3391c8971e46e54c4cf0edb0a21dd5b24" - dependencies: - tslib "^1.7.1" - [email protected]: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" @@ -7777,13 +7706,20 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" +typescript-eslint-parser@^15.0.0: + version "15.0.0" + resolved "https://registry.yarnpkg.com/typescript-eslint-parser/-/typescript-eslint-parser-15.0.0.tgz#882fd3d7aabffbab0a7f98d2a59fb9a989c2b37f" + dependencies: + lodash.unescape "4.0.1" + semver "5.5.0" + [email protected]: version "2.5.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.5.3.tgz#df3dcdc38f3beb800d4bc322646b04a3f6ca7f0d" -typescript@^2.8.1: - version "2.8.1" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.1.tgz#6160e4f8f195d5ba81d4876f9c0cc1fbc0820624" +typescript@^2.8.3: + version "2.8.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.3.tgz#5d817f9b6f31bb871835f4edf0089f21abe6c170" uglify-es@^3.3.4: version "3.3.7"
6e04ff1a61ccbf02116274416c2f6e3ff6f344b4
2017-10-30 09:57:04
jacekkarczmarczyk
feat: allow overriding color for contextual alert
false
allow overriding color for contextual alert
feat
diff --git a/src/components/VAlert/VAlert.js b/src/components/VAlert/VAlert.js index d2ac9aec817..d1d0ed95792 100644 --- a/src/components/VAlert/VAlert.js +++ b/src/components/VAlert/VAlert.js @@ -37,11 +37,11 @@ export default { computed: { classes () { - const type = this.type ? 'type' : 'computedColor' + const colorProp = (this.type && !this.color) ? 'type' : 'computedColor' return this.addBackgroundColorClassChecks({ 'alert--dismissible': this.dismissible - }, type) + }, colorProp) }, computedIcon () { if (this.icon || !this.type) return this.icon diff --git a/src/components/VAlert/VAlert.spec.js b/src/components/VAlert/VAlert.spec.js index ad9c623c1c5..ed9c23f9d06 100644 --- a/src/components/VAlert/VAlert.spec.js +++ b/src/components/VAlert/VAlert.spec.js @@ -63,17 +63,41 @@ test('VAlert.vue', ({ mount }) => { }) expect(wrapper.vm.classes.error).toBe(true) + wrapper.setProps({ 'type': 'success' }) await wrapper.vm.$nextTick() - expect(wrapper.vm.classes.success).toBe(true) + wrapper.setProps({ 'type': 'warning' }) await wrapper.vm.$nextTick() - expect(wrapper.vm.classes.warning).toBe(true) + wrapper.setProps({ 'type': 'info' }) await wrapper.vm.$nextTick() - expect(wrapper.vm.classes.info).toBe(true) }) + + it('should allow overriding color for contextual alert', async () => { + const wrapper = mount(VAlert, { + propsData: { + type: 'error', + color: 'primary' + } + }) + + expect(wrapper.vm.classes.primary).toBe(true) + }) + + it('should allow overriding icon for contextual alert', async () => { + const wrapper = mount(VAlert, { + propsData: { + type: 'error', + icon: 'block' + } + }) + + const icon = wrapper.find('.alert__icon')[0] + + expect(icon.text()).toBe('block') + }) })
d0f25fc59b29c385a6910dc48a111df811da3bdf
2020-12-23 21:03:48
Kael
fix(grid): collapse vertical gutters
false
collapse vertical gutters
fix
diff --git a/packages/vuetify/src/components/VGrid/VGrid.sass b/packages/vuetify/src/components/VGrid/VGrid.sass index 2290e1bbfcc..a7449e1eacc 100644 --- a/packages/vuetify/src/components/VGrid/VGrid.sass +++ b/packages/vuetify/src/components/VGrid/VGrid.sass @@ -15,8 +15,7 @@ +make-row &--dense - margin-right: -$form-grid-gutter / 2 - margin-left: -$form-grid-gutter / 2 + margin: -$form-grid-gutter / 2 > .col, > [class*="col-"] @@ -25,8 +24,7 @@ // Remove the negative margin from default .row, then the horizontal padding // from all immediate children columns (to prevent runaway style inheritance). .no-gutters - margin-right: 0 - margin-left: 0 + margin: 0 > .col, > [class*="col-"] padding: 0 diff --git a/packages/vuetify/src/components/VGrid/_mixins.sass b/packages/vuetify/src/components/VGrid/_mixins.sass index cac24d66bfb..00a84e3086a 100644 --- a/packages/vuetify/src/components/VGrid/_mixins.sass +++ b/packages/vuetify/src/components/VGrid/_mixins.sass @@ -14,8 +14,7 @@ display: flex flex-wrap: wrap flex: 1 1 auto - margin-right: -$gutter / 2 - margin-left: -$gutter / 2 + margin: -$gutter / 2 =make-col-ready($gutter: $grid-gutter) // Prevent columns from becoming too narrow when at smaller grid tiers by
a27026fa1f89aeef97a552a3c0a0b1c432b3a8c0
2024-02-08 01:30:48
John Leider
fix(VOverlay): add missing opacity property
false
add missing opacity property
fix
diff --git a/packages/vuetify/src/components/VOverlay/VOverlay.tsx b/packages/vuetify/src/components/VOverlay/VOverlay.tsx index 4085114e926..5acfa5dbf9f 100644 --- a/packages/vuetify/src/components/VOverlay/VOverlay.tsx +++ b/packages/vuetify/src/components/VOverlay/VOverlay.tsx @@ -88,6 +88,7 @@ export const makeVOverlayProps = propsFactory({ contentClass: null, contentProps: null, disabled: Boolean, + opacity: [Number, String], noClickAnimation: Boolean, modelValue: Boolean, persistent: Boolean, @@ -283,7 +284,10 @@ export const VOverlay = genericComponent<OverlaySlots>()({ ]} style={[ stackStyles.value, - { top: convertToUnit(top.value) }, + { + '--v-overlay-opacity': props.opacity, + top: convertToUnit(top.value), + }, props.style, ]} ref={ root } diff --git a/packages/vuetify/src/components/VOverlay/_variables.scss b/packages/vuetify/src/components/VOverlay/_variables.scss index 1c1c4d929ab..d7be3b6dde7 100644 --- a/packages/vuetify/src/components/VOverlay/_variables.scss +++ b/packages/vuetify/src/components/VOverlay/_variables.scss @@ -1,3 +1,3 @@ // Defaults -$overlay-opacity: 0.32 !default; +$overlay-opacity: var(--v-overlay-opacity, 0.32) !default; $overlay-scrim-background: rgb(var(--v-theme-on-surface)) !default;
a5a11023019a13e5ccb8519b5c6a3a913ec33412
2019-05-07 21:18:21
Dmitry Sharshakov
feat(VColorPicker): add a new component (#6988)
false
add a new component (#6988)
feat
diff --git a/packages/api-generator/src/maps/v-color-picker.js b/packages/api-generator/src/maps/v-color-picker.js new file mode 100644 index 00000000000..c47754d27cc --- /dev/null +++ b/packages/api-generator/src/maps/v-color-picker.js @@ -0,0 +1,43 @@ +const VColorPickerColor = { + alpha: 'number', + hex: 'string', + hexa: 'string', + hsla: { + h: 'number', + s: 'number', + l: 'number', + a: 'number' + }, + hsva: { + h: 'number', + s: 'number', + v: 'number', + a: 'number' + }, + hue: 'number', + rgba: { + r: 'number', + g: 'number', + b: 'number', + a: 'number' + } +} + +module.exports = { + 'v-color-picker': { + events: [ + { + name: 'input', + value: 'string | object' + }, + { + name: 'update:color', + value: VColorPickerColor + }, + { + name: 'update:mode', + value: 'string' + } + ] + } +} diff --git a/packages/docs/src/data/drawerItems.json b/packages/docs/src/data/drawerItems.json index 35eab4ecae2..044a4b5ad16 100644 --- a/packages/docs/src/data/drawerItems.json +++ b/packages/docs/src/data/drawerItems.json @@ -98,6 +98,7 @@ { "text": "cards", "to": "cards" }, { "text": "carousels", "to": "carousels" }, { "text": "chips", "to": "chips" }, + { "text": "colorPickers", "to": "color-pickers", "new": true }, { "text": "dialogs", "to": "dialogs" }, { "text": "dividers", "to": "dividers" }, { "text": "expansionPanels", "to": "expansion-panels" }, diff --git a/packages/docs/src/data/pages/components/ColorPickers.json b/packages/docs/src/data/pages/components/ColorPickers.json new file mode 100644 index 00000000000..e403f1e46b0 --- /dev/null +++ b/packages/docs/src/data/pages/components/ColorPickers.json @@ -0,0 +1,61 @@ +{ + "title": "header", + "titleText": "headerText", + "file": "components/VColorPicker", + "children": [ + { + "type": "section", + "children": [ + { + "type": "usage", + "value": "usage" + } + ] + }, + { + "type": "section", + "children": [ + { + "type": "api", + "value": [ "v-color-picker" ] + } + ] + }, + { + "type": "section", + "children": [ + { + "type": "playground", + "value": "playground" + } + ] + }, + { + "type": "section", + "children": [ + { + "type": "examples", + "value": [ + "simple/model", + "intermediate/swatches", + "intermediate/inputs", + "intermediate/canvas" + ] + } + ] + }, + { + "type": "section", + "children": [ + { + "type": "up-next", + "value": [ + "components/autocompletes", + "components/forms", + "components/selects" + ] + } + ] + } + ] +} diff --git a/packages/docs/src/examples/color-pickers/intermediate/canvas.vue b/packages/docs/src/examples/color-pickers/intermediate/canvas.vue new file mode 100644 index 00000000000..e4f663dc982 --- /dev/null +++ b/packages/docs/src/examples/color-pickers/intermediate/canvas.vue @@ -0,0 +1,7 @@ +<template> + <div class="d-flex justify-space-around"> + <v-color-picker hide-canvas></v-color-picker> + <v-color-picker canvas-height="300"></v-color-picker> + <v-color-picker dot-size="30"></v-color-picker> + </div> +</template> diff --git a/packages/docs/src/examples/color-pickers/intermediate/inputs.vue b/packages/docs/src/examples/color-pickers/intermediate/inputs.vue new file mode 100644 index 00000000000..36bb9f4311e --- /dev/null +++ b/packages/docs/src/examples/color-pickers/intermediate/inputs.vue @@ -0,0 +1,19 @@ +<template> + <v-layout row justify-space-around> + <v-color-picker hide-inputs></v-color-picker> + <v-color-picker hide-mode-switch></v-color-picker> + <v-layout column style="flex: 0 0 auto"> + <v-color-picker :mode.sync="mode"></v-color-picker> + <v-select v-model="mode" :items="modes" style="max-width: 300px"></v-select> + </v-layout> + </v-layout> +</template> + +<script> + export default { + data: () => ({ + mode: 'hsla', + modes: ['hsla', 'rgba', 'hexa'] + }) + } +</script> diff --git a/packages/docs/src/examples/color-pickers/intermediate/swatches.vue b/packages/docs/src/examples/color-pickers/intermediate/swatches.vue new file mode 100644 index 00000000000..e6913a997a0 --- /dev/null +++ b/packages/docs/src/examples/color-pickers/intermediate/swatches.vue @@ -0,0 +1,21 @@ +<template> + <div class="d-flex justify-space-around"> + <v-color-picker show-swatches></v-color-picker> + <v-color-picker :swatches="swatches" show-swatches></v-color-picker> + <v-color-picker show-swatches swatches-max-height="300px"></v-color-picker> + </div> +</template> + +<script> + export default { + data: () => ({ + swatches: [ + ['#FF0000', '#AA0000', '#550000'], + ['#FFFF00', '#AAAA00', '#555500'], + ['#00FF00', '#00AA00', '#005500'], + ['#00FFFF', '#00AAAA', '#005555'], + ['#0000FF', '#0000AA', '#000055'] + ] + }) + } +</script> diff --git a/packages/docs/src/examples/color-pickers/playground.vue b/packages/docs/src/examples/color-pickers/playground.vue new file mode 100644 index 00000000000..f6613a57860 --- /dev/null +++ b/packages/docs/src/examples/color-pickers/playground.vue @@ -0,0 +1,63 @@ +<template> + <div> + <v-container> + <v-layout + justify-center + wrap + > + <v-flex xs3> + <v-switch + v-model="showSwatches" + label="Show Swatches" + ></v-switch> + <v-switch + v-model="hideInputs" + label="Hide Inputs" + ></v-switch> + <v-switch + v-model="hideCanvas" + label="Hide Canvas" + ></v-switch> + <v-switch + v-model="hideModeSwitch" + label="Hide Mode Switch" + ></v-switch> + </v-flex> + + <v-flex xs3> + <v-select + v-model="mode" + :items="modes" + label="Mode" + ></v-select> + </v-flex> + </v-layout> + </v-container> + + <div class="my-4"></div> + + <v-color-picker + v-model="color" + :hide-canvas="hideCanvas" + :hide-inputs="hideInputs" + :hide-mode-switch="hideModeSwitch" + :mode.sync="mode" + :show-swatches="showSwatches" + class="mx-auto" + ></v-color-picker> + </div> +</template> + +<script> + export default { + data: () => ({ + color: '#8E00FF', + hideCanvas: false, + hideInputs: false, + hideModeSwitch: false, + mode: 'rgba', + modes: ['rgba', 'hsla', 'hexa'], + showSwatches: false + }) + } +</script> diff --git a/packages/docs/src/examples/color-pickers/simple/model.vue b/packages/docs/src/examples/color-pickers/simple/model.vue new file mode 100644 index 00000000000..b2420732d20 --- /dev/null +++ b/packages/docs/src/examples/color-pickers/simple/model.vue @@ -0,0 +1,68 @@ +<template> + <v-container grid-list-xl> + <v-layout wrap> + <v-flex + xs12 + md4 + > + <v-btn + v-for="t in types" + :key="t" + class="my-3" + block + @click="type = t" + >{{ t }}</v-btn> + </v-flex> + <v-flex + d-flex + justify-center + > + <v-color-picker v-model="color"></v-color-picker> + </v-flex> + <v-flex + xs12 + md4 + > + <v-sheet + dark + class="pa-3" + > + <pre>{{ showColor }}</pre> + </v-sheet> + </v-flex> + </v-layout> + </v-container> +</template> + +<script> + export default { + data: () => ({ + types: ['hex', 'hexa', 'rgba', 'hsla', 'hsva'], + type: 'hex', + hex: '#FF00FF', + hexa: '#FF00FFFF', + rgba: { r: 255, g: 0, b: 255, a: 1 }, + hsla: { h: 300, s: 1, l: 0.5, a: 1 }, + hsva: { h: 300, s: 1, v: 1, a: 1 } + }), + + computed: { + color: { + get () { + return this[this.type] + }, + set (v) { + this[this.type] = v + } + }, + showColor () { + if (typeof this.color === 'string') return this.color + + return JSON.stringify(Object.keys(this.color).reduce((color, key) => { + color[key] = Number(this.color[key].toFixed(2)) + return color + }, {}), null, 2) + } + } + } +</script> diff --git a/packages/docs/src/examples/color-pickers/usage.vue b/packages/docs/src/examples/color-pickers/usage.vue new file mode 100644 index 00000000000..23ba91ea098 --- /dev/null +++ b/packages/docs/src/examples/color-pickers/usage.vue @@ -0,0 +1,5 @@ +<template> + <div class="d-flex justify-center"> + <v-color-picker></v-color-picker> + </div> +</template> diff --git a/packages/docs/src/lang/en/components/ColorPickers.json b/packages/docs/src/lang/en/components/ColorPickers.json new file mode 100644 index 00000000000..ce076e525cc --- /dev/null +++ b/packages/docs/src/lang/en/components/ColorPickers.json @@ -0,0 +1,49 @@ +{ + "header": "# Color pickers", + "headerText": "The `v-color-picker` allows you to select a color using a variety of input methods.", + "examples": { + "usage": { + "desc": "" + }, + "model": { + "header": "### Model", + "desc": "The `v-color-picker` uses the `v-model` prop to control the color displayed. It supports hex strings such as **#FF00FF** and **#FF00FF00**, and objects representing **RGBA**, **HSLA** and **HSVA** values." + }, + "swatches": { + "header": "### Swatches", + "desc": "Using the `show-swatches` prop you can display an array of color swatches that users can pick from. It is also possible to customize what colors are shown using the `swatches` prop. You can also set the max height of the swatches section with the `swatches-max-height` prop." + }, + "inputs": { + "header": "### Inputs", + "desc": "The number inputs can be hidden with the `hide-inputs` prop. You can also hide the mode switch icon with the `hide-mode-switch` prop. The mode can also be controlled externally through the `mode` prop." + }, + "canvas": { + "header": "### Canvas", + "desc": "The canvas can be hidden with the `hide-canvas` prop, and you can set its height with the prop `canvas-height`. The size of the selection dot can be controlled with the `dot-size` prop." + } + }, + "props": { + "v-color-picker": { + "canvasHeight": "Height of canvas", + "disabled": "Disables picker", + "dotSize": "Changes the size of the selection dot on the canvas", + "flat": "Removes elevation", + "hideCanvas": "Hides canvas", + "hideInputs": "Hides inputs", + "hideModeSwitch": "Hides mode switch", + "mode": "Sets mode of inputs. Available modes are 'rgba', 'hsla', and 'hexa'. Can be synced with the `.sync` modifier.", + "showSwatches": "Displays color swatches", + "swatches": "Sets the available color swatches to select from", + "swatchesMaxHeight": "Sets the maximum height of the swatches section", + "value": "Current color. This can be either a string representing a hex color, or an object representing a RGBA, HSLA, or HSVA value", + "width": "Sets the width of the color picker" + } + }, + "events": { + "v-color-picker": { + "input": "Selected color. Depending on what you passed to the `value` prop this is either a string or an object", + "update:color": "Selected color. This is the internal representation of the color, containing all values.", + "update:mode": "Selected mode" + } + } +} diff --git a/packages/docs/src/lang/en/generic/Pages.json b/packages/docs/src/lang/en/generic/Pages.json index a8003103aa3..99915063e72 100644 --- a/packages/docs/src/lang/en/generic/Pages.json +++ b/packages/docs/src/lang/en/generic/Pages.json @@ -10,7 +10,7 @@ "props": "Props", "showExample": "Show Example", "slots": "Slots", - "supplemental": "Supplemental", + "supplemental": "## Supplemental", "type": "Type", "introduction": "Introduction", "upNext": "## Up Next", diff --git a/packages/docs/src/lang/en/meta.json b/packages/docs/src/lang/en/meta.json index 57bd5137b85..4f405c286cb 100644 --- a/packages/docs/src/lang/en/meta.json +++ b/packages/docs/src/lang/en/meta.json @@ -274,6 +274,11 @@ "description": "Chip Group component for Vuetify Framework.", "keywords": "chip, chip-group, chip group, grouped chips" }, + "components/color-pickers": { + "title": "Color pickers", + "description": "The v-color-picker component allows users to select a color using a number of different inputs", + "keyword": "components, color picker, color" + }, "components/combobox": { "title": "Combobox Component", "description": "The v-combobox component provides type-ahead autocomplete functionality and allows user to provide a custom value.", diff --git a/packages/docs/src/lang/en/vuetify/AppDrawer.json b/packages/docs/src/lang/en/vuetify/AppDrawer.json index dae12da15d6..7939907f0a5 100644 --- a/packages/docs/src/lang/en/vuetify/AppDrawer.json +++ b/packages/docs/src/lang/en/vuetify/AppDrawer.json @@ -24,6 +24,7 @@ "carousels": "Carousels", "chips": "Chips", "chipGroups": "Chip groups", + "colorPickers": "Color pickers", "colors": "Colors", "combobox": "Combobox", "components": "UI Components", diff --git a/packages/docs/src/snippets/ts/color_picker_model.txt b/packages/docs/src/snippets/ts/color_picker_model.txt new file mode 100644 index 00000000000..fb20c8df32a --- /dev/null +++ b/packages/docs/src/snippets/ts/color_picker_model.txt @@ -0,0 +1,25 @@ +// Colorpicker value structure +{ + alpha: number, + hex: string, + hexa: string, + hsla: { + h: number, + s: number, + l: number, + a: number + }, + hsva: { + h: number, + s: number, + v: number, + a: number + }, + hue: number, + rgba: { + r: number, + g: number, + b: number, + a: number + } +} diff --git a/packages/vuetify/jest.config.js b/packages/vuetify/jest.config.js index c32f4ae7137..920c731c3a1 100644 --- a/packages/vuetify/jest.config.js +++ b/packages/vuetify/jest.config.js @@ -3,5 +3,8 @@ const base = require('../../jest.config') module.exports = { ...base, name: 'Vuetify', - displayName: 'Vuetify' + displayName: 'Vuetify', + setupFiles: [ + 'jest-canvas-mock' + ] } diff --git a/packages/vuetify/package.json b/packages/vuetify/package.json index e3abea8318b..312d0525555 100644 --- a/packages/vuetify/package.json +++ b/packages/vuetify/package.json @@ -63,6 +63,7 @@ "friendly-errors-webpack-plugin": "^1.7.0", "happypack": "^5.0.1", "identity-obj-proxy": "^3.0.0", + "jest-canvas-mock": "^2.0.0", "mini-css-extract-plugin": "^0.5.0", "optimize-css-assets-webpack-plugin": "^5.0.1", "postcss-loader": "^3.0.0", diff --git a/packages/vuetify/src/components/VColorPicker/VColorPicker.sass b/packages/vuetify/src/components/VColorPicker/VColorPicker.sass new file mode 100644 index 00000000000..eff7cc2a1e8 --- /dev/null +++ b/packages/vuetify/src/components/VColorPicker/VColorPicker.sass @@ -0,0 +1,29 @@ +@import '../../styles/styles.sass' + ++theme(v-color-picker) using ($material) + .v-color-picker__input input + border: thin solid map-get($material, 'dividers') + + span + color: map-deep-get($material, 'text', 'secondary') + + .v-color-picker__dot, .v-color-picker__color + background-color: map-deep-get($material, 'color-picker', 'checkerboard') + +// Block +.v-color-picker + align-self: flex-start + +elevation(2) + +// Element +.v-color-picker__controls + display: flex + flex-direction: column + padding: 16px + +// Modifier +.v-color-picker--flat + +elevation(0) + + .v-color-picker__track:not(.v-input--is-disabled) .v-slider__thumb // High specifity + +elevation(0) diff --git a/packages/vuetify/src/components/VColorPicker/VColorPicker.ts b/packages/vuetify/src/components/VColorPicker/VColorPicker.ts new file mode 100644 index 00000000000..6d3441c052c --- /dev/null +++ b/packages/vuetify/src/components/VColorPicker/VColorPicker.ts @@ -0,0 +1,159 @@ +// Styles +import './VColorPicker.sass' + +// Components +import VSheet from '../VSheet/VSheet' +import VColorPickerPreview from './VColorPickerPreview' +import VColorPickerCanvas from './VColorPickerCanvas' +import VColorPickerEdit, { Mode, modes } from './VColorPickerEdit' +import VColorPickerSwatches from './VColorPickerSwatches' + +// Helpers +import { VColorPickerColor, parseColor, fromRGBA, extractColor } from './util' +import mixins from '../../util/mixins' +import Themeable from '../../mixins/themeable' + +// Types +import { VNode } from 'vue' +import { PropValidator } from 'vue/types/options' + +export default mixins(Themeable).extend({ + name: 'v-color-picker', + + props: { + canvasHeight: { + type: [String, Number], + default: 150 + }, + disabled: Boolean, + dotSize: { + type: [Number, String], + default: 10 + }, + flat: Boolean, + hideCanvas: Boolean, + hideInputs: Boolean, + hideModeSwitch: Boolean, + mode: { + type: String, + default: 'rgba', + validator: (v: string) => Object.keys(modes).includes(v) + }, + showSwatches: Boolean, + swatches: Array as PropValidator<string[][]>, + swatchesMaxHeight: { + type: [Number, String], + default: 150 + }, + value: { + type: [Object, String] + }, + width: { + type: [Number, String], + default: 300 + } + }, + + data: () => ({ + internalValue: fromRGBA({ r: 255, g: 0, b: 0, a: 1 }) + }), + + watch: { + value: { + handler (color: any) { + this.updateColor(parseColor(color, this.internalValue)) + }, + immediate: true + } + }, + + methods: { + updateColor (color: VColorPickerColor) { + this.internalValue = color + const value = extractColor(this.internalValue, this.value) + + if (value !== this.value) { + this.$emit('input', value) + this.$emit('update:color', this.internalValue) + } + }, + genCanvas (): VNode { + return this.$createElement(VColorPickerCanvas, { + props: { + color: this.internalValue, + disabled: this.disabled, + dotSize: this.dotSize, + width: this.width, + height: this.canvasHeight + }, + on: { + 'update:color': this.updateColor + } + }) + }, + genControls (): VNode { + return this.$createElement('div', { + staticClass: 'v-color-picker__controls' + }, [ + this.genPreview(), + !this.hideInputs && this.genEdit() + ]) + }, + genEdit (): VNode { + return this.$createElement(VColorPickerEdit, { + props: { + color: this.internalValue, + disabled: this.disabled, + hideModeSwitch: this.hideModeSwitch, + mode: this.mode + }, + on: { + 'update:color': this.updateColor, + 'update:mode': (v: Mode) => this.$emit('update:mode', v) + } + }) + }, + genPreview (): VNode { + return this.$createElement(VColorPickerPreview, { + props: { + color: this.internalValue, + disabled: this.disabled + }, + on: { + 'update:color': this.updateColor + } + }) + }, + genSwatches (): VNode { + return this.$createElement(VColorPickerSwatches, { + props: { + dark: this.dark, + light: this.light, + swatches: this.swatches, + color: this.internalValue, + maxHeight: this.swatchesMaxHeight + }, + on: { + 'update:color': this.updateColor + } + }) + } + }, + + render (h): VNode { + return h(VSheet, { + staticClass: 'v-color-picker', + class: { + 'v-color-picker--flat': this.flat, + ...this.themeClasses + }, + props: { + maxWidth: this.width + } + }, [ + !this.hideCanvas && this.genCanvas(), + this.genControls(), + this.showSwatches && this.genSwatches() + ]) + } +}) diff --git a/packages/vuetify/src/components/VColorPicker/VColorPickerCanvas.sass b/packages/vuetify/src/components/VColorPicker/VColorPickerCanvas.sass new file mode 100644 index 00000000000..c8584936ec1 --- /dev/null +++ b/packages/vuetify/src/components/VColorPicker/VColorPickerCanvas.sass @@ -0,0 +1,16 @@ +@import '../../styles/styles.sass' + +.v-color-picker__canvas + position: relative + overflow: hidden + +.v-color-picker__canvas-dot + position: absolute + width: 15px + height: 15px + background: transparent + border-radius: 50% + box-shadow: 0px 0px 0px 1.5px rgba(255,255,255,1), inset 0px 0px 1px 1.5px rgba(0,0,0,0.3) + + &--disabled + box-shadow: 0px 0px 0px 1.5px rgba(255,255,255,0.7), inset 0px 0px 1px 1.5px rgba(0,0,0,0.3) diff --git a/packages/vuetify/src/components/VColorPicker/VColorPickerCanvas.ts b/packages/vuetify/src/components/VColorPicker/VColorPickerCanvas.ts new file mode 100644 index 00000000000..f42c418ee84 --- /dev/null +++ b/packages/vuetify/src/components/VColorPicker/VColorPickerCanvas.ts @@ -0,0 +1,168 @@ +// Styles +import './VColorPickerCanvas.sass' + +// Helpers +import { clamp, convertToUnit, throttle } from '../../util/helpers' +import { fromHSVA, VColorPickerColor, fromRGBA } from './util' + +// Types +import Vue, { VNode } from 'vue' +import { PropValidator } from 'vue/types/options' + +export default Vue.extend({ + name: 'v-color-picker-canvas', + + props: { + color: { + type: Object, + default: () => fromRGBA({ r: 255, g: 0, b: 0, a: 1 }) + } as PropValidator<VColorPickerColor>, + disabled: Boolean, + dotSize: { + type: [Number, String], + default: 10 + }, + height: { + type: [Number, String], + default: 150 + }, + width: { + type: [Number, String], + default: 300 + } + }, + + data () { + return { + boundingRect: { + width: 0, + height: 0, + left: 0, + top: 0 + } as ClientRect + } + }, + + computed: { + dot (): { x: number, y: number} { + if (!this.color) return { x: 0, y: 0 } + + return { + x: this.color.hsva.s * parseInt(this.width, 10), + y: (1 - this.color.hsva.v) * parseInt(this.height, 10) + } + } + }, + + watch: { + color (v: VColorPickerColor) { + this.updateCanvas() + } + }, + + mounted () { + this.updateCanvas() + }, + + methods: { + emitColor (x: number, y: number) { + const { left, top, width, height } = this.boundingRect + + this.$emit('update:color', fromHSVA({ + h: this.color.hue, + s: clamp(x - left, 0, width) / width, + v: 1 - clamp(y - top, 0, height) / height, + a: this.color.alpha + })) + }, + updateCanvas () { + if (!this.color) return + + const canvas = this.$refs.canvas as HTMLCanvasElement + const ctx = canvas.getContext('2d') + + if (!ctx) return + + const saturationGradient = ctx.createLinearGradient(0, 0, canvas.width, 0) + saturationGradient.addColorStop(0, 'hsla(0, 0%, 100%, 1)') // white + saturationGradient.addColorStop(1, `hsla(${this.color.hue}, 100%, 50%, 1)`) + ctx.fillStyle = saturationGradient + ctx.fillRect(0, 0, canvas.width, canvas.height) + + const valueGradient = ctx.createLinearGradient(0, 0, 0, canvas.height) + valueGradient.addColorStop(0, 'hsla(0, 0%, 100%, 0)') // transparent + valueGradient.addColorStop(1, 'hsla(0, 0%, 0%, 1)') // black + ctx.fillStyle = valueGradient + ctx.fillRect(0, 0, canvas.width, canvas.height) + }, + handleClick (e: MouseEvent) { + if (this.disabled) return + + this.boundingRect = this.$el.getBoundingClientRect() + this.emitColor(e.clientX, e.clientY) + }, + handleMouseDown (e: MouseEvent) { + // To prevent selection while moving cursor + e.preventDefault() + + if (this.disabled) return + + this.boundingRect = this.$el.getBoundingClientRect() + + window.addEventListener('mousemove', this.handleMouseMove) + window.addEventListener('mouseup', this.handleMouseUp) + }, + handleMouseMove: throttle(function (e: MouseEvent) { + // TODO: I could not find a way to type this + // @ts-ignore + if (this.disabled) return + + // @ts-ignore + this.emitColor(e.clientX, e.clientY) + }, 40), + handleMouseUp () { + window.removeEventListener('mousemove', this.handleMouseMove) + window.removeEventListener('mouseup', this.handleMouseUp) + }, + genCanvas (): VNode { + return this.$createElement('canvas', { + ref: 'canvas', + attrs: { + width: this.width, + height: this.height + } + }) + }, + genDot (): VNode { + return this.$createElement('div', { + staticClass: 'v-color-picker__canvas-dot', + class: { + 'v-color-picker__canvas-dot--disabled': this.disabled + }, + style: { + width: convertToUnit(this.dotSize), + height: convertToUnit(this.dotSize), + left: convertToUnit(this.dot.x - (parseInt(this.dotSize, 10) / 2)), + top: convertToUnit(this.dot.y - (parseInt(this.dotSize, 10) / 2)) + } + }) + } + }, + + render (h): VNode { + return h('div', { + staticClass: 'v-color-picker__canvas', + style: { + width: convertToUnit(this.width), + height: convertToUnit(this.height) + }, + on: { + click: this.handleClick, + mousedown: this.handleMouseDown + } + }, [ + this.genCanvas(), + this.genDot() + ]) + } +}) diff --git a/packages/vuetify/src/components/VColorPicker/VColorPickerEdit.sass b/packages/vuetify/src/components/VColorPicker/VColorPickerEdit.sass new file mode 100644 index 00000000000..d9cfcb66b04 --- /dev/null +++ b/packages/vuetify/src/components/VColorPicker/VColorPickerEdit.sass @@ -0,0 +1,27 @@ +@import '../../styles/styles.sass' + +.v-color-picker__edit + margin-top: 24px + display: flex + +.v-color-picker__input + width: 100% + display: flex + flex-wrap: wrap + justify-content: center + text-align: center + + &:not(:last-child) + margin-right: 8px + + input + border-radius: 4px + margin-bottom: 8px + min-width: 0 + outline: none + text-align: center + width: 100% + height: 28px + + span + font-size: 0.75rem diff --git a/packages/vuetify/src/components/VColorPicker/VColorPickerEdit.ts b/packages/vuetify/src/components/VColorPicker/VColorPickerEdit.ts new file mode 100644 index 00000000000..0c5b52b1ec7 --- /dev/null +++ b/packages/vuetify/src/components/VColorPicker/VColorPickerEdit.ts @@ -0,0 +1,190 @@ +// Styles +import './VColorPickerEdit.sass' + +// Components +import VBtn from '../VBtn' +import VIcon from '../VIcon' + +// Helpers +import { parseHex } from '../../util/colorUtils' + +// Types +import Vue, { VNode } from 'vue' +import { PropValidator } from 'vue/types/options' +import { VColorPickerColor, fromRGBA, fromHexa, fromHSLA } from './util' + +type Input = [string, number, string] + +export type Mode = { + inputs?: Input[] + from: Function +} + +export const modes = { + rgba: { + inputs: [ + ['r', 255, 'int'], + ['g', 255, 'int'], + ['b', 255, 'int'], + ['a', 1, 'float'] + ], + from: fromRGBA + }, + hsla: { + inputs: [ + ['h', 360, 'int'], + ['s', 1, 'float'], + ['l', 1, 'float'], + ['a', 1, 'float'] + ], + from: fromHSLA + }, + hexa: { + from: fromHexa + } +} as { [key: string]: Mode } + +export default Vue.extend({ + name: 'v-color-picker-edit', + + props: { + color: Object as PropValidator<VColorPickerColor>, + disabled: Boolean, + hideModeSwitch: Boolean, + mode: { + type: String, + default: 'rgba', + validator: (v: string) => Object.keys(modes).includes(v) + } + }, + + data () { + return { + modes, + internalMode: this.mode + } + }, + + computed: { + currentMode (): Mode { + return this.modes[this.internalMode] + } + }, + + watch: { + mode (mode) { + this.internalMode = mode + } + }, + + created () { + this.internalMode = this.mode + }, + + methods: { + getValue (v: any, type: string) { + if (type === 'float') return Math.round(v * 100) / 100 + else if (type === 'int') return Math.round(v) + else return 0 + }, + parseValue (v: string, type: string) { + if (type === 'float') return parseFloat(v) + else if (type === 'int') return parseInt(v, 10) || 0 + else return 0 + }, + changeMode () { + const modes = Object.keys(this.modes) + const index = modes.indexOf(this.internalMode) + const newMode = modes[(index + 1) % modes.length] + this.internalMode = newMode + this.$emit('update:mode', newMode) + }, + genInput (target: string, attrs: any, value: any, on: any): VNode { + return this.$createElement('div', { + staticClass: 'v-color-picker__input' + }, [ + this.$createElement('input', { + key: target, + attrs, + domProps: { + value + }, + on + }), + this.$createElement('span', target.toUpperCase()) + ]) + }, + genInputs (): VNode[] | VNode { + switch (this.internalMode) { + case 'hexa': { + const hex = this.color.hexa + const value = hex.endsWith('FF') ? hex.substr(0, 7) : hex + return this.genInput( + 'hex', + { + maxlength: 9, + disabled: this.disabled + }, + value, + { + change: (e: Event) => { + const el = e.target as HTMLInputElement + this.$emit('update:color', this.currentMode.from(parseHex(el.value))) + } + } + ) + } + default: { + return this.currentMode.inputs!.map(([target, max, type]) => { + const value = this.color[this.internalMode as keyof VColorPickerColor] as any + return this.genInput( + target, + { + type: 'number', + min: 0, + max, + step: type === 'float' ? '0.01' : type === 'int' ? '1' : undefined, + disabled: this.disabled + }, + this.getValue(value[target], type), + { + input: (e: Event) => { + const el = e.target as HTMLInputElement + const newVal = this.parseValue(el.value || '0', type) + + this.$emit('update:color', this.currentMode.from( + Object.assign({}, value, { [target]: newVal }), + this.color.alpha + )) + } + } + ) + }) + } + } + }, + genSwitch (): VNode { + return this.$createElement(VBtn, { + props: { + small: true, + icon: true, + disabled: this.disabled + }, + on: { + click: this.changeMode + } + }, [ + this.$createElement(VIcon, '$vuetify.icons.unfold') + ]) + } + }, + + render (h): VNode { + return h('div', { + staticClass: 'v-color-picker__edit' + }, [ + this.genInputs(), + !this.hideModeSwitch && this.genSwitch() + ]) + } +}) diff --git a/packages/vuetify/src/components/VColorPicker/VColorPickerPreview.sass b/packages/vuetify/src/components/VColorPicker/VColorPickerPreview.sass new file mode 100644 index 00000000000..aa035049c99 --- /dev/null +++ b/packages/vuetify/src/components/VColorPicker/VColorPickerPreview.sass @@ -0,0 +1,56 @@ +@import '../../styles/styles.sass' +@import './_variables.scss' + +.v-color-picker + .v-input__slider + border-radius: 5px + + .v-slider + margin: 0 + +.v-color-picker__alpha:not(.v-input--is-disabled) + .v-slider + border-radius: 5px + background: $color-picker-checkerboard + +.v-color-picker__sliders + display: flex + flex: 1 0 auto + flex-direction: column + +.v-color-picker__dot + position: relative + height: 30px + margin-right: 24px + width: 30px + background: $color-picker-checkerboard + border-radius: 50% + overflow: hidden + + > div + width: 100% + height: 100% + +.v-color-picker__hue + margin-bottom: 24px + + &:not(.v-input--is-disabled) + background: linear-gradient(to right, #F00 0%, #FF0 16.66%, #0F0 33.33%, #0FF 50%, #00F 66.66%, #F0F 83.33%, #F00 100%) + +.v-color-picker__track + position: relative + width: 100% + +.v-color-picker__preview + align-items: center + display: flex + + .v-slider + min-height: 10px + + &:not(.v-slider--disabled) + .v-slider__thumb + +elevation(3) + + .v-slider__track-container + opacity: 0 diff --git a/packages/vuetify/src/components/VColorPicker/VColorPickerPreview.ts b/packages/vuetify/src/components/VColorPicker/VColorPickerPreview.ts new file mode 100644 index 00000000000..3995ea0793e --- /dev/null +++ b/packages/vuetify/src/components/VColorPicker/VColorPickerPreview.ts @@ -0,0 +1,100 @@ +// Styles +import './VColorPickerPreview.sass' + +// Components +import VSlider from '../VSlider/VSlider' + +// Utilities +import { RGBtoCSS, RGBAtoCSS } from '../../util/colorUtils' + +// Types +import Vue, { VNode, VNodeData } from 'vue' +import { PropValidator } from 'vue/types/options' +import { VColorPickerColor, fromHSVA } from './util' + +export default Vue.extend({ + name: 'v-color-picker-preview', + + props: { + color: Object as PropValidator<VColorPickerColor>, + disabled: Boolean + }, + + methods: { + genAlpha (): VNode { + return this.genTrack({ + staticClass: 'v-color-picker__alpha', + props: { + thumbColor: 'grey lighten-2', + hideDetails: true, + value: this.color.alpha, + step: 0, + min: 0, + max: 1 + }, + style: { + backgroundImage: !this.disabled + ? `linear-gradient(to right, transparent, ${RGBtoCSS(this.color.rgba)})` + : undefined + }, + on: { + input: (val: number) => this.color.alpha !== val && this.$emit('update:color', fromHSVA({ ...this.color.hsva, a: val })) + } + }) + }, + genSliders (): VNode { + return this.$createElement('div', { + staticClass: 'v-color-picker__sliders' + }, [ + this.genHue(), + this.genAlpha() + ]) + }, + genDot (): VNode { + return this.$createElement('div', { + staticClass: 'v-color-picker__dot' + }, [ + this.$createElement('div', { + style: { + background: RGBAtoCSS(this.color.rgba) + } + }) + ]) + }, + genHue (): VNode { + return this.genTrack({ + staticClass: 'v-color-picker__hue', + props: { + thumbColor: 'grey lighten-2', + hideDetails: true, + value: this.color.hue, + step: 0, + min: 0, + max: 360 + }, + on: { + input: (val: number) => this.color.hue !== val && this.$emit('update:color', fromHSVA({ ...this.color.hsva, h: val })) + } + }) + }, + genTrack (options: VNodeData): VNode { + return this.$createElement(VSlider, { + class: 'v-color-picker__track', + ...options, + props: { + disabled: this.disabled, + ...options.props + } + }) + } + }, + + render (h): VNode { + return h('div', { + staticClass: 'v-color-picker__preview' + }, [ + this.genDot(), + this.genSliders() + ]) + } +}) diff --git a/packages/vuetify/src/components/VColorPicker/VColorPickerSwatches.sass b/packages/vuetify/src/components/VColorPicker/VColorPickerSwatches.sass new file mode 100644 index 00000000000..d1787547598 --- /dev/null +++ b/packages/vuetify/src/components/VColorPicker/VColorPickerSwatches.sass @@ -0,0 +1,34 @@ +@import '../../styles/styles.sass' +@import './_variables.scss' + +.v-color-picker__swatches + overflow-y: auto + + > div + display: flex + flex-wrap: wrap + padding: 8px + +.v-color-picker__swatch + display: flex + flex-direction: column + margin-bottom: $color-picker-swatch-margin-bottom + +.v-color-picker__color + position: relative + height: $color-picker-swatch-color-height + max-height: $color-picker-swatch-color-height + width: $color-picker-swatch-color-width + margin: $color-picker-swatch-color-margin + border-radius: $color-picker-swatch-color-border-radius + user-select: none + overflow: hidden + background: $color-picker-checkerboard + cursor: pointer + + > div + display: flex + align-items: center + justify-content: center + width: 100% + height: 100% diff --git a/packages/vuetify/src/components/VColorPicker/VColorPickerSwatches.ts b/packages/vuetify/src/components/VColorPicker/VColorPickerSwatches.ts new file mode 100644 index 00000000000..9626d4fc7e1 --- /dev/null +++ b/packages/vuetify/src/components/VColorPicker/VColorPickerSwatches.ts @@ -0,0 +1,103 @@ +// Styles +import './VColorPickerSwatches.sass' + +// Components +import VIcon from '../VIcon' + +// Helpers +import colors from '../../util/colors' +import { VColorPickerColor, fromHex, parseColor } from './util' +import { convertToUnit, deepEqual } from '../../util/helpers' +import mixins from '../../util/mixins' +import Themeable from '../../mixins/themeable' + +// Types +import { VNode } from 'vue' +import { PropValidator } from 'vue/types/options' +import { contrastRatio } from '../../util/colorUtils' + +function parseDefaultColors (colors: Record<string, Record<string, string>>) { + return Object.keys(colors).map(key => { + const color = colors[key] + return color.base ? [ + color.base, + color.darken4, + color.darken3, + color.darken2, + color.darken1, + color.lighten1, + color.lighten2, + color.lighten3, + color.lighten4, + color.lighten5 + ] : [ + color.black, + color.white, + color.transparent + ] + }) +} + +const white = fromHex('#FFFFFF').rgba +const black = fromHex('#000000').rgba + +export default mixins(Themeable).extend({ + name: 'v-color-picker-swatches', + + props: { + swatches: { + type: Array, + default: () => parseDefaultColors(colors) + } as PropValidator<string[][]>, + color: Object as PropValidator<VColorPickerColor>, + maxWidth: [Number, String], + maxHeight: [Number, String] + }, + + methods: { + genColor (color: string) { + const content = this.$createElement('div', { + style: { + background: color + } + }, [ + deepEqual(this.color, parseColor(color, null)) && this.$createElement(VIcon, { + props: { + small: true, + dark: contrastRatio(this.color.rgba, white) > 2 && this.color.alpha > 0.5, + light: contrastRatio(this.color.rgba, black) > 2 && this.color.alpha > 0.5 + } + }, '$vuetify.icons.success') + ]) + + return this.$createElement('div', { + staticClass: 'v-color-picker__color', + on: { + // TODO: Less hacky way of catching transparent + click: () => this.$emit('update:color', fromHex(color === 'transparent' ? '#00000000' : color)) + } + }, [content]) + }, + genSwatches () { + return this.swatches.map(swatch => { + const colors = swatch.map(this.genColor) + + return this.$createElement('div', { + staticClass: 'v-color-picker__swatch' + }, colors) + }) + } + }, + + render (h): VNode { + return h('div', { + staticClass: 'v-color-picker__swatches', + style: { + maxWidth: convertToUnit(this.maxWidth), + maxHeight: convertToUnit(this.maxHeight) + } + }, [ + this.$createElement('div', this.genSwatches()) + ]) + } +}) diff --git a/packages/vuetify/src/components/VColorPicker/__tests__/VColorPicker.spec.ts b/packages/vuetify/src/components/VColorPicker/__tests__/VColorPicker.spec.ts new file mode 100644 index 00000000000..d53a47d320d --- /dev/null +++ b/packages/vuetify/src/components/VColorPicker/__tests__/VColorPicker.spec.ts @@ -0,0 +1,130 @@ +import VColorPicker from '../VColorPicker' +import { + mount, + MountOptions, + Wrapper +} from '@vue/test-utils' + +describe('VColorPicker.ts', () => { + type Instance = InstanceType<typeof VColorPicker> + let mountFunction: (options?: MountOptions<Instance>) => Wrapper<Instance> + let el + + beforeEach(() => { + el = document.createElement('div') + el.setAttribute('data-app', 'true') + document.body.appendChild(el) + + mountFunction = (options?: MountOptions<Instance>) => { + return mount(VColorPicker, { + ...options, + mocks: { + $vuetify: { + rtl: false + } + }, + sync: false + }) + } + }) + + afterEach(() => { + document.body.removeChild(el) + }) + + it('should render color picker', () => { + const wrapper = mountFunction() + + expect(wrapper.html()).toMatchSnapshot() + }) + + it('should change canvas height', () => { + const wrapper = mountFunction({ + propsData: { + canvasHeight: 200 + } + }) + + expect(wrapper.html()).toMatchSnapshot() + expect(wrapper.find('canvas').attributes().height).toBe('200') + }) + + it('should show swatches', () => { + const wrapper = mountFunction({ + propsData: { + showSwatches: true + } + }) + + expect(wrapper.html()).toMatchSnapshot() + expect(wrapper.find('.v-color-picker__swatches').exists()).toBe(true) + }) + + it('should hide canvas', () => { + const wrapper = mountFunction({ + propsData: { + hideCanvas: true + } + }) + + expect(wrapper.html()).toMatchSnapshot() + expect(wrapper.find('.v-color-picker__canvas').exists()).toBe(false) + }) + + it('should hide inputs', () => { + const wrapper = mountFunction({ + propsData: { + hideInputs: true + } + }) + + expect(wrapper.html()).toMatchSnapshot() + expect(wrapper.find('.v-color-picker__edit').exists()).toBe(false) + }) + + it('should return hex if given hex', async () => { + const fn = jest.fn() + const wrapper = mountFunction({ + propsData: { + value: '#00FF00' + }, + listeners: { + input: fn + } + }) + + // Get first input (red) + const input = wrapper.find('.v-color-picker__input input') + const el = input.element as HTMLInputElement + + el.value = '255' + input.trigger('input') + + await wrapper.vm.$nextTick() + + expect(fn).toHaveBeenLastCalledWith('#FFFF00') + }) + + it('should return rgb if given rgb', async () => { + const fn = jest.fn() + const wrapper = mountFunction({ + propsData: { + value: { r: 0, g: 0, b: 255 } + }, + listeners: { + input: fn + } + }) + + // Get first input (red) + const input = wrapper.find('.v-color-picker__input input') + const el = input.element as HTMLInputElement + + el.value = '255' + input.trigger('input') + + await wrapper.vm.$nextTick() + + expect(fn).toHaveBeenLastCalledWith({ r: 255, g: 0, b: 255, a: 1 }) + }) +}) diff --git a/packages/vuetify/src/components/VColorPicker/__tests__/VColorPickerEdit.spec.ts b/packages/vuetify/src/components/VColorPicker/__tests__/VColorPickerEdit.spec.ts new file mode 100644 index 00000000000..442146e9971 --- /dev/null +++ b/packages/vuetify/src/components/VColorPicker/__tests__/VColorPickerEdit.spec.ts @@ -0,0 +1,137 @@ +import VColorPickerEdit from '../VColorPickerEdit' +import { + mount, + MountOptions, + Wrapper +} from '@vue/test-utils' +import { fromRGBA } from '../util' + +describe('VColorPickerEdit.ts', () => { + type Instance = InstanceType<typeof VColorPickerEdit> + let mountFunction: (options?: MountOptions<Instance>) => Wrapper<Instance> + beforeEach(() => { + mountFunction = (options?: MountOptions<Instance>) => { + return mount(VColorPickerEdit, options) + } + }) + + it('should emit event when input changes', () => { + const update = jest.fn() + const wrapper = mountFunction({ + propsData: { + color: fromRGBA({ r: 0, g: 0, b: 0, a: 0 }), + mode: 'hexa' + }, + listeners: { + 'update:color': update + } + }) + + const input = wrapper.find('input') + const el = input.element as HTMLInputElement + el.value = '#12345678' + input.trigger('change') + + expect(update).toHaveBeenCalledTimes(1) + }) + + it('should work in RGBA mode', () => { + const update = jest.fn() + const wrapper = mountFunction({ + propsData: { + color: fromRGBA({ r: 0, g: 0, b: 0, a: 0 }), + mode: 'rgba' + }, + listeners: { + 'update:color': update + } + }) + + const inputs = wrapper.findAll('input').wrappers + + for (let i = 0; i < inputs.length; i++) { + const input = inputs[i] + const el = input.element as HTMLInputElement + + el.value = `${i}` + input.trigger('input') + } + + expect(update).toHaveBeenCalledTimes(4) + }) + + it('should work in HSLA mode', () => { + const update = jest.fn() + const wrapper = mountFunction({ + propsData: { + color: fromRGBA({ r: 0, g: 0, b: 0, a: 0 }), + mode: 'hsla' + }, + listeners: { + 'update:color': update + } + }) + + const inputs = wrapper.findAll('input').wrappers + + for (let i = 0; i < inputs.length; i++) { + const input = inputs[i] + const el = input.element as HTMLInputElement + + el.value = `${i}` + input.trigger('input') + } + + expect(update).toHaveBeenCalledTimes(4) + }) + + it('should render with disabled', () => { + const wrapper = mountFunction({ + propsData: { + color: fromRGBA({ r: 0, g: 0, b: 0, a: 0 }), + mode: 'rgba', + disabled: true + } + }) + + expect(wrapper.html()).toMatchSnapshot() + }) + + it('should change mode', () => { + const wrapper = mountFunction({ + propsData: { + color: fromRGBA({ r: 0, g: 0, b: 0, a: 0 }), + mode: 'hexa' + } + }) + + const changeMode = wrapper.find('.v-btn') + + changeMode.trigger('click') + expect(wrapper.html()).toMatchSnapshot() + + changeMode.trigger('click') + expect(wrapper.html()).toMatchSnapshot() + + changeMode.trigger('click') + expect(wrapper.html()).toMatchSnapshot() + + wrapper.setProps({ + mode: 'hsla' + }) + expect(wrapper.html()).toMatchSnapshot() + }) + + it('should hide mode switch button', () => { + const wrapper = mountFunction({ + propsData: { + color: fromRGBA({ r: 0, g: 0, b: 0, a: 0 }), + mode: 'rgba', + hideModeSwitch: true + } + }) + + expect(wrapper.html()).toMatchSnapshot() + expect(wrapper.find('.v-btn').exists()).toBe(false) + }) +}) diff --git a/packages/vuetify/src/components/VColorPicker/__tests__/__snapshots__/VColorPicker.spec.ts.snap b/packages/vuetify/src/components/VColorPicker/__tests__/__snapshots__/VColorPicker.spec.ts.snap new file mode 100644 index 00000000000..8e093f4fe2e --- /dev/null +++ b/packages/vuetify/src/components/VColorPicker/__tests__/__snapshots__/VColorPicker.spec.ts.snap @@ -0,0 +1,1524 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`VColorPicker.ts should change canvas height 1`] = ` + +<div class="v-color-picker v-sheet theme--light theme--light" + style="max-width: 300px;" +> + <div class="v-color-picker__canvas" + style="width: 300px; height: 200px;" + > + <canvas width="300" + height="200" + > + </canvas> + <div class="v-color-picker__canvas-dot" + style="width: 10px; height: 10px; left: 295px; top: -5px;" + > + </div> + </div> + <div class="v-color-picker__controls"> + <div class="v-color-picker__preview"> + <div class="v-color-picker__dot"> + <div style="background: rgb(255, 0, 0);"> + </div> + </div> + <div class="v-color-picker__sliders"> + <div class="v-input v-color-picker__hue v-input--hide-details theme--light v-input__slider v-color-picker__track"> + <div class="v-input__control"> + <div class="v-input__slot"> + <div class="v-slider v-slider--horizontal theme--light"> + <input value="0" + readonly="readonly" + tabindex="-1" + > + <div class="v-slider__track-container"> + <div class="v-slider__track-background primary lighten-3" + style="right: 0px;" + > + </div> + <div class="v-slider__track-fill primary" + style="left: 0px; width: 0%;" + > + </div> + </div> + <div role="slider" + tabindex="0" + aria-valuemin="0" + aria-valuemax="360" + aria-valuenow="0" + aria-readonly="false" + aria-orientation="horizontal" + class="v-slider__thumb-container grey--text text--lighten-2" + style="left: 0%;" + > + <div class="v-slider__thumb grey lighten-2"> + </div> + </div> + </div> + </div> + </div> + </div> + <div class="v-input v-color-picker__alpha v-input--hide-details v-input--is-label-active v-input--is-dirty theme--light v-input__slider v-color-picker__track"> + <div class="v-input__control"> + <div class="v-input__slot"> + <div class="v-slider v-slider--horizontal theme--light"> + <input value="1" + readonly="readonly" + tabindex="-1" + > + <div class="v-slider__track-container"> + <div class="v-slider__track-background primary lighten-3" + style="right: 0px;" + > + </div> + <div class="v-slider__track-fill primary" + style="left: 0px; width: 100%;" + > + </div> + </div> + <div role="slider" + tabindex="0" + aria-valuemin="0" + aria-valuemax="1" + aria-valuenow="1" + aria-readonly="false" + aria-orientation="horizontal" + class="v-slider__thumb-container grey--text text--lighten-2" + style="left: 100%;" + > + <div class="v-slider__thumb grey lighten-2"> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + <div class="v-color-picker__edit"> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + > + <span> + R + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + > + <span> + G + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + > + <span> + B + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="1" + step="0.01" + > + <span> + A + </span> + </div> + <button type="button" + class="v-btn v-btn--fab v-btn--flat v-btn--icon v-btn--round theme--light v-size--small" + > + <span class="v-btn__content"> + <i aria-hidden="true" + class="v-icon material-icons theme--light" + > + $vuetify.icons.unfold + </i> + </span> + </button> + </div> + </div> +</div> + +`; + +exports[`VColorPicker.ts should hide canvas 1`] = ` + +<div class="v-color-picker v-sheet theme--light theme--light" + style="max-width: 300px;" +> + <div class="v-color-picker__controls"> + <div class="v-color-picker__preview"> + <div class="v-color-picker__dot"> + <div style="background: rgb(255, 0, 0);"> + </div> + </div> + <div class="v-color-picker__sliders"> + <div class="v-input v-color-picker__hue v-input--hide-details theme--light v-input__slider v-color-picker__track"> + <div class="v-input__control"> + <div class="v-input__slot"> + <div class="v-slider v-slider--horizontal theme--light"> + <input value="0" + readonly="readonly" + tabindex="-1" + > + <div class="v-slider__track-container"> + <div class="v-slider__track-background primary lighten-3" + style="right: 0px;" + > + </div> + <div class="v-slider__track-fill primary" + style="left: 0px; width: 0%;" + > + </div> + </div> + <div role="slider" + tabindex="0" + aria-valuemin="0" + aria-valuemax="360" + aria-valuenow="0" + aria-readonly="false" + aria-orientation="horizontal" + class="v-slider__thumb-container grey--text text--lighten-2" + style="left: 0%;" + > + <div class="v-slider__thumb grey lighten-2"> + </div> + </div> + </div> + </div> + </div> + </div> + <div class="v-input v-color-picker__alpha v-input--hide-details v-input--is-label-active v-input--is-dirty theme--light v-input__slider v-color-picker__track"> + <div class="v-input__control"> + <div class="v-input__slot"> + <div class="v-slider v-slider--horizontal theme--light"> + <input value="1" + readonly="readonly" + tabindex="-1" + > + <div class="v-slider__track-container"> + <div class="v-slider__track-background primary lighten-3" + style="right: 0px;" + > + </div> + <div class="v-slider__track-fill primary" + style="left: 0px; width: 100%;" + > + </div> + </div> + <div role="slider" + tabindex="0" + aria-valuemin="0" + aria-valuemax="1" + aria-valuenow="1" + aria-readonly="false" + aria-orientation="horizontal" + class="v-slider__thumb-container grey--text text--lighten-2" + style="left: 100%;" + > + <div class="v-slider__thumb grey lighten-2"> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + <div class="v-color-picker__edit"> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + > + <span> + R + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + > + <span> + G + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + > + <span> + B + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="1" + step="0.01" + > + <span> + A + </span> + </div> + <button type="button" + class="v-btn v-btn--fab v-btn--flat v-btn--icon v-btn--round theme--light v-size--small" + > + <span class="v-btn__content"> + <i aria-hidden="true" + class="v-icon material-icons theme--light" + > + $vuetify.icons.unfold + </i> + </span> + </button> + </div> + </div> +</div> + +`; + +exports[`VColorPicker.ts should hide inputs 1`] = ` + +<div class="v-color-picker v-sheet theme--light theme--light" + style="max-width: 300px;" +> + <div class="v-color-picker__canvas" + style="width: 300px; height: 150px;" + > + <canvas width="300" + height="150" + > + </canvas> + <div class="v-color-picker__canvas-dot" + style="width: 10px; height: 10px; left: 295px; top: -5px;" + > + </div> + </div> + <div class="v-color-picker__controls"> + <div class="v-color-picker__preview"> + <div class="v-color-picker__dot"> + <div style="background: rgb(255, 0, 0);"> + </div> + </div> + <div class="v-color-picker__sliders"> + <div class="v-input v-color-picker__hue v-input--hide-details theme--light v-input__slider v-color-picker__track"> + <div class="v-input__control"> + <div class="v-input__slot"> + <div class="v-slider v-slider--horizontal theme--light"> + <input value="0" + readonly="readonly" + tabindex="-1" + > + <div class="v-slider__track-container"> + <div class="v-slider__track-background primary lighten-3" + style="right: 0px;" + > + </div> + <div class="v-slider__track-fill primary" + style="left: 0px; width: 0%;" + > + </div> + </div> + <div role="slider" + tabindex="0" + aria-valuemin="0" + aria-valuemax="360" + aria-valuenow="0" + aria-readonly="false" + aria-orientation="horizontal" + class="v-slider__thumb-container grey--text text--lighten-2" + style="left: 0%;" + > + <div class="v-slider__thumb grey lighten-2"> + </div> + </div> + </div> + </div> + </div> + </div> + <div class="v-input v-color-picker__alpha v-input--hide-details v-input--is-label-active v-input--is-dirty theme--light v-input__slider v-color-picker__track"> + <div class="v-input__control"> + <div class="v-input__slot"> + <div class="v-slider v-slider--horizontal theme--light"> + <input value="1" + readonly="readonly" + tabindex="-1" + > + <div class="v-slider__track-container"> + <div class="v-slider__track-background primary lighten-3" + style="right: 0px;" + > + </div> + <div class="v-slider__track-fill primary" + style="left: 0px; width: 100%;" + > + </div> + </div> + <div role="slider" + tabindex="0" + aria-valuemin="0" + aria-valuemax="1" + aria-valuenow="1" + aria-readonly="false" + aria-orientation="horizontal" + class="v-slider__thumb-container grey--text text--lighten-2" + style="left: 100%;" + > + <div class="v-slider__thumb grey lighten-2"> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> +</div> + +`; + +exports[`VColorPicker.ts should render color picker 1`] = ` + +<div class="v-color-picker v-sheet theme--light theme--light" + style="max-width: 300px;" +> + <div class="v-color-picker__canvas" + style="width: 300px; height: 150px;" + > + <canvas width="300" + height="150" + > + </canvas> + <div class="v-color-picker__canvas-dot" + style="width: 10px; height: 10px; left: 295px; top: -5px;" + > + </div> + </div> + <div class="v-color-picker__controls"> + <div class="v-color-picker__preview"> + <div class="v-color-picker__dot"> + <div style="background: rgb(255, 0, 0);"> + </div> + </div> + <div class="v-color-picker__sliders"> + <div class="v-input v-color-picker__hue v-input--hide-details theme--light v-input__slider v-color-picker__track"> + <div class="v-input__control"> + <div class="v-input__slot"> + <div class="v-slider v-slider--horizontal theme--light"> + <input value="0" + readonly="readonly" + tabindex="-1" + > + <div class="v-slider__track-container"> + <div class="v-slider__track-background primary lighten-3" + style="right: 0px;" + > + </div> + <div class="v-slider__track-fill primary" + style="left: 0px; width: 0%;" + > + </div> + </div> + <div role="slider" + tabindex="0" + aria-valuemin="0" + aria-valuemax="360" + aria-valuenow="0" + aria-readonly="false" + aria-orientation="horizontal" + class="v-slider__thumb-container grey--text text--lighten-2" + style="left: 0%;" + > + <div class="v-slider__thumb grey lighten-2"> + </div> + </div> + </div> + </div> + </div> + </div> + <div class="v-input v-color-picker__alpha v-input--hide-details v-input--is-label-active v-input--is-dirty theme--light v-input__slider v-color-picker__track"> + <div class="v-input__control"> + <div class="v-input__slot"> + <div class="v-slider v-slider--horizontal theme--light"> + <input value="1" + readonly="readonly" + tabindex="-1" + > + <div class="v-slider__track-container"> + <div class="v-slider__track-background primary lighten-3" + style="right: 0px;" + > + </div> + <div class="v-slider__track-fill primary" + style="left: 0px; width: 100%;" + > + </div> + </div> + <div role="slider" + tabindex="0" + aria-valuemin="0" + aria-valuemax="1" + aria-valuenow="1" + aria-readonly="false" + aria-orientation="horizontal" + class="v-slider__thumb-container grey--text text--lighten-2" + style="left: 100%;" + > + <div class="v-slider__thumb grey lighten-2"> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + <div class="v-color-picker__edit"> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + > + <span> + R + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + > + <span> + G + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + > + <span> + B + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="1" + step="0.01" + > + <span> + A + </span> + </div> + <button type="button" + class="v-btn v-btn--fab v-btn--flat v-btn--icon v-btn--round theme--light v-size--small" + > + <span class="v-btn__content"> + <i aria-hidden="true" + class="v-icon material-icons theme--light" + > + $vuetify.icons.unfold + </i> + </span> + </button> + </div> + </div> +</div> + +`; + +exports[`VColorPicker.ts should show swatches 1`] = ` + +<div class="v-color-picker v-sheet theme--light theme--light" + style="max-width: 300px;" +> + <div class="v-color-picker__canvas" + style="width: 300px; height: 150px;" + > + <canvas width="300" + height="150" + > + </canvas> + <div class="v-color-picker__canvas-dot" + style="width: 10px; height: 10px; left: 295px; top: -5px;" + > + </div> + </div> + <div class="v-color-picker__controls"> + <div class="v-color-picker__preview"> + <div class="v-color-picker__dot"> + <div style="background: rgb(255, 0, 0);"> + </div> + </div> + <div class="v-color-picker__sliders"> + <div class="v-input v-color-picker__hue v-input--hide-details theme--light v-input__slider v-color-picker__track"> + <div class="v-input__control"> + <div class="v-input__slot"> + <div class="v-slider v-slider--horizontal theme--light"> + <input value="0" + readonly="readonly" + tabindex="-1" + > + <div class="v-slider__track-container"> + <div class="v-slider__track-background primary lighten-3" + style="right: 0px;" + > + </div> + <div class="v-slider__track-fill primary" + style="left: 0px; width: 0%;" + > + </div> + </div> + <div role="slider" + tabindex="0" + aria-valuemin="0" + aria-valuemax="360" + aria-valuenow="0" + aria-readonly="false" + aria-orientation="horizontal" + class="v-slider__thumb-container grey--text text--lighten-2" + style="left: 0%;" + > + <div class="v-slider__thumb grey lighten-2"> + </div> + </div> + </div> + </div> + </div> + </div> + <div class="v-input v-color-picker__alpha v-input--hide-details v-input--is-label-active v-input--is-dirty theme--light v-input__slider v-color-picker__track"> + <div class="v-input__control"> + <div class="v-input__slot"> + <div class="v-slider v-slider--horizontal theme--light"> + <input value="1" + readonly="readonly" + tabindex="-1" + > + <div class="v-slider__track-container"> + <div class="v-slider__track-background primary lighten-3" + style="right: 0px;" + > + </div> + <div class="v-slider__track-fill primary" + style="left: 0px; width: 100%;" + > + </div> + </div> + <div role="slider" + tabindex="0" + aria-valuemin="0" + aria-valuemax="1" + aria-valuenow="1" + aria-readonly="false" + aria-orientation="horizontal" + class="v-slider__thumb-container grey--text text--lighten-2" + style="left: 100%;" + > + <div class="v-slider__thumb grey lighten-2"> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + <div class="v-color-picker__edit"> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + > + <span> + R + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + > + <span> + G + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + > + <span> + B + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="1" + step="0.01" + > + <span> + A + </span> + </div> + <button type="button" + class="v-btn v-btn--fab v-btn--flat v-btn--icon v-btn--round theme--light v-size--small" + > + <span class="v-btn__content"> + <i aria-hidden="true" + class="v-icon material-icons theme--light" + > + $vuetify.icons.unfold + </i> + </span> + </button> + </div> + </div> + <div class="v-color-picker__swatches" + style="max-height: 150px;" + > + <div> + <div class="v-color-picker__swatch"> + <div class="v-color-picker__color"> + <div style="background: rgb(244, 67, 54);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(183, 28, 28);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(198, 40, 40);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(211, 47, 47);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(229, 57, 53);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(239, 83, 80);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(229, 115, 115);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(239, 154, 154);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 205, 210);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 235, 238);"> + </div> + </div> + </div> + <div class="v-color-picker__swatch"> + <div class="v-color-picker__color"> + <div style="background: rgb(233, 30, 99);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(136, 14, 79);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(173, 20, 87);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(194, 24, 91);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(216, 27, 96);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(236, 64, 122);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(240, 98, 146);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(244, 143, 177);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(248, 187, 208);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(252, 228, 236);"> + </div> + </div> + </div> + <div class="v-color-picker__swatch"> + <div class="v-color-picker__color"> + <div style="background: rgb(156, 39, 176);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(74, 20, 140);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(106, 27, 154);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(123, 31, 162);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(142, 36, 170);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(171, 71, 188);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(186, 104, 200);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(206, 147, 216);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(225, 190, 231);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(243, 229, 245);"> + </div> + </div> + </div> + <div class="v-color-picker__swatch"> + <div class="v-color-picker__color"> + <div style="background: rgb(103, 58, 183);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(49, 27, 146);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(69, 39, 160);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(81, 45, 168);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(94, 53, 177);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(126, 87, 194);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(149, 117, 205);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(179, 157, 219);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(209, 196, 233);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(237, 231, 246);"> + </div> + </div> + </div> + <div class="v-color-picker__swatch"> + <div class="v-color-picker__color"> + <div style="background: rgb(63, 81, 181);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(26, 35, 126);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(40, 53, 147);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(48, 63, 159);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(57, 73, 171);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(92, 107, 192);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(121, 134, 203);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(159, 168, 218);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(197, 202, 233);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(232, 234, 246);"> + </div> + </div> + </div> + <div class="v-color-picker__swatch"> + <div class="v-color-picker__color"> + <div style="background: rgb(33, 150, 243);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(13, 71, 161);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(21, 101, 192);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(25, 118, 210);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(30, 136, 229);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(66, 165, 245);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(100, 181, 246);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(144, 202, 249);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(187, 222, 251);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(227, 242, 253);"> + </div> + </div> + </div> + <div class="v-color-picker__swatch"> + <div class="v-color-picker__color"> + <div style="background: rgb(3, 169, 244);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(1, 87, 155);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(2, 119, 189);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(2, 136, 209);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(3, 155, 229);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(41, 182, 246);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(79, 195, 247);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(129, 212, 250);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(179, 229, 252);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(225, 245, 254);"> + </div> + </div> + </div> + <div class="v-color-picker__swatch"> + <div class="v-color-picker__color"> + <div style="background: rgb(0, 188, 212);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(0, 96, 100);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(0, 131, 143);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(0, 151, 167);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(0, 172, 193);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(38, 198, 218);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(77, 208, 225);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(128, 222, 234);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(178, 235, 242);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(224, 247, 250);"> + </div> + </div> + </div> + <div class="v-color-picker__swatch"> + <div class="v-color-picker__color"> + <div style="background: rgb(0, 150, 136);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(0, 77, 64);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(0, 105, 92);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(0, 121, 107);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(0, 137, 123);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(38, 166, 154);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(77, 182, 172);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(128, 203, 196);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(178, 223, 219);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(224, 242, 241);"> + </div> + </div> + </div> + <div class="v-color-picker__swatch"> + <div class="v-color-picker__color"> + <div style="background: rgb(76, 175, 80);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(27, 94, 32);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(46, 125, 50);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(56, 142, 60);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(67, 160, 71);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(102, 187, 106);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(129, 199, 132);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(165, 214, 167);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(200, 230, 201);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(232, 245, 233);"> + </div> + </div> + </div> + <div class="v-color-picker__swatch"> + <div class="v-color-picker__color"> + <div style="background: rgb(139, 195, 74);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(51, 105, 30);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(85, 139, 47);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(104, 159, 56);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(124, 179, 66);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(156, 204, 101);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(174, 213, 129);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(197, 225, 165);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(220, 237, 200);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(241, 248, 233);"> + </div> + </div> + </div> + <div class="v-color-picker__swatch"> + <div class="v-color-picker__color"> + <div style="background: rgb(205, 220, 57);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(130, 119, 23);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(158, 157, 36);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(175, 180, 43);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(192, 202, 51);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(212, 225, 87);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(220, 231, 117);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(230, 238, 156);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(240, 244, 195);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(249, 251, 231);"> + </div> + </div> + </div> + <div class="v-color-picker__swatch"> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 235, 59);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(245, 127, 23);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(249, 168, 37);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(251, 192, 45);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(253, 216, 53);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 238, 88);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 241, 118);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 245, 157);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 249, 196);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 253, 231);"> + </div> + </div> + </div> + <div class="v-color-picker__swatch"> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 193, 7);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 111, 0);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 143, 0);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 160, 0);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 179, 0);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 202, 40);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 213, 79);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 224, 130);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 236, 179);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 248, 225);"> + </div> + </div> + </div> + <div class="v-color-picker__swatch"> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 152, 0);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(230, 81, 0);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(239, 108, 0);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(245, 124, 0);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(251, 140, 0);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 167, 38);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 183, 77);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 204, 128);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 224, 178);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 243, 224);"> + </div> + </div> + </div> + <div class="v-color-picker__swatch"> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 87, 34);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(191, 54, 12);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(216, 67, 21);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(230, 74, 25);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(244, 81, 30);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 112, 67);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 138, 101);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 171, 145);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 204, 188);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(251, 233, 231);"> + </div> + </div> + </div> + <div class="v-color-picker__swatch"> + <div class="v-color-picker__color"> + <div style="background: rgb(121, 85, 72);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(62, 39, 35);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(78, 52, 46);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(93, 64, 55);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(109, 76, 65);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(141, 110, 99);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(161, 136, 127);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(188, 170, 164);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(215, 204, 200);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(239, 235, 233);"> + </div> + </div> + </div> + <div class="v-color-picker__swatch"> + <div class="v-color-picker__color"> + <div style="background: rgb(96, 125, 139);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(38, 50, 56);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(55, 71, 79);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(69, 90, 100);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(84, 110, 122);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(120, 144, 156);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(144, 164, 174);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(176, 190, 197);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(207, 216, 220);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(236, 239, 241);"> + </div> + </div> + </div> + <div class="v-color-picker__swatch"> + <div class="v-color-picker__color"> + <div style="background: rgb(158, 158, 158);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(33, 33, 33);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(66, 66, 66);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(97, 97, 97);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(117, 117, 117);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(189, 189, 189);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(224, 224, 224);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(238, 238, 238);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(245, 245, 245);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(250, 250, 250);"> + </div> + </div> + </div> + <div class="v-color-picker__swatch"> + <div class="v-color-picker__color"> + <div style="background: rgb(0, 0, 0);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: rgb(255, 255, 255);"> + </div> + </div> + <div class="v-color-picker__color"> + <div style="background: transparent;"> + </div> + </div> + </div> + </div> + </div> +</div> + +`; diff --git a/packages/vuetify/src/components/VColorPicker/__tests__/__snapshots__/VColorPickerEdit.spec.ts.snap b/packages/vuetify/src/components/VColorPicker/__tests__/__snapshots__/VColorPickerEdit.spec.ts.snap new file mode 100644 index 00000000000..6269407261b --- /dev/null +++ b/packages/vuetify/src/components/VColorPicker/__tests__/__snapshots__/VColorPickerEdit.spec.ts.snap @@ -0,0 +1,309 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`VColorPickerEdit.ts should change mode 1`] = ` + +<div class="v-color-picker__edit"> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + > + <span> + R + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + > + <span> + G + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + > + <span> + B + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="1" + step="0.01" + > + <span> + A + </span> + </div> + <button type="button" + class="v-btn v-btn--fab v-btn--flat v-btn--icon v-btn--round theme--light v-size--small" + > + <span class="v-btn__content"> + <i aria-hidden="true" + class="v-icon material-icons theme--light" + > + $vuetify.icons.unfold + </i> + </span> + </button> +</div> + +`; + +exports[`VColorPickerEdit.ts should change mode 2`] = ` + +<div class="v-color-picker__edit"> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="360" + step="1" + > + <span> + H + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="1" + step="0.01" + > + <span> + S + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="1" + step="0.01" + > + <span> + L + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="1" + step="0.01" + > + <span> + A + </span> + </div> + <button type="button" + class="v-btn v-btn--fab v-btn--flat v-btn--icon v-btn--round theme--light v-size--small" + > + <span class="v-btn__content"> + <i aria-hidden="true" + class="v-icon material-icons theme--light" + > + $vuetify.icons.unfold + </i> + </span> + </button> +</div> + +`; + +exports[`VColorPickerEdit.ts should change mode 3`] = ` + +<div class="v-color-picker__edit"> + <div class="v-color-picker__input"> + <input maxlength="9"> + <span> + HEX + </span> + </div> + <button type="button" + class="v-btn v-btn--fab v-btn--flat v-btn--icon v-btn--round theme--light v-size--small" + > + <span class="v-btn__content"> + <i aria-hidden="true" + class="v-icon material-icons theme--light" + > + $vuetify.icons.unfold + </i> + </span> + </button> +</div> + +`; + +exports[`VColorPickerEdit.ts should change mode 4`] = ` + +<div class="v-color-picker__edit"> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="360" + step="1" + > + <span> + H + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="1" + step="0.01" + > + <span> + S + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="1" + step="0.01" + > + <span> + L + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="1" + step="0.01" + > + <span> + A + </span> + </div> + <button type="button" + class="v-btn v-btn--fab v-btn--flat v-btn--icon v-btn--round theme--light v-size--small" + > + <span class="v-btn__content"> + <i aria-hidden="true" + class="v-icon material-icons theme--light" + > + $vuetify.icons.unfold + </i> + </span> + </button> +</div> + +`; + +exports[`VColorPickerEdit.ts should hide mode switch button 1`] = ` + +<div class="v-color-picker__edit"> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + > + <span> + R + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + > + <span> + G + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + > + <span> + B + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="1" + step="0.01" + > + <span> + A + </span> + </div> +</div> + +`; + +exports[`VColorPickerEdit.ts should render with disabled 1`] = ` + +<div class="v-color-picker__edit"> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + disabled="disabled" + > + <span> + R + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + disabled="disabled" + > + <span> + G + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="255" + step="1" + disabled="disabled" + > + <span> + B + </span> + </div> + <div class="v-color-picker__input"> + <input type="number" + min="0" + max="1" + step="0.01" + disabled="disabled" + > + <span> + A + </span> + </div> + <button disabled="disabled" + type="button" + class="v-btn v-btn--disabled v-btn--fab v-btn--flat v-btn--icon v-btn--round theme--light v-size--small" + > + <span class="v-btn__content"> + <i aria-hidden="true" + class="v-icon material-icons theme--light" + > + $vuetify.icons.unfold + </i> + </span> + </button> +</div> + +`; diff --git a/packages/vuetify/src/components/VColorPicker/_variables.scss b/packages/vuetify/src/components/VColorPicker/_variables.scss new file mode 100644 index 00000000000..f7584d52aec --- /dev/null +++ b/packages/vuetify/src/components/VColorPicker/_variables.scss @@ -0,0 +1,6 @@ +$color-picker-checkerboard: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGElEQVQYlWNgYGCQwoKxgqGgcJA5h3yFAAs8BRWVSwooAAAAAElFTkSuQmCC) repeat; +$color-picker-swatch-color-width: 45px !default; +$color-picker-swatch-color-height: 18px !default; +$color-picker-swatch-color-margin: 2px 4px !default; +$color-picker-swatch-color-border-radius: 2px !default; +$color-picker-swatch-margin-bottom: 10px !default; diff --git a/packages/vuetify/src/components/VColorPicker/index.ts b/packages/vuetify/src/components/VColorPicker/index.ts new file mode 100644 index 00000000000..682c0ca0d06 --- /dev/null +++ b/packages/vuetify/src/components/VColorPicker/index.ts @@ -0,0 +1,6 @@ +import VColorPicker from './VColorPicker' +import VColorPickerSwatches from './VColorPickerSwatches' +import VColorPickerCanvas from './VColorPickerCanvas' + +export { VColorPicker, VColorPickerSwatches, VColorPickerCanvas } +export default VColorPicker diff --git a/packages/vuetify/src/components/VColorPicker/util/__tests__/index.spec.ts b/packages/vuetify/src/components/VColorPicker/util/__tests__/index.spec.ts new file mode 100644 index 00000000000..f8619068993 --- /dev/null +++ b/packages/vuetify/src/components/VColorPicker/util/__tests__/index.spec.ts @@ -0,0 +1,57 @@ +import { parseColor } from '../' + +const red = { + alpha: 1, + hex: '#FF0000', + hexa: '#FF0000FF', + hsla: { h: 0, s: 1, l: 0.5, a: 1 }, + hsva: { h: 0, s: 1, v: 1, a: 1 }, + hue: 0, + rgba: { r: 255, g: 0, b: 0, a: 1 } +} + +describe('VColorPicker/util/parseColor', () => { + it('should return default color if nothing is passed', () => { + expect(parseColor(undefined)).toEqual(red) + expect(parseColor(null)).toEqual(red) + }) + + it('should parse hex string', () => { + expect(parseColor('#FF00FF').hexa).toEqual('#FF00FFFF') + expect(parseColor('FF00FF05').hexa).toEqual('#FF00FF05') + }) + + it('should try to parse color if invalid hex string passed', () => { + expect(parseColor('#00gi').hex).toEqual('#00FF00') + expect(parseColor('#00gi').hexa).toEqual('#00FF00FF') + }) + + it('should parse rgb object', () => { + const rgb = { r: 128, g: 128, b: 0 } + expect(parseColor(rgb).rgba).toEqual({ ...rgb, a: 1 }) + + const rgba = { r: 128, g: 0, b: 255, a: 0.2 } + expect(parseColor(rgba).rgba).toEqual(rgba) + }) + + it('should parse hsl object', () => { + const hsl = { h: 220, s: 0.5, l: 1 } + expect(parseColor(hsl).hsla).toEqual({ ...hsl, a: 1 }) + + const hsla = { h: 220, s: 0.5, l: 1, a: 0.4 } + expect(parseColor(hsla).hsla).toEqual(hsla) + }) + + it('should parse hsv object', () => { + const hsv = { h: 220, s: 0.5, v: 1 } + expect(parseColor(hsv).hsva).toEqual({ ...hsv, a: 1 }) + + const hsva = { h: 220, s: 0.5, v: 1, a: 0.4 } + expect(parseColor(hsva).hsva).toEqual(hsva) + }) + + it('should return default color if object is unknown', () => { + const foo = { x: 0, y: 10, z: 100 } + expect(parseColor(foo)).toEqual(red) + }) +}) diff --git a/packages/vuetify/src/components/VColorPicker/util/index.ts b/packages/vuetify/src/components/VColorPicker/util/index.ts new file mode 100644 index 00000000000..4720cf103f4 --- /dev/null +++ b/packages/vuetify/src/components/VColorPicker/util/index.ts @@ -0,0 +1,135 @@ +// Utilities +import { + HSVA, + HSVAtoRGBA, + HSVAtoHex, + RGBA, + Hex, + RGBAtoHSVA, + HexToHSVA, + HSLA, + HSVAtoHSLA, + RGBAtoHex, + HSLAtoHSVA, + parseHex, + Hexa +} from '../../../util/colorUtils' + +export interface VColorPickerColor { + alpha: number + hex: Hex + hexa: Hexa + hsla: HSLA + hsva: HSVA + hue: number + rgba: RGBA +} + +export function fromHSVA (hsva: HSVA): VColorPickerColor { + hsva = { ...hsva } + const hexa = HSVAtoHex(hsva) + return { + alpha: hsva.a, + hex: hexa.substr(0, 7), + hexa, + hsla: HSVAtoHSLA(hsva), + hsva, + hue: hsva.h, + rgba: HSVAtoRGBA(hsva) + } +} + +export function fromHSLA (hsla: HSLA): VColorPickerColor { + const hsva = HSLAtoHSVA(hsla) + const hexa = HSVAtoHex(hsva) + return { + alpha: hsva.a, + hex: hexa.substr(0, 7), + hexa, + hsla, + hsva, + hue: hsva.h, + rgba: HSVAtoRGBA(hsva) + } +} + +export function fromRGBA (rgba: RGBA): VColorPickerColor { + const hsva = RGBAtoHSVA(rgba) + const hexa = RGBAtoHex(rgba) + return { + alpha: hsva.a, + hex: hexa.substr(0, 7), + hexa, + hsla: HSVAtoHSLA(hsva), + hsva, + hue: hsva.h, + rgba + } +} + +export function fromHexa (hexa: Hexa): VColorPickerColor { + const hsva = HexToHSVA(hexa) + return { + alpha: hsva.a, + hex: hexa.substr(0, 7), + hexa, + hsla: HSVAtoHSLA(hsva), + hsva, + hue: hsva.h, + rgba: HSVAtoRGBA(hsva) + } +} + +export function fromHex (hex: Hex): VColorPickerColor { + return fromHexa(parseHex(hex)) +} + +function has (obj: object, key: string[]) { + return key.every(k => obj.hasOwnProperty(k)) +} + +export function parseColor (color: any, oldColor: VColorPickerColor | null) { + if (!color) return fromRGBA({ r: 255, g: 0, b: 0, a: 1 }) + + if (typeof color === 'string') { + if (color === 'transparent') return fromHexa('#00000000') + + const hex = parseHex(color) + + if (oldColor && hex === oldColor.hexa) return oldColor + else return fromHexa(hex) + } + + if (typeof color === 'object') { + if (color.hasOwnProperty('alpha')) return color + + const a = color.hasOwnProperty('a') ? parseFloat(color.a) : 1 + + if (has(color, ['r', 'g', 'b'])) { + if (oldColor && color === oldColor.rgba) return oldColor + else return fromRGBA({ ...color, a }) + } else if (has(color, ['h', 's', 'l'])) { + if (oldColor && color === oldColor.hsla) return oldColor + else return fromHSLA({ ...color, a }) + } else if (has(color, ['h', 's', 'v'])) { + if (oldColor && color === oldColor.hsva) return oldColor + else return fromHSVA({ ...color, a }) + } + } + + return fromRGBA({ r: 255, g: 0, b: 0, a: 1 }) +} + +export function extractColor (color: VColorPickerColor, input: any) { + if (typeof input === 'string') { + return input.length === 7 ? color.hex : color.hexa + } + + if (typeof input === 'object') { + if (has(input, ['r', 'g', 'b'])) return color.rgba + else if (has(input, ['h', 's', 'l'])) return color.hsla + else if (has(input, ['h', 's', 'v'])) return color.hsva + } + + return color +} diff --git a/packages/vuetify/src/components/index.ts b/packages/vuetify/src/components/index.ts index c56cb0acbb6..6239407ad11 100644 --- a/packages/vuetify/src/components/index.ts +++ b/packages/vuetify/src/components/index.ts @@ -17,6 +17,7 @@ export * from './VCarousel' export * from './VCheckbox' export * from './VChip' export * from './VChipGroup' +export * from './VColorPicker' export * from './VContent' export * from './VCombobox' export * from './VCounter' diff --git a/packages/vuetify/src/services/icons/__tests__/__snapshots__/icons.spec.ts.snap b/packages/vuetify/src/services/icons/__tests__/__snapshots__/icons.spec.ts.snap index 039b49ef6ce..5d8c3a1e9df 100644 --- a/packages/vuetify/src/services/icons/__tests__/__snapshots__/icons.spec.ts.snap +++ b/packages/vuetify/src/services/icons/__tests__/__snapshots__/icons.spec.ts.snap @@ -29,6 +29,7 @@ Object { "sort": "mdi-arrow-up", "subgroup": "mdi-menu-down", "success": "mdi-check-circle", + "unfold": "mdi-unfold-more-horizontal", "warning": "mdi-exclamation", } `; @@ -62,6 +63,7 @@ Object { "sort": "fa fa-sort-up", "subgroup": "fa fa-caret-down", "success": "fa fa-check-circle", + "unfold": "fa fa-angle-double-down", "warning": "fa fa-exclamation", } `; diff --git a/packages/vuetify/src/services/icons/presets/fa.ts b/packages/vuetify/src/services/icons/presets/fa.ts index 73b8caee10f..d61badd8e39 100644 --- a/packages/vuetify/src/services/icons/presets/fa.ts +++ b/packages/vuetify/src/services/icons/presets/fa.ts @@ -28,7 +28,8 @@ const icons: VuetifyIcons = { ratingFull: 'fas fa-star', ratingHalf: 'fas fa-star-half', first: 'fas fa-step-backward', - last: 'fas fa-step-forward' + last: 'fas fa-step-forward', + unfold: 'fas fa-arrows-alt-v' } export default icons diff --git a/packages/vuetify/src/services/icons/presets/fa4.ts b/packages/vuetify/src/services/icons/presets/fa4.ts index 452faf82b3a..a5b04295839 100644 --- a/packages/vuetify/src/services/icons/presets/fa4.ts +++ b/packages/vuetify/src/services/icons/presets/fa4.ts @@ -28,7 +28,8 @@ const icons: VuetifyIcons = { ratingFull: 'fa fa-star', ratingHalf: 'fa fa-star-half-o', first: 'fa fa-step-backward', - last: 'fa fa-step-forward' + last: 'fa fa-step-forward', + unfold: 'fa fa-angle-double-down' } export default icons diff --git a/packages/vuetify/src/services/icons/presets/md.ts b/packages/vuetify/src/services/icons/presets/md.ts index 62a9ad7eacc..7ad92972be7 100644 --- a/packages/vuetify/src/services/icons/presets/md.ts +++ b/packages/vuetify/src/services/icons/presets/md.ts @@ -29,7 +29,8 @@ const icons: VuetifyIcons = { ratingHalf: 'star_half', loading: 'cached', first: 'first_page', - last: 'last_page' + last: 'last_page', + unfold: 'unfold_more' } export default icons diff --git a/packages/vuetify/src/services/icons/presets/mdi-svg.ts b/packages/vuetify/src/services/icons/presets/mdi-svg.ts index 098f39ef1bd..9b6cf5548b2 100644 --- a/packages/vuetify/src/services/icons/presets/mdi-svg.ts +++ b/packages/vuetify/src/services/icons/presets/mdi-svg.ts @@ -26,7 +26,8 @@ const icons: VuetifyIcons = { edit: 'M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z', ratingEmpty: 'M12,15.39L8.24,17.66L9.23,13.38L5.91,10.5L10.29,10.13L12,6.09L13.71,10.13L18.09,10.5L14.77,13.38L15.76,17.66M22,9.24L14.81,8.63L12,2L9.19,8.63L2,9.24L7.45,13.97L5.82,21L12,17.27L18.18,21L16.54,13.97L22,9.24Z', ratingFull: 'M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z', - ratingHalf: 'M12,15.4V6.1L13.71,10.13L18.09,10.5L14.77,13.39L15.76,17.67M22,9.24L14.81,8.63L12,2L9.19,8.63L2,9.24L7.45,13.97L5.82,21L12,17.27L18.18,21L16.54,13.97L22,9.24Z' + ratingHalf: 'M12,15.4V6.1L13.71,10.13L18.09,10.5L14.77,13.39L15.76,17.67M22,9.24L14.81,8.63L12,2L9.19,8.63L2,9.24L7.45,13.97L5.82,21L12,17.27L18.18,21L16.54,13.97L22,9.24Z', + unfold: 'M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z' } export default icons diff --git a/packages/vuetify/src/services/icons/presets/mdi.ts b/packages/vuetify/src/services/icons/presets/mdi.ts index 08a9ebdb037..a283347a119 100644 --- a/packages/vuetify/src/services/icons/presets/mdi.ts +++ b/packages/vuetify/src/services/icons/presets/mdi.ts @@ -28,7 +28,8 @@ const icons: VuetifyIcons = { ratingFull: 'mdi-star', ratingHalf: 'mdi-star-half', first: 'mdi-page-first', - last: 'mdi-page-last' + last: 'mdi-page-last', + unfold: 'mdi-unfold-more-horizontal' } export default icons diff --git a/packages/vuetify/src/services/theme/utils.ts b/packages/vuetify/src/services/theme/utils.ts index 91d2100eddc..c5ebac6a412 100644 --- a/packages/vuetify/src/services/theme/utils.ts +++ b/packages/vuetify/src/services/theme/utils.ts @@ -1,4 +1,4 @@ -import { colorToInt, intToHex, colorToHex, RGB } from '../../util/colorUtils' +import { colorToInt, intToHex, colorToHex, ColorInt } from '../../util/colorUtils' import * as sRGB from '../../util/color/transformSRGB' import * as LAB from '../../util/color/transformCIELAB' import { @@ -103,7 +103,7 @@ export function genStyles (theme: VuetifyParsedTheme, cssVar = false): string { return variablesCss + css } -export function genVariations (name: string, value: RGB): Record<string, string> { +export function genVariations (name: string, value: ColorInt): Record<string, string> { const values: Record<string, string> = { base: intToHex(value) } @@ -119,13 +119,13 @@ export function genVariations (name: string, value: RGB): Record<string, string> return values } -function lighten (value: RGB, amount: number): RGB { +function lighten (value: ColorInt, amount: number): ColorInt { const lab = LAB.fromXYZ(sRGB.toXYZ(value)) lab[0] = lab[0] + amount * 10 return sRGB.fromXYZ(LAB.toXYZ(lab)) } -function darken (value: RGB, amount: number): RGB { +function darken (value: ColorInt, amount: number): ColorInt { const lab = LAB.fromXYZ(sRGB.toXYZ(value)) lab[0] = lab[0] - amount * 10 return sRGB.fromXYZ(LAB.toXYZ(lab)) diff --git a/packages/vuetify/src/styles/settings/_dark.scss b/packages/vuetify/src/styles/settings/_dark.scss index 53e4908ff5a..e048a76a6dd 100644 --- a/packages/vuetify/src/styles/settings/_dark.scss +++ b/packages/vuetify/src/styles/settings/_dark.scss @@ -85,6 +85,9 @@ $material-dark: ( 'indeterminateTime': map-get($grey, 'darken-1'), 'title': map-get($grey, 'darken-2') ), + 'color-picker': ( + 'checkerboard': rgba(map-get($shades, 'white'), 0.12) + ), 'bg-color': #303030, 'fg-color': map-get($shades, 'white'), 'text-color': map-get($shades, 'white'), diff --git a/packages/vuetify/src/styles/settings/_light.scss b/packages/vuetify/src/styles/settings/_light.scss index 70567b5ada7..032508fa846 100644 --- a/packages/vuetify/src/styles/settings/_light.scss +++ b/packages/vuetify/src/styles/settings/_light.scss @@ -84,6 +84,9 @@ $material-light: ( 'indeterminateTime': map-get($grey, 'lighten-1'), 'title': map-get($grey, 'lighten-2') ), + 'color-picker': ( + 'checkerboard': rgba(map-get($shades, 'white'), 0) + ), 'bg-color': map-get($shades, 'white'), 'fg-color': map-get($shades, 'black'), 'text-color': map-get($shades, 'black'), diff --git a/packages/vuetify/src/util/color/transformSRGB.ts b/packages/vuetify/src/util/color/transformSRGB.ts index ce23937b27f..5371b6e73fa 100644 --- a/packages/vuetify/src/util/color/transformSRGB.ts +++ b/packages/vuetify/src/util/color/transformSRGB.ts @@ -1,4 +1,5 @@ -import { RGB, XYZ } from '../colorUtils' +import { ColorInt, XYZ } from '../colorUtils' +import { clamp } from '../../util/helpers' // For converting XYZ to sRGB const srgbForwardMatrix = [ @@ -28,11 +29,7 @@ const srgbReverseTransform = (C: number): number => ( : ((C + 0.055) / 1.055) ** 2.4 ) -function clamp (value: number): number { - return Math.max(0, Math.min(1, value)) -} - -export function fromXYZ (xyz: XYZ): RGB { +export function fromXYZ (xyz: XYZ): ColorInt { const rgb = Array(3) const transform = srgbForwardTransform const matrix = srgbForwardMatrix @@ -50,7 +47,7 @@ export function fromXYZ (xyz: XYZ): RGB { return (rgb[0] << 16) + (rgb[1] << 8) + (rgb[2] << 0) } -export function toXYZ (rgb: RGB): XYZ { +export function toXYZ (rgb: ColorInt): XYZ { const xyz: XYZ = [0, 0, 0] const transform = srgbReverseTransform const matrix = srgbReverseMatrix diff --git a/packages/vuetify/src/util/colorUtils.ts b/packages/vuetify/src/util/colorUtils.ts index 95d3c61ad8f..e222324dc54 100644 --- a/packages/vuetify/src/util/colorUtils.ts +++ b/packages/vuetify/src/util/colorUtils.ts @@ -1,10 +1,18 @@ import { consoleWarn } from './console' +import { chunk, padEnd } from './helpers' +import { toXYZ } from './color/transformSRGB' -export type RGB = number +export type ColorInt = number export type XYZ = [number, number, number] export type LAB = [number, number, number] +export type HSVA = { h: number, s: number, v: number, a: number } +export type RGBA = { r: number, g: number, b: number, a: number } +export type HSLA = { h: number, s: number, l: number, a: number } +export type Hex = string +export type Hexa = string +export type Color = string | number | {} -export function colorToInt (color: string | number | {}): RGB { +export function colorToInt (color: Color): ColorInt { let rgb if (typeof color === 'number') { @@ -33,7 +41,7 @@ export function colorToInt (color: string | number | {}): RGB { return rgb } -export function intToHex (color: RGB): string { +export function intToHex (color: ColorInt): string { let hexColor: string = color.toString(16) if (hexColor.length < 6) hexColor = '0'.repeat(6 - hexColor.length) + hexColor @@ -41,6 +49,156 @@ export function intToHex (color: RGB): string { return '#' + hexColor } -export function colorToHex (color: string | number | {}): string { +export function colorToHex (color: Color): string { return intToHex(colorToInt(color)) } + +/** + * Converts HSVA to RGBA. Based on formula from https://en.wikipedia.org/wiki/HSL_and_HSV + * + * @param color HSVA color as an array [0-360, 0-1, 0-1, 0-1] + */ +export function HSVAtoRGBA (hsva: HSVA): RGBA { + const { h, s, v, a } = hsva + const f = (n: number) => { + const k = (n + (h / 60)) % 6 + return v - v * s * Math.max(Math.min(k, 4 - k, 1), 0) + } + + const rgb = [f(5), f(3), f(1)].map(v => Math.round(v * 255)) + + return { r: rgb[0], g: rgb[1], b: rgb[2], a } +} + +/** + * Converts RGBA to HSVA. Based on formula from https://en.wikipedia.org/wiki/HSL_and_HSV + * + * @param color RGBA color as an array [0-255, 0-255, 0-255, 0-1] + */ +export function RGBAtoHSVA (rgba: RGBA): HSVA { + if (!rgba) return { h: 0, s: 1, v: 1, a: 1 } + + const r = rgba.r / 255 + const g = rgba.g / 255 + const b = rgba.b / 255 + const max = Math.max(r, g, b) + const min = Math.min(r, g, b) + + let h = 0 + + if (max !== min) { + if (max === r) { + h = 60 * (0 + ((g - b) / (max - min))) + } else if (max === g) { + h = 60 * (2 + ((b - r) / (max - min))) + } else if (max === b) { + h = 60 * (4 + ((r - g) / (max - min))) + } + } + + if (h < 0) h = h + 360 + + const s = max === 0 ? 0 : (max - min) / max + const hsv = [h, s, max] + + return { h: hsv[0], s: hsv[1], v: hsv[2], a: rgba.a } +} + +export function HSVAtoHSLA (hsva: HSVA): HSLA { + const { h, s, v, a } = hsva + + const l = v - (v * s / 2) + + const sprime = l === 1 || l === 0 ? 0 : (v - l) / Math.min(l, 1 - l) + + return { h, s: sprime, l, a } +} + +export function HSLAtoHSVA (hsl: HSLA): HSVA { + const { h, s, l, a } = hsl + + const v = l + s * Math.min(l, 1 - l) + + const sprime = v === 0 ? 0 : 2 - (2 * l / v) + + return { h, s: sprime, v, a } +} + +export function RGBAtoCSS (rgba: RGBA): string { + return `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, ${rgba.a})` +} + +export function RGBtoCSS (rgba: RGBA): string { + return RGBAtoCSS({ ...rgba, a: 1 }) +} + +export function RGBAtoHex (rgba: RGBA): Hex { + const toHex = (v: number) => { + const h = Math.round(v).toString(16) + return ('00'.substr(0, 2 - h.length) + h).toUpperCase() + } + + return `#${[ + toHex(rgba.r), + toHex(rgba.g), + toHex(rgba.b), + toHex(Math.round(rgba.a * 255)) + ].join('')}` +} + +export function HexToRGBA (hex: Hex): RGBA { + const rgba = chunk(hex.slice(1), 2).map((c: string) => parseInt(c, 16)) + + return { + r: rgba[0], + g: rgba[1], + b: rgba[2], + a: Math.round((rgba[3] / 255) * 100) / 100 + } +} + +export function HexToHSVA (hex: Hex): HSVA { + const rgb = HexToRGBA(hex) + return RGBAtoHSVA(rgb) +} + +export function HSVAtoHex (hsva: HSVA): Hex { + return RGBAtoHex(HSVAtoRGBA(hsva)) +} + +export function parseHex (hex: string): Hex { + if (hex.startsWith('#')) { + hex = hex.slice(1) + } + + hex = hex.replace(/([^0-9a-f])/gi, 'F') + + if (hex.length === 3) { + hex = hex.split('').map(x => x + x).join('') + } + + if (hex.length === 6) { + hex = padEnd(hex, 8, 'F') + } else { + hex = padEnd(padEnd(hex, 6), 8, 'F') + } + + return `#${hex}`.toUpperCase().substr(0, 9) +} + +export function RGBtoInt (rgba: RGBA): ColorInt { + return (rgba.r << 16) + (rgba.g << 8) + rgba.b +} + +/** + * Returns the contrast ratio (1-21) between two colors. + * + * @param c1 First color + * @param c2 Second color + */ +export function contrastRatio (c1: RGBA, c2: RGBA): number { + const [, y1] = toXYZ(RGBtoInt(c1)) + const [, y2] = toXYZ(RGBtoInt(c2)) + + return (Math.max(y1, y2) + 0.05) / (Math.min(y1, y2) + 0.05) +} diff --git a/packages/vuetify/src/util/helpers.ts b/packages/vuetify/src/util/helpers.ts index f00713b9bdd..ca5f7f99330 100644 --- a/packages/vuetify/src/util/helpers.ts +++ b/packages/vuetify/src/util/helpers.ts @@ -472,3 +472,43 @@ export function getSlot (vm: Vue, name = 'default', data?: object, optional = fa } return undefined } + +export function clamp (value: number, min = 0, max = 1) { + return Math.max(min, Math.min(max, value)) +} + +export function padEnd (str: string, length: number, char = '0') { + return str + char.repeat(Math.max(0, length - str.length)) +} + +export function chunk (str: string, size = 1) { + const chunked = [] + let index = 0 + while (index < str.length) { + chunked.push(str.substr(index, size)) + index += size + } + return chunked +} + +export function throttle (fn: Function, limit: number) { + let timeoutId: any + let lastRan: number + + return function (...args: any[]) { + if (!lastRan) { + // @ts-ignore + fn.apply(this, args) + lastRan = Date.now() + } else { + clearTimeout(timeoutId) + timeoutId = setTimeout(() => { + if (Date.now() - lastRan >= limit) { + // @ts-ignore + fn.apply(this, args) + lastRan = Date.now() + } + }, limit - (Date.now() - lastRan)) + } + } +} diff --git a/packages/vuetify/src/util/theme.ts b/packages/vuetify/src/util/theme.ts index e355d1ad686..49fc75f70c1 100644 --- a/packages/vuetify/src/util/theme.ts +++ b/packages/vuetify/src/util/theme.ts @@ -1,4 +1,4 @@ -import { colorToInt, intToHex, colorToHex, RGB } from './colorUtils' +import { colorToInt, intToHex, colorToHex, ColorInt } from './colorUtils' import * as sRGB from './color/transformSRGB' import * as LAB from './color/transformCIELAB' import { VuetifyParsedTheme, VuetifyThemeVariant } from 'vuetify/types/services/theme' @@ -101,7 +101,7 @@ export function genStyles (theme: VuetifyParsedTheme, cssVar = false): string { return variablesCss + css } -export function genVariations (name: string, value: RGB): Record<string, string> { +export function genVariations (name: string, value: ColorInt): Record<string, string> { const values: Record<string, string> = { base: intToHex(value) } @@ -117,13 +117,13 @@ export function genVariations (name: string, value: RGB): Record<string, string> return values } -function lighten (value: RGB, amount: number): RGB { +function lighten (value: ColorInt, amount: number): ColorInt { const lab = LAB.fromXYZ(sRGB.toXYZ(value)) lab[0] = lab[0] + amount * 10 return sRGB.fromXYZ(LAB.toXYZ(lab)) } -function darken (value: RGB, amount: number): RGB { +function darken (value: ColorInt, amount: number): ColorInt { const lab = LAB.fromXYZ(sRGB.toXYZ(value)) lab[0] = lab[0] - amount * 10 return sRGB.fromXYZ(LAB.toXYZ(lab)) diff --git a/yarn.lock b/yarn.lock index 3f0cb0383ca..a065516689f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4270,6 +4270,11 @@ color-convert@^1.9.0, color-convert@^1.9.1: dependencies: color-name "1.1.3" +color-convert@~0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-0.5.3.tgz#bdb6c69ce660fadffe0b0007cc447e1b9f7282bd" + integrity sha1-vbbGnOZg+t/+CwAHzER+G59ygr0= + [email protected]: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" @@ -4890,6 +4895,11 @@ cssesc@^3.0.0: resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== +cssfontparser@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/cssfontparser/-/cssfontparser-1.2.1.tgz#f4022fc8f9700c68029d542084afbaf425a3f3e3" + integrity sha1-9AIvyPlwDGgCnVQghK+69CWj8+M= + cssnano-preset-default@^4.0.0, cssnano-preset-default@^4.0.7: version "4.0.7" resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-4.0.7.tgz#51ec662ccfca0f88b396dcd9679cdb931be17f76" @@ -7973,6 +7983,14 @@ javascript-stringify@^1.6.0: resolved "https://registry.yarnpkg.com/javascript-stringify/-/javascript-stringify-1.6.0.tgz#142d111f3a6e3dae8f4a9afd77d45855b5a9cce3" integrity sha1-FC0RHzpuPa6PSpr9d9RYVbWpzOM= +jest-canvas-mock@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/jest-canvas-mock/-/jest-canvas-mock-2.0.0.tgz#20a4e79994b937b5047833c5b320cb60a57b52fe" + integrity sha512-IFRh5a4jEhfKlJRb+UgxUM7v8OZ112K8uu2LGpewTIfRz9kU/0Yk51D6ytr8cJ6AVUWdD3SJCcxRdFuh5okVQw== + dependencies: + cssfontparser "^1.2.1" + parse-color "^1.0.0" + jest-changed-files@^24.7.0: version "24.7.0" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-24.7.0.tgz#39d723a11b16ed7b373ac83adc76a69464b0c4fa" @@ -10191,6 +10209,13 @@ parse-asn1@^5.0.0: pbkdf2 "^3.0.3" safe-buffer "^5.1.1" +parse-color@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-color/-/parse-color-1.0.0.tgz#7b748b95a83f03f16a94f535e52d7f3d94658619" + integrity sha1-e3SLlag/A/FqlPU15S1/PZRlhhk= + dependencies: + color-convert "~0.5.0" + parse-github-repo-url@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz#9e7d8bb252a6cb6ba42595060b7bf6df3dbc1f50"
45cae75152287d98f59a89efd419b1290394a1dd
2023-04-21 23:30:30
John Leider
docs(upgrade-guide): add links to skeleton-loader / v-scroll
false
add links to skeleton-loader / v-scroll
docs
diff --git a/packages/docs/src/pages/en/getting-started/upgrade-guide.md b/packages/docs/src/pages/en/getting-started/upgrade-guide.md index 8911603407e..13d897a53e8 100644 --- a/packages/docs/src/pages/en/getting-started/upgrade-guide.md +++ b/packages/docs/src/pages/en/getting-started/upgrade-guide.md @@ -22,7 +22,7 @@ Many of these changes can be applied automatically by [eslint-plugin-vuetify](ht <alert type="warning"> This page is incomplete. Please check back later for more information, or submit a PR if you notice something missing. If you have additional questions, reach out to us in [Discord](https://community.vuetifyjs.com/) - + </alert> <alert type="warning"> @@ -31,13 +31,12 @@ Many of these changes can be applied automatically by [eslint-plugin-vuetify](ht - v-calendar - v-date-picker -- v-data-table -- v-infinite-scroll -- v-skeleton-loader +- [v-data-table](/components/data-tables/basics/) +- [v-skeleton-loader](/components/skeleton-loaders/) - v-stepper - v-time-picker - v-treeview -- v-virtual-scroll +- [v-virtual-scroll](/components/virtual-scroller/) </alert>
94a05d1f1aae54b97a9a9ea27c61d3c28314f953
2024-05-07 12:14:59
Kael
fix(VList): allow group activators to be links
false
allow group activators to be links
fix
diff --git a/packages/vuetify/src/components/VList/VListItem.tsx b/packages/vuetify/src/components/VList/VListItem.tsx index d059c55f130..ec51bda0e14 100644 --- a/packages/vuetify/src/components/VList/VListItem.tsx +++ b/packages/vuetify/src/components/VList/VListItem.tsx @@ -174,10 +174,12 @@ export const VListItem = genericComponent<VListItemSlots>()({ function onClick (e: MouseEvent) { emit('click', e) - if (isGroupActivator || !isClickable.value) return + if (!isClickable.value) return link.navigate?.(e) + if (isGroupActivator) return + if (root.activatable.value) { activate(!isActivated.value, e) } else if (root.selectable.value) {
bb6bfdf63f3db1687f686f6b4b473f2c9c58bbdd
2020-07-09 00:29:40
Sergey Skrynnikov
fix(VDataTable): respect hide-default-header prop on mobile (#11732)
false
respect hide-default-header prop on mobile (#11732)
fix
diff --git a/packages/vuetify/src/components/VDataTable/MobileRow.ts b/packages/vuetify/src/components/VDataTable/MobileRow.ts index 57bb46fab7b..be7e4058be6 100644 --- a/packages/vuetify/src/components/VDataTable/MobileRow.ts +++ b/packages/vuetify/src/components/VDataTable/MobileRow.ts @@ -9,6 +9,7 @@ export default Vue.extend({ props: { headers: Array as PropType<DataTableHeader[]>, + hideDefaultHeader: Boolean, item: Object, rtl: Boolean, }, @@ -42,7 +43,7 @@ export default Vue.extend({ }, children), ] - if (header.value !== 'dataTableSelect') { + if (header.value !== 'dataTableSelect' && !props.hideDefaultHeader) { mobileRowChildren.unshift( h('div', { staticClass: 'v-data-table__mobile-row__header', diff --git a/packages/vuetify/src/components/VDataTable/VDataTable.ts b/packages/vuetify/src/components/VDataTable/VDataTable.ts index 6dd7cb646ed..cd157c18cb2 100644 --- a/packages/vuetify/src/components/VDataTable/VDataTable.ts +++ b/packages/vuetify/src/components/VDataTable/VDataTable.ts @@ -464,6 +464,7 @@ export default mixins( ), props: { headers: this.computedHeaders, + hideDefaultHeader: this.hideDefaultHeader, item, rtl: this.$vuetify.rtl, }, diff --git a/packages/vuetify/src/components/VDataTable/__tests__/MobileRow.spec.ts b/packages/vuetify/src/components/VDataTable/__tests__/MobileRow.spec.ts index 3561b672f62..dd3f4511e41 100644 --- a/packages/vuetify/src/components/VDataTable/__tests__/MobileRow.spec.ts +++ b/packages/vuetify/src/components/VDataTable/__tests__/MobileRow.spec.ts @@ -112,4 +112,27 @@ describe('MobileRow', () => { expect(wrapper.findAll('p.test')).toHaveLength(2) expect(wrapper.html()).toMatchSnapshot() }) + + it('should render without header when hideDefaultHeader: true', () => { + const wrapper = mountFunction({ + context: { + props: { + headers: [ + { text: 'Petrol', value: 'petrol' }, + { text: 'Diesel', value: 'diesel' }, + ], + hideDefaultHeader: true, + item: { + petrol: 0.68, + diesel: 0.65, + }, + }, + }, + }) + + expect(wrapper.findAll('tr')).toHaveLength(1) + expect(wrapper.findAll('td')).toHaveLength(2) + expect(wrapper.findAll('.v-data-table__mobile-row__header')).toHaveLength(0) + expect(wrapper.html()).toMatchSnapshot() + }) }) diff --git a/packages/vuetify/src/components/VDataTable/__tests__/__snapshots__/MobileRow.spec.ts.snap b/packages/vuetify/src/components/VDataTable/__tests__/__snapshots__/MobileRow.spec.ts.snap index 6c83b3db166..23f88cf52b7 100644 --- a/packages/vuetify/src/components/VDataTable/__tests__/__snapshots__/MobileRow.spec.ts.snap +++ b/packages/vuetify/src/components/VDataTable/__tests__/__snapshots__/MobileRow.spec.ts.snap @@ -102,6 +102,21 @@ exports[`MobileRow should render with scoped slots 1`] = ` </tr> `; +exports[`MobileRow should render without header when hideDefaultHeader: true 1`] = ` +<tr class="v-data-table__mobile-table-row"> + <td class="v-data-table__mobile-row"> + <div class="v-data-table__mobile-row__cell"> + 0.68 + </div> + </td> + <td class="v-data-table__mobile-row"> + <div class="v-data-table__mobile-row__cell"> + 0.65 + </div> + </td> +</tr> +`; + exports[`MobileRow should render without slots 1`] = ` <tr class="v-data-table__mobile-table-row"> <td class="v-data-table__mobile-row">
256fa93db584a0c9cfc1137596b65aedf89999a0
2021-12-07 22:50:52
Pavel Lentyaev
fix(VStepperStep): editable step tab navigation (#14036)
false
editable step tab navigation (#14036)
fix
diff --git a/packages/vuetify/src/components/VStepper/VStepperStep.ts b/packages/vuetify/src/components/VStepper/VStepperStep.ts index 2c30ae0f64c..d8b0c85e6cc 100644 --- a/packages/vuetify/src/components/VStepper/VStepperStep.ts +++ b/packages/vuetify/src/components/VStepper/VStepperStep.ts @@ -10,6 +10,7 @@ import ripple from '../../directives/ripple' // Utilities import mixins from '../../util/mixins' +import { keyCodes } from '../../util/helpers' // Types import { VNode } from 'vue' @@ -90,7 +91,7 @@ export default baseMixins.extend<options>().extend({ }, methods: { - click (e: MouseEvent) { + click (e: MouseEvent | KeyboardEvent) { e.stopPropagation() this.$emit('click', e) @@ -131,6 +132,11 @@ export default baseMixins.extend<options>().extend({ return children }, + keyboardClick (e: KeyboardEvent) { + if (e.keyCode === keyCodes.space) { + this.click(e) + } + }, toggle (step: number | string) { this.isActive = step.toString() === this.step.toString() this.isInactive = Number(step) < Number(this.step) @@ -139,13 +145,19 @@ export default baseMixins.extend<options>().extend({ render (h): VNode { return h('div', { + attrs: { + tabindex: this.editable ? 0 : -1, + }, staticClass: 'v-stepper__step', class: this.classes, directives: [{ name: 'ripple', value: this.editable, }], - on: { click: this.click }, + on: { + click: this.click, + keydown: this.keyboardClick, + }, }, [ this.genStep(), this.genLabel(), diff --git a/packages/vuetify/src/components/VStepper/__tests__/__snapshots__/VStepperStep.spec.ts.snap b/packages/vuetify/src/components/VStepper/__tests__/__snapshots__/VStepperStep.spec.ts.snap index 5a899dd7a1a..d9a7e63f6c8 100644 --- a/packages/vuetify/src/components/VStepper/__tests__/__snapshots__/VStepperStep.spec.ts.snap +++ b/packages/vuetify/src/components/VStepper/__tests__/__snapshots__/VStepperStep.spec.ts.snap @@ -1,7 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`VStepperStep.ts should accept a custom color 1`] = ` -<div class="v-stepper__step v-stepper__step--inactive v-stepper__step--complete"> +<div tabindex="-1" + class="v-stepper__step v-stepper__step--inactive v-stepper__step--complete" +> <span class="v-stepper__step__step pink"> <i aria-hidden="true" class="v-icon notranslate mdi mdi-check theme--light" @@ -14,7 +16,9 @@ exports[`VStepperStep.ts should accept a custom color 1`] = ` `; exports[`VStepperStep.ts should accept a custom css color 1`] = ` -<div class="v-stepper__step v-stepper__step--inactive v-stepper__step--complete"> +<div tabindex="-1" + class="v-stepper__step v-stepper__step--inactive v-stepper__step--complete" +> <span class="v-stepper__step__step" style="background-color: rgb(170, 187, 204); border-color: #aabbcc;" > @@ -29,7 +33,9 @@ exports[`VStepperStep.ts should accept a custom css color 1`] = ` `; exports[`VStepperStep.ts should render 1`] = ` -<div class="v-stepper__step v-stepper__step--inactive"> +<div tabindex="-1" + class="v-stepper__step v-stepper__step--inactive" +> <span class="v-stepper__step__step"> 1 </span> @@ -39,7 +45,9 @@ exports[`VStepperStep.ts should render 1`] = ` `; exports[`VStepperStep.ts should render complete step 1`] = ` -<div class="v-stepper__step v-stepper__step--inactive v-stepper__step--complete"> +<div tabindex="-1" + class="v-stepper__step v-stepper__step--inactive v-stepper__step--complete" +> <span class="v-stepper__step__step primary"> <i aria-hidden="true" class="v-icon notranslate mdi mdi-check theme--light" @@ -52,7 +60,9 @@ exports[`VStepperStep.ts should render complete step 1`] = ` `; exports[`VStepperStep.ts should render editable step 1`] = ` -<div class="v-stepper__step v-stepper__step--editable v-stepper__step--inactive v-stepper__step--complete"> +<div tabindex="0" + class="v-stepper__step v-stepper__step--editable v-stepper__step--inactive v-stepper__step--complete" +> <span class="v-stepper__step__step primary"> <i aria-hidden="true" class="v-icon notranslate material-icons theme--light" @@ -66,7 +76,9 @@ exports[`VStepperStep.ts should render editable step 1`] = ` `; exports[`VStepperStep.ts should render step with error 1`] = ` -<div class="v-stepper__step v-stepper__step--inactive v-stepper__step--error error--text"> +<div tabindex="-1" + class="v-stepper__step v-stepper__step--inactive v-stepper__step--error error--text" +> <span class="v-stepper__step__step"> <i aria-hidden="true" class="v-icon notranslate material-icons theme--light"
2543c2a68a98a0ab884b8418b2615ac8fec854bc
2023-07-20 01:56:59
John Leider
docs(AppBar): fix lint
false
fix lint
docs
diff --git a/packages/docs/src/components/app/bar/Bar.vue b/packages/docs/src/components/app/bar/Bar.vue index f6e2f7f7dd6..0c489bf4518 100644 --- a/packages/docs/src/components/app/bar/Bar.vue +++ b/packages/docs/src/components/app/bar/Bar.vue @@ -59,7 +59,6 @@ import AppBarNotificationsMenu from './NotificationsMenu.vue' import AppBarPlaygroundLink from './PlaygroundLink.vue' import AppBarSettingsToggle from './SettingsToggle.vue' - import AppBarSponsorLink from './SponsorLink.vue' import AppBarStoreLink from './StoreLink.vue' import AppBarSupportMenu from './SupportMenu.vue' import AppBarTeamLink from './TeamLink.vue'
196e8a7968e8943ccef63445c2ec33ad10dae89d
2024-09-20 12:23:31
Kael
chore(ci): delay promoting docs deployment
false
delay promoting docs deployment
chore
diff --git a/scripts/deploy-and-alias.js b/scripts/deploy-and-alias.js index 6e2fcebc8c0..a949de7fd44 100644 --- a/scripts/deploy-and-alias.js +++ b/scripts/deploy-and-alias.js @@ -25,4 +25,6 @@ if (child.code !== 0) { } const instanceUrl = child.stdout -shell.exec(`vercel alias set ${instanceUrl} ${alias} --scope=vuetifyjs --token=$NOW_TOKEN`, options) +setTimeout(() => { + shell.exec(`vercel alias set ${instanceUrl} ${alias} --scope=vuetifyjs --token=$NOW_TOKEN`, options) +}, 15_000)
b055cea086b372d30e8b96d4a1204eb2486c03dc
2019-08-11 07:40:18
Cameron Pitt
docs: update SASS variables docs to include a-la-carte req (#8438)
false
update SASS variables docs to include a-la-carte req (#8438)
docs
diff --git a/packages/docs/src/data/pages/customization/SassVariables.json b/packages/docs/src/data/pages/customization/SassVariables.json index 8dc40e50be4..ae470820d29 100755 --- a/packages/docs/src/data/pages/customization/SassVariables.json +++ b/packages/docs/src/data/pages/customization/SassVariables.json @@ -8,7 +8,7 @@ { "type": "alert", "lang": "sassAlert1", - "value": "info" + "value": "warning" }, { "type": "heading", diff --git a/packages/docs/src/lang/en/customization/SassVariables.json b/packages/docs/src/lang/en/customization/SassVariables.json index 6d555047505..b97534fdf7a 100755 --- a/packages/docs/src/lang/en/customization/SassVariables.json +++ b/packages/docs/src/lang/en/customization/SassVariables.json @@ -1,8 +1,8 @@ { "header": "# SASS variables", "headerText": "Starting with version **2.0**, Vuetify is built using **SASS/SCSS**. Using the data option in your `vue.config.js`, we can also pass in custom variables. A list of available variables is located in each components' folder. In order to build the SASS file, you will need to configure your application to support [SASS](https://sass-lang.com/dart-sass) and [Fibers](https://github.com/laverdet/node-fibers).", - "sassAlert1": "SCSS is used for variable files to support maps using indented syntax.", - "sassHeader2": "## Setup vue.config.js", + "sassAlert1": "Note: SCSS/SASS variables are only supported using [A-la-carte installation](/customization/a-la-carte).", + "sassHeader2": "## Setup", "sassText2": "In the command line, run:", "sassText3": "This will setup the dependencies needed to import and parse SASS/SCSS files. Once installed, create a folder called `sass` in your src directory (or appropriate assets directory) with a file named `main.scss`. Keep in mind many of the Vuetify variables are using [SASS Lists](https://sass-lang.com/documentation/file.SASS_REFERENCE.html#lists) and must be updated with [map-merge](https://sass-lang.com/documentation/Sass/Script/Functions.html#map_merge-instance_method) as demonstrated below:", "sassText3a": "Now setup your **vue.config.js** file to load the file through the data option of the sass loader:",
8fe0cbfca1e5e4b66ecd135d87a810022fd0ef09
2024-02-22 02:13:39
Adrian D. Alvarez
fix(VList): set explicit overflow-wrap to break-word (#19234)
false
set explicit overflow-wrap to break-word (#19234)
fix
diff --git a/packages/vuetify/src/components/VList/VListItem.sass b/packages/vuetify/src/components/VList/VListItem.sass index 610ea1b1353..3d4ad61df52 100644 --- a/packages/vuetify/src/components/VList/VListItem.sass +++ b/packages/vuetify/src/components/VList/VListItem.sass @@ -181,6 +181,7 @@ overflow: hidden padding: $list-item-subtitle-padding text-overflow: ellipsis + overflow-wrap: $list-item-subtitle-overflow-wrap word-break: $list-item-subtitle-word-break .v-list-item--one-line & diff --git a/packages/vuetify/src/components/VList/_variables.scss b/packages/vuetify/src/components/VList/_variables.scss index f7979e90517..5848399f42a 100644 --- a/packages/vuetify/src/components/VList/_variables.scss +++ b/packages/vuetify/src/components/VList/_variables.scss @@ -100,7 +100,8 @@ $list-item-subtitle-letter-spacing: tools.map-deep-get(settings.$typography, 'bo $list-item-subtitle-line-height: 1rem !default; $list-item-subtitle-padding: 0 !default; $list-item-subtitle-text-transform: none !default; -$list-item-subtitle-word-break: break-all !default; +$list-item-subtitle-overflow-wrap: break-word !default; +$list-item-subtitle-word-break: initial !default; $list-item-title-font-size: tools.map-deep-get(settings.$typography, 'body-1', 'size') !default; $list-item-title-font-weight: tools.map-deep-get(settings.$typography, 'body-1', 'weight') !default;
124ccb1ad7eaa0d8eab44c69e5d472ccff7665ff
2023-05-24 10:20:07
John Leider
test(headers): resolve linting issue
false
resolve linting issue
test
diff --git a/packages/vuetify/src/labs/VDataTable/composables/headers.ts b/packages/vuetify/src/labs/VDataTable/composables/headers.ts index 496cf131408..62a4046249c 100644 --- a/packages/vuetify/src/labs/VDataTable/composables/headers.ts +++ b/packages/vuetify/src/labs/VDataTable/composables/headers.ts @@ -77,7 +77,7 @@ export function createHeaders ( sortable: column.sortable ?? !!column.key, }) - fixedOffsets[i] += column.width ?? 0 + fixedOffsets[i] += Number(column.width ?? 0) } })
d6539a08a8cca7a554df44c0af46e1aec21c5078
2023-08-31 15:42:21
Kael
docs(api): show description source in dev mode
false
show description source in dev mode
docs
diff --git a/packages/api-generator/src/index.ts b/packages/api-generator/src/index.ts index 9611d811bba..24ef06e37af 100644 --- a/packages/api-generator/src/index.ts +++ b/packages/api-generator/src/index.ts @@ -14,15 +14,8 @@ import rimraf from 'rimraf' import { createWebTypesApi } from './web-types' import inspector from 'inspector' import yargs from 'yargs' -import { execSync } from 'child_process' import { parseSassVariables } from './helpers/sass' -type TranslationData = { - [type in 'props' | 'events' | 'slots' | 'exposed']?: { - [name in string]?: string - } -} - const yar = yargs(process.argv.slice(2)) .option('components', { type: 'array', @@ -33,9 +26,10 @@ const yar = yargs(process.argv.slice(2)) .option('skip-composables', { type: 'boolean', }) - .option('missing-descriptions', { - type: 'boolean', - }) + +const reset = '\x1b[0m' +const red = '\x1b[31m' +const blue = '\x1b[34m' const componentsInfo = { ...importMap.components, @@ -87,70 +81,10 @@ const run = async () => { }).filter(Boolean) ) - // Missing descriptions - if (argv.missingDescriptions) { - const currentBranch = execSync('git branch --show-current', { encoding: 'utf-8' }).trim() - const translations: { [filename in string]?: TranslationData } = {} - - async function readData (filename: string): Promise<TranslationData> { - if (!(filename in translations)) { - try { - const data = JSON.parse(await fs.readFile(filename, 'utf-8')) - - for (const type of ['props', 'events', 'slots', 'exposed']) { - for (const item in data[type] ?? {}) { - if (data[type][item].startsWith('MISSING DESCRIPTION')) { - delete data[type][item] - } - } - } - - translations[filename] = data - } catch (e) { - translations[filename] = {} - } - } - - return translations[filename] - } - - for (const component of componentData) { - for (const type of ['props', 'events', 'slots', 'exposed']) { - for (const name in component[type]) { - if (type === 'props' && !component[type][name].source) { - console.warn(`Missing source for ${component.displayName} ${type}: ${name}`) - } - - const filename = type === 'props' - ? component[type][name].source ?? component.displayName - : component.displayName - - for (const locale of locales) { - const sourceData = await readData(`./src/locale/${locale}/${filename}.json`) - const githubUrl = `https://github.com/vuetifyjs/vuetify/tree/${currentBranch}/packages/api-generator/src/locale/${locale}/${filename}.json` - - sourceData[type] ??= {} - sourceData[type][name] ??= `MISSING DESCRIPTION ([edit in github](${githubUrl}))` - } - } - } - } - - for (const filename in translations) { - try { - await fs.writeFile(filename, JSON.stringify(translations[filename], null, 2) + '\n') - } catch (e: unknown) { - console.error(filename, e) - } - } - - process.exit() - } - // Composables if (!argv.skipComposables) { const composables = await Promise.all(generateComposableDataFromTypes().map(async composable => { - console.log(composable.name) + console.log(blue, composable.name, reset) const kebabName = kebabCase(composable.name) await addDescriptions(composable.name, composable.data, locales) return { fileName: kebabName, displayName: composable.name, ...composable } @@ -166,7 +100,7 @@ const run = async () => { if (!argv.skipDirectives) { directives = await Promise.all(generateDirectiveDataFromTypes().map(async directive => { const name = `v-${kebabCase(directive.name)}` - console.log(name) + console.log(blue, name, reset) await addDirectiveDescriptions(name, directive, locales) return { fileName: name, displayName: name, ...directive } diff --git a/packages/api-generator/src/types.ts b/packages/api-generator/src/types.ts index 1116f957c38..37e726b9d79 100644 --- a/packages/api-generator/src/types.ts +++ b/packages/api-generator/src/types.ts @@ -91,7 +91,7 @@ export async function generateComponentDataFromTypes (component: string) { for (const [name, { formatted }] of Object.entries(props.properties)) { if (formatted.length > 400) { - console.log(`Long prop type (${formatted.length}): ${component}.${name}`) + console.log(`\x1b[33mLong prop type (${formatted.length}): ${component}.${name}\x1b[0m`) } } @@ -108,6 +108,7 @@ type BaseDefinition = { formatted: string source?: string description?: Record<string, string> + descriptionSource?: Record<string, string> default?: string optional?: boolean } @@ -302,6 +303,7 @@ function formatDefinition (definition: Definition) { break case 'object': formatted = `{ ${Object.entries(definition.properties).reduce<string[]>((arr, [name, prop]) => { + if (name.includes(':') || name.includes('-')) name = `'${name}'` arr.push(`${name}: ${prop.formatted}`) return arr }, []).join('; ')} }` diff --git a/packages/api-generator/src/utils.ts b/packages/api-generator/src/utils.ts index 3f662d629d6..af3d2bfa493 100644 --- a/packages/api-generator/src/utils.ts +++ b/packages/api-generator/src/utils.ts @@ -1,3 +1,4 @@ +import { execSync } from 'child_process' import stringifyObject from 'stringify-object' import prettier from 'prettier' import typescriptParser from 'prettier/esm/parser-typescript.mjs' @@ -111,28 +112,36 @@ async function loadLocale (componentName: string, locale: string): Promise<Recor return data.default } catch (err) { if (err.code === 'ERR_MODULE_NOT_FOUND') { - console.error(`Missing locale for ${cacheKey}`) + console.error(`\x1b[35mMissing locale for ${cacheKey}\x1b[0m`) localeCache.set(cacheKey, {}) } else { - console.error(err.message) + console.error('\x1b[31m', err.message, '\x1b[0m') } return {} } } +const currentBranch = execSync('git branch --show-current', { encoding: 'utf-8' }).trim() + async function getSources (name: string, locale: string, sources: string[]) { const arr = await Promise.all([ loadLocale(name, locale), ...sources.map(source => loadLocale(source, locale)), loadLocale('generic', locale), ]) + const sourcesMap = [name, ...sources, 'generic'] return { - find: (section: string, key?: string) => { - return arr.reduce((str, source) => { - if (str) return str - return key ? source?.[section]?.[key] : source?.[section] - }, null) ?? 'MISSING DESCRIPTION' + find: (section: string, key: string, ogSource = name) => { + for (let i = 0; i < arr.length; i++) { + const source = arr[i] + const found: string | undefined = source?.[section]?.[key] + if (found) { + return { text: found, source: sourcesMap[i] } + } + } + const githubUrl = `https://github.com/vuetifyjs/vuetify/tree/${currentBranch}/packages/api-generator/src/locale/${locale}/${ogSource}.json` + return { text: `MISSING DESCRIPTION ([edit in github](${githubUrl}))`, source: name } }, } } @@ -143,9 +152,12 @@ export async function addDescriptions (name: string, componentData: ComponentDat for (const section of ['props', 'slots', 'events', 'exposed'] as const) { for (const [propName, propObj] of Object.entries(componentData[section] ?? {})) { - (propObj as any).description = (propObj as any).description ?? {} + propObj.description = propObj.description ?? {} + propObj.descriptionSource = propObj.descriptionSource ?? {} - ;(propObj as any).description[locale] = descriptions.find(section, propName) + const found = descriptions.find(section, propName, propObj.source) + propObj.description![locale] = found.text + propObj.descriptionSource![locale] = found.source } } } @@ -164,7 +176,7 @@ export async function addDirectiveDescriptions ( for (const [name, arg] of Object.entries(componentData.argument)) { arg.description = arg.description ?? {} - arg.description[locale] = descriptions.find('argument', name) + arg.description[locale] = descriptions.find('argument', name)?.text } } @@ -172,7 +184,7 @@ export async function addDirectiveDescriptions ( for (const [name, modifier] of Object.entries(componentData.modifiers)) { modifier.description = modifier.description ?? {} - modifier.description[locale] = descriptions.find('modifiers', name) + modifier.description[locale] = descriptions.find('modifiers', name)?.text } } } @@ -216,7 +228,7 @@ export function prettifyType (name: string, item: Definition) { trailingComma: 'all', }) } catch (err) { - console.error(`${name}:`, err.message) + console.error('\x1b[31m', `${name}:`, err.message, '\x1b[0m') return item } diff --git a/packages/api-generator/src/worker.ts b/packages/api-generator/src/worker.ts index 041bd082b9f..fb93b63dc87 100644 --- a/packages/api-generator/src/worker.ts +++ b/packages/api-generator/src/worker.ts @@ -1,12 +1,16 @@ import { generateComponentDataFromTypes } from './types' +const reset = '\x1b[0m' +const red = '\x1b[31m' +const blue = '\x1b[34m' + export default async (componentName: string) => { - console.log(componentName) + console.log(blue, componentName, reset) try { return await generateComponentDataFromTypes(componentName) } catch (err) { - console.error(`${componentName}: ${err}`, err.stack) + console.error(red, `${componentName}: ${err}`, err.stack, reset) return null } } diff --git a/packages/docs/src/components/api/ApiTable.vue b/packages/docs/src/components/api/ApiTable.vue index 241273e26ee..a9795744242 100644 --- a/packages/docs/src/components/api/ApiTable.vue +++ b/packages/docs/src/components/api/ApiTable.vue @@ -41,6 +41,10 @@ <p v-if="user.dev && item.source"> <strong>source: {{ item.source }}</strong> + <template v-if="user.dev && item.descriptionSource && item.source !== item.descriptionSource"> + <br> + <strong>description source: {{ item.descriptionSource }}</strong> + </template> </p> </td> </tr> diff --git a/packages/docs/src/components/api/Section.vue b/packages/docs/src/components/api/Section.vue index 1fadad149e6..d0ead41ddae 100644 --- a/packages/docs/src/components/api/Section.vue +++ b/packages/docs/src/components/api/Section.vue @@ -73,6 +73,7 @@ ...prop, name, description: prop.description?.[store.locale], + descriptionSource: prop.descriptionSource?.[store.locale], }) return arr }, []).sort((a: any, b: any) => a.name.localeCompare(b.name)) diff --git a/packages/docs/src/components/api/utils.ts b/packages/docs/src/components/api/utils.ts index bce46bdb680..7383eb441fc 100644 --- a/packages/docs/src/components/api/utils.ts +++ b/packages/docs/src/components/api/utils.ts @@ -8,6 +8,7 @@ export type Item = { returnType?: Item default: any description: Record<string, string> + descriptionSource?: Record<string, string> snippet: string value: any example: string
8f0322d095f277074678f4b454bdc83203d592bc
2024-05-07 13:19:51
Kael
fix(VResponsive): contentClass accepts array and object
false
contentClass accepts array and object
fix
diff --git a/packages/vuetify/src/components/VResponsive/VResponsive.tsx b/packages/vuetify/src/components/VResponsive/VResponsive.tsx index 25edf092a90..f23f011e8a9 100644 --- a/packages/vuetify/src/components/VResponsive/VResponsive.tsx +++ b/packages/vuetify/src/components/VResponsive/VResponsive.tsx @@ -28,7 +28,7 @@ export function useAspectStyles (props: { aspectRatio?: string | number }) { export const makeVResponsiveProps = propsFactory({ aspectRatio: [String, Number], - contentClass: String, + contentClass: null, inline: Boolean, ...makeComponentProps(), diff --git a/packages/vuetify/src/composables/component.ts b/packages/vuetify/src/composables/component.ts index e1d961c0ef4..c5d426d3882 100644 --- a/packages/vuetify/src/composables/component.ts +++ b/packages/vuetify/src/composables/component.ts @@ -7,13 +7,13 @@ import type { PropType, StyleValue } from 'vue' export type ClassValue = any export interface ComponentProps { - class?: ClassValue + class: ClassValue style: StyleValue | undefined } // Composables export const makeComponentProps = propsFactory({ - class: [String, Array] as PropType<ClassValue>, + class: [String, Array, Object] as PropType<ClassValue>, style: { type: [String, Array, Object] as PropType<StyleValue>, default: null,
0341b354a78b66bb8fa350109d5d7509456aab21
2020-06-29 23:04:58
MajesticPotatoe
docs(Promoted): fix current undefined error
false
fix current undefined error
docs
diff --git a/packages/docs-next/src/components/ad/Promoted.vue b/packages/docs-next/src/components/ad/Promoted.vue index 268e9874395..0a76a4466be 100644 --- a/packages/docs-next/src/components/ad/Promoted.vue +++ b/packages/docs-next/src/components/ad/Promoted.vue @@ -2,6 +2,7 @@ <div class="mb-8"> <a v-bind="adAttrs"> <app-ad + v-if="current" v-bind="$attrs" class="v-vuetify-ad--promoted" compact
3140f724e2befc62025dc80be73eedc3c7c28a65
2019-09-01 01:33:10
Jacek Karczmarczyk
docs(VBtn): added x-small/x-large to sizing example
false
added x-small/x-large to sizing example
docs
diff --git a/packages/docs/src/examples/buttons/simple/sizing.vue b/packages/docs/src/examples/buttons/simple/sizing.vue index 15f75e5a7b6..eaca9176b87 100644 --- a/packages/docs/src/examples/buttons/simple/sizing.vue +++ b/packages/docs/src/examples/buttons/simple/sizing.vue @@ -3,6 +3,9 @@ <v-row align="center"> <v-col cols="12" sm="6"> <div class="text-center"> + <div class="my-2"> + <v-btn x-small color="secondary" dark>Extra small Button</v-btn> + </div> <div class="my-2"> <v-btn small color="primary" dark>Small Button</v-btn> </div> @@ -12,10 +15,18 @@ <div class="my-2"> <v-btn color="error" dark large>Large Button</v-btn> </div> + <div class="my-2"> + <v-btn x-large color="success" dark>Extra large Button</v-btn> + </div> </div> </v-col> <v-col cols="12" sm="6"> <div class="text-center"> + <div class="my-2"> + <v-btn color="secondary" fab x-small dark> + <v-icon>mdi-television</v-icon> + </v-btn> + </div> <div class="my-2"> <v-btn color="primary" fab small dark> <v-icon>mdi-pencil</v-icon> @@ -31,6 +42,11 @@ <v-icon>mdi-alarm</v-icon> </v-btn> </div> + <div class="my-2"> + <v-btn color="success" fab x-large dark> + <v-icon>mdi-domain</v-icon> + </v-btn> + </div> </div> </v-col> </v-row>
791a8f9f04a3275fa6b94812669257cc5b804490
2023-08-01 23:58:24
John Leider
feat(VOtpInput): port to v3 (#17880)
false
port to v3 (#17880)
feat
diff --git a/packages/docs/src/data/301.json b/packages/docs/src/data/301.json index a52e8501ef3..747b9c6c6ab 100644 --- a/packages/docs/src/data/301.json +++ b/packages/docs/src/data/301.json @@ -122,7 +122,6 @@ "components/time-pickers": "/introduction/roadmap", "components/treeview": "/introduction/roadmap", "components/calendars": "/introduction/roadmap", - "components/otp-input": "/introduction/roadmap", "components/overflow-btns": "/introduction/roadmap", "components/sparklines": "/introduction/roadmap", "components/server-side-data-tables": "/labs/introduction", diff --git a/packages/docs/src/data/nav.json b/packages/docs/src/data/nav.json index a72c2e9ead0..c90879399b5 100644 --- a/packages/docs/src/data/nav.json +++ b/packages/docs/src/data/nav.json @@ -225,6 +225,10 @@ "title": "infinite-scroller", "subfolder": "components" }, + { + "title": "otp-input", + "subfolder": "components" + }, { "title": "skeleton-loaders", "subfolder": "components" diff --git a/packages/docs/src/examples/v-otp-input/misc-loading.vue b/packages/docs/src/examples/v-otp-input/misc-loading.vue index ae467fba210..e2068c7dd86 100644 --- a/packages/docs/src/examples/v-otp-input/misc-loading.vue +++ b/packages/docs/src/examples/v-otp-input/misc-loading.vue @@ -1,22 +1,16 @@ <template> <div> - <div class="ma-auto position-relative" style="max-width: 300px"> - <v-otp-input - v-model="otp" - :disabled="loading" - @finish="onFinish" - ></v-otp-input> - <v-overlay absolute :model-value="loading"> - <v-progress-circular - indeterminate - color="primary" - ></v-progress-circular> - </v-overlay> - </div> + <v-otp-input + v-model="otp" + :loading="loading" + @finish="onFinish" + ></v-otp-input> + <div> Expected value: <span class="font-weight-bold">{{ expectedOtp }}</span> </div> - <div class="text--caption">Type or copy/paste.</div> + + <div class="text-caption">Type or copy/paste.</div> <v-snackbar v-model="snackbar" @@ -39,6 +33,7 @@ const expectedOtp = ref('133707') function onFinish (rsp) { loading.value = true + setTimeout(() => { loading.value = false snackbarColor.value = (rsp === expectedOtp.value) ? 'success' : 'warning' @@ -58,22 +53,18 @@ text: '', expectedOtp: '133707', }), + methods: { onFinish (rsp) { this.loading = true + setTimeout(() => { this.loading = false this.snackbarColor = (rsp === this.expectedOtp) ? 'success' : 'warning' this.text = `Processed OTP with "${rsp}" (${this.snackbarColor})` this.snackbar = true - }, 3500) + }, 1500) }, }, } </script> - -<style scoped> - .position-relative { - position: relative; - } -</style> diff --git a/packages/docs/src/examples/v-otp-input/prop-dark.vue b/packages/docs/src/examples/v-otp-input/prop-dark.vue index 9afbb2f2c2e..441765d7104 100644 --- a/packages/docs/src/examples/v-otp-input/prop-dark.vue +++ b/packages/docs/src/examples/v-otp-input/prop-dark.vue @@ -6,7 +6,7 @@ <v-otp-input v-model="otp" :length="length" - dark + theme="dark" ></v-otp-input> </div> </v-col> diff --git a/packages/docs/src/examples/v-otp-input/prop-type.vue b/packages/docs/src/examples/v-otp-input/prop-type.vue index b01c06ad2ba..aa3d7bda4d6 100644 --- a/packages/docs/src/examples/v-otp-input/prop-type.vue +++ b/packages/docs/src/examples/v-otp-input/prop-type.vue @@ -1,12 +1,10 @@ <template> - <div class="ma-auto" style="max-width: 260px"> - <v-otp-input - v-model="otp" - type="password" - length="5" - dark - ></v-otp-input> - </div> + <v-otp-input + v-model="otp" + type="password" + length="5" + variant="solo-inverted" + ></v-otp-input> </template> <script setup> diff --git a/packages/docs/src/examples/v-otp-input/usage.vue b/packages/docs/src/examples/v-otp-input/usage.vue index ede3454ddfb..0845dab274e 100644 --- a/packages/docs/src/examples/v-otp-input/usage.vue +++ b/packages/docs/src/examples/v-otp-input/usage.vue @@ -1,53 +1,54 @@ <template> - <v-container class="fill-height"> - <v-row - align="center" - justify="center" - > - <div class="text-center"> - <div class="ma-auto" style="max-width: 320px"> - <v-otp-input - v-model="otp" - v-bind="$attrs" - @finish="onOtpFinished" - ></v-otp-input> - </div> - </div> - </v-row> - </v-container> + <usage-example + v-model="model" + :code="code" + :name="name" + :options="options" + > + <div class="text-center"> + <v-otp-input v-bind="props"></v-otp-input> + </div> + + <template v-slot:configuration> + <v-text-field v-model="placeholder" label="Placeholder" maxlength="1" clearable></v-text-field> + <v-checkbox v-model="focus" label="Focus all"></v-checkbox> + <v-checkbox v-model="disabled" label="Disabled"></v-checkbox> + <v-checkbox v-model="loading" label="Loading"></v-checkbox> + <v-slider v-model="length" min="4" max="8" step="1" label="Length"></v-slider> + </template> + </usage-example> </template> -<script> - export default { - name: 'Usage', - inheritAttrs: false, - props: { - maxWidth: { - type: Number, - default: 300, - }, - }, - data: () => ({ - defaults: { - disabled: false, - length: 6, - plain: false, - }, - otp: '', - options: { - booleans: ['disabled', 'dark', 'plain'], - selects: { - type: ['text', 'password', 'number'], - }, - sliders: { length: [2, 8, 2] }, - }, - tabs: ['default'], - }), - methods: { - onOtpFinished (rsp) { - // OTP ready to process. - console.log('Completed input with', rsp) - }, - }, - } +<script setup> + // Utilities + import { computed, ref } from 'vue' + import { propsToString } from '@/util/helpers' + + const name = 'v-stepper' + const model = ref('default') + const options = ['solo', 'solo-filled', 'underlined'] + const focus = ref(false) + const length = ref(6) + const placeholder = ref('') + const disabled = ref(false) + const loading = ref(false) + + const props = computed(() => { + return { + disabled: disabled.value || undefined, + 'focus-all': focus.value || undefined, + length: length.value === 6 ? undefined : length.value, + loading: loading.value || undefined, + placeholder: placeholder.value || undefined, + variant: model.value !== 'default' ? model.value : undefined, + } + }) + + const slots = computed(() => { + return `` + }) + + const code = computed(() => { + return `<v-otp-input${propsToString(props.value)}>${slots.value}</v-stepper>` + }) </script> diff --git a/packages/docs/src/pages/en/components/otp-input.md b/packages/docs/src/pages/en/components/otp-input.md index e17d36d9f92..15480056165 100644 --- a/packages/docs/src/pages/en/components/otp-input.md +++ b/packages/docs/src/pages/en/components/otp-input.md @@ -1,7 +1,7 @@ --- -disabled: true +emphasized: true meta: - title: OTP Input component + title: OTP Input description: The OTP input component is used for MFA authentication via input field. keywords: OTP, MFA, vuetify OTP input component, vue OTP component related: @@ -14,7 +14,9 @@ related: The OTP input is used for MFA procedure of authenticating users by a one-time password. -<entry /> +<!-- ![Pending graphic](https://cdn.vuetifyjs.com/docs/images/graphics/img-placeholder.png){ height=300 } --> + +---- ## Usage @@ -22,11 +24,17 @@ Here we display a list of settings that could be applied within an application. <usage name="v-otp-input" /> +<entry /> + ## API -- [v-otp-input](/api/v-otp-input) +| Component | Description | +| - | - | +| [v-otp-input](/api/v-otp-input/) | Primary Component | + +<api-inline hide-links /> -## Examples +## Guide ### Props diff --git a/packages/vuetify/src/labs/VOtpInput/VOtpInput.sass b/packages/vuetify/src/labs/VOtpInput/VOtpInput.sass new file mode 100644 index 00000000000..0cabc7e1f21 --- /dev/null +++ b/packages/vuetify/src/labs/VOtpInput/VOtpInput.sass @@ -0,0 +1,55 @@ +// Imports +@use '../../styles/settings' +@use '../../styles/tools' +@use './variables' as * + +.v-otp-input + @include tools.rounded(4px) + + align-items: center + display: flex + justify-content: center + padding: .5rem + position: relative + + .v-field + height: 100% + margin: 0 .25rem + +.v-otp-input__divider + margin: 0 8px + +.v-otp-input__content + align-items: center + display: flex + height: 64px + padding: .5rem + justify-content: center + max-width: 320px + position: relative + border-radius: inherit + + .v-otp-input--divided & + max-width: 360px + +.v-otp-input__field + font-size: 1.25rem + height: 100% + outline: none + text-align: center + width: 100% + + &[type=number]::-webkit-outer-spin-button, + &[type=number]::-webkit-inner-spin-button + -webkit-appearance: none + margin: 0 + + &[type=number] + -moz-appearance: textfield + +.v-otp-input__loader + align-items: center + display: flex + height: 100% + justify-content: center + width: 100% diff --git a/packages/vuetify/src/labs/VOtpInput/VOtpInput.tsx b/packages/vuetify/src/labs/VOtpInput/VOtpInput.tsx new file mode 100644 index 00000000000..2f2aca83d6e --- /dev/null +++ b/packages/vuetify/src/labs/VOtpInput/VOtpInput.tsx @@ -0,0 +1,290 @@ +// Styles +import './VOtpInput.sass' + +// Components +import { makeVFieldProps, VField } from '@/components/VField/VField' +import { VOverlay } from '@/components/VOverlay/VOverlay' +import { VProgressCircular } from '@/components/VProgressCircular/VProgressCircular' + +// Composables +import { provideDefaults } from '@/composables/defaults' +import { makeDimensionProps, useDimension } from '@/composables/dimensions' +import { makeFocusProps, useFocus } from '@/composables/focus' +import { useLocale } from '@/composables/locale' +import { useProxiedModel } from '@/composables/proxiedModel' + +// Utilities +import { computed, ref, watch } from 'vue' +import { focusChild, genericComponent, IN_BROWSER, only, propsFactory, useRender } from '@/util' + +// Types +import type { PropType } from 'vue' + +// Types +export type VOtpInputSlots = { + default: never + loader: never +} + +export const makeVOtpInputProps = propsFactory({ + autofocus: Boolean, + divider: String, + focusAll: Boolean, + label: { + type: String, + default: '$vuetify.input.otp', + }, + length: { + type: [Number, String], + default: 6, + }, + modelValue: { + type: [Number, String], + default: undefined, + }, + placeholder: String, + type: { + type: String as PropType<'text' | 'password' | 'number'>, + default: 'text', + }, + + ...makeDimensionProps(), + ...makeFocusProps(), + ...only(makeVFieldProps({ + variant: 'outlined' as const, + }), [ + 'baseColor', + 'bgColor', + 'class', + 'color', + 'disabled', + 'error', + 'loading', + 'rounded', + 'style', + 'theme', + 'variant', + ]), +}, 'VOtpInput') + +export const VOtpInput = genericComponent<VOtpInputSlots>()({ + name: 'VOtpInput', + + props: makeVOtpInputProps(), + + emits: { + finish: (val: string) => true, + 'update:focused': (val: boolean) => true, + 'update:modelValue': (val: string) => true, + }, + + setup (props, { emit, slots }) { + const { dimensionStyles } = useDimension(props) + const { isFocused, focus, blur } = useFocus(props) + const model = useProxiedModel( + props, + 'modelValue', + '', + val => String(val).split(''), + val => val.join('') + ) + const { t } = useLocale() + + const fields = computed(() => Array(Number(props.length)).fill(0)) + const focusIndex = ref(-1) + const contentRef = ref<HTMLElement>() + const inputRef = ref<HTMLInputElement[]>([]) + const current = computed(() => inputRef.value[focusIndex.value]) + + function onInput () { + const array = model.value.slice() + const value = current.value.value + + array[focusIndex.value] = value + + model.value = array + } + + function onKeydown (e: KeyboardEvent) { + const array = model.value.slice() + const index = focusIndex.value + let target: 'next' | 'prev' | 'first' | 'last' | number | null = null + + if (e.key === 'ArrowLeft') { + target = 'prev' + } else if (e.key === 'ArrowRight') { + target = 'next' + } else if (e.key === 'Backspace') { + if (focusIndex.value > 0) { + target = 'prev' + } + } else if (e.key === 'Delete') { + array[focusIndex.value] = '' + + model.value = array + + requestAnimationFrame(() => { + inputRef.value[index].select() + }) + } else if (props.type === 'number' && isNaN(parseInt(e.key))) { + return + } else if (focusIndex.value > model.value.length) { + target = model.value.length + 1 + } else if (focusIndex.value + 1 !== Number(props.length)) { + target = 'next' + } else { + requestAnimationFrame(() => current.value?.blur()) + + return + } + + requestAnimationFrame(() => { + if (target != null) { + focusChild(contentRef.value!, target) + } + }) + } + + function onPaste (index: number, e: ClipboardEvent) { + e.preventDefault() + e.stopPropagation() + + model.value = (e?.clipboardData?.getData('Text') ?? '').split('') + + inputRef.value?.[index].blur() + } + + function reset () { + model.value = [] + } + + function onFocus (e: FocusEvent, index: number) { + focus() + + focusIndex.value = index + } + + function onBlur () { + blur() + + focusIndex.value = -1 + } + + provideDefaults({ + VField: { + disabled: computed(() => props.disabled), + error: computed(() => props.error), + variant: computed(() => props.variant), + }, + }, { scoped: true }) + + watch(model, val => { + if (val.length === props.length) emit('finish', val.join('')) + }, { deep: true }) + + watch(focusIndex, val => { + if (val < 0) return + + IN_BROWSER && window.requestAnimationFrame(() => { + inputRef.value[val].select() + }) + }) + + useRender(() => { + return ( + <div + class={[ + 'v-otp-input', + { + 'v-otp-input--divided': !!props.divider, + }, + props.class, + ]} + style={[ + props.style, + ]} + > + <div + ref={ contentRef } + class="v-otp-input__content" + style={[ + dimensionStyles.value, + ]} + > + { fields.value.map((_, i) => ( + <> + { props.divider && i !== 0 && ( + <span class="v-otp-input__divider">{ props.divider }</span> + )} + + <VField + focused={ (isFocused.value && props.focusAll) || focusIndex.value === i } + key={ i } + > + {{ + ...slots, + default: () => { + return ( + <input + ref={ val => inputRef.value[i] = val as HTMLInputElement } + aria-label={ t(props.label, i + 1) } + autofocus={ i === 0 && props.autofocus } + autocomplete="one-time-code" + class={[ + 'v-otp-input__field', + ]} + inputmode="text" + min={ props.type === 'number' ? 0 : undefined } + maxlength="1" + placeholder={ props.placeholder } + type={ props.type } + value={ model.value[i] } + onInput={ onInput } + onFocus={ e => onFocus(e, i) } + onBlur={ onBlur } + onKeydown={ onKeydown } + onPaste={ event => onPaste(i, event) } + /> + ) + }, + }} + </VField> + </> + ))} + + <VOverlay + contained + content-class="v-otp-input__loader" + model-value={ !!props.loading } + persistent + > + { slots.loader?.() ?? ( + <VProgressCircular + color={ typeof props.loading === 'boolean' ? undefined : props.loading } + indeterminate + size="24" + width="2" + /> + )} + </VOverlay> + + { slots.default?.() } + </div> + </div> + ) + }) + + return { + blur: () => { + inputRef.value?.some(input => input.blur()) + }, + focus: () => { + inputRef.value?.[0].focus() + }, + reset, + isFocused, + } + }, +}) + +export type VOtpInput = InstanceType<typeof VOtpInput> diff --git a/packages/vuetify/src/labs/VOtpInput/_variables.scss b/packages/vuetify/src/labs/VOtpInput/_variables.scss new file mode 100644 index 00000000000..b9e6745a90e --- /dev/null +++ b/packages/vuetify/src/labs/VOtpInput/_variables.scss @@ -0,0 +1,2 @@ +@use '../../styles/settings'; +@use '../../styles/tools'; diff --git a/packages/vuetify/src/labs/VOtpInput/index.ts b/packages/vuetify/src/labs/VOtpInput/index.ts new file mode 100644 index 00000000000..dc63c58f1ab --- /dev/null +++ b/packages/vuetify/src/labs/VOtpInput/index.ts @@ -0,0 +1 @@ +export { VOtpInput } from './VOtpInput' diff --git a/packages/vuetify/src/labs/components.ts b/packages/vuetify/src/labs/components.ts index 95c98a8a33a..6f895883068 100644 --- a/packages/vuetify/src/labs/components.ts +++ b/packages/vuetify/src/labs/components.ts @@ -3,6 +3,7 @@ export * from './VDataIterator' export * from './VDataTable' export * from './VDatePicker' export * from './VInfiniteScroll' +export * from './VOtpInput' export * from './VPicker' export * from './VSkeletonLoader' export * from './VStepper' diff --git a/packages/vuetify/src/locale/af.ts b/packages/vuetify/src/locale/af.ts index 2ba10fea3c0..b3a07fabe25 100644 --- a/packages/vuetify/src/locale/af.ts +++ b/packages/vuetify/src/locale/af.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} files', diff --git a/packages/vuetify/src/locale/ar.ts b/packages/vuetify/src/locale/ar.ts index 8766b511b64..0dd903c9cd5 100644 --- a/packages/vuetify/src/locale/ar.ts +++ b/packages/vuetify/src/locale/ar.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} ملفات', diff --git a/packages/vuetify/src/locale/az.ts b/packages/vuetify/src/locale/az.ts index 704b3f99f99..19eac767ec5 100644 --- a/packages/vuetify/src/locale/az.ts +++ b/packages/vuetify/src/locale/az.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} fayl', diff --git a/packages/vuetify/src/locale/bg.ts b/packages/vuetify/src/locale/bg.ts index 72970681ca8..abe92bab12d 100644 --- a/packages/vuetify/src/locale/bg.ts +++ b/packages/vuetify/src/locale/bg.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} файла', diff --git a/packages/vuetify/src/locale/ca.ts b/packages/vuetify/src/locale/ca.ts index 66199503c43..d499a619c84 100644 --- a/packages/vuetify/src/locale/ca.ts +++ b/packages/vuetify/src/locale/ca.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} fitxers', diff --git a/packages/vuetify/src/locale/ckb.ts b/packages/vuetify/src/locale/ckb.ts index 59395bca594..da82420416a 100644 --- a/packages/vuetify/src/locale/ckb.ts +++ b/packages/vuetify/src/locale/ckb.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} فایل', diff --git a/packages/vuetify/src/locale/cs.ts b/packages/vuetify/src/locale/cs.ts index f47161260a6..aa13f441c6e 100644 --- a/packages/vuetify/src/locale/cs.ts +++ b/packages/vuetify/src/locale/cs.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} souborů', diff --git a/packages/vuetify/src/locale/da.ts b/packages/vuetify/src/locale/da.ts index f8931ab8129..d294a0aa262 100644 --- a/packages/vuetify/src/locale/da.ts +++ b/packages/vuetify/src/locale/da.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} filer', diff --git a/packages/vuetify/src/locale/de.ts b/packages/vuetify/src/locale/de.ts index d88e61d79e6..a9d07f7d89b 100644 --- a/packages/vuetify/src/locale/de.ts +++ b/packages/vuetify/src/locale/de.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} Dateien', diff --git a/packages/vuetify/src/locale/el.ts b/packages/vuetify/src/locale/el.ts index 678cd70a167..885a0a7055a 100755 --- a/packages/vuetify/src/locale/el.ts +++ b/packages/vuetify/src/locale/el.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} files', diff --git a/packages/vuetify/src/locale/en.ts b/packages/vuetify/src/locale/en.ts index 5e37366bb85..de0b077e723 100644 --- a/packages/vuetify/src/locale/en.ts +++ b/packages/vuetify/src/locale/en.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} files', diff --git a/packages/vuetify/src/locale/es.ts b/packages/vuetify/src/locale/es.ts index 9ec4b6b4005..759b38ae97c 100644 --- a/packages/vuetify/src/locale/es.ts +++ b/packages/vuetify/src/locale/es.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} archivos', diff --git a/packages/vuetify/src/locale/et.ts b/packages/vuetify/src/locale/et.ts index e2071591652..5b0dfc51d75 100644 --- a/packages/vuetify/src/locale/et.ts +++ b/packages/vuetify/src/locale/et.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} faili', diff --git a/packages/vuetify/src/locale/fa.ts b/packages/vuetify/src/locale/fa.ts index 2a138479908..06f6e06e48c 100644 --- a/packages/vuetify/src/locale/fa.ts +++ b/packages/vuetify/src/locale/fa.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} پرونده', diff --git a/packages/vuetify/src/locale/fi.ts b/packages/vuetify/src/locale/fi.ts index db295cce9ba..54d25ac0e2c 100644 --- a/packages/vuetify/src/locale/fi.ts +++ b/packages/vuetify/src/locale/fi.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} tiedostoa', diff --git a/packages/vuetify/src/locale/fr.ts b/packages/vuetify/src/locale/fr.ts index 731f918185a..fe977cd49c2 100644 --- a/packages/vuetify/src/locale/fr.ts +++ b/packages/vuetify/src/locale/fr.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} fichier(s)', diff --git a/packages/vuetify/src/locale/he.ts b/packages/vuetify/src/locale/he.ts index 053ca9a939b..a2be8feaa23 100644 --- a/packages/vuetify/src/locale/he.ts +++ b/packages/vuetify/src/locale/he.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} קבצים', diff --git a/packages/vuetify/src/locale/hr.ts b/packages/vuetify/src/locale/hr.ts index a477415d5c4..da968673e63 100644 --- a/packages/vuetify/src/locale/hr.ts +++ b/packages/vuetify/src/locale/hr.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: 'Odabranih datoteka: {0}', diff --git a/packages/vuetify/src/locale/hu.ts b/packages/vuetify/src/locale/hu.ts index 4bfe42b42fc..23d91a529c7 100644 --- a/packages/vuetify/src/locale/hu.ts +++ b/packages/vuetify/src/locale/hu.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} fájl', diff --git a/packages/vuetify/src/locale/id.ts b/packages/vuetify/src/locale/id.ts index 9754f10c47d..47d0892cf58 100644 --- a/packages/vuetify/src/locale/id.ts +++ b/packages/vuetify/src/locale/id.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} berkas', diff --git a/packages/vuetify/src/locale/it.ts b/packages/vuetify/src/locale/it.ts index adce3e010ce..d2de2d00363 100644 --- a/packages/vuetify/src/locale/it.ts +++ b/packages/vuetify/src/locale/it.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} file', diff --git a/packages/vuetify/src/locale/ja.ts b/packages/vuetify/src/locale/ja.ts index d9ea41694ec..0b08df2be5d 100644 --- a/packages/vuetify/src/locale/ja.ts +++ b/packages/vuetify/src/locale/ja.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} ファイル', diff --git a/packages/vuetify/src/locale/ko.ts b/packages/vuetify/src/locale/ko.ts index 7c659822bfc..fee79db5ba3 100644 --- a/packages/vuetify/src/locale/ko.ts +++ b/packages/vuetify/src/locale/ko.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} files', diff --git a/packages/vuetify/src/locale/lt.ts b/packages/vuetify/src/locale/lt.ts index aa166329a19..da870e891e3 100644 --- a/packages/vuetify/src/locale/lt.ts +++ b/packages/vuetify/src/locale/lt.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} failų', diff --git a/packages/vuetify/src/locale/lv.ts b/packages/vuetify/src/locale/lv.ts index 3582bad1b7b..de1a8b9aab9 100644 --- a/packages/vuetify/src/locale/lv.ts +++ b/packages/vuetify/src/locale/lv.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} files', diff --git a/packages/vuetify/src/locale/nl.ts b/packages/vuetify/src/locale/nl.ts index 7f33df6cd07..cce54e819cf 100644 --- a/packages/vuetify/src/locale/nl.ts +++ b/packages/vuetify/src/locale/nl.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} bestanden', diff --git a/packages/vuetify/src/locale/no.ts b/packages/vuetify/src/locale/no.ts index 7d33378c869..99951af94cc 100644 --- a/packages/vuetify/src/locale/no.ts +++ b/packages/vuetify/src/locale/no.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} filer', diff --git a/packages/vuetify/src/locale/pl.ts b/packages/vuetify/src/locale/pl.ts index 4f7e20fcd67..ed805c0ff70 100644 --- a/packages/vuetify/src/locale/pl.ts +++ b/packages/vuetify/src/locale/pl.ts @@ -57,6 +57,7 @@ export default { clear: 'Wyczyść {0}', prependAction: '{0} dodatkowa akcja', appendAction: '{0} dodatkowa akcja', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: 'Liczba plików: {0}', diff --git a/packages/vuetify/src/locale/pt.ts b/packages/vuetify/src/locale/pt.ts index e3cec0d7209..0d3a77b33f3 100644 --- a/packages/vuetify/src/locale/pt.ts +++ b/packages/vuetify/src/locale/pt.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} arquivo(s)', diff --git a/packages/vuetify/src/locale/ro.ts b/packages/vuetify/src/locale/ro.ts index bd24f46bd57..67f207a8a1a 100644 --- a/packages/vuetify/src/locale/ro.ts +++ b/packages/vuetify/src/locale/ro.ts @@ -57,6 +57,7 @@ export default { clear: 'Șterge {0}', prependAction: '{0} acțiune de inserare la început', appendAction: '{0} acțiune de inserare la sfârșit', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} fișiere', diff --git a/packages/vuetify/src/locale/ru.ts b/packages/vuetify/src/locale/ru.ts index df129c4f760..7b3c47b21fc 100644 --- a/packages/vuetify/src/locale/ru.ts +++ b/packages/vuetify/src/locale/ru.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: 'Файлов: {0}', diff --git a/packages/vuetify/src/locale/sk.ts b/packages/vuetify/src/locale/sk.ts index ebac3f55507..a5195ddebd1 100644 --- a/packages/vuetify/src/locale/sk.ts +++ b/packages/vuetify/src/locale/sk.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} súborov', diff --git a/packages/vuetify/src/locale/sl.ts b/packages/vuetify/src/locale/sl.ts index c74e6a72739..2ab34719c77 100644 --- a/packages/vuetify/src/locale/sl.ts +++ b/packages/vuetify/src/locale/sl.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} datotek', diff --git a/packages/vuetify/src/locale/sr-Cyrl.ts b/packages/vuetify/src/locale/sr-Cyrl.ts index e559d7e212c..f4dc4d8837b 100644 --- a/packages/vuetify/src/locale/sr-Cyrl.ts +++ b/packages/vuetify/src/locale/sr-Cyrl.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} фајлова', diff --git a/packages/vuetify/src/locale/sr-Latn.ts b/packages/vuetify/src/locale/sr-Latn.ts index 87a71d6b145..503eb159b7e 100644 --- a/packages/vuetify/src/locale/sr-Latn.ts +++ b/packages/vuetify/src/locale/sr-Latn.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} fajlova', diff --git a/packages/vuetify/src/locale/sv.ts b/packages/vuetify/src/locale/sv.ts index ccf4bd8ca46..a80ca54760a 100644 --- a/packages/vuetify/src/locale/sv.ts +++ b/packages/vuetify/src/locale/sv.ts @@ -57,6 +57,7 @@ export default { clear: 'Rensa {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} filer', diff --git a/packages/vuetify/src/locale/th.ts b/packages/vuetify/src/locale/th.ts index b35ba8ce9e9..007b7c72ca5 100644 --- a/packages/vuetify/src/locale/th.ts +++ b/packages/vuetify/src/locale/th.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} ไฟล์', diff --git a/packages/vuetify/src/locale/tr.ts b/packages/vuetify/src/locale/tr.ts index 73eb9d472a4..e4466ffc2fb 100644 --- a/packages/vuetify/src/locale/tr.ts +++ b/packages/vuetify/src/locale/tr.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} dosya', diff --git a/packages/vuetify/src/locale/uk.ts b/packages/vuetify/src/locale/uk.ts index 6c2025ca174..e49afe59d45 100644 --- a/packages/vuetify/src/locale/uk.ts +++ b/packages/vuetify/src/locale/uk.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} файлів', diff --git a/packages/vuetify/src/locale/vi.ts b/packages/vuetify/src/locale/vi.ts index 0091fcb6ce4..1c11384cc34 100644 --- a/packages/vuetify/src/locale/vi.ts +++ b/packages/vuetify/src/locale/vi.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} tệp', diff --git a/packages/vuetify/src/locale/zh-Hans.ts b/packages/vuetify/src/locale/zh-Hans.ts index 6deb24af265..9490843eff0 100644 --- a/packages/vuetify/src/locale/zh-Hans.ts +++ b/packages/vuetify/src/locale/zh-Hans.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} 个文件', diff --git a/packages/vuetify/src/locale/zh-Hant.ts b/packages/vuetify/src/locale/zh-Hant.ts index e623dfc5e88..7c1f2b6d613 100644 --- a/packages/vuetify/src/locale/zh-Hant.ts +++ b/packages/vuetify/src/locale/zh-Hant.ts @@ -57,6 +57,7 @@ export default { clear: 'Clear {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', + otp: 'Please enter OTP character {0}', }, fileInput: { counter: '{0} 個檔案', diff --git a/packages/vuetify/src/util/helpers.ts b/packages/vuetify/src/util/helpers.ts index 1fce3223284..404d88effbb 100644 --- a/packages/vuetify/src/util/helpers.ts +++ b/packages/vuetify/src/util/helpers.ts @@ -239,6 +239,17 @@ export function omit< return clone } +export function only< + T extends object, + U extends Extract<keyof T, string> +> (obj: T, include: U[]): Pick<T, U> { + const clone = {} as T + + include.forEach(prop => clone[prop] = obj[prop]) + + return clone +} + /** * Filter attributes that should be applied to * the root element of a an input component. Remaining @@ -583,7 +594,7 @@ export function getNextElement (elements: HTMLElement[], location?: 'next' | 'pr return _el } -export function focusChild (el: Element, location?: 'next' | 'prev' | 'first' | 'last') { +export function focusChild (el: Element, location?: 'next' | 'prev' | 'first' | 'last' | number) { const focusable = focusableChildren(el) if (!location) { @@ -594,6 +605,8 @@ export function focusChild (el: Element, location?: 'next' | 'prev' | 'first' | focusable[0]?.focus() } else if (location === 'last') { focusable.at(-1)?.focus() + } else if (typeof location === 'number') { + focusable[location]?.focus() } else { const _el = getNextElement(focusable, location) if (_el) _el.focus()
0fb8f62f8c8faf46c61b07a0a4d0bfe07e4cf028
2018-11-30 03:45:01
Andrew Henry
docs(headers): updated sliders
false
updated sliders
docs
diff --git a/packages/vuetifyjs.com/src/lang/en/components/Sliders.json b/packages/vuetifyjs.com/src/lang/en/components/Sliders.json index e6314d5de31..696fe311795 100644 --- a/packages/vuetifyjs.com/src/lang/en/components/Sliders.json +++ b/packages/vuetifyjs.com/src/lang/en/components/Sliders.json @@ -1,53 +1,52 @@ { - "header": "Slider", + "header": "# Slider", "headerText": "The `v-slider` component is a better visualization of the number input. It is used for gathering numerical user data.", "examples": { "usage": { - "header": "Usage", "desc": "Sliders reflect a range of values along a bar, from which users may select a single value. They are ideal for adjusting settings such as volume, brightness, or applying image filters." }, "thumb": { - "header": "Thumb", + "header": "### Thumb", "desc": "You can display a `thumb-label` while sliding or always. It It can have a custom color by setting `thumb-color` and a custom size with `thumb-size`. With `always-dirty` its color will never change, even when on `min` value." }, "customThumb": { - "header": "Custom Range slider", + "header": "### Custom Range slider", "desc": " Using the `tick-labels` prop along with a scoped slot, you can create a very customized solution." }, "ticks": { - "header": "Ticks", + "header": "### Ticks", "desc": "Tick marks represent predetermined values to which the user can move the slider." }, "discrete": { - "header": "Discrete", + "header": "### Discrete", "desc": "Discrete sliders offer a thumb label that displays the exact current amount. Using the `step` prop you can disallow selecting values outside of steps." }, "icons": { - "header": "Icons", + "header": "### Icons", "desc": "You can add icons to the slider with the `append-icon` and `prepend-icon` props. With `append-icon-cb` and `prepend-icon-cb` you can trigger a callback function when click the icon." }, "editableNumericValue": { - "header": "With an editable numeric value", + "header": "### With an editable numeric value", "desc": "Sliders can be combined with other components for a better display." }, "customColors": { - "header": "Custom colors", + "header": "### Custom colors", "desc": "You can set the colors of the slider using the props `color`, `track-color` and `thumb-color`." }, "validation": { - "header": "Validation", + "header": "### Validation", "desc": "Vuetify includes simple validation through the `rules` prop. The prop accepts an array of callbacks. While validating rules, the current v-model value will be passed to the callback. This callback should return either `true` or a `String`, the error message." }, "range": { - "header": "Range", + "header": "### Range", "desc": "Range sliders." }, "minMax": { - "header": "Min & Max values", + "header": "### Min & Max values", "desc": "You can set `min` and `max` values of sliders." }, "metronome": { - "header": "Metronome", + "header": "### Metronome", "desc": "Use slotted _prepend_ and _append_ icons to easily customize the `v-slider` to fit any situation." } },
aafacce62b208aebceb4cbe1021ebaf86c0c23e8
2023-05-25 21:23:46
Kael
fix(VNavigationDrawer): apply scoped styles
false
apply scoped styles
fix
diff --git a/packages/vuetify/src/components/VNavigationDrawer/VNavigationDrawer.tsx b/packages/vuetify/src/components/VNavigationDrawer/VNavigationDrawer.tsx index 8c6beb007da..121a987369f 100644 --- a/packages/vuetify/src/components/VNavigationDrawer/VNavigationDrawer.tsx +++ b/packages/vuetify/src/components/VNavigationDrawer/VNavigationDrawer.tsx @@ -15,6 +15,7 @@ import { makeLayoutItemProps, useLayoutItem } from '@/composables/layout' import { useProxiedModel } from '@/composables/proxiedModel' import { makeRoundedProps, useRounded } from '@/composables/rounded' import { useRouter } from '@/composables/router' +import { useScopeId } from '@/composables/scopeId' import { useSsrBoot } from '@/composables/ssrBoot' import { makeTagProps } from '@/composables/tag' import { makeThemeProps, provideTheme } from '@/composables/theme' @@ -106,6 +107,7 @@ export const VNavigationDrawer = genericComponent<VNavigationDrawerSlots>()({ const router = useRouter() const isActive = useProxiedModel(props, 'modelValue', null, v => !!v) const { ssrBootStyles } = useSsrBoot() + const { scopeId } = useScopeId() const rootEl = ref<HTMLElement>() const isHovering = shallowRef(false) @@ -239,6 +241,7 @@ export const VNavigationDrawer = genericComponent<VNavigationDrawerSlots>()({ stickyStyles.value, props.style, ]} + { ...scopeId } { ...attrs } > { hasImage && ( @@ -273,6 +276,7 @@ export const VNavigationDrawer = genericComponent<VNavigationDrawerSlots>()({ class={['v-navigation-drawer__scrim', scrimColor.backgroundColorClasses.value]} style={[scrimStyles.value, scrimColor.backgroundColorStyles.value]} onClick={ () => isActive.value = false } + { ...scopeId } /> )} </Transition>
4e1b246d5654896a1f94d7e69772c338b8866825
2022-03-02 05:44:26
John Leider
fix(VAutocomplete/VTextField): elevate label when focused or active
false
elevate label when focused or active
fix
diff --git a/packages/vuetify/src/components/VAutocomplete/VAutocomplete.tsx b/packages/vuetify/src/components/VAutocomplete/VAutocomplete.tsx index 0bbd7b966eb..6bc3b594875 100644 --- a/packages/vuetify/src/components/VAutocomplete/VAutocomplete.tsx +++ b/packages/vuetify/src/components/VAutocomplete/VAutocomplete.tsx @@ -89,7 +89,7 @@ export const VAutocomplete = genericComponent<new <T>() => { props, 'modelValue', [], - v => wrapInArray(v), + v => wrapInArray(v || []), (v: any) => props.multiple ? v : v[0] ) const menu = ref(false) diff --git a/packages/vuetify/src/components/VTextField/VTextField.tsx b/packages/vuetify/src/components/VTextField/VTextField.tsx index 4a596dfdcfc..c00c0a7548e 100644 --- a/packages/vuetify/src/components/VTextField/VTextField.tsx +++ b/packages/vuetify/src/components/VTextField/VTextField.tsx @@ -37,6 +37,7 @@ export const VTextField = genericComponent<new <T>() => { autofocus: Boolean, counter: [Boolean, Number, String] as PropType<true | number | string>, counterValue: Function as PropType<(value: any) => number>, + dirty: Boolean, hint: String, persistentHint: Boolean, prefix: String, @@ -97,12 +98,13 @@ export const VTextField = genericComponent<new <T>() => { const inputRef = ref<HTMLInputElement>() const isActive = computed(() => ( activeTypes.includes(props.type) || - props.persistentPlaceholder + props.persistentPlaceholder || + isFocused.value )) const messages = computed(() => { return props.messages.length ? props.messages - : (isActive.value || props.persistentHint) ? props.hint : '' + : (isFocused.value || props.persistentHint) ? props.hint : '' }) function onFocus () { if (inputRef.value !== document.activeElement) { @@ -163,7 +165,7 @@ export const VTextField = genericComponent<new <T>() => { }) => ( <VField ref={ vFieldRef } - active={ isActive.value } + active={ isActive.value || isDirty.value } dirty={ isDirty.value } focused={ isFocused.value } onMousedown={ (e: MouseEvent) => {
d9acecc908bb2ef02d55fc2e1ae1c30d7e758ba3
2019-01-02 11:55:32
John Leider
docs(Card): add new example
false
add new example
docs
diff --git a/packages/vuetifyjs.com/src/data/pages/components/Cards.json b/packages/vuetifyjs.com/src/data/pages/components/Cards.json index f38a8f812a0..33215a0cb32 100644 --- a/packages/vuetifyjs.com/src/data/pages/components/Cards.json +++ b/packages/vuetifyjs.com/src/data/pages/components/Cards.json @@ -35,7 +35,8 @@ "mediaWithText", "horizontal", "grids", - "customActions" + "customActions", + "twitterCard" ] } ] diff --git a/packages/vuetifyjs.com/src/examples/cards/twitterCard.vue b/packages/vuetifyjs.com/src/examples/cards/twitterCard.vue new file mode 100644 index 00000000000..cf1d9913a4b --- /dev/null +++ b/packages/vuetifyjs.com/src/examples/cards/twitterCard.vue @@ -0,0 +1,56 @@ +<template> + <v-card + class="mx-auto" + color="#26c6da" + dark + max-width="400" + > + <v-card-title> + <v-icon + large + left + > + mdi-twitter + </v-icon> + <span class="title font-weight-light">Twitter</span> + </v-card-title> + + <v-card-text class="headline font-weight-bold"> + "Turns out semicolon-less style is easier and safer in TS because most gotcha edge cases are type invalid as well." + </v-card-text> + + <v-card-actions> + <v-list-tile class="grow"> + <v-list-tile-avatar color="grey darken-3"> + <v-img + class="elevation-6" + src="https://avataaars.io/?avatarStyle=Transparent&topType=ShortHairShortCurly&accessoriesType=Prescription02&hairColor=Black&facialHairType=Blank&clotheType=Hoodie&clotheColor=White&eyeType=Default&eyebrowType=DefaultNatural&mouthType=Default&skinColor=Light" + ></v-img> + </v-list-tile-avatar> + + <v-list-tile-content> + <v-list-tile-title>Evan You</v-list-tile-title> + </v-list-tile-content> + + <v-layout + align-center + justify-end + > + <v-icon class="mr-1">mdi-heart</v-icon> + <span class="subheading mr-2">256</span> + <span class="mr-1">·</span> + <v-icon class="mr-1">mdi-share-variant</v-icon> + <span class="subheading">45</span> + </v-layout> + </v-list-tile> + </v-card-actions> + </v-card> +</template> + +<script> + export default { + data: () => ({ + // + }) + } +</script> diff --git a/packages/vuetifyjs.com/src/examples/tabs/right.vue b/packages/vuetifyjs.com/src/examples/tabs/right.vue index ebc7b1e2450..c3fb9524a9c 100644 --- a/packages/vuetifyjs.com/src/examples/tabs/right.vue +++ b/packages/vuetifyjs.com/src/examples/tabs/right.vue @@ -1,10 +1,8 @@ <template> <v-tabs right> - <v-tab - v-for="n in 3" - :key="n" - > - Item {{ n }} + <v-tab> + <v-icon>mdi-face</v-icon> + Profile </v-tab> </v-tabs> </template> diff --git a/packages/vuetifyjs.com/src/lang/en/components/Cards.json b/packages/vuetifyjs.com/src/lang/en/components/Cards.json index 9ef527c7231..dda01df2059 100644 --- a/packages/vuetifyjs.com/src/lang/en/components/Cards.json +++ b/packages/vuetifyjs.com/src/lang/en/components/Cards.json @@ -20,6 +20,10 @@ "customActions": { "header": "### Custom actions", "desc": "With a simple conditional, you can easily add supplementary text that is hidden until opened." + }, + "twitterCard": { + "header": "### Twitter card", + "desc": "The `v-card` component has multiple children components that help you build complex examples without having to worry about spacing. This example is comprised of the `v-card-title`, `v-card-text` and `v-card-actions` components." } }, "props": {
b412c203fd1510167546d6128634677166dbeb22
2018-10-28 21:13:21
nekosaur
feat: added source property to output
false
added source property to output
feat
diff --git a/packages/api-generator/dist/api.js b/packages/api-generator/dist/api.js index 1e45929b2f3..373da53243d 100755 --- a/packages/api-generator/dist/api.js +++ b/packages/api-generator/dist/api.js @@ -1 +1,5960 @@ -module.exports = {"v-bottom-sheet":{"props":[{"name":"inset","type":"Boolean","default":"undefined"},{"name":"value","type":"undefined","default":"undefined"}]}} \ No newline at end of file +module.exports = { + "v-app": { + "props": [ + { + "name": "id", + "type": "String", + "default": "app", + "source": null + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [], + "slots": [ + "default" + ] + }, + "v-alert": { + "props": [ + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "value", + "type": "Any", + "default": "undefined", + "source": "toggleable" + }, + { + "name": "mode", + "type": "String", + "default": "undefined", + "source": "transitionable" + }, + { + "name": "origin", + "type": "String", + "default": "undefined", + "source": "transitionable" + }, + { + "name": "transition", + "type": "String", + "default": "undefined", + "source": "transitionable" + }, + { + "name": "dismissible", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "icon", + "type": "String", + "default": "undefined", + "source": null + }, + { + "name": "outline", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "type", + "type": "String", + "default": "undefined", + "source": null + } + ], + "mixins": [ + "colorable", + "toggleable", + "transitionable" + ], + "slots": [ + "default" + ] + }, + "v-avatar": { + "props": [ + { + "name": "color", + "type": "String", + "default": "undefined", + "source": null + }, + { + "name": "size", + "type": [ + "Number", + "String" + ], + "default": 48, + "source": null + }, + { + "name": "tile", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [], + "slots": [ + "default" + ] + }, + "v-badge": { + "props": [ + { + "name": "color", + "type": "String", + "default": "primary", + "source": "colorable" + }, + { + "name": "value", + "type": "Any", + "default": true, + "source": "toggleable" + }, + { + "name": "bottom", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "left", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "overlap", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "transition", + "type": "String", + "default": "fab-transition", + "source": null + } + ], + "mixins": [ + "colorable", + "toggleable" + ], + "slots": [ + "default", + "badge" + ] + }, + "v-bottom-nav": { + "props": [ + { + "name": "absolute", + "type": "Boolean", + "default": "False", + "source": "applicationable" + }, + { + "name": "app", + "type": "Boolean", + "default": "False", + "source": "applicationable" + }, + { + "name": "fixed", + "type": "Boolean", + "default": "False", + "source": "applicationable" + }, + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "active", + "type": [ + "Number", + "String" + ], + "default": "undefined", + "source": null + }, + { + "name": "height", + "type": [ + "Number", + "String" + ], + "default": 56, + "source": null + }, + { + "name": "shift", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "value", + "type": "Any", + "default": "undefined", + "source": null + } + ], + "mixins": [ + "applicationable", + "button-group", + "registerable-provide", + "colorable" + ], + "slots": [ + "default" + ] + }, + "v-bottom-sheet": { + "props": [ + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "fullWidth", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "inset", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "lazy", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "maxWidth", + "type": [ + "String", + "Number" + ], + "default": "auto", + "source": null + }, + { + "name": "persistent", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "value", + "type": "Any", + "default": "undefined", + "source": null + } + ], + "mixins": [], + "slots": [ + "default", + "activator" + ] + }, + "v-breadcrumbs": { + "props": [ + { + "name": "divider", + "type": "String", + "default": "/", + "source": null + }, + { + "name": "large", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "justifyCenter", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "justifyEnd", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [], + "slots": [ + "default" + ] + }, + "v-breadcrumbs-item": { + "props": [ + { + "name": "activeClass", + "type": "String", + "default": "breadcrumbs__item--disabled", + "source": "routable" + }, + { + "name": "append", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "exact", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "exactActiveClass", + "type": "String", + "default": "undefined", + "source": "routable" + }, + { + "name": "href", + "type": [ + "String", + "Object" + ], + "default": "undefined", + "source": "routable" + }, + { + "name": "to", + "type": [ + "String", + "Object" + ], + "default": "undefined", + "source": "routable" + }, + { + "name": "nuxt", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "replace", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "ripple", + "type": [ + "Boolean", + "Object" + ], + "default": "undefined", + "source": "routable" + }, + { + "name": "tag", + "type": "String", + "default": "undefined", + "source": "routable" + }, + { + "name": "target", + "type": "String", + "default": "undefined", + "source": "routable" + } + ], + "mixins": [ + "routable" + ], + "slots": [ + "default" + ] + }, + "v-btn": { + "props": [ + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "activeClass", + "type": "String", + "default": "btn--active", + "source": "routable" + }, + { + "name": "append", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "exact", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "exactActiveClass", + "type": "String", + "default": "undefined", + "source": "routable" + }, + { + "name": "href", + "type": [ + "String", + "Object" + ], + "default": "undefined", + "source": "routable" + }, + { + "name": "to", + "type": [ + "String", + "Object" + ], + "default": "undefined", + "source": "routable" + }, + { + "name": "nuxt", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "replace", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "ripple", + "type": [ + "Boolean", + "Object" + ], + "default": true, + "source": "routable" + }, + { + "name": "tag", + "type": "String", + "default": "button", + "source": "routable" + }, + { + "name": "target", + "type": "String", + "default": "undefined", + "source": "routable" + }, + { + "name": "absolute", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "bottom", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "fixed", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "left", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "right", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "top", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "inputValue", + "type": "Any", + "default": "undefined", + "source": "toggleable" + }, + { + "name": "block", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "depressed", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "fab", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "flat", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "icon", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "large", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "loading", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "outline", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "round", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "small", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "type", + "type": "String", + "default": "button", + "source": null + }, + { + "name": "value", + "type": "Any", + "default": "undefined", + "source": null + } + ], + "mixins": [ + "colorable", + "routable", + "positionable", + "themeable", + "toggleable", + "registerable-inject" + ], + "slots": [ + "default" + ] + }, + "v-btn-toggle": { + "props": [ + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "inputValue", + "type": "Any", + "default": "undefined", + "source": null + }, + { + "name": "mandatory", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "multiple", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [ + "button-group", + "registerable-provide", + "themeable" + ] + }, + "v-card": { + "props": [ + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "activeClass", + "type": "String", + "default": "undefined", + "source": "routable" + }, + { + "name": "append", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "exact", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "exactActiveClass", + "type": "String", + "default": "undefined", + "source": "routable" + }, + { + "name": "href", + "type": [ + "String", + "Object" + ], + "default": "undefined", + "source": "routable" + }, + { + "name": "to", + "type": [ + "String", + "Object" + ], + "default": "undefined", + "source": "routable" + }, + { + "name": "nuxt", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "replace", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "ripple", + "type": [ + "Boolean", + "Object" + ], + "default": "undefined", + "source": "routable" + }, + { + "name": "tag", + "type": "String", + "default": "div", + "source": "routable" + }, + { + "name": "target", + "type": "String", + "default": "undefined", + "source": "routable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "flat", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "height", + "type": "String", + "default": "auto", + "source": null + }, + { + "name": "hover", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "img", + "type": "String", + "default": "undefined", + "source": null + }, + { + "name": "raised", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "tile", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "width", + "type": [ + "String", + "Number" + ], + "default": "undefined", + "source": null + } + ], + "mixins": [ + "colorable", + "routable", + "themeable" + ], + "slots": [ + "default" + ] + }, + "v-card-media": { + "props": [ + { + "name": "contain", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "height", + "type": [ + "Number", + "String" + ], + "default": "auto", + "source": null + }, + { + "name": "src", + "type": "String", + "default": "undefined", + "source": null + } + ], + "mixins": [] + }, + "v-card-title": { + "props": [ + { + "name": "primaryTitle", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [] + }, + "v-card-actions": { + "props": [], + "mixins": [] + }, + "v-card-text": { + "props": [], + "mixins": [] + }, + "v-carousel": { + "props": [ + { + "name": "lazy", + "type": "Boolean", + "default": "False", + "source": "bootable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "cycle", + "type": "Boolean", + "default": "True", + "source": null + }, + { + "name": "delimiterIcon", + "type": "String", + "default": "fiber_manual_record", + "source": null + }, + { + "name": "hideControls", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "hideDelimiters", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "interval", + "type": [ + "Number", + "String" + ], + "default": 6000, + "source": null + }, + { + "name": "prependIcon", + "type": [ + "Boolean", + "String" + ], + "default": "chevron_left", + "source": null + }, + { + "name": "appendIcon", + "type": [ + "Boolean", + "String" + ], + "default": "chevron_right", + "source": null + }, + { + "name": "value", + "type": "Number", + "default": "undefined", + "source": null + } + ], + "mixins": [ + "bootable", + "themeable", + "registerable-provide" + ], + "slots": [ + "default" + ] + }, + "v-carousel-item": { + "props": [ + { + "name": "transition", + "type": "String", + "default": "tab-transition", + "source": null + }, + { + "name": "reverseTransition", + "type": "String", + "default": "tab-reverse-transition", + "source": null + } + ], + "mixins": [ + "registerable-inject" + ], + "slots": [ + "default" + ] + }, + "v-checkbox": { + "props": [ + { + "name": "ripple", + "type": [ + "Boolean", + "Object" + ], + "default": true, + "source": "rippleable" + }, + { + "name": "loading", + "type": [ + "Boolean", + "String" + ], + "default": false, + "source": "loadable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "error", + "type": "Boolean", + "default": "False", + "source": "validatable" + }, + { + "name": "errorMessages", + "type": [ + "String", + "Array" + ], + "source": "validatable" + }, + { + "name": "rules", + "type": "Array", + "source": "validatable" + }, + { + "name": "validateOnBlur", + "type": "Boolean", + "default": "False", + "source": "validatable" + }, + { + "name": "appendIcon", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "appendIconCb", + "type": "Any", + "default": "undefined", + "source": "input" + }, + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "hint", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "hideDetails", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "label", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "persistentHint", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "placeholder", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "prependIcon", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "prependIconCb", + "type": "Any", + "default": "undefined", + "source": "input" + }, + { + "name": "readonly", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "required", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "tabindex", + "type": "Any", + "default": 0, + "source": "input" + }, + { + "name": "toggleKeys", + "type": "Array", + "source": "input" + }, + { + "name": "value", + "type": "Any", + "default": "undefined", + "source": "input" + }, + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "id", + "type": "String", + "default": "undefined", + "source": "selectable" + }, + { + "name": "inputValue", + "type": "Any", + "default": "undefined", + "source": "selectable" + }, + { + "name": "falseValue", + "type": "Any", + "default": "undefined", + "source": "selectable" + }, + { + "name": "trueValue", + "type": "Any", + "default": "undefined", + "source": "selectable" + }, + { + "name": "indeterminate", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [ + "rippleable", + "selectable", + "input", + "loadable", + "themeable", + "validatable", + "colorable" + ], + "slots": [ + "label" + ] + }, + "v-chip": { + "props": [ + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "value", + "type": "Boolean", + "default": "True", + "source": "toggleable" + }, + { + "name": "close", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "label", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "outline", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "selected", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "small", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "textColor", + "type": "String", + "default": "undefined", + "source": null + } + ], + "mixins": [ + "colorable", + "themeable", + "toggleable" + ], + "slots": [ + "default" + ] + }, + "v-data-iterator": { + "props": [ + { + "name": "noDataText", + "type": "String", + "default": "No data available", + "source": "filterable" + }, + { + "name": "loading", + "type": [ + "Boolean", + "String" + ], + "default": false, + "source": "loadable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "expand", + "type": "Boolean", + "default": "False", + "source": "data-iterable" + }, + { + "name": "hideActions", + "type": "Boolean", + "default": "False", + "source": "data-iterable" + }, + { + "name": "disableInitialSort", + "type": "Boolean", + "default": "False", + "source": "data-iterable" + }, + { + "name": "mustSort", + "type": "Boolean", + "default": "False", + "source": "data-iterable" + }, + { + "name": "noResultsText", + "type": "String", + "default": "No matching records found", + "source": "data-iterable" + }, + { + "name": "rowsPerPageItems", + "type": "Array", + "source": "data-iterable" + }, + { + "name": "rowsPerPageText", + "type": "String", + "default": "Items per page:", + "source": "data-iterable" + }, + { + "name": "selectAll", + "type": [ + "Boolean", + "String" + ], + "default": "undefined", + "source": "data-iterable" + }, + { + "name": "search", + "type": "Any", + "default": "undefined", + "source": "data-iterable" + }, + { + "name": "filter", + "type": "Any", + "source": "data-iterable" + }, + { + "name": "customFilter", + "type": "Any", + "source": "data-iterable" + }, + { + "name": "customSort", + "type": "Any", + "source": "data-iterable" + }, + { + "name": "value", + "type": "Array", + "source": "data-iterable" + }, + { + "name": "items", + "type": "Array", + "source": "data-iterable" + }, + { + "name": "totalItems", + "type": "Number", + "default": "undefined", + "source": "data-iterable" + }, + { + "name": "itemKey", + "type": "String", + "default": "id", + "source": "data-iterable" + }, + { + "name": "pagination", + "type": "Object", + "source": "data-iterable" + }, + { + "name": "contentTag", + "type": "String", + "default": "div", + "source": null + }, + { + "name": "contentProps", + "type": "Object", + "default": "undefined", + "source": null + }, + { + "name": "contentClass", + "type": "String", + "default": "undefined", + "source": null + } + ], + "mixins": [ + "data-iterable", + "filterable", + "loadable", + "themeable" + ], + "slots": [ + { + "name": "footer", + "source": "data-iterable" + } + ], + "scopedSlots": [ + { + "name": "items", + "props": [ + "item", + "index", + "selected", + "expanded" + ], + "source": "data-iterable" + }, + { + "name": "pageText", + "props": [ + "pageStart", + "pageStop", + "itemsLength" + ], + "source": "data-iterable" + } + ] + }, + "v-data-table": { + "props": [ + { + "name": "noDataText", + "type": "String", + "default": "No data available", + "source": "filterable" + }, + { + "name": "loading", + "type": [ + "Boolean", + "String" + ], + "default": false, + "source": "loadable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "expand", + "type": "Boolean", + "default": "False", + "source": "data-iterable" + }, + { + "name": "hideActions", + "type": "Boolean", + "default": "False", + "source": "data-iterable" + }, + { + "name": "disableInitialSort", + "type": "Boolean", + "default": "False", + "source": "data-iterable" + }, + { + "name": "mustSort", + "type": "Boolean", + "default": "False", + "source": "data-iterable" + }, + { + "name": "noResultsText", + "type": "String", + "default": "No matching records found", + "source": "data-iterable" + }, + { + "name": "rowsPerPageItems", + "type": "Array", + "source": "data-iterable" + }, + { + "name": "rowsPerPageText", + "type": "String", + "default": "Rows per page:", + "source": "data-iterable" + }, + { + "name": "selectAll", + "type": [ + "Boolean", + "String" + ], + "default": "undefined", + "source": "data-iterable" + }, + { + "name": "search", + "type": "Any", + "default": "undefined", + "source": "data-iterable" + }, + { + "name": "filter", + "type": "Any", + "source": "data-iterable" + }, + { + "name": "customFilter", + "type": "Any", + "source": "data-iterable" + }, + { + "name": "customSort", + "type": "Any", + "source": "data-iterable" + }, + { + "name": "value", + "type": "Array", + "source": "data-iterable" + }, + { + "name": "items", + "type": "Array", + "source": "data-iterable" + }, + { + "name": "totalItems", + "type": "Number", + "default": "undefined", + "source": "data-iterable" + }, + { + "name": "itemKey", + "type": "String", + "default": "id", + "source": "data-iterable" + }, + { + "name": "pagination", + "type": "Object", + "source": "data-iterable" + }, + { + "name": "headers", + "type": "Array", + "source": null + }, + { + "name": "headerText", + "type": "String", + "default": "text", + "source": null + }, + { + "name": "hideHeaders", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [ + "data-iterable", + "filterable", + "loadable", + "themeable" + ], + "slots": [ + { + "name": "footer", + "source": "data-iterable" + } + ], + "scopedSlots": [ + { + "name": "headerCell", + "props": [ + "header" + ] + }, + { + "name": "headers", + "props": [ + "headers", + "indeterminate", + "all" + ] + }, + { + "name": "items", + "props": [ + "item", + "index", + "selected", + "expanded" + ], + "source": "data-iterable" + }, + { + "name": "pageText", + "props": [ + "pageStart", + "pageStop", + "itemsLength" + ], + "source": "data-iterable" + } + ] + }, + "v-edit-dialog": { + "props": [ + { + "name": "cancelText", + "type": "Any", + "default": "Cancel", + "source": null + }, + { + "name": "large", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "lazy", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "saveText", + "type": "Any", + "default": "Save", + "source": null + }, + { + "name": "transition", + "type": "String", + "default": "slide-x-reverse-transition", + "source": null + } + ], + "mixins": [] + }, + "v-table-overflow": { + "props": [], + "mixins": [] + }, + "v-date-picker": { + "props": [ + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "actions", + "type": "Boolean", + "default": "False", + "source": "picker" + }, + { + "name": "autosave", + "type": "Boolean", + "default": "False", + "source": "picker" + }, + { + "name": "headerColor", + "type": "String", + "default": "undefined", + "source": "picker" + }, + { + "name": "landscape", + "type": "Boolean", + "default": "False", + "source": "picker" + }, + { + "name": "noTitle", + "type": "Boolean", + "default": "False", + "source": "picker" + }, + { + "name": "scrollable", + "type": "Boolean", + "default": "False", + "source": "picker" + }, + { + "name": "value", + "type": "String", + "default": "undefined", + "source": "picker" + }, + { + "name": "allowedDates", + "type": [ + "Array", + "Object", + "Any" + ], + "source": null + }, + { + "name": "appendIcon", + "type": "String", + "default": "chevron_right", + "source": null + }, + { + "name": "dayFormat", + "type": "Any", + "default": "undefined", + "source": null + }, + { + "name": "firstDayOfWeek", + "type": [ + "String", + "Number" + ], + "default": 0, + "source": null + }, + { + "name": "headerDateFormat", + "type": "Any", + "default": "undefined", + "source": null + }, + { + "name": "locale", + "type": "String", + "default": "en-us", + "source": null + }, + { + "name": "monthFormat", + "type": "Any", + "default": "undefined", + "source": null + }, + { + "name": "prependIcon", + "type": "String", + "default": "chevron_left", + "source": null + }, + { + "name": "titleDateFormat", + "type": "Any", + "default": "undefined", + "source": null + }, + { + "name": "type", + "type": "String", + "default": "date", + "source": null + }, + { + "name": "yearFormat", + "type": "Any", + "default": "undefined", + "source": null + }, + { + "name": "yearIcon", + "type": "String", + "default": "undefined", + "source": null + } + ], + "mixins": [ + "picker", + "colorable", + "themeable" + ] + }, + "v-dialog": { + "props": [ + { + "name": "lazy", + "type": "Boolean", + "default": "False", + "source": "bootable" + }, + { + "name": "attach", + "type": [ + "Boolean", + "String", + "Object" + ], + "default": false, + "source": "detachable" + }, + { + "name": "contentClass", + "type": "Any", + "default": "undefined", + "source": "detachable" + }, + { + "name": "hideOverlay", + "type": "Boolean", + "default": "False", + "source": "overlayable" + }, + { + "name": "value", + "type": "Any", + "default": "undefined", + "source": "toggleable" + }, + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "persistent", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "fullscreen", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "fullWidth", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "maxWidth", + "type": [ + "String", + "Number" + ], + "default": "none", + "source": null + }, + { + "name": "origin", + "type": "String", + "default": "center center", + "source": null + }, + { + "name": "width", + "type": [ + "String", + "Number" + ], + "default": "auto", + "source": null + }, + { + "name": "scrollable", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "transition", + "type": [ + "String", + "Boolean" + ], + "default": "dialog-transition", + "source": null + } + ], + "mixins": [ + "dependent", + "detachable", + "bootable", + "overlayable", + "stackable", + "toggleable" + ], + "slots": [ + "default", + "activator" + ] + }, + "v-divider": { + "props": [ + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "inset", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [ + "themeable" + ] + }, + "v-expansion-panel": { + "props": [ + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "expand", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "focusable", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "inset", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "popout", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [ + "themeable" + ], + "slots": [ + "default" + ] + }, + "v-expansion-panel-content": { + "props": [ + { + "name": "lazy", + "type": "Boolean", + "default": "False", + "source": "bootable" + }, + { + "name": "value", + "type": "Any", + "default": "undefined", + "source": "toggleable" + }, + { + "name": "hideActions", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "ripple", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [ + "bootable", + "toggleable" + ], + "slots": [ + "default", + "header" + ] + }, + "v-footer": { + "props": [ + { + "name": "absolute", + "type": "Boolean", + "default": "False", + "source": "applicationable" + }, + { + "name": "app", + "type": "Boolean", + "default": "False", + "source": "applicationable" + }, + { + "name": "fixed", + "type": "Boolean", + "default": "False", + "source": "applicationable" + }, + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "height", + "type": [ + "Number", + "String" + ], + "default": 32, + "source": null + }, + { + "name": "inset", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [ + "applicationable", + "colorable", + "themeable" + ], + "slots": [ + "default" + ] + }, + "v-form": { + "props": [ + { + "name": "value", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "lazyValidation", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [], + "slots": [ + "default" + ] + }, + "v-content": { + "props": [ + { + "name": "tag", + "type": "String", + "default": "main", + "source": null + } + ], + "mixins": [ + "ssr-bootable" + ] + }, + "v-container": { + "props": [ + { + "name": "id", + "type": "String", + "default": "undefined", + "source": null + }, + { + "name": "tag", + "type": "String", + "default": "div", + "source": null + } + ], + "mixins": [] + }, + "v-flex": { + "props": [ + { + "name": "id", + "type": "String", + "default": "undefined", + "source": null + }, + { + "name": "tag", + "type": "String", + "default": "div", + "source": null + } + ], + "mixins": [] + }, + "v-layout": { + "props": [ + { + "name": "id", + "type": "String", + "default": "undefined", + "source": null + }, + { + "name": "tag", + "type": "String", + "default": "div", + "source": null + } + ], + "mixins": [] + }, + "v-spacer": { + "props": [], + "mixins": [] + }, + "v-icon": { + "props": [ + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "large", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "left", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "medium", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "right", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "size", + "type": [ + "Number", + "String" + ], + "default": "undefined", + "source": null + }, + { + "name": "small", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "xLarge", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [ + "colorable", + "themeable" + ], + "slots": [ + "default" + ] + }, + "v-jumbotron": { + "props": [ + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "activeClass", + "type": "String", + "default": "undefined", + "source": "routable" + }, + { + "name": "append", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "exact", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "exactActiveClass", + "type": "String", + "default": "undefined", + "source": "routable" + }, + { + "name": "href", + "type": [ + "String", + "Object" + ], + "default": "undefined", + "source": "routable" + }, + { + "name": "to", + "type": [ + "String", + "Object" + ], + "default": "undefined", + "source": "routable" + }, + { + "name": "nuxt", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "replace", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "ripple", + "type": [ + "Boolean", + "Object" + ], + "default": "undefined", + "source": "routable" + }, + { + "name": "tag", + "type": "String", + "default": "div", + "source": "routable" + }, + { + "name": "target", + "type": "String", + "default": "undefined", + "source": "routable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "gradient", + "type": "String", + "default": "undefined", + "source": null + }, + { + "name": "height", + "type": [ + "Number", + "String" + ], + "default": "400px", + "source": null + }, + { + "name": "src", + "type": "String", + "default": "undefined", + "source": null + } + ], + "mixins": [ + "colorable", + "routable", + "themeable" + ] + }, + "v-list": { + "props": [ + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "dense", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "expand", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "subheader", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "threeLine", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "twoLine", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [ + "registerable-provide", + "themeable" + ], + "slots": [ + "default" + ] + }, + "v-list-group": { + "props": [ + { + "name": "lazy", + "type": "Boolean", + "default": "False", + "source": "bootable" + }, + { + "name": "value", + "type": "Any", + "default": "undefined", + "source": "toggleable" + }, + { + "name": "activeClass", + "type": "String", + "default": "primary--text", + "source": null + }, + { + "name": "appendIcon", + "type": "String", + "default": "keyboard_arrow_down", + "source": null + }, + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "group", + "type": "String", + "default": "undefined", + "source": null + }, + { + "name": "noAction", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "prependIcon", + "type": "String", + "default": "undefined", + "source": null + }, + { + "name": "subGroup", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [ + "bootable", + "registerable-inject", + "toggleable" + ] + }, + "v-list-tile": { + "props": [ + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "activeClass", + "type": "String", + "default": "primary--text", + "source": "routable" + }, + { + "name": "append", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "exact", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "exactActiveClass", + "type": "String", + "default": "undefined", + "source": "routable" + }, + { + "name": "href", + "type": [ + "String", + "Object" + ], + "default": "undefined", + "source": "routable" + }, + { + "name": "to", + "type": [ + "String", + "Object" + ], + "default": "undefined", + "source": "routable" + }, + { + "name": "nuxt", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "replace", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "ripple", + "type": [ + "Boolean", + "Object" + ], + "default": "undefined", + "source": "routable" + }, + { + "name": "tag", + "type": "String", + "default": "undefined", + "source": "routable" + }, + { + "name": "target", + "type": "String", + "default": "undefined", + "source": "routable" + }, + { + "name": "value", + "type": "Any", + "default": "undefined", + "source": "toggleable" + }, + { + "name": "avatar", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "inactive", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [ + "colorable", + "routable", + "toggleable" + ], + "slots": [ + "default" + ] + }, + "v-list-tile-action": { + "props": [], + "mixins": [], + "slots": [ + "default" + ] + }, + "v-list-tile-action-text": { + "props": [], + "mixins": [] + }, + "v-list-tile-avatar": { + "props": [ + { + "name": "color", + "type": "String", + "default": "undefined", + "source": null + }, + { + "name": "size", + "type": [ + "Number", + "String" + ], + "default": 40, + "source": null + } + ], + "mixins": [], + "slots": [ + "default" + ] + }, + "v-list-tile-content": { + "props": [], + "mixins": [] + }, + "v-list-tile-sub-title": { + "props": [], + "mixins": [], + "slots": [ + "default" + ] + }, + "v-list-tile-title": { + "props": [], + "mixins": [], + "slots": [ + "default" + ] + }, + "v-menu": { + "props": [ + { + "name": "openDelay", + "type": [ + "Number", + "String" + ], + "default": 0, + "source": "delayable" + }, + { + "name": "closeDelay", + "type": [ + "Number", + "String" + ], + "default": 200, + "source": "delayable" + }, + { + "name": "lazy", + "type": "Boolean", + "default": "False", + "source": "bootable" + }, + { + "name": "attach", + "type": [ + "Boolean", + "String", + "Object" + ], + "default": false, + "source": "detachable" + }, + { + "name": "contentClass", + "type": "Any", + "default": "undefined", + "source": "detachable" + }, + { + "name": "absolute", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "bottom", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "fixed", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "left", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "right", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "top", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "activator", + "type": "Any", + "default": "undefined", + "source": "menuable" + }, + { + "name": "allowOverflow", + "type": "Boolean", + "default": "False", + "source": "menuable" + }, + { + "name": "maxWidth", + "type": [ + "Number", + "String" + ], + "default": "auto", + "source": "menuable" + }, + { + "name": "minWidth", + "type": [ + "Number", + "String" + ], + "default": "undefined", + "source": "menuable" + }, + { + "name": "nudgeBottom", + "type": "Number", + "default": 0, + "source": "menuable" + }, + { + "name": "nudgeLeft", + "type": [ + "Number", + "String" + ], + "default": 0, + "source": "menuable" + }, + { + "name": "nudgeRight", + "type": [ + "Number", + "String" + ], + "default": 0, + "source": "menuable" + }, + { + "name": "nudgeTop", + "type": [ + "Number", + "String" + ], + "default": 0, + "source": "menuable" + }, + { + "name": "nudgeWidth", + "type": [ + "Number", + "String" + ], + "default": 0, + "source": "menuable" + }, + { + "name": "offsetOverflow", + "type": "Boolean", + "default": "False", + "source": "menuable" + }, + { + "name": "positionX", + "type": "Number", + "default": "undefined", + "source": "menuable" + }, + { + "name": "positionY", + "type": "Number", + "default": "undefined", + "source": "menuable" + }, + { + "name": "zIndex", + "type": [ + "Number", + "String" + ], + "default": "undefined", + "source": "menuable" + }, + { + "name": "value", + "type": "Any", + "default": "undefined", + "source": "toggleable" + }, + { + "name": "auto", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "closeOnClick", + "type": "Boolean", + "default": "True", + "source": null + }, + { + "name": "closeOnContentClick", + "type": "Boolean", + "default": "True", + "source": null + }, + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "fullWidth", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "maxHeight", + "type": "Any", + "default": "auto", + "source": null + }, + { + "name": "offsetX", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "offsetY", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "openOnClick", + "type": "Boolean", + "default": "True", + "source": null + }, + { + "name": "openOnHover", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "origin", + "type": "String", + "default": "top left", + "source": null + }, + { + "name": "transition", + "type": [ + "Boolean", + "String" + ], + "default": "menu-transition", + "source": null + } + ], + "mixins": [ + "dependent", + "delayable", + "detachable", + "bootable", + "menuable", + "positionable", + "stackable", + "themeable", + "toggleable" + ], + "slots": [ + "default", + "activator" + ] + }, + "v-navigation-drawer": { + "props": [ + { + "name": "absolute", + "type": "Boolean", + "default": "False", + "source": "applicationable" + }, + { + "name": "app", + "type": "Boolean", + "default": "False", + "source": "applicationable" + }, + { + "name": "fixed", + "type": "Boolean", + "default": "False", + "source": "applicationable" + }, + { + "name": "hideOverlay", + "type": "Boolean", + "default": "False", + "source": "overlayable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "clipped", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "disableRouteWatcher", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "disableResizeWatcher", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "height", + "type": [ + "Number", + "String" + ], + "default": "100%", + "source": null + }, + { + "name": "floating", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "miniVariant", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "miniVariantWidth", + "type": [ + "Number", + "String" + ], + "default": 80, + "source": null + }, + { + "name": "mobileBreakPoint", + "type": [ + "Number", + "String" + ], + "default": 1264, + "source": null + }, + { + "name": "permanent", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "right", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "stateless", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "temporary", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "touchless", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "width", + "type": [ + "Number", + "String" + ], + "default": 300, + "source": null + }, + { + "name": "value", + "type": "Any", + "default": "undefined", + "source": null + } + ], + "mixins": [ + "applicationable", + "overlayable", + "ssr-bootable", + "themeable" + ], + "slots": [ + "default" + ] + }, + "v-pagination": { + "props": [ + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "circle", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "length", + "type": "Number", + "default": 0, + "source": null + }, + { + "name": "totalVisible", + "type": [ + "Number", + "String" + ], + "default": "undefined", + "source": null + }, + { + "name": "nextIcon", + "type": "String", + "default": "chevron_right", + "source": null + }, + { + "name": "prevIcon", + "type": "String", + "default": "chevron_left", + "source": null + }, + { + "name": "value", + "type": "Number", + "default": 0, + "source": null + } + ], + "mixins": [ + "colorable" + ] + }, + "v-parallax": { + "props": [ + { + "name": "alt", + "type": "String", + "default": "undefined", + "source": null + }, + { + "name": "height", + "type": [ + "String", + "Number" + ], + "default": 500, + "source": null + }, + { + "name": "src", + "type": "String", + "default": "undefined", + "source": null + } + ], + "mixins": [ + "translatable" + ], + "slots": [ + "default" + ] + }, + "v-progress-circular": { + "props": [ + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "button", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "fill", + "type": "String", + "source": null + }, + { + "name": "indeterminate", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "rotate", + "type": "Number", + "default": 0, + "source": null + }, + { + "name": "size", + "type": [ + "Number", + "String" + ], + "default": 32, + "source": null + }, + { + "name": "width", + "type": "Number", + "default": 4, + "source": null + }, + { + "name": "value", + "type": "Number", + "default": 0, + "source": null + } + ], + "mixins": [ + "colorable" + ], + "slots": [ + "default" + ] + }, + "v-progress-linear": { + "props": [ + { + "name": "color", + "type": "String", + "default": "primary", + "source": "colorable" + }, + { + "name": "active", + "type": "Boolean", + "default": "True", + "source": null + }, + { + "name": "backgroundColor", + "type": "String", + "default": "undefined", + "source": null + }, + { + "name": "backgroundOpacity", + "type": [ + "Number", + "String" + ], + "default": "undefined", + "source": null + }, + { + "name": "bufferValue", + "type": [ + "Number", + "String" + ], + "default": 100, + "source": null + }, + { + "name": "height", + "type": [ + "Number", + "String" + ], + "default": 7, + "source": null + }, + { + "name": "indeterminate", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "query", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "value", + "type": [ + "Number", + "String" + ], + "default": 0, + "source": null + } + ], + "mixins": [ + "colorable" + ] + }, + "v-radio-group": { + "props": [ + { + "name": "loading", + "type": [ + "Boolean", + "String" + ], + "default": false, + "source": "loadable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "error", + "type": "Boolean", + "default": "False", + "source": "validatable" + }, + { + "name": "errorMessages", + "type": [ + "String", + "Array" + ], + "source": "validatable" + }, + { + "name": "rules", + "type": "Array", + "source": "validatable" + }, + { + "name": "validateOnBlur", + "type": "Boolean", + "default": "False", + "source": "validatable" + }, + { + "name": "appendIcon", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "appendIconCb", + "type": "Any", + "default": "undefined", + "source": "input" + }, + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "hint", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "hideDetails", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "label", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "persistentHint", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "placeholder", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "prependIcon", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "prependIconCb", + "type": "Any", + "default": "undefined", + "source": "input" + }, + { + "name": "readonly", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "required", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "tabindex", + "type": "Any", + "default": 0, + "source": "input" + }, + { + "name": "toggleKeys", + "type": "Array", + "source": "input" + }, + { + "name": "value", + "type": "Any", + "default": "undefined", + "source": "input" + }, + { + "name": "column", + "type": "Boolean", + "default": "True", + "source": null + }, + { + "name": "inputValue", + "type": "Any", + "default": "undefined", + "source": null + }, + { + "name": "mandatory", + "type": "Boolean", + "default": "True", + "source": null + }, + { + "name": "name", + "type": "String", + "default": "undefined", + "source": null + }, + { + "name": "row", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [ + "input", + "loadable", + "themeable", + "validatable", + "registerable-provide" + ], + "slots": [ + "label" + ] + }, + "v-radio": { + "props": [ + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "ripple", + "type": [ + "Boolean", + "Object" + ], + "default": true, + "source": "rippleable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "value", + "type": "Any", + "default": "undefined", + "source": null + }, + { + "name": "label", + "type": "String", + "default": "undefined", + "source": null + } + ], + "mixins": [ + "colorable", + "rippleable", + "registerable-inject", + "tab-focusable", + "themeable" + ] + }, + "v-select": { + "props": [ + { + "name": "filter", + "type": "Any", + "source": null + }, + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "noDataText", + "type": "String", + "default": "No data available", + "source": "filterable" + }, + { + "name": "loading", + "type": [ + "Boolean", + "String" + ], + "default": false, + "source": "loadable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "error", + "type": "Boolean", + "default": "False", + "source": "validatable" + }, + { + "name": "errorMessages", + "type": [ + "String", + "Array" + ], + "source": "validatable" + }, + { + "name": "rules", + "type": "Array", + "source": "validatable" + }, + { + "name": "validateOnBlur", + "type": "Boolean", + "default": "False", + "source": "validatable" + }, + { + "name": "appendIcon", + "type": "String", + "default": "arrow_drop_down", + "source": "input" + }, + { + "name": "appendIconCb", + "type": "Any", + "default": "undefined", + "source": "input" + }, + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "hint", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "hideDetails", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "label", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "persistentHint", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "placeholder", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "prependIcon", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "prependIconCb", + "type": "Any", + "default": "undefined", + "source": "input" + }, + { + "name": "readonly", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "required", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "tabindex", + "type": "Any", + "default": 0, + "source": "input" + }, + { + "name": "toggleKeys", + "type": "Array", + "source": "input" + }, + { + "name": "value", + "type": "Any", + "default": "undefined", + "source": "input" + }, + { + "name": "dontFillMaskBlanks", + "type": "Boolean", + "default": "False", + "source": "maskable" + }, + { + "name": "mask", + "type": [ + "Object", + "String" + ], + "default": "undefined", + "source": "maskable" + }, + { + "name": "returnMaskedValue", + "type": "Boolean", + "default": "False", + "source": "maskable" + }, + { + "name": "attach", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "auto", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "autocomplete", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "browserAutocomplete", + "type": "String", + "default": "on", + "source": null + }, + { + "name": "cacheItems", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "chips", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "clearable", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "combobox", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "contentClass", + "type": "String", + "default": "undefined", + "source": null + }, + { + "name": "debounceSearch", + "type": [ + "Number", + "String" + ], + "default": 200, + "source": null + }, + { + "name": "deletableChips", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "dense", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "editable", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "hideSelected", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "items", + "type": "Array", + "source": null + }, + { + "name": "itemAvatar", + "type": "String", + "default": "avatar", + "source": null + }, + { + "name": "itemDisabled", + "type": "String", + "default": "disabled", + "source": null + }, + { + "name": "itemText", + "type": "String", + "default": "text", + "source": null + }, + { + "name": "itemValue", + "type": "String", + "default": "value", + "source": null + }, + { + "name": "maxHeight", + "type": [ + "Number", + "String" + ], + "default": 300, + "source": null + }, + { + "name": "minWidth", + "type": [ + "Boolean", + "Number", + "String" + ], + "default": false, + "source": null + }, + { + "name": "multiple", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "multiLine", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "openOnClear", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "overflow", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "returnObject", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "searchInput", + "type": "Any", + "default": "undefined", + "source": null + }, + { + "name": "segmented", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "singleLine", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "tags", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "valueComparator", + "type": "Any", + "source": null + }, + { + "name": "flat", + "type": "Boolean", + "default": "False", + "source": "soloable" + }, + { + "name": "soloInverted", + "type": "Boolean", + "default": "False", + "source": "soloable" + }, + { + "name": "solo", + "type": "Boolean", + "default": "False", + "source": "soloable" + } + ], + "mixins": [ + "colorable", + "dependent", + "filterable", + "input", + "loadable", + "themeable", + "validatable", + "maskable", + "soloable" + ], + "slots": [ + "label", + "progress", + "noData" + ], + "scopedSlots": [ + "selection", + "item" + ] + }, + "v-slider": { + "props": [ + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "loading", + "type": [ + "Boolean", + "String" + ], + "default": false, + "source": "loadable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "error", + "type": "Boolean", + "default": "False", + "source": "validatable" + }, + { + "name": "errorMessages", + "type": [ + "String", + "Array" + ], + "source": "validatable" + }, + { + "name": "rules", + "type": "Array", + "source": "validatable" + }, + { + "name": "validateOnBlur", + "type": "Boolean", + "default": "False", + "source": "validatable" + }, + { + "name": "appendIcon", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "appendIconCb", + "type": "Any", + "default": "undefined", + "source": "input" + }, + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "hint", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "hideDetails", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "label", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "persistentHint", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "placeholder", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "prependIcon", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "prependIconCb", + "type": "Any", + "default": "undefined", + "source": "input" + }, + { + "name": "readonly", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "required", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "tabindex", + "type": "Any", + "default": 0, + "source": "input" + }, + { + "name": "toggleKeys", + "type": "Array", + "source": "input" + }, + { + "name": "value", + "type": [ + "Number", + "String" + ], + "default": "undefined", + "source": "input" + }, + { + "name": "min", + "type": [ + "Number", + "String" + ], + "default": 0, + "source": null + }, + { + "name": "max", + "type": [ + "Number", + "String" + ], + "default": 100, + "source": null + }, + { + "name": "step", + "type": [ + "Number", + "String" + ], + "default": 1, + "source": null + }, + { + "name": "ticks", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "thumbColor", + "type": "String", + "default": "undefined", + "source": null + }, + { + "name": "thumbLabel", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "trackColor", + "type": "String", + "default": "undefined", + "source": null + } + ], + "mixins": [ + "colorable", + "input", + "loadable", + "themeable", + "validatable" + ] + }, + "v-snackbar": { + "props": [ + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "value", + "type": "Any", + "default": "undefined", + "source": "toggleable" + }, + { + "name": "absolute", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "bottom", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "left", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "multiLine", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "right", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "top", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "timeout", + "type": "Number", + "default": 6000, + "source": null + }, + { + "name": "vertical", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [ + "colorable", + "toggleable" + ], + "slots": [ + "default" + ] + }, + "v-speed-dial": { + "props": [ + { + "name": "absolute", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "bottom", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "fixed", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "left", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "right", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "top", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "value", + "type": "Any", + "default": "undefined", + "source": "toggleable" + }, + { + "name": "direction", + "type": "String", + "default": "top", + "source": null + }, + { + "name": "hover", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "transition", + "type": "String", + "default": "scale-transition", + "source": null + } + ], + "mixins": [ + "positionable", + "toggleable" + ] + }, + "v-stepper": { + "props": [ + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "nonLinear", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "altLabels", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "vertical", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "value", + "type": [ + "Number", + "String" + ], + "default": "undefined", + "source": null + } + ], + "mixins": [ + "themeable" + ], + "slots": [ + "default" + ] + }, + "v-stepper-content": { + "props": [ + { + "name": "step", + "type": [ + "Number", + "String" + ], + "default": "undefined", + "source": null + } + ], + "mixins": [], + "slots": [ + "default" + ] + }, + "v-stepper-step": { + "props": [ + { + "name": "complete", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "completeIcon", + "type": "String", + "default": "check", + "source": null + }, + { + "name": "editIcon", + "type": "String", + "default": "edit", + "source": null + }, + { + "name": "errorIcon", + "type": "String", + "default": "warning", + "source": null + }, + { + "name": "editable", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "rules", + "type": "Array", + "source": null + }, + { + "name": "step", + "type": [ + "Number", + "String" + ], + "default": "undefined", + "source": null + } + ], + "mixins": [], + "slots": [ + "default" + ] + }, + "v-stepper-header": { + "props": [], + "mixins": [], + "slots": [ + "default" + ] + }, + "v-stepper-items": { + "props": [], + "mixins": [], + "slots": [ + "default" + ] + }, + "v-subheader": { + "props": [ + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "inset", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [ + "themeable" + ], + "slots": [ + "default" + ] + }, + "v-switch": { + "props": [ + { + "name": "ripple", + "type": [ + "Boolean", + "Object" + ], + "default": true, + "source": "rippleable" + }, + { + "name": "loading", + "type": [ + "Boolean", + "String" + ], + "default": false, + "source": "loadable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "error", + "type": "Boolean", + "default": "False", + "source": "validatable" + }, + { + "name": "errorMessages", + "type": [ + "String", + "Array" + ], + "source": "validatable" + }, + { + "name": "rules", + "type": "Array", + "source": "validatable" + }, + { + "name": "validateOnBlur", + "type": "Boolean", + "default": "False", + "source": "validatable" + }, + { + "name": "appendIcon", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "appendIconCb", + "type": "Any", + "default": "undefined", + "source": "input" + }, + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "hint", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "hideDetails", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "label", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "persistentHint", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "placeholder", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "prependIcon", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "prependIconCb", + "type": "Any", + "default": "undefined", + "source": "input" + }, + { + "name": "readonly", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "required", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "tabindex", + "type": "Any", + "default": 0, + "source": "input" + }, + { + "name": "toggleKeys", + "type": "Array", + "source": "input" + }, + { + "name": "value", + "type": "Any", + "default": "undefined", + "source": "input" + }, + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "id", + "type": "String", + "default": "undefined", + "source": "selectable" + }, + { + "name": "inputValue", + "type": "Any", + "default": "undefined", + "source": "selectable" + }, + { + "name": "falseValue", + "type": "Any", + "default": "undefined", + "source": "selectable" + }, + { + "name": "trueValue", + "type": "Any", + "default": "undefined", + "source": "selectable" + } + ], + "mixins": [ + "rippleable", + "selectable", + "input", + "loadable", + "themeable", + "validatable", + "colorable" + ], + "slots": [ + "label" + ] + }, + "v-system-bar": { + "props": [ + { + "name": "absolute", + "type": "Boolean", + "default": "False", + "source": "applicationable" + }, + { + "name": "app", + "type": "Boolean", + "default": "False", + "source": "applicationable" + }, + { + "name": "fixed", + "type": "Boolean", + "default": "False", + "source": "applicationable" + }, + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "height", + "type": [ + "Number", + "String" + ], + "default": "undefined", + "source": null + }, + { + "name": "lightsOut", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "status", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "window", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [ + "applicationable", + "colorable", + "themeable" + ] + }, + "v-tabs": { + "props": [ + { + "name": "centered", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "fixed", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "grow", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "icons", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "mobileBreakPoint", + "type": [ + "Number", + "String" + ], + "default": 1280, + "source": null + }, + { + "name": "value", + "type": "String", + "default": "undefined", + "source": null + }, + { + "name": "scrollable", + "type": "Boolean", + "default": "True", + "source": null + } + ], + "mixins": [] + }, + "v-tabs-bar": { + "props": [ + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + } + ], + "mixins": [ + "colorable", + "themeable" + ] + }, + "v-tabs-content": { + "props": [ + { + "name": "lazy", + "type": "Boolean", + "default": "False", + "source": "bootable" + }, + { + "name": "id", + "type": "String", + "default": "undefined", + "source": null + }, + { + "name": "transition", + "type": [ + "Boolean", + "String" + ], + "default": "tab-transition", + "source": null + }, + { + "name": "reverseTransition", + "type": [ + "Boolean", + "String" + ], + "default": "tab-reverse-transition", + "source": null + } + ], + "mixins": [ + "bootable" + ] + }, + "v-tabs-item": { + "props": [ + { + "name": "activeClass", + "type": "String", + "default": "tabs__item--active", + "source": "routable" + }, + { + "name": "append", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "exact", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "exactActiveClass", + "type": "String", + "default": "undefined", + "source": "routable" + }, + { + "name": "href", + "type": [ + "String", + "Object" + ], + "default": "undefined", + "source": "routable" + }, + { + "name": "to", + "type": [ + "String", + "Object" + ], + "default": "undefined", + "source": "routable" + }, + { + "name": "nuxt", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "replace", + "type": "Boolean", + "default": "False", + "source": "routable" + }, + { + "name": "ripple", + "type": [ + "Boolean", + "Object" + ], + "default": "undefined", + "source": "routable" + }, + { + "name": "tag", + "type": "String", + "default": "undefined", + "source": "routable" + }, + { + "name": "target", + "type": "String", + "default": "undefined", + "source": "routable" + } + ], + "mixins": [ + "routable" + ] + }, + "v-tabs-items": { + "props": [ + { + "name": "cycle", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "touchless", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [] + }, + "v-tabs-slider": { + "props": [ + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + } + ], + "mixins": [ + "colorable" + ] + }, + "v-text-field": { + "props": [ + { + "name": "color", + "type": "String", + "default": "primary", + "source": "colorable" + }, + { + "name": "loading", + "type": [ + "Boolean", + "String" + ], + "default": false, + "source": "loadable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "error", + "type": "Boolean", + "default": "False", + "source": "validatable" + }, + { + "name": "errorMessages", + "type": [ + "String", + "Array" + ], + "source": "validatable" + }, + { + "name": "rules", + "type": "Array", + "source": "validatable" + }, + { + "name": "validateOnBlur", + "type": "Boolean", + "default": "False", + "source": "validatable" + }, + { + "name": "appendIcon", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "appendIconCb", + "type": "Any", + "default": "undefined", + "source": "input" + }, + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "hint", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "hideDetails", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "label", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "persistentHint", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "placeholder", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "prependIcon", + "type": "String", + "default": "undefined", + "source": "input" + }, + { + "name": "prependIconCb", + "type": "Any", + "default": "undefined", + "source": "input" + }, + { + "name": "readonly", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "required", + "type": "Boolean", + "default": "False", + "source": "input" + }, + { + "name": "tabindex", + "type": "Any", + "default": 0, + "source": "input" + }, + { + "name": "toggleKeys", + "type": "Array", + "source": "input" + }, + { + "name": "value", + "type": "Any", + "default": "undefined", + "source": "input" + }, + { + "name": "dontFillMaskBlanks", + "type": "Boolean", + "default": "False", + "source": "maskable" + }, + { + "name": "mask", + "type": [ + "Object", + "String" + ], + "default": "undefined", + "source": "maskable" + }, + { + "name": "returnMaskedValue", + "type": "Boolean", + "default": "False", + "source": "maskable" + }, + { + "name": "flat", + "type": "Boolean", + "default": "False", + "source": "soloable" + }, + { + "name": "soloInverted", + "type": "Boolean", + "default": "False", + "source": "soloable" + }, + { + "name": "solo", + "type": "Boolean", + "default": "False", + "source": "soloable" + }, + { + "name": "autofocus", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "autoGrow", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "box", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "clearable", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "counter", + "type": [ + "Boolean", + "Number", + "String" + ], + "default": "undefined", + "source": null + }, + { + "name": "fullWidth", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "multiLine", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "prefix", + "type": "String", + "default": "undefined", + "source": null + }, + { + "name": "rows", + "type": "Any", + "default": 5, + "source": null + }, + { + "name": "singleLine", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "suffix", + "type": "String", + "default": "undefined", + "source": null + }, + { + "name": "textarea", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "type", + "type": "String", + "default": "text", + "source": null + } + ], + "mixins": [ + "colorable", + "input", + "loadable", + "themeable", + "validatable", + "maskable", + "soloable" + ] + }, + "v-time-picker": { + "props": [ + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "actions", + "type": "Boolean", + "default": "False", + "source": "picker" + }, + { + "name": "autosave", + "type": "Boolean", + "default": "False", + "source": "picker" + }, + { + "name": "headerColor", + "type": "String", + "default": "undefined", + "source": "picker" + }, + { + "name": "landscape", + "type": "Boolean", + "default": "False", + "source": "picker" + }, + { + "name": "noTitle", + "type": "Boolean", + "default": "False", + "source": "picker" + }, + { + "name": "scrollable", + "type": "Boolean", + "default": "False", + "source": "picker" + }, + { + "name": "value", + "type": "Any", + "default": "undefined", + "source": "picker" + }, + { + "name": "format", + "type": "String", + "default": "ampm", + "source": null + }, + { + "name": "allowedHours", + "type": [ + "Array", + "Object", + "Any" + ], + "source": null + }, + { + "name": "allowedMinutes", + "type": [ + "Array", + "Object", + "Any" + ], + "source": null + } + ], + "mixins": [ + "picker", + "colorable", + "themeable" + ] + }, + "v-toolbar": { + "props": [ + { + "name": "absolute", + "type": "Boolean", + "default": "False", + "source": "applicationable" + }, + { + "name": "app", + "type": "Boolean", + "default": "False", + "source": "applicationable" + }, + { + "name": "fixed", + "type": "Boolean", + "default": "False", + "source": "applicationable" + }, + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "card", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "clippedLeft", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "clippedRight", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "dense", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "extended", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "extensionHeight", + "type": [ + "Number", + "String" + ], + "default": "undefined", + "source": null + }, + { + "name": "flat", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "floating", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "height", + "type": [ + "Number", + "String" + ], + "default": "undefined", + "source": null + }, + { + "name": "invertedScroll", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "manualScroll", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "prominent", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "scrollOffScreen", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "scrollTarget", + "type": "String", + "default": "undefined", + "source": null + }, + { + "name": "scrollThreshold", + "type": "Number", + "default": 300, + "source": null + }, + { + "name": "tabs", + "type": "Boolean", + "default": "False", + "source": null + } + ], + "mixins": [ + "applicationable", + "colorable", + "ssr-bootable", + "themeable" + ], + "slots": [ + "default", + "extension" + ] + }, + "v-toolbar-items": { + "props": [], + "mixins": [] + }, + "v-toolbar-title": { + "props": [], + "mixins": [] + }, + "v-toolbar-side-icon": { + "props": [], + "mixins": [] + }, + "v-tooltip": { + "props": [ + { + "name": "color", + "type": "String", + "default": "undefined", + "source": "colorable" + }, + { + "name": "openDelay", + "type": [ + "Number", + "String" + ], + "default": 200, + "source": "delayable" + }, + { + "name": "closeDelay", + "type": [ + "Number", + "String" + ], + "default": 200, + "source": "delayable" + }, + { + "name": "lazy", + "type": "Boolean", + "default": "False", + "source": "bootable" + }, + { + "name": "attach", + "type": [ + "Boolean", + "String", + "Object" + ], + "default": false, + "source": "detachable" + }, + { + "name": "contentClass", + "type": "Any", + "default": "undefined", + "source": "detachable" + }, + { + "name": "absolute", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "bottom", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "fixed", + "type": "Boolean", + "default": "True", + "source": "positionable" + }, + { + "name": "left", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "right", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "top", + "type": "Boolean", + "default": "False", + "source": "positionable" + }, + { + "name": "dark", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "light", + "type": "Boolean", + "default": "False", + "source": "themeable" + }, + { + "name": "activator", + "type": "Any", + "default": "undefined", + "source": "menuable" + }, + { + "name": "allowOverflow", + "type": "Boolean", + "default": "False", + "source": "menuable" + }, + { + "name": "maxWidth", + "type": [ + "Number", + "String" + ], + "default": "auto", + "source": "menuable" + }, + { + "name": "minWidth", + "type": [ + "Number", + "String" + ], + "default": "undefined", + "source": "menuable" + }, + { + "name": "nudgeBottom", + "type": "Number", + "default": 0, + "source": "menuable" + }, + { + "name": "nudgeLeft", + "type": [ + "Number", + "String" + ], + "default": 0, + "source": "menuable" + }, + { + "name": "nudgeRight", + "type": [ + "Number", + "String" + ], + "default": 0, + "source": "menuable" + }, + { + "name": "nudgeTop", + "type": [ + "Number", + "String" + ], + "default": 0, + "source": "menuable" + }, + { + "name": "nudgeWidth", + "type": [ + "Number", + "String" + ], + "default": 0, + "source": "menuable" + }, + { + "name": "offsetOverflow", + "type": "Boolean", + "default": "False", + "source": "menuable" + }, + { + "name": "positionX", + "type": "Number", + "default": "undefined", + "source": "menuable" + }, + { + "name": "positionY", + "type": "Number", + "default": "undefined", + "source": "menuable" + }, + { + "name": "zIndex", + "type": "Any", + "default": "undefined", + "source": "menuable" + }, + { + "name": "value", + "type": "Any", + "default": "undefined", + "source": "toggleable" + }, + { + "name": "debounce", + "type": [ + "Number", + "String" + ], + "default": 0, + "source": null + }, + { + "name": "disabled", + "type": "Boolean", + "default": "False", + "source": null + }, + { + "name": "tag", + "type": "String", + "default": "span", + "source": null + }, + { + "name": "transition", + "type": "String", + "default": "undefined", + "source": null + } + ], + "mixins": [ + "colorable", + "delayable", + "dependent", + "detachable", + "bootable", + "menuable", + "positionable", + "stackable", + "themeable", + "toggleable" + ], + "slots": [ + "default", + "activator" + ] + }, + "v-bottom-sheet-transition": { + "props": [ + { + "name": "origin", + "type": "String", + "default": "top center 0", + "source": null + } + ], + "mixins": [] + }, + "v-carousel-transition": { + "props": [ + { + "name": "origin", + "type": "String", + "default": "top center 0", + "source": null + } + ], + "mixins": [] + }, + "v-carousel-reverse-transition": { + "props": [ + { + "name": "origin", + "type": "String", + "default": "top center 0", + "source": null + } + ], + "mixins": [] + }, + "v-dialog-transition": { + "props": [ + { + "name": "origin", + "type": "String", + "default": "top center 0", + "source": null + } + ], + "mixins": [] + }, + "v-dialog-bottom-transition": { + "props": [ + { + "name": "origin", + "type": "String", + "default": "top center 0", + "source": null + } + ], + "mixins": [] + }, + "v-fab-transition": { + "props": [ + { + "name": "origin", + "type": "String", + "default": "center center", + "source": null + } + ], + "mixins": [] + }, + "v-fade-transition": { + "props": [ + { + "name": "origin", + "type": "String", + "default": "top center 0", + "source": null + } + ], + "mixins": [] + }, + "v-menu-transition": { + "props": [ + { + "name": "origin", + "type": "String", + "default": "top center 0", + "source": null + } + ], + "mixins": [] + }, + "v-scale-transition": { + "props": [ + { + "name": "origin", + "type": "String", + "default": "top center 0", + "source": null + } + ], + "mixins": [] + }, + "v-slide-x-transition": { + "props": [ + { + "name": "origin", + "type": "String", + "default": "top center 0", + "source": null + } + ], + "mixins": [] + }, + "v-slide-x-reverse-transition": { + "props": [ + { + "name": "origin", + "type": "String", + "default": "top center 0", + "source": null + } + ], + "mixins": [] + }, + "v-slide-y-transition": { + "props": [ + { + "name": "origin", + "type": "String", + "default": "top center 0", + "source": null + } + ], + "mixins": [] + }, + "v-slide-y-reverse-transition": { + "props": [ + { + "name": "origin", + "type": "String", + "default": "top center 0", + "source": null + } + ], + "mixins": [] + }, + "v-tab-reverse-transition": { + "props": [ + { + "name": "origin", + "type": "String", + "default": "top center 0", + "source": null + } + ], + "mixins": [] + }, + "v-tab-transition": { + "props": [ + { + "name": "origin", + "type": "String", + "default": "top center 0", + "source": null + } + ], + "mixins": [] + }, + "v-expand-transition": { + "props": [ + { + "name": "css", + "type": "Boolean", + "default": "True", + "source": null + }, + { + "name": "mode", + "type": "String", + "default": "in-out", + "source": null + } + ], + "mixins": [] + }, + "v-row-expand-transition": { + "props": [ + { + "name": "css", + "type": "Boolean", + "default": "True", + "source": null + }, + { + "name": "mode", + "type": "String", + "default": "in-out", + "source": null + } + ], + "mixins": [] + } +} \ No newline at end of file diff --git a/packages/api-generator/src/index.js b/packages/api-generator/src/index.js index 33b61b775aa..55766877fda 100755 --- a/packages/api-generator/src/index.js +++ b/packages/api-generator/src/index.js @@ -53,49 +53,69 @@ function getPropDefault (def, type) { } } -function genComponent (name, prop) { +function getPropSource (name, mixins) { + let source = null + for (let i = 0; i < mixins.length; i++) { + const mixin = mixins[i] + if (mixin.name) { + const source = Object.keys(mixin.props || {}).find(p => p === name) && mixin.name + let found = getPropSource(name, mixin.mixins || []) || source + if (found) return found + } + } + + return source +} + +function genProp (name, props, mixins) { + const prop = props[name] const type = getPropType(prop.type) + const source = getPropSource(name, mixins) return { name, type, - default: getPropDefault(prop.default, type) + default: getPropDefault(prop.default, type), + source } } function parseComponent (component) { return { - props: parseProps(component) + props: parseProps(component), + mixins: parseMixins(component) } } -function parseProps (component, array = []) { +function parseProps (component, array = [], mixin = false) { const mixins = component.mixins || [] const props = component.props || {} Object.keys(props).forEach(prop => { - array.push(genComponent(prop, props[prop])) + let generated = genProp(prop, props, mixins) + array.push(generated) }) - mixins.forEach(mixin => { - array = array.concat(parseMixin(mixin, array)) - }) + return array +} - const exists = [] +function parseMixins (component) { + if (!component.mixins) return [] - return array.filter(item => { - if (!exists.includes(item.name)) { - exists.push(item.name) + let mixins = [] + for (let i = 0; i < component.mixins.length; i++) { + const mixin = component.mixins[i] + + if (mixin.name) { + mixins.push(mixin.name) - return true + if (mixin.mixins) { + mixins = mixins.concat(parseMixins(mixin)) + } } - - return false - }) -} - -function parseMixin (mixin, array) { - return parseProps(mixin) + } + + return mixins } function mapComponent (component, mapping) { @@ -114,7 +134,6 @@ Object.keys(installedComponents).forEach(key => { if (map[name]) { mapComponent(options, map[name]) - console.log(options) } components[name] = options diff --git a/packages/api-generator/src/map.js b/packages/api-generator/src/map.js index e3609f18a8d..b4fd6d14631 100755 --- a/packages/api-generator/src/map.js +++ b/packages/api-generator/src/map.js @@ -38,12 +38,24 @@ module.exports = { 'v-chip': { slots: ['default'] }, + 'v-data-iterator': { + slots: [ + { name: 'footer', source: 'data-iterable' } + ], + scopedSlots: [ + { name: 'items', props: ['item', 'index', 'selected', 'expanded'], source: 'data-iterable' }, + { name: 'pageText', props: ['pageStart', 'pageStop', 'itemsLength'], source: 'data-iterable' } + ] + }, 'v-data-table': { + slots: [ + { name: 'footer', source: 'data-iterable' } + ], scopedSlots: [ - 'headerCell', - 'headers', - 'items', - 'pageText' + { name: 'headerCell', props: ['header'] }, + { name: 'headers', props: ['headers', 'indeterminate', 'all'] }, + { name: 'items', props: ['item', 'index', 'selected', 'expanded'], source: 'data-iterable' }, + { name: 'pageText', props: ['pageStart', 'pageStop', 'itemsLength'], source: 'data-iterable' } ] }, 'v-dialog': {
4ddca5f406ceb2f393c8cef23e31f949ec95c2ff
2022-04-02 19:39:14
nekosaur
fix(VRating): regression when using half-increments
false
regression when using half-increments
fix
diff --git a/packages/docs/src/examples/v-rating/misc-card.vue b/packages/docs/src/examples/v-rating/misc-card.vue index c6baead886c..bcb7d641dc5 100644 --- a/packages/docs/src/examples/v-rating/misc-card.vue +++ b/packages/docs/src/examples/v-rating/misc-card.vue @@ -5,28 +5,24 @@ elevation="20" max-width="400" > - <v-row justify="space-between"> - <v-col cols="8"> - <v-card-title> - <div> - <div class="text-h5"> - Halycon Days - </div> - <div>Ellie Goulding</div> - - <div>(2013)</div> - </div> - </v-card-title> - </v-col> + <div class="d-flex justify-between"> + <v-card-title class="flex-grow-1 flex-column align-start"> + <div class="text-h5"> + Halycon Days + </div> + <div class="text-h6 font-weight-thin">Ellie Goulding</div> + + <div class="text-h6 font-weight-thin">(2013)</div> + </v-card-title> <v-img - class="shrink ma-2" contain height="125px" src="https://cdn.vuetifyjs.com/images/cards/halcyon.png" style="flex-basis: 125px" + class="flex-grow-0" ></v-img> - </v-row> + </div> <v-divider></v-divider> @@ -41,9 +37,8 @@ <v-rating v-model="rating" - background-color="white" - color="yellow-accent-4" - density="compact" + color="white" + active-color="yellow-accent-4" half-increments hover size="18" @@ -54,6 +49,6 @@ <script> export default { - data: () => ({ rating: 4.3 }), + data: () => ({ rating: 4.5 }), } </script> diff --git a/packages/docs/src/examples/v-rating/prop-half-increments.vue b/packages/docs/src/examples/v-rating/prop-half-increments.vue index 8dcaba54220..5cfec603b2c 100644 --- a/packages/docs/src/examples/v-rating/prop-half-increments.vue +++ b/packages/docs/src/examples/v-rating/prop-half-increments.vue @@ -2,8 +2,10 @@ <div class="text-center"> <v-rating v-model="rating" + hover half-increments ></v-rating> + <pre>{{ rating }}</pre> </div> </template> diff --git a/packages/docs/src/pages/en/components/ratings.md b/packages/docs/src/pages/en/components/ratings.md index c9155d5b649..4f0093af41a 100644 --- a/packages/docs/src/pages/en/components/ratings.md +++ b/packages/docs/src/pages/en/components/ratings.md @@ -78,9 +78,9 @@ Change the number of items by modifying the the **length** prop. <example file="v-rating/prop-length" /> -#### Incremented +#### Half increments -A `v-rating` component has 3 types of icons, **full-icon**, **half-icon** (with the **half-increments** prop) and **empty-icon**. +The **half-increments** prop increases the granularity of the ratings, allow for `.5` values as well. <example file="v-rating/prop-half-increments" /> diff --git a/packages/vuetify/src/components/VRating/VRating.sass b/packages/vuetify/src/components/VRating/VRating.sass index 0988369801e..8af40e3649b 100644 --- a/packages/vuetify/src/components/VRating/VRating.sass +++ b/packages/vuetify/src/components/VRating/VRating.sass @@ -36,7 +36,7 @@ &:hover:not(.v-rating__item--focused) .v-rating--hover & - .v-icon + .v-btn transform: $rating-item-icon-transform &--focused @@ -47,7 +47,7 @@ &--half overflow: hidden position: absolute - width: 50% + clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%) z-index: 1 .v-btn__overlay, diff --git a/packages/vuetify/src/components/VRating/__tests__/VRating.spec.cy.tsx b/packages/vuetify/src/components/VRating/__tests__/VRating.spec.cy.tsx index 0cc567277e9..0c3a86f3358 100644 --- a/packages/vuetify/src/components/VRating/__tests__/VRating.spec.cy.tsx +++ b/packages/vuetify/src/components/VRating/__tests__/VRating.spec.cy.tsx @@ -134,4 +134,18 @@ describe('VRating', () => { cy.emitted('.v-rating', 'update:modelValue').should('deep.equal', [[3.5]]) }) + + it('should support half-increments and custom size', () => { + cy.mount(() => ( + <Application> + <VRating half-increments size="64" /> + </Application> + )) + + cy.get('.v-rating__item input').should('have.length', 10) + + cy.get('.v-rating__item .v-rating__item--half').eq(3).click() + + cy.emitted('.v-rating', 'update:modelValue').should('deep.equal', [[3.5]]) + }) })
9e54b9667bacf3bc1ee6769ecaa38addeab6dd90
2023-09-19 22:45:19
John Leider
docs(GitHubLogin): add fallback for malformed sponsor field
false
add fallback for malformed sponsor field
docs
diff --git a/packages/docs/src/components/app/GitHubLogin.vue b/packages/docs/src/components/app/GitHubLogin.vue index e5be554836f..dad7a307164 100644 --- a/packages/docs/src/components/app/GitHubLogin.vue +++ b/packages/docs/src/components/app/GitHubLogin.vue @@ -77,7 +77,9 @@ const isSponsoring = computed(() => { if (!auth.sponsor) return false - return auth.sponsor.find(sponsor => sponsor.tier.monthlyPriceInDollars >= 1) + const sponsor = Array.isArray(auth.sponsor) ? auth.sponsor : [auth.sponsor] + + return sponsor.find(s => s.tier.monthlyPriceInDollars >= 1) }) function onClickLogout () {
e36f7bcb40b960109542f0d31fec59c289dd5c47
2024-05-13 22:39:08
Adrian D. Alvarez
fix(VSwitch): render in forced-colors mode (#19703)
false
render in forced-colors mode (#19703)
fix
diff --git a/packages/vuetify/src/components/VSwitch/VSwitch.sass b/packages/vuetify/src/components/VSwitch/VSwitch.sass index 45b3b22055b..c9f8a7bb0bc 100644 --- a/packages/vuetify/src/components/VSwitch/VSwitch.sass +++ b/packages/vuetify/src/components/VSwitch/VSwitch.sass @@ -134,3 +134,58 @@ .v-selection-control__wrapper transform: $switch-thumb-vertical-transform + +@media (forced-colors: active) + .v-switch + .v-switch__loader + .v-progress-circular + color: currentColor + + .v-switch__thumb + background-color: buttontext + + .v-switch__track, + .v-switch__thumb + border: 1px solid + color: buttontext + + &:not(.v-switch--loading):not(.v-input--disabled) + .v-selection-control--dirty + .v-switch__thumb + background-color: highlight + + &:not(.v-input--disabled) + .v-selection-control--dirty + .v-switch__track + background-color: highlight + + .v-switch__track, + .v-switch__thumb + color: highlight + + &.v-switch--inset + .v-switch__track + border-width: 2px + + &:not(.v-switch--loading):not(.v-input--disabled) + .v-selection-control--dirty + .v-switch__thumb + background-color: highlighttext + color: highlighttext + + &.v-input--disabled + .v-switch__thumb + background-color: graytext + + .v-switch__track, + .v-switch__thumb + color: graytext + + &.v-switch--loading + .v-switch__thumb + background-color: canvas + + &.v-switch--inset, + &.v-switch--indeterminate + .v-switch__thumb + border-width: 0 diff --git a/packages/vuetify/src/components/VSwitch/VSwitch.tsx b/packages/vuetify/src/components/VSwitch/VSwitch.tsx index 5e72e86a3b4..ec2abafda44 100644 --- a/packages/vuetify/src/components/VSwitch/VSwitch.tsx +++ b/packages/vuetify/src/components/VSwitch/VSwitch.tsx @@ -16,7 +16,7 @@ import { useProxiedModel } from '@/composables/proxiedModel' // Utilities import { computed, ref } from 'vue' -import { filterInputAttrs, genericComponent, getUid, propsFactory, useRender } from '@/util' +import { filterInputAttrs, genericComponent, getUid, IN_BROWSER, propsFactory, useRender } from '@/util' // Types import type { ComputedRef, Ref } from 'vue' @@ -79,6 +79,7 @@ export const VSwitch = genericComponent<new <T>( const { loaderClasses } = useLoader(props) const { isFocused, focus, blur } = useFocus(props) const control = ref<VSelectionControl>() + const isForcedColorsModeActive = IN_BROWSER && window.matchMedia('(forced-colors: active)').matches const loaderColor = computed(() => { return typeof props.loading === 'string' && props.loading !== '' @@ -158,7 +159,7 @@ export const VSwitch = genericComponent<new <T>( <div class={[ 'v-switch__track', - ...backgroundColorClasses.value, + !isForcedColorsModeActive ? backgroundColorClasses.value : undefined, ]} style={ backgroundColorStyles.value } onClick={ onTrackClick } @@ -183,7 +184,7 @@ export const VSwitch = genericComponent<new <T>( class={[ 'v-switch__thumb', { 'v-switch__thumb--filled': icon || props.loading }, - props.inset ? undefined : backgroundColorClasses.value, + props.inset || isForcedColorsModeActive ? undefined : backgroundColorClasses.value, ]} style={ props.inset ? undefined : backgroundColorStyles.value } >
3875fef24097706f9a8b7bfde3786da5a07177f0
2017-10-15 13:03:15
Jacek Karczmarczyk
fix: trigger swipe events only for proper swiping angle (#2181)
false
trigger swipe events only for proper swiping angle (#2181)
fix
diff --git a/src/directives/touch.js b/src/directives/touch.js index 516cf0ed29e..3c2be86222c 100644 --- a/src/directives/touch.js +++ b/src/directives/touch.js @@ -28,20 +28,19 @@ const touchmove = (event, wrapper) => { const handleGesture = (wrapper) => { const { touchstartX, touchendX, touchstartY, touchendY } = wrapper + const dirRatio = 0.5 + const minDistance = 16 wrapper.offsetX = touchendX - touchstartX wrapper.offsetY = touchendY - touchstartY - if (touchendX < touchstartX) { - wrapper.left && wrapper.left(wrapper) + if (Math.abs(wrapper.offsetY) < dirRatio * Math.abs(wrapper.offsetX)) { + wrapper.left && (touchendX < touchstartX - minDistance) && wrapper.left(wrapper) + wrapper.right && (touchendX > touchstartX + minDistance) && wrapper.right(wrapper) } - if (touchendX > touchstartX) { - wrapper.right && wrapper.right(wrapper) - } - if (touchendY < touchstartY) { - wrapper.up && wrapper.up(wrapper) - } - if (touchendY > touchstartY) { - wrapper.down && wrapper.down(wrapper) + + if (Math.abs(wrapper.offsetX) < dirRatio * Math.abs(wrapper.offsetY)) { + wrapper.up && (touchendY < touchstartY - minDistance) && wrapper.up(wrapper) + wrapper.down && (touchendY > touchstartY + minDistance) && wrapper.down(wrapper) } }
13cea1b9611f34050f575413e4b2b51274d26fee
2021-04-07 00:38:53
Kael
style: sort imported members (#13365)
false
sort imported members (#13365)
style
diff --git a/.eslintrc.js b/.eslintrc.js index d2dbb9df5f0..2448f1a84be 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -76,6 +76,10 @@ module.exports = { ...require('eslint-config-standard').rules.indent[2], flatTernaryExpressions: true, }], + 'sort-imports': ['warn', { + ignoreDeclarationSort: true, + ignoreCase: true, + }], 'sonarjs/cognitive-complexity': 'off', 'sonarjs/no-duplicate-string': 'off', diff --git a/packages/vuetify/src/components/VGrid/VCol.ts b/packages/vuetify/src/components/VGrid/VCol.ts index e44efbe28a1..e23af6c99a6 100644 --- a/packages/vuetify/src/components/VGrid/VCol.ts +++ b/packages/vuetify/src/components/VGrid/VCol.ts @@ -5,7 +5,7 @@ import './VGrid.sass' import { makeTagProps } from '@/composables/tag' // Utilities -import { defineComponent, computed, h, capitalize } from 'vue' +import { capitalize, computed, defineComponent, h } from 'vue' import { makeProps } from '@/util' // Types diff --git a/packages/vuetify/src/components/VImg/VImg.tsx b/packages/vuetify/src/components/VImg/VImg.tsx index d8a0f5e5f6d..c651aead4b3 100644 --- a/packages/vuetify/src/components/VImg/VImg.tsx +++ b/packages/vuetify/src/components/VImg/VImg.tsx @@ -25,11 +25,11 @@ import { makeTransitionProps } from '@/composables/transition' // Utils import { + makeProps, maybeTransition, + SUPPORTS_INTERSECTION, useDirective, useRender, - makeProps, - SUPPORTS_INTERSECTION, } from '@/util' // Types diff --git a/packages/vuetify/src/components/VLayout/VLayout.tsx b/packages/vuetify/src/components/VLayout/VLayout.tsx index 156352d901e..45e915fb6fb 100644 --- a/packages/vuetify/src/components/VLayout/VLayout.tsx +++ b/packages/vuetify/src/components/VLayout/VLayout.tsx @@ -3,7 +3,7 @@ import './VLayout.sass' // Utilities import { defineComponent } from 'vue' -import { useRender, makeProps } from '@/util' +import { makeProps, useRender } from '@/util' // Composables import { createLayout, makeLayoutProps } from '@/composables/layout' diff --git a/packages/vuetify/src/components/VLayout/VLayoutItem.tsx b/packages/vuetify/src/components/VLayout/VLayoutItem.tsx index 31c068e2604..22df21bb1df 100644 --- a/packages/vuetify/src/components/VLayout/VLayoutItem.tsx +++ b/packages/vuetify/src/components/VLayout/VLayoutItem.tsx @@ -2,7 +2,7 @@ import { makeLayoutItemProps, useLayoutItem } from '@/composables/layout' // Utilities -import { toRef, defineComponent, computed } from 'vue' +import { computed, defineComponent, toRef } from 'vue' import { makeProps } from '@/util' // Types diff --git a/packages/vuetify/src/components/VResponsive/VResponsive.tsx b/packages/vuetify/src/components/VResponsive/VResponsive.tsx index fd0df5d46ab..108e8a5ccc9 100644 --- a/packages/vuetify/src/components/VResponsive/VResponsive.tsx +++ b/packages/vuetify/src/components/VResponsive/VResponsive.tsx @@ -2,7 +2,7 @@ import './VResponsive.sass' // Utilities -import { defineComponent, computed } from 'vue' +import { computed, defineComponent } from 'vue' import { makeDimensionProps, useDimension } from '@/composables/dimensions' import { makeProps } from '@/util' diff --git a/packages/vuetify/src/components/transitions/createTransition.ts b/packages/vuetify/src/components/transitions/createTransition.ts index bdf9da27d30..37ffab4f105 100644 --- a/packages/vuetify/src/components/transitions/createTransition.ts +++ b/packages/vuetify/src/components/transitions/createTransition.ts @@ -1,5 +1,5 @@ // Utilities -import { defineComponent, TransitionGroup, Transition, h } from 'vue' +import { defineComponent, h, Transition, TransitionGroup } from 'vue' import { makeProps } from '@/util' // Types diff --git a/packages/vuetify/src/composables/color.ts b/packages/vuetify/src/composables/color.ts index 7dae4d14fdc..7b09a64c082 100644 --- a/packages/vuetify/src/composables/color.ts +++ b/packages/vuetify/src/composables/color.ts @@ -3,7 +3,7 @@ import { computed, isRef } from 'vue' import { isCssColor } from '@/util' // Types -import type { Ref, CSSProperties } from 'vue' +import type { CSSProperties, Ref } from 'vue' type ColorValue = string | null | undefined diff --git a/packages/vuetify/src/composables/delay.ts b/packages/vuetify/src/composables/delay.ts index 7d244178f2a..bcd3bac0942 100644 --- a/packages/vuetify/src/composables/delay.ts +++ b/packages/vuetify/src/composables/delay.ts @@ -1,5 +1,5 @@ // Utilities -import { propsFactory, IN_BROWSER } from '@/util' +import { IN_BROWSER, propsFactory } from '@/util' // Types export interface DelayProps { diff --git a/packages/vuetify/src/composables/group.ts b/packages/vuetify/src/composables/group.ts index 00c828aabb2..a2765e7557f 100644 --- a/packages/vuetify/src/composables/group.ts +++ b/packages/vuetify/src/composables/group.ts @@ -1,10 +1,10 @@ // Utilities -import { reactive, provide, inject, computed, onBeforeUnmount, toRef, onMounted } from 'vue' +import { computed, inject, onBeforeUnmount, onMounted, provide, reactive, toRef } from 'vue' import { useProxiedModel } from './proxiedModel' -import { consoleWarn, wrapInArray, getUid, deepEqual } from '@/util' +import { consoleWarn, deepEqual, getUid, wrapInArray } from '@/util' // Types -import type { Ref, UnwrapRef, InjectionKey } from 'vue' +import type { InjectionKey, Ref, UnwrapRef } from 'vue' interface GroupItem { id: number diff --git a/packages/vuetify/src/composables/icons.tsx b/packages/vuetify/src/composables/icons.tsx index 9a67e6c62e8..de8da8592e6 100644 --- a/packages/vuetify/src/composables/icons.tsx +++ b/packages/vuetify/src/composables/icons.tsx @@ -4,7 +4,7 @@ import { makeProps } from '@/util/makeProps' import { propsFactory } from '@/util/propsFactory' // Types -import type { JSXComponent, PropType, InjectionKey, Ref } from 'vue' +import type { InjectionKey, JSXComponent, PropType, Ref } from 'vue' export type IconValue = string | JSXComponent diff --git a/packages/vuetify/src/composables/layout.ts b/packages/vuetify/src/composables/layout.ts index a876ce7272f..c7595f0f186 100644 --- a/packages/vuetify/src/composables/layout.ts +++ b/packages/vuetify/src/composables/layout.ts @@ -1,9 +1,9 @@ // Utilities -import { inject, provide, computed, ref, onBeforeUnmount } from 'vue' -import { propsFactory, getUid, convertToUnit } from '@/util' +import { computed, inject, onBeforeUnmount, provide, ref } from 'vue' +import { convertToUnit, getUid, propsFactory } from '@/util' // Types -import type { InjectionKey, Ref, Prop } from 'vue' +import type { InjectionKey, Prop, Ref } from 'vue' type Position = 'top' | 'left' | 'right' | 'bottom' diff --git a/packages/vuetify/src/composables/proxiedModel.ts b/packages/vuetify/src/composables/proxiedModel.ts index d703243ea7f..38ae5b8fe31 100644 --- a/packages/vuetify/src/composables/proxiedModel.ts +++ b/packages/vuetify/src/composables/proxiedModel.ts @@ -1,5 +1,5 @@ // Utilities -import { ref, computed, getCurrentInstance } from 'vue' +import { computed, getCurrentInstance, ref } from 'vue' import { consoleError, toKebabCase } from '@/util' // Types diff --git a/packages/vuetify/src/composables/scroll.ts b/packages/vuetify/src/composables/scroll.ts index d30bdc19069..b95063d68d6 100644 --- a/packages/vuetify/src/composables/scroll.ts +++ b/packages/vuetify/src/composables/scroll.ts @@ -3,9 +3,9 @@ import { computed, getCurrentInstance, onBeforeUnmount, + onMounted, ref, watch, - onMounted, } from 'vue' import { consoleWarn, propsFactory } from '@/util' diff --git a/packages/vuetify/src/composables/theme.ts b/packages/vuetify/src/composables/theme.ts index aeff5a9955e..47c02327d43 100644 --- a/packages/vuetify/src/composables/theme.ts +++ b/packages/vuetify/src/composables/theme.ts @@ -1,5 +1,5 @@ // Utilities -import { colorToInt, colorToRGB, createRange, intToHex, lighten, darken, getLuma } from '@/util' +import { colorToInt, colorToRGB, createRange, darken, getLuma, intToHex, lighten } from '@/util' import { computed, inject, provide, ref, watch } from 'vue' // Types diff --git a/packages/vuetify/src/directives/scroll/__tests__/scroll.spec.ts b/packages/vuetify/src/directives/scroll/__tests__/scroll.spec.ts index f2a37ab0aa8..aabd2c66772 100644 --- a/packages/vuetify/src/directives/scroll/__tests__/scroll.spec.ts +++ b/packages/vuetify/src/directives/scroll/__tests__/scroll.spec.ts @@ -2,8 +2,8 @@ import { createApp, defineComponent, h, - withDirectives, reactive, + withDirectives, } from 'vue' // Directives diff --git a/packages/vuetify/src/framework.ts b/packages/vuetify/src/framework.ts index e7bf6681749..9f35614fc63 100644 --- a/packages/vuetify/src/framework.ts +++ b/packages/vuetify/src/framework.ts @@ -5,7 +5,7 @@ import { defaultSets, VuetifyIconSymbol } from '@/composables/icons' import { aliases, mdi } from '@/iconsets/mdi' // Types -import type { InjectionKey, App } from 'vue' +import type { App, InjectionKey } from 'vue' import type { ThemeOptions } from '@/composables/theme' import type { IconOptions } from '@/composables/icons' diff --git a/packages/vuetify/src/globals.d.ts b/packages/vuetify/src/globals.d.ts index 1dd6b5276f7..b4adf60bbd7 100644 --- a/packages/vuetify/src/globals.d.ts +++ b/packages/vuetify/src/globals.d.ts @@ -1,5 +1,5 @@ import type { TouchStoredHandlers } from './directives/touch' -import type { VNode, ComponentPublicInstance, FunctionalComponent } from 'vue' +import type { ComponentPublicInstance, FunctionalComponent, VNode } from 'vue' import { IconProps } from '@/composables/icons' diff --git a/packages/vuetify/src/iconsets/fa.ts b/packages/vuetify/src/iconsets/fa.ts index 42e2a99bb89..37ec7bfebc0 100644 --- a/packages/vuetify/src/iconsets/fa.ts +++ b/packages/vuetify/src/iconsets/fa.ts @@ -2,7 +2,7 @@ import { VClassIcon } from '@/composables/icons' // Types -import type { IconSet, IconAliases } from '@/composables/icons' +import type { IconAliases, IconSet } from '@/composables/icons' const aliases: IconAliases = { complete: 'fas fa-check', diff --git a/packages/vuetify/src/iconsets/fa4.ts b/packages/vuetify/src/iconsets/fa4.ts index 4abe594eee7..018c0e4d236 100644 --- a/packages/vuetify/src/iconsets/fa4.ts +++ b/packages/vuetify/src/iconsets/fa4.ts @@ -5,7 +5,7 @@ import { h } from 'vue' import { VClassIcon } from '@/composables/icons' // Types -import type { IconSet, IconAliases } from '@/composables/icons' +import type { IconAliases, IconSet } from '@/composables/icons' const aliases: IconAliases = { complete: 'fa-check', diff --git a/packages/vuetify/src/iconsets/md.ts b/packages/vuetify/src/iconsets/md.ts index 462e5611e1b..189b6c9aa87 100644 --- a/packages/vuetify/src/iconsets/md.ts +++ b/packages/vuetify/src/iconsets/md.ts @@ -5,7 +5,7 @@ import { h } from 'vue' import { VLigatureIcon } from '@/composables/icons' // Types -import type { IconSet, IconAliases } from '@/composables/icons' +import type { IconAliases, IconSet } from '@/composables/icons' const aliases: IconAliases = { complete: 'check', diff --git a/packages/vuetify/src/iconsets/mdi-svg.ts b/packages/vuetify/src/iconsets/mdi-svg.ts index 8cc3ad7cddc..8f69a447a20 100644 --- a/packages/vuetify/src/iconsets/mdi-svg.ts +++ b/packages/vuetify/src/iconsets/mdi-svg.ts @@ -4,7 +4,7 @@ import { VSvgIcon } from '@/composables/icons' // Types -import type { IconSet, IconAliases } from '@/composables/icons' +import type { IconAliases, IconSet } from '@/composables/icons' const aliases: IconAliases = { complete: 'M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z', diff --git a/packages/vuetify/src/iconsets/mdi.ts b/packages/vuetify/src/iconsets/mdi.ts index d3e6290437e..0f77790710b 100644 --- a/packages/vuetify/src/iconsets/mdi.ts +++ b/packages/vuetify/src/iconsets/mdi.ts @@ -5,7 +5,7 @@ import { h } from 'vue' import { VClassIcon } from '@/composables/icons' // Types -import type { IconSet, IconAliases } from '@/composables/icons' +import type { IconAliases, IconSet } from '@/composables/icons' const aliases: IconAliases = { complete: 'mdi-check', diff --git a/packages/vuetify/src/util/__tests__/console.spec.ts b/packages/vuetify/src/util/__tests__/console.spec.ts index 05f2f762816..bc4929d42e5 100644 --- a/packages/vuetify/src/util/__tests__/console.spec.ts +++ b/packages/vuetify/src/util/__tests__/console.spec.ts @@ -1,4 +1,4 @@ -import { consoleWarn, consoleError } from '../console' +import { consoleError, consoleWarn } from '../console' describe('console', () => { it('should generate a warning', () => { diff --git a/packages/vuetify/src/util/__tests__/helpers.spec.ts b/packages/vuetify/src/util/__tests__/helpers.spec.ts index 7f3c9e0deac..95a940f3a00 100644 --- a/packages/vuetify/src/util/__tests__/helpers.spec.ts +++ b/packages/vuetify/src/util/__tests__/helpers.spec.ts @@ -1,10 +1,10 @@ import { + arrayDiff, + convertToUnit, deepEqual, getNestedValue, - getPropertyFromItem, - convertToUnit, - arrayDiff, getObjectValueByPath, + getPropertyFromItem, humanReadableFileSize, sortItems, } from '../helpers' diff --git a/packages/vuetify/src/util/color/transformCIELAB.ts b/packages/vuetify/src/util/color/transformCIELAB.ts index 9d9aa59acce..5729898ccf9 100644 --- a/packages/vuetify/src/util/color/transformCIELAB.ts +++ b/packages/vuetify/src/util/color/transformCIELAB.ts @@ -1,4 +1,4 @@ -import type { XYZ, LAB } from '../colorUtils' +import type { LAB, XYZ } from '../colorUtils' const delta = 0.20689655172413793 // 6÷29 diff --git a/packages/vuetify/src/util/createSimpleFunctional.ts b/packages/vuetify/src/util/createSimpleFunctional.ts index 8ab16bd9286..5dee31a6411 100644 --- a/packages/vuetify/src/util/createSimpleFunctional.ts +++ b/packages/vuetify/src/util/createSimpleFunctional.ts @@ -1,4 +1,4 @@ -import { defineComponent, h, capitalize, camelize } from 'vue' +import { camelize, capitalize, defineComponent, h } from 'vue' import { makeProps } from './makeProps' export function createSimpleFunctional ( diff --git a/packages/vuetify/src/util/helpers.ts b/packages/vuetify/src/util/helpers.ts index a8c8f6c139f..649afb33cfc 100644 --- a/packages/vuetify/src/util/helpers.ts +++ b/packages/vuetify/src/util/helpers.ts @@ -1,6 +1,6 @@ -import type { DataTableCompareFunction, SelectItemKey, ItemGroup } from 'vuetify/types' -import type { Slots, VNode, TransitionProps } from 'vue' -import { Fragment, h, camelize, Transition, mergeProps } from 'vue' +import type { DataTableCompareFunction, ItemGroup, SelectItemKey } from 'vuetify/types' +import type { Slots, TransitionProps, VNode } from 'vue' +import { camelize, Fragment, h, mergeProps, Transition } from 'vue' export function getNestedValue (obj: any, path: (string | number)[], fallback?: any): any { const last = path.length - 1 diff --git a/packages/vuetify/src/util/useDirective.ts b/packages/vuetify/src/util/useDirective.ts index 273916bca0d..1745a3b38a9 100644 --- a/packages/vuetify/src/util/useDirective.ts +++ b/packages/vuetify/src/util/useDirective.ts @@ -1,4 +1,4 @@ -import type { DirectiveBinding, Directive, DirectiveArguments } from 'vue' +import type { Directive, DirectiveArguments, DirectiveBinding } from 'vue' interface Binding extends Omit<DirectiveBinding, 'value' | 'modifiers'> { value?: unknown
316f20533aeb211931db302a223ba376a148db14
2023-03-13 18:14:17
Kael
fix(VSnackbar): disable global overlay stack
false
disable global overlay stack
fix
diff --git a/packages/vuetify/src/components/VSnackbar/VSnackbar.tsx b/packages/vuetify/src/components/VSnackbar/VSnackbar.tsx index e6276ce1c3c..2764631d8ba 100644 --- a/packages/vuetify/src/components/VSnackbar/VSnackbar.tsx +++ b/packages/vuetify/src/components/VSnackbar/VSnackbar.tsx @@ -121,6 +121,7 @@ export const VSnackbar = genericComponent<VSnackbarSlots>()({ noClickAnimation scrim={ false } scrollStrategy="none" + _disableGlobalStack { ...scopeId } v-slots={{ activator: slots.activator }} >
5d944910b1c343db9e72259fb3efcfd9eb42da6d
2018-10-28 15:17:56
John Leider
feat(docs): move hashes around
false
move hashes around
feat
diff --git a/packages/vuetifyjs.com/src/components/core/TableOfContents.vue b/packages/vuetifyjs.com/src/components/core/TableOfContents.vue index 5fad769015f..c3a5dcf62f4 100644 --- a/packages/vuetifyjs.com/src/components/core/TableOfContents.vue +++ b/packages/vuetifyjs.com/src/components/core/TableOfContents.vue @@ -1,4 +1,6 @@ <script> + import { goTo } from '@/util/helpers' + export default { props: { discovery: { @@ -92,7 +94,7 @@ e.stopPropagation() e.preventDefault() - vm.$vuetify.goTo(index && id).then(() => (document.location.hash = index ? id : '')) + goTo.call(vm, index && id) } } }) diff --git a/packages/vuetifyjs.com/src/components/helpers/Example.vue b/packages/vuetifyjs.com/src/components/helpers/Example.vue index b46e78e77b3..1e0b9a1fe90 100644 --- a/packages/vuetifyjs.com/src/components/helpers/Example.vue +++ b/packages/vuetifyjs.com/src/components/helpers/Example.vue @@ -2,12 +2,6 @@ section.component-example(:id="id") //- Section header h3(v-if="header.length > 0").title.layout.align-center.mb-3 - router-link( - :to="{ hash: id }" - v-if="id" - style="text-decoration: none;" - ).mr-2 - v-icon(color="accent") mdi-pound translation-translatable(:i18n="header").d-inline-flex.align-center span(v-text="$t(header)") v-chip( @@ -23,11 +17,20 @@ //- Description // TODO: make independant of english locale translation-translatable(v-if="$te(desc, 'en')" :i18n="desc") - markdown(:source="$t(desc)") + markdown( + v-if="$t(desc)" + :source="$t(desc)" + ) v-card(:class="{ 'elevation-0': readonly }").mt-4 //- Example options v-toolbar(flat dense card v-if="!readonly").pr-1 + v-btn( + :href="`#${id}`" + icon + @click.prevent.stop="goTo" + ) + v-icon(color="grey darken-1") mdi-pound-box v-spacer v-tooltip(lazy top v-if="hasInverted") v-btn(icon slot="activator" @click="invertedProxy = !invertedProxy") @@ -95,6 +98,8 @@ </template> <script> + import { goTo } from '@/util/helpers' + const release = process.env.RELEASE export default { @@ -222,6 +227,9 @@ codepenAdditional } }, + goTo () { + goTo.call(this, `#${this.id}`) + }, toggle () { this.active = !this.active }, diff --git a/packages/vuetifyjs.com/src/components/helpers/SectionHead.vue b/packages/vuetifyjs.com/src/components/helpers/SectionHead.vue index 846314f8f6b..47da991b56c 100644 --- a/packages/vuetifyjs.com/src/components/helpers/SectionHead.vue +++ b/packages/vuetifyjs.com/src/components/helpers/SectionHead.vue @@ -1,16 +1,56 @@ -<template lang="pug"> - h2.headline.primary--text - translation-translatable(:i18n="value") - markdown(:source="$t(value)") +<template> + <h2 class="section-head headline primary--text mb-3"> + <translation-translatable :i18n="value"> + <v-layout align-center> + <markdown :source="translation" /> + + <a + :href="`#${id}`" + class="ml-2 mb-1" + style="text-decoration: none;" + > + <v-icon + color="grey lighten-1" + @click.prevent.stop="goTo" + > + mdi-pound + </v-icon> + </a> + </v-layout> + </translation-translatable> + </h2> </template> <script> + import kebabCase from 'lodash/kebabCase' + import { goTo } from '@/util/helpers' + export default { props: { value: { type: String, default: '' } + }, + + computed: { + id () { + return kebabCase(this.translation) + }, + translation () { + return this.$t(this.value) + } + }, + + methods: { + goTo () { + goTo.call(this, `#${this.id}`) + } } } </script> + +<style lang="stylus"> + .section-head p + margin: 0 +</style> diff --git a/packages/vuetifyjs.com/src/util/helpers.js b/packages/vuetifyjs.com/src/util/helpers.js index 0982949dace..2f653b755d6 100644 --- a/packages/vuetifyjs.com/src/util/helpers.js +++ b/packages/vuetifyjs.com/src/util/helpers.js @@ -53,3 +53,18 @@ export function randomString (length = 5) { return text } + +// Must be called in Vue context +export function goTo (id) { + this.$vuetify.goTo(id).then(() => { + if (!id) { + return (document.location.hash = '') + } + + if (history.replaceState) { + history.replaceState(null, null, id) + } else { + document.location.hash = id + } + }) +}
380044ca8fd5ebe4d4f832b72e344063704ae4d7
2022-10-18 20:09:49
Kael
fix(VSelect): use item value as key, prevent more than one chip closing
false
use item value as key, prevent more than one chip closing
fix
diff --git a/packages/vuetify/src/components/VAutocomplete/VAutocomplete.tsx b/packages/vuetify/src/components/VAutocomplete/VAutocomplete.tsx index ba37bd58a98..69a017247ac 100644 --- a/packages/vuetify/src/components/VAutocomplete/VAutocomplete.tsx +++ b/packages/vuetify/src/components/VAutocomplete/VAutocomplete.tsx @@ -299,10 +299,11 @@ export const VAutocomplete = genericComponent<new < const slotProps = { 'onClick:close': onChipClose, modelValue: true, + 'onUpdate:modelValue': undefined, } return ( - <div key={ index } class="v-autocomplete__selection"> + <div key={ item.value } class="v-autocomplete__selection"> { hasChips ? ( <VDefaultsProvider defaults={{ diff --git a/packages/vuetify/src/components/VCombobox/VCombobox.tsx b/packages/vuetify/src/components/VCombobox/VCombobox.tsx index 98a474bc717..74a75106cd8 100644 --- a/packages/vuetify/src/components/VCombobox/VCombobox.tsx +++ b/packages/vuetify/src/components/VCombobox/VCombobox.tsx @@ -372,11 +372,12 @@ export const VCombobox = genericComponent<new < const slotProps = { 'onClick:close': onChipClose, modelValue: true, + 'onUpdate:modelValue': undefined, } return ( <div - key={ index } + key={ item.value } class={[ 'v-combobox__selection', index === selectionIndex.value && [ diff --git a/packages/vuetify/src/components/VSelect/VSelect.tsx b/packages/vuetify/src/components/VSelect/VSelect.tsx index 2256c26825a..8cd73a1c345 100644 --- a/packages/vuetify/src/components/VSelect/VSelect.tsx +++ b/packages/vuetify/src/components/VSelect/VSelect.tsx @@ -250,10 +250,11 @@ export const VSelect = genericComponent<new < const slotProps = { 'onClick:close': onChipClose, modelValue: true, + 'onUpdate:modelValue': undefined, } return ( - <div key={ index } class="v-select__selection"> + <div key={ item.value } class="v-select__selection"> { hasChips ? ( <VDefaultsProvider defaults={{