UNPKG

primevue

Version:

PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBloc

59 lines (56 loc) 1.66 kB
import { style } from '@primeuix/styles/drawer'; import BaseStyle from '@primevue/core/base/style'; var inlineStyles = { mask: function mask(_ref) { var position = _ref.position, modal = _ref.modal; return { position: 'fixed', height: '100%', width: '100%', left: 0, top: 0, display: 'flex', justifyContent: position === 'left' ? 'flex-start' : position === 'right' ? 'flex-end' : 'center', alignItems: position === 'top' ? 'flex-start' : position === 'bottom' ? 'flex-end' : 'center', pointerEvents: modal ? 'auto' : 'none' }; }, root: { pointerEvents: 'auto' } }; var classes = { mask: function mask(_ref2) { var instance = _ref2.instance, props = _ref2.props; var positions = ['left', 'right', 'top', 'bottom']; var pos = positions.find(function (item) { return item === props.position; }); return ['p-drawer-mask', { 'p-overlay-mask p-overlay-mask-enter': props.modal, 'p-drawer-open': instance.containerVisible, 'p-drawer-full': instance.fullScreen }, pos ? "p-drawer-".concat(pos) : '']; }, root: function root(_ref3) { var instance = _ref3.instance; return ['p-drawer p-component', { 'p-drawer-full': instance.fullScreen }]; }, header: 'p-drawer-header', title: 'p-drawer-title', pcCloseButton: 'p-drawer-close-button', content: 'p-drawer-content', footer: 'p-drawer-footer' }; var DrawerStyle = BaseStyle.extend({ name: 'drawer', style: style, classes: classes, inlineStyles: inlineStyles }); export { DrawerStyle as default }; //# sourceMappingURL=index.mjs.map