@zag-js/rating
Advanced tools
Comparing version 0.0.0-dev-20221122144557 to 0.0.0-dev-20221122162142
@@ -43,3 +43,3 @@ import { RequiredBy, DirectionProperty, CommonProperties, Context, PropTypes, NormalizeProps } from '@zag-js/types'; | ||
*/ | ||
readonly?: boolean; | ||
readOnly?: boolean; | ||
/** | ||
@@ -46,0 +46,0 @@ * Whether the rating is disabled. |
@@ -343,3 +343,3 @@ "use strict"; | ||
"aria-labelledby": dom.getLabelId(state.context), | ||
tabIndex: state.context.readonly ? 0 : -1, | ||
tabIndex: state.context.readOnly ? 0 : -1, | ||
"data-disabled": dataAttr(isDisabled), | ||
@@ -369,4 +369,4 @@ onPointerMove(event) { | ||
"data-disabled": dataAttr(isDisabled), | ||
"aria-readonly": ariaAttr(state.context.readonly), | ||
"data-readonly": dataAttr(state.context.readonly), | ||
"aria-readonly": ariaAttr(state.context.readOnly), | ||
"data-readonly": dataAttr(state.context.readOnly), | ||
"aria-setsize": state.context.max, | ||
@@ -465,3 +465,3 @@ "aria-checked": isChecked, | ||
disabled: false, | ||
readonly: false, | ||
readOnly: false, | ||
...ctx, | ||
@@ -479,3 +479,3 @@ translations: { | ||
computed: { | ||
isInteractive: (ctx2) => !(ctx2.disabled || ctx2.readonly), | ||
isInteractive: (ctx2) => !(ctx2.disabled || ctx2.readOnly), | ||
isHovering: (ctx2) => ctx2.hoveredValue > -1 | ||
@@ -558,3 +558,3 @@ }, | ||
guards: { | ||
isInteractive: (ctx2) => !(ctx2.disabled || ctx2.readonly), | ||
isInteractive: (ctx2) => !(ctx2.disabled || ctx2.readOnly), | ||
isHoveredValueEmpty: (ctx2) => ctx2.hoveredValue === -1, | ||
@@ -561,0 +561,0 @@ isValueEmpty: (ctx2) => ctx2.value <= 0, |
{ | ||
"name": "@zag-js/rating", | ||
"version": "0.0.0-dev-20221122144557", | ||
"version": "0.0.0-dev-20221122162142", | ||
"description": "Core logic for the rating widget implemented as a state machine", | ||
@@ -37,3 +37,3 @@ "main": "dist/index.js", | ||
"@zag-js/dom-utils": "0.2.1", | ||
"@zag-js/form-utils": "0.0.0-dev-20221122144557", | ||
"@zag-js/form-utils": "0.0.0-dev-20221122162142", | ||
"@zag-js/utils": "0.3.1" | ||
@@ -40,0 +40,0 @@ }, |
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