@max-ts/svelte 1.12.3 → 1.12.6
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/assets/styles.css +8 -8
- package/dist/components/Drawer/Content/Content.js +6 -6
- package/dist/components/Drawer/Description/Description.js +2 -2
- package/dist/components/Drawer/Footer/Footer.js +2 -2
- package/dist/components/Drawer/Header/Header.js +2 -2
- package/dist/components/Drawer/Overlay/Overlay.js +2 -2
- package/dist/components/Drawer/Title/Title.js +2 -2
- package/dist/components/Drawer/styles.css.d.ts +10 -13
- package/dist/components/Drawer/styles.css.js +11 -13
- package/dist/components/Tooltip/Tooltip.js +8 -5
- package/dist/components/Tooltip/types.d.ts +1 -3
- package/package.json +1 -1
package/dist/assets/styles.css
CHANGED
|
@@ -1608,6 +1608,11 @@ img, picture, video, canvas {
|
|
|
1608
1608
|
white-space: nowrap;
|
|
1609
1609
|
border: 0;
|
|
1610
1610
|
}
|
|
1611
|
+
@media (max-width: 48rem) {
|
|
1612
|
+
.styles_header__1rbt3ly6 {
|
|
1613
|
+
padding: var(--spacing-2);
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1611
1616
|
.styles_unchecked__1x1b5sl0 {
|
|
1612
1617
|
color: transparent;
|
|
1613
1618
|
}
|
|
@@ -2921,10 +2926,12 @@ img, picture, video, canvas {
|
|
|
2921
2926
|
}
|
|
2922
2927
|
.styles_toolbar__14ie7q10 {
|
|
2923
2928
|
position: absolute;
|
|
2924
|
-
top: 0;
|
|
2925
2929
|
right: 4px;
|
|
2926
2930
|
z-index: 1;
|
|
2927
2931
|
opacity: 0.5;
|
|
2932
|
+
top: 50%;
|
|
2933
|
+
bottom: unset;
|
|
2934
|
+
transform: translateY(-50%);
|
|
2928
2935
|
transition: opacity 0.2s ease-in-out;
|
|
2929
2936
|
}
|
|
2930
2937
|
.styles_toolbar__14ie7q10:hover {
|
|
@@ -2963,13 +2970,6 @@ img, picture, video, canvas {
|
|
|
2963
2970
|
.styles_overlay__14ie7q13[data-visible="true"] {
|
|
2964
2971
|
opacity: 1;
|
|
2965
2972
|
}
|
|
2966
|
-
@media (min-width: 48rem) {
|
|
2967
|
-
.styles_toolbar__14ie7q10 {
|
|
2968
|
-
top: 50%;
|
|
2969
|
-
bottom: unset;
|
|
2970
|
-
transform: translateY(-50%);
|
|
2971
|
-
}
|
|
2972
|
-
}
|
|
2973
2973
|
@keyframes styles_fadeIn__w5sq0p0 {
|
|
2974
2974
|
0% {
|
|
2975
2975
|
opacity: 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDrawerContext } from "../context.js";
|
|
2
|
-
import
|
|
2
|
+
import { closeButton, content, contentTransition, handle, visuallyHidden } from "../styles.css.js";
|
|
3
3
|
import Overlay from "../Overlay/Overlay.js";
|
|
4
4
|
import Portal from "../Portal/Portal.js";
|
|
5
5
|
import "svelte/internal/disclose-version";
|
|
@@ -51,8 +51,8 @@ function Content($$anchor, $$props) {
|
|
|
51
51
|
var node_1 = $.sibling(node, 2);
|
|
52
52
|
{
|
|
53
53
|
let $0 = $.derived(() => [
|
|
54
|
-
|
|
55
|
-
{ [
|
|
54
|
+
content,
|
|
55
|
+
{ [contentTransition]: !$.get(isDragging) },
|
|
56
56
|
$$props.class
|
|
57
57
|
]);
|
|
58
58
|
$.component(node_1, () => Dialog.Content, ($$anchor, DialogPrimitive_Content) => {
|
|
@@ -70,7 +70,7 @@ function Content($$anchor, $$props) {
|
|
|
70
70
|
var node_2 = $.first_child(fragment_2);
|
|
71
71
|
var consequent = ($$anchor) => {
|
|
72
72
|
var div = root_3();
|
|
73
|
-
$.template_effect(() => $.set_class(div, 1, $.clsx(
|
|
73
|
+
$.template_effect(() => $.set_class(div, 1, $.clsx(handle)));
|
|
74
74
|
$.delegated("touchmove", div, handleTouchMove, void 0, true);
|
|
75
75
|
$.delegated("touchstart", div, handleTouchStart, void 0, true);
|
|
76
76
|
$.delegated("touchend", div, handleTouchEnd);
|
|
@@ -88,14 +88,14 @@ function Content($$anchor, $$props) {
|
|
|
88
88
|
$.component(node_5, () => Dialog.Close, ($$anchor, DialogPrimitive_Close) => {
|
|
89
89
|
DialogPrimitive_Close($$anchor, {
|
|
90
90
|
get class() {
|
|
91
|
-
return
|
|
91
|
+
return closeButton;
|
|
92
92
|
},
|
|
93
93
|
children: ($$anchor, $$slotProps) => {
|
|
94
94
|
var fragment_4 = root_5();
|
|
95
95
|
var node_6 = $.first_child(fragment_4);
|
|
96
96
|
XIcon(node_6, {});
|
|
97
97
|
var span = $.sibling(node_6, 2);
|
|
98
|
-
$.template_effect(() => $.set_class(span, 1, $.clsx(
|
|
98
|
+
$.template_effect(() => $.set_class(span, 1, $.clsx(visuallyHidden)));
|
|
99
99
|
$.append($$anchor, fragment_4);
|
|
100
100
|
},
|
|
101
101
|
$$slots: { default: true }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { description } from "../styles.css.js";
|
|
2
2
|
import "svelte/internal/disclose-version";
|
|
3
3
|
import * as $ from "svelte/internal/client";
|
|
4
4
|
import { Dialog } from "bits-ui";
|
|
@@ -14,7 +14,7 @@ function Description($$anchor, $$props) {
|
|
|
14
14
|
var fragment = $.comment();
|
|
15
15
|
var node = $.first_child(fragment);
|
|
16
16
|
{
|
|
17
|
-
let $0 = $.derived(() => [
|
|
17
|
+
let $0 = $.derived(() => [description, $$props.class]);
|
|
18
18
|
$.component(node, () => Dialog.Description, ($$anchor, DialogPrimitive_Description) => {
|
|
19
19
|
DialogPrimitive_Description($$anchor, $.spread_props({
|
|
20
20
|
"data-slot": "drawer-description",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { footer } from "../styles.css.js";
|
|
2
2
|
import "svelte/internal/disclose-version";
|
|
3
3
|
import * as $ from "svelte/internal/client";
|
|
4
4
|
//#region src/components/Drawer/Footer/Footer.svelte
|
|
@@ -16,7 +16,7 @@ function Footer($$anchor, $$props) {
|
|
|
16
16
|
var div = root();
|
|
17
17
|
$.attribute_effect(div, () => ({
|
|
18
18
|
"data-slot": "drawer-footer",
|
|
19
|
-
class: [
|
|
19
|
+
class: [footer, $$props.class],
|
|
20
20
|
...restProps
|
|
21
21
|
}));
|
|
22
22
|
var node = $.child(div);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { header } from "../styles.css.js";
|
|
2
2
|
import "svelte/internal/disclose-version";
|
|
3
3
|
import * as $ from "svelte/internal/client";
|
|
4
4
|
//#region src/components/Drawer/Header/Header.svelte
|
|
@@ -16,7 +16,7 @@ function Header($$anchor, $$props) {
|
|
|
16
16
|
var div = root();
|
|
17
17
|
$.attribute_effect(div, () => ({
|
|
18
18
|
"data-slot": "drawer-header",
|
|
19
|
-
class: [
|
|
19
|
+
class: [header, $$props.class],
|
|
20
20
|
...restProps
|
|
21
21
|
}));
|
|
22
22
|
var node = $.child(div);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDrawerContext } from "../context.js";
|
|
2
|
-
import
|
|
2
|
+
import { overlay } from "../styles.css.js";
|
|
3
3
|
import "svelte/internal/disclose-version";
|
|
4
4
|
import * as $ from "svelte/internal/client";
|
|
5
5
|
import { Dialog } from "bits-ui";
|
|
@@ -23,7 +23,7 @@ function Overlay($$anchor, $$props) {
|
|
|
23
23
|
var fragment = $.comment();
|
|
24
24
|
var node = $.first_child(fragment);
|
|
25
25
|
{
|
|
26
|
-
let $0 = $.derived(() => [
|
|
26
|
+
let $0 = $.derived(() => [overlay, $$props.class]);
|
|
27
27
|
$.component(node, () => Dialog.Overlay, ($$anchor, DialogPrimitive_Overlay) => {
|
|
28
28
|
DialogPrimitive_Overlay($$anchor, $.spread_props({
|
|
29
29
|
"data-slot": "drawer-overlay",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { title } from "../styles.css.js";
|
|
2
2
|
import "svelte/internal/disclose-version";
|
|
3
3
|
import * as $ from "svelte/internal/client";
|
|
4
4
|
import { Dialog } from "bits-ui";
|
|
@@ -14,7 +14,7 @@ function Title($$anchor, $$props) {
|
|
|
14
14
|
var fragment = $.comment();
|
|
15
15
|
var node = $.first_child(fragment);
|
|
16
16
|
{
|
|
17
|
-
let $0 = $.derived(() => [
|
|
17
|
+
let $0 = $.derived(() => [title, $$props.class]);
|
|
18
18
|
$.component(node, () => Dialog.Title, ($$anchor, DialogPrimitive_Title) => {
|
|
19
19
|
DialogPrimitive_Title($$anchor, $.spread_props({
|
|
20
20
|
"data-slot": "drawer-title",
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
contentTransition: string;
|
|
12
|
-
};
|
|
13
|
-
export default _default;
|
|
1
|
+
export declare const overlay: string;
|
|
2
|
+
export declare const content: string;
|
|
3
|
+
export declare const contentTransition: string;
|
|
4
|
+
export declare const header: string;
|
|
5
|
+
export declare const footer: string;
|
|
6
|
+
export declare const title: string;
|
|
7
|
+
export declare const description: string;
|
|
8
|
+
export declare const closeButton: string;
|
|
9
|
+
export declare const handle: string;
|
|
10
|
+
export declare const visuallyHidden: string;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
//#region src/components/Drawer/styles.css.ts
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
contentTransition: "styles_contentTransition__1rbt3ly5"
|
|
13
|
-
};
|
|
2
|
+
var closeButton = "styles_closeButton__1rbt3lya";
|
|
3
|
+
var content = "styles_content__1rbt3ly4";
|
|
4
|
+
var contentTransition = "styles_contentTransition__1rbt3ly5";
|
|
5
|
+
var description = "styles_description__1rbt3ly9";
|
|
6
|
+
var footer = "styles_footer__1rbt3ly7";
|
|
7
|
+
var handle = "styles_handle__1rbt3lyb";
|
|
8
|
+
var header = "styles_header__1rbt3ly6";
|
|
9
|
+
var overlay = "styles_overlay__1rbt3ly3";
|
|
10
|
+
var title = "styles_title__1rbt3ly8";
|
|
11
|
+
var visuallyHidden = "styles_visuallyHidden__1rbt3lyc";
|
|
14
12
|
//#endregion
|
|
15
|
-
export {
|
|
13
|
+
export { closeButton, content, contentTransition, description, footer, handle, header, overlay, title, visuallyHidden };
|
|
@@ -6,10 +6,10 @@ import * as $ from "svelte/internal/client";
|
|
|
6
6
|
//#region src/components/Tooltip/Tooltip.svelte
|
|
7
7
|
var root_5 = $.from_svg(`<svg viewBox="0 0 7.68 4.35" xmlns="http://www.w3.org/2000/svg"><path d="m 0.52372243,0.10910656 c -0.1676883,0 -0.3188698,0.10099765 -0.38304509,0.25594925 -0.0641698,0.1548964 -0.0287017,0.3332318 0.0898753,0.4518088 L 3.5473966,4.1337031 c 0.077725,0.07778 0.1832001,0.1214516 0.2931533,0.1214516 0.1099531,0 0.2154286,-0.043672 0.2932085,-0.1214516 L 7.4505968,0.81686461 c 0.118577,-0.118577 0.1540119,-0.2969124 0.089831,-0.4518088 C 7.476247,0.21010421 7.3251098,0.10910656 7.1573882,0.10910656 Z" fill="inherit"></path></svg>`);
|
|
8
8
|
var root_2 = $.from_html(`<div role="tooltip" data-slot="tooltip-content"><!> <!></div>`);
|
|
9
|
-
var root = $.from_html(
|
|
9
|
+
var root = $.from_html(`<span style="display: contents;" data-slot="tooltip-trigger"><!></span> <!>`, 1);
|
|
10
10
|
function Tooltip($$anchor, $$props) {
|
|
11
11
|
$.push($$props, true);
|
|
12
|
-
let offset = $.prop($$props, "offset", 3, 10), placement = $.prop($$props, "placement", 3, "top"), arrow = $.prop($$props, "arrow", 3, false), delayDuration = $.prop($$props, "delayDuration", 3,
|
|
12
|
+
let offset = $.prop($$props, "offset", 3, 10), placement = $.prop($$props, "placement", 3, "top"), arrow = $.prop($$props, "arrow", 3, false), delayDuration = $.prop($$props, "delayDuration", 3, 100);
|
|
13
13
|
const store = new TooltipStore({
|
|
14
14
|
get placement() {
|
|
15
15
|
return placement();
|
|
@@ -24,9 +24,12 @@ function Tooltip($$anchor, $$props) {
|
|
|
24
24
|
$.user_effect(() => () => store.destroy());
|
|
25
25
|
var fragment = root();
|
|
26
26
|
$.event("keydown", $.window, (e) => e.key === "Escape" && store.open && store.hide());
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
var span = $.first_child(fragment);
|
|
28
|
+
var node = $.child(span);
|
|
29
|
+
$.snippet(node, () => $$props.children ?? $.noop);
|
|
30
|
+
$.reset(span);
|
|
31
|
+
$.attach(span, () => store.attachTrigger);
|
|
32
|
+
var node_1 = $.sibling(span, 2);
|
|
30
33
|
var consequent_2 = ($$anchor) => {
|
|
31
34
|
Portal($$anchor, {
|
|
32
35
|
children: ($$anchor, $$slotProps) => {
|
|
@@ -3,9 +3,7 @@ import type { Snippet } from 'svelte';
|
|
|
3
3
|
export type TooltipProps = {
|
|
4
4
|
delayDuration?: number;
|
|
5
5
|
content?: Snippet<[]> | string;
|
|
6
|
-
children?: Snippet<[
|
|
7
|
-
attach: (node: HTMLElement) => void;
|
|
8
|
-
}]>;
|
|
6
|
+
children?: Snippet<[]>;
|
|
9
7
|
arrow?: boolean;
|
|
10
8
|
offset?: number;
|
|
11
9
|
arrowClass?: string;
|