@zag-js/tabs 1.30.0 → 1.31.0

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
@@ -202,12 +202,13 @@ function connect(service, normalize) {
202
202
  },
203
203
  getIndicatorProps() {
204
204
  const rect = context.get("indicatorRect");
205
+ const rectIsEmpty = rect == null || rect.width === 0 && rect.height === 0 && rect.x === 0 && rect.y === 0;
205
206
  return normalize.element({
206
207
  id: getIndicatorId(scope),
207
208
  ...parts.indicator.attrs,
208
209
  dir: prop("dir"),
209
210
  "data-orientation": prop("orientation"),
210
- hidden: rect == null,
211
+ hidden: rectIsEmpty,
211
212
  style: {
212
213
  "--transition-property": "left, right, top, bottom, width, height",
213
214
  "--left": utils.toPx(rect?.x),
package/dist/index.mjs CHANGED
@@ -200,12 +200,13 @@ function connect(service, normalize) {
200
200
  },
201
201
  getIndicatorProps() {
202
202
  const rect = context.get("indicatorRect");
203
+ const rectIsEmpty = rect == null || rect.width === 0 && rect.height === 0 && rect.x === 0 && rect.y === 0;
203
204
  return normalize.element({
204
205
  id: getIndicatorId(scope),
205
206
  ...parts.indicator.attrs,
206
207
  dir: prop("dir"),
207
208
  "data-orientation": prop("orientation"),
208
- hidden: rect == null,
209
+ hidden: rectIsEmpty,
209
210
  style: {
210
211
  "--transition-property": "left, right, top, bottom, width, height",
211
212
  "--left": toPx(rect?.x),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/tabs",
3
- "version": "1.30.0",
3
+ "version": "1.31.0",
4
4
  "description": "Core logic for the tabs widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -26,11 +26,11 @@
26
26
  "url": "https://github.com/chakra-ui/zag/issues"
27
27
  },
28
28
  "dependencies": {
29
- "@zag-js/anatomy": "1.30.0",
30
- "@zag-js/dom-query": "1.30.0",
31
- "@zag-js/utils": "1.30.0",
32
- "@zag-js/core": "1.30.0",
33
- "@zag-js/types": "1.30.0"
29
+ "@zag-js/anatomy": "1.31.0",
30
+ "@zag-js/dom-query": "1.31.0",
31
+ "@zag-js/utils": "1.31.0",
32
+ "@zag-js/core": "1.31.0",
33
+ "@zag-js/types": "1.31.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "clean-package": "2.2.0"