@mackin.com/styleguide 9.6.1 → 9.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.
Files changed (3) hide show
  1. package/index.d.ts +2 -0
  2. package/index.js +3 -2
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -51,6 +51,8 @@ interface AutocompleteProps extends BaseInputProps$1 {
51
51
  allowScroll?: boolean;
52
52
  /** Delay before the input is re-focused after picking a value. Adjust if there are issues with the displayed input value after pick. Defaults to 100ms. */
53
53
  onPickFocusWaitMs?: number;
54
+ /** The option `title` attribute will be filled with the option text. Defaults to `true`. */
55
+ showOptionTextAsTitle?: boolean;
54
56
  onPick: (value: string | undefined, index?: number) => void;
55
57
  }
56
58
  declare const Autocomplete: (p: AutocompleteProps) => JSX.Element;
package/index.js CHANGED
@@ -1082,8 +1082,9 @@ const Autocomplete = (p) => {
1082
1082
  maxHeight: `calc(${theme.controls.height} * ${maxShowValues})`
1083
1083
  }), p.listClassName) },
1084
1084
  displayOptions.map((v, listItemIndex) => {
1085
+ var _a;
1085
1086
  return (React__namespace.createElement(ListItem, { key: v, variant: "full", className: p.listItemClassName },
1086
- React__namespace.createElement(Button, { onKeyDown: e => {
1087
+ React__namespace.createElement(Button, { title: ((_a = p.showOptionTextAsTitle) !== null && _a !== void 0 ? _a : true) ? v : undefined, onKeyDown: e => {
1087
1088
  var _a, _b;
1088
1089
  if (e.key === 'ArrowDown') {
1089
1090
  e.stopPropagation();
@@ -3668,7 +3669,7 @@ const SearchBox = React__namespace.forwardRef((props, ref) => {
3668
3669
  clearButton,
3669
3670
  saveButton) : saveButton;
3670
3671
  let clearButtonInputStyles;
3671
- if (clearButton) {
3672
+ if (!!props.onClear) {
3672
3673
  clearButtonInputStyles = css.css({
3673
3674
  paddingRight: `calc(${theme.controls.height} + ${theme.controls.heightSmall})`
3674
3675
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mackin.com/styleguide",
3
- "version": "9.6.1",
3
+ "version": "9.7.0",
4
4
  "description": "",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",