@stella-source/stellasource-dsl 3.1.0 → 3.1.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.
@@ -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, }: 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, disableAutocomplete, }: NumberInputProps) => React.JSX.Element;
4
4
  export default NumberInput;
@@ -28,6 +28,7 @@ export interface NumberInputProps {
28
28
  thousandSeparator?: boolean;
29
29
  decimalPlaces?: number;
30
30
  allowNegativeNumbers?: boolean;
31
+ disableAutocomplete?: boolean;
31
32
  /** for any extra text elements that need to be associated */
32
33
  ariaDescribedBy?: string;
33
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, }: 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, disableAutocomplete, }: PasswordInputProps) => React.JSX.Element;
4
4
  export default PasswordInput;
@@ -11,6 +11,7 @@ export interface PasswordInputProps {
11
11
  className?: string;
12
12
  placeholder?: string;
13
13
  isRequired?: boolean;
14
+ disableAutocomplete?: boolean;
14
15
  /** passing in disabled + value creates a readOnly look */
15
16
  disabled?: boolean;
16
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, }: 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, disableAutocomplete, }: TextInputProps) => React.JSX.Element;
4
4
  export default TextInput;
@@ -14,6 +14,7 @@ export interface TextInputProps {
14
14
  placeholder?: string;
15
15
  isRequired?: boolean;
16
16
  endIcon?: `${StellaIconDefinition}`;
17
+ disableAutocomplete?: boolean;
17
18
  /** passing in disabled + value creates a readOnly look */
18
19
  disabled?: boolean;
19
20
  maxLength?: number;
@@ -17391,7 +17391,7 @@ const TextFieldContainer = ({ id, label, children, tooltipText, endIcon, classNa
17391
17391
  helperText && (a__default.createElement(HelperText, { id: `${id}-helper-text`, text: helperText, affectLayout: helperTextAffectLayout, type: hasError ? "error" : "info" }))));
17392
17392
  };
17393
17393
 
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, }) => {
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
17395
  const containerProps = {
17396
17396
  id,
17397
17397
  label,
@@ -17416,14 +17416,14 @@ const TextInput = ({ id, className, htmlProps, label, onChange, onBlur, onFocus,
17416
17416
  onChange(value);
17417
17417
  };
17418
17418
  return (a__default.createElement(TextFieldContainer, { ...containerProps },
17419
- a__default.createElement(TextFieldInput, { "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 })));
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
17420
  };
17421
17421
 
17422
17422
  const CustomIconButton$2 = styled(IconButton) `
17423
17423
  margin-right: 2px;
17424
17424
  `;
17425
17425
 
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, }) => {
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
17427
  const containerProps = {
17428
17428
  id,
17429
17429
  label,
@@ -17447,7 +17447,7 @@ const PasswordInput = ({ id, className, htmlProps, label, placeholder = "Enter P
17447
17447
  onChange(value);
17448
17448
  };
17449
17449
  return (a__default.createElement(TextFieldContainer, { ...containerProps },
17450
- a__default.createElement(TextFieldInput, { "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 }),
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
17451
  a__default.createElement(CustomIconButton$2, { variant: "tertiary", iconName: show ? "eye" : "eye-slash", ariaLabel: show ? "Hide" : "Show", onClick: () => setShow(!show), disabled: disabled })));
17452
17452
  };
17453
17453
 
@@ -17475,7 +17475,7 @@ const formatDynamicNumbersWithCommas = (num, decimalPlaces) => {
17475
17475
  : "";
17476
17476
  };
17477
17477
 
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, }) => {
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
17479
  const containerProps = {
17480
17480
  id,
17481
17481
  label,
@@ -17525,7 +17525,7 @@ const NumberInput = ({ id, className, htmlProps, leftCategory, rightCategory, la
17525
17525
  !onFocus && setPlaceholderText("");
17526
17526
  };
17527
17527
  return (a__default.createElement(TextFieldContainer, { ...containerProps },
17528
- a__default.createElement(TextFieldInput, { "aria-describedby": `${id}-helper-text ${ariaDescribedBy}`, type: "text", inputMode: "numeric",
17528
+ a__default.createElement(TextFieldInput, { autoComplete: disableAutocomplete ? "off" : "on", "aria-describedby": `${id}-helper-text ${ariaDescribedBy}`, type: "text", inputMode: "numeric",
17529
17529
  // prettier-ignore
17530
17530
  pattern: allowNegativeNumbers ? "^[\\d,\\.\\-]*$" : "^[\\d,\\.]*$", id: `${id}-text-field`, disabled: disabled || isLoading, placeholder: placeholderText, onChange: handleChange, onBlur: handleBlur, onFocus: handleFocus, onKeyDown: handleKeyDown, value: thousandSeparator
17531
17531
  ? formatDynamicNumbersWithCommas(valueToUse, decimalPlaces)
@@ -22320,7 +22320,7 @@ const getOrderStatusLabel = (variant, isPurchaser) => {
22320
22320
  case OrderStatusVariant.VIEW_PRICING:
22321
22321
  return isPurchaser ? "View Quote" : "Quoted";
22322
22322
  case OrderStatusVariant.ACTION_REQUIRED:
22323
- return isPurchaser ? "Prices Pending" : "Boundry Hit";
22323
+ return isPurchaser ? "Prices Pending" : "Action Required";
22324
22324
  case OrderStatusVariant.ORDER_PLACED:
22325
22325
  return "Awaiting Acknowledgement";
22326
22326
  case OrderStatusVariant.DECLINED: