@zag-js/tooltip 0.0.0-dev-20221005154850 → 0.0.0-dev-20221005155029

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
@@ -394,6 +394,9 @@ function machine(ctx) {
394
394
  computed: {
395
395
  hasAriaLabel: (ctx2) => !!ctx2["aria-label"]
396
396
  },
397
+ watch: {
398
+ disabled: ["closeIfDisabled"]
399
+ },
397
400
  on: {
398
401
  OPEN: "open",
399
402
  CLOSE: "closed"
@@ -573,6 +576,11 @@ function machine(ctx) {
573
576
  if (!omit.includes(evt.type)) {
574
577
  (_a = ctx2.onClose) == null ? void 0 : _a.call(ctx2);
575
578
  }
579
+ },
580
+ closeIfDisabled(ctx2, _evt, { send }) {
581
+ if (ctx2.disabled) {
582
+ send("CLOSE");
583
+ }
576
584
  }
577
585
  },
578
586
  guards: {
package/dist/index.mjs CHANGED
@@ -367,6 +367,9 @@ function machine(ctx) {
367
367
  computed: {
368
368
  hasAriaLabel: (ctx2) => !!ctx2["aria-label"]
369
369
  },
370
+ watch: {
371
+ disabled: ["closeIfDisabled"]
372
+ },
370
373
  on: {
371
374
  OPEN: "open",
372
375
  CLOSE: "closed"
@@ -546,6 +549,11 @@ function machine(ctx) {
546
549
  if (!omit.includes(evt.type)) {
547
550
  (_a = ctx2.onClose) == null ? void 0 : _a.call(ctx2);
548
551
  }
552
+ },
553
+ closeIfDisabled(ctx2, _evt, { send }) {
554
+ if (ctx2.disabled) {
555
+ send("CLOSE");
556
+ }
549
557
  }
550
558
  },
551
559
  guards: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/tooltip",
3
- "version": "0.0.0-dev-20221005154850",
3
+ "version": "0.0.0-dev-20221005155029",
4
4
  "description": "Core logic for the tooltip widget implemented as a state machine",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -29,13 +29,13 @@
29
29
  "url": "https://github.com/chakra-ui/zag/issues"
30
30
  },
31
31
  "dependencies": {
32
- "@zag-js/core": "0.0.0-dev-20221005154850",
33
- "@zag-js/popper": "0.0.0-dev-20221005154850",
34
- "@zag-js/types": "0.0.0-dev-20221005154850"
32
+ "@zag-js/core": "0.0.0-dev-20221005155029",
33
+ "@zag-js/popper": "0.0.0-dev-20221005155029",
34
+ "@zag-js/types": "0.0.0-dev-20221005155029"
35
35
  },
36
36
  "devDependencies": {
37
- "@zag-js/dom-utils": "0.0.0-dev-20221005154850",
38
- "@zag-js/utils": "0.0.0-dev-20221005154850"
37
+ "@zag-js/dom-utils": "0.0.0-dev-20221005155029",
38
+ "@zag-js/utils": "0.0.0-dev-20221005155029"
39
39
  },
40
40
  "scripts": {
41
41
  "build-fast": "tsup src/index.ts --format=esm,cjs",