@jobber/components 9.12.2 → 9.12.3
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/Combobox-cjs.js
CHANGED
|
@@ -530,7 +530,7 @@ function ComboboxRoot(_a) {
|
|
|
530
530
|
React.createElement(ComboboxContext.Provider, { value: contextValue },
|
|
531
531
|
React.createElement(ComboboxPrimitive.ComboboxRoot, Object.assign({}, rootProps, { disabled: disabled, modal: modal !== null && modal !== void 0 ? modal : responsive.defaultModal, multiple: multiple, readOnly: readOnly }),
|
|
532
532
|
children,
|
|
533
|
-
description && (React.createElement(ComboboxDescription, null, description)),
|
|
533
|
+
description && !error && (React.createElement(ComboboxDescription, null, description)),
|
|
534
534
|
error && React.createElement(ComboboxError, null, error)))));
|
|
535
535
|
}
|
|
536
536
|
function ComboboxRecipeLabel({ children, visuallyHidden, }) {
|
package/dist/Combobox-es.js
CHANGED
|
@@ -528,7 +528,7 @@ function ComboboxRoot(_a) {
|
|
|
528
528
|
React__default.createElement(ComboboxContext.Provider, { value: contextValue },
|
|
529
529
|
React__default.createElement(ComboboxRoot$1, Object.assign({}, rootProps, { disabled: disabled, modal: modal !== null && modal !== void 0 ? modal : responsive.defaultModal, multiple: multiple, readOnly: readOnly }),
|
|
530
530
|
children,
|
|
531
|
-
description && (React__default.createElement(ComboboxDescription, null, description)),
|
|
531
|
+
description && !error && (React__default.createElement(ComboboxDescription, null, description)),
|
|
532
532
|
error && React__default.createElement(ComboboxError, null, error)))));
|
|
533
533
|
}
|
|
534
534
|
function ComboboxRecipeLabel({ children, visuallyHidden, }) {
|
|
@@ -300,7 +300,19 @@ Pass `label`, `description`, and `error` on `Combobox` for the default Atlantis
|
|
|
300
300
|
field treatment. If the layout needs different placement, compose
|
|
301
301
|
`Combobox.Label`, `Combobox.Description`, and `Combobox.Error` manually.
|
|
302
302
|
|
|
303
|
+
A field shows a description or an error, never both. When both root props are
|
|
304
|
+
set the error replaces the description, since a description hints at what the
|
|
305
|
+
field wants and the error already restates it. Manually composed
|
|
306
|
+
`Combobox.Description` and `Combobox.Error` parts are unaffected.
|
|
307
|
+
|
|
308
|
+
```tsx
|
|
309
|
+
<Combobox label="Team member" description="Search by name" items={teamMembers}>
|
|
310
|
+
{/* trigger and content */}
|
|
311
|
+
</Combobox>
|
|
312
|
+
```
|
|
313
|
+
|
|
303
314
|
```tsx
|
|
315
|
+
// `description` is not rendered while `error` is set
|
|
304
316
|
<Combobox
|
|
305
317
|
label="Team member"
|
|
306
318
|
description="Search by name"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "9.12.
|
|
3
|
+
"version": "9.12.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -547,5 +547,5 @@
|
|
|
547
547
|
"> 1%",
|
|
548
548
|
"IE 10"
|
|
549
549
|
],
|
|
550
|
-
"gitHead": "
|
|
550
|
+
"gitHead": "806acbc400062ba092f647367528425ecbcea016"
|
|
551
551
|
}
|