@zag-js/slider 0.0.0-dev-20220615082220 → 0.0.0-dev-20220616083721

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
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __defProps = Object.defineProperties;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -702,7 +703,9 @@ function connect(state2, send, normalize = normalizeProp) {
702
703
  rootProps: normalize.element({
703
704
  "data-part": "root",
704
705
  "data-disabled": dataAttr(isDisabled),
706
+ "data-focus": dataAttr(isFocused),
705
707
  "data-orientation": state2.context.orientation,
708
+ "data-invalid": dataAttr(isInvalid),
706
709
  id: dom.getRootId(state2.context),
707
710
  dir: state2.context.dir,
708
711
  style: dom.getRootStyle(state2.context)
@@ -711,6 +714,7 @@ function connect(state2, send, normalize = normalizeProp) {
711
714
  "data-part": "label",
712
715
  "data-disabled": dataAttr(isDisabled),
713
716
  "data-invalid": dataAttr(isInvalid),
717
+ "data-focus": dataAttr(isFocused),
714
718
  id: dom.getLabelId(state2.context),
715
719
  htmlFor: dom.getInputId(state2.context),
716
720
  onClick(event) {
@@ -817,14 +821,15 @@ function connect(state2, send, normalize = normalizeProp) {
817
821
  "data-part": "track",
818
822
  id: dom.getTrackId(state2.context),
819
823
  "data-disabled": dataAttr(isDisabled),
824
+ "data-focus": dataAttr(isFocused),
820
825
  "data-invalid": dataAttr(isInvalid),
821
826
  "data-orientation": state2.context.orientation,
822
- "data-focus": dataAttr(isFocused),
823
827
  style: dom.getTrackStyle()
824
828
  }),
825
829
  rangeProps: normalize.element({
826
830
  "data-part": "range",
827
831
  id: dom.getRangeId(state2.context),
832
+ "data-focus": dataAttr(isFocused),
828
833
  "data-invalid": dataAttr(isInvalid),
829
834
  "data-disabled": dataAttr(isDisabled),
830
835
  "data-orientation": state2.context.orientation,
@@ -863,6 +868,7 @@ function connect(state2, send, normalize = normalizeProp) {
863
868
  const markerState = value > state2.context.value ? "over-value" : value < state2.context.value ? "under-value" : "at-value";
864
869
  return normalize.element({
865
870
  "data-part": "marker",
871
+ role: "presentation",
866
872
  "data-orientation": state2.context.orientation,
867
873
  id: dom.getMarkerId(state2.context, value),
868
874
  "data-value": value,
package/dist/index.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __defProps = Object.defineProperties;
3
4
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
@@ -678,7 +679,9 @@ function connect(state2, send, normalize = normalizeProp) {
678
679
  rootProps: normalize.element({
679
680
  "data-part": "root",
680
681
  "data-disabled": dataAttr(isDisabled),
682
+ "data-focus": dataAttr(isFocused),
681
683
  "data-orientation": state2.context.orientation,
684
+ "data-invalid": dataAttr(isInvalid),
682
685
  id: dom.getRootId(state2.context),
683
686
  dir: state2.context.dir,
684
687
  style: dom.getRootStyle(state2.context)
@@ -687,6 +690,7 @@ function connect(state2, send, normalize = normalizeProp) {
687
690
  "data-part": "label",
688
691
  "data-disabled": dataAttr(isDisabled),
689
692
  "data-invalid": dataAttr(isInvalid),
693
+ "data-focus": dataAttr(isFocused),
690
694
  id: dom.getLabelId(state2.context),
691
695
  htmlFor: dom.getInputId(state2.context),
692
696
  onClick(event) {
@@ -793,14 +797,15 @@ function connect(state2, send, normalize = normalizeProp) {
793
797
  "data-part": "track",
794
798
  id: dom.getTrackId(state2.context),
795
799
  "data-disabled": dataAttr(isDisabled),
800
+ "data-focus": dataAttr(isFocused),
796
801
  "data-invalid": dataAttr(isInvalid),
797
802
  "data-orientation": state2.context.orientation,
798
- "data-focus": dataAttr(isFocused),
799
803
  style: dom.getTrackStyle()
800
804
  }),
801
805
  rangeProps: normalize.element({
802
806
  "data-part": "range",
803
807
  id: dom.getRangeId(state2.context),
808
+ "data-focus": dataAttr(isFocused),
804
809
  "data-invalid": dataAttr(isInvalid),
805
810
  "data-disabled": dataAttr(isDisabled),
806
811
  "data-orientation": state2.context.orientation,
@@ -839,6 +844,7 @@ function connect(state2, send, normalize = normalizeProp) {
839
844
  const markerState = value > state2.context.value ? "over-value" : value < state2.context.value ? "under-value" : "at-value";
840
845
  return normalize.element({
841
846
  "data-part": "marker",
847
+ role: "presentation",
842
848
  "data-orientation": state2.context.orientation,
843
849
  id: dom.getMarkerId(state2.context, value),
844
850
  "data-value": value,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/slider",
3
- "version": "0.0.0-dev-20220615082220",
3
+ "version": "0.0.0-dev-20220616083721",
4
4
  "description": "Core logic for the slider widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -30,10 +30,10 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@zag-js/core": "0.1.6",
33
- "@zag-js/dom-utils": "0.0.0-dev-20220615082220",
33
+ "@zag-js/dom-utils": "0.0.0-dev-20220616083721",
34
34
  "@zag-js/number-utils": "0.1.2",
35
35
  "@zag-js/rect-utils": "0.1.2",
36
- "@zag-js/types": "0.1.2",
36
+ "@zag-js/types": "0.0.0-dev-20220616083721",
37
37
  "@zag-js/utils": "0.1.2"
38
38
  },
39
39
  "scripts": {