Skip to content

Commit 2828970

Browse files
committed
refactor: rename VBottomSheet and VFullScreen to ModalBottom and ModalFullscreen
1 parent 4cd60f9 commit 2828970

File tree

16 files changed

+58
-58
lines changed

16 files changed

+58
-58
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<script setup lang="ts">
2-
import { VBottomSheet } from 'vue-final-modal'
2+
import { ModalBottom } from 'vue-final-modal'
33
44
const emit = defineEmits<{
55
(e: 'update:modelValue', modelValue: boolean): void
66
}>()
77
</script>
88

99
<template>
10-
<VBottomSheet
10+
<ModalBottom
1111
@update:model-value="val => emit('update:modelValue', val)"
1212
>
1313
<div class="flex justify-center items-center h-60 bg-primary-100 dark:bg-gray-800">
1414
<VButton @click="emit('update:modelValue', false)">
1515
Close
1616
</VButton>
1717
</div>
18-
</VBottomSheet>
18+
</ModalBottom>
1919
</template>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<script setup lang="ts">
2-
import { VFullscreen } from 'vue-final-modal'
2+
import { ModalFullscreen } from 'vue-final-modal'
33
44
const emit = defineEmits<{
55
(e: 'update:modelValue', modelValue: boolean): void
66
}>()
77
</script>
88

