routie dev init since i didn't adhere to any proper guidance up until now
This commit is contained in:
+44
@@ -0,0 +1,44 @@
|
||||
@layer vuetify-final.transitions {
|
||||
.bottom-sheet-transition-enter-from {
|
||||
transform: translateY(100%);
|
||||
}
|
||||
.bottom-sheet-transition-leave-to {
|
||||
transform: translateY(100%);
|
||||
}
|
||||
}
|
||||
@layer vuetify-components {
|
||||
.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: auto;
|
||||
margin-bottom: 0;
|
||||
transition-duration: 0.2s;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
overflow: visible;
|
||||
}
|
||||
.v-bottom-sheet > .v-bottom-sheet__content.v-overlay__content {
|
||||
box-shadow: 0px 2px 3px 0px rgba(var(--v-shadow-color), var(--v-shadow-key-opacity, 0.3)), 0px 6px 10px 4px rgba(var(--v-shadow-color), var(--v-shadow-ambient-opacity, 0.15));
|
||||
--v-elevation-overlay: color-mix(in srgb, var(--v-elevation-overlay-color) 8%, transparent);
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.v-bottom-sheet > .v-bottom-sheet__content.v-overlay__content {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
.v-bottom-sheet > .v-bottom-sheet__content.v-overlay__content > .v-card,
|
||||
.v-bottom-sheet > .v-bottom-sheet__content.v-overlay__content > .v-sheet {
|
||||
border-radius: 0;
|
||||
}
|
||||
.v-bottom-sheet.v-bottom-sheet--inset {
|
||||
max-width: none;
|
||||
}
|
||||
@media (min-width: 600px) {
|
||||
.v-bottom-sheet.v-bottom-sheet--inset {
|
||||
max-width: 70%;
|
||||
}
|
||||
}
|
||||
}
|
||||
+2679
File diff suppressed because it is too large
Load Diff
+40
@@ -0,0 +1,40 @@
|
||||
import { mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
|
||||
// Styles
|
||||
import "./VBottomSheet.css";
|
||||
|
||||
// Components
|
||||
import { makeVDialogProps, VDialog } from "../VDialog/VDialog.js"; // Composables
|
||||
import { useProxiedModel } from "../../composables/proxiedModel.js"; // Utilities
|
||||
import { genericComponent, propsFactory, useRender } from "../../util/index.js"; // Types
|
||||
export const makeVBottomSheetProps = propsFactory({
|
||||
inset: Boolean,
|
||||
...makeVDialogProps({
|
||||
transition: 'bottom-sheet-transition'
|
||||
})
|
||||
}, 'VBottomSheet');
|
||||
export const VBottomSheet = genericComponent()({
|
||||
name: 'VBottomSheet',
|
||||
props: makeVBottomSheetProps(),
|
||||
emits: {
|
||||
'update:modelValue': value => true
|
||||
},
|
||||
setup(props, {
|
||||
slots
|
||||
}) {
|
||||
const isActive = useProxiedModel(props, 'modelValue');
|
||||
useRender(() => {
|
||||
const dialogProps = VDialog.filterProps(props);
|
||||
return _createVNode(VDialog, _mergeProps(dialogProps, {
|
||||
"contentClass": ['v-bottom-sheet__content', props.contentClass],
|
||||
"modelValue": isActive.value,
|
||||
"onUpdate:modelValue": $event => isActive.value = $event,
|
||||
"class": ['v-bottom-sheet', {
|
||||
'v-bottom-sheet--inset': props.inset
|
||||
}, props.class],
|
||||
"style": props.style
|
||||
}), slots);
|
||||
});
|
||||
return {};
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=VBottomSheet.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"VBottomSheet.js","names":["makeVDialogProps","VDialog","useProxiedModel","genericComponent","propsFactory","useRender","makeVBottomSheetProps","inset","Boolean","transition","VBottomSheet","name","props","emits","value","setup","slots","isActive","dialogProps","filterProps","_createVNode","_mergeProps","contentClass","$event","class","style"],"sources":["../../../src/components/VBottomSheet/VBottomSheet.tsx"],"sourcesContent":["// Styles\nimport './VBottomSheet.sass'\n\n// Components\nimport { makeVDialogProps, VDialog } from '@/components/VDialog/VDialog'\n\n// Composables\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { OverlaySlots } from '@/components/VOverlay/VOverlay'\n\nexport const makeVBottomSheetProps = propsFactory({\n inset: Boolean,\n\n ...makeVDialogProps({\n transition: 'bottom-sheet-transition',\n }),\n}, 'VBottomSheet')\n\nexport const VBottomSheet = genericComponent<OverlaySlots>()({\n name: 'VBottomSheet',\n\n props: makeVBottomSheetProps(),\n\n emits: {\n 'update:modelValue': (value: boolean) => true,\n },\n\n setup (props, { slots }) {\n const isActive = useProxiedModel(props, 'modelValue')\n\n useRender(() => {\n const dialogProps = VDialog.filterProps(props)\n\n return (\n <VDialog\n { ...dialogProps }\n contentClass={[\n 'v-bottom-sheet__content',\n props.contentClass,\n ]}\n v-model={ isActive.value }\n class={[\n 'v-bottom-sheet',\n {\n 'v-bottom-sheet--inset': props.inset,\n },\n props.class,\n ]}\n style={ props.style }\n v-slots={ slots }\n />\n )\n })\n\n return {}\n },\n})\n\nexport type VBottomSheet = InstanceType<typeof VBottomSheet>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,gBAAgB,EAAEC,OAAO,iCAElC;AAAA,SACSC,eAAe,6CAExB;AAAA,SACSC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,+BAElD;AAGA,OAAO,MAAMC,qBAAqB,GAAGF,YAAY,CAAC;EAChDG,KAAK,EAAEC,OAAO;EAEd,GAAGR,gBAAgB,CAAC;IAClBS,UAAU,EAAE;EACd,CAAC;AACH,CAAC,EAAE,cAAc,CAAC;AAElB,OAAO,MAAMC,YAAY,GAAGP,gBAAgB,CAAe,CAAC,CAAC;EAC3DQ,IAAI,EAAE,cAAc;EAEpBC,KAAK,EAAEN,qBAAqB,CAAC,CAAC;EAE9BO,KAAK,EAAE;IACL,mBAAmB,EAAGC,KAAc,IAAK;EAC3C,CAAC;EAEDC,KAAKA,CAAEH,KAAK,EAAE;IAAEI;EAAM,CAAC,EAAE;IACvB,MAAMC,QAAQ,GAAGf,eAAe,CAACU,KAAK,EAAE,YAAY,CAAC;IAErDP,SAAS,CAAC,MAAM;MACd,MAAMa,WAAW,GAAGjB,OAAO,CAACkB,WAAW,CAACP,KAAK,CAAC;MAE9C,OAAAQ,YAAA,CAAAnB,OAAA,EAAAoB,WAAA,CAESH,WAAW;QAAA,gBACF,CACZ,yBAAyB,EACzBN,KAAK,CAACU,YAAY,CACnB;QAAA,cACSL,QAAQ,CAACH,KAAK;QAAA,uBAAAS,MAAA,IAAdN,QAAQ,CAACH,KAAK,GAAAS,MAAA;QAAA,SACjB,CACL,gBAAgB,EAChB;UACE,uBAAuB,EAAEX,KAAK,CAACL;QACjC,CAAC,EACDK,KAAK,CAACY,KAAK,CACZ;QAAA,SACOZ,KAAK,CAACa;MAAK,IACTT,KAAK;IAGrB,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
@use 'sass:map'
|
||||
@use '../../styles/settings'
|
||||
@use '../../styles/tools'
|
||||
@use './variables' as *
|
||||
|
||||
// Transition
|
||||
@include tools.layer('transitions')
|
||||
.bottom-sheet-transition
|
||||
&-enter-from
|
||||
transform: translateY(100%)
|
||||
|
||||
&-leave-to
|
||||
transform: translateY(100%)
|
||||
|
||||
// Block
|
||||
@include tools.layer('components')
|
||||
.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: auto
|
||||
margin-bottom: 0
|
||||
transition-duration: $bottom-sheet-transition-duration
|
||||
width: 100%
|
||||
max-width: 100%
|
||||
overflow: visible
|
||||
|
||||
@include tools.elevation($bottom-sheet-elevation)
|
||||
|
||||
@media (prefers-reduced-motion: reduce)
|
||||
transition: none
|
||||
|
||||
> .v-card,
|
||||
> .v-sheet
|
||||
border-radius: $bottom-sheet-border-radius
|
||||
|
||||
&.v-bottom-sheet--inset
|
||||
max-width: none
|
||||
|
||||
@media #{map.get(settings.$display-breakpoints, 'sm-and-up')}
|
||||
max-width: $bottom-sheet-inset-width
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
@use '../../styles/settings';
|
||||
|
||||
$bottom-sheet-elevation: 4 !default;
|
||||
$bottom-sheet-inset-width: 70% !default;
|
||||
$bottom-sheet-border-radius: 0 !default;
|
||||
$bottom-sheet-transition-duration: .2s !default;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export { VBottomSheet } from './VBottomSheet.js';
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export { VBottomSheet } from "./VBottomSheet.js";
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","names":["VBottomSheet"],"sources":["../../../src/components/VBottomSheet/index.ts"],"sourcesContent":["export { VBottomSheet } from './VBottomSheet'\n"],"mappings":"SAASA,YAAY","ignoreList":[]}
|
||||
Reference in New Issue
Block a user