@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.
- package/dist/cjs/index.js +7 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/styles.css +0 -3
- package/dist/cjs/types/components/TextField/NumberInput/NumberInput.d.ts +1 -1
- package/dist/cjs/types/components/TextField/NumberInput/types.d.ts +1 -1
- package/dist/cjs/types/components/TextField/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/cjs/types/components/TextField/PasswordInput/types.d.ts +1 -1
- package/dist/cjs/types/components/TextField/TextInput/TextInput.d.ts +1 -1
- package/dist/cjs/types/components/TextField/TextInput/types.d.ts +1 -1
- package/dist/esm/index.esm.js +7 -6
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/esm/styles.css +0 -3
- package/dist/esm/types/components/TextField/NumberInput/NumberInput.d.ts +1 -1
- package/dist/esm/types/components/TextField/NumberInput/types.d.ts +1 -1
- package/dist/esm/types/components/TextField/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/esm/types/components/TextField/PasswordInput/types.d.ts +1 -1
- package/dist/esm/types/components/TextField/TextInput/TextInput.d.ts +1 -1
- package/dist/esm/types/components/TextField/TextInput/types.d.ts +1 -1
- package/dist/index.d.ts +6 -6
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -17064,6 +17064,7 @@ const RequiredIcon = styled(StellaIcon) `
|
|
|
17064
17064
|
`;
|
|
17065
17065
|
const ToolTipIcon = styled(Tooltip) `
|
|
17066
17066
|
margin-left: 2px;
|
|
17067
|
+
margin-top: 2px;
|
|
17067
17068
|
`;
|
|
17068
17069
|
const LabelComponent = styled.label `
|
|
17069
17070
|
font-family: "Inter", sans-serif;
|
|
@@ -17411,7 +17412,7 @@ const TextFieldContainer = ({ id, label, children, tooltipText, endIcon, classNa
|
|
|
17411
17412
|
helperText && (a$m.createElement(HelperText, { id: `${id}-helper-text`, text: helperText, affectLayout: helperTextAffectLayout, type: hasError ? "error" : "info" }))));
|
|
17412
17413
|
};
|
|
17413
17414
|
|
|
17414
|
-
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,
|
|
17415
|
+
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, }) => {
|
|
17415
17416
|
const containerProps = {
|
|
17416
17417
|
id,
|
|
17417
17418
|
label,
|
|
@@ -17436,14 +17437,14 @@ const TextInput = ({ id, className, htmlProps, label, onChange, onBlur, onFocus,
|
|
|
17436
17437
|
onChange(value);
|
|
17437
17438
|
};
|
|
17438
17439
|
return (a$m.createElement(TextFieldContainer, { ...containerProps },
|
|
17439
|
-
a$m.createElement(TextFieldInput, { autoComplete:
|
|
17440
|
+
a$m.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 })));
|
|
17440
17441
|
};
|
|
17441
17442
|
|
|
17442
17443
|
const CustomIconButton$2 = styled(IconButton) `
|
|
17443
17444
|
margin-right: 2px;
|
|
17444
17445
|
`;
|
|
17445
17446
|
|
|
17446
|
-
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,
|
|
17447
|
+
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, }) => {
|
|
17447
17448
|
const containerProps = {
|
|
17448
17449
|
id,
|
|
17449
17450
|
label,
|
|
@@ -17467,7 +17468,7 @@ const PasswordInput = ({ id, className, htmlProps, label, placeholder = "Enter P
|
|
|
17467
17468
|
onChange(value);
|
|
17468
17469
|
};
|
|
17469
17470
|
return (a$m.createElement(TextFieldContainer, { ...containerProps },
|
|
17470
|
-
a$m.createElement(TextFieldInput, { autoComplete:
|
|
17471
|
+
a$m.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 }),
|
|
17471
17472
|
a$m.createElement(CustomIconButton$2, { variant: "tertiary", iconName: show ? "eye" : "eye-slash", ariaLabel: show ? "Hide" : "Show", onClick: () => setShow(!show), disabled: disabled })));
|
|
17472
17473
|
};
|
|
17473
17474
|
|
|
@@ -17495,7 +17496,7 @@ const formatDynamicNumbersWithCommas = (num, decimalPlaces) => {
|
|
|
17495
17496
|
: "";
|
|
17496
17497
|
};
|
|
17497
17498
|
|
|
17498
|
-
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,
|
|
17499
|
+
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, }) => {
|
|
17499
17500
|
const containerProps = {
|
|
17500
17501
|
id,
|
|
17501
17502
|
label,
|
|
@@ -17545,7 +17546,7 @@ const NumberInput = ({ id, className, htmlProps, leftCategory, rightCategory, la
|
|
|
17545
17546
|
!onFocus && setPlaceholderText("");
|
|
17546
17547
|
};
|
|
17547
17548
|
return (a$m.createElement(TextFieldContainer, { ...containerProps },
|
|
17548
|
-
a$m.createElement(TextFieldInput, { autoComplete:
|
|
17549
|
+
a$m.createElement(TextFieldInput, { autoComplete: enableAutocomplete ? "on" : "off", "aria-describedby": `${id}-helper-text ${ariaDescribedBy}`, type: "text", inputMode: "numeric",
|
|
17549
17550
|
// prettier-ignore
|
|
17550
17551
|
pattern: allowNegativeNumbers ? "^[\\d,\\.\\-]*$" : "^[\\d,\\.]*$", id: `${id}-text-field`, disabled: disabled || isLoading, placeholder: placeholderText, onChange: handleChange, onBlur: handleBlur, onFocus: handleFocus, onKeyDown: handleKeyDown, value: thousandSeparator
|
|
17551
17552
|
? formatDynamicNumbersWithCommas(valueToUse, decimalPlaces)
|