Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Replace tabpanel role with presentation #1318

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dist/js/splide-renderer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/splide-renderer.min.js.map

Large diffs are not rendered by default.

867 changes: 136 additions & 731 deletions dist/js/splide.cjs.js

Large diffs are not rendered by default.

867 changes: 136 additions & 731 deletions dist/js/splide.esm.js

Large diffs are not rendered by default.

704 changes: 104 additions & 600 deletions dist/js/splide.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/js/splide.min.js

Large diffs are not rendered by default.

Binary file modified dist/js/splide.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/js/splide.min.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/types/build/default.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { Splide as default } from '../core/Splide/Splide';
1 change: 1 addition & 0 deletions dist/types/build/renderer.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { SplideRenderer as default } from '../renderer/SplideRenderer/SplideRenderer';
27 changes: 27 additions & 0 deletions dist/types/components/Arrows/Arrows.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Splide } from '../../core/Splide/Splide';
import { BaseComponent, Components, Options } from '../../types';
/**
* The interface for the Arrows component.
*
* @since 3.0.0
*/
export interface ArrowsComponent extends BaseComponent {
arrows: {
prev?: HTMLButtonElement;
next?: HTMLButtonElement;
};
/** @internal */
update(): void;
}
/**
* The component for handling previous and next arrows.
*
* @since 3.0.0
*
* @param Splide - A Splide instance.
* @param Components - A collection of components.
* @param options - Options.
*
* @return An Arrows component object.
*/
export declare function Arrows(Splide: Splide, Components: Components, options: Options): ArrowsComponent;
12 changes: 12 additions & 0 deletions dist/types/components/Arrows/path.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* The namespace for SVG elements.
*/
export declare const XML_NAME_SPACE = "http://www.w3.org/2000/svg";
/**
* The arrow path.
*/
export declare const PATH = "m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z";
/**
* SVG width and height.
*/
export declare const SIZE = 40;
24 changes: 24 additions & 0 deletions dist/types/components/Autoplay/Autoplay.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Splide } from '../../core/Splide/Splide';
import { BaseComponent, Components, Options } from '../../types';
/**
* The interface for the Autoplay component.
*
* @since 3.0.0
*/
export interface AutoplayComponent extends BaseComponent {
play(): void;
pause(): void;
isPaused(): boolean;
}
/**
* The component for autoplay, handling a progress bar and a toggle button.
*
* @since 3.0.0
*
* @param Splide - A Splide instance.
* @param Components - A collection of components.
* @param options - Options.
*
* @return An Autoplay component object.
*/
export declare function Autoplay(Splide: Splide, Components: Components, options: Options): AutoplayComponent;
6 changes: 6 additions & 0 deletions dist/types/components/Autoplay/constants.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* The data attribute for the autoplay interval duration.
*
* @since 3.5.0
*/
export declare const INTERVAL_DATA_ATTRIBUTE: string;
27 changes: 27 additions & 0 deletions dist/types/components/Clones/Clones.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Splide } from '../../core/Splide/Splide';
import { BaseComponent, Components, Options } from '../../types';
/**
* The interface for the Clone component.
*
* @since 3.0.0
*/
export interface ClonesComponent extends BaseComponent {
}
/**
* The multiplier to determine the number of clones.
*
* @since 4.0.0
*/
export declare const MULTIPLIER = 2;
/**
* The component that generates clones for the loop slider.
*
* @since 3.0.0
*
* @param Splide - A Splide instance.
* @param Components - A collection of components.
* @param options - Options.
*
* @return A Clones component object.
*/
export declare function Clones(Splide: Splide, Components: Components, options: Options): ClonesComponent;
35 changes: 35 additions & 0 deletions dist/types/components/Controller/Controller.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { Splide } from '../../core/Splide/Splide';
import { AnyFunction, BaseComponent, Components, Options } from '../../types';
/**
* The interface for the Controller component.
*
* @since 3.0.0
*/
export interface ControllerComponent extends BaseComponent {
go(control: number | string, allowSameIndex?: boolean, callback?: AnyFunction): void;
scroll(destination: number, duration?: number, snap?: boolean, callback?: AnyFunction): void;
getNext(destination?: boolean): number;
getPrev(destination?: boolean): number;
getEnd(): number;
setIndex(index: number): void;
getIndex(prev?: boolean): number;
toIndex(page: number): number;
toPage(index: number): number;
toDest(position: number): number;
hasFocus(): boolean;
isBusy(): boolean;
/** @internal */
getAdjacent(prev: boolean, destination?: boolean): number;
}
/**
* The component for controlling the slider.
*
* @since 3.0.0
*
* @param Splide - A Splide instance.
* @param Components - A collection of components.
* @param options - Options.
*
* @return A Controller component object.
*/
export declare function Controller(Splide: Splide, Components: Components, options: Options): ControllerComponent;
21 changes: 21 additions & 0 deletions dist/types/components/Cover/Cover.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Splide } from '../../core/Splide/Splide';
import { BaseComponent, Components, Options } from '../../types';
/**
* The interface for the Cover component.
*
* @since 3.0.0
*/
export interface CoverComponent extends BaseComponent {
}
/**
* The component for setting the image as the slide background.
*
* @since 3.0.0
*
* @param Splide - A Splide instance.
* @param Components - A collection of components.
* @param options - Options.
*
* @return A Cover component object.
*/
export declare function Cover(Splide: Splide, Components: Components, options: Options): CoverComponent;
38 changes: 38 additions & 0 deletions dist/types/components/Direction/Direction.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { Splide } from '../../core/Splide/Splide';
import { BaseComponent, Components, Options } from '../../types';
/**
* The interface for the Direction component.
*
* @since 3.0.0
*/
export interface DirectionComponent extends BaseComponent {
resolve(prop: string, axisOnly?: boolean, direction?: Options['direction']): string;
orient(value: number): number;
}
/**
* The translation map for directions.
*
* @since 3.0.0
*/
export declare const ORIENTATION_MAP: {
width: string[];
left: string[];
right: string[];
x: string[];
X: string[];
Y: string[];
ArrowLeft: string[];
ArrowRight: string[];
};
/**
* The component that absorbs the difference among directions.
*
* @since 3.0.0
*
* @param Splide - A Splide instance.
* @param Components - A collection of components.
* @param options - Options.
*
* @return A Direction component object.
*/
export declare function Direction(Splide: Splide, Components: Components, options: Options): DirectionComponent;
23 changes: 23 additions & 0 deletions dist/types/components/Drag/Drag.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Splide } from '../../core/Splide/Splide';
import { BaseComponent, Components, Options } from '../../types';
/**
* The interface for the Drag component.
*
* @since 3.0.0
*/
export interface DragComponent extends BaseComponent {
disable(disabled: boolean): void;
isDragging(): boolean;
}
/**
* The component for dragging the slider.
*
* @since 3.0.0
*
* @param Splide - A Splide instance.
* @param Components - A collection of components.
* @param options - Options.
*
* @return A Drag component object.
*/
export declare function Drag(Splide: Splide, Components: Components, options: Options): DragComponent;
31 changes: 31 additions & 0 deletions dist/types/components/Drag/constants.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* The power of the friction.
*
* @since 3.0.0
*/
export declare const FRICTION = 5;
/**
* If the user stops dragging for this duration with keeping the pointer down, updates the base coord and time.
*
* @since 3.0.0
*/
export declare const LOG_INTERVAL = 200;
/**
* Start events for dragging.
*
* @since 3.0.0
*/
export declare const POINTER_DOWN_EVENTS = "touchstart mousedown";
/**
* Update events for dragging.
*
* @since 3.0.0
*/
export declare const POINTER_MOVE_EVENTS = "touchmove mousemove";
/**
* End events for dragging.
* The `click` event is required because the browser sometimes dispatches `drag` events instead of `mouse`.
*
* @since 3.0.0
*/
export declare const POINTER_UP_EVENTS = "touchend touchcancel mouseup click";
38 changes: 38 additions & 0 deletions dist/types/components/Elements/Elements.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { Splide } from '../../core/Splide/Splide';
import { BaseComponent, Components, Options } from '../../types';
/**
* The interface for elements which the slider consists of.
*
* @since 3.0.0
*/
export interface ElementCollection {
root: HTMLElement;
track: HTMLElement;
list: HTMLElement;
slides: HTMLElement[];
arrows?: HTMLElement;
pagination?: HTMLUListElement;
prev?: HTMLButtonElement;
next?: HTMLButtonElement;
bar?: HTMLElement;
toggle?: HTMLElement;
}
/**
* The interface for the Elements component.
*
* @since 3.0.0
*/
export interface ElementsComponent extends BaseComponent, ElementCollection {
}
/**
* The component that collects and handles elements which the slider consists of.
*
* @since 3.0.0
*
* @param Splide - A Splide instance.
* @param Components - A collection of components.
* @param options - Options.
*
* @return An Elements component object.
*/
export declare function Elements(Splide: Splide, Components: Components, options: Options): ElementsComponent;
22 changes: 22 additions & 0 deletions dist/types/components/Keyboard/Keyboard.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Splide } from '../../core/Splide/Splide';
import { BaseComponent, Components, Options } from '../../types';
/**
* The interface for the Keyboard component.
*
* @since 3.0.0
*/
export interface KeyboardComponent extends BaseComponent {
disable(disabled: boolean): void;
}
/**
* The component for controlling the slider by keyboards.
*
* @since 3.0.0
*
* @param Splide - A Splide instance.
* @param Components - A collection of components.
* @param options - Options.
*
* @return A Keyboard component object.
*/
export declare function Keyboard(Splide: Splide, Components: Components, options: Options): KeyboardComponent;
29 changes: 29 additions & 0 deletions dist/types/components/Layout/Layout.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Splide } from '../../core/Splide/Splide';
import { BaseComponent, Components, Options } from '../../types';
/**
* The interface for the Layout component.
*
* @since 3.0.0
*/
export interface LayoutComponent extends BaseComponent {
listSize(): number;
slideSize(index: number, withoutGap?: boolean): number;
sliderSize(withoutGap?: boolean): number;
totalSize(index?: number, withoutGap?: boolean): number;
getPadding(right: boolean): number;
isOverflow(): boolean;
/** @internal */
resize(force?: boolean): void;
}
/**
* The component that adjusts slider styles and provides methods for dimensions.
*
* @since 3.0.0
*
* @param Splide - A Splide instance.
* @param Components - A collection of components.
* @param options - Options.
*
* @return An Layout component object.
*/
export declare function Layout(Splide: Splide, Components: Components, options: Options): LayoutComponent;
23 changes: 23 additions & 0 deletions dist/types/components/LazyLoad/LazyLoad.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Splide } from '../../core/Splide/Splide';
import { BaseComponent, Components, Options } from '../../types';
/**
* The interface for the LazyLoad component.
*
* @since 3.0.0
*/
export interface LazyLoadComponent extends BaseComponent {
/** @internal */
check(): void;
}
/**
* The component for lazily loading images.
*
* @since 3.0.0
*
* @param Splide - A Splide instance.
* @param Components - A collection of components.
* @param options - Options.
*
* @return An LazyLoad component object.
*/
export declare function LazyLoad(Splide: Splide, Components: Components, options: Options): LazyLoadComponent;
18 changes: 18 additions & 0 deletions dist/types/components/LazyLoad/constants.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* The data attribute for the src value.
*
* @since 3.0.0
*/
export declare const SRC_DATA_ATTRIBUTE: string;
/**
* The data attribute for the srcset value.
*
* @since 3.0.0
*/
export declare const SRCSET_DATA_ATTRIBUTE: string;
/**
* The selector string for images to load.
*
* @since 3.0.0
*/
export declare const IMAGE_SELECTOR: string;
Loading