@choc-ui/chakra-autocomplete 5.6.3 → 5.6.4

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/README.md CHANGED
@@ -1174,6 +1174,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
1174
1174
  <td align="center"><a href="https://github.com/chrisregner"><img src="https://avatars.githubusercontent.com/u/26005158?v=4" width="100px;" alt=""/><br /><sub><b>Christopher Regner</b></sub></a><br /><a href="https://github.com/anubra266/choc-autocomplete/commits?author=chrisregner" title="Code">📖🐛</a></td>
1175
1175
  <td align="center"><a href="https://github.com/EinarSnorrason"><img src="https://avatars.githubusercontent.com/u/31321506?v=4" width="100px;" alt=""/><br /><sub><b>EinarSnorrason</b></sub></a><br /><a href="https://github.com/anubra266/choc-autocomplete/commits?author=EinarSnorrason" title="Code">💻🐛🔧</a></td>
1176
1176
  <td align="center"><a href="https://github.com/gbermudez1992"><img src="https://avatars.githubusercontent.com/u/84212735?v=4" width="100px;" alt=""/><br /><sub><b>gbermudez1992</b></sub></a><br /><a href="https://github.com/anubra266/choc-autocomplete/commits?author=gbermudez1992" title="Code">💻🐛🔧</a></td>
1177
+ <td align="center"><a href="https://github.com/ido213"><img src="https://avatars.githubusercontent.com/u/163876909?v=4" width="100px;" alt=""/><br /><sub><b>ido213</b></sub></a><br /><a href="https://github.com/anubra266/choc-autocomplete/commits?author=ido213" title="Code">💻🐛🔧</a></td>
1177
1178
  </tr>
1178
1179
  </table>
1179
1180
 
@@ -1,4 +1,3 @@
1
1
  import { UseAutoCompleteReturn } from './types';
2
-
3
2
  export declare const AutoCompleteProvider: import('react').Provider<UseAutoCompleteReturn>, useAutoCompleteContext: () => UseAutoCompleteReturn;
4
3
  //# sourceMappingURL=autocomplete-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete-context.d.ts","sourceRoot":"","sources":["../src/autocomplete-context.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAO,oBAAoB,mDAAE,sBAAsB,6BAMxD,CAAC"}
