@zag-js/slider 0.0.0-dev-20220617101836 → 0.0.0-dev-20220626175355

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 CHANGED
@@ -209,9 +209,7 @@ function trackFieldsetDisabled(el, callback) {
209
209
  function getDescriptor(el, options) {
210
210
  var _a;
211
211
  const { type, property } = options;
212
- const win = getOwnerWindow(el);
213
- const _type = type === "input" ? "HTMLInputElement" : "HTMLTextAreaElement";
214
- const proto = win[_type].prototype;
212
+ const proto = getOwnerWindow(el)[type].prototype;
215
213
  return (_a = Object.getOwnPropertyDescriptor(proto, property)) != null ? _a : {};
216
214
  }
217
215
  function dispatchInputValueEvent(el, value) {
@@ -219,7 +217,7 @@ function dispatchInputValueEvent(el, value) {
219
217
  const win = getOwnerWindow(el);
220
218
  if (!(el instanceof win.HTMLInputElement))
221
219
  return;
222
- const desc = getDescriptor(el, { type: "input", property: "value" });
220
+ const desc = getDescriptor(el, { type: "HTMLInputElement", property: "value" });
223
221
  (_a = desc.set) == null ? void 0 : _a.call(el, value);
224
222
  const event = new win.Event("input", { bubbles: true });
225
223
  el.dispatchEvent(event);
package/dist/index.mjs CHANGED
@@ -185,9 +185,7 @@ function trackFieldsetDisabled(el, callback) {
185
185
  function getDescriptor(el, options) {
186
186
  var _a;
187
187
  const { type, property } = options;
188
- const win = getOwnerWindow(el);
189
- const _type = type === "input" ? "HTMLInputElement" : "HTMLTextAreaElement";
190
- const proto = win[_type].prototype;
188
+ const proto = getOwnerWindow(el)[type].prototype;
191
189
  return (_a = Object.getOwnPropertyDescriptor(proto, property)) != null ? _a : {};
192
190
  }
193
191
  function dispatchInputValueEvent(el, value) {
@@ -195,7 +193,7 @@ function dispatchInputValueEvent(el, value) {
195
193
  const win = getOwnerWindow(el);
196
194
  if (!(el instanceof win.HTMLInputElement))
197
195
  return;
198
- const desc = getDescriptor(el, { type: "input", property: "value" });
196
+ const desc = getDescriptor(el, { type: "HTMLInputElement", property: "value" });
199
197
  (_a = desc.set) == null ? void 0 : _a.call(el, value);
200
198
  const event = new win.Event("input", { bubbles: true });
201
199
  el.dispatchEvent(event);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/slider",
3
- "version": "0.0.0-dev-20220617101836",
3
+ "version": "0.0.0-dev-20220626175355",
4
4
  "description": "Core logic for the slider widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -29,11 +29,11 @@
29
29
  "url": "https://github.com/chakra-ui/zag/issues"
30
30
  },
31
31
  "dependencies": {
32
- "@zag-js/core": "0.1.6",
33
- "@zag-js/dom-utils": "0.0.0-dev-20220617101836",
32
+ "@zag-js/core": "0.0.0-dev-20220626175355",
33
+ "@zag-js/dom-utils": "0.0.0-dev-20220626175355",
34
34
  "@zag-js/number-utils": "0.1.2",
35
35
  "@zag-js/rect-utils": "0.1.2",
36
- "@zag-js/types": "0.0.0-dev-20220617101836",
36
+ "@zag-js/types": "0.2.0",
37
37
  "@zag-js/utils": "0.1.2"
38
38
  },
39
39
  "scripts": {