@max-ts/svelte 1.6.0 → 1.6.1
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.
|
@@ -27,6 +27,12 @@ function RangeInput($$anchor, $$props) {
|
|
|
27
27
|
"maxInputRef",
|
|
28
28
|
"ref"
|
|
29
29
|
]);
|
|
30
|
+
const containerClass = $.derived(() => [
|
|
31
|
+
__default__.container,
|
|
32
|
+
__default__.sizes[size()],
|
|
33
|
+
{ [__default__.activeClass]: $$props.isActive },
|
|
34
|
+
$$props.class
|
|
35
|
+
]);
|
|
30
36
|
const calculatedWidth = $.derived(() => calculateSize(width()));
|
|
31
37
|
$.user_pre_effect(() => {
|
|
32
38
|
if (minValue() === void 0) minValue($$props.min);
|
|
@@ -58,12 +64,7 @@ function RangeInput($$anchor, $$props) {
|
|
|
58
64
|
}
|
|
59
65
|
var div = root();
|
|
60
66
|
$.attribute_effect(div, () => ({
|
|
61
|
-
class:
|
|
62
|
-
__default__.container,
|
|
63
|
-
__default__.sizes[size()],
|
|
64
|
-
{ [__default__.activeClass]: $$props.isActive },
|
|
65
|
-
$$props.class
|
|
66
|
-
],
|
|
67
|
+
class: $.get(containerClass),
|
|
67
68
|
...restProps,
|
|
68
69
|
[$.STYLE]: { width: $.get(calculatedWidth) }
|
|
69
70
|
}));
|
|
@@ -17,6 +17,8 @@ function Slider$1($$anchor, $$props) {
|
|
|
17
17
|
"class",
|
|
18
18
|
"size"
|
|
19
19
|
]);
|
|
20
|
+
const thumbClass = $.derived(() => [__default__.thumb, __default__.thumbSizes[size()]]);
|
|
21
|
+
const trackClass = $.derived(() => [__default__.track, __default__.trackSizes[size()]]);
|
|
20
22
|
var fragment = $.comment();
|
|
21
23
|
var node = $.first_child(fragment);
|
|
22
24
|
{
|
|
@@ -38,25 +40,22 @@ function Slider$1($$anchor, $$props) {
|
|
|
38
40
|
$.each(node_2, 16, thumbItems, (thumb) => thumb, ($$anchor, thumb) => {
|
|
39
41
|
var fragment_2 = $.comment();
|
|
40
42
|
var node_3 = $.first_child(fragment_2);
|
|
41
|
-
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return $.get($0);
|
|
51
|
-
}
|
|
52
|
-
});
|
|
43
|
+
$.component(node_3, () => Slider.Thumb, ($$anchor, SliderPrimitive_Thumb) => {
|
|
44
|
+
SliderPrimitive_Thumb($$anchor, {
|
|
45
|
+
"data-slot": "slider-thumb",
|
|
46
|
+
get index() {
|
|
47
|
+
return thumb.index;
|
|
48
|
+
},
|
|
49
|
+
get class() {
|
|
50
|
+
return $.get(thumbClass);
|
|
51
|
+
}
|
|
53
52
|
});
|
|
54
|
-
}
|
|
53
|
+
});
|
|
55
54
|
$.append($$anchor, fragment_2);
|
|
56
55
|
});
|
|
57
56
|
$.template_effect(() => {
|
|
58
57
|
$.set_attribute(span, "data-orientation", orientation());
|
|
59
|
-
$.set_class(span, 1, $.clsx(
|
|
58
|
+
$.set_class(span, 1, $.clsx($.get(trackClass)));
|
|
60
59
|
});
|
|
61
60
|
$.append($$anchor, fragment_1);
|
|
62
61
|
};
|