@ultraviolet/ui 1.45.2 → 1.45.4
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.d.ts
CHANGED
|
@@ -3353,7 +3353,7 @@ type CloseButtonProps = {
|
|
|
3353
3353
|
ariaLabel?: string;
|
|
3354
3354
|
theme: Theme$1;
|
|
3355
3355
|
};
|
|
3356
|
-
declare const notification: (children:
|
|
3356
|
+
declare const notification: (children: ((props: CloseButtonProps) => ReactNode) | ReactNode, title: string, icon?: ReactNode, isClosable?: boolean, containerId?: string, options?: ToastOptions) => react_toastify.Id;
|
|
3357
3357
|
type NotificationContainerProps = {
|
|
3358
3358
|
/**
|
|
3359
3359
|
* Delay (in ms) before the notification autocloses. To disable autoclose, set to false
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _styled from '@emotion/styled/base';
|
|
2
2
|
import { useTheme, css } from '@emotion/react';
|
|
3
3
|
import { Icon } from '@ultraviolet/icons';
|
|
4
|
-
import { forwardRef, useState, useId, useMemo, useEffect } from 'react';
|
|
4
|
+
import React, { forwardRef, useState, useId, useMemo, Children, useEffect } from 'react';
|
|
5
5
|
import Select, { components } from 'react-select';
|
|
6
6
|
import isJSONString from '../../helpers/isJSON.js';
|
|
7
7
|
import * as animations from '../../utils/animations.js';
|
|
@@ -530,15 +530,15 @@ const FwdSelectInput = ({
|
|
|
530
530
|
const currentValue = value?.value;
|
|
531
531
|
|
|
532
532
|
// Options need to keep the same reference otherwise react-select doesn't focus the selected option
|
|
533
|
-
const selectOptions = useMemo(() => options || (children
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
533
|
+
const selectOptions = useMemo(() => options || Children.toArray(children).reduce((acc, child) => {
|
|
534
|
+
if ( /*#__PURE__*/React.isValidElement(child)) {
|
|
535
|
+
return [...acc, {
|
|
536
|
+
...child.props,
|
|
537
|
+
label: child.props.children
|
|
538
|
+
}];
|
|
537
539
|
}
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
label
|
|
541
|
-
})), [options, children]);
|
|
540
|
+
return acc;
|
|
541
|
+
}, []), [options, children]);
|
|
542
542
|
useEffect(() => {
|
|
543
543
|
if (animationOnChange) {
|
|
544
544
|
setIsAnimated(true);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultraviolet/ui",
|
|
3
|
-
"version": "1.45.
|
|
3
|
+
"version": "1.45.4",
|
|
4
4
|
"description": "Ultraviolet UI",
|
|
5
5
|
"homepage": "https://github.com/scaleway/ultraviolet#readme",
|
|
6
6
|
"repository": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@emotion/styled": "11.11.5",
|
|
46
46
|
"@types/react": "18.2.74",
|
|
47
47
|
"@types/react-datepicker": "4.19.6",
|
|
48
|
-
"@types/react-dom": "18.2.
|
|
48
|
+
"@types/react-dom": "18.2.24",
|
|
49
49
|
"react": "18.2.0",
|
|
50
50
|
"react-dom": "18.2.0"
|
|
51
51
|
},
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"react-use-clipboard": "1.0.9",
|
|
66
66
|
"reakit": "1.3.11",
|
|
67
67
|
"@ultraviolet/themes": "1.10.0",
|
|
68
|
-
"@ultraviolet/icons": "2.12.
|
|
68
|
+
"@ultraviolet/icons": "2.12.1"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|
|
71
71
|
"build": "rollup -c ../../rollup.config.mjs",
|