@zag-js/progress
Advanced tools
Comparing version 0.60.0 to 0.61.0
@@ -107,2 +107,26 @@ import * as _zag_js_anatomy from '@zag-js/anatomy'; | ||
setToMax(): void; | ||
/** | ||
* Sets the current value of the progress bar to the min value. | ||
*/ | ||
setToMin(): void; | ||
/** | ||
* The percentage of the progress bar's value. | ||
*/ | ||
percent: number; | ||
/** | ||
* The percentage of the progress bar's value as a string. | ||
*/ | ||
percentAsString: string; | ||
/** | ||
* The minimum allowed value of the progress bar. | ||
*/ | ||
min: number; | ||
/** | ||
* The maximum allowed value of the progress bar. | ||
*/ | ||
max: number; | ||
/** | ||
* Whether the progress bar is indeterminate. | ||
*/ | ||
indeterminate: boolean; | ||
getRootProps(): T["element"]; | ||
@@ -109,0 +133,0 @@ getLabelProps(): T["element"]; |
@@ -58,2 +58,3 @@ "use strict"; | ||
const percent = state.context.percent; | ||
const percentAsString = state.context.isIndeterminate ? "" : `${percent}%`; | ||
const max = state.context.max; | ||
@@ -81,2 +82,7 @@ const min = state.context.min; | ||
valueAsString, | ||
min, | ||
max, | ||
percent, | ||
percentAsString, | ||
indeterminate, | ||
setValue(value2) { | ||
@@ -88,2 +94,5 @@ send({ type: "VALUE.SET", value: value2 }); | ||
}, | ||
setToMin() { | ||
send({ type: "VALUE.SET", value: min }); | ||
}, | ||
getRootProps() { | ||
@@ -90,0 +99,0 @@ return normalize.element({ |
{ | ||
"name": "@zag-js/progress", | ||
"version": "0.60.0", | ||
"version": "0.61.0", | ||
"description": "Core logic for the progress widget implemented as a state machine", | ||
@@ -31,7 +31,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@zag-js/anatomy": "0.60.0", | ||
"@zag-js/core": "0.60.0", | ||
"@zag-js/dom-query": "0.60.0", | ||
"@zag-js/utils": "0.60.0", | ||
"@zag-js/types": "0.60.0" | ||
"@zag-js/anatomy": "0.61.0", | ||
"@zag-js/core": "0.61.0", | ||
"@zag-js/dom-query": "0.61.0", | ||
"@zag-js/utils": "0.61.0", | ||
"@zag-js/types": "0.61.0" | ||
}, | ||
@@ -38,0 +38,0 @@ "devDependencies": { |
@@ -8,2 +8,4 @@ import type { NormalizeProps, PropTypes } from "@zag-js/types" | ||
const percent = state.context.percent | ||
const percentAsString = state.context.isIndeterminate ? "" : `${percent}%` | ||
const max = state.context.max | ||
@@ -36,2 +38,7 @@ const min = state.context.min | ||
valueAsString, | ||
min, | ||
max, | ||
percent, | ||
percentAsString, | ||
indeterminate, | ||
setValue(value) { | ||
@@ -43,2 +50,5 @@ send({ type: "VALUE.SET", value }) | ||
}, | ||
setToMin() { | ||
send({ type: "VALUE.SET", value: min }) | ||
}, | ||
@@ -45,0 +55,0 @@ getRootProps() { |
@@ -134,2 +134,27 @@ import type { Machine, StateMachine as S } from "@zag-js/core" | ||
setToMax(): void | ||
/** | ||
* Sets the current value of the progress bar to the min value. | ||
*/ | ||
setToMin(): void | ||
/** | ||
* The percentage of the progress bar's value. | ||
*/ | ||
percent: number | ||
/** | ||
* The percentage of the progress bar's value as a string. | ||
*/ | ||
percentAsString: string | ||
/** | ||
* The minimum allowed value of the progress bar. | ||
*/ | ||
min: number | ||
/** | ||
* The maximum allowed value of the progress bar. | ||
*/ | ||
max: number | ||
/** | ||
* Whether the progress bar is indeterminate. | ||
*/ | ||
indeterminate: boolean | ||
getRootProps(): T["element"] | ||
@@ -136,0 +161,0 @@ getLabelProps(): T["element"] |
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72363
1169
+ Added@zag-js/anatomy@0.61.0(transitive)
+ Added@zag-js/core@0.61.0(transitive)
+ Added@zag-js/dom-query@0.61.0(transitive)
+ Added@zag-js/store@0.61.0(transitive)
+ Added@zag-js/types@0.61.0(transitive)
+ Added@zag-js/utils@0.61.0(transitive)
- Removed@zag-js/anatomy@0.60.0(transitive)
- Removed@zag-js/core@0.60.0(transitive)
- Removed@zag-js/dom-query@0.60.0(transitive)
- Removed@zag-js/store@0.60.0(transitive)
- Removed@zag-js/types@0.60.0(transitive)
- Removed@zag-js/utils@0.60.0(transitive)
Updated@zag-js/anatomy@0.61.0
Updated@zag-js/core@0.61.0
Updated@zag-js/dom-query@0.61.0
Updated@zag-js/types@0.61.0
Updated@zag-js/utils@0.61.0