1
+ {"version":3,"file":"autocomplete-context.d.ts","sourceRoot":"","sources":["../src/autocomplete-context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAO,oBAAoB,mDAAE,sBAAsB,6BAMxD,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import { FlexProps } from '@chakra-ui/react';
2
2
  import { MaybeRenderProp } from '@chakra-ui/react-utils';
3
-
4
3
  interface AutoCompleteCreatableProps extends Omit<FlexProps, "children"> {
5
4
  children?: MaybeRenderProp<{
6
5
  value: any;
@@ -1,6 +1,5 @@
1
1
  import { BoxProps, FlexProps } from '@chakra-ui/react';
2
2
  import { default as React } from 'react';
3
-
4
3
  export interface AutoCompleteGroupProps extends BoxProps {
5
4
  children?: React.ReactNode;
6
5
  showDivider?: boolean;
@@ -2,7 +2,6 @@ import { InputProps, SystemStyleObject } from '@chakra-ui/react';
2
2
  import { MaybeRenderProp } from '@chakra-ui/react-utils';
3
3
  import { default as React } from 'react';
4
4
  import { UseAutoCompleteReturn } from './types';
5
-
6
5
  export interface AutoCompleteInputProps extends Omit<InputProps, "children"> {
7
6
  children?: MaybeRenderProp<{
8
7
  tags: UseAutoCompleteReturn["tags"];
@@ -1,5 +1,4 @@
1
1
  import { SystemStyleObject, FlexProps } from '@chakra-ui/react';
2
-
3
2
  export interface AutoCompleteItemProps extends FlexProps {
4
3
  value: any;
5
4
  label?: string;
@@ -1,6 +1,5 @@
1
1
  import { PopoverContentProps } from '@chakra-ui/react';
2
2
  import { default as React } from 'react';
3
-
4
3
  export interface AutoCompleteListProps extends PopoverContentProps {
5
4
  loadingState?: React.ReactNode;
6
5
  }
@@ -1,6 +1,5 @@
1
1
  import { TagProps } from '@chakra-ui/tag';
2
2
  import { default as React } from 'react';
3
-
4
3
  type AutoCompleteTagProps = {
5
4
  disabled?: boolean;
6
5
  label: string;
@@ -1,7 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { MaybeRenderProp } from '@chakra-ui/react-utils';
3
3
  import { AutoCompleteRefMethods, UseAutoCompleteProps } from './types';
4
-
5
4
  export type AutoCompleteChildProps = {
6
5
  isOpen: boolean;
7
6
  onClose: () => void;
@@ -1,4 +1,3 @@
1
1
  import { BoxProps } from '@chakra-ui/layout';
2
-
3
2
  export declare const EmptyState: (props: BoxProps) => import("react/jsx-runtime").JSX.Element;
4
3
  //# sourceMappingURL=empty-state.d.ts.map
@@ -1,5 +1,4 @@
1
1
  import { ReactNode } from 'react';
2
-
3
2
  export declare const hasFirstItem: (children: ReactNode, firstItem: any) => any;
4
3
  export declare const hasLastItem: (children: ReactNode, lastItem: any) => any;
5
4
  export declare const hasChildren: (children: any, filteredList: any[]) => boolean;
@@ -2,7 +2,6 @@ import { ReactNode } from 'react';
2
2
  import { FlexProps } from '@chakra-ui/react';
3
3
  import { Item } from '../types';
4
4
  import { AutoCompleteItemProps } from '../autocomplete-item';
5
-
6
5
  export declare const getDefItemValue: (item: AutoCompleteItemProps["value"]) => any;
7
6
  export declare const setEmphasis: (children: any, query: string) => any;
8
7
  export declare const getItemList: (children: ReactNode) => Item[];
@@ -1,4 +1,3 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare const siblingInfo: (children: React.ReactNode) => readonly [(string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal)[], (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal)[]];
4
3
  //# sourceMappingURL=list.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/helpers/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,eAAO,MAAM,WAAW,aAAc,MAAM,SAAS,kSA8BpD,CAAC"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/helpers/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,eAAO,MAAM,WAAW,aAAc,KAAK,CAAC,SAAS,kSA8BpD,CAAC"}
package/dist/index.es.js CHANGED
@@ -21,18 +21,14 @@ var vt = { exports: {} }, jr = {};
21
21
  */
22
22
  var Yt;
23
23
  function Bo() {
24
- if (Yt)
25
- return jr;
24
+ if (Yt) return jr;
26
25
  Yt = 1;
27
26
  var e = Je, r = Symbol.for("react.element"), o = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, l = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
28
27
  function d(f, g, h) {
29
28
  var v, S = {}, _ = null, T = null;
30
29
  h !== void 0 && (_ = "" + h), g.key !== void 0 && (_ = "" + g.key), g.ref !== void 0 && (T = g.ref);
31
- for (v in g)
32
- a.call(g, v) && !u.hasOwnProperty(v) && (S[v] = g[v]);
33
- if (f && f.defaultProps)
34
- for (v in g = f.defaultProps, g)
35
- S[v] === void 0 && (S[v] = g[v]);
30
+ for (v in g) a.call(g, v) && !u.hasOwnProperty(v) && (S[v] = g[v]);
31
+ if (f && f.defaultProps) for (v in g = f.defaultProps, g) S[v] === void 0 && (S[v] = g[v]);
36
32
  return { $$typeof: r, type: f, key: _, ref: T, props: S, _owner: l.current };
37
33
  }
38
34
  return jr.Fragment = o, jr.jsx = d, jr.jsxs = d, jr;
@@ -3066,61 +3062,44 @@ function ei(e) {
3066
3062
  }
3067
3063
  var ri = typeof Element < "u", ti = typeof Map == "function", ni = typeof Set == "function", oi = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
3068
3064
  function Hr(e, r) {
3069
- if (e === r)
3070
- return !0;
3065
+ if (e === r) return !0;
3071
3066
  if (e && r && typeof e == "object" && typeof r == "object") {
3072
- if (e.constructor !== r.constructor)
3073
- return !1;
3067
+ if (e.constructor !== r.constructor) return !1;
3074
3068
  var o, a, l;
3075
3069
  if (Array.isArray(e)) {
3076
- if (o = e.length, o != r.length)
3077
- return !1;
3070
+ if (o = e.length, o != r.length) return !1;
3078
3071
  for (a = o; a-- !== 0; )
3079
- if (!Hr(e[a], r[a]))
3080
- return !1;
3072
+ if (!Hr(e[a], r[a])) return !1;
3081
3073
  return !0;
3082
3074
  }
3083
3075
  var u;
3084
3076
  if (ti && e instanceof Map && r instanceof Map) {
3085
- if (e.size !== r.size)
3086
- return !1;
3077
+ if (e.size !== r.size) return !1;
3087
3078
  for (u = e.entries(); !(a = u.next()).done; )
3088
- if (!r.has(a.value[0]))
3089
- return !1;
3079
+ if (!r.has(a.value[0])) return !1;
3090
3080
  for (u = e.entries(); !(a = u.next()).done; )
3091
- if (!Hr(a.value[1], r.get(a.value[0])))
3092
- return !1;
3081
+ if (!Hr(a.value[1], r.get(a.value[0]))) return !1;
3093
3082
  return !0;
3094
3083
  }
3095
3084
  if (ni && e instanceof Set && r instanceof Set) {
3096
- if (e.size !== r.size)
3097
- return !1;
3085
+ if (e.size !== r.size) return !1;
3098
3086
  for (u = e.entries(); !(a = u.next()).done; )
3099
- if (!r.has(a.value[0]))
3100
- return !1;
3087
+ if (!r.has(a.value[0])) return !1;
3101
3088
  return !0;
3102
3089
  }
3103
3090
  if (oi && ArrayBuffer.isView(e) && ArrayBuffer.isView(r)) {
3104
- if (o = e.length, o != r.length)
3105
- return !1;
3091
+ if (o = e.length, o != r.length) return !1;
3106
3092
  for (a = o; a-- !== 0; )
3107
- if (e[a] !== r[a])
3108
- return !1;
3093
+ if (e[a] !== r[a]) return !1;
3109
3094
  return !0;
3110
3095
  }
3111
- if (e.constructor === RegExp)
3112
- return e.source === r.source && e.flags === r.flags;
3113
- if (e.valueOf !== Object.prototype.valueOf && typeof e.valueOf == "function" && typeof r.valueOf == "function")
3114
- return e.valueOf() === r.valueOf();
3115
- if (e.toString !== Object.prototype.toString && typeof e.toString == "function" && typeof r.toString == "function")
3116
- return e.toString() === r.toString();
3117
- if (l = Object.keys(e), o = l.length, o !== Object.keys(r).length)
3118
- return !1;
3096
+ if (e.constructor === RegExp) return e.source === r.source && e.flags === r.flags;
3097
+ if (e.valueOf !== Object.prototype.valueOf && typeof e.valueOf == "function" && typeof r.valueOf == "function") return e.valueOf() === r.valueOf();
3098
+ if (e.toString !== Object.prototype.toString && typeof e.toString == "function" && typeof r.toString == "function") return e.toString() === r.toString();
3099
+ if (l = Object.keys(e), o = l.length, o !== Object.keys(r).length) return !1;
3119
3100
  for (a = o; a-- !== 0; )
3120
- if (!Object.prototype.hasOwnProperty.call(r, l[a]))
3121
- return !1;
3122
- if (ri && e instanceof Element)
3123
- return !1;
3101
+ if (!Object.prototype.hasOwnProperty.call(r, l[a])) return !1;
3102
+ if (ri && e instanceof Element) return !1;
3124
3103
  for (a = o; a-- !== 0; )
3125
3104
  if (!((l[a] === "_owner" || l[a] === "__v" || l[a] === "__o") && e.$$typeof) && !Hr(e[l[a]], r[l[a]]))
3126
3105
  return !1;
package/dist/types.d.ts CHANGED
@@ -5,7 +5,6 @@ import { AutoCompleteProps } from './autocomplete';
5
5
  import { AutoCompleteGroupProps } from './autocomplete-group';
6
6
  import { AutoCompleteInputProps } from './autocomplete-input';
7
7
  import { AutoCompleteItemProps } from './autocomplete-item';
8
-
9
8
  export interface Item {
10
9
  value: any;
11
10
  label?: any;
@@ -1,6 +1,5 @@
1
1
  import { AutoCompleteProps } from './autocomplete';
2
2
  import { UseAutoCompleteReturn } from './types';
3
-
4
3
  /**
5
4
  * useAutoComplete that provides all the state and focus management logic
6
5
  * for the autocomplete component. It is consumed by the `Autocomplete` component
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.6.3",
2
+ "version": "5.6.4",
3
3
  "license": "MIT",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
@@ -38,11 +38,11 @@
38
38
  "react": "^18.2.0"
39
39
  },
40
40
  "dependencies": {
41
- "@size-limit/esbuild": "11.0.2",
42
- "@size-limit/esbuild-why": "11.0.2",
43
- "@size-limit/file": "11.0.2",
41
+ "@size-limit/esbuild": "11.1.5",
42
+ "@size-limit/esbuild-why": "11.1.5",
43
+ "@size-limit/file": "11.1.5",
44
44
  "react-nanny": "2.15.0",
45
- "size-limit": "11.0.2"
45
+ "size-limit": "11.1.5"
46
46
  },
47
47
  "husky": {
48
48
  "hooks": {
@@ -81,15 +81,15 @@
81
81
  "@vitejs/plugin-react": "^4.2.1",
82
82
  "babel-loader": "^9.1.3",
83
83
  "framer-motion": "10.16.16",
84
- "husky": "^8.0.3",
84
+ "husky": "^9.1.6",
85
85
  "react": "^18.2.0",
86
86
  "react-dom": "^18.2.0",
87
87
  "tsdx": "^0.14.1",
88
88
  "tslib": "^2.3.0",
89
89
  "typescript": "^5.3.3",
90
90
  "vite": "^5.0.12",
91
- "vite-plugin-dts": "^3.7.2",
92
- "vite-plugin-linter": "^2.1.1",
93
- "vite-tsconfig-paths": "^4.3.1"
91
+ "vite-plugin-dts": "^4.2.2",
92
+ "vite-plugin-linter": "^3.0.0",
93
+ "vite-tsconfig-paths": "^5.0.1"
94
94
  }
95
95
  }