@moda/om 19.8.0 → 19.8.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.
package/dist/index.cjs.js CHANGED
@@ -10763,7 +10763,7 @@ var useSelect = function useSelect(_ref) {
10763
10763
  };
10764
10764
  };
10765
10765
 
10766
- var _excluded$j = ["allowAutoFill", "autoSelect", "className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "label", "name", "onChange", "options", "placeholder", "searchable", "shiftIconLeftwards", "value", "dataTestId"];
10766
+ var _excluded$j = ["allowAutoFill", "autoSelect", "className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "label", "name", "onChange", "options", "placeholder", "searchable", "shiftIconLeftwards", "value", "dataTestId", "colorSwatch"];
10767
10767
  var Select = function Select(_ref) {
10768
10768
  var _ref2;
10769
10769
  var _ref$allowAutoFill = _ref.allowAutoFill,
@@ -10788,6 +10788,7 @@ var Select = function Select(_ref) {
10788
10788
  shiftIconLeftwards = _ref$shiftIconLeftwar === void 0 ? false : _ref$shiftIconLeftwar,
10789
10789
  value = _ref.value,
10790
10790
  dataTestId = _ref.dataTestId,
10791
+ colorSwatch = _ref.colorSwatch,
10791
10792
  rest = _objectWithoutProperties(_ref, _excluded$j);
10792
10793
  var _useSelect = useSelect({
10793
10794
  value: value,
@@ -10864,7 +10865,12 @@ var Select = function Select(_ref) {
10864
10865
  idRef: idRef,
10865
10866
  label: label || (selected === undefined ? placeholder : undefined),
10866
10867
  hasValue: focused != null || selected != null
10867
- }), (_ref2 = focused !== null && focused !== void 0 ? focused : selected) === null || _ref2 === void 0 ? void 0 : _ref2.label, /*#__PURE__*/React.createElement("span", {
10868
+ }), (_ref2 = focused !== null && focused !== void 0 ? focused : selected) === null || _ref2 === void 0 ? void 0 : _ref2.label, colorSwatch && /*#__PURE__*/React.createElement("div", {
10869
+ className: "Select__selected-color",
10870
+ style: {
10871
+ backgroundColor: distExports$4.colors.all[colorSwatch]
10872
+ }
10873
+ }), /*#__PURE__*/React.createElement("span", {
10868
10874
  className: classNames('Select__icon', {
10869
10875
  'Select__icon--shifted': shiftIconLeftwards
10870
10876
  })