@skeletonlabs/skeleton 1.8.0-dev.ff3a4f2f → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
/** @slot header - Insert fixed header content, such as Skeleton's App Bar component.
|
|
3
|
+
* @slot sidebarLeft - Hidden when empty. Allows you to set fixed left sidebar content.
|
|
4
|
+
* @slot sidebarRight - Hidden when empty. Allows you to set fixed right sidebar content.
|
|
5
|
+
* @slot pageHeader - Insert content that resides above your page content. Great for global alerts.
|
|
6
|
+
* @slot pageFooter - Insert content that resides below your page content. Recommended for most layouts.
|
|
7
|
+
* @slot footer - Insert fixed footer content. Not recommended for most layouts.
|
|
8
|
+
*/
|
|
9
|
+
import type { SvelteEvent } from '../../index.js';
|
|
2
10
|
declare const __propDef: {
|
|
3
11
|
props: {
|
|
4
12
|
[x: string]: any;
|
|
@@ -20,9 +28,7 @@ declare const __propDef: {
|
|
|
20
28
|
slotFooter?: string | undefined;
|
|
21
29
|
};
|
|
22
30
|
events: {
|
|
23
|
-
scroll:
|
|
24
|
-
} & {
|
|
25
|
-
[evt: string]: CustomEvent<any>;
|
|
31
|
+
scroll: SvelteEvent<UIEvent, HTMLDivElement>;
|
|
26
32
|
};
|
|
27
33
|
slots: {
|
|
28
34
|
header: {};
|
|
@@ -19,6 +19,10 @@ export let buttonTextPrevious = leftArrow;
|
|
|
19
19
|
export let buttonTextNext = rightArrow;
|
|
20
20
|
export let buttonTextFirst = leftAngles;
|
|
21
21
|
export let buttonTextLast = rightAngles;
|
|
22
|
+
export let labelFirst = "First page";
|
|
23
|
+
export let labelPrevious = "Previous page";
|
|
24
|
+
export let labelNext = "Next page";
|
|
25
|
+
export let labelLast = "Last page";
|
|
22
26
|
const cBase = "flex flex-col md:flex-row items-center space-y-4 md:space-y-0 md:space-x-4";
|
|
23
27
|
const cLabel = "w-full md:w-auto";
|
|
24
28
|
let lastPage = Math.ceil(settings.size / settings.limit - 1);
|
|
@@ -105,6 +109,7 @@ $:
|
|
|
105
109
|
{#if showFirstLastButtons}
|
|
106
110
|
<button
|
|
107
111
|
type="button"
|
|
112
|
+
aria-label={labelFirst}
|
|
108
113
|
class={buttonClasses}
|
|
109
114
|
on:click={() => {
|
|
110
115
|
gotoPage(0);
|
|
@@ -118,6 +123,7 @@ $:
|
|
|
118
123
|
{#if showPreviousNextButtons}
|
|
119
124
|
<button
|
|
120
125
|
type="button"
|
|
126
|
+
aria-label={labelPrevious}
|
|
121
127
|
class={buttonClasses}
|
|
122
128
|
on:click={() => {
|
|
123
129
|
gotoPage(settings.offset - 1);
|
|
@@ -147,6 +153,7 @@ $:
|
|
|
147
153
|
{#if showPreviousNextButtons}
|
|
148
154
|
<button
|
|
149
155
|
type="button"
|
|
156
|
+
aria-label={labelNext}
|
|
150
157
|
class={buttonClasses}
|
|
151
158
|
on:click={() => {
|
|
152
159
|
gotoPage(settings.offset + 1);
|
|
@@ -160,6 +167,7 @@ $:
|
|
|
160
167
|
{#if showFirstLastButtons}
|
|
161
168
|
<button
|
|
162
169
|
type="button"
|
|
170
|
+
aria-label={labelLast}
|
|
163
171
|
class={buttonClasses}
|
|
164
172
|
on:click={() => {
|
|
165
173
|
gotoPage(lastPage);
|
|
@@ -39,6 +39,14 @@ declare const __propDef: {
|
|
|
39
39
|
buttonTextFirst?: string | undefined;
|
|
40
40
|
/** Set the label for the Last button.*/
|
|
41
41
|
buttonTextLast?: string | undefined;
|
|
42
|
+
/** Provide the ARIA label for the First page button.*/
|
|
43
|
+
labelFirst?: string | undefined;
|
|
44
|
+
/** Provide the ARIA label for the Previous page button.*/
|
|
45
|
+
labelPrevious?: string | undefined;
|
|
46
|
+
/** Provide the ARIA label for the Next page button.*/
|
|
47
|
+
labelNext?: string | undefined;
|
|
48
|
+
/** Provide the ARIA label for the Last page button.*/
|
|
49
|
+
labelLast?: string | undefined;
|
|
42
50
|
};
|
|
43
51
|
events: {
|
|
44
52
|
/** {{ length: number }} amount - Fires when the amount selection input changes.*/
|