@zag-js/combobox 0.72.0 → 0.73.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
@@ -738,6 +738,17 @@ function machine(userContext) {
738
738
  }
739
739
  ],
740
740
  "INPUT.ENTER": [
741
+ // == group 1 ==
742
+ {
743
+ guard: and("isOpenControlled", "isCustomValue", not("hasHighlightedItem"), not("allowCustomValue")),
744
+ actions: ["revertInputValue", "invokeOnClose"]
745
+ },
746
+ {
747
+ guard: and("isCustomValue", not("hasHighlightedItem"), not("allowCustomValue")),
748
+ target: "focused",
749
+ actions: ["revertInputValue", "invokeOnClose"]
750
+ },
751
+ // == group 2 ==
741
752
  {
742
753
  guard: and("isOpenControlled", "closeOnSelect"),
743
754
  actions: ["selectHighlightedItem", "invokeOnClose"]
@@ -895,6 +906,17 @@ function machine(userContext) {
895
906
  actions: ["highlightLastItem"]
896
907
  },
897
908
  "INPUT.ENTER": [
909
+ // == group 1 ==
910
+ {
911
+ guard: and("isOpenControlled", "isCustomValue", not("hasHighlightedItem"), not("allowCustomValue")),
912
+ actions: ["revertInputValue", "invokeOnClose"]
913
+ },
914
+ {
915
+ guard: and("isCustomValue", not("hasHighlightedItem"), not("allowCustomValue")),
916
+ target: "focused",
917
+ actions: ["revertInputValue", "invokeOnClose"]
918
+ },
919
+ // == group 2 ==
898
920
  {
899
921
  guard: and("isOpenControlled", "closeOnSelect"),
900
922
  actions: ["selectHighlightedItem", "invokeOnClose"]
package/dist/index.mjs CHANGED
@@ -736,6 +736,17 @@ function machine(userContext) {
736
736
  }
737
737
  ],
738
738
  "INPUT.ENTER": [
739
+ // == group 1 ==
740
+ {
741
+ guard: and("isOpenControlled", "isCustomValue", not("hasHighlightedItem"), not("allowCustomValue")),
742
+ actions: ["revertInputValue", "invokeOnClose"]
743
+ },
744
+ {
745
+ guard: and("isCustomValue", not("hasHighlightedItem"), not("allowCustomValue")),
746
+ target: "focused",
747
+ actions: ["revertInputValue", "invokeOnClose"]
748
+ },
749
+ // == group 2 ==
739
750
  {
740
751
  guard: and("isOpenControlled", "closeOnSelect"),
741
752
  actions: ["selectHighlightedItem", "invokeOnClose"]
@@ -893,6 +904,17 @@ function machine(userContext) {
893
904
  actions: ["highlightLastItem"]
894
905
  },
895
906
  "INPUT.ENTER": [
907
+ // == group 1 ==
908
+ {
909
+ guard: and("isOpenControlled", "isCustomValue", not("hasHighlightedItem"), not("allowCustomValue")),
910
+ actions: ["revertInputValue", "invokeOnClose"]
911
+ },
912
+ {
913
+ guard: and("isCustomValue", not("hasHighlightedItem"), not("allowCustomValue")),
914
+ target: "focused",
915
+ actions: ["revertInputValue", "invokeOnClose"]
916
+ },
917
+ // == group 2 ==
896
918
  {
897
919
  guard: and("isOpenControlled", "closeOnSelect"),
898
920
  actions: ["selectHighlightedItem", "invokeOnClose"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/combobox",
3
- "version": "0.72.0",
3
+ "version": "0.73.0",
4
4
  "description": "Core logic for the combobox widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -26,16 +26,16 @@
26
26
  "url": "https://github.com/chakra-ui/zag/issues"
27
27
  },
28
28
  "dependencies": {
29
- "@zag-js/anatomy": "0.72.0",
30
- "@zag-js/aria-hidden": "0.72.0",
31
- "@zag-js/collection": "0.72.0",
32
- "@zag-js/core": "0.72.0",
33
- "@zag-js/dismissable": "0.72.0",
34
- "@zag-js/dom-query": "0.72.0",
35
- "@zag-js/dom-event": "0.72.0",
36
- "@zag-js/utils": "0.72.0",
37
- "@zag-js/popper": "0.72.0",
38
- "@zag-js/types": "0.72.0"
29
+ "@zag-js/anatomy": "0.73.0",
30
+ "@zag-js/aria-hidden": "0.73.0",
31
+ "@zag-js/collection": "0.73.0",
32
+ "@zag-js/core": "0.73.0",
33
+ "@zag-js/dismissable": "0.73.0",
34
+ "@zag-js/dom-query": "0.73.0",
35
+ "@zag-js/dom-event": "0.73.0",
36
+ "@zag-js/utils": "0.73.0",
37
+ "@zag-js/popper": "0.73.0",
38
+ "@zag-js/types": "0.73.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "clean-package": "2.2.0"