cloudmr-ux 4.1.4 → 4.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.
@@ -14,14 +14,18 @@ import { jsx as _jsx } from "react/jsx-runtime";
14
14
  import { useEffect, useId, useMemo, useState } from 'react';
15
15
  import ReactSelect from 'react-select';
16
16
  import './CmrSelect.css';
17
- var createStyles = function (primaryColor) { return ({
18
- control: function (base, state) { return (__assign(__assign({}, base), { minHeight: 40, borderColor: state.isFocused ? primaryColor : base.borderColor, boxShadow: state.isFocused ? "0 0 0 1px ".concat(primaryColor) : 'none', '&:hover': { borderColor: primaryColor }, fontFamily: 'Inter, Roboto, Helvetica, Arial, sans-serif', borderRadius: 4 })); },
19
- placeholder: function (base) { return (__assign(__assign({}, base), { color: 'rgba(0,0,0,0.6)' })); },
20
- singleValue: function (base) { return (__assign(__assign({}, base), { color: primaryColor, fontWeight: 400, fontFamily: 'Inter, Roboto, Helvetica, Arial, sans-serif' })); },
21
- option: function (base, state) { return (__assign(__assign({}, base), { backgroundColor: state.isFocused || state.isSelected ? '#F3E5F5' : 'white', color: '#000', fontFamily: 'Inter, Roboto, Helvetica, Arial, sans-serif', cursor: state.isDisabled ? 'not-allowed' : 'pointer' })); },
22
- menuPortal: function (base) { return (__assign(__assign({}, base), { zIndex: 2000 })); },
23
- menu: function (base) { return (__assign(__assign({}, base), { zIndex: 1300 })); }
24
- }); };
17
+ var createStyles = function (primaryColor) {
18
+ var optionHighlight = primaryColor === "#580F8B"
19
+ ? "#F3E5F5"
20
+ : "".concat(primaryColor, "20"); // soft tint derived from primary
21
+ return {
22
+ control: function (base, state) { return (__assign(__assign({}, base), { minHeight: 40, borderColor: primaryColor, boxShadow: state.isFocused ? "0 0 0 1px ".concat(primaryColor) : "none", "&:hover": { borderColor: primaryColor }, fontFamily: "Inter, Roboto, Helvetica, Arial, sans-serif", borderRadius: 4 })); },
23
+ singleValue: function (base) { return (__assign(__assign({}, base), { color: primaryColor, fontWeight: 400, fontFamily: "Inter, Roboto, Helvetica, Arial, sans-serif" })); },
24
+ option: function (base, state) { return (__assign(__assign({}, base), { backgroundColor: state.isFocused || state.isSelected ? optionHighlight : "white", color: "#000", fontFamily: "Inter, Roboto, Helvetica, Arial, sans-serif", cursor: state.isDisabled ? "not-allowed" : "pointer" })); },
25
+ menuPortal: function (base) { return (__assign(__assign({}, base), { zIndex: 2000 })); },
26
+ menu: function (base) { return (__assign(__assign({}, base), { zIndex: 1300 })); }
27
+ };
28
+ };
25
29
  var CmrSelect = function (_a) {
26
30
  var options = _a.options, disabled = _a.disabled, value = _a.value, onChange = _a.onChange, _b = _a.defaultValue, defaultValue = _b === void 0 ? '' : _b, fullWidth = _a.fullWidth, sx = _a.sx, className = _a.className, _c = _a.primaryColor, primaryColor = _c === void 0 ? '#580F8B' : _c;
27
31
  var isControlled = value !== undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudmr-ux",
3
- "version": "4.1.4",
3
+ "version": "4.1.5",
4
4
  "author": "erosmontin@gmail.com",
5
5
  "license": "MIT",
6
6
  "repository": "erosmontin/cloudmr-ux",