@stella-source/stellasource-dsl 1.3.2 → 1.4.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/cjs/index.js CHANGED
@@ -17195,8 +17195,8 @@ const TextFieldWrapper = styled.div.attrs({
17195
17195
  border: 1px solid ${Styles.color.grey.medium};
17196
17196
  border-radius: 6px;
17197
17197
  overflow: hidden;
17198
- margin-top: 6px;
17199
- background-color: ${({ $isDisabled }) => $isDisabled ? Styles.color.grey.pale : "transparent"};
17198
+ margin-top: 3px;
17199
+ background-color: ${({ $isDisabled }) => $isDisabled ? Styles.color.grey.pale : "white"};
17200
17200
  outline: ${({ $hasError }) => $hasError && `${Styles.color.states.error} auto 1px`};
17201
17201
  cursor: ${({ $isDisabled, $isLoading }) => {
17202
17202
  if ($isDisabled)
@@ -17331,7 +17331,13 @@ const PasswordInput = ({ id, className, htmlProps, label, placeholder = "Enter P
17331
17331
  const formatDynamicNumbersWithCommas = (num, decimalPlaces) => {
17332
17332
  const onlyDigitNum = num.toString().replace(/[^\d.-]/g, "");
17333
17333
  const decimalEnding = onlyDigitNum.endsWith(".");
17334
- const decimalZero = onlyDigitNum.includes(".") && onlyDigitNum.endsWith("0");
17334
+ const zeroEnding = onlyDigitNum.includes(".") && onlyDigitNum.endsWith("0");
17335
+ let decimalTrailingZeros = "";
17336
+ if (zeroEnding) {
17337
+ const match = onlyDigitNum.match(/0+$/);
17338
+ decimalTrailingZeros = match ? match[0] : "";
17339
+ }
17340
+ const decimalZero = onlyDigitNum.endsWith(`.${decimalTrailingZeros.length > 0 ? decimalTrailingZeros : "0"}`);
17335
17341
  if (onlyDigitNum === "" || onlyDigitNum === "-" || onlyDigitNum === ".") {
17336
17342
  return onlyDigitNum;
17337
17343
  }
@@ -17342,7 +17348,7 @@ const formatDynamicNumbersWithCommas = (num, decimalPlaces) => {
17342
17348
  ? `${Number(onlyDigitNum).toLocaleString("en-US", {
17343
17349
  minimumFractionDigits: 0,
17344
17350
  maximumFractionDigits: decimalPlaces,
17345
- })}${decimalEnding ? "." : ""}${decimalZero ? "0" : ""}`
17351
+ })}${decimalEnding ? "." : ""}${decimalZero ? "." : ""}${zeroEnding ? `${decimalTrailingZeros}` : ""}`
17346
17352
  : "";
17347
17353
  };
17348
17354