@luscii-healthtech/web-ui 27.2.2 → 27.2.3

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.
@@ -3483,7 +3483,7 @@ const SelectDropdownIndicator = (props) => React__namespace.default.createElemen
3483
3483
 
3484
3484
  const SelectLoadingIndicator = (props) => React__namespace.default.createElement(LoadingIndicator, Object.assign({ asSpinner: true, spinnerColor: "gray" }, props.innerProps, { style: props.getStyles("loadingIndicator", props) }));
3485
3485
 
3486
- function generateCustomStyles(hasError, isIE11) {
3486
+ function generateCustomStyles(hasError) {
3487
3487
  return {
3488
3488
  option: (baseStyles, state) => {
3489
3489
  return Object.assign(Object.assign({}, baseStyles), { fontWeight: state.isSelected ? "bold" : "normal", fontSize: "14px", backgroundColor: "none", color: "inherit", position: "relative", padding: "0.75rem", opacity: state.isDisabled ? "0.5" : 1, "&:after": {
@@ -3494,34 +3494,43 @@ function generateCustomStyles(hasError, isIE11) {
3494
3494
  }, pointerEvents: state.isDisabled ? "none" : "auto" });
3495
3495
  },
3496
3496
  container: (baseStyles) => {
3497
- return Object.assign(Object.assign({}, baseStyles), { flexGrow: isIE11 ? 0.5 : "initial" });
3497
+ return Object.assign(Object.assign({}, baseStyles), { flexGrow: "initial" });
3498
3498
  },
3499
3499
  input: (baseStyles) => {
3500
- return Object.assign(Object.assign({}, baseStyles), { padding: 0 });
3500
+ return Object.assign(Object.assign({}, baseStyles), { padding: 0, margin: 0 });
3501
3501
  },
3502
3502
  multiValue: (baseStyles) => {
3503
- return Object.assign(Object.assign({}, baseStyles), { lineHeight: isIE11 ? "25px" : "1rem" });
3503
+ return Object.assign(Object.assign({}, baseStyles), { lineHeight: "1rem" });
3504
3504
  },
3505
3505
  valueContainer: (baseStyles) => {
3506
- return Object.assign(Object.assign({}, baseStyles), { padding: ".5rem" });
3506
+ return Object.assign(Object.assign({}, baseStyles), { padding: ".5rem", margin: 0 });
3507
3507
  },
3508
3508
  control: (baseStyles, state) => {
3509
- const defaultBorderColor = state.isFocused ? "#045baa" : "#D1D5DB";
3510
- const validatedBorderColor = hasError ? "#c53030" : defaultBorderColor;
3511
- const defaultOutline = hasError ? "rgba(255, 98, 102, 0.3)" : "rgba(0, 159, 227, 0.3)";
3512
- const validatedOutline = `4px solid ${state.isFocused ? defaultOutline : "transparent"}`;
3509
+ const navyBlue = "rgb(30 64 175)";
3510
+ const lightGray = "#D1D5DB";
3511
+ const red = "#c53030";
3512
+ const lightRedTransparent = "rgba(255, 98, 102, 0.3)";
3513
+ const darkBlue = "#1e40af";
3514
+ const mediumGray = "#9CA3AF";
3515
+ const lightShadow = "rgba(0, 0, 0, 0.05)";
3516
+ const defaultBorderColor = state.isFocused || state.menuIsOpen ? navyBlue : lightGray;
3517
+ const validatedBorderColor = hasError ? red : defaultBorderColor;
3518
+ const defaultOutline = hasError ? lightRedTransparent : darkBlue;
3519
+ const validatedOutline = `2px solid ${state.isFocused ? defaultOutline : "transparent"}`;
3513
3520
  return Object.assign(Object.assign({}, baseStyles), {
3514
3521
  fontSize: "14px",
3515
3522
  transition: "border 0.3s ease-in-out",
3516
3523
  // primary outline
3517
3524
  outline: validatedOutline,
3525
+ outlineOffset: "-2px",
3518
3526
  borderColor: validatedBorderColor,
3519
3527
  borderWidth: "1px !important",
3520
3528
  borderStyle: "solid",
3521
3529
  borderRadius: "4px",
3522
- boxShadow: "0px 1px 2px rgba(0, 0, 0, 0.05)",
3530
+ height: "44px",
3531
+ boxShadow: `0px 1px 2px ${lightShadow}`,
3523
3532
  "&:hover": {
3524
- borderColor: "#9CA3AF",
3533
+ borderColor: mediumGray,
3525
3534
  // selector for the chevron
3526
3535
  '> [class*="IndicatorsContainer"]': {
3527
3536
  opacity: 1
@@ -3531,9 +3540,9 @@ function generateCustomStyles(hasError, isIE11) {
3531
3540
  },
3532
3541
  // The placeholder has the following css prop: grid-area: 1/1/2/3;
3533
3542
  // And grid-area doesn't work on IE11, so we need to style it slightly different.
3534
- placeholder: (baseStyles) => Object.assign(Object.assign({}, baseStyles), { fontWeight: 100, color: "#6B7280", paddingTop: isIE11 ? "1.2rem" : void 0 }),
3543
+ placeholder: (baseStyles) => Object.assign(Object.assign({}, baseStyles), { fontWeight: 100, color: "#6B7280", margin: 0 }),
3535
3544
  singleValue: (baseStyles) => {
3536
- return Object.assign(Object.assign({}, baseStyles), { paddingTop: isIE11 ? "1.2rem" : void 0, fontSize: "14px" });
3545
+ return Object.assign(Object.assign({}, baseStyles), { fontSize: "14px" });
3537
3546
  },
3538
3547
  indicatorSeparator: () => ({
3539
3548
  display: "none"
@@ -3543,8 +3552,7 @@ function generateCustomStyles(hasError, isIE11) {
3543
3552
  }
3544
3553
  const Select = React__namespace.default.forwardRef((_a, innerRef) => {
3545
3554
  var { isError = false, styles, options, onChange, value, width = "full", isMulti, className } = _a, otherProps = __rest(_a, ["isError", "styles", "options", "onChange", "value", "width", "isMulti", "className"]);
3546
- const isIE11 = "MSInputMethodContext" in window && "documentMode" in document;
3547
- const customStyles = generateCustomStyles(isError, isIE11);
3555
+ const customStyles = generateCustomStyles(isError);
3548
3556
  const mergedStyles = ReactSelect.mergeStyles(customStyles, styles);
3549
3557
  const isOptionsGrouped = !options ? false : options.reduce((acc, o) => acc || "options" in o && !("values" in o), false);
3550
3558
  const flatmappedOptions = !options ? [] : isOptionsGrouped ? options.flatMap((g) => g.options) : options;