@spaced-out/ui-design-system 0.2.9 → 0.2.10

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
@@ -2,6 +2,13 @@
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.2.10](https://github.com/spaced-out/ui-design-system/compare/v0.2.9...v0.2.10) (2024-11-08)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * support menu open for all menu related components ([#285](https://github.com/spaced-out/ui-design-system/issues/285)) ([657324a](https://github.com/spaced-out/ui-design-system/commit/657324ae683dbcd702dd54ab1d42f007fadb3db2))
11
+
5
12
  ### [0.2.9](https://github.com/spaced-out/ui-design-system/compare/v0.2.8...v0.2.9) (2024-11-08)
6
13
 
7
14
 
@@ -99,7 +99,9 @@ const Dropdown = /*#__PURE__*/React.forwardRef((_ref, ref) => {
99
99
  }, /*#__PURE__*/React.createElement(_Menu.Menu, _extends({}, menu, {
100
100
  onSelect: (option, e) => {
101
101
  onChange && onChange(option, e);
102
- if (!menu.optionsVariant || menu.optionsVariant === 'normal') {
102
+ if (
103
+ // option.keepMenuOpenOnOptionSelect - to allow the menu persist its open stat upon option selection in normal variant
104
+ !option.keepMenuOpenOnOptionSelect && (!menu.optionsVariant || menu.optionsVariant === 'normal')) {
103
105
  clickAway();
104
106
  refs.reference.current.querySelector('input').focus();
105
107
  }
@@ -122,8 +122,9 @@ export const Dropdown: React$AbstractComponent<
122
122
  onSelect={(option, e) => {
123
123
  onChange && onChange(option, e);
124
124
  if (
125
- !menu.optionsVariant ||
126
- menu.optionsVariant === 'normal'
125
+ // option.keepMenuOpenOnOptionSelect - to allow the menu persist its open stat upon option selection in normal variant
126
+ !option.keepMenuOpenOnOptionSelect &&
127
+ (!menu.optionsVariant || menu.optionsVariant === 'normal')
127
128
  ) {
128
129
  clickAway();
129
130
  refs.reference.current.querySelector('input').focus();
@@ -93,7 +93,9 @@ const InlineDropdown = /*#__PURE__*/React.forwardRef((_ref, ref) => {
93
93
  }, /*#__PURE__*/React.createElement(_Menu.Menu, _extends({}, menu, {
94
94
  onSelect: (option, e) => {
95
95
  onOptionSelect && onOptionSelect(option, e);
96
- if (!menu.optionsVariant || menu.optionsVariant === 'normal') {
96
+ if (
97
+ // option.keepMenuOpenOnOptionSelect - to allow the menu persist its open stat upon option selection in normal variant
98
+ !option.keepMenuOpenOnOptionSelect && (!menu.optionsVariant || menu.optionsVariant === 'normal')) {
97
99
  clickAway();
98
100
  }
99
101
  },
@@ -134,8 +134,9 @@ export const InlineDropdown: React$AbstractComponent<
134
134
  onSelect={(option, e) => {
135
135
  onOptionSelect && onOptionSelect(option, e);
136
136
  if (
137
- !menu.optionsVariant ||
138
- menu.optionsVariant === 'normal'
137
+ // option.keepMenuOpenOnOptionSelect - to allow the menu persist its open stat upon option selection in normal variant
138
+ !option.keepMenuOpenOnOptionSelect &&
139
+ (!menu.optionsVariant || menu.optionsVariant === 'normal')
139
140
  ) {
140
141
  clickAway();
141
142
  }
@@ -109,7 +109,9 @@ const BaseTypeahead = /*#__PURE__*/React.forwardRef((_ref, ref) => {
109
109
  options: menuOptions,
110
110
  onSelect: (option, e) => {
111
111
  onSelect && onSelect(option, e);
112
- if (!menu.optionsVariant || menu.optionsVariant === 'normal') {
112
+ if (
113
+ // option.keepMenuOpenOnOptionSelect - to allow the menu persist its open stat upon option selection in normal variant
114
+ !option.keepMenuOpenOnOptionSelect && (!menu.optionsVariant || menu.optionsVariant === 'normal')) {
113
115
  clickAway();
114
116
  }
115
117
  },
@@ -144,8 +144,10 @@ const BaseTypeahead: React$AbstractComponent<
144
144
  onSelect={(option, e) => {
145
145
  onSelect && onSelect(option, e);
146
146
  if (
147
- !menu.optionsVariant ||
148
- menu.optionsVariant === 'normal'
147
+ // option.keepMenuOpenOnOptionSelect - to allow the menu persist its open stat upon option selection in normal variant
148
+ !option.keepMenuOpenOnOptionSelect &&
149
+ (!menu.optionsVariant ||
150
+ menu.optionsVariant === 'normal')
149
151
  ) {
150
152
  clickAway();
151
153
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "main": "index.js",
5
5
  "description": "Sense UI components library",
6
6
  "author": {