@db-ux/react-core-components 4.3.1 → 4.3.2
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @db-ux/react-core-components
|
|
2
2
|
|
|
3
|
+
## 4.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix(input): add missing `accept` attribute for file inputs - [see commit d74707d](https://github.com/db-ux-design-system/core-web/commit/d74707d17045a0efb182856e9a3db192a4d6e2fa)
|
|
8
|
+
|
|
9
|
+
- fix: rendering issue with drawer and sub-navigation when user has `prefers-reduced-motion: reduce` - [see commit cd23ff2](https://github.com/db-ux-design-system/core-web/commit/cd23ff2da5fa8a11121c3195467b4b4c0ab2ebb6)
|
|
10
|
+
|
|
11
|
+
- fix(customselect): select last remaining result with enter key - [see commit cc6a445](https://github.com/db-ux-design-system/core-web/commit/cc6a445c523cc196b9c93584c62772ba9864996f)
|
|
12
|
+
|
|
3
13
|
## 4.3.1
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -296,6 +296,14 @@ function DBCustomSelectFn(props, component) {
|
|
|
296
296
|
activeElement.click();
|
|
297
297
|
event.preventDefault();
|
|
298
298
|
}
|
|
299
|
+
else if (activeElement.getAttribute("type") === "search") {
|
|
300
|
+
// When Enter is pressed in search field, select the first available option
|
|
301
|
+
const firstOption = _options === null || _options === void 0 ? void 0 : _options.find((opt) => !opt.isGroupTitle && !opt.disabled);
|
|
302
|
+
if (firstOption === null || firstOption === void 0 ? void 0 : firstOption.value) {
|
|
303
|
+
handleSelect(firstOption.value);
|
|
304
|
+
event.preventDefault();
|
|
305
|
+
}
|
|
306
|
+
}
|
|
299
307
|
}
|
|
300
308
|
}
|
|
301
309
|
else if (event.key === "ArrowDown" ||
|
|
@@ -43,7 +43,7 @@ function DBDrawerFn(props, component) {
|
|
|
43
43
|
const open = Boolean(props.open);
|
|
44
44
|
if (open && !_ref.current.open) {
|
|
45
45
|
if (dialogContainerRef.current) {
|
|
46
|
-
dialogContainerRef.current.
|
|
46
|
+
dialogContainerRef.current.removeAttribute("data-transition");
|
|
47
47
|
}
|
|
48
48
|
if (props.position === "absolute" ||
|
|
49
49
|
props.backdrop === "none" ||
|
|
@@ -53,16 +53,19 @@ function DBDrawerFn(props, component) {
|
|
|
53
53
|
else {
|
|
54
54
|
_ref.current.showModal();
|
|
55
55
|
}
|
|
56
|
+
void delay(() => {
|
|
57
|
+
if (dialogContainerRef.current) {
|
|
58
|
+
dialogContainerRef.current.dataset["transition"] = "open";
|
|
59
|
+
}
|
|
60
|
+
}, 1);
|
|
56
61
|
}
|
|
57
62
|
if (!open && _ref.current.open) {
|
|
58
63
|
if (dialogContainerRef.current) {
|
|
59
|
-
dialogContainerRef.current.
|
|
64
|
+
dialogContainerRef.current.dataset["transition"] =
|
|
65
|
+
"close";
|
|
60
66
|
}
|
|
61
|
-
delay(() => {
|
|
67
|
+
void delay(() => {
|
|
62
68
|
var _a;
|
|
63
|
-
if (dialogContainerRef.current) {
|
|
64
|
-
dialogContainerRef.current.hidden = false;
|
|
65
|
-
}
|
|
66
69
|
(_a = _ref.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
67
70
|
}, 401);
|
|
68
71
|
}
|
|
@@ -145,7 +145,7 @@ function DBInputFn(props, component) {
|
|
|
145
145
|
}, []);
|
|
146
146
|
return (React.createElement("div", Object.assign({}, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font"]), { className: cls("db-input", props.className), "data-variant": props.variant, "data-hide-label": getHideProp(props.showLabel), "data-show-icon": getBooleanAsString((_a = props.showIconLeading) !== null && _a !== void 0 ? _a : props.showIcon), "data-icon": (_b = props.iconLeading) !== null && _b !== void 0 ? _b : props.icon, "data-icon-trailing": props.iconTrailing, "data-hide-asterisk": getHideProp(props.showRequiredAsterisk), "data-show-icon-trailing": getBooleanAsString(props.showIconTrailing) }),
|
|
147
147
|
React.createElement("label", { htmlFor: _id }, (_c = props.label) !== null && _c !== void 0 ? _c : DEFAULT_LABEL),
|
|
148
|
-
React.createElement("input", Object.assign({ "aria-invalid": props.validation === "invalid", "data-custom-validity": props.validation, "data-field-sizing": props.fieldSizing, ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font"]), { id: _id, name: props.name, type: props.type || "text", multiple: getBoolean(props.multiple, "multiple"), placeholder: (_d = props.placeholder) !== null && _d !== void 0 ? _d : DEFAULT_PLACEHOLDER, disabled: getBoolean(props.disabled, "disabled"), required: getBoolean(props.required, "required"), step: getStep(props.step), value: props.value, maxLength: getNumber(props.maxLength, props.maxlength), minLength: getNumber(props.minLength, props.minlength), max: getInputValue(props.max, props.type), min: getInputValue(props.min, props.type), readOnly: getBoolean(props.readOnly, "readOnly") ||
|
|
148
|
+
React.createElement("input", Object.assign({ "aria-invalid": props.validation === "invalid", "data-custom-validity": props.validation, "data-field-sizing": props.fieldSizing, ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font"]), { id: _id, name: props.name, type: props.type || "text", multiple: getBoolean(props.multiple, "multiple"), accept: props.accept, placeholder: (_d = props.placeholder) !== null && _d !== void 0 ? _d : DEFAULT_PLACEHOLDER, disabled: getBoolean(props.disabled, "disabled"), required: getBoolean(props.required, "required"), step: getStep(props.step), value: props.value, maxLength: getNumber(props.maxLength, props.maxlength), minLength: getNumber(props.minLength, props.minlength), max: getInputValue(props.max, props.type), min: getInputValue(props.min, props.type), readOnly: getBoolean(props.readOnly, "readOnly") ||
|
|
149
149
|
getBoolean(props.readonly, "readonly"), form: props.form, pattern: props.pattern, size: props.size, autoComplete: props.autocomplete, autoFocus: getBoolean(props.autofocus, "autofocus"), enterKeyHint: props.enterkeyhint, inputMode: props.inputmode, onInput: (event) => handleInput(event), onChange: (event) => handleChange(event), onBlur: (event) => handleBlur(event), onFocus: (event) => handleFocus(event), list: props.dataList && _dataListId, "aria-describedby": (_e = props.ariaDescribedBy) !== null && _e !== void 0 ? _e : _descByIds, role: ["datetime-local", "date", "time", "week", "month", "color"].includes((_f = props.type) !== null && _f !== void 0 ? _f : "") && isIOSSafari()
|
|
150
150
|
? "textbox"
|
|
151
151
|
: undefined })),
|
|
@@ -14,6 +14,10 @@ export type DBInputDefaultProps = {
|
|
|
14
14
|
* Allow selecting multiple files. https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/file#multiple
|
|
15
15
|
*/
|
|
16
16
|
multiple?: boolean | string;
|
|
17
|
+
/**
|
|
18
|
+
* Specifies the types of files that the server accepts (for type="file"). https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept
|
|
19
|
+
*/
|
|
20
|
+
accept?: string;
|
|
17
21
|
/**
|
|
18
22
|
* Maximum value
|
|
19
23
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@db-ux/react-core-components",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.2",
|
|
4
4
|
"description": "React components for @db-ux/core-components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"sideEffects": false,
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@db-ux/core-components": "4.3.
|
|
45
|
-
"@db-ux/core-foundations": "4.3.
|
|
44
|
+
"@db-ux/core-components": "4.3.2",
|
|
45
|
+
"@db-ux/core-foundations": "4.3.2"
|
|
46
46
|
}
|
|
47
47
|
}
|