@db-ux/react-core-components 4.5.0 → 4.5.2-0-eff2227
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,19 @@
|
|
|
1
1
|
# @db-ux/react-core-components
|
|
2
2
|
|
|
3
|
+
## 4.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix: issue with DBButton `noText` and `width="full"` not having fixed size - [see commit bc81b40](https://github.com/db-ux-design-system/core-web/commit/bc81b402660871d706b1bf8d3fbac6713a7c9670)
|
|
8
|
+
|
|
9
|
+
- fix: issue with hover state when using DBPopover/Tooltip with animation - [see commit bc4801b](https://github.com/db-ux-design-system/core-web/commit/bc4801bf0b32d5dc4fd8e29626a6122e34fb6ada)
|
|
10
|
+
|
|
11
|
+
- fix: Add null guard in `floating-components.ts` to prevent errors when `element` or `parent` is `null` inside tests. - [see commit ac50f97](https://github.com/db-ux-design-system/core-web/commit/ac50f97fa503ef4f62d37f316f3b5da0f6d7742e)
|
|
12
|
+
|
|
13
|
+
- fix: issue with DBCustomSelect inside DBDrawer (or other `<dialog>` based) components, which has a problem with top-layer and focus - [see commit 6547ada](https://github.com/db-ux-design-system/core-web/commit/6547ada44844cbed1b8207db742a5119edb945f6)
|
|
14
|
+
|
|
15
|
+
- fix(`input type="date"`): wrong padding and color for successful and critical state - [see commit 4f3db42](https://github.com/db-ux-design-system/core-web/commit/4f3db4262a652ac8d6353bd1a0a92a4a62b6ff86)
|
|
16
|
+
|
|
3
17
|
## 4.5.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -324,10 +324,14 @@ function DBCustomSelectFn(props, component) {
|
|
|
324
324
|
else if (detailsRef.current.open && event) {
|
|
325
325
|
if (event.relatedTarget) {
|
|
326
326
|
const relatedTarget = event.relatedTarget;
|
|
327
|
-
if
|
|
327
|
+
// We close if the focus is on something like a <button> etc. which is not inside the <details> element
|
|
328
|
+
// Inside a <dialog> there is some focus problem because of the top-layer
|
|
329
|
+
// We do not want to focus <dialog> itself
|
|
330
|
+
if (!detailsRef.current.contains(relatedTarget) &&
|
|
331
|
+
relatedTarget.localName !== "dialog") {
|
|
328
332
|
// We need to use delay here because the combination of `contains`
|
|
329
333
|
// and changing the DOM element causes a race condition inside browser
|
|
330
|
-
delay(() => (detailsRef.current.open = false), 1);
|
|
334
|
+
void delay(() => (detailsRef.current.open = false), 1);
|
|
331
335
|
}
|
|
332
336
|
}
|
|
333
337
|
}
|
|
@@ -694,7 +698,7 @@ function DBCustomSelectFn(props, component) {
|
|
|
694
698
|
(_selectedLabels === null || _selectedLabels === void 0 ? void 0 : _selectedLabels.length) ? (React.createElement("span", { "data-visually-hidden": getBooleanAsString(props.selectedType === "tag"), id: _selectedLabelsId },
|
|
695
699
|
props.selectedPrefix ? (React.createElement("span", { "data-visually-hidden": "true" }, props.selectedPrefix)) : null,
|
|
696
700
|
_selectedLabels)) : null,
|
|
697
|
-
props.selectedType === "tag" ? (React.createElement("div", null, _selectedOptions === null || _selectedOptions === void 0 ? void 0 : _selectedOptions.map((option
|
|
701
|
+
props.selectedType === "tag" ? (React.createElement("div", null, _selectedOptions === null || _selectedOptions === void 0 ? void 0 : _selectedOptions.map((option) => (React.createElement(DBTag, { emphasis: "strong", behavior: "removable", removeButton: getTagRemoveLabel(option), onRemove: (event) => handleTagRemove(option, event), key: getOptionKey(option, "tag-") }, getOptionLabel(option)))))) : null),
|
|
698
702
|
React.createElement(DBCustomSelectDropdown, { width: props.dropdownWidth },
|
|
699
703
|
searchEnabled ? (React.createElement("div", null,
|
|
700
704
|
React.createElement(DBInput, { type: "search", ref: searchInputRef, name: _id, form: _id, showLabel: false, value: _searchValue, label: (_e = props.searchLabel) !== null && _e !== void 0 ? _e : DEFAULT_LABEL, placeholder: (_f = props.searchPlaceholder) !== null && _f !== void 0 ? _f : props.searchLabel, ariaDescribedBy: _hasNoOptions || props.showLoading
|
|
@@ -60,6 +60,8 @@ export const handleDataOutside = (el) => {
|
|
|
60
60
|
return dataOutsidePair;
|
|
61
61
|
};
|
|
62
62
|
export const handleFixedDropdown = (element, parent, placement) => {
|
|
63
|
+
if (!element || !parent)
|
|
64
|
+
return;
|
|
63
65
|
// We skip this if we are in mobile it's already fixed
|
|
64
66
|
if (getComputedStyle(element).zIndex === '9999')
|
|
65
67
|
return;
|
|
@@ -249,6 +251,8 @@ const getAncestorHasCorrectedPlacement = (element) => {
|
|
|
249
251
|
};
|
|
250
252
|
export const handleFixedPopover = (element, parent, placement) => {
|
|
251
253
|
var _a, _b;
|
|
254
|
+
if (!element || !parent)
|
|
255
|
+
return;
|
|
252
256
|
const parentComputedStyles = getComputedStyle(parent);
|
|
253
257
|
const parentHasFloatingPosition = ['absolute', 'fixed'].includes(parentComputedStyles.position);
|
|
254
258
|
const ancestorWithCorrectedPlacement = getAncestorHasCorrectedPlacement(element);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@db-ux/react-core-components",
|
|
3
|
-
"version": "4.5.0",
|
|
3
|
+
"version": "4.5.2-0-eff2227",
|
|
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.5.0",
|
|
45
|
-
"@db-ux/core-foundations": "4.5.0"
|
|
44
|
+
"@db-ux/core-components": "4.5.2-0-eff2227",
|
|
45
|
+
"@db-ux/core-foundations": "4.5.2-0-eff2227"
|
|
46
46
|
}
|
|
47
47
|
}
|