@skeletonlabs/skeleton 2.0.0-rc.0 → 2.0.0-rc.2
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,8 +1,7 @@
|
|
|
1
1
|
<script>export let files = void 0;
|
|
2
2
|
export let name;
|
|
3
3
|
export let width = "";
|
|
4
|
-
export let button = "variant-filled";
|
|
5
|
-
const cButton = "btn";
|
|
4
|
+
export let button = "btn variant-filled";
|
|
6
5
|
let elemFileInput;
|
|
7
6
|
function onButtonClick() {
|
|
8
7
|
elemFileInput.click();
|
|
@@ -14,7 +13,7 @@ function prunedRestProps() {
|
|
|
14
13
|
$:
|
|
15
14
|
classesBase = `${$$props.class ?? ""}`;
|
|
16
15
|
$:
|
|
17
|
-
classesButton = `${
|
|
16
|
+
classesButton = `${button} ${width}`;
|
|
18
17
|
</script>
|
|
19
18
|
|
|
20
19
|
<div class="file-button {classesBase}" data-testid="file-button">
|
|
@@ -30,7 +30,7 @@ let lastPage = Math.max(0, Math.ceil(settings.size / settings.limit - 1));
|
|
|
30
30
|
let controlPages = getNumerals();
|
|
31
31
|
function onChangeLength() {
|
|
32
32
|
dispatch("amount", settings.limit);
|
|
33
|
-
lastPage = Math.ceil(settings.size / settings.limit - 1);
|
|
33
|
+
lastPage = Math.max(0, Math.ceil(settings.size / settings.limit - 1));
|
|
34
34
|
if (settings.page > lastPage) {
|
|
35
35
|
settings.page = lastPage;
|
|
36
36
|
}
|
|
@@ -31,7 +31,7 @@ export function tocCrawler(node, args) {
|
|
|
31
31
|
.replaceAll(/[^a-zA-Z0-9 ]/g, '')
|
|
32
32
|
.replaceAll(' ', '-')
|
|
33
33
|
.toLowerCase();
|
|
34
|
-
elemHeading.id = newHeadingId
|
|
34
|
+
elemHeading.id = `toc-${newHeadingId}`;
|
|
35
35
|
}
|
|
36
36
|
// Push heading data to the permalink array
|
|
37
37
|
permalinks.push({
|