@zag-js/progress
Advanced tools
Comparing version 0.56.0 to 0.56.1
@@ -235,4 +235,3 @@ "use strict"; | ||
percent(ctx2) { | ||
if (!(0, import_utils.isNumber)(ctx2.value)) | ||
return -1; | ||
if (!(0, import_utils.isNumber)(ctx2.value)) return -1; | ||
return Math.round((ctx2.value - ctx2.min) / (ctx2.max - ctx2.min) * 100); | ||
@@ -260,4 +259,3 @@ }, | ||
validateContext: (ctx2) => { | ||
if (ctx2.value == null) | ||
return; | ||
if (ctx2.value == null) return; | ||
if (!isValidNumber(ctx2.max)) { | ||
@@ -264,0 +262,0 @@ throw new Error(`[progress] The max value passed \`${ctx2.max}\` is not a valid number`); |
{ | ||
"name": "@zag-js/progress", | ||
"version": "0.56.0", | ||
"version": "0.56.1", | ||
"description": "Core logic for the progress widget implemented as a state machine", | ||
@@ -31,7 +31,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@zag-js/anatomy": "0.56.0", | ||
"@zag-js/core": "0.56.0", | ||
"@zag-js/dom-query": "0.56.0", | ||
"@zag-js/utils": "0.56.0", | ||
"@zag-js/types": "0.56.0" | ||
"@zag-js/anatomy": "0.56.1", | ||
"@zag-js/core": "0.56.1", | ||
"@zag-js/dom-query": "0.56.1", | ||
"@zag-js/utils": "0.56.1", | ||
"@zag-js/types": "0.56.1" | ||
}, | ||
@@ -38,0 +38,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
69202
1094
+ Added@zag-js/anatomy@0.56.1(transitive)
+ Added@zag-js/core@0.56.1(transitive)
+ Added@zag-js/dom-query@0.56.1(transitive)
+ Added@zag-js/store@0.56.1(transitive)
+ Added@zag-js/types@0.56.1(transitive)
+ Added@zag-js/utils@0.56.1(transitive)
- Removed@zag-js/anatomy@0.56.0(transitive)
- Removed@zag-js/core@0.56.0(transitive)
- Removed@zag-js/dom-query@0.56.0(transitive)
- Removed@zag-js/store@0.56.0(transitive)
- Removed@zag-js/types@0.56.0(transitive)
- Removed@zag-js/utils@0.56.0(transitive)
Updated@zag-js/anatomy@0.56.1
Updated@zag-js/core@0.56.1
Updated@zag-js/dom-query@0.56.1
Updated@zag-js/types@0.56.1
Updated@zag-js/utils@0.56.1