@hexure/ui 1.13.55 → 1.13.56
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 +11 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Input/Input.d.ts +3 -1
- package/dist/esm/index.js +11 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Input/Input.d.ts +3 -1
- package/dist/index.d.ts +84 -82
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1882,7 +1882,7 @@ const Loader$1 = styled.div `
|
|
|
1882
1882
|
const Input$1 = (_a) => {
|
|
1883
1883
|
var { format, suffix, height, invalid, loading, max, maxLength, min, onBlur, onChange, onFocus, onKeyDown,
|
|
1884
1884
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1885
|
-
onSuggestedSelect = () => { }, placeholder, readOnly, showCharCount, step, style, suggestedValues, showErrorTextColor = false, type = 'text', value = '', innerRef = null, tabIndex, isAutoComplete = false, dataItemid, mask } = _a, accessibleProps = __rest(_a, ["format", "suffix", "height", "invalid", "loading", "max", "maxLength", "min", "onBlur", "onChange", "onFocus", "onKeyDown", "onSuggestedSelect", "placeholder", "readOnly", "showCharCount", "step", "style", "suggestedValues", "showErrorTextColor", "type", "value", "innerRef", "tabIndex", "isAutoComplete", "dataItemid", "mask"]);
|
|
1885
|
+
onSuggestedSelect = () => { }, placeholder, readOnly, showCharCount, step, style, suggestedValues, showErrorTextColor = false, type = 'text', value = '', innerRef = null, tabIndex, isAutoComplete = false, dataItemid, mask, onPaste, autoComplete } = _a, accessibleProps = __rest(_a, ["format", "suffix", "height", "invalid", "loading", "max", "maxLength", "min", "onBlur", "onChange", "onFocus", "onKeyDown", "onSuggestedSelect", "placeholder", "readOnly", "showCharCount", "step", "style", "suggestedValues", "showErrorTextColor", "type", "value", "innerRef", "tabIndex", "isAutoComplete", "dataItemid", "mask", "onPaste", "autoComplete"]);
|
|
1886
1886
|
const [show_options, setShowOptions] = React.useState(false);
|
|
1887
1887
|
const [internalValue, setInternalValue] = React.useState(value);
|
|
1888
1888
|
const [internalSuggestedValues, setInternalSuggestedValues] = React.useState(suggestedValues || []);
|
|
@@ -1959,7 +1959,7 @@ const Input$1 = (_a) => {
|
|
|
1959
1959
|
}
|
|
1960
1960
|
const baseId = dataItemid || 'input';
|
|
1961
1961
|
return type === 'textarea' ? (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, "data-itemid": `${baseId}-wrapper`, style: style },
|
|
1962
|
-
React.createElement(StyledTextArea, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$showErrorTextColor": showErrorTextColor, maxLength: maxLength, onBlur: readOnly
|
|
1962
|
+
React.createElement(StyledTextArea, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$showErrorTextColor": showErrorTextColor, autoComplete: autoComplete, maxLength: maxLength, onBlur: readOnly
|
|
1963
1963
|
? e => e.preventDefault()
|
|
1964
1964
|
: e => {
|
|
1965
1965
|
if (onBlur)
|
|
@@ -1973,13 +1973,16 @@ const Input$1 = (_a) => {
|
|
|
1973
1973
|
setShowOptions(true);
|
|
1974
1974
|
if (onFocus)
|
|
1975
1975
|
onFocus(e);
|
|
1976
|
-
}, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown,
|
|
1976
|
+
}, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown, onPaste: e => {
|
|
1977
|
+
if (onPaste)
|
|
1978
|
+
onPaste(e);
|
|
1979
|
+
}, placeholder: placeholder, readOnly: readOnly, ref: innerRef, tabIndex: readOnly ? -1 : tabIndex, value: formatted_value }, accessibleProps, { "data-itemid": `${baseId}-textarea` })),
|
|
1977
1980
|
loading ? (React.createElement(Loader$1, { "data-itemid": `${baseId}-loader` },
|
|
1978
1981
|
React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: js.mdiLoading, size: '20px', spin: true }))) : null,
|
|
1979
1982
|
showCharCount ? (React.createElement(CharacterCount, { "data-itemid": `${baseId}-char-count` },
|
|
1980
1983
|
internalValue.length,
|
|
1981
1984
|
maxLength ? ` / ${maxLength}` : null)) : null)) : (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, "data-itemid": `${baseId}-wrapper`, style: style },
|
|
1982
|
-
React.createElement(StyledInput, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$showErrorTextColor": showErrorTextColor, max: max, maxLength: maxLength, min: min, onBlur: readOnly
|
|
1985
|
+
React.createElement(StyledInput, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$showErrorTextColor": showErrorTextColor, autoComplete: autoComplete, max: max, maxLength: maxLength, min: min, onBlur: readOnly
|
|
1983
1986
|
? e => e.preventDefault()
|
|
1984
1987
|
: e => {
|
|
1985
1988
|
if (onBlur)
|
|
@@ -1995,7 +1998,10 @@ const Input$1 = (_a) => {
|
|
|
1995
1998
|
setIsFocused(true);
|
|
1996
1999
|
if (onFocus)
|
|
1997
2000
|
onFocus(e);
|
|
1998
|
-
}, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown,
|
|
2001
|
+
}, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown, onPaste: e => {
|
|
2002
|
+
if (onPaste)
|
|
2003
|
+
onPaste(e);
|
|
2004
|
+
}, placeholder: placeholder, readOnly: readOnly, ref: innerRef, step: step, tabIndex: readOnly ? -1 : tabIndex, type: type, value: format === 'currency_decimal' && internalValue ? `$${formatted_value}` : formatted_value }, accessibleProps, { "data-itemid": `${baseId}-input` })),
|
|
1999
2005
|
loading ? (React.createElement(Loader$1, { "data-itemid": `${baseId}-loader` },
|
|
2000
2006
|
React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: js.mdiLoading, size: '20px', spin: true }))) : null,
|
|
2001
2007
|
showCharCount ? (React.createElement(CharacterCount, { "data-itemid": `${baseId}-char-count` },
|