@spaced-out/ui-design-system 0.2.8-beta.0 → 0.2.9

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,15 @@
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.9](https://github.com/spaced-out/ui-design-system/compare/v0.2.8...v0.2.9) (2024-11-08)
6
+
7
+
8
+ ### Features
9
+
10
+ * allow menu to persist open state on option select ([#284](https://github.com/spaced-out/ui-design-system/issues/284)) ([403f6f0](https://github.com/spaced-out/ui-design-system/commit/403f6f091a358a9a83423f7084f4ef9e71d5907e))
11
+
12
+ ### [0.2.8](https://github.com/spaced-out/ui-design-system/compare/v0.2.8-beta.0...v0.2.8) (2024-10-23)
13
+
5
14
  ### [0.2.8-beta.0](https://github.com/spaced-out/ui-design-system/compare/v0.2.7...v0.2.8-beta.0) (2024-10-23)
6
15
 
7
16
 
@@ -130,7 +130,9 @@ const ButtonDropdown = /*#__PURE__*/React.forwardRef((_ref, forwardRef) => {
130
130
  }, /*#__PURE__*/React.createElement(_Menu.Menu, _extends({}, menu, {
131
131
  onSelect: (option, e) => {
132
132
  onOptionSelect && onOptionSelect(option, e);
133
- if (!menu.optionsVariant || menu.optionsVariant === 'normal') {
133
+ if (
134
+ // option.keepMenuOpenOnOptionSelect - to allow the menu persist its open stat upon option selection in normal variant
135
+ !option.keepMenuOpenOnOptionSelect && (!menu.optionsVariant || menu.optionsVariant === 'normal')) {
134
136
  clickAway();
135
137
  }
136
138
  },
@@ -181,8 +181,9 @@ export const ButtonDropdown: React$AbstractComponent<
181
181
  onSelect={(option, e) => {
182
182
  onOptionSelect && onOptionSelect(option, e);
183
183
  if (
184
- !menu.optionsVariant ||
185
- menu.optionsVariant === 'normal'
184
+ // option.keepMenuOpenOnOptionSelect - to allow the menu persist its open stat upon option selection in normal variant
185
+ !option.keepMenuOpenOnOptionSelect &&
186
+ (!menu.optionsVariant || menu.optionsVariant === 'normal')
186
187
  ) {
187
188
  clickAway();
188
189
  }
@@ -47,6 +47,7 @@ export type MenuOption = {
47
47
  disabled?: boolean,
48
48
  optionSize?: MenuSizeTypes,
49
49
  optionVariant?: MenuOptionsVariant,
50
+ keepMenuOpenOnOptionSelect?: boolean,
50
51
  };
51
52
 
52
53
  // Render first available option set
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.2.8-beta.0",
3
+ "version": "0.2.9",
4
4
  "main": "index.js",
5
5
  "description": "Sense UI components library",
6
6
  "author": {