How to use @inkline/inkline - 10 common examples

To help you get started, we’ve selected a few @inkline/inkline examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github inkline / inkline / src / transitions / TransitionExpand / script.js View on Github external
enter(element) {
                    const width = getStyleProperty(element, 'width');

                    element.style.width = width;
                    element.style.position = 'absolute';
                    element.style.visibility = 'hidden';
                    element.style.height = 'auto';

                    const height = getStyleProperty(element, 'height');

                    element.style.width = null;
                    element.style.position = null;
                    element.style.visibility = null;
                    element.style.height = 0;

                    getStyleProperty(element, 'height'); // Force rerender element to set correct height
                    setTimeout(() => {
                        element.style.height = height;
                    });
                },
                afterEnter(element) {
github inkline / inkline / src / transitions / TransitionExpand / script.js View on Github external
enter(element) {
                    const width = getStyleProperty(element, 'width');

                    element.style.width = width;
                    element.style.position = 'absolute';
                    element.style.visibility = 'hidden';
                    element.style.height = 'auto';

                    const height = getStyleProperty(element, 'height');

                    element.style.width = null;
                    element.style.position = null;
                    element.style.visibility = null;
                    element.style.height = 0;

                    getStyleProperty(element, 'height'); // Force rerender element to set correct height
                    setTimeout(() => {
                        element.style.height = height;
github inkline / inkline / src / transitions / TransitionExpand / script.js View on Github external
leave(element) {
                    element.style.height = getStyleProperty(element, 'height');

                    getStyleProperty(element, 'height'); // Force rerender element to set correct height
                    setTimeout(() => {
                        element.style.height = 0;
                    });
                }
            }
github inkline / inkline / src / transitions / TransitionExpand / script.js View on Github external
enter(element) {
                    const width = getStyleProperty(element, 'width');

                    element.style.width = width;
                    element.style.position = 'absolute';
                    element.style.visibility = 'hidden';
                    element.style.height = 'auto';

                    const height = getStyleProperty(element, 'height');

                    element.style.width = null;
                    element.style.position = null;
                    element.style.visibility = null;
                    element.style.height = 0;

                    getStyleProperty(element, 'height'); // Force rerender element to set correct height
                    setTimeout(() => {
                        element.style.height = height;
                    });
                },
                afterEnter(element) {
github inkline / inkline / tests / unit / mixins / components / providers / PopupProviderMixin.spec.js View on Github external
it('should return if Vue.$isServer', () => {
                    isServer(true);

                    expect(wrapper.vm.createPopper()).toEqual(undefined);

                    isServer(false);
                });
github inkline / inkline / tests / unit / components / Pagination.spec.js View on Github external
it('should not add window resize event listener if Vue.$isServer', () => {
                isServer(true, wrapper.vm);

                const spy = jest.spyOn(window, 'addEventListener');

                wrapper.vm.created();

                expect(spy).not.toHaveBeenCalledTimes(3);

                isServer(false, wrapper.vm);
            });
        });
github inkline / inkline / tests / unit / helpers / triggerEvent.spec.js View on Github external
it('should return if Vue.$isServer', () => {
            isServer(true);
            expect(triggerEvent(element, 'eventName')).not.toBeDefined();
            isServer(false);
        });
github inkline / inkline / tests / unit / mixins / components / providers / CollapsibleProviderMixin.spec.js View on Github external
it('should equal 0 if window is not defined', () => {
                    isServer(true);

                    expect(createWrapper().vm.windowWidth).toEqual(0);

                    isServer(false);
                });
            });
github inkline / inkline / tests / unit / helpers / off.spec.js View on Github external
it('should be a function calling detachEventBinding on element', () => {
            isServer(true);

            const spy = jest.spyOn(element, 'detachEvent');
            const fn = () => {};

            _off()(element, 'eventName', fn);

            expect(spy).toHaveBeenCalled();
            expect(spy).toHaveBeenCalledWith('oneventName', fn);

            isServer(false);
        });
github inkline / inkline / tests / unit / directives / click-outside.spec.js View on Github external
it('should not bind mousedown and mouseup events if Vue.$isServer', () => {
                isServer(true);

                const spy = jest.spyOn(window.document, 'addEventListener');

                bindClickOutsideHandler();

                expect(spy).not.toHaveBeenCalledTimes(5);

                isServer(false);
            });
        });