@bloomreach/react-banana-ui 1.42.1 → 1.43.1
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 +0 -2
- package/dist/bloomreach-react-banana-ui.es.js +3666 -3656
- package/dist/bloomreach-react-banana-ui.es.js.map +1 -1
- package/dist/bloomreach-react-banana-ui.umd.js +15 -15
- package/dist/bloomreach-react-banana-ui.umd.js.map +1 -1
- package/dist/src/components/inputs/autocomplete/autocomplete.stories.d.ts +1 -0
- package/dist/src/components/inputs/autocomplete/autocomplete.types.d.ts +24 -0
- package/dist/src/components/inputs/autocomplete-field/autocomplete-field.stories.d.ts +1 -0
- package/package.json +1 -2
|
@@ -17,6 +17,7 @@ export declare const SelectAllWithDisabledOptions: Story<{
|
|
|
17
17
|
id: number;
|
|
18
18
|
label: string;
|
|
19
19
|
}, true>;
|
|
20
|
+
export declare const SelectableTags: Story<(typeof fruits)[0], true>;
|
|
20
21
|
export declare const DefaultValueMultiple: Story<(typeof fruits)[0], true>;
|
|
21
22
|
export declare const LimitTags: Story<(typeof fruits)[0], true>;
|
|
22
23
|
export declare const LimitTagsCustomText: Story<(typeof fruits)[0], true>;
|
|
@@ -84,6 +84,13 @@ export interface AutocompleteProps<AutocompleteOption extends NonNullable<unknow
|
|
|
84
84
|
* The input value.
|
|
85
85
|
*/
|
|
86
86
|
inputValue?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Determines whether a given tag is highlighted as selected.
|
|
89
|
+
* Only used when `selectableTags` is `true` and `multiple` is `true`.
|
|
90
|
+
* @param option The option represented by the tag
|
|
91
|
+
* @param index The index of the tag in the value array
|
|
92
|
+
*/
|
|
93
|
+
isTagSelected?: (option: AutocompleteOption, index: number) => boolean;
|
|
87
94
|
/**
|
|
88
95
|
* Icon or any element displayed at the start of the input.
|
|
89
96
|
*/
|
|
@@ -150,6 +157,14 @@ export interface AutocompleteProps<AutocompleteOption extends NonNullable<unknow
|
|
|
150
157
|
parsedValues: string[];
|
|
151
158
|
pastedText: string;
|
|
152
159
|
}) => void;
|
|
160
|
+
/**
|
|
161
|
+
* Callback fired when a tag body is clicked.
|
|
162
|
+
* Only used when `selectableTags` is `true` and `multiple` is `true`.
|
|
163
|
+
* @param event The click/keyboard event
|
|
164
|
+
* @param option The option represented by the clicked tag
|
|
165
|
+
* @param index The index of the tag in the value array
|
|
166
|
+
*/
|
|
167
|
+
onTagClick?: (event: SyntheticEvent, option: AutocompleteOption, index: number) => void;
|
|
153
168
|
/**
|
|
154
169
|
* Array ot options to display.
|
|
155
170
|
*/
|
|
@@ -197,6 +212,15 @@ export interface AutocompleteProps<AutocompleteOption extends NonNullable<unknow
|
|
|
197
212
|
* Icon or any element displayed at the end of the input, before the clear button and chevron.
|
|
198
213
|
*/
|
|
199
214
|
rightElement?: ReactNode;
|
|
215
|
+
/**
|
|
216
|
+
* If `true`, tags become individually selectable: each tag's highlighted
|
|
217
|
+
* state is controlled by `isTagSelected` and clicking a tag body fires
|
|
218
|
+
* `onTagClick` (instead of every tag being shown as selected). Useful for
|
|
219
|
+
* "pick the active item among the selected ones" flows.
|
|
220
|
+
* Only works when `multiple` is `true`.
|
|
221
|
+
* @default false
|
|
222
|
+
*/
|
|
223
|
+
selectableTags?: boolean;
|
|
200
224
|
/**
|
|
201
225
|
* If `true`, a "Select all" checkbox is shown at the top of the listbox
|
|
202
226
|
* that toggles all currently visible (filtered) enabled options.
|
|
@@ -16,6 +16,7 @@ export declare const ControlledSingleValue: Story;
|
|
|
16
16
|
export declare const Multiple: Story<(typeof fruits)[0], true>;
|
|
17
17
|
export declare const DefaultValueMultiple: Story<(typeof fruits)[0], true>;
|
|
18
18
|
export declare const ControlledMultipleValue: Story<(typeof fruits)[0], true>;
|
|
19
|
+
export declare const SelectableTags: Story<(typeof fruits)[0], true>;
|
|
19
20
|
export declare const Clearable: Story;
|
|
20
21
|
export declare const Disabled: Story;
|
|
21
22
|
export declare const DisabledMultiple: Story<(typeof fruits)[0], true>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bloomreach/react-banana-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.43.1",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"release": "npx semantic-release",
|
|
46
46
|
"release:dry-run": "npm run release -- --dry-run --branches $(git rev-parse --abbrev-ref HEAD)",
|
|
47
47
|
"security-audit": "npm audit --audit-level=moderate --only=prod",
|
|
48
|
-
"sonar": "SONAR_TOKEN=$SONAR_TOKEN docker compose run --remove-orphans sonar-scan",
|
|
49
48
|
"start": "npm run storybook",
|
|
50
49
|
"storybook": "storybook dev -p 6006",
|
|
51
50
|
"storybook:build": "storybook build",
|