vuetify 3.5.16 → 3.5.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/json/attributes.json +226 -30
- package/dist/json/importMap-labs.json +12 -8
- package/dist/json/importMap.json +114 -114
- package/dist/json/tags.json +54 -0
- package/dist/json/web-types.json +607 -84
- package/dist/vuetify-labs.css +2293 -2267
- package/dist/vuetify-labs.d.ts +742 -64
- package/dist/vuetify-labs.esm.js +365 -132
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +364 -131
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +2324 -2298
- package/dist/vuetify.d.ts +120 -55
- package/dist/vuetify.esm.js +177 -104
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +176 -103
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +183 -179
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAppBar/index.d.mts +1 -0
- package/lib/components/VAutocomplete/VAutocomplete.mjs +8 -10
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VBanner/VBanner.css +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbs.css +1 -1
- package/lib/components/VBtn/index.d.mts +1 -0
- package/lib/components/VBtnToggle/index.d.mts +1 -0
- package/lib/components/VCard/VCard.css +3 -3
- package/lib/components/VCarousel/VCarouselItem.mjs +1 -1
- package/lib/components/VCarousel/VCarouselItem.mjs.map +1 -1
- package/lib/components/VCarousel/index.d.mts +1 -0
- package/lib/components/VChip/VChip.css +1 -1
- package/lib/components/VChip/VChip.sass +1 -0
- package/lib/components/VChipGroup/index.d.mts +1 -0
- package/lib/components/VCombobox/VCombobox.mjs +8 -10
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.mjs +12 -2
- package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
- package/lib/components/VDialog/VDialog.mjs +6 -2
- package/lib/components/VDialog/VDialog.mjs.map +1 -1
- package/lib/components/VDialog/__test__/VDialog.spec.cy.mjs +39 -0
- package/lib/components/VDialog/__test__/VDialog.spec.cy.mjs.map +1 -0
- package/lib/components/VDialog/index.d.mts +4 -10
- package/lib/components/VFileInput/VFileInput.mjs +1 -1
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/index.d.mts +17 -5
- package/lib/components/VInput/VInput.mjs +6 -1
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VInput/index.d.mts +6 -0
- package/lib/components/VList/VList.mjs +2 -1
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VList/VListItem.css +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +3 -3
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/touch.mjs +16 -2
- package/lib/components/VNavigationDrawer/touch.mjs.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.mjs +11 -1
- package/lib/components/VProgressLinear/VProgressLinear.mjs.map +1 -1
- package/lib/components/VProgressLinear/index.d.mts +21 -0
- package/lib/components/VRangeSlider/index.d.mts +6 -0
- package/lib/components/VSelect/VSelect.mjs +5 -1
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSlideGroup/index.d.mts +1 -0
- package/lib/components/VSlider/index.d.mts +6 -0
- package/lib/components/VSnackbar/VSnackbar.css +18 -4
- package/lib/components/VSnackbar/VSnackbar.mjs +34 -9
- package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.sass +19 -3
- package/lib/components/VSwitch/VSwitch.css +14 -2
- package/lib/components/VSwitch/VSwitch.sass +8 -2
- package/lib/components/VSystemBar/VSystemBar.css +1 -1
- package/lib/components/VTabs/index.d.mts +1 -0
- package/lib/components/VTextField/index.d.mts +15 -3
- package/lib/components/VTextarea/index.d.mts +15 -3
- package/lib/components/VWindow/index.d.mts +1 -0
- package/lib/components/index.d.mts +85 -21
- package/lib/composables/directiveComponent.mjs +4 -2
- package/lib/composables/directiveComponent.mjs.map +1 -1
- package/lib/composables/group.mjs +10 -1
- package/lib/composables/group.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.mts +35 -34
- package/lib/labs/VCalendar/VCalendar.css +0 -1
- package/lib/labs/VCalendar/VCalendar.sass +0 -2
- package/lib/labs/VEmptyState/VEmptyState.css +3 -3
- package/lib/labs/VFab/VFab.css +1 -0
- package/lib/labs/VFab/VFab.mjs +3 -2
- package/lib/labs/VFab/VFab.mjs.map +1 -1
- package/lib/labs/VFab/VFab.sass +1 -0
- package/lib/labs/VFab/index.d.mts +10 -0
- package/lib/labs/VNumberInput/VNumberInput.mjs +79 -24
- package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
- package/lib/labs/VNumberInput/index.d.mts +56 -29
- package/lib/labs/VSnackbarQueue/VSnackbarQueue.mjs +112 -0
- package/lib/labs/VSnackbarQueue/VSnackbarQueue.mjs.map +1 -0
- package/lib/labs/VSnackbarQueue/index.d.mts +2693 -0
- package/lib/labs/VSnackbarQueue/index.mjs +2 -0
- package/lib/labs/VSnackbarQueue/index.mjs.map +1 -0
- package/lib/labs/VSpeedDial/VSpeedDial.mjs +1 -2
- package/lib/labs/VSpeedDial/VSpeedDial.mjs.map +1 -1
- package/lib/labs/VTimePicker/VTimePickerClock.mjs +1 -3
- package/lib/labs/VTimePicker/VTimePickerClock.mjs.map +1 -1
- package/lib/labs/VTimePicker/index.d.mts +6 -13
- package/lib/labs/components.d.mts +2893 -282
- package/lib/labs/components.mjs +1 -0
- package/lib/labs/components.mjs.map +1 -1
- package/lib/locale/af.mjs +1 -0
- package/lib/locale/af.mjs.map +1 -1
- package/lib/locale/ar.mjs +1 -0
- package/lib/locale/ar.mjs.map +1 -1
- package/lib/locale/az.mjs +1 -0
- package/lib/locale/az.mjs.map +1 -1
- package/lib/locale/bg.mjs +1 -0
- package/lib/locale/bg.mjs.map +1 -1
- package/lib/locale/ca.mjs +1 -0
- package/lib/locale/ca.mjs.map +1 -1
- package/lib/locale/ckb.mjs +1 -0
- package/lib/locale/ckb.mjs.map +1 -1
- package/lib/locale/cs.mjs +1 -0
- package/lib/locale/cs.mjs.map +1 -1
- package/lib/locale/da.mjs +1 -0
- package/lib/locale/da.mjs.map +1 -1
- package/lib/locale/de.mjs +1 -0
- package/lib/locale/de.mjs.map +1 -1
- package/lib/locale/el.mjs +1 -0
- package/lib/locale/el.mjs.map +1 -1
- package/lib/locale/en.mjs +1 -0
- package/lib/locale/en.mjs.map +1 -1
- package/lib/locale/es.mjs +1 -0
- package/lib/locale/es.mjs.map +1 -1
- package/lib/locale/et.mjs +1 -0
- package/lib/locale/et.mjs.map +1 -1
- package/lib/locale/fa.mjs +1 -0
- package/lib/locale/fa.mjs.map +1 -1
- package/lib/locale/fi.mjs +1 -0
- package/lib/locale/fi.mjs.map +1 -1
- package/lib/locale/fr.mjs +1 -0
- package/lib/locale/fr.mjs.map +1 -1
- package/lib/locale/he.mjs +1 -0
- package/lib/locale/he.mjs.map +1 -1
- package/lib/locale/hr.mjs +1 -0
- package/lib/locale/hr.mjs.map +1 -1
- package/lib/locale/hu.mjs +1 -0
- package/lib/locale/hu.mjs.map +1 -1
- package/lib/locale/id.mjs +1 -0
- package/lib/locale/id.mjs.map +1 -1
- package/lib/locale/index.d.mts +43 -0
- package/lib/locale/it.mjs +1 -0
- package/lib/locale/it.mjs.map +1 -1
- package/lib/locale/ja.mjs +1 -0
- package/lib/locale/ja.mjs.map +1 -1
- package/lib/locale/km.mjs +1 -0
- package/lib/locale/km.mjs.map +1 -1
- package/lib/locale/ko.mjs +9 -8
- package/lib/locale/ko.mjs.map +1 -1
- package/lib/locale/lt.mjs +1 -0
- package/lib/locale/lt.mjs.map +1 -1
- package/lib/locale/lv.mjs +1 -0
- package/lib/locale/lv.mjs.map +1 -1
- package/lib/locale/nl.mjs +1 -0
- package/lib/locale/nl.mjs.map +1 -1
- package/lib/locale/no.mjs +1 -0
- package/lib/locale/no.mjs.map +1 -1
- package/lib/locale/pl.mjs +1 -0
- package/lib/locale/pl.mjs.map +1 -1
- package/lib/locale/pt.mjs +1 -0
- package/lib/locale/pt.mjs.map +1 -1
- package/lib/locale/ro.mjs +1 -0
- package/lib/locale/ro.mjs.map +1 -1
- package/lib/locale/ru.mjs +1 -0
- package/lib/locale/ru.mjs.map +1 -1
- package/lib/locale/sk.mjs +1 -0
- package/lib/locale/sk.mjs.map +1 -1
- package/lib/locale/sl.mjs +1 -0
- package/lib/locale/sl.mjs.map +1 -1
- package/lib/locale/sr-Cyrl.mjs +1 -0
- package/lib/locale/sr-Cyrl.mjs.map +1 -1
- package/lib/locale/sr-Latn.mjs +1 -0
- package/lib/locale/sr-Latn.mjs.map +1 -1
- package/lib/locale/sv.mjs +1 -0
- package/lib/locale/sv.mjs.map +1 -1
- package/lib/locale/th.mjs +1 -0
- package/lib/locale/th.mjs.map +1 -1
- package/lib/locale/tr.mjs +1 -0
- package/lib/locale/tr.mjs.map +1 -1
- package/lib/locale/uk.mjs +1 -0
- package/lib/locale/uk.mjs.map +1 -1
- package/lib/locale/vi.mjs +1 -0
- package/lib/locale/vi.mjs.map +1 -1
- package/lib/locale/zh-Hans.mjs +1 -0
- package/lib/locale/zh-Hans.mjs.map +1 -1
- package/lib/locale/zh-Hant.mjs +1 -0
- package/lib/locale/zh-Hant.mjs.map +1 -1
- package/lib/styles/main.css +78 -78
- package/lib/styles/settings/_variables.scss +21 -14
- package/package.json +2 -2
|
@@ -12,12 +12,14 @@ export const useDirectiveComponent = (component, props) => {
|
|
|
12
12
|
} = binding;
|
|
13
13
|
|
|
14
14
|
// Get the children from the props or directive value, or the element's children
|
|
15
|
-
const children = props
|
|
15
|
+
const children = props?.text || value?.text || el.innerHTML;
|
|
16
16
|
|
|
17
17
|
// If vnode.ctx is the same as the instance, then we're bound to a plain element
|
|
18
18
|
// and need to find the nearest parent component instance to inherit provides from
|
|
19
19
|
const provides = (vnode.ctx === binding.instance.$ ? findComponentParent(vnode, binding.instance.$)?.provides : vnode.ctx?.provides) ?? binding.instance.$.provides;
|
|
20
|
-
const node = h(concreteComponent, mergeProps(props, value),
|
|
20
|
+
const node = h(concreteComponent, mergeProps(props, value), {
|
|
21
|
+
default: () => children
|
|
22
|
+
});
|
|
21
23
|
node.appContext = Object.assign(Object.create(null), binding.instance.$.appContext, {
|
|
22
24
|
provides
|
|
23
25
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directiveComponent.mjs","names":["h","mergeProps","render","resolveComponent","useDirectiveComponent","component","props","concreteComponent","mounted","el","binding","vnode","value","children","text","innerHTML","provides","ctx","instance","$","findComponentParent","node","appContext","Object","assign","create","unmounted","root","stack","Set","walk","child","add","Array","isArray","result","subTree","delete","Error","from","reverse"],"sources":["../../src/composables/directiveComponent.ts"],"sourcesContent":["// Utilities\nimport { h, mergeProps, render, resolveComponent } from 'vue'\n\n// Types\nimport type {\n Component,\n ComponentInternalInstance,\n ComponentPublicInstance,\n ConcreteComponent,\n DirectiveBinding,\n ObjectDirective,\n VNode,\n} from 'vue'\n\nexport const useDirectiveComponent = (\n component: string | Component,\n props?: any\n): ObjectDirective => {\n const concreteComponent = (typeof component === 'string'\n ? resolveComponent(component)\n : component) as ConcreteComponent\n\n return {\n mounted (el: HTMLElement, binding: DirectiveBinding, vnode: VNode) {\n const { value } = binding\n\n // Get the children from the props or directive value, or the element's children\n const children = props
|
|
1
|
+
{"version":3,"file":"directiveComponent.mjs","names":["h","mergeProps","render","resolveComponent","useDirectiveComponent","component","props","concreteComponent","mounted","el","binding","vnode","value","children","text","innerHTML","provides","ctx","instance","$","findComponentParent","node","default","appContext","Object","assign","create","unmounted","root","stack","Set","walk","child","add","Array","isArray","result","subTree","delete","Error","from","reverse"],"sources":["../../src/composables/directiveComponent.ts"],"sourcesContent":["// Utilities\nimport { h, mergeProps, render, resolveComponent } from 'vue'\n\n// Types\nimport type {\n Component,\n ComponentInternalInstance,\n ComponentPublicInstance,\n ConcreteComponent,\n DirectiveBinding,\n ObjectDirective,\n VNode,\n} from 'vue'\n\nexport const useDirectiveComponent = (\n component: string | Component,\n props?: any\n): ObjectDirective => {\n const concreteComponent = (typeof component === 'string'\n ? resolveComponent(component)\n : component) as ConcreteComponent\n\n return {\n mounted (el: HTMLElement, binding: DirectiveBinding, vnode: VNode) {\n const { value } = binding\n\n // Get the children from the props or directive value, or the element's children\n const children = props?.text || value?.text || el.innerHTML\n\n // If vnode.ctx is the same as the instance, then we're bound to a plain element\n // and need to find the nearest parent component instance to inherit provides from\n const provides = (vnode.ctx === binding.instance!.$\n ? findComponentParent(vnode, binding.instance!.$)?.provides\n : vnode.ctx?.provides) ?? binding.instance!.$.provides\n\n const node = h(concreteComponent, mergeProps(props, value), { default: () => children })\n node.appContext = Object.assign(\n Object.create(null),\n (binding.instance as ComponentPublicInstance).$.appContext,\n { provides }\n )\n\n render(node, el)\n },\n unmounted (el: HTMLElement) {\n render(null, el)\n },\n }\n}\n\nfunction findComponentParent (vnode: VNode, root: ComponentInternalInstance): ComponentInternalInstance | null {\n // Walk the tree from root until we find the child vnode\n const stack = new Set<VNode>()\n const walk = (children: VNode[]): boolean => {\n for (const child of children) {\n if (!child) continue\n\n if (child === vnode) {\n return true\n }\n\n stack.add(child)\n if (Array.isArray(child.children)) {\n const result = walk(child.children as VNode[])\n if (result) {\n return result\n }\n } else if (child.component?.vnode) {\n const result = walk([child.component?.subTree])\n if (result) {\n return result\n }\n }\n stack.delete(child)\n }\n\n return false\n }\n if (!walk([root.subTree])) {\n throw new Error('Could not find original vnode')\n }\n\n // Return the first component parent\n const result = Array.from(stack).reverse()\n for (const child of result) {\n if (child.component) {\n return child.component\n }\n }\n return root\n}\n"],"mappings":"AAAA;AACA,SAASA,CAAC,EAAEC,UAAU,EAAEC,MAA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composables
|
|
2
2
|
import { useProxiedModel } from "./proxiedModel.mjs"; // Utilities
|
|
3
|
-
import { computed, inject, onBeforeUnmount, onMounted, provide, reactive, toRef, unref, watch } from 'vue';
|
|
3
|
+
import { computed, inject, onBeforeUnmount, onMounted, onUpdated, provide, reactive, toRef, unref, watch } from 'vue';
|
|
4
4
|
import { consoleWarn, deepEqual, findChildrenWithProvide, getCurrentInstance, getUid, propsFactory, wrapInArray } from "../util/index.mjs"; // Types
|
|
5
5
|
export const makeGroupProps = propsFactory({
|
|
6
6
|
modelValue: {
|
|
@@ -85,6 +85,7 @@ export function useGroup(props, injectKey) {
|
|
|
85
85
|
const index = children.indexOf(vm);
|
|
86
86
|
if (unref(unwrapped.value) == null) {
|
|
87
87
|
unwrapped.value = index;
|
|
88
|
+
unwrapped.useIndexAsValue = true;
|
|
88
89
|
}
|
|
89
90
|
if (index > -1) {
|
|
90
91
|
items.splice(index, 0, unwrapped);
|
|
@@ -117,6 +118,14 @@ export function useGroup(props, injectKey) {
|
|
|
117
118
|
onBeforeUnmount(() => {
|
|
118
119
|
isUnmounted = true;
|
|
119
120
|
});
|
|
121
|
+
onUpdated(() => {
|
|
122
|
+
// #19655 update the items that use the index as the value.
|
|
123
|
+
for (let i = 0; i < items.length; i++) {
|
|
124
|
+
if (items[i].useIndexAsValue) {
|
|
125
|
+
items[i].value = i;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
});
|
|
120
129
|
function select(id, value) {
|
|
121
130
|
const item = items.find(item => item.id === id);
|
|
122
131
|
if (value && item?.disabled) return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group.mjs","names":["useProxiedModel","computed","inject","onBeforeUnmount","onMounted","provide","reactive","toRef","unref","watch","consoleWarn","deepEqual","findChildrenWithProvide","getCurrentInstance","getUid","propsFactory","wrapInArray","makeGroupProps","modelValue","type","default","undefined","multiple","Boolean","mandatory","String","max","Number","selectedClass","disabled","makeGroupItemProps","value","useGroupItem","props","injectKey","required","arguments","length","vm","Error","id","Symbol","for","description","group","register","unregister","isSelected","emit","flush","toggle","select","useGroup","isUnmounted","items","selected","v","getIds","arr","getValues","groupVm","item","unwrapped","key","children","vnode","index","indexOf","splice","push","forceMandatoryValue","findIndex","find","internalValue","slice","includes","step","offset","currentId","currentIndex","i","newIndex","newItem","state","prev","next","getItemIndex","ids","forEach","itemByIndex","values","itemIndex"],"sources":["../../src/composables/group.ts"],"sourcesContent":["// Composables\nimport { useProxiedModel } from './proxiedModel'\n\n// Utilities\nimport { computed, inject, onBeforeUnmount, onMounted, provide, reactive, toRef, unref, watch } from 'vue'\nimport { consoleWarn, deepEqual, findChildrenWithProvide, getCurrentInstance, getUid, propsFactory, wrapInArray } from '@/util'\n\n// Types\nimport type { ComponentInternalInstance, ComputedRef, ExtractPropTypes, InjectionKey, PropType, Ref, UnwrapRef } from 'vue'\nimport type { EventProp } from '@/util'\n\nexport interface GroupItem {\n id: number\n value: Ref<unknown>\n disabled: Ref<boolean | undefined>\n}\n\nexport interface GroupProps {\n disabled: boolean\n modelValue: unknown\n multiple?: boolean\n mandatory?: boolean | 'force' | undefined\n max?: number | undefined\n selectedClass: string | undefined\n 'onUpdate:modelValue': EventProp<[unknown]> | undefined\n}\n\nexport interface GroupProvide {\n register: (item: GroupItem, cmp: ComponentInternalInstance) => void\n unregister: (id: number) => void\n select: (id: number, value: boolean) => void\n selected: Ref<Readonly<number[]>>\n isSelected: (id: number) => boolean\n prev: () => void\n next: () => void\n selectedClass: Ref<string | undefined>\n items: ComputedRef<{\n id: number\n value: unknown\n disabled: boolean | undefined\n }[]>\n disabled: Ref<boolean | undefined>\n getItemIndex: (value: unknown) => number\n}\n\nexport interface GroupItemProvide {\n id: number\n isSelected: Ref<boolean>\n toggle: () => void\n select: (value: boolean) => void\n selectedClass: Ref<(string | undefined)[] | false>\n value: Ref<unknown>\n disabled: Ref<boolean | undefined>\n group: GroupProvide\n}\n\nexport const makeGroupProps = propsFactory({\n modelValue: {\n type: null,\n default: undefined,\n },\n multiple: Boolean,\n mandatory: [Boolean, String] as PropType<boolean | 'force'>,\n max: Number,\n selectedClass: String,\n disabled: Boolean,\n}, 'group')\n\nexport const makeGroupItemProps = propsFactory({\n value: null,\n disabled: Boolean,\n selectedClass: String,\n}, 'group-item')\n\nexport interface GroupItemProps extends ExtractPropTypes<ReturnType<typeof makeGroupItemProps>> {\n 'onGroup:selected': EventProp<[{ value: boolean }]> | undefined\n}\n\n// Composables\nexport function useGroupItem (\n props: GroupItemProps,\n injectKey: InjectionKey<GroupProvide>,\n required?: true,\n): GroupItemProvide\nexport function useGroupItem (\n props: GroupItemProps,\n injectKey: InjectionKey<GroupProvide>,\n required: false,\n): GroupItemProvide | null\nexport function useGroupItem (\n props: GroupItemProps,\n injectKey: InjectionKey<GroupProvide>,\n required = true,\n): GroupItemProvide | null {\n const vm = getCurrentInstance('useGroupItem')\n\n if (!vm) {\n throw new Error(\n '[Vuetify] useGroupItem composable must be used inside a component setup function'\n )\n }\n\n const id = getUid()\n\n provide(Symbol.for(`${injectKey.description}:id`), id)\n\n const group = inject(injectKey, null)\n\n if (!group) {\n if (!required) return group\n\n throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${injectKey.description}`)\n }\n\n const value = toRef(props, 'value')\n const disabled = computed(() => !!(group.disabled.value || props.disabled))\n\n group.register({\n id,\n value,\n disabled,\n }, vm)\n\n onBeforeUnmount(() => {\n group.unregister(id)\n })\n\n const isSelected = computed(() => {\n return group.isSelected(id)\n })\n\n const selectedClass = computed(() => isSelected.value && [group.selectedClass.value, props.selectedClass])\n\n watch(isSelected, value => {\n vm.emit('group:selected', { value })\n }, { flush: 'sync' })\n\n return {\n id,\n isSelected,\n toggle: () => group.select(id, !isSelected.value),\n select: (value: boolean) => group.select(id, value),\n selectedClass,\n value,\n disabled,\n group,\n }\n}\n\nexport function useGroup (\n props: GroupProps,\n injectKey: InjectionKey<GroupProvide>\n) {\n let isUnmounted = false\n const items = reactive<GroupItem[]>([])\n const selected = useProxiedModel(\n props,\n 'modelValue',\n [],\n v => {\n if (v == null) return []\n\n return getIds(items, wrapInArray(v))\n },\n v => {\n const arr = getValues(items, v)\n\n return props.multiple ? arr : arr[0]\n }\n )\n\n const groupVm = getCurrentInstance('useGroup')\n\n function register (item: GroupItem, vm: ComponentInternalInstance) {\n // Is there a better way to fix this typing?\n const unwrapped = item as unknown as UnwrapRef<GroupItem>\n\n const key = Symbol.for(`${injectKey.description}:id`)\n const children = findChildrenWithProvide(key, groupVm?.vnode)\n const index = children.indexOf(vm)\n\n if (unref(unwrapped.value) == null) {\n unwrapped.value = index\n }\n\n if (index > -1) {\n items.splice(index, 0, unwrapped)\n } else {\n items.push(unwrapped)\n }\n }\n\n function unregister (id: number) {\n if (isUnmounted) return\n\n // TODO: re-evaluate this line's importance in the future\n // should we only modify the model if mandatory is set.\n // selected.value = selected.value.filter(v => v !== id)\n\n forceMandatoryValue()\n\n const index = items.findIndex(item => item.id === id)\n items.splice(index, 1)\n }\n\n // If mandatory and nothing is selected, then select first non-disabled item\n function forceMandatoryValue () {\n const item = items.find(item => !item.disabled)\n if (item && props.mandatory === 'force' && !selected.value.length) {\n selected.value = [item.id]\n }\n }\n\n onMounted(() => {\n forceMandatoryValue()\n })\n\n onBeforeUnmount(() => {\n isUnmounted = true\n })\n\n function select (id: number, value?: boolean) {\n const item = items.find(item => item.id === id)\n if (value && item?.disabled) return\n\n if (props.multiple) {\n const internalValue = selected.value.slice()\n const index = internalValue.findIndex(v => v === id)\n const isSelected = ~index\n value = value ?? !isSelected\n\n // We can't remove value if group is\n // mandatory, value already exists,\n // and it is the only value\n if (\n isSelected &&\n props.mandatory &&\n internalValue.length <= 1\n ) return\n\n // We can't add value if it would\n // cause max limit to be exceeded\n if (\n !isSelected &&\n props.max != null &&\n internalValue.length + 1 > props.max\n ) return\n\n if (index < 0 && value) internalValue.push(id)\n else if (index >= 0 && !value) internalValue.splice(index, 1)\n\n selected.value = internalValue\n } else {\n const isSelected = selected.value.includes(id)\n if (props.mandatory && isSelected) return\n\n selected.value = (value ?? !isSelected) ? [id] : []\n }\n }\n\n function step (offset: number) {\n // getting an offset from selected value obviously won't work with multiple values\n if (props.multiple) consoleWarn('This method is not supported when using \"multiple\" prop')\n\n if (!selected.value.length) {\n const item = items.find(item => !item.disabled)\n item && (selected.value = [item.id])\n } else {\n const currentId = selected.value[0]\n const currentIndex = items.findIndex(i => i.id === currentId)\n\n let newIndex = (currentIndex + offset) % items.length\n let newItem = items[newIndex]\n\n while (newItem.disabled && newIndex !== currentIndex) {\n newIndex = (newIndex + offset) % items.length\n newItem = items[newIndex]\n }\n\n if (newItem.disabled) return\n\n selected.value = [items[newIndex].id]\n }\n }\n\n const state: GroupProvide = {\n register,\n unregister,\n selected,\n select,\n disabled: toRef(props, 'disabled'),\n prev: () => step(items.length - 1),\n next: () => step(1),\n isSelected: (id: number) => selected.value.includes(id),\n selectedClass: computed(() => props.selectedClass),\n items: computed(() => items),\n getItemIndex: (value: unknown) => getItemIndex(items, value),\n }\n\n provide(injectKey, state)\n\n return state\n}\n\nfunction getItemIndex (items: UnwrapRef<GroupItem[]>, value: unknown) {\n const ids = getIds(items, [value])\n\n if (!ids.length) return -1\n\n return items.findIndex(item => item.id === ids[0])\n}\n\nfunction getIds (items: UnwrapRef<GroupItem[]>, modelValue: any[]) {\n const ids: number[] = []\n\n modelValue.forEach(value => {\n const item = items.find(item => deepEqual(value, item.value))\n const itemByIndex = items[value]\n\n if (item?.value != null) {\n ids.push(item.id)\n } else if (itemByIndex != null) {\n ids.push(itemByIndex.id)\n }\n })\n\n return ids\n}\n\nfunction getValues (items: UnwrapRef<GroupItem[]>, ids: any[]) {\n const values: unknown[] = []\n\n ids.forEach(id => {\n const itemIndex = items.findIndex(item => item.id === id)\n if (~itemIndex) {\n const item = items[itemIndex]\n values.push(item.value != null ? item.value : itemIndex)\n }\n })\n\n return values\n}\n"],"mappings":"AAAA;AAAA,SACSA,eAAe,8BAExB;AACA,SAASC,QAAQ,EAAEC,MAA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AAS,CAAC;MAC7BD,MAAM,CAACrB,IAAI,CAACR,IAAI,CAAC9B,KAAK,IAAI,IAAI,GAAG8B,IAAI,CAAC9B,KAAK,GAAG4D,SAAS,CAAC;IAC1D;EACF,CAAC,CAAC;EAEF,OAAOD,MAAM;AACf","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"group.mjs","names":["useProxiedModel","computed","inject","onBeforeUnmount","onMounted","onUpdated","provide","reactive","toRef","unref","watch","consoleWarn","deepEqual","findChildrenWithProvide","getCurrentInstance","getUid","propsFactory","wrapInArray","makeGroupProps","modelValue","type","default","undefined","multiple","Boolean","mandatory","String","max","Number","selectedClass","disabled","makeGroupItemProps","value","useGroupItem","props","injectKey","required","arguments","length","vm","Error","id","Symbol","for","description","group","register","unregister","isSelected","emit","flush","toggle","select","useGroup","isUnmounted","items","selected","v","getIds","arr","getValues","groupVm","item","unwrapped","key","children","vnode","index","indexOf","useIndexAsValue","splice","push","forceMandatoryValue","findIndex","find","i","internalValue","slice","includes","step","offset","currentId","currentIndex","newIndex","newItem","state","prev","next","getItemIndex","ids","forEach","itemByIndex","values","itemIndex"],"sources":["../../src/composables/group.ts"],"sourcesContent":["// Composables\nimport { useProxiedModel } from './proxiedModel'\n\n// Utilities\nimport { computed, inject, onBeforeUnmount, onMounted, onUpdated, provide, reactive, toRef, unref, watch } from 'vue'\nimport { consoleWarn, deepEqual, findChildrenWithProvide, getCurrentInstance, getUid, propsFactory, wrapInArray } from '@/util'\n\n// Types\nimport type { ComponentInternalInstance, ComputedRef, ExtractPropTypes, InjectionKey, PropType, Ref, UnwrapRef } from 'vue'\nimport type { EventProp } from '@/util'\n\nexport interface GroupItem {\n id: number\n value: Ref<unknown>\n disabled: Ref<boolean | undefined>\n useIndexAsValue?: boolean\n}\n\nexport interface GroupProps {\n disabled: boolean\n modelValue: unknown\n multiple?: boolean\n mandatory?: boolean | 'force' | undefined\n max?: number | undefined\n selectedClass: string | undefined\n 'onUpdate:modelValue': EventProp<[unknown]> | undefined\n}\n\nexport interface GroupProvide {\n register: (item: GroupItem, cmp: ComponentInternalInstance) => void\n unregister: (id: number) => void\n select: (id: number, value: boolean) => void\n selected: Ref<Readonly<number[]>>\n isSelected: (id: number) => boolean\n prev: () => void\n next: () => void\n selectedClass: Ref<string | undefined>\n items: ComputedRef<{\n id: number\n value: unknown\n disabled: boolean | undefined\n }[]>\n disabled: Ref<boolean | undefined>\n getItemIndex: (value: unknown) => number\n}\n\nexport interface GroupItemProvide {\n id: number\n isSelected: Ref<boolean>\n toggle: () => void\n select: (value: boolean) => void\n selectedClass: Ref<(string | undefined)[] | false>\n value: Ref<unknown>\n disabled: Ref<boolean | undefined>\n group: GroupProvide\n}\n\nexport const makeGroupProps = propsFactory({\n modelValue: {\n type: null,\n default: undefined,\n },\n multiple: Boolean,\n mandatory: [Boolean, String] as PropType<boolean | 'force'>,\n max: Number,\n selectedClass: String,\n disabled: Boolean,\n}, 'group')\n\nexport const makeGroupItemProps = propsFactory({\n value: null,\n disabled: Boolean,\n selectedClass: String,\n}, 'group-item')\n\nexport interface GroupItemProps extends ExtractPropTypes<ReturnType<typeof makeGroupItemProps>> {\n 'onGroup:selected': EventProp<[{ value: boolean }]> | undefined\n}\n\n// Composables\nexport function useGroupItem (\n props: GroupItemProps,\n injectKey: InjectionKey<GroupProvide>,\n required?: true,\n): GroupItemProvide\nexport function useGroupItem (\n props: GroupItemProps,\n injectKey: InjectionKey<GroupProvide>,\n required: false,\n): GroupItemProvide | null\nexport function useGroupItem (\n props: GroupItemProps,\n injectKey: InjectionKey<GroupProvide>,\n required = true,\n): GroupItemProvide | null {\n const vm = getCurrentInstance('useGroupItem')\n\n if (!vm) {\n throw new Error(\n '[Vuetify] useGroupItem composable must be used inside a component setup function'\n )\n }\n\n const id = getUid()\n\n provide(Symbol.for(`${injectKey.description}:id`), id)\n\n const group = inject(injectKey, null)\n\n if (!group) {\n if (!required) return group\n\n throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${injectKey.description}`)\n }\n\n const value = toRef(props, 'value')\n const disabled = computed(() => !!(group.disabled.value || props.disabled))\n\n group.register({\n id,\n value,\n disabled,\n }, vm)\n\n onBeforeUnmount(() => {\n group.unregister(id)\n })\n\n const isSelected = computed(() => {\n return group.isSelected(id)\n })\n\n const selectedClass = computed(() => isSelected.value && [group.selectedClass.value, props.selectedClass])\n\n watch(isSelected, value => {\n vm.emit('group:selected', { value })\n }, { flush: 'sync' })\n\n return {\n id,\n isSelected,\n toggle: () => group.select(id, !isSelected.value),\n select: (value: boolean) => group.select(id, value),\n selectedClass,\n value,\n disabled,\n group,\n }\n}\n\nexport function useGroup (\n props: GroupProps,\n injectKey: InjectionKey<GroupProvide>\n) {\n let isUnmounted = false\n const items = reactive<GroupItem[]>([])\n const selected = useProxiedModel(\n props,\n 'modelValue',\n [],\n v => {\n if (v == null) return []\n\n return getIds(items, wrapInArray(v))\n },\n v => {\n const arr = getValues(items, v)\n\n return props.multiple ? arr : arr[0]\n }\n )\n\n const groupVm = getCurrentInstance('useGroup')\n\n function register (item: GroupItem, vm: ComponentInternalInstance) {\n // Is there a better way to fix this typing?\n const unwrapped = item as unknown as UnwrapRef<GroupItem>\n\n const key = Symbol.for(`${injectKey.description}:id`)\n const children = findChildrenWithProvide(key, groupVm?.vnode)\n const index = children.indexOf(vm)\n\n if (unref(unwrapped.value) == null) {\n unwrapped.value = index\n unwrapped.useIndexAsValue = true\n }\n\n if (index > -1) {\n items.splice(index, 0, unwrapped)\n } else {\n items.push(unwrapped)\n }\n }\n\n function unregister (id: number) {\n if (isUnmounted) return\n\n // TODO: re-evaluate this line's importance in the future\n // should we only modify the model if mandatory is set.\n // selected.value = selected.value.filter(v => v !== id)\n\n forceMandatoryValue()\n\n const index = items.findIndex(item => item.id === id)\n items.splice(index, 1)\n }\n\n // If mandatory and nothing is selected, then select first non-disabled item\n function forceMandatoryValue () {\n const item = items.find(item => !item.disabled)\n if (item && props.mandatory === 'force' && !selected.value.length) {\n selected.value = [item.id]\n }\n }\n\n onMounted(() => {\n forceMandatoryValue()\n })\n\n onBeforeUnmount(() => {\n isUnmounted = true\n })\n\n onUpdated(() => {\n // #19655 update the items that use the index as the value.\n for (let i = 0; i < items.length; i++) {\n if (items[i].useIndexAsValue) {\n items[i].value = i\n }\n }\n })\n\n function select (id: number, value?: boolean) {\n const item = items.find(item => item.id === id)\n if (value && item?.disabled) return\n\n if (props.multiple) {\n const internalValue = selected.value.slice()\n const index = internalValue.findIndex(v => v === id)\n const isSelected = ~index\n value = value ?? !isSelected\n\n // We can't remove value if group is\n // mandatory, value already exists,\n // and it is the only value\n if (\n isSelected &&\n props.mandatory &&\n internalValue.length <= 1\n ) return\n\n // We can't add value if it would\n // cause max limit to be exceeded\n if (\n !isSelected &&\n props.max != null &&\n internalValue.length + 1 > props.max\n ) return\n\n if (index < 0 && value) internalValue.push(id)\n else if (index >= 0 && !value) internalValue.splice(index, 1)\n\n selected.value = internalValue\n } else {\n const isSelected = selected.value.includes(id)\n if (props.mandatory && isSelected) return\n\n selected.value = (value ?? !isSelected) ? [id] : []\n }\n }\n\n function step (offset: number) {\n // getting an offset from selected value obviously won't work with multiple values\n if (props.multiple) consoleWarn('This method is not supported when using \"multiple\" prop')\n\n if (!selected.value.length) {\n const item = items.find(item => !item.disabled)\n item && (selected.value = [item.id])\n } else {\n const currentId = selected.value[0]\n const currentIndex = items.findIndex(i => i.id === currentId)\n\n let newIndex = (currentIndex + offset) % items.length\n let newItem = items[newIndex]\n\n while (newItem.disabled && newIndex !== currentIndex) {\n newIndex = (newIndex + offset) % items.length\n newItem = items[newIndex]\n }\n\n if (newItem.disabled) return\n\n selected.value = [items[newIndex].id]\n }\n }\n\n const state: GroupProvide = {\n register,\n unregister,\n selected,\n select,\n disabled: toRef(props, 'disabled'),\n prev: () => step(items.length - 1),\n next: () => step(1),\n isSelected: (id: number) => selected.value.includes(id),\n selectedClass: computed(() => props.selectedClass),\n items: computed(() => items),\n getItemIndex: (value: unknown) => getItemIndex(items, value),\n }\n\n provide(injectKey, state)\n\n return state\n}\n\nfunction getItemIndex (items: UnwrapRef<GroupItem[]>, value: unknown) {\n const ids = getIds(items, [value])\n\n if (!ids.length) return -1\n\n return items.findIndex(item => item.id === ids[0])\n}\n\nfunction getIds (items: UnwrapRef<GroupItem[]>, modelValue: any[]) {\n const ids: number[] = []\n\n modelValue.forEach(value => {\n const item = items.find(item => deepEqual(value, item.value))\n const itemByIndex = items[value]\n\n if (item?.value != null) {\n ids.push(item.id)\n } else if (itemByIndex != null) {\n ids.push(itemByIndex.id)\n }\n })\n\n return ids\n}\n\nfunction getValues (items: UnwrapRef<GroupItem[]>, ids: any[]) {\n const values: unknown[] = []\n\n ids.forEach(id => {\n const itemIndex = items.findIndex(item => item.id === id)\n if (~itemIndex) {\n const item = items[itemIndex]\n values.push(item.value != null ? item.value : itemIndex)\n }\n })\n\n return values\n}\n"],"mappings":"AAAA;AAAA,SACSA,eAAe,8BAExB;AACA,SAASC,QAAQ,EAAEC,MAAM,EAAEC,eAAe,EAAEC,SAAS,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,KAAK,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC5GC,WAAW,EAAEC,SAAS,EAAEC,uBAAuB,EAAEC,kBAAkB,EAAEC,MAAM,EAAEC,YAAY,EAAEC,WAAW,6BAE/G;AAkDA,OAAO,MAAMC,cAAc,GAAGF,YAAY,CAAC;EACzCG,UAAU,EAAE;IACVC,IAAI,EAAE,IAAI;IACVC,OAAO,EAAEC;EACX,CAAC;EACDC,QAAQ,EAAEC,OAAO;EACjBC,SAAS,EAAE,CAACD,OAAO,EAAEE,MAAM,CAAgC;EAC3DC,GAAG,EAAEC,MAAM;EACXC,aAAa,EAAEH,MAAM;EACrBI,QAAQ,EAAEN;AACZ,CAAC,EAAE,OAAO,CAAC;AAEX,OAAO,MAAMO,kBAAkB,GAAGf,YAAY,CAAC;EAC7CgB,KAAK,EAAE,IAAI;EACXF,QAAQ,EAAEN,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AAG,CAAC,CAAC,CAAC,CAAC;AACpD;AAEA,SAAS/B,MAAMA,CAAEH,KAA6B,EAAEpC,UAAiB,EAAE;EACjE,MAAMsE,GAAa,GAAG,EAAE;EAExBtE,UAAU,CAACuE,OAAO,CAAC1D,KAAK,IAAI;IAC1B,MAAM8B,IAAI,GAAGP,KAAK,CAACmB,IAAI,CAACZ,IAAI,IAAIlD,SAAS,CAACoB,KAAK,EAAE8B,IAAI,CAAC9B,KAAK,CAAC,CAAC;IAC7D,MAAM2D,WAAW,GAAGpC,KAAK,CAACvB,KAAK,CAAC;IAEhC,IAAI8B,IAAI,EAAE9B,KAAK,IAAI,IAAI,EAAE;MACvByD,GAAG,CAAClB,IAAI,CAACT,IAAI,CAACrB,EAAE,CAAC;IACnB,CAAC,MAAM,IAAIkD,WAAW,IAAI,IAAI,EAAE;MAC9BF,GAAG,CAAClB,IAAI,CAACoB,WAAW,CAAClD,EAAE,CAAC;IAC1B;EACF,CAAC,CAAC;EAEF,OAAOgD,GAAG;AACZ;AAEA,SAAS7B,SAASA,CAAEL,KAA6B,EAAEkC,GAAU,EAAE;EAC7D,MAAMG,MAAiB,GAAG,EAAE;EAE5BH,GAAG,CAACC,OAAO,CAACjD,EAAE,IAAI;IAChB,MAAMoD,SAAS,GAAGtC,KAAK,CAACkB,SAAS,CAACX,IAAI,IAAIA,IAAI,CAACrB,EAAE,KAAKA,EAAE,CAAC;IACzD,IAAI,CAACoD,SAAS,EAAE;MACd,MAAM/B,IAAI,GAAGP,KAAK,CAACsC,SAAS,CAAC;MAC7BD,MAAM,CAACrB,IAAI,CAACT,IAAI,CAAC9B,KAAK,IAAI,IAAI,GAAG8B,IAAI,CAAC9B,KAAK,GAAG6D,SAAS,CAAC;IAC1D;EACF,CAAC,CAAC;EAEF,OAAOD,MAAM;AACf","ignoreList":[]}
|
package/lib/entry-bundler.mjs
CHANGED
|
@@ -16,7 +16,7 @@ export const createVuetify = function () {
|
|
|
16
16
|
...options
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
|
-
export const version = "3.5.
|
|
19
|
+
export const version = "3.5.18";
|
|
20
20
|
createVuetify.version = version;
|
|
21
21
|
export { blueprints, components, directives };
|
|
22
22
|
export * from "./composables/index.mjs";
|
package/lib/framework.mjs
CHANGED
package/lib/index.d.mts
CHANGED
|
@@ -523,20 +523,23 @@ declare module '@vue/runtime-core' {
|
|
|
523
523
|
}
|
|
524
524
|
|
|
525
525
|
export interface GlobalComponents {
|
|
526
|
-
VApp: typeof import('vuetify/components')['VApp']
|
|
527
526
|
VAlert: typeof import('vuetify/components')['VAlert']
|
|
528
527
|
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
|
528
|
+
VApp: typeof import('vuetify/components')['VApp']
|
|
529
529
|
VAppBar: typeof import('vuetify/components')['VAppBar']
|
|
530
530
|
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
|
531
531
|
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
|
532
532
|
VAvatar: typeof import('vuetify/components')['VAvatar']
|
|
533
|
-
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
|
534
533
|
VBadge: typeof import('vuetify/components')['VBadge']
|
|
535
|
-
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
|
536
|
-
VBtn: typeof import('vuetify/components')['VBtn']
|
|
537
534
|
VBanner: typeof import('vuetify/components')['VBanner']
|
|
538
535
|
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
|
539
536
|
VBannerText: typeof import('vuetify/components')['VBannerText']
|
|
537
|
+
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
|
538
|
+
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
|
539
|
+
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
|
540
|
+
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
|
541
|
+
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
|
542
|
+
VBtn: typeof import('vuetify/components')['VBtn']
|
|
540
543
|
VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
|
|
541
544
|
VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
|
|
542
545
|
VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
|
|
@@ -546,19 +549,16 @@ declare module '@vue/runtime-core' {
|
|
|
546
549
|
VCardSubtitle: typeof import('vuetify/components')['VCardSubtitle']
|
|
547
550
|
VCardText: typeof import('vuetify/components')['VCardText']
|
|
548
551
|
VCardTitle: typeof import('vuetify/components')['VCardTitle']
|
|
549
|
-
|
|
550
|
-
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
|
551
|
-
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
|
552
|
-
VCarousel: typeof import('vuetify/components')['VCarousel']
|
|
553
|
-
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
|
552
|
+
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
|
554
553
|
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
|
555
554
|
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
|
556
|
-
|
|
557
|
-
|
|
555
|
+
VCarousel: typeof import('vuetify/components')['VCarousel']
|
|
556
|
+
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
|
558
557
|
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
|
559
|
-
|
|
558
|
+
VChip: typeof import('vuetify/components')['VChip']
|
|
560
559
|
VCode: typeof import('vuetify/components')['VCode']
|
|
561
560
|
VCombobox: typeof import('vuetify/components')['VCombobox']
|
|
561
|
+
VCounter: typeof import('vuetify/components')['VCounter']
|
|
562
562
|
VDataTable: typeof import('vuetify/components')['VDataTable']
|
|
563
563
|
VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
|
|
564
564
|
VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
|
|
@@ -567,33 +567,34 @@ declare module '@vue/runtime-core' {
|
|
|
567
567
|
VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
|
|
568
568
|
VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
|
|
569
569
|
VDialog: typeof import('vuetify/components')['VDialog']
|
|
570
|
-
VDivider: typeof import('vuetify/components')['VDivider']
|
|
571
570
|
VDatePicker: typeof import('vuetify/components')['VDatePicker']
|
|
572
571
|
VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
|
|
573
572
|
VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
|
|
574
573
|
VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
|
|
575
574
|
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
|
576
575
|
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
|
577
|
-
|
|
578
|
-
VField: typeof import('vuetify/components')['VField']
|
|
579
|
-
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
|
576
|
+
VDivider: typeof import('vuetify/components')['VDivider']
|
|
580
577
|
VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
|
|
581
578
|
VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
|
|
582
579
|
VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
|
|
583
580
|
VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
|
|
581
|
+
VField: typeof import('vuetify/components')['VField']
|
|
582
|
+
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
|
583
|
+
VFileInput: typeof import('vuetify/components')['VFileInput']
|
|
584
584
|
VFooter: typeof import('vuetify/components')['VFooter']
|
|
585
585
|
VIcon: typeof import('vuetify/components')['VIcon']
|
|
586
586
|
VComponentIcon: typeof import('vuetify/components')['VComponentIcon']
|
|
587
587
|
VSvgIcon: typeof import('vuetify/components')['VSvgIcon']
|
|
588
588
|
VLigatureIcon: typeof import('vuetify/components')['VLigatureIcon']
|
|
589
589
|
VClassIcon: typeof import('vuetify/components')['VClassIcon']
|
|
590
|
-
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
|
591
590
|
VImg: typeof import('vuetify/components')['VImg']
|
|
592
|
-
VLabel: typeof import('vuetify/components')['VLabel']
|
|
593
|
-
VKbd: typeof import('vuetify/components')['VKbd']
|
|
594
591
|
VInput: typeof import('vuetify/components')['VInput']
|
|
595
592
|
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
|
596
593
|
VItem: typeof import('vuetify/components')['VItem']
|
|
594
|
+
VKbd: typeof import('vuetify/components')['VKbd']
|
|
595
|
+
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
|
596
|
+
VLabel: typeof import('vuetify/components')['VLabel']
|
|
597
|
+
VMain: typeof import('vuetify/components')['VMain']
|
|
597
598
|
VList: typeof import('vuetify/components')['VList']
|
|
598
599
|
VListGroup: typeof import('vuetify/components')['VListGroup']
|
|
599
600
|
VListImg: typeof import('vuetify/components')['VListImg']
|
|
@@ -603,15 +604,14 @@ declare module '@vue/runtime-core' {
|
|
|
603
604
|
VListItemSubtitle: typeof import('vuetify/components')['VListItemSubtitle']
|
|
604
605
|
VListItemTitle: typeof import('vuetify/components')['VListItemTitle']
|
|
605
606
|
VListSubheader: typeof import('vuetify/components')['VListSubheader']
|
|
606
|
-
VMain: typeof import('vuetify/components')['VMain']
|
|
607
607
|
VMenu: typeof import('vuetify/components')['VMenu']
|
|
608
|
-
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
|
609
608
|
VMessages: typeof import('vuetify/components')['VMessages']
|
|
610
|
-
VOverlay: typeof import('vuetify/components')['VOverlay']
|
|
611
609
|
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
|
612
|
-
|
|
613
|
-
|
|
610
|
+
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
|
611
|
+
VOverlay: typeof import('vuetify/components')['VOverlay']
|
|
614
612
|
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
|
613
|
+
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
|
614
|
+
VPagination: typeof import('vuetify/components')['VPagination']
|
|
615
615
|
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
|
616
616
|
VRating: typeof import('vuetify/components')['VRating']
|
|
617
617
|
VSelect: typeof import('vuetify/components')['VSelect']
|
|
@@ -619,9 +619,9 @@ declare module '@vue/runtime-core' {
|
|
|
619
619
|
VSheet: typeof import('vuetify/components')['VSheet']
|
|
620
620
|
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
|
621
621
|
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
|
622
|
-
VSlider: typeof import('vuetify/components')['VSlider']
|
|
623
622
|
VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
|
|
624
623
|
VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
|
|
624
|
+
VSlider: typeof import('vuetify/components')['VSlider']
|
|
625
625
|
VStepper: typeof import('vuetify/components')['VStepper']
|
|
626
626
|
VStepperActions: typeof import('vuetify/components')['VStepperActions']
|
|
627
627
|
VStepperHeader: typeof import('vuetify/components')['VStepperHeader']
|
|
@@ -629,41 +629,41 @@ declare module '@vue/runtime-core' {
|
|
|
629
629
|
VStepperWindow: typeof import('vuetify/components')['VStepperWindow']
|
|
630
630
|
VStepperWindowItem: typeof import('vuetify/components')['VStepperWindowItem']
|
|
631
631
|
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
|
632
|
-
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
|
633
632
|
VTabs: typeof import('vuetify/components')['VTabs']
|
|
634
633
|
VTab: typeof import('vuetify/components')['VTab']
|
|
634
|
+
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
|
635
635
|
VSwitch: typeof import('vuetify/components')['VSwitch']
|
|
636
636
|
VTextarea: typeof import('vuetify/components')['VTextarea']
|
|
637
637
|
VTable: typeof import('vuetify/components')['VTable']
|
|
638
638
|
VTextField: typeof import('vuetify/components')['VTextField']
|
|
639
|
-
VToolbar: typeof import('vuetify/components')['VToolbar']
|
|
640
|
-
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
|
641
|
-
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
|
642
639
|
VTimeline: typeof import('vuetify/components')['VTimeline']
|
|
643
640
|
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
|
644
641
|
VTooltip: typeof import('vuetify/components')['VTooltip']
|
|
645
642
|
VWindow: typeof import('vuetify/components')['VWindow']
|
|
646
643
|
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
|
644
|
+
VToolbar: typeof import('vuetify/components')['VToolbar']
|
|
645
|
+
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
|
646
|
+
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
|
647
647
|
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
|
648
648
|
VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
|
|
649
649
|
VForm: typeof import('vuetify/components')['VForm']
|
|
650
|
-
VHover: typeof import('vuetify/components')['VHover']
|
|
651
650
|
VContainer: typeof import('vuetify/components')['VContainer']
|
|
652
651
|
VCol: typeof import('vuetify/components')['VCol']
|
|
653
652
|
VRow: typeof import('vuetify/components')['VRow']
|
|
654
653
|
VSpacer: typeof import('vuetify/components')['VSpacer']
|
|
654
|
+
VHover: typeof import('vuetify/components')['VHover']
|
|
655
655
|
VLayout: typeof import('vuetify/components')['VLayout']
|
|
656
656
|
VLayoutItem: typeof import('vuetify/components')['VLayoutItem']
|
|
657
657
|
VLazy: typeof import('vuetify/components')['VLazy']
|
|
658
658
|
VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
|
|
659
659
|
VNoSsr: typeof import('vuetify/components')['VNoSsr']
|
|
660
660
|
VParallax: typeof import('vuetify/components')['VParallax']
|
|
661
|
-
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
|
662
661
|
VRadio: typeof import('vuetify/components')['VRadio']
|
|
662
|
+
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
|
663
663
|
VResponsive: typeof import('vuetify/components')['VResponsive']
|
|
664
664
|
VThemeProvider: typeof import('vuetify/components')['VThemeProvider']
|
|
665
|
-
VValidation: typeof import('vuetify/components')['VValidation']
|
|
666
665
|
VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
|
|
666
|
+
VValidation: typeof import('vuetify/components')['VValidation']
|
|
667
667
|
VFabTransition: typeof import('vuetify/components')['VFabTransition']
|
|
668
668
|
VDialogBottomTransition: typeof import('vuetify/components')['VDialogBottomTransition']
|
|
669
669
|
VDialogTopTransition: typeof import('vuetify/components')['VDialogTopTransition']
|
|
@@ -687,18 +687,19 @@ declare module '@vue/runtime-core' {
|
|
|
687
687
|
VCalendarIntervalEvent: typeof import('vuetify/labs/components')['VCalendarIntervalEvent']
|
|
688
688
|
VCalendarMonthDay: typeof import('vuetify/labs/components')['VCalendarMonthDay']
|
|
689
689
|
VEmptyState: typeof import('vuetify/labs/components')['VEmptyState']
|
|
690
|
+
VFab: typeof import('vuetify/labs/components')['VFab']
|
|
690
691
|
VNumberInput: typeof import('vuetify/labs/components')['VNumberInput']
|
|
691
692
|
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
|
692
693
|
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
|
693
|
-
VFab: typeof import('vuetify/labs/components')['VFab']
|
|
694
694
|
VTimePicker: typeof import('vuetify/labs/components')['VTimePicker']
|
|
695
695
|
VTimePickerClock: typeof import('vuetify/labs/components')['VTimePickerClock']
|
|
696
696
|
VTimePickerControls: typeof import('vuetify/labs/components')['VTimePickerControls']
|
|
697
697
|
VConfirmEdit: typeof import('vuetify/labs/components')['VConfirmEdit']
|
|
698
|
+
VSnackbarQueue: typeof import('vuetify/labs/components')['VSnackbarQueue']
|
|
698
699
|
VSparkline: typeof import('vuetify/labs/components')['VSparkline']
|
|
699
|
-
VSpeedDial: typeof import('vuetify/labs/components')['VSpeedDial']
|
|
700
700
|
VTreeview: typeof import('vuetify/labs/components')['VTreeview']
|
|
701
701
|
VTreeviewItem: typeof import('vuetify/labs/components')['VTreeviewItem']
|
|
702
702
|
VTreeviewGroup: typeof import('vuetify/labs/components')['VTreeviewGroup']
|
|
703
|
+
VSpeedDial: typeof import('vuetify/labs/components')['VSpeedDial']
|
|
703
704
|
}
|
|
704
705
|
}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
color: rgba(var(--v-theme-on-surface), var(--v-medium-emphasis-opacity));
|
|
29
29
|
font-size: 3.75rem;
|
|
30
30
|
font-weight: 300;
|
|
31
|
-
line-height:
|
|
31
|
+
line-height: 1;
|
|
32
32
|
text-align: center;
|
|
33
33
|
margin-bottom: 8px;
|
|
34
34
|
}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
.v-empty-state__title {
|
|
40
40
|
font-size: 1.25rem;
|
|
41
41
|
font-weight: 500;
|
|
42
|
-
line-height:
|
|
42
|
+
line-height: 1.6;
|
|
43
43
|
margin-bottom: 4px;
|
|
44
44
|
text-align: center;
|
|
45
45
|
}
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
.v-empty-state__text {
|
|
48
48
|
font-size: 0.875rem;
|
|
49
49
|
font-weight: 400;
|
|
50
|
-
line-height: 1.
|
|
50
|
+
line-height: 1.425;
|
|
51
51
|
padding: 0 16px;
|
|
52
52
|
text-align: center;
|
|
53
53
|
}
|
package/lib/labs/VFab/VFab.css
CHANGED
package/lib/labs/VFab/VFab.mjs
CHANGED
|
@@ -16,6 +16,7 @@ export const makeVFabProps = propsFactory({
|
|
|
16
16
|
app: Boolean,
|
|
17
17
|
appear: Boolean,
|
|
18
18
|
extended: Boolean,
|
|
19
|
+
layout: Boolean,
|
|
19
20
|
location: {
|
|
20
21
|
type: String,
|
|
21
22
|
default: 'bottom end'
|
|
@@ -66,8 +67,8 @@ export const VFab = genericComponent()({
|
|
|
66
67
|
id: props.name,
|
|
67
68
|
order: computed(() => parseInt(props.order, 10)),
|
|
68
69
|
position,
|
|
69
|
-
layoutSize: height,
|
|
70
|
-
elementSize: computed(() => height.value +
|
|
70
|
+
layoutSize: computed(() => props.layout ? height.value + 24 : 0),
|
|
71
|
+
elementSize: computed(() => height.value + 24),
|
|
71
72
|
active: computed(() => props.app && model.value),
|
|
72
73
|
absolute: toRef(props, 'absolute')
|
|
73
74
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VFab.mjs","names":["makeVBtnProps","VBtn","makeLayoutItemProps","useLayoutItem","useProxiedModel","useResizeObserver","useToggleScope","makeTransitionProps","MaybeTransition","computed","ref","shallowRef","toRef","watchEffect","genericComponent","omit","propsFactory","useRender","locations","makeVFabProps","app","Boolean","appear","extended","location","type","String","default","offset","modelValue","active","transition","VFab","name","props","emits","value","setup","_ref","slots","model","height","layoutItemStyles","resizeRef","entries","length","target","clientHeight","hasPosition","absolute","position","split","shift","orientation","
|
|
1
|
+
{"version":3,"file":"VFab.mjs","names":["makeVBtnProps","VBtn","makeLayoutItemProps","useLayoutItem","useProxiedModel","useResizeObserver","useToggleScope","makeTransitionProps","MaybeTransition","computed","ref","shallowRef","toRef","watchEffect","genericComponent","omit","propsFactory","useRender","locations","makeVFabProps","app","Boolean","appear","extended","layout","location","type","String","default","offset","modelValue","active","transition","VFab","name","props","emits","value","setup","_ref","slots","model","height","layoutItemStyles","resizeRef","entries","length","target","clientHeight","hasPosition","absolute","position","split","shift","orientation","id","order","parseInt","layoutSize","elementSize","vFabRef","btnProps","filterProps","_createVNode","class","width","undefined","style","_withDirectives","_mergeProps","_vShow"],"sources":["../../../src/labs/VFab/VFab.tsx"],"sourcesContent":["// Styles\nimport './VFab.sass'\n\n// Components\nimport { makeVBtnProps, VBtn } from '@/components/VBtn/VBtn'\n\n// Composables\nimport { makeLayoutItemProps, useLayoutItem } from '@/composables/layout'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { useResizeObserver } from '@/composables/resizeObserver'\nimport { useToggleScope } from '@/composables/toggleScope'\nimport { makeTransitionProps, MaybeTransition } from '@/composables/transition'\n\n// Utilities\nimport { computed, ref, shallowRef, toRef, watchEffect } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { ComputedRef, PropType } from 'vue'\nimport type { Position } from '@/composables/layout'\n\nconst locations = ['start', 'end', 'left', 'right', 'top', 'bottom'] as const\n\nexport const makeVFabProps = propsFactory({\n app: Boolean,\n appear: Boolean,\n extended: Boolean,\n layout: Boolean,\n location: {\n type: String as PropType<typeof locations[number]>,\n default: 'bottom end',\n },\n offset: Boolean,\n modelValue: {\n type: Boolean,\n default: true,\n },\n\n ...omit(makeVBtnProps({ active: true }), ['location']),\n ...makeLayoutItemProps(),\n ...makeTransitionProps({ transition: 'fab-transition' }),\n}, 'VFab')\n\nexport const VFab = genericComponent()({\n name: 'VFab',\n\n props: makeVFabProps(),\n\n emits: {\n 'update:modelValue': (value: boolean) => true,\n },\n\n setup (props, { slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const height = shallowRef(56)\n const layoutItemStyles = ref()\n\n const { resizeRef } = useResizeObserver(entries => {\n if (!entries.length) return\n height.value = entries[0].target.clientHeight\n })\n\n const hasPosition = computed(() => props.app || props.absolute)\n\n const position = computed(() => {\n if (!hasPosition.value) return false\n\n return props.location.split(' ').shift()\n }) as ComputedRef<Position>\n\n const orientation = computed(() => {\n if (!hasPosition.value) return false\n\n return props.location.split(' ')[1] ?? 'end'\n })\n\n useToggleScope(() => props.app, () => {\n const layout = useLayoutItem({\n id: props.name,\n order: computed(() => parseInt(props.order, 10)),\n position,\n layoutSize: computed(() => props.layout ? height.value + 24 : 0),\n elementSize: computed(() => height.value + 24),\n active: computed(() => props.app && model.value),\n absolute: toRef(props, 'absolute'),\n })\n\n watchEffect(() => {\n layoutItemStyles.value = layout.layoutItemStyles.value\n })\n })\n\n const vFabRef = ref()\n\n useRender(() => {\n const btnProps = VBtn.filterProps(props)\n\n return (\n <div\n ref={ vFabRef }\n class={[\n 'v-fab',\n {\n 'v-fab--absolute': props.absolute,\n 'v-fab--app': !!props.app,\n 'v-fab--extended': props.extended,\n 'v-fab--offset': props.offset,\n [`v-fab--${position.value}`]: hasPosition.value,\n [`v-fab--${orientation.value}`]: hasPosition.value,\n },\n props.class,\n ]}\n style={[\n props.app ? {\n ...layoutItemStyles.value,\n } : {\n height: 'inherit',\n width: undefined,\n },\n props.style,\n ]}\n >\n <div class=\"v-fab__container\">\n <MaybeTransition\n appear={ props.appear }\n transition={ props.transition }\n >\n <VBtn\n v-show={ props.active }\n ref={ resizeRef }\n { ...btnProps }\n active={ undefined }\n location={ undefined }\n v-slots={ slots }\n />\n </MaybeTransition>\n </div>\n </div>\n )\n })\n\n return {}\n },\n})\n\nexport type VFab = InstanceType<typeof VFab>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,aAAa,EAAEC,IAAI,0CAE5B;AAAA,SACSC,mBAAmB,EAAEC,aAAa;AAAA,SAClCC,eAAe;AAAA,SACfC,iBAAiB;AAAA,SACjBC,cAAc;AAAA,SACdC,mBAAmB,EAAEC,eAAe,4CAE7C;AACA,SAASC,QAAQ,EAAEC,GAAG,EAAEC,UAAU,EAAEC,KAAK,EAAEC,WAAW,QAAQ,KAAK;AAAA,SAC1DC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,gCAExD;AAIA,MAAMC,SAAS,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAU;AAE7E,OAAO,MAAMC,aAAa,GAAGH,YAAY,CAAC;EACxCI,GAAG,EAAEC,OAAO;EACZC,MAAM,EAAED,OAAO;EACfE,QAAQ,EAAEF,OAAO;EACjBG,MAAM,EAAEH,OAAO;EACfI,QAAQ,EAAE;IACRC,IAAI,EAAEC,MAA4C;IAClDC,OAAO,EAAE;EACX,CAAC;EACDC,MAAM,EAAER,OAA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AO,EACP;UACE,iBAAiB,EAAEzB,KAAK,CAACe,QAAQ;UACjC,YAAY,EAAE,CAAC,CAACf,KAAK,CAACf,GAAG;UACzB,iBAAiB,EAAEe,KAAK,CAACZ,QAAQ;UACjC,eAAe,EAAEY,KAAK,CAACN,MAAM;UAC7B,CAAE,UAASsB,QAAQ,CAACd,KAAM,EAAC,GAAGY,WAAW,CAACZ,KAAK;UAC/C,CAAE,UAASiB,WAAW,CAACjB,KAAM,EAAC,GAAGY,WAAW,CAACZ;QAC/C,CAAC,EACDF,KAAK,CAAC6B,KAAK,CACZ;QAAA,SACM,CACL7B,KAAK,CAACf,GAAG,GAAG;UACV,GAAGuB,gBAAgB,CAACN;QACtB,CAAC,GAAG;UACFK,MAAM,EAAE,SAAS;UACjBuB,KAAK,EAAEC;QACT,CAAC,EACD/B,KAAK,CAACgC,KAAK;MACZ,IAAAJ,YAAA;QAAA;MAAA,IAAAA,YAAA,CAAAvD,eAAA;QAAA,UAIY2B,KAAK,CAACb,MAAM;QAAA,cACRa,KAAK,CAACH;MAAU;QAAAJ,OAAA,EAAAA,CAAA,MAAAwC,eAAA,CAAAL,YAAA,CAAA9D,IAAA,EAAAoE,WAAA;UAAA,OAIrBzB;QAAS,GACViB,QAAQ;UAAA,UACJK,SAAS;UAAA,YACPA;QAAS,IACV1B,KAAK,KAAA8B,MAAA,EALNnC,KAAK,CAACJ,MAAM;MAAA;IAWjC,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
package/lib/labs/VFab/VFab.sass
CHANGED
|
@@ -16,6 +16,7 @@ interface GroupItem {
|
|
|
16
16
|
id: number;
|
|
17
17
|
value: Ref<unknown>;
|
|
18
18
|
disabled: Ref<boolean | undefined>;
|
|
19
|
+
useIndexAsValue?: boolean;
|
|
19
20
|
}
|
|
20
21
|
interface GroupProvide {
|
|
21
22
|
register: (item: GroupItem, cmp: ComponentInternalInstance) => void;
|
|
@@ -45,6 +46,7 @@ declare const VFab: {
|
|
|
45
46
|
active: boolean;
|
|
46
47
|
disabled: boolean;
|
|
47
48
|
tag: string;
|
|
49
|
+
layout: boolean;
|
|
48
50
|
offset: boolean;
|
|
49
51
|
order: string | number;
|
|
50
52
|
absolute: boolean;
|
|
@@ -112,6 +114,7 @@ declare const VFab: {
|
|
|
112
114
|
active: boolean;
|
|
113
115
|
disabled: boolean;
|
|
114
116
|
tag: string;
|
|
117
|
+
layout: boolean;
|
|
115
118
|
offset: boolean;
|
|
116
119
|
order: string | number;
|
|
117
120
|
absolute: boolean;
|
|
@@ -177,6 +180,7 @@ declare const VFab: {
|
|
|
177
180
|
active: boolean;
|
|
178
181
|
disabled: boolean;
|
|
179
182
|
tag: string;
|
|
183
|
+
layout: boolean;
|
|
180
184
|
offset: boolean;
|
|
181
185
|
order: string | number;
|
|
182
186
|
absolute: boolean;
|
|
@@ -219,6 +223,7 @@ declare const VFab: {
|
|
|
219
223
|
active: boolean;
|
|
220
224
|
disabled: boolean;
|
|
221
225
|
tag: string;
|
|
226
|
+
layout: boolean;
|
|
222
227
|
offset: boolean;
|
|
223
228
|
order: string | number;
|
|
224
229
|
absolute: boolean;
|
|
@@ -284,6 +289,7 @@ declare const VFab: {
|
|
|
284
289
|
active: boolean;
|
|
285
290
|
disabled: boolean;
|
|
286
291
|
tag: string;
|
|
292
|
+
layout: boolean;
|
|
287
293
|
offset: boolean;
|
|
288
294
|
order: string | number;
|
|
289
295
|
absolute: boolean;
|
|
@@ -319,6 +325,7 @@ declare const VFab: {
|
|
|
319
325
|
active: boolean;
|
|
320
326
|
disabled: boolean;
|
|
321
327
|
tag: string;
|
|
328
|
+
layout: boolean;
|
|
322
329
|
offset: boolean;
|
|
323
330
|
order: string | number;
|
|
324
331
|
absolute: boolean;
|
|
@@ -386,6 +393,7 @@ declare const VFab: {
|
|
|
386
393
|
active: boolean;
|
|
387
394
|
disabled: boolean;
|
|
388
395
|
tag: string;
|
|
396
|
+
layout: boolean;
|
|
389
397
|
offset: boolean;
|
|
390
398
|
order: string | number;
|
|
391
399
|
absolute: boolean;
|
|
@@ -522,6 +530,7 @@ declare const VFab: {
|
|
|
522
530
|
app: BooleanConstructor;
|
|
523
531
|
appear: BooleanConstructor;
|
|
524
532
|
extended: BooleanConstructor;
|
|
533
|
+
layout: BooleanConstructor;
|
|
525
534
|
location: {
|
|
526
535
|
type: PropType<"left" | "right" | "end" | "top" | "bottom" | "start">;
|
|
527
536
|
default: string;
|
|
@@ -641,6 +650,7 @@ declare const VFab: {
|
|
|
641
650
|
app: BooleanConstructor;
|
|
642
651
|
appear: BooleanConstructor;
|
|
643
652
|
extended: BooleanConstructor;
|
|
653
|
+
layout: BooleanConstructor;
|
|
644
654
|
location: {
|
|
645
655
|
type: PropType<"left" | "right" | "end" | "top" | "bottom" | "start">;
|
|
646
656
|
default: string;
|