@mackin.com/styleguide 8.6.2 → 8.7.0
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/index.d.ts +4 -1
- package/index.js +3 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -709,11 +709,14 @@ interface SearchBoxProps {
|
|
|
709
709
|
id?: string;
|
|
710
710
|
placeholder?: string;
|
|
711
711
|
round?: boolean;
|
|
712
|
-
className?: string;
|
|
713
712
|
onSubmit?: () => Promise<void>;
|
|
714
713
|
/** Defaults to 250ms */
|
|
715
714
|
debounceMs?: number;
|
|
716
715
|
autoFocus?: boolean;
|
|
716
|
+
/** This will be applied to the containing element (Form). */
|
|
717
|
+
className?: string;
|
|
718
|
+
buttonClassName?: string;
|
|
719
|
+
inputClassName?: string;
|
|
717
720
|
}
|
|
718
721
|
declare const SearchBox: (props: SearchBoxProps) => JSX.Element;
|
|
719
722
|
|
package/index.js
CHANGED
|
@@ -3772,14 +3772,14 @@ const SearchBox = (props) => {
|
|
|
3772
3772
|
return (_c = props.onSubmit) === null || _c === void 0 ? void 0 : _c.call(props);
|
|
3773
3773
|
});
|
|
3774
3774
|
const theme = useThemeSafely();
|
|
3775
|
-
const submitButton = (React__namespace.createElement(Button, { tabIndex: -1, disabled: waiting, readOnly: !props.onSubmit, type: "submit", className: css.css({
|
|
3775
|
+
const submitButton = (React__namespace.createElement(Button, { tabIndex: -1, disabled: waiting, readOnly: !props.onSubmit, type: "submit", className: css.cx(css.css({
|
|
3776
3776
|
color: `${theme.colors.font} !important;`,
|
|
3777
3777
|
fontSize: '1rem'
|
|
3778
|
-
}), variant: "icon", small: true },
|
|
3778
|
+
}), props.buttonClassName), variant: "icon", small: true },
|
|
3779
3779
|
React__namespace.createElement(Icon, { id: waiting ? 'waiting' : 'search', spin: waiting })));
|
|
3780
3780
|
//TB: FUTURE replace with new inputs
|
|
3781
3781
|
return (React__namespace.createElement(Form, { role: "search", className: css.cx('searchBox', props.className), onSubmit: onSubmit },
|
|
3782
|
-
React__namespace.createElement(Input, { autoFocus: props.autoFocus, id: props.id, debounceMs: props.debounceMs, disabled: waiting, type: "text", value: props.value, placeholder: props.placeholder, round: props.round, onChange: props.onChange, rightControl: submitButton })));
|
|
3782
|
+
React__namespace.createElement(Input, { inputClassName: props.inputClassName, autoFocus: props.autoFocus, id: props.id, debounceMs: props.debounceMs, disabled: waiting, type: "text", value: props.value, placeholder: props.placeholder, round: props.round, onChange: props.onChange, rightControl: submitButton })));
|
|
3783
3783
|
};
|
|
3784
3784
|
|
|
3785
3785
|
const GlobalStyles = (p) => {
|