@worknice/whiteboard 0.10.10-rc.1 → 0.10.10-rc.2

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.
@@ -49,11 +49,12 @@ const SelectInput = ({ autoFocus = false, disabled = false, id, onChange, option
49
49
  listNav,
50
50
  typeahead
51
51
  ]);
52
+ const hasOptions = options.length > 0;
52
53
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
53
54
  children: [
54
55
  /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("button", {
55
56
  autoFocus: autoFocus,
56
- disabled: disabled,
57
+ disabled: disabled || !hasOptions,
57
58
  className: __WEBPACK_EXTERNAL_MODULE__SelectInput_module_js_3ac344a1__["default"].toggleButton,
58
59
  tabIndex: 0,
59
60
  type: "button",
@@ -62,7 +63,7 @@ const SelectInput = ({ autoFocus = false, disabled = false, id, onChange, option
62
63
  id: id
63
64
  }),
64
65
  children: [
65
- optionToLabel(value),
66
+ hasOptions ? optionToLabel(value) : "No options available",
66
67
  /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
67
68
  className: __WEBPACK_EXTERNAL_MODULE__SelectInput_module_js_3ac344a1__["default"].toggleButtonActions,
68
69
  children: isOpen ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__presentation_Icon_js_6961aa57__["default"], {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@worknice/whiteboard",
3
3
  "description": "",
4
- "version": "0.10.10-rc.1",
4
+ "version": "0.10.10-rc.2",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "files": [
@@ -38,7 +38,7 @@
38
38
  "react-markdown": "^10.1.0",
39
39
  "utf8": "^3.0.0",
40
40
  "zod": "^3.22.3",
41
- "@worknice/utils": "^0.6.9-rc.1"
41
+ "@worknice/utils": "^0.6.9-rc.2"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@anolilab/semantic-release-pnpm": "^1.1.10",