@progress/kendo-react-dropdowns 10.2.0-develop.5 → 10.2.0-develop.7

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/index.d.ts CHANGED
@@ -121,88 +121,193 @@ export declare interface AutoCompleteOpenEvent extends OpenEvent<AutoComplete> {
121
121
  export declare interface AutoCompleteProps extends FormComponentProps {
122
122
  /**
123
123
  * Sets the data of the AutoComplete ([more information and example]({% slug binding_autocomplete %})).
124
+ *
125
+ * @example
126
+ * ```jsx
127
+ * <AutoComplete data={['Apple', 'Orange', 'Banana']} />
128
+ * ```
124
129
  */
125
130
  data?: any[];
126
131
  /**
127
132
  * Sets the opened and closed state of the AutoComplete.
133
+ *
134
+ * @example
135
+ * ```jsx
136
+ * <AutoComplete opened={true} />
137
+ * ```
128
138
  */
129
139
  opened?: boolean;
130
140
  /**
131
141
  * The styles that are applied to the AutoComplete.
142
+ *
143
+ * @example
144
+ * ```jsx
145
+ * <AutoComplete style={{ width: '300px' }} />
146
+ * ```
132
147
  */
133
148
  style?: React.CSSProperties;
134
149
  /**
135
150
  * Sets the value of the AutoComplete ([more information and example]({% slug binding_autocomplete %})).
151
+ *
152
+ * @example
153
+ * ```jsx
154
+ * <AutoComplete value="Apple" />
155
+ * ```
136
156
  */
137
157
  value?: string;
138
158
  /**
139
159
  * Sets the default value of the AutoComplete. Similar to the native `input` HTML element.
160
+ *
161
+ * @example
162
+ * ```jsx
163
+ * <AutoComplete defaultValue="Orange" />
164
+ * ```
140
165
  */
141
166
  defaultValue?: string;
142
167
  /**
143
168
  * Sets additional classes to the AutoComplete.
169
+ *
170
+ * @example
171
+ * ```jsx
172
+ * <AutoComplete className="custom-class" />
173
+ * ```
144
174
  */
145
175
  className?: string;
146
176
  /**
147
177
  * By default, the AutoComplete renders a button on hovering over the component, which resets the value.
148
178
  * If `clearButton` is set to `false`, the button will not be rendered.
179
+ *
180
+ * @example
181
+ * ```jsx
182
+ * <AutoComplete clearButton={false} />
183
+ * ```
149
184
  */
150
185
  clearButton?: boolean;
151
186
  /**
152
187
  * The hint that is displayed when the AutoComplete is empty.
188
+ *
189
+ * @example
190
+ * ```jsx
191
+ * <AutoComplete placeholder="Type here..." />
192
+ * ```
153
193
  */
154
194
  placeholder?: string;
155
195
  /**
156
196
  * Sets the read-only state of the AutoComplete.
197
+ *
198
+ * @example
199
+ * ```jsx
200
+ * <AutoComplete readonly={true} />
201
+ * ```
157
202
  */
158
203
  readonly?: boolean;
159
204
  /**
160
205
  * Enables the auto-completion of the text based on the first data item ([see example]({% slug suggestions_autocomplete %})).
206
+ *
207
+ * @example
208
+ * ```jsx
209
+ * <AutoComplete suggest={true} />
210
+ * ```
161
211
  */
162
212
  suggest?: boolean | string;
163
213
  /**
164
214
  * Sets the disabled state of the AutoComplete.
215
+ *
216
+ * @example
217
+ * ```jsx
218
+ * <AutoComplete disabled={true} />
219
+ * ```
165
220
  */
166
221
  disabled?: boolean;
167
222
  /**
168
223
  * Represents the `dir` HTML attribute.
224
+ *
225
+ * @example
226
+ * ```jsx
227
+ * <AutoComplete dir="rtl" />
228
+ * ```
169
229
  */
170
230
  dir?: string;
171
231
  /**
172
232
  * Sets the loading state of the AutoComplete ([see example]({% slug filtering_autocomplete %}#toc-basic-configuration)).
233
+ *
234
+ * @example
235
+ * ```jsx
236
+ * <AutoComplete loading={true} />
237
+ * ```
173
238
  */
174
239
  loading?: boolean;
175
240
  /**
176
241
  * Specifies the `tabIndex` of the AutoComplete.
242
+ *
243
+ * @example
244
+ * ```jsx
245
+ * <AutoComplete tabIndex={0} />
246
+ * ```
177
247
  */
178
248
  tabIndex?: number;
179
249
  /**
180
250
  * Specifies the `accessKey` of the AutoComplete.
251
+ *
252
+ * @example
253
+ * ```jsx
254
+ * <AutoComplete accessKey="a" />
255
+ * ```
181
256
  */
182
257
  accessKey?: string;
183
258
  /**
184
259
  * Sets the data item field that represents the item text ([see example]({% slug binding_autocomplete %}#toc-datasets-of-objects)). If the data contains only primitive values, do not define it.
260
+ *
261
+ * @example
262
+ * ```jsx
263
+ * <AutoComplete textField="name" />
264
+ * ```
185
265
  */
186
266
  textField?: string;
187
267
  /**
188
268
  * Renders a floating label for the AutoComplete.
269
+ *
270
+ * @example
271
+ * ```jsx
272
+ * <AutoComplete label="Search" />
273
+ * ```
189
274
  */
190
275
  label?: string;
191
276
  /**
192
277
  * Configures the popup of the AutoComplete.
278
+ *
279
+ * @example
280
+ * ```jsx
281
+ * <AutoComplete popupSettings={{ animate: true }} />
282
+ * ```
193
283
  */
194
284
  popupSettings?: DropDownsPopupSettings;
195
285
  /**
196
286
  * Specifies the id of the component.
287
+ *
288
+ * @example
289
+ * ```jsx
290
+ * <AutoComplete id="autocomplete" />
291
+ * ```
197
292
  */
198
293
  id?: string;
199
294
  /**
200
295
  * Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
201
296
  * For example these elements could contain error or hint message.
297
+ *
298
+ * @example
299
+ * ```jsx
300
+ * <AutoComplete ariaDescribedBy="description" />
301
+ * ```
202
302
  */
203
303
  ariaDescribedBy?: string;
204
304
  /**
205
305
  * Identifies the element(s) which will label the component.
306
+ *
307
+ * @example
308
+ * ```jsx
309
+ * <AutoComplete ariaLabelledBy="label" />
310
+ * ```
206
311
  */
207
312
  ariaLabelledBy?: string;
208
313
  /**
@@ -211,7 +316,7 @@ export declare interface AutoCompleteProps extends FormComponentProps {
211
316
  * Default functionality returns the first item which starts with the input text.
212
317
  *
213
318
  * @example
214
- * ```jsx-no-run
319
+ * ```jsx
215
320
  * const focusedItemIndex = (data, inputText, textField) => {
216
321
  * let text = inputText.toLowerCase();
217
322
  * return data.findIndex(item =>
@@ -224,42 +329,92 @@ export declare interface AutoCompleteProps extends FormComponentProps {
224
329
  focusedItemIndex?: (data: any, inputText: string, textField?: string) => number;
225
330
  /**
226
331
  * Fires each time the popup of the AutoComplete is about to open.
332
+ *
333
+ * @example
334
+ * ```jsx
335
+ * <AutoComplete onOpen={(event) => console.log('Popup opened', event)} />
336
+ * ```
227
337
  */
228
338
  onOpen?: (event: AutoCompleteOpenEvent) => void;
229
339
  /**
230
340
  * Fires each time the popup of the AutoComplete is about to close.
341
+ *
342
+ * @example
343
+ * ```jsx
344
+ * <AutoComplete onClose={(event) => console.log('Popup closed', event)} />
345
+ * ```
231
346
  */
232
347
  onClose?: (event: AutoCompleteCloseEvent) => void;
233
348
  /**
234
349
  * Fires each time the user focuses the AutoComplete.
350
+ *
351
+ * @example
352
+ * ```jsx
353
+ * <AutoComplete onFocus={(event) => console.log('Focused', event)} />
354
+ * ```
235
355
  */
236
356
  onFocus?: (event: AutoCompleteFocusEvent) => void;
237
357
  /**
238
358
  * Fires each time the AutoComplete gets blurred.
359
+ *
360
+ * @example
361
+ * ```jsx
362
+ * <AutoComplete onBlur={(event) => console.log('Blurred', event)} />
363
+ * ```
239
364
  */
240
365
  onBlur?: (event: AutoCompleteBlurEvent) => void;
241
366
  /**
242
367
  * Fires each time the value of the AutoComplete is about to change ([more information and example]({% slug binding_autocomplete %})).
368
+ *
369
+ * @example
370
+ * ```jsx
371
+ * <AutoComplete onChange={(event) => console.log('Value changed', event)} />
372
+ * ```
243
373
  */
244
374
  onChange?: (event: AutoCompleteChangeEvent) => void;
245
375
  /**
246
376
  * Fires when the AutoComplete input element is about to be rendered. Use it to override the default appearance of the component.
377
+ *
378
+ * @example
379
+ * ```jsx
380
+ * <AutoComplete valueRender={(rendering) => <span>{rendering}</span>} />
381
+ * ```
247
382
  */
248
383
  valueRender?: (rendering: React.ReactElement<HTMLSpanElement>) => React.ReactNode;
249
384
  /**
250
385
  * Fires when an AutoComplete list item is about to be rendered ([see example]({% slug customrendering_autocomplete %}#toc-items)). Used to override the default appearance of the list items.
386
+ *
387
+ * @example
388
+ * ```jsx
389
+ * <AutoComplete itemRender={(li, itemProps) => <li>{itemProps.dataItem}</li>} />
390
+ * ```
251
391
  */
252
392
  itemRender?: (li: React.ReactElement<HTMLLIElement>, itemProps: ListItemProps) => React.ReactNode;
253
393
  /**
254
394
  * Fires when the element which indicates no data in the popup is about to be rendered ([see example]({% slug customrendering_autocomplete %}#toc-no-data)). Used to override the default appearance of the element.
395
+ *
396
+ * @example
397
+ * ```jsx
398
+ * <AutoComplete listNoDataRender={(element) => <div>No data available</div>} />
399
+ * ```
255
400
  */
256
401
  listNoDataRender?: (element: React.ReactElement<HTMLDivElement>) => React.ReactNode;
257
402
  /**
258
403
  * Sets the header component of the AutoComplete ([see example]({% slug customrendering_autocomplete %}#toc-headers-and-footers)).
404
+ *
405
+ * @example
406
+ * ```jsx
407
+ * <AutoComplete header={<div>Header</div>} />
408
+ * ```
259
409
  */
260
410
  header?: React.ReactNode;
261
411
  /**
262
412
  * Sets the footer component of the AutoComplete ([see example]({% slug customrendering_autocomplete %}#toc-headers-and-footers)).
413
+ *
414
+ * @example
415
+ * ```jsx
416
+ * <AutoComplete footer={<div>Footer</div>} />
417
+ * ```
263
418
  */
264
419
  footer?: React.ReactNode;
265
420
  /**
@@ -272,6 +427,11 @@ export declare interface AutoCompleteProps extends FormComponentProps {
272
427
  * - null&mdash;Does not set a size `className`.
273
428
  *
274
429
  * @default `medium`
430
+ *
431
+ * @example
432
+ * ```jsx
433
+ * <AutoComplete size="small" />
434
+ * ```
275
435
  */
276
436
  size?: null | 'small' | 'medium' | 'large';
277
437
  /**
@@ -285,6 +445,11 @@ export declare interface AutoCompleteProps extends FormComponentProps {
285
445
  * - null&mdash;Does not set a rounded `className`.
286
446
  *
287
447
  * @default `medium`
448
+ *
449
+ * @example
450
+ * ```jsx
451
+ * <AutoComplete rounded="large" />
452
+ * ```
288
453
  */
289
454
  rounded?: null | 'small' | 'medium' | 'large' | 'full';
290
455
  /**
@@ -297,18 +462,38 @@ export declare interface AutoCompleteProps extends FormComponentProps {
297
462
  * - null&mdash;Does not set a fillMode `className`.
298
463
  *
299
464
  * @default `solid`
465
+ *
466
+ * @example
467
+ * ```jsx
468
+ * <AutoComplete fillMode="flat" />
469
+ * ```
300
470
  */
301
471
  fillMode?: null | 'solid' | 'flat' | 'outline';
302
472
  /**
303
473
  * Sets the data item field that represents the start of a group. Applicable to objects data.
474
+ *
475
+ * @example
476
+ * ```jsx
477
+ * <AutoComplete groupField="category" />
478
+ * ```
304
479
  */
305
480
  groupField?: string;
306
481
  /**
307
482
  * Fires when a AutoComplete group header item is about to be rendered. Used to override the default appearance of the group's headers.
483
+ *
484
+ * @example
485
+ * ```jsx
486
+ * <AutoComplete groupHeaderItemRender={(li, itemProps) => <li>{itemProps.dataItem}</li>} />
487
+ * ```
308
488
  */
309
489
  groupHeaderItemRender?: (li: React.ReactElement<HTMLLIElement>, itemProps: ListGroupItemProps) => React.ReactNode;
310
490
  /**
311
491
  * Fires when a AutoComplete sticky group header item is about to be rendered. Used to override the default appearance of the sticky group header of the component.
492
+ *
493
+ * @example
494
+ * ```jsx
495
+ * <AutoComplete groupStickyHeaderItemRender={(div, stickyHeaderProps) => <div>{stickyHeaderProps.dataItem}</div>} />
496
+ * ```
312
497
  */
313
498
  groupStickyHeaderItemRender?: (div: React.ReactElement<HTMLDivElement>, stickyHeaderProps: GroupStickyHeaderProps) => React.ReactNode;
314
499
  /**
@@ -317,31 +502,66 @@ export declare interface AutoCompleteProps extends FormComponentProps {
317
502
  list?: any;
318
503
  /**
319
504
  * Sets the key for comparing the data items of the AutoComplete. If `dataItemKey` is not set, the AutoComplete compares the items by reference.
505
+ *
506
+ * @example
507
+ * ```jsx
508
+ * <AutoComplete dataItemKey="id" />
509
+ * ```
320
510
  */
321
511
  dataItemKey?: string;
322
512
  /**
323
513
  * Providing different rendering of the popup element based on the screen dimensions.
514
+ *
515
+ * @example
516
+ * ```jsx
517
+ * <AutoComplete adaptive={true} />
518
+ * ```
324
519
  */
325
520
  adaptive?: boolean;
326
521
  /**
327
522
  * Specifies the text that is rendered as title in the adaptive popup.
523
+ *
524
+ * @example
525
+ * ```jsx
526
+ * <AutoComplete adaptiveTitle="Select an item" />
527
+ * ```
328
528
  */
329
529
  adaptiveTitle?: string;
330
530
  /**
331
531
  * Defines if AutoComplete's disabled items will be skipped or focused when navigating through the list of items using a keyboard. Defaults to `true`.
532
+ *
533
+ * @example
534
+ * ```jsx
535
+ * <AutoComplete skipDisabledItems={false} />
536
+ * ```
332
537
  */
333
538
  skipDisabledItems?: boolean;
334
539
  /**
335
540
  * Sets a custom prefix to the AutoComplete component.
541
+ *
542
+ * @example
543
+ * ```jsx
544
+ * <AutoComplete prefix={<span>Prefix</span>} />
545
+ * ```
336
546
  */
337
547
  prefix?: CustomComponent<any>;
338
548
  /**
339
549
  * Sets a custom suffix to the AutoComplete component.
550
+ *
551
+ * @example
552
+ * ```jsx
553
+ * <AutoComplete suffix={<span>Suffix</span>} />
554
+ * ```
340
555
  */
341
556
  suffix?: CustomComponent<any>;
342
557
  /**
343
558
  * Sets the HTML attributes of the inner focusable input element.
344
559
  * Attributes which are essential for certain component functionalities cannot be changed.
560
+ *
561
+ * @example
562
+ * ```jsx
563
+ * <AutoComplete inputAttributes={{ maxLength: 10 }} />
564
+ * ```
345
565
  */
346
566
  inputAttributes?: React.InputHTMLAttributes<HTMLInputElement>;
347
567
  /**
@@ -684,98 +904,218 @@ export declare interface ComboBoxPageChangeEvent extends PageChangeEvent<ComboBo
684
904
  export declare interface ComboBoxProps extends FormComponentProps {
685
905
  /**
686
906
  * Sets the data of the ComboBox ([more information and examples]({% slug binding_combobox %})).
907
+ *
908
+ * @example
909
+ * ```jsx
910
+ * <ComboBox data={['Option1', 'Option2', 'Option3']} />
911
+ * ```
687
912
  */
688
913
  data?: any[];
689
914
  /**
690
915
  * Sets the opened and closed state of the ComboBox.
916
+ *
917
+ * @example
918
+ * ```jsx
919
+ * <ComboBox opened={true} />
920
+ * ```
691
921
  */
692
922
  opened?: boolean;
693
923
  /**
694
924
  * The styles that are applied to the ComboBox.
925
+ *
926
+ * @example
927
+ * ```jsx
928
+ * <ComboBox style={{ width: '250px' }} />
929
+ * ```
695
930
  */
696
931
  style?: React.CSSProperties;
697
932
  /**
698
- * Sets the value of the ComboBox ([more information and examples]({% slug binding_combobox %})). It can either be of the primitive (string, numbers) or of the complex (objects) type.
933
+ * Sets the value of the ComboBox ([more information and examples]({% slug binding_combobox %})).
934
+ *
935
+ * @example
936
+ * ```jsx
937
+ * <ComboBox value="Option1" />
938
+ * ```
699
939
  */
700
940
  value?: any;
701
941
  /**
702
942
  * Sets the default value of the ComboBox. Similar to the native `select` HTML element.
943
+ *
944
+ * @example
945
+ * ```jsx
946
+ * <ComboBox defaultValue="Option2" />
947
+ * ```
703
948
  */
704
949
  defaultValue?: any;
705
950
  /**
706
951
  * Sets additional classes to the ComboBox.
952
+ *
953
+ * @example
954
+ * ```jsx
955
+ * <ComboBox className="custom-class" />
956
+ * ```
707
957
  */
708
958
  className?: string;
709
959
  /**
710
960
  * Sets CSS classes to the expand `icon` DOM element.
961
+ *
962
+ * @example
963
+ * ```jsx
964
+ * <ComboBox iconClassName="custom-icon-class" />
965
+ * ```
711
966
  */
712
967
  iconClassName?: string;
713
968
  /**
714
969
  * Sets the specified SVG icon.
970
+ *
971
+ * @example
972
+ * ```jsx
973
+ * <ComboBox svgIcon={{ name: 'custom-icon' }} />
974
+ * ```
715
975
  */
716
976
  svgIcon?: SVGIcon;
717
977
  /**
718
978
  * If `clearButton` is set to `true`, the ComboBox renders a button on hovering over the component. Clicking this button resets the value of the ComboBox to `undefined` and triggers the `change` event.
979
+ *
980
+ * @example
981
+ * ```jsx
982
+ * <ComboBox clearButton={true} />
983
+ * ```
719
984
  */
720
985
  clearButton?: boolean;
721
986
  /**
722
987
  * The hint that is displayed when the ComboBox is empty.
988
+ *
989
+ * @example
990
+ * ```jsx
991
+ * <ComboBox placeholder="Select an option" />
992
+ * ```
723
993
  */
724
994
  placeholder?: string;
725
995
  /**
726
996
  * Sets the title attribute to the underlying input element of the ComboBox.
997
+ *
998
+ * @example
999
+ * ```jsx
1000
+ * <ComboBox title="ComboBox Title" />
1001
+ * ```
727
1002
  */
728
1003
  title?: string;
729
1004
  /**
730
1005
  * Enables the auto-completion of the text based on the first data item ([see example]({% slug suggestions_combobox %})).
1006
+ *
1007
+ * @example
1008
+ * ```jsx
1009
+ * <ComboBox suggest={true} />
1010
+ * ```
731
1011
  */
732
1012
  suggest?: boolean;
733
1013
  /**
734
1014
  * Specifies whether the ComboBox allows user-defined values that are not present in the dataset ([see example]({% slug custom_values_combobox %})). Defaults to `false`.
1015
+ *
1016
+ * @example
1017
+ * ```jsx
1018
+ * <ComboBox allowCustom={true} />
1019
+ * ```
735
1020
  */
736
1021
  allowCustom?: boolean;
737
1022
  /**
738
1023
  * Sets the disabled state of the ComboBox.
1024
+ *
1025
+ * @example
1026
+ * ```jsx
1027
+ * <ComboBox disabled={true} />
1028
+ * ```
739
1029
  */
740
1030
  disabled?: boolean;
741
1031
  /**
742
1032
  * Represents the `dir` HTML attribute.
1033
+ *
1034
+ * @example
1035
+ * ```jsx
1036
+ * <ComboBox dir="rtl" />
1037
+ * ```
743
1038
  */
744
1039
  dir?: string;
745
1040
  /**
746
1041
  * Enables the filtering functionality of the ComboBox ([more information and examples]({% slug filtering_combobox %})).
1042
+ *
1043
+ * @example
1044
+ * ```jsx
1045
+ * <ComboBox filterable={true} />
1046
+ * ```
747
1047
  */
748
1048
  filterable?: boolean;
749
1049
  /**
750
1050
  * Sets the value of ComboBox input. Useful for making the ComboBox input a [controlled component](https://react.dev/learn/sharing-state-between-components#controlled-and-uncontrolled-components).
1051
+ *
1052
+ * @example
1053
+ * ```jsx
1054
+ * <ComboBox filter="Option" />
1055
+ * ```
751
1056
  */
752
1057
  filter?: string | null;
753
1058
  /**
754
- * Sets the value of the adaptive filtering input of the of ComboBox.
1059
+ * Sets the value of the adaptive filtering input of the ComboBox.
1060
+ *
1061
+ * @example
1062
+ * ```jsx
1063
+ * <ComboBox adaptiveFilter="Option" />
1064
+ * ```
755
1065
  */
756
1066
  adaptiveFilter?: string;
757
1067
  /**
758
1068
  * Sets the loading state of the ComboBox ([see example]({% slug filtering_combobox %}#toc-basic-configuration)).
1069
+ *
1070
+ * @example
1071
+ * ```jsx
1072
+ * <ComboBox loading={true} />
1073
+ * ```
759
1074
  */
760
1075
  loading?: boolean;
761
1076
  /**
762
1077
  * Specifies the `tabIndex` of the ComboBox.
763
- */
764
- tabIndex?: number;
765
- /**
1078
+ *
1079
+ * @example
1080
+ * ```jsx
1081
+ * <ComboBox tabIndex={0} />
1082
+ * ```
1083
+ */
1084
+ tabIndex?: number;
1085
+ /**
766
1086
  * Specifies the `accessKey` of the ComboBox.
1087
+ *
1088
+ * @example
1089
+ * ```jsx
1090
+ * <ComboBox accessKey="k" />
1091
+ * ```
767
1092
  */
768
1093
  accessKey?: string;
769
1094
  /**
770
1095
  * Sets the data item field that represents the item text. If the data contains only primitive values, do not define it.
1096
+ *
1097
+ * @example
1098
+ * ```jsx
1099
+ * <ComboBox textField="name" />
1100
+ * ```
771
1101
  */
772
1102
  textField?: string;
773
1103
  /**
774
1104
  * Sets the data item field that represents the start of a group. Applicable to objects data.
1105
+ *
1106
+ * @example
1107
+ * ```jsx
1108
+ * <ComboBox groupField="category" />
1109
+ * ```
775
1110
  */
776
1111
  groupField?: string;
777
1112
  /**
778
1113
  * Defines the `classic` or `modern` type of the grouping's visualization. Defaults to `modern`.
1114
+ *
1115
+ * @example
1116
+ * ```jsx
1117
+ * <ComboBox groupMode="classic" />
1118
+ * ```
779
1119
  */
780
1120
  groupMode?: string;
781
1121
  /**
@@ -784,35 +1124,75 @@ export declare interface ComboBoxProps extends FormComponentProps {
784
1124
  isMultiColumn?: boolean;
785
1125
  /**
786
1126
  * Sets the key for comparing the data items of the ComboBox. If `dataItemKey` is not set, the ComboBox compares the items by reference ([see example]({% slug binding_combobox %}#toc-datasets-of-objects)).
1127
+ *
1128
+ * @example
1129
+ * ```jsx
1130
+ * <ComboBox dataItemKey="id" />
1131
+ * ```
787
1132
  */
788
1133
  dataItemKey?: string;
789
1134
  /**
790
1135
  * Renders a floating label for the ComboBox.
1136
+ *
1137
+ * @example
1138
+ * ```jsx
1139
+ * <ComboBox label="Select an option" />
1140
+ * ```
791
1141
  */
792
1142
  label?: string;
793
1143
  /**
794
1144
  * Configures the popup of the ComboBox.
1145
+ *
1146
+ * @example
1147
+ * ```jsx
1148
+ * <ComboBox popupSettings={{ animate: true }} />
1149
+ * ```
795
1150
  */
796
1151
  popupSettings?: DropDownsPopupSettings;
797
1152
  /**
798
1153
  * Configures the virtual scrolling of the ComboBox ([more information and examples]({% slug virtualization_combobox %})).
1154
+ *
1155
+ * @example
1156
+ * ```jsx
1157
+ * <ComboBox virtual={{ pageSize: 20 }} />
1158
+ * ```
799
1159
  */
800
1160
  virtual?: VirtualizationSettings;
801
1161
  /**
802
1162
  * Specifies the id of the component.
1163
+ *
1164
+ * @example
1165
+ * ```jsx
1166
+ * <ComboBox id="comboBoxId" />
1167
+ * ```
803
1168
  */
804
1169
  id?: string;
805
1170
  /**
806
1171
  * Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
807
1172
  * For example these elements could contain error or hint message.
1173
+ *
1174
+ * @example
1175
+ * ```jsx
1176
+ * <ComboBox ariaDescribedBy="descriptionId" />
1177
+ * ```
808
1178
  */
809
1179
  ariaDescribedBy?: string;
810
1180
  /**
811
1181
  * Identifies the element(s) which will label the component.
1182
+ *
1183
+ * @example
1184
+ * ```jsx
1185
+ * <ComboBox ariaLabelledBy="labelId" />
1186
+ * ```
812
1187
  */
813
1188
  ariaLabelledBy?: string;
814
1189
  /**
815
1190
  * The accessible label of the component.
1191
+ *
1192
+ * @example
1193
+ * ```jsx
1194
+ * <ComboBox ariaLabel="ComboBox Label" />
1195
+ * ```
816
1196
  */
817
1197
  ariaLabel?: string;
818
1198
  /**
@@ -821,7 +1201,7 @@ export declare interface ComboBoxProps extends FormComponentProps {
821
1201
  * Default functionality returns the first item which starts with the input text.
822
1202
  *
823
1203
  * @example
824
- * ```jsx-no-run
1204
+ * ```jsx
825
1205
  * const focusedItemIndex = (data, inputText, textField) => {
826
1206
  * let text = inputText.toLowerCase();
827
1207
  * return data.findIndex(item =>
@@ -834,50 +1214,110 @@ export declare interface ComboBoxProps extends FormComponentProps {
834
1214
  focusedItemIndex?: (data: any, inputText: string, textField?: string) => number;
835
1215
  /**
836
1216
  * Fires each time the popup of the ComboBox is about to open.
1217
+ *
1218
+ * @example
1219
+ * ```jsx
1220
+ * <ComboBox onOpen={(event) => console.log('Popup opened', event)} />
1221
+ * ```
837
1222
  */
838
1223
  onOpen?: (event: ComboBoxOpenEvent) => void;
839
1224
  /**
840
1225
  * Fires each time the popup of the ComboBox is about to close.
1226
+ *
1227
+ * @example
1228
+ * ```jsx
1229
+ * <ComboBox onClose={(event) => console.log('Popup closed', event)} />
1230
+ * ```
841
1231
  */
842
1232
  onClose?: (event: ComboBoxCloseEvent) => void;
843
1233
  /**
844
1234
  * Fires each time the user focuses the ComboBox.
1235
+ *
1236
+ * @example
1237
+ * ```jsx
1238
+ * <ComboBox onFocus={(event) => console.log('ComboBox focused', event)} />
1239
+ * ```
845
1240
  */
846
1241
  onFocus?: (event: ComboBoxFocusEvent) => void;
847
1242
  /**
848
1243
  * Fires each time the ComboBox gets blurred.
1244
+ *
1245
+ * @example
1246
+ * ```jsx
1247
+ * <ComboBox onBlur={(event) => console.log('ComboBox blurred', event)} />
1248
+ * ```
849
1249
  */
850
1250
  onBlur?: (event: ComboBoxBlurEvent) => void;
851
1251
  /**
852
1252
  * Fires each time the value of the ComboBox is about to change ([see examples]({% slug binding_combobox %})).
1253
+ *
1254
+ * @example
1255
+ * ```jsx
1256
+ * <ComboBox onChange={(event) => console.log('Value changed', event)} />
1257
+ * ```
853
1258
  */
854
1259
  onChange?: (event: ComboBoxChangeEvent) => void;
855
1260
  /**
856
1261
  * Fires each time the user types in the filter input ([see examples]({% slug filtering_combobox %}#toc-basic-configuration)). You can filter the source based on the passed filtration value.
1262
+ *
1263
+ * @example
1264
+ * ```jsx
1265
+ * <ComboBox onFilterChange={(event) => console.log('Filter changed', event)} />
1266
+ * ```
857
1267
  */
858
1268
  onFilterChange?: (event: ComboBoxFilterChangeEvent) => void;
859
1269
  /**
860
1270
  * Fires when both the virtual scrolling of the ComboBox is enabled and the component requires data for another page ([more information and examples]({% slug virtualization_combobox %})).
1271
+ *
1272
+ * @example
1273
+ * ```jsx
1274
+ * <ComboBox onPageChange={(event) => console.log('Page changed', event)} />
1275
+ * ```
861
1276
  */
862
1277
  onPageChange?: (event: ComboBoxPageChangeEvent) => void;
863
1278
  /**
864
1279
  * Fires when the ComboBox input element is about to be rendered. Use it to override the default appearance of the component.
1280
+ *
1281
+ * @example
1282
+ * ```jsx
1283
+ * <ComboBox valueRender={(rendering) => <span>{rendering}</span>} />
1284
+ * ```
865
1285
  */
866
1286
  valueRender?: (rendering: React.ReactElement<HTMLSpanElement>) => React.ReactNode;
867
1287
  /**
868
1288
  * Fires when a ComboBox list item is about to be rendered ([see example]({% slug customrendering_combobox %}#toc-items)). Used to override the default appearance of the list items.
1289
+ *
1290
+ * @example
1291
+ * ```jsx
1292
+ * <ComboBox itemRender={(li, itemProps) => <li>{itemProps.dataItem}</li>} />
1293
+ * ```
869
1294
  */
870
1295
  itemRender?: (li: React.ReactElement<HTMLLIElement>, itemProps: ListItemProps) => React.ReactNode;
871
1296
  /**
872
1297
  * Fires when a ComboBox group header item is about to be rendered. Used to override the default appearance of the group's headers when the component is configured in `modern` group mode.
1298
+ *
1299
+ * @example
1300
+ * ```jsx
1301
+ * <ComboBox groupHeaderItemRender={(li, itemProps) => <li>{itemProps.dataItem}</li>} />
1302
+ * ```
873
1303
  */
874
1304
  groupHeaderItemRender?: (li: React.ReactElement<HTMLLIElement>, itemProps: ListGroupItemProps) => React.ReactNode;
875
1305
  /**
876
1306
  * Fires when a ComboBox sticky group header item is about to be rendered. Used to override the default appearance of the sticky group header of the component.
1307
+ *
1308
+ * @example
1309
+ * ```jsx
1310
+ * <ComboBox groupStickyHeaderItemRender={(div, stickyHeaderProps) => <div>{stickyHeaderProps.group}</div>} />
1311
+ * ```
877
1312
  */
878
1313
  groupStickyHeaderItemRender?: (div: React.ReactElement<HTMLDivElement>, stickyHeaderProps: GroupStickyHeaderProps) => React.ReactNode;
879
1314
  /**
880
1315
  * Fires when the element which indicates no data in the popup is about to be rendered. Used to override the default appearance of the element.
1316
+ *
1317
+ * @example
1318
+ * ```jsx
1319
+ * <ComboBox listNoDataRender={(element) => <div>No data available</div>} />
1320
+ * ```
881
1321
  */
882
1322
  listNoDataRender?: (element: React.ReactElement<HTMLDivElement>) => React.ReactNode;
883
1323
  /**
@@ -888,10 +1328,20 @@ export declare interface ComboBoxProps extends FormComponentProps {
888
1328
  }) => void;
889
1329
  /**
890
1330
  * Sets the header component of the ComboBox ([see example]({% slug customrendering_combobox %}#toc-headers-and-footers)).
1331
+ *
1332
+ * @example
1333
+ * ```jsx
1334
+ * <ComboBox header={<div>Header Content</div>} />
1335
+ * ```
891
1336
  */
892
1337
  header?: React.ReactNode;
893
1338
  /**
894
1339
  * Sets the footer component of the ComboBox ([see example]({% slug customrendering_combobox %}#toc-headers-and-footers)).
1340
+ *
1341
+ * @example
1342
+ * ```jsx
1343
+ * <ComboBox footer={<div>Footer Content</div>} />
1344
+ * ```
895
1345
  */
896
1346
  footer?: React.ReactNode;
897
1347
  /**
@@ -912,6 +1362,11 @@ export declare interface ComboBoxProps extends FormComponentProps {
912
1362
  * - null&mdash;Does not set a size `className`.
913
1363
  *
914
1364
  * @default `medium`
1365
+ *
1366
+ * @example
1367
+ * ```jsx
1368
+ * <ComboBox size="large" />
1369
+ * ```
915
1370
  */
916
1371
  size?: null | 'small' | 'medium' | 'large';
917
1372
  /**
@@ -925,6 +1380,11 @@ export declare interface ComboBoxProps extends FormComponentProps {
925
1380
  * - null&mdash;Does not set a rounded `className`.
926
1381
  *
927
1382
  * @default `medium`
1383
+ *
1384
+ * @example
1385
+ * ```jsx
1386
+ * <ComboBox rounded="full" />
1387
+ * ```
928
1388
  */
929
1389
  rounded?: null | 'small' | 'medium' | 'large' | 'full';
930
1390
  /**
@@ -937,26 +1397,56 @@ export declare interface ComboBoxProps extends FormComponentProps {
937
1397
  * - null&mdash;Does not set a fillMode `className`.
938
1398
  *
939
1399
  * @default `solid`
1400
+ *
1401
+ * @example
1402
+ * ```jsx
1403
+ * <ComboBox fillMode="flat" />
1404
+ * ```
940
1405
  */
941
1406
  fillMode?: null | 'solid' | 'flat' | 'outline';
942
1407
  /**
943
1408
  * Providing different rendering of the popup element based on the screen dimensions.
1409
+ *
1410
+ * @example
1411
+ * ```jsx
1412
+ * <ComboBox adaptive={true} />
1413
+ * ```
944
1414
  */
945
1415
  adaptive?: boolean;
946
1416
  /**
947
1417
  * Specifies the text that is rendered as title in the adaptive popup.
1418
+ *
1419
+ * @example
1420
+ * ```jsx
1421
+ * <ComboBox adaptiveTitle="Adaptive Popup Title" />
1422
+ * ```
948
1423
  */
949
1424
  adaptiveTitle?: string;
950
1425
  /**
951
1426
  * Defines if ComboBox's disabled items will be skipped or focused when navigating through the list of items using a keyboard. Defaults to `true`.
1427
+ *
1428
+ * @example
1429
+ * ```jsx
1430
+ * <ComboBox skipDisabledItems={false} />
1431
+ * ```
952
1432
  */
953
1433
  skipDisabledItems?: boolean;
954
1434
  /**
955
1435
  * Sets a custom prefix to the ComboBox component.
1436
+ *
1437
+ * @example
1438
+ * ```jsx
1439
+ * <ComboBox prefix={<span>Prefix</span>} />
1440
+ * ```
956
1441
  */
957
1442
  prefix?: CustomComponent<any>;
958
1443
  /**
959
1444
  * Sets a custom suffix to the ComboBox component.
1445
+ *
1446
+ * @example
1447
+ * ```jsx
1448
+ * <ComboBox suffix={<span>Suffix</span>} />
1449
+ * ```
960
1450
  */
961
1451
  suffix?: CustomComponent<any>;
962
1452
  /**
@@ -966,6 +1456,11 @@ export declare interface ComboBoxProps extends FormComponentProps {
966
1456
  /**
967
1457
  * Sets the HTML attributes of the inner focusable input element.
968
1458
  * Attributes which are essential for certain component functionalities cannot be changed.
1459
+ *
1460
+ * @example
1461
+ * ```jsx
1462
+ * <ComboBox inputAttributes={{ maxLength: 10 }} />
1463
+ * ```
969
1464
  */
970
1465
  inputAttributes?: React.InputHTMLAttributes<HTMLInputElement>;
971
1466
  /**
@@ -1502,93 +1997,198 @@ export declare interface DropDownListPageChangeEvent extends PageChangeEvent<Dro
1502
1997
  export declare interface DropDownListProps extends FormComponentProps {
1503
1998
  /**
1504
1999
  * Sets the data of the DropDownList ([see example]({% slug binding_dropdownlist %})).
2000
+ *
2001
+ * @example
2002
+ * ```jsx
2003
+ * <DropDownList data={['Item1', 'Item2', 'Item3']} />
2004
+ * ```
1505
2005
  */
1506
2006
  data?: any[];
1507
2007
  /**
1508
2008
  * Sets the text of the default empty item. The type of the defined value has to match the data type.
2009
+ *
2010
+ * @example
2011
+ * ```jsx
2012
+ * <DropDownList defaultItem="Select an item" />
2013
+ * ```
1509
2014
  */
1510
2015
  defaultItem?: any;
1511
2016
  /**
1512
2017
  * Sets the delay before an item search is performed. When filtration is disabled, use this option.
2018
+ *
2019
+ * @example
2020
+ * ```jsx
2021
+ * <DropDownList delay={300} />
2022
+ * ```
1513
2023
  */
1514
2024
  delay?: number;
1515
2025
  /**
1516
2026
  * Enables a case-insensitive search. When filtering is disabled, use this option.
2027
+ *
2028
+ * @example
2029
+ * ```jsx
2030
+ * <DropDownList ignoreCase={true} />
2031
+ * ```
1517
2032
  */
1518
2033
  ignoreCase?: boolean;
1519
2034
  /**
1520
2035
  * Sets the opened and closed state of the DropDownList.
2036
+ *
2037
+ * @example
2038
+ * ```jsx
2039
+ * <DropDownList opened={true} />
2040
+ * ```
1521
2041
  */
1522
2042
  opened?: boolean;
1523
2043
  /**
1524
2044
  * The styles that are applied to the DropDownList.
2045
+ *
2046
+ * @example
2047
+ * ```jsx
2048
+ * <DropDownList style={{ width: '200px' }} />
2049
+ * ```
1525
2050
  */
1526
2051
  style?: React.CSSProperties;
1527
2052
  /**
1528
2053
  * Sets the value of the DropDownList ([see example]({% slug binding_dropdownlist %})). It can either be of the primitive (string, numbers) or of the complex (objects) type.
2054
+ *
2055
+ * @example
2056
+ * ```jsx
2057
+ * <DropDownList value="Item1" />
2058
+ * ```
1529
2059
  */
1530
2060
  value?: any;
1531
2061
  /**
1532
2062
  * Sets the default value of the DropDownList ([see example]({% slug defaultitem_dropdownlist %})). Similar to the native `select` HTML element.
2063
+ *
2064
+ * @example
2065
+ * ```jsx
2066
+ * <DropDownList defaultValue="Item1" />
2067
+ * ```
1533
2068
  */
1534
2069
  defaultValue?: any;
1535
2070
  /**
1536
2071
  * Sets additional classes to the DropDownList.
2072
+ *
2073
+ * @example
2074
+ * ```jsx
2075
+ * <DropDownList className="custom-class" />
2076
+ * ```
1537
2077
  */
1538
2078
  className?: string;
1539
2079
  /**
1540
2080
  * Sets CSS classes to the expand `icon` DOM element.
2081
+ *
2082
+ * @example
2083
+ * ```jsx
2084
+ * <DropDownList iconClassName="custom-icon-class" />
2085
+ * ```
1541
2086
  */
1542
2087
  iconClassName?: string;
1543
2088
  /**
1544
2089
  * Sets the specified SVG icon.
2090
+ *
2091
+ * @example
2092
+ * ```jsx
2093
+ * <DropDownList svgIcon={{ name: 'custom-icon' }} />
2094
+ * ```
1545
2095
  */
1546
2096
  svgIcon?: SVGIcon;
1547
2097
  /**
1548
2098
  * Sets the title attribute to the DropDownList DOM element.
2099
+ *
2100
+ * @example
2101
+ * ```jsx
2102
+ * <DropDownList title="Dropdown Title" />
2103
+ * ```
1549
2104
  */
1550
2105
  title?: string;
1551
2106
  /**
1552
2107
  * Sets the disabled state of the DropDownList.
2108
+ *
2109
+ * @example
2110
+ * ```jsx
2111
+ * <DropDownList disabled={true} />
2112
+ * ```
1553
2113
  */
1554
2114
  disabled?: boolean;
1555
2115
  /**
1556
2116
  * Represents the `dir` HTML attribute.
2117
+ *
2118
+ * @example
2119
+ * ```jsx
2120
+ * <DropDownList dir="rtl" />
2121
+ * ```
1557
2122
  */
1558
2123
  dir?: string;
1559
2124
  /**
1560
2125
  * Enables the filtering functionality of the DropDownList ([more information and examples]({% slug filtering_dropdownlist %})).
2126
+ *
2127
+ * @example
2128
+ * ```jsx
2129
+ * <DropDownList filterable={true} />
2130
+ * ```
1561
2131
  */
1562
2132
  filterable?: boolean;
1563
2133
  /**
1564
2134
  * Sets the value of filtering input. Useful for making the filtering input a [controlled component](https://react.dev/learn/sharing-state-between-components#controlled-and-uncontrolled-components).
2135
+ *
2136
+ * @example
2137
+ * ```jsx
2138
+ * <DropDownList filter="search text" />
2139
+ * ```
1565
2140
  */
1566
2141
  filter?: string;
1567
2142
  /**
1568
2143
  * Sets the loading state of the DropDownList.
2144
+ *
2145
+ * @example
2146
+ * ```jsx
2147
+ * <DropDownList loading={true} />
2148
+ * ```
1569
2149
  */
1570
2150
  loading?: boolean;
1571
2151
  /**
1572
2152
  * Specifies the `tabIndex` of the DropDownList.
2153
+ *
2154
+ * @example
2155
+ * ```jsx
2156
+ * <DropDownList tabIndex={0} />
2157
+ * ```
1573
2158
  */
1574
2159
  tabIndex?: number;
1575
2160
  /**
1576
2161
  * Specifies the `accessKey` of the DropDownList.
2162
+ *
2163
+ * @example
2164
+ * ```jsx
2165
+ * <DropDownList accessKey="d" />
2166
+ * ```
1577
2167
  */
1578
2168
  accessKey?: string;
1579
2169
  /**
1580
2170
  * Sets the data item field that represents the item text ([see example]({% slug defaultitem_dropdownlist %})). If the data contains only primitive values, do not define it.
2171
+ *
2172
+ * @example
2173
+ * ```jsx
2174
+ * <DropDownList textField="name" />
2175
+ * ```
1581
2176
  */
1582
2177
  textField?: string;
1583
2178
  /**
1584
2179
  * Sets the key for comparing the data items of the DropDownList. If `dataItemKey` is not set, the DropDownList compares the items by reference ([see example]({% slug binding_dropdownlist %}#toc-datasets-of-objects)).
2180
+ *
2181
+ * @example
2182
+ * ```jsx
2183
+ * <DropDownList dataItemKey="id" />
2184
+ * ```
1585
2185
  */
1586
2186
  dataItemKey?: string;
1587
2187
  /**
1588
2188
  * Represents a callback function, which returns the value for submitting. The returned value will be rendered in an `option` of a hidden [`select`](https://react.dev/reference/react-dom/components/select) element.
1589
2189
  *
1590
2190
  * @example
1591
- * ```jsx-no-run
2191
+ * ```jsx
1592
2192
  * class App extends React.Component {
1593
2193
  * render() {
1594
2194
  * return (
@@ -1608,31 +2208,66 @@ export declare interface DropDownListProps extends FormComponentProps {
1608
2208
  valueMap?: (value: any) => any;
1609
2209
  /**
1610
2210
  * Renders a floating label for the DropDownList.
2211
+ *
2212
+ * @example
2213
+ * ```jsx
2214
+ * <DropDownList label="Dropdown Label" />
2215
+ * ```
1611
2216
  */
1612
2217
  label?: string;
1613
2218
  /**
1614
2219
  * Specifies the id of the component.
2220
+ *
2221
+ * @example
2222
+ * ```jsx
2223
+ * <DropDownList id="dropdown-id" />
2224
+ * ```
1615
2225
  */
1616
2226
  id?: string;
1617
2227
  /**
1618
2228
  * Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
1619
2229
  * For example these elements could contain error or hint message.
2230
+ *
2231
+ * @example
2232
+ * ```jsx
2233
+ * <DropDownList ariaDescribedBy="error-message-id" />
2234
+ * ```
1620
2235
  */
1621
2236
  ariaDescribedBy?: string;
1622
2237
  /**
1623
2238
  * Identifies the element(s) which will label the component.
2239
+ *
2240
+ * @example
2241
+ * ```jsx
2242
+ * <DropDownList ariaLabelledBy="label-id" />
2243
+ * ```
1624
2244
  */
1625
2245
  ariaLabelledBy?: string;
1626
2246
  /**
1627
2247
  * The accessible label of the component. By default is set to value of `label` prop.
2248
+ *
2249
+ * @example
2250
+ * ```jsx
2251
+ * <DropDownList ariaLabel="Accessible Label" />
2252
+ * ```
1628
2253
  */
1629
2254
  ariaLabel?: string;
1630
2255
  /**
1631
2256
  * Configures the popup of the DropDownList.
1632
- */
1633
- popupSettings?: DropDownsPopupSettings;
1634
- /**
2257
+ *
2258
+ * @example
2259
+ * ```jsx
2260
+ * <DropDownList popupSettings={{ animate: true }} />
2261
+ * ```
2262
+ */
2263
+ popupSettings?: DropDownsPopupSettings;
2264
+ /**
1635
2265
  * Configures the virtual scrolling of the DropDownList ([see example]({% slug virtualization_dropdownlist %})).
2266
+ *
2267
+ * @example
2268
+ * ```jsx
2269
+ * <DropDownList virtual={{ pageSize: 20 }} />
2270
+ * ```
1636
2271
  */
1637
2272
  virtual?: VirtualizationSettings;
1638
2273
  /**
@@ -1641,7 +2276,7 @@ export declare interface DropDownListProps extends FormComponentProps {
1641
2276
  * Default functionality returns the first item which starts with the input text.
1642
2277
  *
1643
2278
  * @example
1644
- * ```jsx-no-run
2279
+ * ```jsx
1645
2280
  * const focusedItemIndex = (data, inputText, textField) => {
1646
2281
  * let text = inputText.toLowerCase();
1647
2282
  * return data.findIndex(item =>
@@ -1654,59 +2289,129 @@ export declare interface DropDownListProps extends FormComponentProps {
1654
2289
  focusedItemIndex?: (data: any, inputText: string, textField?: string) => number;
1655
2290
  /**
1656
2291
  * Fires each time the popup of the DropDownList is about to open.
2292
+ *
2293
+ * @example
2294
+ * ```jsx
2295
+ * <DropDownList onOpen={(event) => console.log('Popup opened')} />
2296
+ * ```
1657
2297
  */
1658
2298
  onOpen?: (event: DropDownListOpenEvent) => void;
1659
2299
  /**
1660
2300
  * Fires each time the popup of the DropDownList is about to close.
2301
+ *
2302
+ * @example
2303
+ * ```jsx
2304
+ * <DropDownList onClose={(event) => console.log('Popup closed')} />
2305
+ * ```
1661
2306
  */
1662
2307
  onClose?: (event: DropDownListCloseEvent) => void;
1663
2308
  /**
1664
2309
  * Fires each time the user focuses the DropDownList.
2310
+ *
2311
+ * @example
2312
+ * ```jsx
2313
+ * <DropDownList onFocus={(event) => console.log('Focused')} />
2314
+ * ```
1665
2315
  */
1666
2316
  onFocus?: (event: DropDownListFocusEvent) => void;
1667
2317
  /**
1668
2318
  * Fires each time the DropDownList gets blurred.
2319
+ *
2320
+ * @example
2321
+ * ```jsx
2322
+ * <DropDownList onBlur={(event) => console.log('Blurred')} />
2323
+ * ```
1669
2324
  */
1670
2325
  onBlur?: (event: DropDownListBlurEvent) => void;
1671
2326
  /**
1672
2327
  * Fires each time the value of the DropDownList is about to change ([see examples]({% slug binding_dropdownlist %})).
2328
+ *
2329
+ * @example
2330
+ * ```jsx
2331
+ * <DropDownList onChange={(event) => console.log('Value changed')} />
2332
+ * ```
1673
2333
  */
1674
2334
  onChange?: (event: DropDownListChangeEvent) => void;
1675
2335
  /**
1676
2336
  * Fires each time the user types in the filter input. You can filter the source based on the passed filtration value.
2337
+ *
2338
+ * @example
2339
+ * ```jsx
2340
+ * <DropDownList onFilterChange={(event) => console.log('Filter changed')} />
2341
+ * ```
1677
2342
  */
1678
2343
  onFilterChange?: (event: DropDownListFilterChangeEvent) => void;
1679
2344
  /**
1680
2345
  * Fires when both the virtual scrolling of the DropDownList is enabled and the component requires data for another page ([see example]({% slug virtualization_dropdownlist %})).
2346
+ *
2347
+ * @example
2348
+ * ```jsx
2349
+ * <DropDownList onPageChange={(event) => console.log('Page changed')} />
2350
+ * ```
1681
2351
  */
1682
2352
  onPageChange?: (event: DropDownListPageChangeEvent) => void;
1683
2353
  /**
1684
2354
  * Fires when a DropDownList item is about to be rendered ([see example]({% slug customrendering_dropdownlist %}#toc-items)). Used to override the default appearance of the list items.
2355
+ *
2356
+ * @example
2357
+ * ```jsx
2358
+ * <DropDownList itemRender={(li, itemProps) => <li>{itemProps.dataItem}</li>} />
2359
+ * ```
1685
2360
  */
1686
2361
  itemRender?: (li: React.ReactElement<HTMLLIElement>, itemProps: ListItemProps) => React.ReactNode;
1687
2362
  /**
1688
2363
  * Fires when the element which renders the value is about to be rendered ([see example]({% slug customrendering_dropdownlist %}#toc-values)). Used to override the default appearance of the element.
2364
+ *
2365
+ * @example
2366
+ * ```jsx
2367
+ * <DropDownList valueRender={(element, value) => <span>{value}</span>} />
2368
+ * ```
1689
2369
  */
1690
2370
  valueRender?: (element: React.ReactElement<HTMLSpanElement>, value: any) => React.ReactNode;
1691
2371
  /**
1692
2372
  * Fires when the element which indicates no data in the popup is about to be rendered ([see example]({% slug customrendering_dropdownlist %}#toc-no-data)). Used to override the default appearance of the element.
2373
+ *
2374
+ * @example
2375
+ * ```jsx
2376
+ * <DropDownList listNoDataRender={(element) => <div>No data available</div>} />
2377
+ * ```
1693
2378
  */
1694
2379
  listNoDataRender?: (element: React.ReactElement<HTMLDivElement>) => React.ReactNode;
1695
2380
  /**
1696
2381
  * Sets the header component of the DropDownList ([see example]({% slug customrendering_dropdownlist %}#toc-headers-and-footers)).
2382
+ *
2383
+ * @example
2384
+ * ```jsx
2385
+ * <DropDownList header={<div>Header Content</div>} />
2386
+ * ```
1697
2387
  */
1698
2388
  header?: React.ReactNode;
1699
2389
  /**
1700
2390
  * Sets the footer component of the DropDownList ([see example]({% slug customrendering_dropdownlist %}#toc-headers-and-footers)).
2391
+ *
2392
+ * @example
2393
+ * ```jsx
2394
+ * <DropDownList footer={<div>Footer Content</div>} />
2395
+ * ```
1701
2396
  */
1702
2397
  footer?: React.ReactNode;
1703
2398
  /**
1704
2399
  * Specifies the `name` property of the `select` DOM element.
2400
+ *
2401
+ * @example
2402
+ * ```jsx
2403
+ * <DropDownList name="dropdown-name" />
2404
+ * ```
1705
2405
  */
1706
2406
  name?: string;
1707
2407
  /**
1708
2408
  * If set to `false`, the DropDownList will not navigate over its data through left and right keys.
1709
2409
  * Useful when the DropDownList is placed inside a toolbar which needs to handle left and right keys.
2410
+ *
2411
+ * @example
2412
+ * ```jsx
2413
+ * <DropDownList leftRightKeysNavigation={false} />
2414
+ * ```
1710
2415
  */
1711
2416
  leftRightKeysNavigation?: boolean;
1712
2417
  /**
@@ -1719,6 +2424,11 @@ export declare interface DropDownListProps extends FormComponentProps {
1719
2424
  * - null&mdash;Does not set a size `className`.
1720
2425
  *
1721
2426
  * @default `medium`
2427
+ *
2428
+ * @example
2429
+ * ```jsx
2430
+ * <DropDownList size="small" />
2431
+ * ```
1722
2432
  */
1723
2433
  size?: null | 'small' | 'medium' | 'large';
1724
2434
  /**
@@ -1732,6 +2442,11 @@ export declare interface DropDownListProps extends FormComponentProps {
1732
2442
  * - null&mdash;Does not set a rounded `className`.
1733
2443
  *
1734
2444
  * @default `medium`
2445
+ *
2446
+ * @example
2447
+ * ```jsx
2448
+ * <DropDownList rounded="large" />
2449
+ * ```
1735
2450
  */
1736
2451
  rounded?: null | 'small' | 'medium' | 'large' | 'full';
1737
2452
  /**
@@ -1744,26 +2459,56 @@ export declare interface DropDownListProps extends FormComponentProps {
1744
2459
  * - null&mdash;Does not set a fillMode `className`.
1745
2460
  *
1746
2461
  * @default `solid`
2462
+ *
2463
+ * @example
2464
+ * ```jsx
2465
+ * <DropDownList fillMode="flat" />
2466
+ * ```
1747
2467
  */
1748
2468
  fillMode?: null | 'solid' | 'flat' | 'outline';
1749
2469
  /**
1750
2470
  * Providing different rendering of the popup element based on the screen dimensions.
2471
+ *
2472
+ * @example
2473
+ * ```jsx
2474
+ * <DropDownList adaptive={true} />
2475
+ * ```
1751
2476
  */
1752
2477
  adaptive?: boolean;
1753
2478
  /**
1754
2479
  * Specifies the text that is rendered as title in the adaptive popup.
2480
+ *
2481
+ * @example
2482
+ * ```jsx
2483
+ * <DropDownList adaptiveTitle="Adaptive Title" />
2484
+ * ```
1755
2485
  */
1756
2486
  adaptiveTitle?: string;
1757
2487
  /**
1758
2488
  * Sets the data item field that represents the start of a group. Applicable to objects data.
2489
+ *
2490
+ * @example
2491
+ * ```jsx
2492
+ * <DropDownList groupField="category" />
2493
+ * ```
1759
2494
  */
1760
2495
  groupField?: string;
1761
2496
  /**
1762
2497
  * Fires when a DropDownList's group header item is about to be rendered. Used to override the default appearance of the group's headers.
2498
+ *
2499
+ * @example
2500
+ * ```jsx
2501
+ * <DropDownList groupHeaderItemRender={(li, itemProps) => <li>{itemProps.dataItem}</li>} />
2502
+ * ```
1763
2503
  */
1764
2504
  groupHeaderItemRender?: (li: React.ReactElement<HTMLLIElement>, itemProps: ListGroupItemProps) => React.ReactNode;
1765
2505
  /**
1766
2506
  * Fires when a DropDownList's sticky group header item is about to be rendered. Used to override the default appearance of the sticky group header of the component.
2507
+ *
2508
+ * @example
2509
+ * ```jsx
2510
+ * <DropDownList groupStickyHeaderItemRender={(div, stickyHeaderProps) => <div>{stickyHeaderProps.dataItem}</div>} />
2511
+ * ```
1767
2512
  */
1768
2513
  groupStickyHeaderItemRender?: (div: React.ReactElement<HTMLDivElement>, stickyHeaderProps: GroupStickyHeaderProps) => React.ReactNode;
1769
2514
  /**
@@ -1776,11 +2521,13 @@ export declare interface DropDownListProps extends FormComponentProps {
1776
2521
  groupMode?: string;
1777
2522
  /**
1778
2523
  * Defines if DropDownList's disabled items will be skipped or focused when navigating through the list of items using a keyboard. Defaults to `true`.
2524
+ *
2525
+ * @example
2526
+ * ```jsx
2527
+ * <DropDownList skipDisabledItems={false} />
2528
+ * ```
1779
2529
  */
1780
2530
  skipDisabledItems?: boolean;
1781
- /**
1782
- * @hidden
1783
- */
1784
2531
  /**
1785
2532
  * @hidden
1786
2533
  */
@@ -1978,166 +2725,318 @@ export declare interface DropDownTreeOpenEvent extends OpenEvent<DropDownTreeHan
1978
2725
  export declare interface DropDownTreeProps extends FormComponentProps {
1979
2726
  /**
1980
2727
  * Sets the data of the DropDownTree ([see example]({% slug overview_dropdowntree %})).
2728
+ *
2729
+ * @example
2730
+ * ```jsx
2731
+ * <DropDownTree data={[{ text: 'Parent', items: [{ text: 'Child' }] }]} />
2732
+ * ```
1981
2733
  */
1982
2734
  data?: any[];
1983
2735
  /**
1984
2736
  * Sets the opened state of the DropDownTree.
2737
+ *
2738
+ * @example
2739
+ * ```jsx
2740
+ * <DropDownTree opened={true} />
2741
+ * ```
1985
2742
  */
1986
2743
  opened?: boolean;
1987
2744
  /**
1988
2745
  * The styles that are applied to the DropDownTree.
2746
+ *
2747
+ * @example
2748
+ * ```jsx
2749
+ * <DropDownTree style={{ width: '300px' }} />
2750
+ * ```
1989
2751
  */
1990
2752
  style?: React.CSSProperties;
1991
2753
  /**
1992
2754
  * Sets the value of the DropDownTree ([see example]({% slug overview_dropdowntree %})).
1993
2755
  * It can be an object from the data-tree.
2756
+ *
2757
+ * @example
2758
+ * ```jsx
2759
+ * <DropDownTree value={{ text: 'Parent' }} />
2760
+ * ```
1994
2761
  */
1995
2762
  value?: any;
1996
2763
  /**
1997
2764
  * The hint that is displayed when the DropDownTree is empty.
2765
+ *
2766
+ * @example
2767
+ * ```jsx
2768
+ * <DropDownTree placeholder="Select an item" />
2769
+ * ```
1998
2770
  */
1999
2771
  placeholder?: string;
2000
2772
  /**
2001
2773
  * Sets the key for comparing the data items of the DropDownTree ([see example]({% slug overview_dropdowntree %})).
2002
2774
  * If `dataItemKey` is not set, the DropDownTree compares the items by reference.
2775
+ *
2776
+ * @example
2777
+ * ```jsx
2778
+ * <DropDownTree dataItemKey="id" />
2779
+ * ```
2003
2780
  */
2004
2781
  dataItemKey: string;
2005
2782
  /**
2006
2783
  * Sets additional classes to the DropDownTree.
2784
+ *
2785
+ * @example
2786
+ * ```jsx
2787
+ * <DropDownTree className="custom-class" />
2788
+ * ```
2007
2789
  */
2008
2790
  className?: string;
2009
2791
  /**
2010
2792
  * Sets the disabled state of the DropDownTree.
2793
+ *
2794
+ * @example
2795
+ * ```jsx
2796
+ * <DropDownTree disabled={true} />
2797
+ * ```
2011
2798
  */
2012
2799
  disabled?: boolean;
2013
2800
  /**
2014
2801
  * Represents the `dir` HTML attribute.
2802
+ *
2803
+ * @example
2804
+ * ```jsx
2805
+ * <DropDownTree dir="rtl" />
2806
+ * ```
2015
2807
  */
2016
2808
  dir?: string;
2017
2809
  /**
2018
2810
  * Renders a floating label for the DropDownTree.
2811
+ *
2812
+ * @example
2813
+ * ```jsx
2814
+ * <DropDownTree label="Select an item" />
2815
+ * ```
2019
2816
  */
2020
2817
  label?: string;
2021
2818
  /**
2022
2819
  * Specifies the id of the component.
2820
+ *
2821
+ * @example
2822
+ * ```jsx
2823
+ * <DropDownTree id="dropdown-tree" />
2824
+ * ```
2023
2825
  */
2024
2826
  id?: string;
2025
2827
  /**
2026
2828
  * Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
2027
2829
  * For example these elements could contain error or hint message.
2830
+ *
2831
+ * @example
2832
+ * ```jsx
2833
+ * <DropDownTree ariaDescribedBy="description" />
2834
+ * ```
2028
2835
  */
2029
2836
  ariaDescribedBy?: string;
2030
2837
  /**
2031
2838
  * Identifies the element(s) which will label the component.
2839
+ *
2840
+ * @example
2841
+ * ```jsx
2842
+ * <DropDownTree ariaLabelledBy="label" />
2843
+ * ```
2032
2844
  */
2033
2845
  ariaLabelledBy?: string;
2034
2846
  /**
2035
2847
  * Enables the filtering functionality of the DropDownTree ([more information and examples]({% slug filtering_dropdowntree %})).
2848
+ *
2849
+ * @example
2850
+ * ```jsx
2851
+ * <DropDownTree filterable={true} />
2852
+ * ```
2036
2853
  */
2037
2854
  filterable?: boolean;
2038
2855
  /**
2039
2856
  * Sets the value of filtering input.
2040
2857
  * Useful for making the filtering input a [controlled component](https://react.dev/learn/sharing-state-between-components#controlled-and-uncontrolled-components).
2858
+ *
2859
+ * @example
2860
+ * ```jsx
2861
+ * <DropDownTree filter="search text" />
2862
+ * ```
2041
2863
  */
2042
2864
  filter?: string;
2043
2865
  /**
2044
2866
  * Sets the loading state of the DropDownTree ([see example]({% slug filtering_dropdowntree %}#toc-visualize-filtering)).
2867
+ *
2868
+ * @example
2869
+ * ```jsx
2870
+ * <DropDownTree loading={true} />
2871
+ * ```
2045
2872
  */
2046
2873
  loading?: boolean;
2047
2874
  /**
2048
2875
  * Specifies the `tabIndex` of the DropDownTree.
2876
+ *
2877
+ * @example
2878
+ * ```jsx
2879
+ * <DropDownTree tabIndex={0} />
2880
+ * ```
2049
2881
  */
2050
2882
  tabIndex?: number;
2051
2883
  /**
2052
2884
  * Specifies the `accessKey` of the DropDownTree.
2885
+ *
2886
+ * @example
2887
+ * ```jsx
2888
+ * <DropDownTree accessKey="k" />
2889
+ * ```
2053
2890
  */
2054
2891
  accessKey?: string;
2055
2892
  /**
2056
2893
  * Sets the data item field that represents the item text ([see example]({% slug overview_dropdowntree %})).
2894
+ *
2895
+ * @example
2896
+ * ```jsx
2897
+ * <DropDownTree textField="name" />
2898
+ * ```
2057
2899
  */
2058
2900
  textField: string;
2059
2901
  /**
2060
2902
  * Specifies the name of the field which will provide a Boolean representation of the selected state of the item.
2903
+ *
2904
+ * @example
2905
+ * ```jsx
2906
+ * <DropDownTree selectField="selected" />
2907
+ * ```
2061
2908
  */
2062
2909
  selectField?: string;
2063
2910
  /**
2064
2911
  * Specifies the name of the field which will provide a Boolean representation of the expanded state of the item.
2912
+ *
2913
+ * @example
2914
+ * ```jsx
2915
+ * <DropDownTree expandField="expanded" />
2916
+ * ```
2065
2917
  */
2066
2918
  expandField?: string;
2067
2919
  /**
2068
2920
  * Specifies the name of the field which will provide an array representation of the item subitems.
2069
2921
  * Defaults to 'items'.
2922
+ *
2923
+ * @example
2924
+ * ```jsx
2925
+ * <DropDownTree subItemsField="children" />
2926
+ * ```
2070
2927
  */
2071
2928
  subItemsField?: string;
2072
2929
  /**
2073
2930
  * Configures the popup of the DropDownTree.
2931
+ *
2932
+ * @example
2933
+ * ```jsx
2934
+ * <DropDownTree popupSettings={{ animate: false }} />
2935
+ * ```
2074
2936
  */
2075
2937
  popupSettings?: DropDownsPopupSettings;
2076
2938
  /**
2077
2939
  * Represents a callback function, which returns the value for submitting. The returned value will be rendered in an `option` of a hidden [`select`](https://react.dev/reference/react-dom/components/select) element.
2078
2940
  *
2079
2941
  * @example
2080
- * ```jsx-no-run
2081
- * class App extends React.Component {
2082
- * render() {
2083
- * return (
2084
- * <form>
2085
- * <DropDownTree
2086
- * data={[ { text: "Austria", id: 1 } , { text: "Belarus", id: 2 } ]}
2087
- * valueMap={value => value && value.id}
2088
- * />
2089
- * <button type="submit">Submit</button>
2090
- * </form>
2091
- * );
2092
- * }
2093
- * }
2094
- * ReactDOM.render(<App />, document.querySelector('my-app'));
2942
+ * ```jsx
2943
+ * <DropDownTree valueMap={value => value && value.id} />
2095
2944
  * ```
2096
2945
  */
2097
2946
  valueMap?: (value: any) => any;
2098
2947
  /**
2099
2948
  * Fires each time the popup of the DropDownTree is about to open.
2949
+ *
2950
+ * @example
2951
+ * ```jsx
2952
+ * <DropDownTree onOpen={(event) => console.log(event)} />
2953
+ * ```
2100
2954
  */
2101
2955
  onOpen?: (event: DropDownTreeOpenEvent) => void;
2102
2956
  /**
2103
2957
  * Fires each time the popup of the DropDownTree is about to close.
2958
+ *
2959
+ * @example
2960
+ * ```jsx
2961
+ * <DropDownTree onClose={(event) => console.log(event)} />
2962
+ * ```
2104
2963
  */
2105
2964
  onClose?: (event: DropDownTreeCloseEvent) => void;
2106
2965
  /**
2107
2966
  * Fires each time the user focuses the DropDownTree.
2967
+ *
2968
+ * @example
2969
+ * ```jsx
2970
+ * <DropDownTree onFocus={(event) => console.log(event)} />
2971
+ * ```
2108
2972
  */
2109
2973
  onFocus?: (event: DropDownTreeFocusEvent) => void;
2110
2974
  /**
2111
2975
  * Fires each time the DropDownTree gets blurred.
2976
+ *
2977
+ * @example
2978
+ * ```jsx
2979
+ * <DropDownTree onBlur={(event) => console.log(event)} />
2980
+ * ```
2112
2981
  */
2113
2982
  onBlur?: (event: DropDownTreeBlurEvent) => void;
2114
2983
  /**
2115
2984
  * Fires each time the value of the DropDownTree is about to change ([see examples]({% slug overview_dropdowntree %})).
2985
+ *
2986
+ * @example
2987
+ * ```jsx
2988
+ * <DropDownTree onChange={(event) => console.log(event)} />
2989
+ * ```
2116
2990
  */
2117
2991
  onChange?: (event: DropDownTreeChangeEvent) => void;
2118
2992
  /**
2119
2993
  * Fires each time the user types in the filter input
2120
2994
  * ([see example]({% slug filtering_dropdowntree %}#toc-basic-configuration)).
2121
2995
  * You can filter the source based on the passed filtration value.
2996
+ *
2997
+ * @example
2998
+ * ```jsx
2999
+ * <DropDownTree onFilterChange={(event) => console.log(event)} />
3000
+ * ```
2122
3001
  */
2123
3002
  onFilterChange?: (event: DropDownTreeFilterChangeEvent) => void;
2124
3003
  /**
2125
3004
  * Fires when the expanding or collapsing of an item is requested ([see examples]({% slug overview_dropdowntree %})).
3005
+ *
3006
+ * @example
3007
+ * ```jsx
3008
+ * <DropDownTree onExpandChange={(event) => console.log(event)} />
3009
+ * ```
2126
3010
  */
2127
3011
  onExpandChange?: (event: any) => void;
2128
3012
  /**
2129
3013
  * Defines the component that will be used for rendering each of the DropDownTree items
2130
3014
  * ([see example]({% slug customrendering_dropdowntree %}#toc-items-and-value-element)).
3015
+ *
3016
+ * @example
3017
+ * ```jsx
3018
+ * <DropDownTree item={(props) => <CustomItem {...props} />} />
3019
+ * ```
2131
3020
  */
2132
3021
  item?: React.ComponentType<ItemProps>;
2133
3022
  /**
2134
3023
  * Defines the component that will be used for rendering the selected value
2135
3024
  * ([see example]({% slug customrendering_dropdowntree %}#toc-items-and-value-element)).
3025
+ *
3026
+ * @example
3027
+ * ```jsx
3028
+ * <DropDownTree valueHolder={(props) => <CustomValueHolder {...props} />} />
3029
+ * ```
2136
3030
  */
2137
3031
  valueHolder?: React.ComponentType<ValueHolderProps>;
2138
3032
  /**
2139
3033
  * Defines the component that will be rendered in the DropDownTree popup when no data is available
2140
3034
  * ([see example]({% slug customrendering_dropdowntree %}#toc-no-data)).
3035
+ *
3036
+ * @example
3037
+ * ```jsx
3038
+ * <DropDownTree listNoData={() => <div>No data available</div>} />
3039
+ * ```
2141
3040
  */
2142
3041
  listNoData?: React.ComponentType<ListNoDataProps>;
2143
3042
  /**
@@ -2150,6 +3049,11 @@ export declare interface DropDownTreeProps extends FormComponentProps {
2150
3049
  * - null&mdash;Does not set a size `className`.
2151
3050
  *
2152
3051
  * @default `medium`
3052
+ *
3053
+ * @example
3054
+ * ```jsx
3055
+ * <DropDownTree size="large" />
3056
+ * ```
2153
3057
  */
2154
3058
  size?: null | 'small' | 'medium' | 'large';
2155
3059
  /**
@@ -2163,6 +3067,11 @@ export declare interface DropDownTreeProps extends FormComponentProps {
2163
3067
  * - null&mdash;Does not set a rounded `className`.
2164
3068
  *
2165
3069
  * @default `medium`
3070
+ *
3071
+ * @example
3072
+ * ```jsx
3073
+ * <DropDownTree rounded="full" />
3074
+ * ```
2166
3075
  */
2167
3076
  rounded?: null | 'small' | 'medium' | 'large' | 'full';
2168
3077
  /**
@@ -2175,14 +3084,29 @@ export declare interface DropDownTreeProps extends FormComponentProps {
2175
3084
  * - null&mdash;Does not set a fillMode `className`.
2176
3085
  *
2177
3086
  * @default `solid`
3087
+ *
3088
+ * @example
3089
+ * ```jsx
3090
+ * <DropDownTree fillMode="flat" />
3091
+ * ```
2178
3092
  */
2179
3093
  fillMode?: null | 'solid' | 'flat' | 'outline';
2180
3094
  /**
2181
3095
  * Providing different rendering of the popup element based on the screen dimensions.
3096
+ *
3097
+ * @example
3098
+ * ```jsx
3099
+ * <DropDownTree adaptive={true} />
3100
+ * ```
2182
3101
  */
2183
3102
  adaptive?: boolean;
2184
3103
  /**
2185
3104
  * Specifies the text that is rendered as title in the adaptive popup.
3105
+ *
3106
+ * @example
3107
+ * ```jsx
3108
+ * <DropDownTree adaptiveTitle="Select an item" />
3109
+ * ```
2186
3110
  */
2187
3111
  adaptiveTitle?: string;
2188
3112
  }
@@ -2905,14 +3829,29 @@ export declare interface MultiSelectPageChangeEvent extends PageChangeEvent<Mult
2905
3829
  export declare interface MultiSelectProps extends FormComponentProps {
2906
3830
  /**
2907
3831
  * Specifies whether the MultiSelect allows user-defined values that are not present in the dataset ([see example]({% slug custom_values_multiselect %})). Defaults to `false`.
3832
+ *
3833
+ * @example
3834
+ * ```jsx
3835
+ * <MultiSelect allowCustom={true} />
3836
+ * ```
2908
3837
  */
2909
3838
  allowCustom?: boolean;
2910
3839
  /**
2911
3840
  * Sets the data of the MultiSelect ([see example]({% slug binding_multiselect %})).
3841
+ *
3842
+ * @example
3843
+ * ```jsx
3844
+ * <MultiSelect data={['Option1', 'Option2', 'Option3']} />
3845
+ * ```
2912
3846
  */
2913
3847
  data?: any[];
2914
3848
  /**
2915
3849
  * Sets the opened and closed state of the MultiSelect.
3850
+ *
3851
+ * @example
3852
+ * ```jsx
3853
+ * <MultiSelect opened={true} />
3854
+ * ```
2916
3855
  */
2917
3856
  opened?: boolean;
2918
3857
  /**
@@ -2920,77 +3859,135 @@ export declare interface MultiSelectProps extends FormComponentProps {
2920
3859
  *
2921
3860
  * @example
2922
3861
  * ```jsx
2923
- * class App extends React.Component {
2924
- * render() {
2925
- * return (
2926
- * <MultiSelect
2927
- * data={[ "Albania", "Andorra", "Austria", "Belarus" ]}
2928
- * autoClose={false}
2929
- * />
2930
- * );
2931
- * }
2932
- * }
2933
- * ReactDOM.render(<App />, document.querySelector('my-app'));
3862
+ * <MultiSelect autoClose={false} />
2934
3863
  * ```
2935
- *
2936
- * @default true
2937
3864
  */
2938
3865
  autoClose?: boolean;
2939
3866
  /**
2940
3867
  * The styles that are applied to the MultiSelect.
3868
+ *
3869
+ * @example
3870
+ * ```jsx
3871
+ * <MultiSelect style={{ width: '300px' }} />
3872
+ * ```
2941
3873
  */
2942
3874
  style?: React.CSSProperties;
2943
3875
  /**
2944
3876
  * Sets the value of the MultiSelect ([see example]({% slug binding_multiselect %})). It can either be of the primitive (string, numbers) or of the complex (objects) type.
3877
+ *
3878
+ * @example
3879
+ * ```jsx
3880
+ * <MultiSelect value={['Option1', 'Option2']} />
3881
+ * ```
2945
3882
  */
2946
3883
  value?: Array<any>;
2947
3884
  /**
2948
3885
  * The hint that is displayed when the MultiSelect is empty.
3886
+ *
3887
+ * @example
3888
+ * ```jsx
3889
+ * <MultiSelect placeholder="Select an option" />
3890
+ * ```
2949
3891
  */
2950
3892
  placeholder?: string;
2951
3893
  /**
2952
3894
  * Sets the tags of the MultiSelect ([see example]({% slug customtags_multiselect %})).
3895
+ *
3896
+ * @example
3897
+ * ```jsx
3898
+ * <MultiSelect tags={[{ text: 'Tag1' }, { text: 'Tag2' }]} />
3899
+ * ```
2953
3900
  */
2954
3901
  tags?: Array<TagData>;
2955
3902
  /**
2956
3903
  * Sets the key for comparing the data items of the MultiSelect ([see example]({% slug binding_multiselect %}#toc-datasets-of-objects)). If `dataItemKey` is not set, the MultiSelect compares the items by reference.
3904
+ *
3905
+ * @example
3906
+ * ```jsx
3907
+ * <MultiSelect dataItemKey="id" />
3908
+ * ```
2957
3909
  */
2958
3910
  dataItemKey?: string;
2959
3911
  /**
2960
3912
  * Sets the default value of the MultiSelect. Similar to the native `select` HTML element.
3913
+ *
3914
+ * @example
3915
+ * ```jsx
3916
+ * <MultiSelect defaultValue={['Option1']} />
3917
+ * ```
2961
3918
  */
2962
3919
  defaultValue?: Array<any>;
2963
3920
  /**
2964
3921
  * Sets additional classes to the MultiSelect.
3922
+ *
3923
+ * @example
3924
+ * ```jsx
3925
+ * <MultiSelect className="custom-class" />
3926
+ * ```
2965
3927
  */
2966
3928
  className?: string;
2967
3929
  /**
2968
3930
  * Sets the disabled state of the MultiSelect.
3931
+ *
3932
+ * @example
3933
+ * ```jsx
3934
+ * <MultiSelect disabled={true} />
3935
+ * ```
2969
3936
  */
2970
3937
  disabled?: boolean;
2971
3938
  /**
2972
3939
  * Represents the `dir` HTML attribute.
3940
+ *
3941
+ * @example
3942
+ * ```jsx
3943
+ * <MultiSelect dir="rtl" />
3944
+ * ```
2973
3945
  */
2974
3946
  dir?: string;
2975
3947
  /**
2976
3948
  * Enables the filtering functionality of the MultiSelect ([more information and examples]({% slug filtering_multiselect %})).
3949
+ *
3950
+ * @example
3951
+ * ```jsx
3952
+ * <MultiSelect filterable={true} />
3953
+ * ```
2977
3954
  */
2978
3955
  filterable?: boolean;
2979
3956
  /**
2980
3957
  * Specifies the id of the component.
3958
+ *
3959
+ * @example
3960
+ * ```jsx
3961
+ * <MultiSelect id="multi-select" />
3962
+ * ```
2981
3963
  */
2982
3964
  id?: string;
2983
3965
  /**
2984
3966
  * Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
2985
3967
  * For example these elements could contain error or hint message.
3968
+ *
3969
+ * @example
3970
+ * ```jsx
3971
+ * <MultiSelect ariaDescribedBy="description" />
3972
+ * ```
2986
3973
  */
2987
3974
  ariaDescribedBy?: string;
2988
3975
  /**
2989
3976
  * Specifies the accessible label of the interactive component.
3977
+ *
3978
+ * @example
3979
+ * ```jsx
3980
+ * <MultiSelect ariaLabel="MultiSelect" />
3981
+ * ```
2990
3982
  */
2991
3983
  ariaLabel?: string;
2992
3984
  /**
2993
3985
  * Identifies the element(s) which will label the component.
3986
+ *
3987
+ * @example
3988
+ * ```jsx
3989
+ * <MultiSelect ariaLabelledBy="label" />
3990
+ * ```
2994
3991
  */
2995
3992
  ariaLabelledBy?: string;
2996
3993
  /**
@@ -2999,7 +3996,7 @@ export declare interface MultiSelectProps extends FormComponentProps {
2999
3996
  * Default functionality returns the first item which starts with the input text.
3000
3997
  *
3001
3998
  * @example
3002
- * ```jsx-no-run
3999
+ * ```jsx
3003
4000
  * const focusedItemIndex = (data, inputText, textField) => {
3004
4001
  * let text = inputText.toLowerCase();
3005
4002
  * return data.findIndex(item =>
@@ -3012,90 +4009,200 @@ export declare interface MultiSelectProps extends FormComponentProps {
3012
4009
  focusedItemIndex?: (data: any, inputText: string, textField?: string) => number;
3013
4010
  /**
3014
4011
  * Sets the value of filtering input. Useful for making the filtering input a [controlled component](https://react.dev/learn/sharing-state-between-components#controlled-and-uncontrolled-components).
4012
+ *
4013
+ * @example
4014
+ * ```jsx
4015
+ * <MultiSelect filter="Option" />
4016
+ * ```
3015
4017
  */
3016
4018
  filter?: string;
3017
4019
  /**
3018
4020
  * Sets the value of the adaptive filtering input of the of MultiSelect.
4021
+ *
4022
+ * @example
4023
+ * ```jsx
4024
+ * <MultiSelect adaptiveFilter="Option" />
4025
+ * ```
3019
4026
  */
3020
4027
  adaptiveFilter?: string;
3021
4028
  /**
3022
4029
  * Sets the loading state of the MultiSelect ([see example]({% slug filtering_multiselect %}#toc-basic-configuration)).
4030
+ *
4031
+ * @example
4032
+ * ```jsx
4033
+ * <MultiSelect loading={true} />
4034
+ * ```
3023
4035
  */
3024
4036
  loading?: boolean;
3025
4037
  /**
3026
4038
  * Specifies the `tabIndex` of the MultiSelect.
4039
+ *
4040
+ * @example
4041
+ * ```jsx
4042
+ * <MultiSelect tabIndex={0} />
4043
+ * ```
3027
4044
  */
3028
4045
  tabIndex?: number;
3029
4046
  /**
3030
4047
  * Specifies the `accessKey` of the MultiSelect.
4048
+ *
4049
+ * @example
4050
+ * ```jsx
4051
+ * <MultiSelect accessKey="a" />
4052
+ * ```
3031
4053
  */
3032
4054
  accessKey?: string;
3033
4055
  /**
3034
4056
  * Sets the data item field that represents the item text ([see example]({% slug binding_multiselect %}#toc-datasets-of-objects)). If the data contains only primitive values, do not define it.
4057
+ *
4058
+ * @example
4059
+ * ```jsx
4060
+ * <MultiSelect textField="name" />
4061
+ * ```
3035
4062
  */
3036
4063
  textField?: string;
3037
4064
  /**
3038
4065
  * Renders a floating label for the MultiSelect.
4066
+ *
4067
+ * @example
4068
+ * ```jsx
4069
+ * <MultiSelect label="Select an option" />
4070
+ * ```
3039
4071
  */
3040
4072
  label?: string;
3041
4073
  /**
3042
4074
  * Configures the popup of the MultiSelect.
4075
+ *
4076
+ * @example
4077
+ * ```jsx
4078
+ * <MultiSelect popupSettings={{ animate: true }} />
4079
+ * ```
3043
4080
  */
3044
4081
  popupSettings?: DropDownsPopupSettings;
3045
4082
  /**
3046
4083
  * Configures the virtual scrolling of the MultiSelect ([see example]({% slug virtualization_multiselect %})).
4084
+ *
4085
+ * @example
4086
+ * ```jsx
4087
+ * <MultiSelect virtual={{ pageSize: 20 }} />
4088
+ * ```
3047
4089
  */
3048
4090
  virtual?: VirtualizationSettings;
3049
4091
  /**
3050
4092
  * Fires each time the popup of the MultiSelect is about to open.
4093
+ *
4094
+ * @example
4095
+ * ```jsx
4096
+ * <MultiSelect onOpen={(event) => console.log(event)} />
4097
+ * ```
3051
4098
  */
3052
4099
  onOpen?: (event: MultiSelectOpenEvent) => void;
3053
4100
  /**
3054
4101
  * Fires each time the popup of the MultiSelect is about to close.
4102
+ *
4103
+ * @example
4104
+ * ```jsx
4105
+ * <MultiSelect onClose={(event) => console.log(event)} />
4106
+ * ```
3055
4107
  */
3056
4108
  onClose?: (event: MultiSelectCloseEvent) => void;
3057
4109
  /**
3058
4110
  * Fires each time the user focuses the MultiSelect.
4111
+ *
4112
+ * @example
4113
+ * ```jsx
4114
+ * <MultiSelect onFocus={(event) => console.log(event)} />
4115
+ * ```
3059
4116
  */
3060
4117
  onFocus?: (event: MultiSelectFocusEvent) => void;
3061
4118
  /**
3062
4119
  * Fires each time the MultiSelect gets blurred.
4120
+ *
4121
+ * @example
4122
+ * ```jsx
4123
+ * <MultiSelect onBlur={(event) => console.log(event)} />
4124
+ * ```
3063
4125
  */
3064
4126
  onBlur?: (event: MultiSelectBlurEvent) => void;
3065
4127
  /**
3066
4128
  * Fires each time the value of the MultiSelect is about to change ([see examples]({% slug binding_multiselect %})).
4129
+ *
4130
+ * @example
4131
+ * ```jsx
4132
+ * <MultiSelect onChange={(event) => console.log(event)} />
4133
+ * ```
3067
4134
  */
3068
4135
  onChange?: (event: MultiSelectChangeEvent) => void;
3069
4136
  /**
3070
4137
  * Fires each time the popup of the MultiSelect is about to cancel in ([adaptive mode]({% slug adaptive_rendering_multiselect %})).
4138
+ *
4139
+ * @example
4140
+ * ```jsx
4141
+ * <MultiSelect onCancel={(event) => console.log(event)} />
4142
+ * ```
3071
4143
  */
3072
4144
  onCancel?: (event: MultiSelectCancelEvent) => void;
3073
4145
  /**
3074
4146
  * Fires each time the user types in the filter input ([see example]({% slug filtering_multiselect %}#toc-basic-configuration)). You can filter the source based on the passed filtration value.
4147
+ *
4148
+ * @example
4149
+ * ```jsx
4150
+ * <MultiSelect onFilterChange={(event) => console.log(event)} />
4151
+ * ```
3075
4152
  */
3076
4153
  onFilterChange?: (event: MultiSelectFilterChangeEvent) => void;
3077
4154
  /**
3078
4155
  * Fires when both the virtual scrolling of the MultiSelect is enabled and when the component requires data for another page ([see example]({% slug virtualization_multiselect %})).
4156
+ *
4157
+ * @example
4158
+ * ```jsx
4159
+ * <MultiSelect onPageChange={(event) => console.log(event)} />
4160
+ * ```
3079
4161
  */
3080
4162
  onPageChange?: (event: MultiSelectPageChangeEvent) => void;
3081
4163
  /**
3082
4164
  * Fires when a MultiSelect item is about to be rendered ([see example]({% slug customrendering_multiselect %}#toc-items)). Used to override the default appearance of the list items.
4165
+ *
4166
+ * @example
4167
+ * ```jsx
4168
+ * <MultiSelect itemRender={(li, itemProps) => <div>{itemProps.dataItem}</div>} />
4169
+ * ```
3083
4170
  */
3084
4171
  itemRender?: (li: React.ReactElement<HTMLLIElement>, itemProps: ListItemProps) => React.ReactNode;
3085
4172
  /**
3086
4173
  * Fires when the element which indicates no data in the popup is about to be rendered ([see example]({% slug customrendering_multiselect %}#toc-no-data)). Used to override the default appearance of the element.
4174
+ *
4175
+ * @example
4176
+ * ```jsx
4177
+ * <MultiSelect listNoDataRender={(element) => <div>No data available</div>} />
4178
+ * ```
3087
4179
  */
3088
4180
  listNoDataRender?: (element: React.ReactElement<HTMLDivElement>) => React.ReactNode;
3089
4181
  /**
3090
4182
  * Fires when a tag element is about to be rendered ([see example]({% slug customrendering_multiselect %}#toc-tags)). Used to override the default appearance of the element.
4183
+ *
4184
+ * @example
4185
+ * ```jsx
4186
+ * <MultiSelect tagRender={(tagData, tag) => <span>{tagData.text}</span>} />
4187
+ * ```
3091
4188
  */
3092
4189
  tagRender?: (tagData: TagData, tag: React.ReactElement<any>) => React.ReactElement<any>;
3093
4190
  /**
3094
4191
  * Sets the header component of the MultiSelect ([see example]({% slug customrendering_multiselect %}#toc-headers-and-footers)).
4192
+ *
4193
+ * @example
4194
+ * ```jsx
4195
+ * <MultiSelect header={<div>Header</div>} />
4196
+ * ```
3095
4197
  */
3096
4198
  header?: React.ReactNode;
3097
4199
  /**
3098
4200
  * Sets the footer component of the MultiSelect ([see example]({% slug customrendering_multiselect %}#toc-headers-and-footers)).
4201
+ *
4202
+ * @example
4203
+ * ```jsx
4204
+ * <MultiSelect footer={<div>Footer</div>} />
4205
+ * ```
3099
4206
  */
3100
4207
  footer?: React.ReactNode;
3101
4208
  /**
@@ -3108,6 +4215,11 @@ export declare interface MultiSelectProps extends FormComponentProps {
3108
4215
  * - null&mdash;Does not set a size `className`.
3109
4216
  *
3110
4217
  * @default `medium`
4218
+ *
4219
+ * @example
4220
+ * ```jsx
4221
+ * <MultiSelect size="small" />
4222
+ * ```
3111
4223
  */
3112
4224
  size?: null | 'small' | 'medium' | 'large';
3113
4225
  /**
@@ -3121,6 +4233,11 @@ export declare interface MultiSelectProps extends FormComponentProps {
3121
4233
  * - null&mdash;Does not set a rounded `className`.
3122
4234
  *
3123
4235
  * @default `medium`
4236
+ *
4237
+ * @example
4238
+ * ```jsx
4239
+ * <MultiSelect rounded="large" />
4240
+ * ```
3124
4241
  */
3125
4242
  rounded?: null | 'small' | 'medium' | 'large' | 'full';
3126
4243
  /**
@@ -3133,18 +4250,38 @@ export declare interface MultiSelectProps extends FormComponentProps {
3133
4250
  * - null&mdash;Does not set a fillMode `className`.
3134
4251
  *
3135
4252
  * @default `solid`
4253
+ *
4254
+ * @example
4255
+ * ```jsx
4256
+ * <MultiSelect fillMode="flat" />
4257
+ * ```
3136
4258
  */
3137
4259
  fillMode?: null | 'solid' | 'flat' | 'outline';
3138
4260
  /**
3139
4261
  * Sets the data item field that represents the start of a group. Applicable to objects data.
4262
+ *
4263
+ * @example
4264
+ * ```jsx
4265
+ * <MultiSelect groupField="category" />
4266
+ * ```
3140
4267
  */
3141
4268
  groupField?: string;
3142
4269
  /**
3143
4270
  * Fires when a DropDownList's group header item is about to be rendered. Used to override the default appearance of the group's headers.
4271
+ *
4272
+ * @example
4273
+ * ```jsx
4274
+ * <MultiSelect groupHeaderItemRender={(li, itemProps) => <div>{itemProps.dataItem}</div>} />
4275
+ * ```
3144
4276
  */
3145
4277
  groupHeaderItemRender?: (li: React.ReactElement<HTMLLIElement>, itemProps: ListGroupItemProps) => React.ReactNode;
3146
4278
  /**
3147
4279
  * Fires when a DropDownList's sticky group header item is about to be rendered. Used to override the default appearance of the sticky group header of the component.
4280
+ *
4281
+ * @example
4282
+ * ```jsx
4283
+ * <MultiSelect groupStickyHeaderItemRender={(div, stickyHeaderProps) => <div>{stickyHeaderProps.dataItem}</div>} />
4284
+ * ```
3148
4285
  */
3149
4286
  groupStickyHeaderItemRender?: (div: React.ReactElement<HTMLDivElement>, stickyHeaderProps: GroupStickyHeaderProps) => React.ReactNode;
3150
4287
  /**
@@ -3157,27 +4294,57 @@ export declare interface MultiSelectProps extends FormComponentProps {
3157
4294
  groupMode?: string;
3158
4295
  /**
3159
4296
  * Providing different rendering of the popup element based on the screen dimensions.
4297
+ *
4298
+ * @example
4299
+ * ```jsx
4300
+ * <MultiSelect adaptive={true} />
4301
+ * ```
3160
4302
  */
3161
4303
  adaptive?: boolean;
3162
4304
  /**
3163
4305
  * Specifies the text that is rendered as title in the adaptive popup.
4306
+ *
4307
+ * @example
4308
+ * ```jsx
4309
+ * <MultiSelect adaptiveTitle="Select an option" />
4310
+ * ```
3164
4311
  */
3165
4312
  adaptiveTitle?: string;
3166
4313
  /**
3167
4314
  * Defines if MultiSelect's disabled items will be skipped or focused when navigating through the list of items using a keyboard. Defaults to `true`.
4315
+ *
4316
+ * @example
4317
+ * ```jsx
4318
+ * <MultiSelect skipDisabledItems={false} />
4319
+ * ```
3168
4320
  */
3169
4321
  skipDisabledItems?: boolean;
3170
4322
  /**
3171
4323
  * Sets a custom prefix to the MultiSelect component.
4324
+ *
4325
+ * @example
4326
+ * ```jsx
4327
+ * <MultiSelect prefix={<span>Prefix</span>} />
4328
+ * ```
3172
4329
  */
3173
4330
  prefix?: CustomComponent<any>;
3174
4331
  /**
3175
4332
  * Sets a custom suffix to the MultiSelect component.
4333
+ *
4334
+ * @example
4335
+ * ```jsx
4336
+ * <MultiSelect suffix={<span>Suffix</span>} />
4337
+ * ```
3176
4338
  */
3177
4339
  suffix?: CustomComponent<any>;
3178
4340
  /**
3179
4341
  * Sets the HTML attributes of the inner focusable input element.
3180
4342
  * Attributes which are essential for certain component functionalities cannot be changed.
4343
+ *
4344
+ * @example
4345
+ * ```jsx
4346
+ * <MultiSelect inputAttributes={{ maxLength: 10 }} />
4347
+ * ```
3181
4348
  */
3182
4349
  inputAttributes?: React.InputHTMLAttributes<HTMLInputElement>;
3183
4350
  /**
@@ -3381,174 +4548,344 @@ export declare interface MultiSelectTreeOpenEvent extends OpenEvent<MultiSelectT
3381
4548
  export declare interface MultiSelectTreeProps extends FormComponentProps {
3382
4549
  /**
3383
4550
  * Sets the data of the MultiSelectTree ([see example]({% slug overview_multiselecttree %})).
4551
+ *
4552
+ * @example
4553
+ * ```jsx
4554
+ * <MultiSelectTree data={[{ text: 'Node1' }, { text: 'Node2' }]} />
4555
+ * ```
3384
4556
  */
3385
4557
  data?: any[];
3386
4558
  /**
3387
4559
  * Sets the opened state of the MultiSelectTree.
4560
+ *
4561
+ * @example
4562
+ * ```jsx
4563
+ * <MultiSelectTree opened={true} />
4564
+ * ```
3388
4565
  */
3389
4566
  opened?: boolean;
3390
4567
  /**
3391
4568
  * The styles that are applied to the MultiSelectTree.
4569
+ *
4570
+ * @example
4571
+ * ```jsx
4572
+ * <MultiSelectTree style={{ width: '400px' }} />
4573
+ * ```
3392
4574
  */
3393
4575
  style?: React_2.CSSProperties;
3394
4576
  /**
3395
4577
  * Sets the value of the MultiSelectTree. It can either be of the primitive (string, numbers) or of the complex (objects) type.
4578
+ *
4579
+ * @example
4580
+ * ```jsx
4581
+ * <MultiSelectTree value={['Node1']} />
4582
+ * ```
3396
4583
  */
3397
4584
  value?: Array<any>;
3398
4585
  /**
3399
4586
  * The hint that is displayed when the MultiSelectTree is empty.
4587
+ *
4588
+ * @example
4589
+ * ```jsx
4590
+ * <MultiSelectTree placeholder="Select items" />
4591
+ * ```
3400
4592
  */
3401
4593
  placeholder?: string;
3402
4594
  /**
3403
4595
  * Sets the key for comparing the data items of the MultiSelectTree ([see example]({% slug overview_multiselecttree %})).
3404
4596
  * If `dataItemKey` is not set, the MultiSelectTree compares the items by reference.
4597
+ *
4598
+ * @example
4599
+ * ```jsx
4600
+ * <MultiSelectTree dataItemKey="id" />
4601
+ * ```
3405
4602
  */
3406
4603
  dataItemKey: string;
3407
4604
  /**
3408
4605
  * Sets additional classes to the MultiSelectTree.
4606
+ *
4607
+ * @example
4608
+ * ```jsx
4609
+ * <MultiSelectTree className="custom-class" />
4610
+ * ```
3409
4611
  */
3410
4612
  className?: string;
3411
4613
  /**
3412
4614
  * Sets the disabled state of the MultiSelectTree.
4615
+ *
4616
+ * @example
4617
+ * ```jsx
4618
+ * <MultiSelectTree disabled={true} />
4619
+ * ```
3413
4620
  */
3414
4621
  disabled?: boolean;
3415
4622
  /**
3416
4623
  * Represents the `dir` HTML attribute.
4624
+ *
4625
+ * @example
4626
+ * ```jsx
4627
+ * <MultiSelectTree dir="rtl" />
4628
+ * ```
3417
4629
  */
3418
4630
  dir?: string;
3419
4631
  /**
3420
4632
  * Renders a floating label for the MultiSelectTree.
4633
+ *
4634
+ * @example
4635
+ * ```jsx
4636
+ * <MultiSelectTree label="Select items" />
4637
+ * ```
3421
4638
  */
3422
4639
  label?: string;
3423
4640
  /**
3424
4641
  * Specifies the id of the component.
4642
+ *
4643
+ * @example
4644
+ * ```jsx
4645
+ * <MultiSelectTree id="multi-select-tree" />
4646
+ * ```
3425
4647
  */
3426
4648
  id?: string;
3427
4649
  /**
3428
4650
  * Sets the tags of the MultiSelect ([see example]({% slug customtags_multiselect %})).
4651
+ *
4652
+ * @example
4653
+ * ```jsx
4654
+ * <MultiSelectTree tags={[{ text: 'Tag1' }, { text: 'Tag2' }]} />
4655
+ * ```
3429
4656
  */
3430
4657
  tags?: Array<TagData>;
3431
4658
  /**
3432
4659
  * Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
3433
4660
  * For example these elements could contain error or hint message.
4661
+ *
4662
+ * @example
4663
+ * ```jsx
4664
+ * <MultiSelectTree ariaDescribedBy="description" />
4665
+ * ```
3434
4666
  */
3435
4667
  ariaDescribedBy?: string;
3436
4668
  /**
3437
4669
  * Identifies the element(s) which will label the component.
4670
+ *
4671
+ * @example
4672
+ * ```jsx
4673
+ * <MultiSelectTree ariaLabelledBy="label" />
4674
+ * ```
3438
4675
  */
3439
4676
  ariaLabelledBy?: string;
3440
4677
  /**
3441
4678
  * Enables the filtering functionality of the MultiSelectTree ([more information and examples]({% slug filtering_multiselecttree %})).
4679
+ *
4680
+ * @example
4681
+ * ```jsx
4682
+ * <MultiSelectTree filterable={true} />
4683
+ * ```
3442
4684
  */
3443
4685
  filterable?: boolean;
3444
4686
  /**
3445
4687
  * Sets the value of filtering input.
3446
4688
  * Useful for making the filtering input a [controlled component](https://react.dev/learn/sharing-state-between-components#controlled-and-uncontrolled-components).
4689
+ *
4690
+ * @example
4691
+ * ```jsx
4692
+ * <MultiSelectTree filter="search text" />
4693
+ * ```
3447
4694
  */
3448
4695
  filter?: string;
3449
4696
  /**
3450
4697
  * Sets the loading state of the MultiSelectTree ([see example]({% slug filtering_multiselecttree %}#toc-visualize-filtering)).
4698
+ *
4699
+ * @example
4700
+ * ```jsx
4701
+ * <MultiSelectTree loading={true} />
4702
+ * ```
3451
4703
  */
3452
4704
  loading?: boolean;
3453
4705
  /**
3454
4706
  * Specifies the `tabIndex` of the MultiSelectTree.
4707
+ *
4708
+ * @example
4709
+ * ```jsx
4710
+ * <MultiSelectTree tabIndex={0} />
4711
+ * ```
3455
4712
  */
3456
4713
  tabIndex?: number;
3457
4714
  /**
3458
4715
  * Specifies the `accessKey` of the MultiSelectTree.
4716
+ *
4717
+ * @example
4718
+ * ```jsx
4719
+ * <MultiSelectTree accessKey="m" />
4720
+ * ```
3459
4721
  */
3460
4722
  accessKey?: string;
3461
4723
  /**
3462
4724
  * Sets the data item field that represents the item text ([see example]({% slug overview_multiselecttree %})).
4725
+ *
4726
+ * @example
4727
+ * ```jsx
4728
+ * <MultiSelectTree textField="name" />
4729
+ * ```
3463
4730
  */
3464
4731
  textField: string;
3465
4732
  /**
3466
4733
  * Specifies the name of the field which will provide a Boolean representation of the checked state of the item.
4734
+ *
4735
+ * @example
4736
+ * ```jsx
4737
+ * <MultiSelectTree checkField="checked" />
4738
+ * ```
3467
4739
  */
3468
4740
  checkField?: string;
3469
4741
  /**
3470
- * Specifies the name of the field which will provide a Boolean representation of the checked indeterminaet state of the item.
4742
+ * Specifies the name of the field which will provide a Boolean representation of the checked indeterminate state of the item.
4743
+ *
4744
+ * @example
4745
+ * ```jsx
4746
+ * <MultiSelectTree checkIndeterminateField="indeterminate" />
4747
+ * ```
3471
4748
  */
3472
4749
  checkIndeterminateField?: string;
3473
4750
  /**
3474
4751
  * Specifies the name of the field which will provide a Boolean representation of the expanded state of the item.
4752
+ *
4753
+ * @example
4754
+ * ```jsx
4755
+ * <MultiSelectTree expandField="expanded" />
4756
+ * ```
3475
4757
  */
3476
4758
  expandField?: string;
3477
4759
  /**
3478
4760
  * Specifies the name of the field which will provide an array representation of the item subitems.
3479
4761
  * Defaults to 'items'.
4762
+ *
4763
+ * @example
4764
+ * ```jsx
4765
+ * <MultiSelectTree subItemsField="children" />
4766
+ * ```
3480
4767
  */
3481
4768
  subItemsField?: string;
3482
4769
  /**
3483
4770
  * Configures the popup of the MultiSelectTree.
4771
+ *
4772
+ * @example
4773
+ * ```jsx
4774
+ * <MultiSelectTree popupSettings={{ animate: true }} />
4775
+ * ```
3484
4776
  */
3485
4777
  popupSettings?: DropDownsPopupSettings;
3486
4778
  /**
3487
4779
  * Represents a callback function, which returns the value for submitting. The returned value will be rendered in an `option` of a hidden [`select`](https://react.dev/reference/react-dom/components/select) element.
3488
4780
  *
3489
4781
  * @example
3490
- * ```jsx-no-run
3491
- * class App extends React.Component {
3492
- * render() {
3493
- * return (
3494
- * <form>
3495
- * <MultiSelectTree
3496
- * data={[ { text: "Austria", id: 1 } , { text: "Belarus", id: 2 } ]}
3497
- * valueMap={value => value && value.id}
3498
- * />
3499
- * <button type="submit">Submit</button>
3500
- * </form>
3501
- * );
3502
- * }
3503
- * }
3504
- * ReactDOM.render(<App />, document.querySelector('my-app'));
4782
+ * ```jsx
4783
+ * <MultiSelectTree valueMap={value => value && value.id} />
3505
4784
  * ```
3506
4785
  */
3507
4786
  valueMap?: (value: Array<any>) => any;
3508
4787
  /**
3509
4788
  * Fires each time the popup of the MultiSelectTree is about to open.
4789
+ *
4790
+ * @example
4791
+ * ```jsx
4792
+ * <MultiSelectTree onOpen={(event) => console.log(event)} />
4793
+ * ```
3510
4794
  */
3511
4795
  onOpen?: (event: MultiSelectTreeOpenEvent) => void;
3512
4796
  /**
3513
4797
  * Fires each time the popup of the MultiSelectTree is about to close.
4798
+ *
4799
+ * @example
4800
+ * ```jsx
4801
+ * <MultiSelectTree onClose={(event) => console.log(event)} />
4802
+ * ```
3514
4803
  */
3515
4804
  onClose?: (event: MultiSelectTreeCloseEvent) => void;
3516
4805
  /**
3517
4806
  * Fires each time the user focuses the MultiSelectTree.
4807
+ *
4808
+ * @example
4809
+ * ```jsx
4810
+ * <MultiSelectTree onFocus={(event) => console.log(event)} />
4811
+ * ```
3518
4812
  */
3519
4813
  onFocus?: (event: MultiSelectTreeFocusEvent) => void;
3520
4814
  /**
3521
4815
  * Fires each time the MultiSelectTree gets blurred.
4816
+ *
4817
+ * @example
4818
+ * ```jsx
4819
+ * <MultiSelectTree onBlur={(event) => console.log(event)} />
4820
+ * ```
3522
4821
  */
3523
4822
  onBlur?: (event: MultiSelectTreeBlurEvent) => void;
3524
4823
  /**
3525
4824
  * Fires each time the value of the MultiSelectTree is about to change ([see examples]({% slug overview_multiselecttree %})).
4825
+ *
4826
+ * @example
4827
+ * ```jsx
4828
+ * <MultiSelectTree onChange={(event) => console.log(event)} />
4829
+ * ```
3526
4830
  */
3527
4831
  onChange?: (event: MultiSelectTreeChangeEvent) => void;
3528
4832
  /**
3529
4833
  * Fires each time the popup of the MultiSelectTree is about to cancel in ([adaptive mode]({% slug adaptive_rendering_multiselecttree %})).
4834
+ *
4835
+ * @example
4836
+ * ```jsx
4837
+ * <MultiSelectTree onCancel={(event) => console.log(event)} />
4838
+ * ```
3530
4839
  */
3531
4840
  onCancel?: (event: MultiSelectTreeCancelEvent) => void;
3532
4841
  /**
3533
4842
  * Fires each time the user types in the filter input
3534
4843
  * ([see example]({% slug filtering_multiselecttree %}#toc-basic-configuration)).
3535
4844
  * You can filter the source based on the passed filtration value.
4845
+ *
4846
+ * @example
4847
+ * ```jsx
4848
+ * <MultiSelectTree onFilterChange={(event) => console.log(event)} />
4849
+ * ```
3536
4850
  */
3537
4851
  onFilterChange?: (event: MultiSelectTreeFilterChangeEvent) => void;
3538
4852
  /**
3539
4853
  * Fires when the expanding or collapsing of an item is requested ([see examples]({% slug overview_multiselecttree %})).
4854
+ *
4855
+ * @example
4856
+ * ```jsx
4857
+ * <MultiSelectTree onExpandChange={(event) => console.log(event)} />
4858
+ * ```
3540
4859
  */
3541
4860
  onExpandChange?: (event: any) => void;
3542
4861
  /**
3543
4862
  * Defines the component that will be used for rendering each of the MultiSelectTree items
3544
4863
  * ([see example]({% slug customrendering_multiselecttree %}#toc-items-and-value-element)).
4864
+ *
4865
+ * @example
4866
+ * ```jsx
4867
+ * <MultiSelectTree item={(props) => <div>{props.item.text}</div>} />
4868
+ * ```
3545
4869
  */
3546
4870
  item?: React_2.ComponentType<MultiSelectTreeItemProps>;
3547
4871
  /**
3548
4872
  * Defines the component that will be rendered in the MultiSelectTree popup when no data is available
3549
4873
  * ([see example]({% slug customrendering_multiselecttree %}#toc-no-data)).
4874
+ *
4875
+ * @example
4876
+ * ```jsx
4877
+ * <MultiSelectTree listNoData={() => <div>No data available</div>} />
4878
+ * ```
3550
4879
  */
3551
4880
  listNoData?: React_2.ComponentType<MultiSelectTreeListNoDataProps>;
4881
+ /**
4882
+ * Defines the component that will be used for rendering each of the MultiSelectTree tags.
4883
+ *
4884
+ * @example
4885
+ * ```jsx
4886
+ * <MultiSelectTree tag={(props) => <span>{props.tagData.text}</span>} />
4887
+ * ```
4888
+ */
3552
4889
  tag?: React_2.ComponentType<MultiSelectTreeTagProps>;
3553
4890
  /**
3554
4891
  * Configures the `size` of the MultiSelectTree.
@@ -3560,6 +4897,11 @@ export declare interface MultiSelectTreeProps extends FormComponentProps {
3560
4897
  * - null&mdash;Does not set a size `className`.
3561
4898
  *
3562
4899
  * @default `medium`
4900
+ *
4901
+ * @example
4902
+ * ```jsx
4903
+ * <MultiSelectTree size="large" />
4904
+ * ```
3563
4905
  */
3564
4906
  size?: null | 'small' | 'medium' | 'large';
3565
4907
  /**
@@ -3573,6 +4915,11 @@ export declare interface MultiSelectTreeProps extends FormComponentProps {
3573
4915
  * - null&mdash;Does not set a rounded `className`.
3574
4916
  *
3575
4917
  * @default `medium`
4918
+ *
4919
+ * @example
4920
+ * ```jsx
4921
+ * <MultiSelectTree rounded="full" />
4922
+ * ```
3576
4923
  */
3577
4924
  rounded?: null | 'small' | 'medium' | 'large' | 'full';
3578
4925
  /**
@@ -3585,14 +4932,29 @@ export declare interface MultiSelectTreeProps extends FormComponentProps {
3585
4932
  * - null&mdash;Does not set a fillMode `className`.
3586
4933
  *
3587
4934
  * @default `solid`
4935
+ *
4936
+ * @example
4937
+ * ```jsx
4938
+ * <MultiSelectTree fillMode="outline" />
4939
+ * ```
3588
4940
  */
3589
4941
  fillMode?: null | 'solid' | 'flat' | 'outline';
3590
4942
  /**
3591
4943
  * Providing different rendering of the popup element based on the screen dimensions.
4944
+ *
4945
+ * @example
4946
+ * ```jsx
4947
+ * <MultiSelectTree adaptive={true} />
4948
+ * ```
3592
4949
  */
3593
4950
  adaptive?: boolean;
3594
4951
  /**
3595
4952
  * Specifies the text that is rendered as title in the adaptive popup.
4953
+ *
4954
+ * @example
4955
+ * ```jsx
4956
+ * <MultiSelectTree adaptiveTitle="Select items" />
4957
+ * ```
3596
4958
  */
3597
4959
  adaptiveTitle?: string | React_2.ReactNode;
3598
4960
  }