index int64 0 0 | repo_id stringlengths 16 181 | file_path stringlengths 28 270 | content stringlengths 1 11.6M | __index_level_0__ int64 0 10k |
|---|---|---|---|---|
0 | petrpan-code/Splidejs/splide/src/js/components/Slides | petrpan-code/Splidejs/splide/src/js/components/Slides/test/slide.test.ts | import { CLASS_ACTIVE, CLASS_NEXT, CLASS_PREV, CLASS_SLIDE, CLASS_VISIBLE } from '../../../constants/classes';
import {
EVENT_ACTIVE,
EVENT_CLICK,
EVENT_HIDDEN,
EVENT_INACTIVE,
EVENT_SLIDE_KEYDOWN,
EVENT_VISIBLE,
} from '../../../constants/events';
import { Splide } from '../../../core/Splide/Splide';
impor... | 3,100 |
0 | petrpan-code/Splidejs/splide/src/js/components | petrpan-code/Splidejs/splide/src/js/components/Sync/Sync.ts | import { ARIA_ORIENTATION } from '../../constants/attributes';
import { TTB } from '../../constants/directions';
import {
EVENT_CLICK,
EVENT_MOUNTED,
EVENT_MOVE,
EVENT_NAVIGATION_MOUNTED,
EVENT_SLIDE_KEYDOWN,
EVENT_UPDATED,
} from '../../constants/events';
import { LOOP } from '../../constants/types';
impor... | 3,101 |
0 | petrpan-code/Splidejs/splide/src/js/components/Sync | petrpan-code/Splidejs/splide/src/js/components/Sync/test/navigation.test.ts | import { fire, init, keydown } from '../../../test';
describe( 'Sync#navigate()', () => {
test( 'can make slides clickable.', () => {
const primary = init( { speed: 0 }, { id: 'primary', mount: false } );
const secondary = init( { speed: 0, isNavigation: true }, { id: 'secondary', insertHtml: true, mount:... | 3,102 |
0 | petrpan-code/Splidejs/splide/src/js/components/Sync | petrpan-code/Splidejs/splide/src/js/components/Sync/test/sync.test.ts | import { EVENT_MOVE } from '../../../constants/events';
import { Splide } from '../../../core/Splide/Splide';
import { init } from '../../../test';
describe( 'Sync#sync()', () => {
test( 'can sync Splide sliders.', () => {
const primary = init( { speed: 0 }, { id: 'primary', mount: false } );
const second... | 3,103 |
0 | petrpan-code/Splidejs/splide/src/js/components | petrpan-code/Splidejs/splide/src/js/components/Wheel/Wheel.ts | import { SCROLL_LISTENER_OPTIONS } from '../../constants/listener-options';
import { MOVING } from '../../constants/states';
import { EventInterface } from '../../constructors';
import { Splide } from '../../core/Splide/Splide';
import { BaseComponent, Components, Options } from '../../types';
import { abs, prevent, ti... | 3,104 |
0 | petrpan-code/Splidejs/splide/src/js/components/Wheel | petrpan-code/Splidejs/splide/src/js/components/Wheel/test/general.test.ts | import { fire, init } from '../../../test';
describe( 'Wheel', () => {
test( 'can navigate the slider by the mouse wheel.', () => {
const splide = init( { speed: 0, wheel: true } );
const { track } = splide.Components.Elements;
fireCancelable( track, 'wheel', { deltaY: 100 } );
expect( splide.index... | 3,105 |
0 | petrpan-code/Splidejs/splide/src/js/components/Wheel | petrpan-code/Splidejs/splide/src/js/components/Wheel/test/inertia.test.ts | import { init } from '../../../test';
import { fireCancelable } from './general.test';
describe( 'Wheel', () => {
test( 'should move the slider only when the delta is greater than the min threshold.', () => {
const splide = init( { speed: 0, wheel: true, wheelMinThreshold: 50 } );
const { track } = splide.C... | 3,106 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/constants/arrows.ts | const ARROW = 'Arrow';
export const ARROW_LEFT = `${ ARROW }Left`;
export const ARROW_RIGHT = `${ ARROW }Right`;
export const ARROW_UP = `${ ARROW }Up`;
export const ARROW_DOWN = `${ ARROW }Down`; | 3,107 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/constants/attributes.ts | export const ROLE = 'role';
export const TAB_INDEX = 'tabindex';
export const DISABLED = 'disabled';
export const ARIA_PREFIX = 'aria-';
export const ARIA_CONTROLS = `${ ARIA_PREFIX }controls`;
export const ARIA_CURRENT = `${ ARIA_PREFIX }current`;
export const ARIA_SELECTED = `${ ... | 3,108 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/constants/classes.ts | import { PROJECT_CODE } from './project';
/**
* The prefix for classes.
*
* @since 4.1.0
*/
const CLASS_PREFIX = `${ PROJECT_CODE }__`;
/**
* The prefix for status classes.
*
* @since 4.1.0
*/
const STATUS_CLASS_PREFIX = 'is-';
/**
* All classes as constants.
*/
export const CLASS_ROOT = PROJECT... | 3,109 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/constants/defaults.ts | import { Options } from '../types';
import { CLASSES } from './classes';
import { I18N } from './i18n';
/**
* The collection of default options.
* Note that this collection does not contain all options.
*
* @since 3.0.0
*/
export const DEFAULTS: Options = {
type : 'slide',
role : 'r... | 3,110 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/constants/directions.ts | /**
* Enumerates slides from left to right.
*/
export const LTR = 'ltr';
/**
* Enumerates slides from right to left.
*/
export const RTL = 'rtl';
/**
* Enumerates slides in a col.
*/
export const TTB = 'ttb';
| 3,111 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/constants/events.ts | export const EVENT_MOUNTED = 'mounted';
export const EVENT_READY = 'ready';
export const EVENT_MOVE = 'move';
export const EVENT_MOVED = 'moved';
export const EVENT_CLICK = 'click';
export const EVENT_ACTIVE = 'active';
export const EVENT_INACT... | 3,112 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/constants/i18n.ts | /**
* The collection of i18n strings.
*
* @since 3.0.0
*/
export const I18N = {
prev : 'Previous slide',
next : 'Next slide',
first : 'Go to first slide',
last : 'Go to last slide',
slideX : 'Go to slide %s',
pageX : 'Go to page %s',
play : 'Start autoplay',
pause ... | 3,113 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/constants/listener-options.ts | /**
* AddEventListenerOptions for listeners that may prevent the browser scroll.
*
* @since 3.4.1
*/
export const SCROLL_LISTENER_OPTIONS = { passive: false, capture: true };
| 3,114 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/constants/media.ts | /**
* Matches when users request reducing non-essential animations.
*
* @link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion
*/
export const MEDIA_PREFERS_REDUCED_MOTION = '(prefers-reduced-motion: reduce)'; | 3,115 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/constants/project.ts | /**
* The project code.
*
* @since 3.0.0
*/
export const PROJECT_CODE = 'splide';
/**
* The data attribute prefix.
*
* @since 3.0.0
*/
export const DATA_ATTRIBUTE = `data-${ PROJECT_CODE }`;
| 3,116 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/constants/states.ts | /**
* Splide has been just created.
*/
export const CREATED = 1;
/**
* Splide has mounted components.
*/
export const MOUNTED = 2;
/**
* Splide is ready.
*/
export const IDLE = 3;
/**
* Splide is moving.
*/
export const MOVING = 4;
/**
* Splide is moving.
*/
export const SCROLLING = 5;
/**
* The user is... | 3,117 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/constants/types.ts | /**
* The type for the regular slider.
*
* @since 3.0.0
*/
export const SLIDE = 'slide';
/**
* The type for the carousel slider.
*
* @since 3.0.0
*/
export const LOOP = 'loop';
/**
* The type for the fade slider that can not have multiple slides in a page.
*
* @since 3.0.0
*/
export const FADE = 'fade';
| 3,118 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/constructors/index.ts | export * from './EventBinder/EventBinder';
export * from './EventInterface/EventInterface';
export * from './RequestInterval/RequestInterval';
export * from './State/State';
export * from './Throttle/Throttle';
| 3,119 |
0 | petrpan-code/Splidejs/splide/src/js/constructors | petrpan-code/Splidejs/splide/src/js/constructors/EventBinder/EventBinder.ts | import { AnyFunction } from '../../types';
import { empty, forEach } from '../../utils';
/**
* The type for an EventTarget or an array with EventTarget objects.
*
* @since 4.0.0
*/
type EventTargets = EventTarget | EventTarget[];
/**
* The interface for the EventBinder object.
*
* @since 3.0.0
*/
export inte... | 3,120 |
0 | petrpan-code/Splidejs/splide/src/js/constructors/EventBinder | petrpan-code/Splidejs/splide/src/js/constructors/EventBinder/test/bind.test.ts | import { fire } from '../../../test';
import { EventBinder } from '../EventBinder';
describe( 'EventBinder#bind()', () => {
const div = document.createElement( 'div' );
test( 'can listen to native events.', () => {
const { bind } = EventBinder();
const callback1 = jest.fn();
const callback2 = jest.fn... | 3,121 |
0 | petrpan-code/Splidejs/splide/src/js/constructors/EventBinder | petrpan-code/Splidejs/splide/src/js/constructors/EventBinder/test/destroy.test.ts | import { fire } from '../../../test';
import { EventBinder } from '../EventBinder';
describe( 'EventBinder#destroy()', () => {
const div = document.createElement( 'div' );
test( 'can remove all listeners.', () => {
const { bind, destroy } = EventBinder();
const callback1 = jest.fn();
const callback2 ... | 3,122 |
0 | petrpan-code/Splidejs/splide/src/js/constructors/EventBinder | petrpan-code/Splidejs/splide/src/js/constructors/EventBinder/test/dispatch.test.ts | import { EventBinder } from '../EventBinder';
describe( 'EventBinder#dispatch()', () => {
const div = document.createElement( 'div' );
test( 'can dispatch a custom event.', () => {
const { dispatch } = EventBinder();
const callback = jest.fn();
div.addEventListener( 'myEvent', callback );
dispat... | 3,123 |
0 | petrpan-code/Splidejs/splide/src/js/constructors/EventBinder | petrpan-code/Splidejs/splide/src/js/constructors/EventBinder/test/unbind.test.ts | import { fire } from '../../../test';
import { EventBinder } from '../EventBinder';
describe( 'EventBinder#unbind()', () => {
const div = document.createElement( 'div' );
test( 'can remove a listener.', () => {
const { bind, unbind } = EventBinder();
const callback1 = jest.fn();
const callback2 = jes... | 3,124 |
0 | petrpan-code/Splidejs/splide/src/js/constructors | petrpan-code/Splidejs/splide/src/js/constructors/EventInterface/EventInterface.ts | import { EVENT_DESTROY } from '../../constants/events';
import { Splide } from '../../core/Splide/Splide';
import { AnyFunction, EventMap } from '../../types';
import { apply, assign, isArray, slice, toArray } from '../../utils';
import { EventBinder, EventBinderObject } from '../EventBinder/EventBinder';
/**
* The ... | 3,125 |
0 | petrpan-code/Splidejs/splide/src/js/constructors/EventInterface | petrpan-code/Splidejs/splide/src/js/constructors/EventInterface/test/general.test.ts | import { fire, init } from '../../../test';
import { EventInterface } from '../EventInterface';
describe( 'EventInterface', () => {
const splide = init( { speed: 0 } );
test( 'can provide `on` to listen to internal events and lock listeners.', () => {
const { on } = EventInterface( splide );
const callba... | 3,126 |
0 | petrpan-code/Splidejs/splide/src/js/constructors | petrpan-code/Splidejs/splide/src/js/constructors/RequestInterval/RequestInterval.ts | import { min, raf } from '../../utils';
/**
* The interface for the returning value of the RequestInterval.
*
* @since 3.0.0
*/
export interface RequestIntervalInterface {
start( resume?: boolean ): void;
pause(): void;
rewind(): void;
cancel(): void;
set( interval: number ): void;
isPaused(): boolean... | 3,127 |
0 | petrpan-code/Splidejs/splide/src/js/constructors/RequestInterval | petrpan-code/Splidejs/splide/src/js/constructors/RequestInterval/test/general.test.ts | import { wait } from '../../../test';
import { RequestInterval } from '../RequestInterval';
describe( 'RequestInterval', () => {
test( 'can invoke a function repeatedly by the specified interval.', async () => {
const callback = jest.fn();
const duration = 1000;
const durationAndBuffer... | 3,128 |
0 | petrpan-code/Splidejs/splide/src/js/constructors | petrpan-code/Splidejs/splide/src/js/constructors/State/State.ts | import { includes, toArray } from '../../utils';
/**
* The interface for the State object.
*
* @since 3.0.0
*/
export interface StateObject {
set( state: number ): void;
is( states: number | number[] ): boolean;
}
/**
* The function providing a super simple state system.
*
* @param initialState - Specifie... | 3,129 |
0 | petrpan-code/Splidejs/splide/src/js/constructors | petrpan-code/Splidejs/splide/src/js/constructors/Throttle/Throttle.ts | import { AnyFunction } from '../../types';
import { RequestInterval } from '../RequestInterval/RequestInterval';
/**
* The interface for the returning value of the RequestInterval.
*
* @since 3.0.0
*/
export interface ThrottleInstance<F extends AnyFunction> extends Function {
( ...args: Parameters<F> ): void;
}... | 3,130 |
0 | petrpan-code/Splidejs/splide/src/js/constructors/Throttle | petrpan-code/Splidejs/splide/src/js/constructors/Throttle/test/Throttle.test.ts | import { Throttle } from '../Throttle';
describe( 'Throttle', () => {
test( 'can control how often the callback function should be executed by the specified duration.', done => {
const callback = jest.fn();
const duration = 1000;
const throttled = Throttle( callback, duration );
throttled();
... | 3,131 |
0 | petrpan-code/Splidejs/splide/src/js/core | petrpan-code/Splidejs/splide/src/js/core/Splide/Splide.ts | import * as ComponentConstructors from '../../components';
import { SlideMatcher } from '../../components/Slides/Slides';
import { CLASS_INITIALIZED } from '../../constants/classes';
import { DEFAULTS } from '../../constants/defaults';
import { EVENT_DESTROY, EVENT_MOUNTED, EVENT_READY, EVENT_REFRESH } from '../../cons... | 3,132 |
0 | petrpan-code/Splidejs/splide/src/js/core/Splide | petrpan-code/Splidejs/splide/src/js/core/Splide/test/general.test.ts | import { init } from '../../../test';
import { DEFAULTS } from '../../../constants/defaults';
describe( 'Splide', () => {
test( 'can merge options to defaults.', () => {
const splide = init( { width: 200, height: 200 } );
const { options } = splide;
expect( options.width ).toBe( 200 );
expect( opti... | 3,133 |
0 | petrpan-code/Splidejs/splide/src/js/renderer | petrpan-code/Splidejs/splide/src/js/renderer/SplideRenderer/SplideRenderer.ts | import { PATH, SIZE, XML_NAME_SPACE } from '../../components/Arrows/path';
import { Direction, DirectionComponent } from '../../components/Direction/Direction';
import { CLASS_ACTIVE, CLASS_CLONE, CLASS_LIST, CLASS_ROOT, CLASS_SLIDE, CLASS_TRACK } from '../../constants/classes';
import { DEFAULTS } from '../../constant... | 3,134 |
0 | petrpan-code/Splidejs/splide/src/js/renderer | petrpan-code/Splidejs/splide/src/js/renderer/Style/Style.ts | import { Options } from '../../types';
import { forOwn } from '../../utils';
interface Styles {
[ breakpoint: string ]: {
[ selector: string ]: Record<string, string | number>
};
}
/**
* The class for generating styles as a string.
*
* @since 3.0.0
*/
export class Style {
/**
* The collection of reg... | 3,135 |
0 | petrpan-code/Splidejs/splide/src/js/renderer | petrpan-code/Splidejs/splide/src/js/renderer/constants/classes.ts | export const CLASS_RENDERED = 'is-rendered';
| 3,136 |
0 | petrpan-code/Splidejs/splide/src/js/renderer | petrpan-code/Splidejs/splide/src/js/renderer/constants/defaults.ts | import { RendererConfig } from '../types/types';
/**
* Default options for generating static HTML.
*
* @since 3.0.0
*/
export const RENDERER_DEFAULT_CONFIG: RendererConfig = {
listTag : 'ul',
slideTag: 'li',
};
| 3,137 |
0 | petrpan-code/Splidejs/splide/src/js/renderer | petrpan-code/Splidejs/splide/src/js/renderer/types/types.ts | /**
* The interface for the content of each slide.
*
* @since 3.0.0
*/
export interface SlideContent {
/**
* The HTML or text for each slide.
*/
html?: string;
/**
* The collection of styles. They will remain after Splide is applied.
*/
styles?: Record<string, string | number>;
/**
* The ... | 3,138 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/test/index.ts | export * from './fixtures';
export * from './utils';
| 3,139 |
0 | petrpan-code/Splidejs/splide/src/js/test/assets | petrpan-code/Splidejs/splide/src/js/test/assets/css/planet.css | body {
background: linear-gradient(0deg, #8cde1d, #c0e900);
height: 200vh;
font-family: SplideBody, sans-serif;
padding: 2rem;
color: #d7e9f5;
line-height: 1.8;
font-weight: normal;
overflow-x: hidden;
}
img {
width: 100%;
height: auto;
}
p {
margin: 0 0 1em 0;
}
cite {
font-size: .8em;
fon... | 3,140 |
0 | petrpan-code/Splidejs/splide/src/js/test/assets | petrpan-code/Splidejs/splide/src/js/test/assets/css/styles.css | body {
background : #555;
/*height: 200vh;*/
font-family: Roboto, sans-serif;
line-height: 1.5;
padding: 2rem;
}
img {
width: 100%;
height: auto;
}
/*button:focus {*/
/* outline: 2px solid yellowgreen;*/
/*}*/
.splide {
margin: 2rem auto;
}
.splide__track {
}
.splide__slide {
border: 2px solid t... | 3,141 |
0 | petrpan-code/Splidejs/splide/src/js/test | petrpan-code/Splidejs/splide/src/js/test/fixtures/constants.ts | /**
* The dummy url.
*/
export const URL = 'https://test.com';
/**
* The root and track width.
*/
export const SLIDER_WIDTH = 1280;
| 3,142 |
0 | petrpan-code/Splidejs/splide/src/js/test | petrpan-code/Splidejs/splide/src/js/test/fixtures/html.ts | import { INTERVAL_DATA_ATTRIBUTE } from '../../components/Autoplay/constants';
import { SRC_DATA_ATTRIBUTE, SRCSET_DATA_ATTRIBUTE } from '../../components/LazyLoad/constants';
import { URL } from './constants';
export interface BuildHtmlArgs {
tag?: string;
id?: string;
length?: number;
arrows?: boolean;
pr... | 3,143 |
0 | petrpan-code/Splidejs/splide/src/js/test | petrpan-code/Splidejs/splide/src/js/test/fixtures/index.ts | export * from './html';
| 3,144 |
0 | petrpan-code/Splidejs/splide/src/js/test | petrpan-code/Splidejs/splide/src/js/test/html/index.html | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>HTML</title>
<link rel="stylesheet" href="../../../../dist/css/themes/splide-default.min.css">
<link rel="stylesheet" href="./src/js/test/assets/css/styles.cs... | 3,145 |
0 | petrpan-code/Splidejs/splide/src/js/test | petrpan-code/Splidejs/splide/src/js/test/jest/setup.ts | window.matchMedia = () => ( {
matches : false, // All queries match the media string.
media : '',
onchange : null,
addListener : jest.fn(),
removeListener : jest.fn(),
addEventListener : jest.fn(),
removeEventListener: jest.fn(),
dispatchEvent : jest.f... | 3,146 |
0 | petrpan-code/Splidejs/splide/src/js/test | petrpan-code/Splidejs/splide/src/js/test/php/parts.php | <?php
function render( $id = 'splide01', $number = 10, $text = false ) {
printf( '<div id="%s" class="splide" aria-label="Sample">', $id );
echo '<div class="splide__track">';
echo '<ul class="splide__list">';
render_slides( $number, $text );
echo '</ul>';
echo '</div>';
echo '</div>';
}
function rende... | 3,147 |
0 | petrpan-code/Splidejs/splide/src/js/test | petrpan-code/Splidejs/splide/src/js/test/php/settings.php | <?php
function get_settings() {
return [
'theme' => 'default',
];
}
| 3,148 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/add.php | <?php
require_once '../parts.php';
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Add / Remove</title>
<link rel="stylesheet" href="../../../../../dist/css... | 3,149 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/autoHeight.php | <?php
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Auto Height</title>
<link rel="stylesheet" href="../../../../../dist/css/themes/splide-<?php echo $sett... | 3,150 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/autoWidth.php | <?php
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Auto Width</title>
<link rel="stylesheet" href="../../../../../dist/css/themes/splide-<?php echo $setti... | 3,151 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/autoplay.php | <?php
require_once '../parts.php';
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Autoplay</title>
<link rel="stylesheet" href="../../..... | 3,152 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/body.php | <?php
require_once '../parts.php';
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Body</title>
<link rel="stylesheet" href="../../../../... | 3,153 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/breakpoints.php | <?php
require_once '../parts.php';
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Breakpoints</title>
<link rel="stylesheet" href="../../../../../dist/css/... | 3,154 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/container.php | <?php
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Container/Slider</title>
<link rel="stylesheet" href="../../../../../dist/css/themes/splide-<?php echo ... | 3,155 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/default.php | <?php
require_once '../parts.php';
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Default</title>
<link rel="stylesheet" href="../../../... | 3,156 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/drag-free.php | <?php
require_once '../parts.php';
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Drag Free</title>
<link rel="stylesheet" href="../../.... | 3,157 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/events.php | <?php
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Events</title>
<link rel="stylesheet" href="../../../../../dist/css/themes/splide-<?php echo $settings[... | 3,158 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/extension.php | <?php
require_once '../parts.php';
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Extension</title>
<link rel="stylesheet" href="../../../../../dist/css/th... | 3,159 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/fade.php | <?php
require_once '../parts.php';
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Fade</title>
<link rel="stylesheet" href="../../../../../dist/css/themes/... | 3,160 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/fixedSize.php | <?php
require_once '../parts.php';
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Fixed Size</title>
<link rel="stylesheet" href="../../../../../dist/css/t... | 3,161 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/json.php | <?php
require_once '../parts.php';
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>JSON</title>
<link rel="stylesheet" href="../../../../... | 3,162 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/lazyLoad.php | <?php
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Lazy Load</title>
<link rel="stylesheet" href="../../../../../dist/css/themes/splide-<?php echo $settin... | 3,163 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/liveRegions.php | <?php
require_once '../parts.php';
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Live Regions</title>
<link rel="stylesheet" href="../../../../../dist/css... | 3,164 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/multiple.php | <?php
require_once '../parts.php';
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Multiple</title>
<link rel="stylesheet" href="../../../../../dist/css/sp... | 3,165 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/nest.php | <?php
require_once '../parts.php';
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Nest</title>
<link rel="stylesheet" href="../../../../... | 3,166 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/overflow.php | <?php
require_once '../parts.php';
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Overflow</title>
<link rel="stylesheet" href="../../../../../dist/css/the... | 3,167 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/renderer.php | <?php
require_once '../parts.php';
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Renderer</title>
<link rel="stylesheet" href="../../..... | 3,168 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/rtl.php | <?php
require_once '../parts.php';
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>RTL</title>
<link rel="stylesheet" href="../../../../.... | 3,169 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/sync.php | <?php
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Sync</title>
<link rel="stylesheet" href="../../../../../dist/css/themes/splide-<?php echo $settings['t... | 3,170 |
0 | petrpan-code/Splidejs/splide/src/js/test/php | petrpan-code/Splidejs/splide/src/js/test/php/examples/ttb.php | <?php
require_once '../parts.php';
require_once '../settings.php';
$settings = get_settings();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Vertical Slider</title>
<link rel="stylesheet" href="../../../../../dist/... | 3,171 |
0 | petrpan-code/Splidejs/splide/src/js/test | petrpan-code/Splidejs/splide/src/js/test/utils/index.ts | export * from './utils';
| 3,172 |
0 | petrpan-code/Splidejs/splide/src/js/test | petrpan-code/Splidejs/splide/src/js/test/utils/utils.ts | import { CLASS_LIST, CLASS_ROOT, CLASS_SLIDE, CLASS_TRACK } from '../../constants/classes';
import { Splide } from '../../core/Splide/Splide';
import { Options } from '../../types';
import { assign } from '../../utils';
import { buildHtml, BuildHtmlArgs } from '../fixtures';
import { SLIDER_WIDTH } from '../fixtures/co... | 3,173 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/transitions/index.ts | export { Fade } from './Fade/Fade';
export { Slide } from './Slide/Slide';
| 3,174 |
0 | petrpan-code/Splidejs/splide/src/js/transitions | petrpan-code/Splidejs/splide/src/js/transitions/Fade/Fade.ts | import { EVENT_MOUNTED, EVENT_REFRESH } from '../../constants/events';
import { EventInterface } from '../../constructors';
import { Splide } from '../../core/Splide/Splide';
import { Components, Options, TransitionComponent } from '../../types';
import { nextTick, noop } from '../../utils';
/**
* The component for ... | 3,175 |
0 | petrpan-code/Splidejs/splide/src/js/transitions | petrpan-code/Splidejs/splide/src/js/transitions/Slide/Slide.ts | import { SLIDE } from '../../constants/types';
import { EventInterface } from '../../constructors';
import { Splide } from '../../core/Splide/Splide';
import { Components, Options, TransitionComponent } from '../../types';
import { abs, apply, style } from '../../utils';
/**
* The component for the slide transition.... | 3,176 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/types/components.ts | import * as Types from '../components/types';
import { BaseComponent, TransitionComponent } from './general';
/**
* The interface for all components.
*
* @since 3.0.0
*/
export interface Components {
[ key: string ]: BaseComponent | undefined;
Media: Types.MediaComponent;
Direction: Types.DirectionComponent... | 3,177 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/types/events.ts | import { PaginationData, PaginationItem } from '../components/Pagination/Pagination';
import { SlideComponent } from '../components/Slides/Slide';
import { Splide } from '../core/Splide/Splide';
import { Options } from './options';
/**
* The interface for all internal events.
*
* @since 3.0.0
*/
export interface ... | 3,178 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/types/general.ts | import { Splide } from '../core/Splide/Splide';
import { Components } from './components';
import { Options } from './options';
/**
* The type for any function.
*
* @since 3.0.0
*/
export type AnyFunction = ( ...args: any[] ) => any;
/**
* The type for a component.
*
* @since 3.0.0
*/
export type ComponentCo... | 3,179 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/types/index.ts | export * from './components';
export * from './events';
export * from './general';
export * from './options';
export * from './utils';
| 3,180 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/types/options.ts | import { I18N } from '../constants/i18n';
/**
* The interface for options.
*
* @since 3.0.0
*/
export interface Options extends ResponsiveOptions {
/**
* The type of the slider.
* - 'slide': A slider with the slide transition
* - 'loop' : A carousel slider
* - 'fade' : A slider with the fade transit... | 3,181 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/types/utils.ts | /**
* Casts T to U.
*
* @internal
*/
export type Cast<T, U> = T extends U ? T : U;
/**
* Makes the T easy to read.
*/
export type Resolve<T> = {
[ K in keyof T ]: T[ K ];
} & unknown;
/**
* Pushes U to tuple T.
*
* @internal
*/
export type Push<T extends any[], U = any> = [ ...T, U ];
/**
* Returns the ... | 3,182 |
0 | petrpan-code/Splidejs/splide/src/js | petrpan-code/Splidejs/splide/src/js/utils/index.ts | export * from './array';
export * from './arrayLike';
export * from './dom';
export * from './error';
export * from './function';
export * from './math';
export * from './object';
export * from './string';
export * from './type/type';
| 3,183 |
0 | petrpan-code/Splidejs/splide/src/js/utils | petrpan-code/Splidejs/splide/src/js/utils/array/index.ts | export { empty } from './empty/empty';
export { forEach } from './forEach/forEach';
export { includes } from './includes/includes';
export { push } from './push/push';
export { toArray } from './toArray/toArray'; | 3,184 |
0 | petrpan-code/Splidejs/splide/src/js/utils/array | petrpan-code/Splidejs/splide/src/js/utils/array/empty/empty.test.ts | import { empty } from './empty';
describe( 'empty', () => {
test( 'can empty an array.', () => {
const array = [ 1, 2, 3 ];
empty( array );
expect( array[ 0 ] ).toBeUndefined();
expect( array.length ).toBe( 0 );
} );
} );
| 3,185 |
0 | petrpan-code/Splidejs/splide/src/js/utils/array | petrpan-code/Splidejs/splide/src/js/utils/array/empty/empty.ts | /**
* Empties the array.
*
* @param array - A array to empty.
*/
export function empty( array: any[] ): void {
array.length = 0;
}
| 3,186 |
0 | petrpan-code/Splidejs/splide/src/js/utils/array | petrpan-code/Splidejs/splide/src/js/utils/array/forEach/forEach.test.ts | import { forEach } from './forEach';
describe( 'forEach', () => {
test( 'can iterate over an array.', () => {
const array = [ 1, 2, 3 ];
const callback = jest.fn();
forEach( array, ( value, index, current ) => {
expect( value ).toBe( array[ index ] );
expect( current ).toBe( array );
... | 3,187 |
0 | petrpan-code/Splidejs/splide/src/js/utils/array | petrpan-code/Splidejs/splide/src/js/utils/array/forEach/forEach.ts | import { toArray } from '../toArray/toArray';
/**
* The extended `Array#forEach` method that accepts a single value as an argument.
*
* @param values - A value or values to iterate over.
* @param iteratee - An iteratee function.
*/
export function forEach<T>( values: T | T[], iteratee: ( value: T, index: numbe... | 3,188 |
0 | petrpan-code/Splidejs/splide/src/js/utils/array | petrpan-code/Splidejs/splide/src/js/utils/array/includes/includes.test.ts | import { includes } from './includes';
describe( 'includes', () => {
const array = [ 1, 2, 3 ];
test( 'can check if the array includes a certain value or not.', () => {
expect( includes( array, 1 ) ).toBe( true );
expect( includes( array, 2 ) ).toBe( true );
expect( includes( array, 3 ) ).toBe( true ... | 3,189 |
0 | petrpan-code/Splidejs/splide/src/js/utils/array | petrpan-code/Splidejs/splide/src/js/utils/array/includes/includes.ts | /**
* Checks if the array includes the value or not.
* `Array#includes` is not supported by IE.
*
* @param array - An array.
* @param value - A value to search for.
*
* @return `true` if the array includes the value, or otherwise `false`.
*/
export function includes<T>( array: T[], value: T ): boolean {
retur... | 3,190 |
0 | petrpan-code/Splidejs/splide/src/js/utils/array | petrpan-code/Splidejs/splide/src/js/utils/array/push/push.test.ts | import { push } from './push';
describe( 'push', () => {
test( 'can push an item to an array.', () => {
expect( push( [], 1 ) ).toEqual( [ 1 ] );
expect( push( [ 1 ], 2 ) ).toEqual( [ 1, 2 ] );
} );
test( 'can push items to an array.', () => {
expect( push( [], [ 1, 2, 3 ] ) ).toEqual( [ 1, 2, 3 ] ... | 3,191 |
0 | petrpan-code/Splidejs/splide/src/js/utils/array | petrpan-code/Splidejs/splide/src/js/utils/array/push/push.ts | import { toArray } from '../toArray/toArray';
/**
* Extended `Array#push()` that accepts an item or an array with items.
*
* @param array - An array to push items.
* @param items - An item or items to push.
*
* @return A provided array itself.
*/
export function push<T>( array: T[], items: T | T[] ): T[] {
a... | 3,192 |
0 | petrpan-code/Splidejs/splide/src/js/utils/array | petrpan-code/Splidejs/splide/src/js/utils/array/toArray/toArray.test.ts | import { toArray } from './toArray';
describe( 'toArray', () => {
test( 'can push a provided value into an array.', () => {
expect( toArray( 1 ) ).toEqual( [ 1 ] );
expect( toArray( true ) ).toEqual( [ true ] );
expect( toArray( { a: 1 } ) ).toStrictEqual( [ { a: 1 } ] );
} );
test( 'should return ... | 3,193 |
0 | petrpan-code/Splidejs/splide/src/js/utils/array | petrpan-code/Splidejs/splide/src/js/utils/array/toArray/toArray.ts | import { isArray } from '../../type/type';
/**
* Push the provided value to an array if the value is not an array.
*
* @param value - A value to push.
*
* @return An array containing the value, or the value itself if it is already an array.
*/
export function toArray<T>( value: T | T[] ): T[] {
return isArray... | 3,194 |
0 | petrpan-code/Splidejs/splide/src/js/utils | petrpan-code/Splidejs/splide/src/js/utils/arrayLike/index.ts | export { slice } from './slice/slice';
export { find } from './find/find';
| 3,195 |
0 | petrpan-code/Splidejs/splide/src/js/utils/arrayLike | petrpan-code/Splidejs/splide/src/js/utils/arrayLike/find/find.test.ts | import { find } from './find';
describe( 'find', () => {
test( 'can find a value in an array-like object that satisfies the predicate function.', () => {
const arrayLike = { length: 3, 0: '1', 1: '2', 2: '3' };
expect( find( arrayLike, value => value === '2' ) ).toBe( '2' );
expect( find( arrayLike, ( ... | 3,196 |
0 | petrpan-code/Splidejs/splide/src/js/utils/arrayLike | petrpan-code/Splidejs/splide/src/js/utils/arrayLike/find/find.ts | import { slice } from '../slice/slice';
/**
* The find method for an array or array-like object, works in IE.
* This method is not performant for a huge array.
*
* @param arrayLike - An array-like object.
* @param predicate - The predicate function to test each element in the object.
*
* @return A found value ... | 3,197 |
0 | petrpan-code/Splidejs/splide/src/js/utils/arrayLike | petrpan-code/Splidejs/splide/src/js/utils/arrayLike/slice/slice.test.ts | import { slice } from './slice';
describe( 'slice', () => {
const arrayLike = { length: 3, 0: '1', 1: '2', 2: '3' };
test( 'can slice an array-like object.', () => {
expect( slice( arrayLike ) ).toEqual( [ '1', '2', '3' ] );
expect( slice( arrayLike, 1 ) ).toEqual( [ '2', '3' ] );
expect( slice( arra... | 3,198 |
0 | petrpan-code/Splidejs/splide/src/js/utils/arrayLike | petrpan-code/Splidejs/splide/src/js/utils/arrayLike/slice/slice.ts | /**
* The slice method for an array-like object.
*
* @param arrayLike - An array-like object.
* @param start - Optional. A start index.
* @param end - Optional. A end index.
*
* @return An array with sliced elements.
*/
export function slice<T>( arrayLike: ArrayLike<T>, start?: number, end?: number ):... | 3,199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.