@zag-js/slider 0.0.0-dev-20220709181637 → 0.0.0-dev-20220712092426
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/index.js +10 -17
- package/dist/index.mjs +10 -17
- package/dist/slider.dom.d.ts +3 -0
- package/package.json +6 -4
package/dist/index.js
CHANGED
|
@@ -116,7 +116,8 @@ function defineDomHelpers(domUtils) {
|
|
|
116
116
|
var _a;
|
|
117
117
|
return (_a = roots.getDoc(ctx).defaultView) != null ? _a : window;
|
|
118
118
|
},
|
|
119
|
-
getActiveElement: (ctx) => roots.getDoc(ctx).activeElement
|
|
119
|
+
getActiveElement: (ctx) => roots.getDoc(ctx).activeElement,
|
|
120
|
+
getById: (ctx, id) => roots.getRootNode(ctx).getElementById(id)
|
|
120
121
|
};
|
|
121
122
|
return __spreadValues2(__spreadValues2({}, roots), domUtils);
|
|
122
123
|
}
|
|
@@ -988,26 +989,18 @@ function machine(ctx) {
|
|
|
988
989
|
},
|
|
989
990
|
activities: {
|
|
990
991
|
trackFieldsetDisabled(ctx2) {
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
ctx2.disabled = disabled;
|
|
996
|
-
}
|
|
997
|
-
});
|
|
992
|
+
return trackFieldsetDisabled(dom.getRootEl(ctx2), (disabled) => {
|
|
993
|
+
if (disabled) {
|
|
994
|
+
ctx2.disabled = disabled;
|
|
995
|
+
}
|
|
998
996
|
});
|
|
999
|
-
return () => cleanup == null ? void 0 : cleanup();
|
|
1000
997
|
},
|
|
1001
998
|
trackFormReset(ctx2) {
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
ctx2.value = ctx2.initialValue;
|
|
1007
|
-
}
|
|
1008
|
-
});
|
|
999
|
+
return trackFormReset(dom.getInputEl(ctx2), () => {
|
|
1000
|
+
if (ctx2.initialValue != null) {
|
|
1001
|
+
ctx2.value = ctx2.initialValue;
|
|
1002
|
+
}
|
|
1009
1003
|
});
|
|
1010
|
-
return () => cleanup == null ? void 0 : cleanup();
|
|
1011
1004
|
},
|
|
1012
1005
|
trackPointerMove(ctx2, _evt, { send }) {
|
|
1013
1006
|
return trackPointerMove({
|
package/dist/index.mjs
CHANGED
|
@@ -91,7 +91,8 @@ function defineDomHelpers(domUtils) {
|
|
|
91
91
|
var _a;
|
|
92
92
|
return (_a = roots.getDoc(ctx).defaultView) != null ? _a : window;
|
|
93
93
|
},
|
|
94
|
-
getActiveElement: (ctx) => roots.getDoc(ctx).activeElement
|
|
94
|
+
getActiveElement: (ctx) => roots.getDoc(ctx).activeElement,
|
|
95
|
+
getById: (ctx, id) => roots.getRootNode(ctx).getElementById(id)
|
|
95
96
|
};
|
|
96
97
|
return __spreadValues2(__spreadValues2({}, roots), domUtils);
|
|
97
98
|
}
|
|
@@ -963,26 +964,18 @@ function machine(ctx) {
|
|
|
963
964
|
},
|
|
964
965
|
activities: {
|
|
965
966
|
trackFieldsetDisabled(ctx2) {
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
ctx2.disabled = disabled;
|
|
971
|
-
}
|
|
972
|
-
});
|
|
967
|
+
return trackFieldsetDisabled(dom.getRootEl(ctx2), (disabled) => {
|
|
968
|
+
if (disabled) {
|
|
969
|
+
ctx2.disabled = disabled;
|
|
970
|
+
}
|
|
973
971
|
});
|
|
974
|
-
return () => cleanup == null ? void 0 : cleanup();
|
|
975
972
|
},
|
|
976
973
|
trackFormReset(ctx2) {
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
ctx2.value = ctx2.initialValue;
|
|
982
|
-
}
|
|
983
|
-
});
|
|
974
|
+
return trackFormReset(dom.getInputEl(ctx2), () => {
|
|
975
|
+
if (ctx2.initialValue != null) {
|
|
976
|
+
ctx2.value = ctx2.initialValue;
|
|
977
|
+
}
|
|
984
978
|
});
|
|
985
|
-
return () => cleanup == null ? void 0 : cleanup();
|
|
986
979
|
},
|
|
987
980
|
trackPointerMove(ctx2, _evt, { send }) {
|
|
988
981
|
return trackPointerMove({
|
package/dist/slider.dom.d.ts
CHANGED
|
@@ -12,6 +12,9 @@ export declare const dom: {
|
|
|
12
12
|
getActiveElement: (ctx: {
|
|
13
13
|
getRootNode?: () => Node | Document | ShadowRoot;
|
|
14
14
|
}) => HTMLElement;
|
|
15
|
+
getById: (ctx: {
|
|
16
|
+
getRootNode?: () => Node | Document | ShadowRoot;
|
|
17
|
+
}, id: string) => HTMLElement;
|
|
15
18
|
} & {
|
|
16
19
|
getRootId: (ctx: Ctx) => string;
|
|
17
20
|
getThumbId: (ctx: Ctx) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/slider",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20220712092426",
|
|
4
4
|
"description": "Core logic for the slider widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -29,10 +29,12 @@
|
|
|
29
29
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@zag-js/core": "0.
|
|
33
|
-
"@zag-js/
|
|
32
|
+
"@zag-js/core": "0.0.0-dev-20220712092426",
|
|
33
|
+
"@zag-js/types": "0.0.0-dev-20220712092426"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@zag-js/dom-utils": "0.0.0-dev-20220712092426",
|
|
34
37
|
"@zag-js/number-utils": "0.1.2",
|
|
35
|
-
"@zag-js/types": "0.0.0-dev-20220709181637",
|
|
36
38
|
"@zag-js/utils": "0.1.2"
|
|
37
39
|
},
|
|
38
40
|
"scripts": {
|