99
<template>
10-
<VFullscreen
10+
<ModalFullscreen
1111
content-class="p-4 bg-primary-50 dark:bg-gray-800"
1212
@update:model-value="val => emit('update:modelValue', val)"
1313
>
@@ -17,5 +17,5 @@ const emit = defineEmits<{
1717
<VButton @click="emit('update:modelValue', false)">
1818
Close
1919
</VButton>
20-
</VFullscreen>
20+
</ModalFullscreen>
2121
</template>

docs/content/1.index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Powerful Features
7979
#title
8080
Built-in HOCs
8181
#description
82-
Provide Higher-Order Components including `<VFullscreen>`{lang=ts}, `<VBottomSheet>`{lang=ts}.
82+
Provide Higher-Order Components including `<ModalFullscreen>`{lang=ts}, `<ModalBottom>`{lang=ts}.
8383
::
8484

8585
::card

docs/content/2.get-started/1.guide/1.concepts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ These are the core concepts you need to know about vue-final-modal and its appro
2020
- Trap keyboard focus within modal element (uses [focus-trap]([/api/components/vue-final-modal#focustrap](https://github.com/focus-trap/focus-trap)) for best web accessibility).
2121
- Full control to the zIndex of the nested modals (see [zIndexFn prop](/api/components/vue-final-modal#zindexfn)).
2222
- Customizable `<Transition>` for the modal content and overlay.
23-
- Provide Higher order components including [VFullscreen](/api/components/v-fullscreen) and [VBottomSheet](/api/components/v-bottom-sheet).
23+
- Provide Higher order components including [ModalFullscreen](/api/components/v-fullscreen) and [ModalBottom](/api/components/v-bottom-sheet).
2424
- Fully tree-shakable! Only what you use will get imported.
2525
- Tiny footprint! Only 4.x kB! Vue Final Modal focuses on the core functionality of modals, leaves the complex CSS up to the developer.
2626
::

docs/content/3.api/1.components/2.v-full-screen.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# `<VFullscreen>`
1+
# `<ModalFullscreen>`
22

33
## Template structure
44

5-
This is the simplify template of the `<VFullscreen>`{lang=ts}.
5+
This is the simplify template of the `<ModalFullscreen>`{lang=ts}.
66
It will be helpful for understanding the naming of [props](#props).
77

8-
```html [VFullscreen.vue]
8+
```html [ModalFullscreen.vue]
99
<template>
1010
<div class="vfm">
1111
<div class=vfm__content>
@@ -20,10 +20,10 @@ It will be helpful for understanding the naming of [props](#props).
2020
## Props
2121

2222
::alert{type=info}
23-
`<VFullscreen>`{lang=ts} extends all [props](/api/components/vue-final-modal#props) from `<VueFinalModal>`{lang=ts}.
23+
`<ModalFullscreen>`{lang=ts} extends all [props](/api/components/vue-final-modal#props) from `<VueFinalModal>`{lang=ts}.
2424
::
2525

26-
`<VFullscreen>`{lang=ts} also provides the following properties:
26+
`<ModalFullscreen>`{lang=ts} also provides the following properties:
2727

2828
### hideOverlay
2929

@@ -68,7 +68,7 @@ When set `:preventNavigationGestures="true"`{lang=ts}, there will be two invisib
6868
## Events
6969

7070
::alert{type=info}
71-
`<VFullscreen>`{lang=ts} extends all [events](/api/components/vue-final-modal#events) from `<VueFinalModal>`{lang=ts}.
71+
`<ModalFullscreen>`{lang=ts} extends all [events](/api/components/vue-final-modal#events) from `<VueFinalModal>`{lang=ts}.
7272
::
7373

7474
## Slots

docs/content/3.api/1.components/3.v-bottom-sheet.md renamed to docs/content/3.api/1.components/3.modal-bottom.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# `<VBottomSheet>`
1+
# `<ModalBottom>`
22

33
## Template structure
44

5-
This is the simplify template of the `<VBottomSheet>`{lang=ts}.
5+
This is the simplify template of the `<ModalBottom>`{lang=ts}.
66
It will be helpful for understanding the naming of [props](#props).
77

8-
```html [VBottomSheet.vue]
8+
```html [ModalBottom.vue]
99
<template>
1010
<div class="vfm">
1111
<div class=vfm__content>
@@ -20,10 +20,10 @@ It will be helpful for understanding the naming of [props](#props).
2020
## Props
2121

2222
::alert{type=info}
23-
`<VBottomSheet>`{lang=ts} extends all [props](/api/components/vue-final-modal#props) from `<VueFinalModal>`{lang=ts}.
23+
`<ModalBottom>`{lang=ts} extends all [props](/api/components/vue-final-modal#props) from `<VueFinalModal>`{lang=ts}.
2424
::
2525

26-
`<VBottomSheet>`{lang=ts} also provides the following properties:
26+
`<ModalBottom>`{lang=ts} also provides the following properties:
2727

2828
### closeDirection
2929

@@ -44,7 +44,7 @@ Threshold for swipe to close
4444
## Events
4545

4646
::alert{type=info}
47-
`<VBottomSheet>`{lang=ts} extends all [events](/api/components/vue-final-modal#events) from `<VueFinalModal>`{lang=ts}.
47+
`<ModalBottom>`{lang=ts} extends all [events](/api/components/vue-final-modal#events) from `<VueFinalModal>`{lang=ts}.
4848
::
4949

5050
## Slots

docs/content/4.use-cases/6.fullscreen-modal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ head.title: 'Fullscreen Modal | Examples'
44

55
# Fullscreen Modal
66

7-
Create a `<Fullscreen>` component with `<VFullscreen>` and TailwindCSS.
7+
Create a `<Fullscreen>` component with `<ModalFullscreen>` and TailwindCSS.
88

99
## `<Fullscreen>` component
1010

docs/content/4.use-cases/7.bottom-sheet-modal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ head.title: 'Bottom Sheet Modal | Examples'
44

55
# Bottom Sheet Modal
66

7-
Create a `<BottomSheet>` component with `<VBottomSheet>` and TailwindCSS.
7+
Create a `<BottomSheet>` component with `<ModalBottom>` and TailwindCSS.
88

99
## `<BottomSheet>` component
1010

packages/vue-final-modal/src/components/VBottomSheet/VBottomSheet.vue renamed to packages/vue-final-modal/src/components/ModalBottom/ModalBottom.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ import { computed, ref, watch } from 'vue'
44
import type { VueFinalModalEmits } from '../VueFinalModal/VueFinalModal.vue'
55
import VueFinalModal from '../VueFinalModal/VueFinalModal.vue'
66
import { vueFinalModalProps } from '../VueFinalModal/VueFinalModalProps'
7-
import { vBottomSheetProps } from './VBottomSheetProps'
7+
import { modalBottomProps } from './ModalBottomProps'
88
import { useSwipeToClose } from '~/useSwipeToClose'
99
import { useVfmAttrs } from '~/useApi'
1010
11-
export interface VBottomSheetEmits extends VueFinalModalEmits {}
11+
export interface ModalBottomEmits extends VueFinalModalEmits {}
1212
1313
defineOptions({
1414
inheritAttrs: false,
1515
})
1616
1717
// eslint-disable-next-line vue/define-macros-order
18-
const props = defineProps(vBottomSheetProps)
19-
const emit = defineEmits<VBottomSheetEmits>()
18+
const props = defineProps(modalBottomProps)
19+
const emit = defineEmits<ModalBottomEmits>()
2020
2121
const vfmAttrs = useVfmAttrs({
2222
props,

packages/vue-final-modal/src/components/VBottomSheet/VBottomSheetProps.ts renamed to packages/vue-final-modal/src/components/ModalBottom/ModalBottomProps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { PropType } from 'vue'
22
import { vueFinalModalProps } from '../VueFinalModal/VueFinalModalProps'
33

4-
export const vBottomSheetProps = {
4+
export const modalBottomProps = {
55
...vueFinalModalProps,
66
/**
77
* @description The direction of swiping to close the bottom sheet modal

0 commit comments

Comments
 (0)