@canonical/react-components 3.1.0 → 3.1.1

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.
@@ -270,7 +270,8 @@ const MultiSelect = _ref4 => {
270
270
  }
271
271
  },
272
272
  ref: buttonRef,
273
- id: id
273
+ id: id,
274
+ disabled: disabled
274
275
  }, /*#__PURE__*/_react.default.createElement("span", {
275
276
  className: "multi-select__condensed-text"
276
277
  }, listSelected && selectedItems.length > 0 ? selectedItemsLabel : placeholder !== null && placeholder !== void 0 ? placeholder : "Select items")),
@@ -149,4 +149,9 @@ $dropdown-max-height: 20rem;
149
149
  transform: translateY(-50%) rotate(0);
150
150
  }
151
151
  }
152
+
153
+ &[disabled],
154
+ &[disabled="disabled"] {
155
+ border-top: 0;
156
+ }
152
157
  }
@@ -7,3 +7,4 @@ export declare const CondensedExample: Story;
7
7
  export declare const SearchExample: Story;
8
8
  export declare const WithDisabledItems: Story;
9
9
  export declare const WithoutSorting: Story;
10
+ export declare const Disabled: Story;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.WithoutSorting = exports.WithDisabledItems = exports.SearchExample = exports.CondensedExample = void 0;
6
+ exports.default = exports.WithoutSorting = exports.WithDisabledItems = exports.SearchExample = exports.Disabled = exports.CondensedExample = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _MultiSelect = require("./MultiSelect");
9
9
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
@@ -108,4 +108,10 @@ const WithoutSorting = exports.WithoutSorting = {
108
108
  hasSelectedItemsFirst: false,
109
109
  id: "external-id"
110
110
  }
111
+ };
112
+ const Disabled = exports.Disabled = {
113
+ args: {
114
+ ...CondensedExample.args,
115
+ disabled: true
116
+ }
111
117
  };
@@ -263,7 +263,8 @@ export var MultiSelect = _ref4 => {
263
263
  }
264
264
  },
265
265
  ref: buttonRef,
266
- id: id
266
+ id: id,
267
+ disabled: disabled
267
268
  }, /*#__PURE__*/React.createElement("span", {
268
269
  className: "multi-select__condensed-text"
269
270
  }, listSelected && selectedItems.length > 0 ? selectedItemsLabel : placeholder !== null && placeholder !== void 0 ? placeholder : "Select items")),
@@ -149,4 +149,9 @@ $dropdown-max-height: 20rem;
149
149
  transform: translateY(-50%) rotate(0);
150
150
  }
151
151
  }
152
+
153
+ &[disabled],
154
+ &[disabled="disabled"] {
155
+ border-top: 0;
156
+ }
152
157
  }
@@ -7,3 +7,4 @@ export declare const CondensedExample: Story;
7
7
  export declare const SearchExample: Story;
8
8
  export declare const WithDisabledItems: Story;
9
9
  export declare const WithoutSorting: Story;
10
+ export declare const Disabled: Story;
@@ -103,4 +103,9 @@ export var WithoutSorting = {
103
103
  hasSelectedItemsFirst: false,
104
104
  id: "external-id"
105
105
  }
106
+ };
107
+ export var Disabled = {
108
+ args: _objectSpread(_objectSpread({}, CondensedExample.args), {}, {
109
+ disabled: true
110
+ })
106
111
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonical/react-components",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "author": {