@mackin.com/styleguide 7.13.1 → 7.14.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 +5 -0
  2. package/index.js +2 -2
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -29,6 +29,11 @@ interface AutocompleteProps {
29
29
  inputAriaAttributes?: React.AriaAttributes;
30
30
  /** Defaults to 0ms. */
31
31
  getOptionsDebounceMs?: number;
32
+ /** Options passed to the lodash debounce function. */
33
+ debounceOptions?: {
34
+ leading: boolean;
35
+ trailing: boolean;
36
+ };
32
37
  /** Will enable scrolling in the results list. */
33
38
  allowScroll?: boolean;
34
39
  onChange: (value: string) => void;
package/index.js CHANGED
@@ -883,7 +883,7 @@ const getAutocompleteValueId = (v) => {
883
883
  };
884
884
  //TB: will need to use the new input
885
885
  const Autocomplete = (p) => {
886
- var _a, _b;
886
+ var _a, _b, _c;
887
887
  const element = React__namespace.useRef(null);
888
888
  const input = React__namespace.useRef(null);
889
889
  const list = React__namespace.useRef(null);
@@ -909,7 +909,7 @@ const Autocomplete = (p) => {
909
909
  else {
910
910
  setValues([]);
911
911
  }
912
- }, (_b = p.getOptionsDebounceMs) !== null && _b !== void 0 ? _b : 0, { leading: true, trailing: true }));
912
+ }, (_b = p.getOptionsDebounceMs) !== null && _b !== void 0 ? _b : 0, (_c = p.debounceOptions) !== null && _c !== void 0 ? _c : { leading: true, trailing: true }));
913
913
  const theme = useThemeSafely();
914
914
  const baseClass = css.css `
915
915
  label: Autocomplete;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mackin.com/styleguide",
3
- "version": "7.13.1",
3
+ "version": "7.14.0",
4
4
  "description": "",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",