@hexure/ui 1.13.30 → 1.13.31
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 +10 -10
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +10 -10
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +81 -81
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -959,9 +959,9 @@ const Label$3 = styled.span `
|
|
|
959
959
|
box-sizing: border-box;
|
|
960
960
|
`;
|
|
961
961
|
const Checkbox = (_a) => {
|
|
962
|
-
var { children, color, disabled, checked, onChange, invalid, tooltip } = _a, accessibleProps = __rest(_a, ["children", "color", "disabled", "checked", "onChange", "invalid", "tooltip"]);
|
|
962
|
+
var { children, color, disabled, checked, onChange, invalid, tooltip, tabIndex } = _a, accessibleProps = __rest(_a, ["children", "color", "disabled", "checked", "onChange", "invalid", "tooltip", "tabIndex"]);
|
|
963
963
|
return (React.createElement(Wrapper$b, Object.assign({ "$disabled": disabled }, accessibleProps),
|
|
964
|
-
React.createElement(Input$2, { checked: checked, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, type: 'checkbox' }),
|
|
964
|
+
React.createElement(Input$2, { checked: checked, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, tabIndex: disabled ? -1 : tabIndex, type: 'checkbox' }),
|
|
965
965
|
React.createElement(Check$1, { "$invalid": invalid }),
|
|
966
966
|
children ? (React.createElement(Label$3, { color: color },
|
|
967
967
|
children,
|
|
@@ -1078,7 +1078,7 @@ const SearchInput$1 = styled.input `
|
|
|
1078
1078
|
white-space: nowrap;
|
|
1079
1079
|
`;
|
|
1080
1080
|
const Select = (_a) => {
|
|
1081
|
-
var { options, optionGroups, placeholder = '--Select-One--', readOnly, invalid, searchable = false, value: propValue, onChange, style } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "searchable", "value", "onChange", "style"]);
|
|
1081
|
+
var { options, optionGroups, placeholder = '--Select-One--', readOnly, invalid, searchable = false, value: propValue, onChange, style, tabIndex } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "searchable", "value", "onChange", "style", "tabIndex"]);
|
|
1082
1082
|
const [searchTerm, setSearchTerm] = React.useState('');
|
|
1083
1083
|
const [value, setValue] = React.useState(propValue || '');
|
|
1084
1084
|
// Update the value when the prop changes
|
|
@@ -1101,8 +1101,8 @@ const Select = (_a) => {
|
|
|
1101
1101
|
? optionGroups === null || optionGroups === void 0 ? void 0 : optionGroups.map(group => (Object.assign(Object.assign({}, group), { options: group.options.filter(option => { var _a; return (_a = option.label) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(searchTerm.toLowerCase()); }) })))
|
|
1102
1102
|
: optionGroups;
|
|
1103
1103
|
return (React.createElement(Wrapper$a, { "$invalid": invalid, "$readOnly": readOnly, "$style": style },
|
|
1104
|
-
searchable && (React.createElement(SearchInput$1, Object.assign({ onChange: handleSearch, placeholder: placeholder, type: 'text', value: searchTerm }, accessibleProps))),
|
|
1105
|
-
React.createElement(Trigger$1, Object.assign({ disabled: readOnly, onChange: handleChange, placeholder: placeholder, value: value }, accessibleProps),
|
|
1104
|
+
searchable && (React.createElement(SearchInput$1, Object.assign({ onChange: handleSearch, placeholder: placeholder, tabIndex: readOnly ? -1 : tabIndex, type: 'text', value: searchTerm }, accessibleProps))),
|
|
1105
|
+
React.createElement(Trigger$1, Object.assign({ disabled: readOnly, onChange: handleChange, placeholder: placeholder, tabIndex: readOnly ? -1 : tabIndex, value: value }, accessibleProps),
|
|
1106
1106
|
placeholder && !value && (React.createElement("option", { disabled: true, value: '' }, placeholder)),
|
|
1107
1107
|
filteredOptionGroups &&
|
|
1108
1108
|
filteredOptionGroups.map((group, i) => (React.createElement("optgroup", { key: i, label: group.label || `Group ${i}` }, group.options.map((option, i) => (React.createElement("option", { key: i, style: { color: option.color }, value: option.value }, option.label || option.value)))))),
|
|
@@ -1792,7 +1792,7 @@ const Loader$1 = styled.div `
|
|
|
1792
1792
|
const Input$1 = (_a) => {
|
|
1793
1793
|
var { format, suffix, height, invalid, loading, max, maxLength, min, onBlur, onChange, onFocus, onKeyDown,
|
|
1794
1794
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1795
|
-
onSuggestedSelect = () => { }, placeholder, readOnly, showCharCount, step, style, suggestedValues, showErrorTextColor = false, type = 'text', value = '', innerRef = null } = _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"]);
|
|
1795
|
+
onSuggestedSelect = () => { }, placeholder, readOnly, showCharCount, step, style, suggestedValues, showErrorTextColor = false, type = 'text', value = '', innerRef = null, tabIndex } = _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"]);
|
|
1796
1796
|
const [show_options, setShowOptions] = React.useState(false);
|
|
1797
1797
|
const [internalValue, setInternalValue] = React.useState(value);
|
|
1798
1798
|
const [internalSuggestedValues, setInternalSuggestedValues] = React.useState(suggestedValues || []);
|
|
@@ -1873,7 +1873,7 @@ const Input$1 = (_a) => {
|
|
|
1873
1873
|
setShowOptions(true);
|
|
1874
1874
|
if (onFocus)
|
|
1875
1875
|
onFocus(e);
|
|
1876
|
-
}, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown, placeholder: placeholder, ref: innerRef, value: formatted_value }, accessibleProps)),
|
|
1876
|
+
}, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown, placeholder: placeholder, readOnly: readOnly, ref: innerRef, tabIndex: readOnly ? -1 : tabIndex, value: formatted_value }, accessibleProps)),
|
|
1877
1877
|
loading ? (React.createElement(Loader$1, null,
|
|
1878
1878
|
React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: js.mdiLoading, size: '20px', spin: true }))) : null,
|
|
1879
1879
|
showCharCount ? (React.createElement(CharacterCount, null,
|
|
@@ -1893,7 +1893,7 @@ const Input$1 = (_a) => {
|
|
|
1893
1893
|
setShowOptions(true);
|
|
1894
1894
|
if (onFocus)
|
|
1895
1895
|
onFocus(e);
|
|
1896
|
-
}, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown, placeholder: placeholder, ref: innerRef, step: step, type: type, value: format === 'currency_decimal' && internalValue ? `$${formatted_value}` : formatted_value }, accessibleProps)),
|
|
1896
|
+
}, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown, placeholder: placeholder, readOnly: readOnly, ref: innerRef, step: step, tabIndex: readOnly ? -1 : tabIndex, type: type, value: format === 'currency_decimal' && internalValue ? `$${formatted_value}` : formatted_value }, accessibleProps)),
|
|
1897
1897
|
loading ? (React.createElement(Loader$1, null,
|
|
1898
1898
|
React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: js.mdiLoading, size: '20px', spin: true }))) : null,
|
|
1899
1899
|
showCharCount ? (React.createElement(CharacterCount, null,
|
|
@@ -2404,9 +2404,9 @@ const Label = styled.span `
|
|
|
2404
2404
|
margin-left: 6px;
|
|
2405
2405
|
`;
|
|
2406
2406
|
const Radio = (_a) => {
|
|
2407
|
-
var { children, disabled, checked, onChange, value, invalid, tooltip } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value", "invalid", "tooltip"]);
|
|
2407
|
+
var { children, disabled, checked, onChange, value, invalid, tooltip, tabIndex } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value", "invalid", "tooltip", "tabIndex"]);
|
|
2408
2408
|
return (React.createElement(Wrapper$2, Object.assign({}, accessibleProps),
|
|
2409
|
-
React.createElement(Input, { checked: checked, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, type: 'radio', value: value }),
|
|
2409
|
+
React.createElement(Input, { checked: checked, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, tabIndex: disabled ? -1 : tabIndex, type: 'radio', value: value }),
|
|
2410
2410
|
React.createElement(Check, { "$invalid": invalid }),
|
|
2411
2411
|
React.createElement(Label, null,
|
|
2412
2412
|
children,
|