@stella-source/stellasource-dsl 3.1.1 → 3.1.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.
@@ -69,7 +69,4 @@
69
69
  border: none;
70
70
  padding: 0;
71
71
  outline: none;
72
- display: flex;
73
- justify-content: center;
74
- align-items: center;
75
72
  }
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { NumberInputProps } from "./types";
3
- declare const NumberInput: ({ id, className, htmlProps, leftCategory, rightCategory, label, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, endIcon, placeholder, textAlign, isTruncated, helperTextAffectLayout, hideLabel, disabled, isLoading, hasError, thousandSeparator, decimalPlaces, allowNegativeNumbers, ariaDescribedBy, disableAutocomplete, }: NumberInputProps) => React.JSX.Element;
3
+ declare const NumberInput: ({ id, className, htmlProps, leftCategory, rightCategory, label, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, endIcon, placeholder, textAlign, isTruncated, helperTextAffectLayout, hideLabel, disabled, isLoading, hasError, thousandSeparator, decimalPlaces, allowNegativeNumbers, ariaDescribedBy, enableAutocomplete, }: NumberInputProps) => React.JSX.Element;
4
4
  export default NumberInput;
@@ -28,7 +28,7 @@ export interface NumberInputProps {
28
28
  thousandSeparator?: boolean;
29
29
  decimalPlaces?: number;
30
30
  allowNegativeNumbers?: boolean;
31
- disableAutocomplete?: boolean;
31
+ enableAutocomplete?: boolean;
32
32
  /** for any extra text elements that need to be associated */
33
33
  ariaDescribedBy?: string;
34
34
  htmlProps?: HTMLAttributes<HTMLInputElement>;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { PasswordInputProps } from "./types";
3
- declare const PasswordInput: ({ id, className, htmlProps, label, placeholder, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, textAlign, isHidden, helperTextAffectLayout, hideLabel, disabled, hasError, ariaDescribedBy, disableAutocomplete, }: PasswordInputProps) => React.JSX.Element;
3
+ declare const PasswordInput: ({ id, className, htmlProps, label, placeholder, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, textAlign, isHidden, helperTextAffectLayout, hideLabel, disabled, hasError, ariaDescribedBy, enableAutocomplete, }: PasswordInputProps) => React.JSX.Element;
4
4
  export default PasswordInput;
@@ -11,7 +11,7 @@ export interface PasswordInputProps {
11
11
  className?: string;
12
12
  placeholder?: string;
13
13
  isRequired?: boolean;
14
- disableAutocomplete?: boolean;
14
+ enableAutocomplete?: boolean;
15
15
  /** passing in disabled + value creates a readOnly look */
16
16
  disabled?: boolean;
17
17
  maxLength?: number;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { TextInputProps } from "./types";
3
- declare const TextInput: ({ id, className, htmlProps, label, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, endIcon, placeholder, textAlign, helperTextAffectLayout, hideLabel, disabled, hasError, isLoading, ariaDescribedBy, disableAutocomplete, }: TextInputProps) => React.JSX.Element;
3
+ declare const TextInput: ({ id, className, htmlProps, label, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, endIcon, placeholder, textAlign, helperTextAffectLayout, hideLabel, disabled, hasError, isLoading, ariaDescribedBy, enableAutocomplete, }: TextInputProps) => React.JSX.Element;
4
4
  export default TextInput;
@@ -14,7 +14,7 @@ export interface TextInputProps {
14
14
  placeholder?: string;
15
15
  isRequired?: boolean;
16
16
  endIcon?: `${StellaIconDefinition}`;
17
- disableAutocomplete?: boolean;
17
+ enableAutocomplete?: boolean;
18
18
  /** passing in disabled + value creates a readOnly look */
19
19
  disabled?: boolean;
20
20
  maxLength?: number;
@@ -17044,6 +17044,7 @@ const RequiredIcon = styled(StellaIcon) `
17044
17044
  `;
17045
17045
  const ToolTipIcon = styled(Tooltip) `
17046
17046
  margin-left: 2px;
17047
+ margin-top: 2px;
17047
17048
  `;
17048
17049
  const LabelComponent = styled.label `
17049
17050
  font-family: "Inter", sans-serif;
@@ -17391,7 +17392,7 @@ const TextFieldContainer = ({ id, label, children, tooltipText, endIcon, classNa
17391
17392
  helperText && (a__default.createElement(HelperText, { id: `${id}-helper-text`, text: helperText, affectLayout: helperTextAffectLayout, type: hasError ? "error" : "info" }))));
17392
17393
  };
17393
17394
 
17394
- const TextInput = ({ id, className, htmlProps, label, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, endIcon, placeholder = "", textAlign = "left", helperTextAffectLayout = true, hideLabel = false, disabled = false, hasError = false, isLoading = false, ariaDescribedBy, disableAutocomplete, }) => {
17395
+ const TextInput = ({ id, className, htmlProps, label, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, endIcon, placeholder = "", textAlign = "left", helperTextAffectLayout = true, hideLabel = false, disabled = false, hasError = false, isLoading = false, ariaDescribedBy, enableAutocomplete = false, }) => {
17395
17396
  const containerProps = {
17396
17397
  id,
17397
17398
  label,
@@ -17416,14 +17417,14 @@ const TextInput = ({ id, className, htmlProps, label, onChange, onBlur, onFocus,
17416
17417
  onChange(value);
17417
17418
  };
17418
17419
  return (a__default.createElement(TextFieldContainer, { ...containerProps },
17419
- a__default.createElement(TextFieldInput, { autoComplete: disableAutocomplete ? "off" : "on", "aria-describedby": `${id}-helper-text ${ariaDescribedBy}`, type: "text", id: `${id}-text-field`, disabled: disabled, placeholder: placeholder, onChange: handleChange, onBlur: (e) => onBlur?.(e.target.value), onFocus: (e) => onFocus?.(e.target.value), value: valueToUse, maxLength: maxLength, "$textAlign": textAlign, "$isDisabled": disabled, "$isLoading": isLoading, ...htmlProps })));
17420
+ a__default.createElement(TextFieldInput, { autoComplete: enableAutocomplete ? "on" : "off", "aria-describedby": `${id}-helper-text ${ariaDescribedBy}`, type: "text", id: `${id}-text-field`, disabled: disabled, placeholder: placeholder, onChange: handleChange, onBlur: (e) => onBlur?.(e.target.value), onFocus: (e) => onFocus?.(e.target.value), value: valueToUse, maxLength: maxLength, "$textAlign": textAlign, "$isDisabled": disabled, "$isLoading": isLoading, ...htmlProps })));
17420
17421
  };
17421
17422
 
17422
17423
  const CustomIconButton$2 = styled(IconButton) `
17423
17424
  margin-right: 2px;
17424
17425
  `;
17425
17426
 
17426
- const PasswordInput = ({ id, className, htmlProps, label, placeholder = "Enter Password", onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, textAlign = "left", isHidden = true, helperTextAffectLayout = true, hideLabel = false, disabled = false, hasError = false, ariaDescribedBy, disableAutocomplete, }) => {
17427
+ const PasswordInput = ({ id, className, htmlProps, label, placeholder = "Enter Password", onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, textAlign = "left", isHidden = true, helperTextAffectLayout = true, hideLabel = false, disabled = false, hasError = false, ariaDescribedBy, enableAutocomplete = false, }) => {
17427
17428
  const containerProps = {
17428
17429
  id,
17429
17430
  label,
@@ -17447,7 +17448,7 @@ const PasswordInput = ({ id, className, htmlProps, label, placeholder = "Enter P
17447
17448
  onChange(value);
17448
17449
  };
17449
17450
  return (a__default.createElement(TextFieldContainer, { ...containerProps },
17450
- a__default.createElement(TextFieldInput, { autoComplete: disableAutocomplete ? "off" : "on", "aria-describedby": `${id}-helper-text ${ariaDescribedBy}`, type: show ? "text" : "password", id: `${id}-text-field`, disabled: disabled, placeholder: placeholder, onChange: handleChange, onBlur: (e) => onBlur?.(e.target.value), onFocus: (e) => onFocus?.(e.target.value), value: valueToUse, maxLength: maxLength, "$textAlign": textAlign, "$isDisabled": disabled, ...htmlProps }),
17451
+ a__default.createElement(TextFieldInput, { autoComplete: enableAutocomplete ? "on" : "off", "aria-describedby": `${id}-helper-text ${ariaDescribedBy}`, type: show ? "text" : "password", id: `${id}-text-field`, disabled: disabled, placeholder: placeholder, onChange: handleChange, onBlur: (e) => onBlur?.(e.target.value), onFocus: (e) => onFocus?.(e.target.value), value: valueToUse, maxLength: maxLength, "$textAlign": textAlign, "$isDisabled": disabled, ...htmlProps }),
17451
17452
  a__default.createElement(CustomIconButton$2, { variant: "tertiary", iconName: show ? "eye" : "eye-slash", ariaLabel: show ? "Hide" : "Show", onClick: () => setShow(!show), disabled: disabled })));
17452
17453
  };
17453
17454
 
@@ -17475,7 +17476,7 @@ const formatDynamicNumbersWithCommas = (num, decimalPlaces) => {
17475
17476
  : "";
17476
17477
  };
17477
17478
 
17478
- const NumberInput = ({ id, className, htmlProps, leftCategory, rightCategory, label, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, endIcon, placeholder = "0", textAlign = "left", isTruncated = false, helperTextAffectLayout = true, hideLabel = false, disabled = false, isLoading = false, hasError = false, thousandSeparator = true, decimalPlaces = 0, allowNegativeNumbers = false, ariaDescribedBy, disableAutocomplete, }) => {
17479
+ const NumberInput = ({ id, className, htmlProps, leftCategory, rightCategory, label, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, endIcon, placeholder = "0", textAlign = "left", isTruncated = false, helperTextAffectLayout = true, hideLabel = false, disabled = false, isLoading = false, hasError = false, thousandSeparator = true, decimalPlaces = 0, allowNegativeNumbers = false, ariaDescribedBy, enableAutocomplete = false, }) => {
17479
17480
  const containerProps = {
17480
17481
  id,
17481
17482
  label,
@@ -17525,7 +17526,7 @@ const NumberInput = ({ id, className, htmlProps, leftCategory, rightCategory, la
17525
17526
  !onFocus && setPlaceholderText("");
17526
17527
  };
17527
17528
  return (a__default.createElement(TextFieldContainer, { ...containerProps },
17528
- a__default.createElement(TextFieldInput, { autoComplete: disableAutocomplete ? "off" : "on", "aria-describedby": `${id}-helper-text ${ariaDescribedBy}`, type: "text", inputMode: "numeric",
17529
+ a__default.createElement(TextFieldInput, { autoComplete: enableAutocomplete ? "on" : "off", "aria-describedby": `${id}-helper-text ${ariaDescribedBy}`, type: "text", inputMode: "numeric",
17529
17530
  // prettier-ignore
17530
17531
  pattern: allowNegativeNumbers ? "^[\\d,\\.\\-]*$" : "^[\\d,\\.]*$", id: `${id}-text-field`, disabled: disabled || isLoading, placeholder: placeholderText, onChange: handleChange, onBlur: handleBlur, onFocus: handleFocus, onKeyDown: handleKeyDown, value: thousandSeparator
17531
17532
  ? formatDynamicNumbersWithCommas(valueToUse, decimalPlaces)