@appcorp/app-corp-vista 0.1.4 → 0.1.5

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.
@@ -39,13 +39,13 @@ var react_1 = __importStar(require("react"));
39
39
  var react_2 = require("@headlessui/react");
40
40
  var solid_1 = require("@heroicons/react/20/solid");
41
41
  var VistaComboboxV1 = function (_a) {
42
- var checkClassName = _a.checkClassName, comboboxButtonClassName = _a.comboboxButtonClassName, comboboxClassName = _a.comboboxClassName, comboboxInputClassName = _a.comboboxInputClassName, comboboxOptionClassName = _a.comboboxOptionClassName, comboboxOptionsClassName = _a.comboboxOptionsClassName, error = _a.error, handleInputOnChange = _a.handleInputOnChange, handleOnBlur = _a.handleOnBlur, handleOnChange = _a.handleOnChange, inputIconClassName = _a.inputIconClassName, label = _a.label, labelClassName = _a.labelClassName, listItems = _a.listItems, nodeQueryKey = _a.nodeQueryKey, nodeSelectKey = _a.nodeSelectKey, placeholder = _a.placeholder, query = _a.query, _b = _a.required, required = _b === void 0 ? false : _b, selectKey1 = _a.selectKey1, selectedItem = _a.selectedItem;
42
+ var checkClassName = _a.checkClassName, comboboxButtonClassName = _a.comboboxButtonClassName, comboboxClassName = _a.comboboxClassName, comboboxInputClassName = _a.comboboxInputClassName, comboboxOptionClassName = _a.comboboxOptionClassName, comboboxOptionsClassName = _a.comboboxOptionsClassName, _b = _a.disabled, disabled = _b === void 0 ? false : _b, error = _a.error, handleInputOnChange = _a.handleInputOnChange, handleOnBlur = _a.handleOnBlur, handleOnChange = _a.handleOnChange, inputIconClassName = _a.inputIconClassName, label = _a.label, labelClassName = _a.labelClassName, listItems = _a.listItems, nodeQueryKey = _a.nodeQueryKey, nodeSelectKey = _a.nodeSelectKey, placeholder = _a.placeholder, query = _a.query, _c = _a.required, required = _c === void 0 ? false : _c, selectKey1 = _a.selectKey1, selectedItem = _a.selectedItem;
43
43
  var filteredList = (0, react_1.useMemo)(function () {
44
44
  return query === ''
45
45
  ? listItems
46
46
  : listItems.filter(function (item) { var _a; return (_a = item[selectKey1]) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(query.toLowerCase()); });
47
47
  }, [listItems, query, selectKey1]);
48
- return (react_1.default.createElement(react_2.Combobox, { as: "div", className: "".concat(comboboxClassName), onChange: function (v) { return handleOnChange(nodeSelectKey, v); }, value: selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem[selectKey1] },
48
+ return (react_1.default.createElement(react_2.Combobox, { as: "div", className: "".concat(comboboxClassName), onChange: function (v) { return handleOnChange(nodeSelectKey, v); }, value: selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem[selectKey1], disabled: disabled },
49
49
  react_1.default.createElement(react_2.Label, { className: "block text-sm/6 font-medium text-gray-900 dark:text-white ".concat(labelClassName) },
50
50
  label,
51
51
  " ",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/app-corp-vista",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "scripts": {
5
5
  "build": "yarn clean && yarn build:ts && cp package.json lib && cp README.md lib",
6
6
  "build:next": "next build",
@@ -5,6 +5,7 @@ export interface VistaComboboxV1Props {
5
5
  comboboxInputClassName?: string;
6
6
  comboboxOptionClassName?: string;
7
7
  comboboxOptionsClassName?: string;
8
+ disabled?: boolean;
8
9
  error?: string;
9
10
  handleInputOnChange: (k: string, v: string) => void;
10
11
  handleOnBlur: (k: string, v: string) => void;