@ultraviolet/ui 1.45.1 → 1.45.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/index.d.ts CHANGED
@@ -516,9 +516,17 @@ declare const extendTheme: (extendedTheme: RecursivePartial<UltravioletUITheme>)
516
516
  };
517
517
  icon: {
518
518
  category: {
519
+ neutral: {
520
+ fill: string;
521
+ fillDisabled: string;
522
+ fillStrong: string;
523
+ fillStrongDisabled: string;
524
+ };
519
525
  primary: {
520
526
  fill: string;
527
+ fillDisabled: string;
521
528
  fillStrong: string;
529
+ fillStrongDisabled: string;
522
530
  };
523
531
  };
524
532
  product: {
@@ -53,13 +53,12 @@ const Expandable = ({
53
53
  useEffect(() => {
54
54
  if (opened && ref.current && height) {
55
55
  ref.current.style.maxHeight = `${height}px`;
56
- if (!minHeight) {
57
- ref.current.style.visibility = '';
58
- }
56
+ ref.current.style.visibility = '';
59
57
  transitionTimer.current = setTimeout(() => {
60
58
  if (ref.current) {
61
59
  ref.current.style.maxHeight = 'initial';
62
60
  ref.current.style.overflow = 'visible';
61
+ ref.current.style.visibility = '';
63
62
  }
64
63
  }, ANIMATION_DURATION);
65
64
  } else {
@@ -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 ?? []).map(({
534
- props: {
535
- children: label,
536
- ...subProps
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
- ...subProps,
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.1",
3
+ "version": "1.45.3",
4
4
  "description": "Ultraviolet UI",
5
5
  "homepage": "https://github.com/scaleway/ultraviolet#readme",
6
6
  "repository": {
@@ -43,9 +43,9 @@
43
43
  "@emotion/babel-plugin": "11.11.0",
44
44
  "@emotion/react": "11.11.4",
45
45
  "@emotion/styled": "11.11.5",
46
- "@types/react": "18.2.64",
46
+ "@types/react": "18.2.74",
47
47
  "@types/react-datepicker": "4.19.6",
48
- "@types/react-dom": "18.2.21",
48
+ "@types/react-dom": "18.2.23",
49
49
  "react": "18.2.0",
50
50
  "react-dom": "18.2.0"
51
51
  },
@@ -57,15 +57,15 @@
57
57
  "@nivo/pie": "0.80.0",
58
58
  "@nivo/scales": "0.80.0",
59
59
  "@scaleway/random-name": "5.0.0",
60
- "@scaleway/use-media": "2.0.1",
60
+ "@scaleway/use-media": "3.0.0",
61
61
  "deepmerge": "4.3.1",
62
62
  "react-datepicker": "4.25.0",
63
63
  "react-select": "5.8.0",
64
64
  "react-toastify": "10.0.5",
65
65
  "react-use-clipboard": "1.0.9",
66
66
  "reakit": "1.3.11",
67
- "@ultraviolet/themes": "1.9.0",
68
- "@ultraviolet/icons": "2.11.2"
67
+ "@ultraviolet/themes": "1.10.0",
68
+ "@ultraviolet/icons": "2.12.0"
69
69
  },
70
70
  "scripts": {
71
71
  "build": "rollup -c ../../rollup.config.mjs",