@invoicebox/ui 0.1.0-alpha.262 → 0.1.0-alpha.264

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.
@@ -1,4 +1,9 @@
1
- export declare const selectOptions: {
1
+ export declare const selectOptions: ({
2
2
  label: string;
3
3
  value: string;
4
- }[];
4
+ isDisabled?: undefined;
5
+ } | {
6
+ label: string;
7
+ value: string;
8
+ isDisabled: boolean;
9
+ })[];
@@ -12,10 +12,12 @@ var selectOptions = exports.selectOptions = [{
12
12
  value: 'option-2'
13
13
  }, {
14
14
  label: 'Option 3',
15
- value: 'option-3'
15
+ value: 'option-3',
16
+ isDisabled: true
16
17
  }, {
17
18
  label: 'Option 4',
18
- value: 'option-4'
19
+ value: 'option-4',
20
+ isDisabled: true
19
21
  }, {
20
22
  label: 'Option 5',
21
23
  value: 'option-5'
@@ -3,6 +3,7 @@ import { TSizes } from '../../../constants';
3
3
  type TOption = {
4
4
  value: string;
5
5
  entity?: any;
6
+ isDisabled?: boolean;
6
7
  };
7
8
  type TFieldProps = Pick<InputHTMLAttributes<HTMLInputElement>, 'name' | 'onBlur' | 'onFocus' | 'autoFocus' | 'readOnly'> & {
8
9
  value: string;
@@ -139,6 +139,7 @@ var Autocomplete = exports.Autocomplete = /*#__PURE__*/(0, _react.forwardRef)(fu
139
139
  key: "".concat(option.value).concat(index),
140
140
  tabIndex: -1,
141
141
  type: "button",
142
+ disabled: option.isDisabled,
142
143
  onClick: handleSelect,
143
144
  "data-index": JSON.stringify(index)
144
145
  }, renderOption ? renderOption(option) : /*#__PURE__*/_react["default"].createElement(_AutocompleteDefaultOption.AutocompleteDefaultOption, {
@@ -30,7 +30,7 @@ var OptionWrapperWithPadding = exports.OptionWrapperWithPadding = _styledCompone
30
30
  var OptionWrapper = exports.OptionWrapper = _styledComponents["default"].button.withConfig({
31
31
  displayName: "styles__OptionWrapper",
32
32
  componentId: "sc-1fp3ia8-3"
33
- })(["width:100%;background:transparent;border:none;cursor:pointer;outline:none;color:inherit;padding:0;"]);
33
+ })(["width:100%;background:transparent;border:none;cursor:pointer;outline:none;color:inherit;padding:0;&:disabled{opacity:0.7;cursor:not-allowed;}"]);
34
34
  var ChildrenWrapper = exports.ChildrenWrapper = _styledComponents["default"].div.withConfig({
35
35
  displayName: "styles__ChildrenWrapper",
36
36
  componentId: "sc-1fp3ia8-4"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@invoicebox/ui",
3
- "version": "0.1.0-alpha.262",
3
+ "version": "0.1.0-alpha.264",
4
4
  "description": "Invoicebox UI",
5
5
  "license": "Apache License 2.0",
6
6
  "scripts": {