@skeletonlabs/skeleton-svelte 1.2.2 → 1.2.4
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.
- package/dist/components/AppBar/AppBar.svelte +1 -1
- package/dist/components/Modal/types.d.ts +2 -1
- package/dist/components/Pagination/Pagination.svelte +2 -2
- package/dist/components/Popover/types.d.ts +2 -1
- package/dist/components/Segment/Segment.svelte +2 -2
- package/dist/components/Tooltip/Tooltip.svelte +15 -12
- package/dist/components/Tooltip/types.d.ts +3 -2
- package/package.json +2 -2
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
<!-- @component A header element for the top of a page layout. -->
|
|
45
45
|
|
|
46
|
-
<header class="{base} {background} {spaceY} {border} {padding} {shadow} {classes}"
|
|
46
|
+
<header class="{base} {background} {spaceY} {border} {padding} {shadow} {classes}" data-testid="app-bar">
|
|
47
47
|
<section class="{toolbarBase} {toolbarGridCols} {toolbarGap} {toolbarClasses}" data-testid="app-bar-toolbar">
|
|
48
48
|
{#if lead}
|
|
49
49
|
<div class="{leadBase} {leadSpaceX} {leadPadding} {leadClasses}">
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
import * as dialog from '@zag-js/dialog';
|
|
3
3
|
import type { FlyParams, FadeParams } from 'svelte/transition';
|
|
4
|
+
import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
4
5
|
export interface ModalProps extends Omit<dialog.Props, 'id'> {
|
|
5
6
|
/** Set base classes for the root element. */
|
|
6
7
|
base?: string;
|
|
@@ -53,5 +54,5 @@ export interface ModalProps extends Omit<dialog.Props, 'id'> {
|
|
|
53
54
|
/** Provide the template contents of the dialog itself. */
|
|
54
55
|
content?: Snippet;
|
|
55
56
|
/** Handle the dialog button click event. */
|
|
56
|
-
onclick?:
|
|
57
|
+
onclick?: HTMLButtonAttributes['onclick'];
|
|
57
58
|
}
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
// Root
|
|
12
12
|
base = 'inline-flex items-stretch overflow-hidden',
|
|
13
13
|
background = 'preset-outlined-surface-200-800',
|
|
14
|
-
border = '
|
|
14
|
+
border = '',
|
|
15
15
|
gap = 'gap-2',
|
|
16
|
-
padding = '',
|
|
16
|
+
padding = 'p-2',
|
|
17
17
|
rounded = 'rounded-container',
|
|
18
18
|
classes = '',
|
|
19
19
|
// Titles
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
import * as popover from '@zag-js/popover';
|
|
3
|
+
import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
3
4
|
export interface PopoverProps extends Omit<popover.Props, 'id'> {
|
|
4
5
|
/** Enable display of the popover arrow. */
|
|
5
6
|
arrow?: boolean;
|
|
@@ -38,5 +39,5 @@ export interface PopoverProps extends Omit<popover.Props, 'id'> {
|
|
|
38
39
|
/** Provide the template contents of the popover itself. */
|
|
39
40
|
content?: Snippet;
|
|
40
41
|
/** Handle the popover button click event. */
|
|
41
|
-
onclick?:
|
|
42
|
+
onclick?: HTMLButtonAttributes['onclick'];
|
|
42
43
|
}
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
// Root
|
|
9
9
|
base = 'inline-flex items-stretch overflow-hidden',
|
|
10
10
|
background = 'preset-outlined-surface-200-800',
|
|
11
|
-
border = '
|
|
11
|
+
border = '',
|
|
12
12
|
gap = 'gap-2',
|
|
13
|
-
padding = '',
|
|
13
|
+
padding = 'p-2',
|
|
14
14
|
rounded = 'rounded-container',
|
|
15
15
|
width = '',
|
|
16
16
|
classes = '',
|
|
@@ -55,20 +55,23 @@
|
|
|
55
55
|
</button>
|
|
56
56
|
{/if}
|
|
57
57
|
<!-- Tooltip Content -->
|
|
58
|
-
{
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
{
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
<div {...api.getPositionerProps()} class="{positionerBase} {positionerClasses}">
|
|
59
|
+
<!-- Popover -->
|
|
60
|
+
{#if api.open}
|
|
61
|
+
<div {...api.getContentProps()} transition:fade={{ duration: 100 }} style="z-index: {zIndex};">
|
|
62
|
+
<!-- Arrow -->
|
|
63
|
+
{#if arrow}
|
|
64
|
+
<div {...api.getArrowProps()}>
|
|
65
|
+
<div {...api.getArrowTipProps()} class="{arrowBase} {arrowBackground} {arrowClasses}"></div>
|
|
66
|
+
</div>
|
|
67
|
+
{/if}
|
|
68
|
+
<!-- Snippet Content -->
|
|
69
|
+
<div class="{contentBase} {contentBackground} {contentClasses}">
|
|
70
|
+
{@render content?.()}
|
|
64
71
|
</div>
|
|
65
|
-
{/if}
|
|
66
|
-
<!-- Snippet Content -->
|
|
67
|
-
<div {...api.getContentProps()} class="{contentBase} {contentBackground} {contentClasses}" style="z-index: {zIndex};">
|
|
68
|
-
{@render content?.()}
|
|
69
72
|
</div>
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
{/if}
|
|
74
|
+
</div>
|
|
72
75
|
</span>
|
|
73
76
|
|
|
74
77
|
<style>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
import * as tooltip from '@zag-js/tooltip';
|
|
3
|
+
import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
3
4
|
export interface TooltipProps extends Omit<tooltip.Props, 'id'> {
|
|
4
5
|
/** Enable display of the popover arrow. */
|
|
5
6
|
arrow?: boolean;
|
|
@@ -38,7 +39,7 @@ export interface TooltipProps extends Omit<tooltip.Props, 'id'> {
|
|
|
38
39
|
/** Provide the template contents of the tooltip itself. */
|
|
39
40
|
content?: Snippet;
|
|
40
41
|
/** Handle the tooltip button hover event. */
|
|
41
|
-
onmouseover?:
|
|
42
|
+
onmouseover?: HTMLButtonAttributes['onmouseover'];
|
|
42
43
|
/** Handle the tooltip button click event. */
|
|
43
|
-
onclick?:
|
|
44
|
+
onclick?: HTMLButtonAttributes['onclick'];
|
|
44
45
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skeletonlabs/skeleton-svelte",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "The Svelte package for Skeleton.",
|
|
5
5
|
"author": "endigo9740 <chris@skeletonlabs.dev>",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"typescript": "^5.8.2",
|
|
56
56
|
"vite": "^6.2.5",
|
|
57
57
|
"vitest": "3.1.1",
|
|
58
|
-
"@skeletonlabs/skeleton": "3.1.
|
|
58
|
+
"@skeletonlabs/skeleton": "3.1.4"
|
|
59
59
|
},
|
|
60
60
|
"type": "module",
|
|
61
61
|
"scripts": {
|