@zag-js/combobox 1.22.0 → 1.23.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
@@ -72,10 +72,11 @@ function connect(service, normalize) {
72
72
  const { context, prop, state, send, scope, computed, event } = service;
73
73
  const translations = prop("translations");
74
74
  const collection2 = prop("collection");
75
- const disabled = prop("disabled");
75
+ const disabled = !!prop("disabled");
76
76
  const interactive = computed("isInteractive");
77
- const invalid = prop("invalid");
78
- const readOnly = prop("readOnly");
77
+ const invalid = !!prop("invalid");
78
+ const required = !!prop("required");
79
+ const readOnly = !!prop("readOnly");
79
80
  const open = state.hasTag("open");
80
81
  const focused = state.hasTag("focused");
81
82
  const composite = prop("composite");
@@ -162,6 +163,7 @@ function connect(service, normalize) {
162
163
  "data-readonly": domQuery.dataAttr(readOnly),
163
164
  "data-disabled": domQuery.dataAttr(disabled),
164
165
  "data-invalid": domQuery.dataAttr(invalid),
166
+ "data-required": domQuery.dataAttr(required),
165
167
  "data-focus": domQuery.dataAttr(focused),
166
168
  onClick(event2) {
167
169
  if (composite) return;
@@ -1152,6 +1154,7 @@ var machine = createMachine({
1152
1154
  if (prop("disableLayer")) return;
1153
1155
  const contentEl = () => getContentEl(scope);
1154
1156
  return dismissable.trackDismissableElement(contentEl, {
1157
+ type: "listbox",
1155
1158
  defer: true,
1156
1159
  exclude: () => [getInputEl(scope), getTriggerEl(scope), getClearTriggerEl(scope)],
1157
1160
  onFocusOutside: prop("onFocusOutside"),
package/dist/index.mjs CHANGED
@@ -70,10 +70,11 @@ function connect(service, normalize) {
70
70
  const { context, prop, state, send, scope, computed, event } = service;
71
71
  const translations = prop("translations");
72
72
  const collection2 = prop("collection");
73
- const disabled = prop("disabled");
73
+ const disabled = !!prop("disabled");
74
74
  const interactive = computed("isInteractive");
75
- const invalid = prop("invalid");
76
- const readOnly = prop("readOnly");
75
+ const invalid = !!prop("invalid");
76
+ const required = !!prop("required");
77
+ const readOnly = !!prop("readOnly");
77
78
  const open = state.hasTag("open");
78
79
  const focused = state.hasTag("focused");
79
80
  const composite = prop("composite");
@@ -160,6 +161,7 @@ function connect(service, normalize) {
160
161
  "data-readonly": dataAttr(readOnly),
161
162
  "data-disabled": dataAttr(disabled),
162
163
  "data-invalid": dataAttr(invalid),
164
+ "data-required": dataAttr(required),
163
165
  "data-focus": dataAttr(focused),
164
166
  onClick(event2) {
165
167
  if (composite) return;
@@ -1150,6 +1152,7 @@ var machine = createMachine({
1150
1152
  if (prop("disableLayer")) return;
1151
1153
  const contentEl = () => getContentEl(scope);
1152
1154
  return trackDismissableElement(contentEl, {
1155
+ type: "listbox",
1153
1156
  defer: true,
1154
1157
  exclude: () => [getInputEl(scope), getTriggerEl(scope), getClearTriggerEl(scope)],
1155
1158
  onFocusOutside: prop("onFocusOutside"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/combobox",
3
- "version": "1.22.0",
3
+ "version": "1.23.0",
4
4
  "description": "Core logic for the combobox widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -26,15 +26,15 @@
26
26
  "url": "https://github.com/chakra-ui/zag/issues"
27
27
  },
28
28
  "dependencies": {
29
- "@zag-js/anatomy": "1.22.0",
30
- "@zag-js/aria-hidden": "1.22.0",
31
- "@zag-js/collection": "1.22.0",
32
- "@zag-js/core": "1.22.0",
33
- "@zag-js/dismissable": "1.22.0",
34
- "@zag-js/dom-query": "1.22.0",
35
- "@zag-js/utils": "1.22.0",
36
- "@zag-js/popper": "1.22.0",
37
- "@zag-js/types": "1.22.0"
29
+ "@zag-js/anatomy": "1.23.0",
30
+ "@zag-js/aria-hidden": "1.23.0",
31
+ "@zag-js/collection": "1.23.0",
32
+ "@zag-js/core": "1.23.0",
33
+ "@zag-js/dismissable": "1.23.0",
34
+ "@zag-js/dom-query": "1.23.0",
35
+ "@zag-js/utils": "1.23.0",
36
+ "@zag-js/popper": "1.23.0",
37
+ "@zag-js/types": "1.23.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "clean-package": "2.2.0"