@choc-ui/chakra-autocomplete 5.2.9 → 5.3.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/README.md +22 -30
- package/dist/autocomplete-input.d.ts.map +1 -1
- package/dist/autocomplete-item.d.ts +3 -3
- package/dist/autocomplete-item.d.ts.map +1 -1
- package/dist/index.es.js +1337 -1089
- package/dist/index.js +15 -15
- package/dist/types.d.ts +4 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/use-autocomplete.d.ts.map +1 -1
- package/package.json +17 -17
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
</a>
|
|
33
33
|
<br />
|
|
34
34
|
AutoComplete Component for the <a href="https://chakra-ui.com">Chakra UI</a> Library.</em>
|
|
35
|
-
|
|
35
|
+
|
|
36
36
|
</sup>
|
|
37
37
|
<br />
|
|
38
38
|
<br />
|
|
@@ -453,6 +453,12 @@ Wrapper and Provider for `AutoCompleteInput` and `AutoCompleteList`
|
|
|
453
453
|
<td>boolean</td>
|
|
454
454
|
<td>Suggestions list is open by default</td>
|
|
455
455
|
<td>false</td>
|
|
456
|
+
</tr>
|
|
457
|
+
<tr>
|
|
458
|
+
<td>prefocusFirstItem</td>
|
|
459
|
+
<td>boolean</td>
|
|
460
|
+
<td>Should prefocus first item intially, on query change, on open, and on filter out of current focused item</td>
|
|
461
|
+
<td>true</td>
|
|
456
462
|
</tr>
|
|
457
463
|
<tr>
|
|
458
464
|
<td>defaultValues</td>
|
|
@@ -468,7 +474,7 @@ Wrapper and Provider for `AutoCompleteInput` and `AutoCompleteList`
|
|
|
468
474
|
</tr>
|
|
469
475
|
<tr>
|
|
470
476
|
<td>emphasize</td>
|
|
471
|
-
<td>boolean |
|
|
477
|
+
<td>boolean | SystemStyleObject</td>
|
|
472
478
|
<td>Highlight matching characters in suggestions, you can pass the styles - false</td>
|
|
473
479
|
<td>false</td>
|
|
474
480
|
</tr>
|
|
@@ -560,7 +566,7 @@ boolean | MaybeRenderProp<{ value: Item["value"] }>
|
|
|
560
566
|
<tr>
|
|
561
567
|
<td>onSelectOption</td>
|
|
562
568
|
<td>
|
|
563
|
-
|
|
569
|
+
|
|
564
570
|
```ts
|
|
565
571
|
(params: {
|
|
566
572
|
item: Item;
|
|
@@ -591,7 +597,7 @@ boolean | MaybeRenderProp<{ value: Item["value"] }>
|
|
|
591
597
|
<tr>
|
|
592
598
|
<td>onReady</td>
|
|
593
599
|
<td>
|
|
594
|
-
|
|
600
|
+
|
|
595
601
|
```ts
|
|
596
602
|
(props:{tags:ItemTag[]}) => void
|
|
597
603
|
```
|
|
@@ -602,7 +608,7 @@ boolean | MaybeRenderProp<{ value: Item["value"] }>
|
|
|
602
608
|
<tr>
|
|
603
609
|
<td>onTagRemoved</td>
|
|
604
610
|
<td>
|
|
605
|
-
|
|
611
|
+
|
|
606
612
|
```ts
|
|
607
613
|
(removedTag: Item["value"],item: Item, tags: Item["value"][]) => void
|
|
608
614
|
```
|
|
@@ -643,7 +649,7 @@ boolean | MaybeRenderProp<{ value: Item["value"] }>
|
|
|
643
649
|
<tr>
|
|
644
650
|
<td>shouldRenderSuggestions</td>
|
|
645
651
|
<td>
|
|
646
|
-
|
|
652
|
+
|
|
647
653
|
```ts
|
|
648
654
|
(value: string) => boolean
|
|
649
655
|
```
|
|
@@ -731,7 +737,7 @@ Tags for multiple mode
|
|
|
731
737
|
<td>Yes<br></td>
|
|
732
738
|
<td>———</td>
|
|
733
739
|
</tr>
|
|
734
|
-
|
|
740
|
+
|
|
735
741
|
</tbody>
|
|
736
742
|
</table>
|
|
737
743
|
|
|
@@ -782,7 +788,7 @@ e.g.
|
|
|
782
788
|
<td>No<br></td>
|
|
783
789
|
<td>———</td>
|
|
784
790
|
</tr>
|
|
785
|
-
|
|
791
|
+
|
|
786
792
|
<tr>
|
|
787
793
|
<td>ref</td>
|
|
788
794
|
<td>
|
|
@@ -945,11 +951,7 @@ val => val;
|
|
|
945
951
|
</tr>
|
|
946
952
|
<tr>
|
|
947
953
|
<td>_fixed</td>
|
|
948
|
-
<td>
|
|
949
|
-
|
|
950
|
-
CSSObject
|
|
951
|
-
|
|
952
|
-
</td>
|
|
954
|
+
<td>SystemStyleObject</td>
|
|
953
955
|
<td>Styles for fixed Itemm</td>
|
|
954
956
|
<td>No</td>
|
|
955
957
|
<td>
|
|
@@ -982,11 +984,7 @@ val => val;
|
|
|
982
984
|
</tr>
|
|
983
985
|
<tr>
|
|
984
986
|
<td>_disabled</td>
|
|
985
|
-
<td>
|
|
986
|
-
|
|
987
|
-
CSSObject
|
|
988
|
-
|
|
989
|
-
</td>
|
|
987
|
+
<td>SystemStyleObject</td>
|
|
990
988
|
<td>Styles for disabled Item(s)</td>
|
|
991
989
|
<td>No</td>
|
|
992
990
|
<td>
|
|
@@ -1001,11 +999,7 @@ val => val;
|
|
|
1001
999
|
</tr>
|
|
1002
1000
|
<tr>
|
|
1003
1001
|
<td>_selected</td>
|
|
1004
|
-
<td>
|
|
1005
|
-
|
|
1006
|
-
CSSObject
|
|
1007
|
-
|
|
1008
|
-
</td>
|
|
1002
|
+
<td>SystemStyleObject</td>
|
|
1009
1003
|
<td>Styles for selected Item(s)</td>
|
|
1010
1004
|
<td>No</td>
|
|
1011
1005
|
<td>
|
|
@@ -1020,11 +1014,7 @@ val => val;
|
|
|
1020
1014
|
</tr>
|
|
1021
1015
|
<tr>
|
|
1022
1016
|
<td>_focus</td>
|
|
1023
|
-
<td>
|
|
1024
|
-
|
|
1025
|
-
CSSObject
|
|
1026
|
-
|
|
1027
|
-
</td>
|
|
1017
|
+
<td>SystemStyleObject</td>
|
|
1028
1018
|
<td>Styles for focused Item</td>
|
|
1029
1019
|
<td>No</td>
|
|
1030
1020
|
<td>
|
|
@@ -1036,7 +1026,7 @@ val => val;
|
|
|
1036
1026
|
```
|
|
1037
1027
|
|
|
1038
1028
|
</td>
|
|
1039
|
-
</tr>
|
|
1029
|
+
</tr>
|
|
1040
1030
|
</tbody>
|
|
1041
1031
|
</table>
|
|
1042
1032
|
|
|
@@ -1101,7 +1091,7 @@ When true, `AutoCompleteCreatable` is shown even when the `AutoCompleteInput` is
|
|
|
1101
1091
|
<td>No<br></td>
|
|
1102
1092
|
<td>———</td>
|
|
1103
1093
|
</tr>
|
|
1104
|
-
|
|
1094
|
+
|
|
1105
1095
|
</tbody>
|
|
1106
1096
|
</table>
|
|
1107
1097
|
|
|
@@ -1168,6 +1158,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
1168
1158
|
<td align="center"><a href="https://github.com/MathisFederico"><img src="https://avatars.githubusercontent.com/u/60117466?v=4" width="100px;" alt=""/><br /><sub><b>Mathis Federico</b></sub></a><br /><a href="https://github.com/anubra266/choc-autocomplete/commits?author=MathisFederico" title="Bug">🐛</a></td>
|
|
1169
1159
|
<td align="center"><a href="https://github.com/Kysluss"><img src="https://avatars.githubusercontent.com/u/29052043?v=4" width="100px;" alt=""/><br /><sub><b>Kyle Slusser</b></sub></a><br /><a href="https://github.com/anubra266/choc-autocomplete/commits?author=Kysluss" title="Code">💻🐛</a></td>
|
|
1170
1160
|
<td align="center"><a href="https://github.com/sakerhetspolisen"><img src="https://avatars.githubusercontent.com/u/68159964?v=4" width="100px;" alt=""/><br /><sub><b>Karl F. Sellergren</b></sub></a><br /><a href="https://github.com/anubra266/choc-autocomplete/commits?author=sakerhetspolisen" title="Code">🐛🔧</a></td>
|
|
1161
|
+
<td align="center"><a href="https://github.com/JedBh"><img src="https://avatars.githubusercontent.com/u/44101778?v=4" width="100px;" alt=""/><br /><sub><b>Jedediah Benhod</b></sub></a><br /><a href="https://github.com/anubra266/choc-autocomplete/commits?author=sakerhetspolisen" title="Code">🐛</a></td>
|
|
1162
|
+
<td align="center"><a href="https://github.com/Janekk"><img src="https://avatars.githubusercontent.com/u/6827881?v=4" width="100px;" alt=""/><br /><sub><b>Janusz Kacalak</b></sub></a><br /><a href="https://github.com/anubra266/choc-autocomplete/commits?author=sakerhetspolisen" title="Code">🐛</a></td>
|
|
1171
1163
|
|
|
1172
1164
|
</tr>
|
|
1173
1165
|
</table>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete-input.d.ts","sourceRoot":"","sources":["../src/autocomplete-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EAIV,iBAAiB,EAMlB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAoB,MAAM,OAAO,CAAC;AAGzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC;IAC1E,QAAQ,CAAC,EAAE,eAAe,CAAC;QAAE,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAA;KAAE,CAAC,CAAC;IACpE,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC9B;AAgBD,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"autocomplete-input.d.ts","sourceRoot":"","sources":["../src/autocomplete-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EAIV,iBAAiB,EAMlB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAoB,MAAM,OAAO,CAAC;AAGzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC;IAC1E,QAAQ,CAAC,EAAE,eAAe,CAAC;QAAE,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAA;KAAE,CAAC,CAAC;IACpE,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC9B;AAgBD,eAAO,MAAM,iBAAiB,gGAqE7B,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SystemStyleObject, FlexProps } from "@chakra-ui/react";
|
|
2
2
|
export interface AutoCompleteItemProps extends FlexProps {
|
|
3
3
|
value: any;
|
|
4
4
|
label?: string;
|
|
5
5
|
fixed?: boolean;
|
|
6
|
-
_focus?:
|
|
6
|
+
_focus?: SystemStyleObject | any;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
-
_fixed?:
|
|
8
|
+
_fixed?: SystemStyleObject;
|
|
9
9
|
getValue?: (item: AutoCompleteItemProps["value"]) => any;
|
|
10
10
|
}
|
|
11
11
|
export declare const AutoCompleteItem: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"div", AutoCompleteItemProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete-item.d.ts","sourceRoot":"","sources":["../src/autocomplete-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"autocomplete-item.d.ts","sourceRoot":"","sources":["../src/autocomplete-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAEjB,SAAS,EAGV,MAAM,kBAAkB,CAAC;AAM1B,MAAM,WAAW,qBAAsB,SAAQ,SAAS;IACtD,KAAK,EAAE,GAAG,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,iBAAiB,GAAG,GAAG,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC;CAC1D;AAED,eAAO,MAAM,gBAAgB,6FA6C5B,CAAC;AAIF,eAAO,MAAM,cAAc,EAAE,SAM5B,CAAC"}
|