@ark-ui/vue
Version:
A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.
46 lines (41 loc) • 1.45 kB
JavaScript
'use strict';
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
const vue = require('vue');
const factory = require('../factory.cjs');
const usePagination = require('./use-pagination.cjs');
const usePaginationContext = require('./use-pagination-context.cjs');
const useForwardExpose = require('../../utils/use-forward-expose.cjs');
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
__name: "pagination-root",
props: {
count: {},
defaultPage: {},
defaultPageSize: {},
id: {},
ids: {},
page: {},
pageSize: {},
siblingCount: {},
translations: {},
type: {},
getPageUrl: { type: Function },
asChild: { type: Boolean }
},
emits: ["pageChange", "pageSizeChange", "update:page", "update:pageSize"],
setup(__props, { emit: __emit }) {
const props = __props;
const emits = __emit;
const pagination = usePagination.usePagination(props, emits);
usePaginationContext.PaginationProvider(pagination);
useForwardExpose.useForwardExpose();
return (_ctx, _cache) => {
return vue.openBlock(), vue.createBlock(vue.unref(factory.ark).nav, vue.mergeProps(vue.unref(pagination).getRootProps(), { "as-child": __props.asChild }), {
default: vue.withCtx(() => [
vue.renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 16, ["as-child"]);
};
}
});
exports.default = _sfc_main;