@spaced-out/ui-design-system 0.0.42 → 0.0.43

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.
@@ -2,6 +2,7 @@ const path = require('path');
2
2
 
3
3
  module.exports = {
4
4
  stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.jsx'],
5
+ features: {buildStoriesJson: true},
5
6
  // Add any Storybook addons you want here: https://storybook.js.org/addons/
6
7
  addons: [
7
8
  {
package/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.0.43](https://github.com/spaced-out/ui-design-system/compare/v0.0.42...v0.0.43) (2023-03-10)
6
+
7
+
8
+ ### Features
9
+
10
+ * exposing storybook.json ([0b37bfa](https://github.com/spaced-out/ui-design-system/commit/0b37bfa60782ce83d22b1da833121114f899c5e3))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * avatar docs fix and dropdown uncontrolled input fix ([5f6d2c5](https://github.com/spaced-out/ui-design-system/commit/5f6d2c55c6a8a61cd924dc1382a23eee0f4f2e85))
16
+
5
17
  ### [0.0.42](https://github.com/spaced-out/ui-design-system/compare/v0.0.41...v0.0.42) (2023-03-09)
6
18
 
7
19
 
@@ -30,7 +30,7 @@ const Dropdown = _ref => {
30
30
  menuSize,
31
31
  ...inputProps
32
32
  } = _ref;
33
- const [inputValue, setInputValue] = React.useState(selectedOption?.label);
33
+ const [inputValue, setInputValue] = React.useState(selectedOption?.label || '');
34
34
  const dropdownRef = React.useRef();
35
35
  const {
36
36
  x,
@@ -47,12 +47,12 @@ const Dropdown = _ref => {
47
47
  const handleSelect = option => {
48
48
  if (option?.key) {
49
49
  onChange && onChange(option);
50
- setInputValue(option.label);
50
+ setInputValue(option.label || '');
51
51
  }
52
52
  };
53
53
  React.useEffect(() => {
54
54
  if (selectedOption?.key) {
55
- setInputValue(selectedOption.label);
55
+ setInputValue(selectedOption.label || '');
56
56
  }
57
57
  }, [selectedOption]);
58
58
  return /*#__PURE__*/React.createElement(_clickAway.ClickAway, null, _ref2 => {
@@ -58,7 +58,9 @@ export const Dropdown = ({
58
58
  menuSize,
59
59
  ...inputProps
60
60
  }: DropdownProps): React.Node => {
61
- const [inputValue, setInputValue] = React.useState(selectedOption?.label);
61
+ const [inputValue, setInputValue] = React.useState(
62
+ selectedOption?.label || '',
63
+ );
62
64
  const dropdownRef = React.useRef();
63
65
  const {x, y, reference, floating, strategy} = useFloating({
64
66
  strategy: 'absolute',
@@ -70,13 +72,13 @@ export const Dropdown = ({
70
72
  const handleSelect = (option?: MenuOption) => {
71
73
  if (option?.key) {
72
74
  onChange && onChange(option);
73
- setInputValue(option.label);
75
+ setInputValue(option.label || '');
74
76
  }
75
77
  };
76
78
 
77
79
  React.useEffect(() => {
78
80
  if (selectedOption?.key) {
79
- setInputValue(selectedOption.label);
81
+ setInputValue(selectedOption.label || '');
80
82
  }
81
83
  }, [selectedOption]);
82
84
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.0.42",
3
+ "version": "0.0.43",
4
4
  "main": "index.js",
5
5
  "description": "Sense UI components library",
6
6
  "author": {