@spaced-out/ui-design-system 0.3.16 → 0.3.17

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.3.17](https://github.com/spaced-out/ui-design-system/compare/v0.3.16...v0.3.17) (2025-01-16)
6
+
7
+
8
+ ### Features
9
+
10
+ * add support for indeterminate prop in menu ([#315](https://github.com/spaced-out/ui-design-system/issues/315)) ([4d13a66](https://github.com/spaced-out/ui-design-system/commit/4d13a663815282b18961fd134990e3bafb5cbf74))
11
+
5
12
  ### [0.3.16](https://github.com/spaced-out/ui-design-system/compare/v0.3.15...v0.3.16) (2024-12-26)
6
13
 
7
14
 
@@ -48,6 +48,7 @@ export type MenuOption = {
48
48
  optionSize?: MenuSizeTypes,
49
49
  optionVariant?: MenuOptionsVariant,
50
50
  keepMenuOpenOnOptionSelect?: boolean,
51
+ indeterminate?: boolean,
51
52
  };
52
53
 
53
54
  // Render first available option set
@@ -45,7 +45,8 @@ const MenuOptionButton = props => {
45
45
  iconRightType,
46
46
  disabled,
47
47
  optionSize,
48
- optionVariant = optionsVariant
48
+ optionVariant = optionsVariant,
49
+ indeterminate = false
49
50
  } = option;
50
51
  const [buttonSize, setButtonSize] = React.useState(optionSize || size);
51
52
  const resolvedLabel = resolveLabel ? resolveLabel(option) : label;
@@ -89,7 +90,8 @@ const MenuOptionButton = props => {
89
90
  } : {}), optionVariant === 'checkbox' && /*#__PURE__*/React.createElement(_Checkbox.Checkbox, {
90
91
  tabIndex: -1,
91
92
  disabled: menuDisabled || disabled,
92
- checked: isSelected()
93
+ checked: isSelected(),
94
+ indeterminate: indeterminate
93
95
  }), optionVariant === 'radio' && /*#__PURE__*/React.createElement(_RadioButton.RadioButton, {
94
96
  disabled: menuDisabled || disabled,
95
97
  value: option.key,
@@ -51,6 +51,7 @@ export const MenuOptionButton = (props: MenuOptionProps): React.Node => {
51
51
  disabled,
52
52
  optionSize,
53
53
  optionVariant = optionsVariant,
54
+ indeterminate = false,
54
55
  } = option;
55
56
  const [buttonSize, setButtonSize] = React.useState(optionSize || size);
56
57
  const resolvedLabel = resolveLabel ? resolveLabel(option) : label;
@@ -110,6 +111,7 @@ export const MenuOptionButton = (props: MenuOptionProps): React.Node => {
110
111
  tabIndex={-1}
111
112
  disabled={menuDisabled || disabled}
112
113
  checked={isSelected()}
114
+ indeterminate={indeterminate}
113
115
  />
114
116
  )}
115
117
  {optionVariant === 'radio' && (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.3.16",
3
+ "version": "0.3.17",
4
4
  "main": "index.js",
5
5
  "description": "Sense UI components library",
6
6
  "author": {