@moda/om 19.8.0 → 19.8.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.
package/dist/index.esm.js CHANGED
@@ -10743,7 +10743,7 @@ var useSelect = function useSelect(_ref) {
10743
10743
  };
10744
10744
  };
10745
10745
 
10746
- var _excluded$j = ["allowAutoFill", "autoSelect", "className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "label", "name", "onChange", "options", "placeholder", "searchable", "shiftIconLeftwards", "value", "dataTestId"];
10746
+ var _excluded$j = ["allowAutoFill", "autoSelect", "className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "label", "name", "onChange", "options", "placeholder", "searchable", "shiftIconLeftwards", "value", "dataTestId", "colorSwatch"];
10747
10747
  var Select = function Select(_ref) {
10748
10748
  var _ref2;
10749
10749
  var _ref$allowAutoFill = _ref.allowAutoFill,
@@ -10768,6 +10768,7 @@ var Select = function Select(_ref) {
10768
10768
  shiftIconLeftwards = _ref$shiftIconLeftwar === void 0 ? false : _ref$shiftIconLeftwar,
10769
10769
  value = _ref.value,
10770
10770
  dataTestId = _ref.dataTestId,
10771
+ colorSwatch = _ref.colorSwatch,
10771
10772
  rest = _objectWithoutProperties(_ref, _excluded$j);
10772
10773
  var _useSelect = useSelect({
10773
10774
  value: value,
@@ -10844,7 +10845,12 @@ var Select = function Select(_ref) {
10844
10845
  idRef: idRef,
10845
10846
  label: label || (selected === undefined ? placeholder : undefined),
10846
10847
  hasValue: focused != null || selected != null
10847
- }), (_ref2 = focused !== null && focused !== void 0 ? focused : selected) === null || _ref2 === void 0 ? void 0 : _ref2.label, /*#__PURE__*/React__default.createElement("span", {
10848
+ }), (_ref2 = focused !== null && focused !== void 0 ? focused : selected) === null || _ref2 === void 0 ? void 0 : _ref2.label, colorSwatch && /*#__PURE__*/React__default.createElement("div", {
10849
+ className: "Select__selected-color",
10850
+ style: {
10851
+ backgroundColor: distExports$4.colors.all[colorSwatch]
10852
+ }
10853
+ }), /*#__PURE__*/React__default.createElement("span", {
10848
10854
  className: classNames('Select__icon', {
10849
10855
  'Select__icon--shifted': shiftIconLeftwards
10850
10856
  })