-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7ec148
commit 796b27b
Showing
7 changed files
with
117 additions
and
63 deletions.
There are no files selected for viewing
29 changes: 19 additions & 10 deletions
29
packages/vuetify/src/components/VBottomSheet/VBottomSheet.sass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,32 @@ | ||
@import './_variables.scss' | ||
@use '../../styles/tools' | ||
@use './variables' as * | ||
|
||
// Transition | ||
.bottom-sheet-transition | ||
&-enter | ||
&-enter-from | ||
transform: translateY(100%) | ||
|
||
&-leave-to | ||
transform: translateY(100%) | ||
|
||
// Block | ||
.v-bottom-sheet.v-dialog | ||
align-self: flex-end | ||
border-radius: 0 | ||
flex: 0 1 auto | ||
margin: 0 | ||
overflow: visible | ||
.v-bottom-sheet | ||
> .v-bottom-sheet__content.v-overlay__content | ||
align-self: flex-end | ||
border-radius: 0 | ||
flex: 0 1 auto | ||
left: 0 | ||
right: 0 | ||
margin-inline-start: 0 | ||
margin-inline-end: 0 | ||
margin-bottom: 0 | ||
transition-duration: .3s | ||
width: 100% | ||
max-width: 100% | ||
overflow: visible | ||
|
||
&.v-bottom-sheet--inset | ||
max-width: none | ||
|
||
@media #{map-get($display-breakpoints, 'sm-and-up')} | ||
max-width: $bottom-sheet-inset-width | ||
// @media #{map-get(variables.$display-breakpoints, 'sm-and-up')} | ||
// max-width: $bottom-sheet-inset-width |
31 changes: 0 additions & 31 deletions
31
packages/vuetify/src/components/VBottomSheet/VBottomSheet.ts
This file was deleted.
Oops, something went wrong.
77 changes: 77 additions & 0 deletions
77
packages/vuetify/src/components/VBottomSheet/VBottomSheet.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
// Styles | ||
import './VBottomSheet.sass' | ||
|
||
// Components | ||
import { makeVDialogProps, VDialog } from '@/components/VDialog/VDialog' | ||
|
||
// Utilities | ||
import { genericComponent, useRender } from '@/util' | ||
|
||
export const VBottomSheet = genericComponent()({ | ||
name: 'VBottomSheet', | ||
|
||
props: { | ||
inset: Boolean, | ||
|
||
...makeVDialogProps({ | ||
contentClass: 'v-bottom-sheet__content', | ||
transition: 'bottom-sheet-transition', | ||
}), | ||
}, | ||
|
||
setup (props, { slots }) { | ||
useRender(() => { | ||
const [dialogProps] = VDialog.filterProps(props) | ||
|
||
return ( | ||
<VDialog | ||
class={[ | ||
'v-bottom-sheet', | ||
{ | ||
'v-bottom-sheet--inset': props.inset, | ||
}, | ||
]} | ||
{ ...dialogProps } | ||
> | ||
{{ | ||
activator: slots.activator, | ||
default: slots.default, | ||
}} | ||
</VDialog> | ||
) | ||
}) | ||
|
||
return {} | ||
}, | ||
}) | ||
|
||
export type VBottomSheet = InstanceType<typeof VBottomSheet> | ||
|
||
// import './VBottomSheet.sass' | ||
|
||
// // Extensions | ||
// import VDialog from '../VDialog/VDialog' | ||
|
||
// /* @vue/component */ | ||
// export default VDialog.extend({ | ||
// name: 'v-bottom-sheet', | ||
|
||
// props: { | ||
// inset: Boolean, | ||
// maxWidth: [String, Number], | ||
// transition: { | ||
// type: String, | ||
// default: 'bottom-sheet-transition', | ||
// }, | ||
// }, | ||
|
||
// computed: { | ||
// classes (): object { | ||
// return { | ||
// ...VDialog.options.computed.classes.call(this), | ||
// 'v-bottom-sheet': true, | ||
// 'v-bottom-sheet--inset': this.inset, | ||
// } | ||
// }, | ||
// }, | ||
// }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@import '../../styles/styles.sass'; | ||
@use '../../styles/settings'; | ||
|
||
$bottom-sheet-inset-width: 70% !default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
import VBottomSheet from './VBottomSheet' | ||
|
||
export { VBottomSheet } | ||
export default VBottomSheet | ||
export { VBottomSheet } from './VBottomSheet' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters