@progress/kendo-react-dialogs 10.2.0-develop.6 → 10.2.0-develop.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.d.mts +247 -4
  2. package/index.d.ts +247 -4
  3. package/package.json +4 -4
package/index.d.mts CHANGED
@@ -67,47 +67,102 @@ export declare interface DialogHandle extends Pick<DialogWithoutContext, keyof D
67
67
  */
68
68
  export declare interface DialogProps {
69
69
  /**
70
- * Focus the Dialog container automatically when mounted. By default the autoFocus is false.
70
+ * Set the focus the Dialog container automatically when mounted. By default, the `autoFocus` is `false`.
71
+ *
72
+ * @example
73
+ * ```jsx
74
+ * <Dialog autoFocus={true} />
75
+ * ```
71
76
  */
72
77
  autoFocus?: boolean;
73
78
  /**
74
79
  * Specifies the query selector used to set the initial focus ([see examples]({% slug initial_focus_dialogs %})).
80
+ *
81
+ * @example
82
+ * ```jsx
83
+ * <Dialog autoFocusedElement="#input-id" />
84
+ * ```
75
85
  */
76
86
  autoFocusedElement?: string;
77
87
  /**
78
88
  * Sets the title of the Dialog ([see example]({% slug title_dialog %})). If `title` is not specified, the Dialog does not render a **Close** button.
89
+ *
90
+ * @example
91
+ * ```jsx
92
+ * <Dialog title="Dialog Title" />
93
+ * ```
79
94
  */
80
95
  title?: string | React.ReactElement<any>;
81
96
  /**
82
97
  * Sets a class of the Dialog DOM element.
98
+ *
99
+ * @example
100
+ * ```jsx
101
+ * <Dialog className="custom-class" />
102
+ * ```
83
103
  */
84
104
  className?: string;
85
105
  /**
86
106
  * Specifies whether a close button should be rendered at the top corner of the dialog.
107
+ *
108
+ * @example
109
+ * ```jsx
110
+ * <Dialog closeIcon={true} />
111
+ * ```
87
112
  */
88
113
  closeIcon?: boolean;
89
114
  /**
90
115
  * Specifies if the Dialog will be modal by rendering an overlay under the component. Defaults to `true`.
116
+ *
117
+ * @example
118
+ * ```jsx
119
+ * <Dialog modal={false} />
120
+ * ```
91
121
  */
92
122
  modal?: boolean;
93
123
  /**
94
124
  * Set styles to the Dialog overlay element rendered when the `modal` prop is enabled.
125
+ *
126
+ * @example
127
+ * ```jsx
128
+ * <Dialog overlayStyle={{ backgroundColor: 'rgba(0, 0, 0, 0.5)' }} />
129
+ * ```
95
130
  */
96
131
  overlayStyle?: React.CSSProperties;
97
132
  /**
98
133
  * Specifies the width of the Dialog ([see example]({% slug dimensions_dialog %})).
134
+ *
135
+ * @example
136
+ * ```jsx
137
+ * <Dialog width="400px" />
138
+ * ```
99
139
  */
100
140
  width?: number | string;
101
141
  /**
102
142
  * Specifies the height of the Dialog ([see example]({% slug dimensions_dialog %})).
143
+ *
144
+ * @example
145
+ * ```jsx
146
+ * <Dialog height="300px" />
147
+ * ```
103
148
  */
104
149
  height?: number | string;
105
150
  /**
106
151
  * Specifies the minimum width of the Dialog.
152
+ *
153
+ * @example
154
+ * ```jsx
155
+ * <Dialog minWidth="200px" />
156
+ * ```
107
157
  */
108
158
  minWidth?: number | string;
109
159
  /**
110
160
  * Fires when the **Close** button in the title is clicked or when the `Esc` button is pressed.
161
+ *
162
+ * @example
163
+ * ```jsx
164
+ * <Dialog onClose={(event) => console.log(event)} />
165
+ * ```
111
166
  */
112
167
  onClose?: (event: DialogCloseEvent) => void;
113
168
  /**
@@ -116,23 +171,48 @@ export declare interface DialogProps {
116
171
  children?: React.ReactNode;
117
172
  /**
118
173
  * Sets the `aria-labelledby` value.
174
+ *
175
+ * @example
176
+ * ```jsx
177
+ * <Dialog id="dialog-id" />
178
+ * ```
119
179
  */
120
180
  id?: string;
121
181
  /**
122
182
  * Represents the `dir` HTML attribute.
183
+ *
184
+ * @example
185
+ * ```jsx
186
+ * <Dialog dir="rtl" />
187
+ * ```
123
188
  */
124
189
  dir?: string;
125
190
  /**
126
191
  * The styles that are applied to the Dialog.
192
+ *
193
+ * @example
194
+ * ```jsx
195
+ * <Dialog style={{ border: '1px solid black' }} />
196
+ * ```
127
197
  */
128
198
  style?: React.CSSProperties;
129
199
  /**
130
200
  * The styles that are applied to the content of the Dialog.
201
+ *
202
+ * @example
203
+ * ```jsx
204
+ * <Dialog contentStyle={{ padding: '20px' }} />
205
+ * ```
131
206
  */
132
207
  contentStyle?: React.CSSProperties;
133
208
  /**
134
209
  * Defines the container to which the Dialog will be appended. Defaults to body.
135
210
  * * If set to `null` the Dialog will be rendered without React Portal.
211
+ *
212
+ * @example
213
+ * ```jsx
214
+ * <Dialog appendTo={document.getElementById('container')} />
215
+ * ```
136
216
  */
137
217
  appendTo?: any;
138
218
  /**
@@ -143,6 +223,10 @@ export declare interface DialogProps {
143
223
  * - dark
144
224
  * - light
145
225
  *
226
+ * @example
227
+ * ```jsx
228
+ * <Dialog themeColor="dark" />
229
+ * ```
146
230
  */
147
231
  themeColor?: 'primary' | 'dark' | 'light';
148
232
  }
@@ -317,11 +401,21 @@ export declare interface WindowMoveEvent {
317
401
  export declare interface WindowProps {
318
402
  /**
319
403
  * Defines the container to which the Window will be appended. Defaults to its parent element.
320
- * * If set to `null` the Window will be rendered without React Portal.
404
+ * If set to `null`, the Window will be rendered without React Portal.
405
+ *
406
+ * @example
407
+ * ```jsx
408
+ * <Window appendTo={document.body} />
409
+ * ```
321
410
  */
322
411
  appendTo?: HTMLElement | null;
323
412
  /**
324
- * Focus the Window container automatically when mounted. By default the autoFocus is true.
413
+ * Focus the Window container automatically when mounted. By default, the `autoFocus` is `true`.
414
+ *
415
+ * @example
416
+ * ```jsx
417
+ * <Window autoFocus={false} />
418
+ * ```
325
419
  */
326
420
  autoFocus?: boolean;
327
421
  /**
@@ -330,82 +424,182 @@ export declare interface WindowProps {
330
424
  children?: React.ReactNode;
331
425
  /**
332
426
  * Specifies if the Window will render the close button.
427
+ *
428
+ * @example
429
+ * ```jsx
430
+ * <Window closeButton={CustomCloseButton} />
431
+ * ```
333
432
  */
334
433
  closeButton?: React.ComponentType<any>;
335
434
  /**
336
- * Specifies if the Window stage will change on title double click. The this is on by default.
435
+ * Specifies if the Window stage will change on title double click. This is on by default.
436
+ *
437
+ * @example
438
+ * ```jsx
439
+ * <Window doubleClickStageChange={false} />
440
+ * ```
337
441
  */
338
442
  doubleClickStageChange?: boolean;
339
443
  /**
340
444
  * Specifies if the Window will be draggable ([see example]({% slug positioningdragging_window %}#toc-dragging)).
445
+ *
446
+ * @example
447
+ * ```jsx
448
+ * <Window draggable={true} />
449
+ * ```
341
450
  */
342
451
  draggable?: boolean;
343
452
  /**
344
453
  * Specifies the height of the Window ([see example]({% slug dimensionsresizing_window %}#toc-dimensions)).
454
+ *
455
+ * @example
456
+ * ```jsx
457
+ * <Window height={500} />
458
+ * ```
345
459
  */
346
460
  height?: number;
347
461
  /**
348
462
  * Specifies the initial `left` value ([see example]({% slug positioningdragging_window %}#toc-positioning)). The Window will be in an uncontrolled mode.
463
+ *
464
+ * @example
465
+ * ```jsx
466
+ * <Window initialLeft={100} />
467
+ * ```
349
468
  */
350
469
  initialLeft?: number;
351
470
  /**
352
471
  * Specifies the initial `top` value ([see example]({% slug positioningdragging_window %}#toc-positioning)). The component will be in an uncontrolled mode.
472
+ *
473
+ * @example
474
+ * ```jsx
475
+ * <Window initialTop={50} />
476
+ * ```
353
477
  */
354
478
  initialTop?: number;
355
479
  /**
356
480
  * Specifies the initial width of the Window ([see example]({% slug dimensionsresizing_window %}#toc-dimensions)). The component will be in an uncontrolled mode.
481
+ *
482
+ * @example
483
+ * ```jsx
484
+ * <Window initialWidth={300} />
485
+ * ```
357
486
  */
358
487
  initialWidth?: number;
359
488
  /**
360
489
  * Specifies the initial height of the Window ([see example]({% slug dimensionsresizing_window %}#toc-dimensions)). The component will be in an uncontrolled mode.
490
+ *
491
+ * @example
492
+ * ```jsx
493
+ * <Window initialHeight={200} />
494
+ * ```
361
495
  */
362
496
  initialHeight?: number;
363
497
  /**
364
498
  * Specifies the left coordinates of the Window.
499
+ *
500
+ * @example
501
+ * ```jsx
502
+ * <Window left={150} />
503
+ * ```
365
504
  */
366
505
  left?: number;
367
506
  /**
368
507
  * Specifies if the Window will render the maximize button.
508
+ *
509
+ * @example
510
+ * ```jsx
511
+ * <Window maximizeButton={CustomMaximizeButton} />
512
+ * ```
369
513
  */
370
514
  maximizeButton?: React.ComponentType<any>;
371
515
  /**
372
516
  * Specifies the minimum height of the Window ([see example]({% slug dimensionsresizing_window %}#toc-resizing)).
517
+ *
518
+ * @example
519
+ * ```jsx
520
+ * <Window minHeight={100} />
521
+ * ```
373
522
  */
374
523
  minHeight?: number;
375
524
  /**
376
525
  * Specifies the minimum width of the Window ([see example]({% slug dimensionsresizing_window %}#toc-resizing)).
526
+ *
527
+ * @example
528
+ * ```jsx
529
+ * <Window minWidth={100} />
530
+ * ```
377
531
  */
378
532
  minWidth?: number;
379
533
  /**
380
534
  * Specifies if the Window will render the minimize button.
535
+ *
536
+ * @example
537
+ * ```jsx
538
+ * <Window minimizeButton={CustomMinimizeButton} />
539
+ * ```
381
540
  */
382
541
  minimizeButton?: React.ComponentType<any>;
383
542
  /**
384
543
  * Specifies if the Window will be modal by rendering an overlay under the component.
544
+ *
545
+ * @example
546
+ * ```jsx
547
+ * <Window modal={true} />
548
+ * ```
385
549
  */
386
550
  modal?: boolean;
387
551
  /**
388
552
  * Specifies if the Window will be resizable ([see example]({% slug dimensionsresizing_window %}#toc-resizing)).
553
+ *
554
+ * @example
555
+ * ```jsx
556
+ * <Window resizable={true} />
557
+ * ```
389
558
  */
390
559
  resizable?: boolean;
391
560
  /**
392
561
  * Specifies if the Window will render the restore button.
562
+ *
563
+ * @example
564
+ * ```jsx
565
+ * <Window restoreButton={CustomRestoreButton} />
566
+ * ```
393
567
  */
394
568
  restoreButton?: React.ComponentType<any>;
395
569
  /**
396
570
  * Specifies if the Window content will update during resizing.
571
+ *
572
+ * @example
573
+ * ```jsx
574
+ * <Window shouldUpdateOnDrag={true} />
575
+ * ```
397
576
  */
398
577
  shouldUpdateOnDrag?: boolean;
399
578
  /**
400
579
  * Specifies the title of the Window ([see example]({% slug title_window %})).
580
+ *
581
+ * @example
582
+ * ```jsx
583
+ * <Window title="My Window" />
584
+ * ```
401
585
  */
402
586
  title?: React.ReactNode | string;
403
587
  /**
404
588
  * Specifies the top coordinates of the Window.
589
+ *
590
+ * @example
591
+ * ```jsx
592
+ * <Window top={100} />
593
+ * ```
405
594
  */
406
595
  top?: number;
407
596
  /**
408
597
  * Specifies the width of the Window.
598
+ *
599
+ * @example
600
+ * ```jsx
601
+ * <Window width={400} />
602
+ * ```
409
603
  */
410
604
  width?: number;
411
605
  /**
@@ -415,18 +609,38 @@ export declare interface WindowProps {
415
609
  * * `DEFAULT`
416
610
  * * `MINIMIZED`
417
611
  * * `FULLSCREEN`
612
+ *
613
+ * @example
614
+ * ```jsx
615
+ * <Window stage="DEFAULT" />
616
+ * ```
418
617
  */
419
618
  stage?: windowStage | string;
420
619
  /**
421
620
  * Set styles to the Window element.
621
+ *
622
+ * @example
623
+ * ```jsx
624
+ * <Window style={{ backgroundColor: 'red' }} />
625
+ * ```
422
626
  */
423
627
  style?: React.CSSProperties;
424
628
  /**
425
629
  * Set styles to the Window overlay element rendered when the `modal` prop is enabled.
630
+ *
631
+ * @example
632
+ * ```jsx
633
+ * <Window overlayStyle={{ opacity: 0.5 }} />
634
+ * ```
426
635
  */
427
636
  overlayStyle?: React.CSSProperties;
428
637
  /**
429
638
  * Sets a class of the Window DOM element.
639
+ *
640
+ * @example
641
+ * ```jsx
642
+ * <Window className="custom-class" />
643
+ * ```
430
644
  */
431
645
  className?: string;
432
646
  /**
@@ -437,26 +651,55 @@ export declare interface WindowProps {
437
651
  * - dark
438
652
  * - light
439
653
  *
654
+ * @example
655
+ * ```jsx
656
+ * <Window themeColor="dark" />
657
+ * ```
440
658
  */
441
659
  themeColor?: 'primary' | 'dark' | 'light';
442
660
  /**
443
661
  * Fires when the **Close** button in the title is clicked or when the `Esc` button is pressed.
662
+ *
663
+ * @example
664
+ * ```jsx
665
+ * <Window onClose={(event) => console.log('Window closed', event)} />
666
+ * ```
444
667
  */
445
668
  onClose?: (event: WindowActionsEvent) => void;
446
669
  /**
447
670
  * Fires when the Window is dragged.
671
+ *
672
+ * @example
673
+ * ```jsx
674
+ * <Window onMove={(event) => console.log('Window moved', event)} />
675
+ * ```
448
676
  */
449
677
  onMove?: (event: WindowMoveEvent) => void;
450
678
  /**
451
679
  * Fires when the `DEFAULT`, `FULLSCREEN`, or `MINIMIZED` state of the Window is changed.
680
+ *
681
+ * @example
682
+ * ```jsx
683
+ * <Window onStageChange={(event) => console.log('Stage changed', event)} />
684
+ * ```
452
685
  */
453
686
  onStageChange?: (event: WindowActionsEvent) => void;
454
687
  /**
455
688
  * Fires when the Window resizes.
689
+ *
690
+ * @example
691
+ * ```jsx
692
+ * <Window onResize={(event) => console.log('Window resized', event)} />
693
+ * ```
456
694
  */
457
695
  onResize?: (event: WindowMoveEvent) => void;
458
696
  /**
459
697
  * Sets the `id` attribute value of the wrapper element of the Window.
698
+ *
699
+ * @example
700
+ * ```jsx
701
+ * <Window id="my-window" />
702
+ * ```
460
703
  */
461
704
  id?: string;
462
705
  }
package/index.d.ts CHANGED
@@ -67,47 +67,102 @@ export declare interface DialogHandle extends Pick<DialogWithoutContext, keyof D
67
67
  */
68
68
  export declare interface DialogProps {
69
69
  /**
70
- * Focus the Dialog container automatically when mounted. By default the autoFocus is false.
70
+ * Set the focus the Dialog container automatically when mounted. By default, the `autoFocus` is `false`.
71
+ *
72
+ * @example
73
+ * ```jsx
74
+ * <Dialog autoFocus={true} />
75
+ * ```
71
76
  */
72
77
  autoFocus?: boolean;
73
78
  /**
74
79
  * Specifies the query selector used to set the initial focus ([see examples]({% slug initial_focus_dialogs %})).
80
+ *
81
+ * @example
82
+ * ```jsx
83
+ * <Dialog autoFocusedElement="#input-id" />
84
+ * ```
75
85
  */
76
86
  autoFocusedElement?: string;
77
87
  /**
78
88
  * Sets the title of the Dialog ([see example]({% slug title_dialog %})). If `title` is not specified, the Dialog does not render a **Close** button.
89
+ *
90
+ * @example
91
+ * ```jsx
92
+ * <Dialog title="Dialog Title" />
93
+ * ```
79
94
  */
80
95
  title?: string | React.ReactElement<any>;
81
96
  /**
82
97
  * Sets a class of the Dialog DOM element.
98
+ *
99
+ * @example
100
+ * ```jsx
101
+ * <Dialog className="custom-class" />
102
+ * ```
83
103
  */
84
104
  className?: string;
85
105
  /**
86
106
  * Specifies whether a close button should be rendered at the top corner of the dialog.
107
+ *
108
+ * @example
109
+ * ```jsx
110
+ * <Dialog closeIcon={true} />
111
+ * ```
87
112
  */
88
113
  closeIcon?: boolean;
89
114
  /**
90
115
  * Specifies if the Dialog will be modal by rendering an overlay under the component. Defaults to `true`.
116
+ *
117
+ * @example
118
+ * ```jsx
119
+ * <Dialog modal={false} />
120
+ * ```
91
121
  */
92
122
  modal?: boolean;
93
123
  /**
94
124
  * Set styles to the Dialog overlay element rendered when the `modal` prop is enabled.
125
+ *
126
+ * @example
127
+ * ```jsx
128
+ * <Dialog overlayStyle={{ backgroundColor: 'rgba(0, 0, 0, 0.5)' }} />
129
+ * ```
95
130
  */
96
131
  overlayStyle?: React.CSSProperties;
97
132
  /**
98
133
  * Specifies the width of the Dialog ([see example]({% slug dimensions_dialog %})).
134
+ *
135
+ * @example
136
+ * ```jsx
137
+ * <Dialog width="400px" />
138
+ * ```
99
139
  */
100
140
  width?: number | string;
101
141
  /**
102
142
  * Specifies the height of the Dialog ([see example]({% slug dimensions_dialog %})).
143
+ *
144
+ * @example
145
+ * ```jsx
146
+ * <Dialog height="300px" />
147
+ * ```
103
148
  */
104
149
  height?: number | string;
105
150
  /**
106
151
  * Specifies the minimum width of the Dialog.
152
+ *
153
+ * @example
154
+ * ```jsx
155
+ * <Dialog minWidth="200px" />
156
+ * ```
107
157
  */
108
158
  minWidth?: number | string;
109
159
  /**
110
160
  * Fires when the **Close** button in the title is clicked or when the `Esc` button is pressed.
161
+ *
162
+ * @example
163
+ * ```jsx
164
+ * <Dialog onClose={(event) => console.log(event)} />
165
+ * ```
111
166
  */
112
167
  onClose?: (event: DialogCloseEvent) => void;
113
168
  /**
@@ -116,23 +171,48 @@ export declare interface DialogProps {
116
171
  children?: React.ReactNode;
117
172
  /**
118
173
  * Sets the `aria-labelledby` value.
174
+ *
175
+ * @example
176
+ * ```jsx
177
+ * <Dialog id="dialog-id" />
178
+ * ```
119
179
  */
120
180
  id?: string;
121
181
  /**
122
182
  * Represents the `dir` HTML attribute.
183
+ *
184
+ * @example
185
+ * ```jsx
186
+ * <Dialog dir="rtl" />
187
+ * ```
123
188
  */
124
189
  dir?: string;
125
190
  /**
126
191
  * The styles that are applied to the Dialog.
192
+ *
193
+ * @example
194
+ * ```jsx
195
+ * <Dialog style={{ border: '1px solid black' }} />
196
+ * ```
127
197
  */
128
198
  style?: React.CSSProperties;
129
199
  /**
130
200
  * The styles that are applied to the content of the Dialog.
201
+ *
202
+ * @example
203
+ * ```jsx
204
+ * <Dialog contentStyle={{ padding: '20px' }} />
205
+ * ```
131
206
  */
132
207
  contentStyle?: React.CSSProperties;
133
208
  /**
134
209
  * Defines the container to which the Dialog will be appended. Defaults to body.
135
210
  * * If set to `null` the Dialog will be rendered without React Portal.
211
+ *
212
+ * @example
213
+ * ```jsx
214
+ * <Dialog appendTo={document.getElementById('container')} />
215
+ * ```
136
216
  */
137
217
  appendTo?: any;
138
218
  /**
@@ -143,6 +223,10 @@ export declare interface DialogProps {
143
223
  * - dark
144
224
  * - light
145
225
  *
226
+ * @example
227
+ * ```jsx
228
+ * <Dialog themeColor="dark" />
229
+ * ```
146
230
  */
147
231
  themeColor?: 'primary' | 'dark' | 'light';
148
232
  }
@@ -317,11 +401,21 @@ export declare interface WindowMoveEvent {
317
401
  export declare interface WindowProps {
318
402
  /**
319
403
  * Defines the container to which the Window will be appended. Defaults to its parent element.
320
- * * If set to `null` the Window will be rendered without React Portal.
404
+ * If set to `null`, the Window will be rendered without React Portal.
405
+ *
406
+ * @example
407
+ * ```jsx
408
+ * <Window appendTo={document.body} />
409
+ * ```
321
410
  */
322
411
  appendTo?: HTMLElement | null;
323
412
  /**
324
- * Focus the Window container automatically when mounted. By default the autoFocus is true.
413
+ * Focus the Window container automatically when mounted. By default, the `autoFocus` is `true`.
414
+ *
415
+ * @example
416
+ * ```jsx
417
+ * <Window autoFocus={false} />
418
+ * ```
325
419
  */
326
420
  autoFocus?: boolean;
327
421
  /**
@@ -330,82 +424,182 @@ export declare interface WindowProps {
330
424
  children?: React.ReactNode;
331
425
  /**
332
426
  * Specifies if the Window will render the close button.
427
+ *
428
+ * @example
429
+ * ```jsx
430
+ * <Window closeButton={CustomCloseButton} />
431
+ * ```
333
432
  */
334
433
  closeButton?: React.ComponentType<any>;
335
434
  /**
336
- * Specifies if the Window stage will change on title double click. The this is on by default.
435
+ * Specifies if the Window stage will change on title double click. This is on by default.
436
+ *
437
+ * @example
438
+ * ```jsx
439
+ * <Window doubleClickStageChange={false} />
440
+ * ```
337
441
  */
338
442
  doubleClickStageChange?: boolean;
339
443
  /**
340
444
  * Specifies if the Window will be draggable ([see example]({% slug positioningdragging_window %}#toc-dragging)).
445
+ *
446
+ * @example
447
+ * ```jsx
448
+ * <Window draggable={true} />
449
+ * ```
341
450
  */
342
451
  draggable?: boolean;
343
452
  /**
344
453
  * Specifies the height of the Window ([see example]({% slug dimensionsresizing_window %}#toc-dimensions)).
454
+ *
455
+ * @example
456
+ * ```jsx
457
+ * <Window height={500} />
458
+ * ```
345
459
  */
346
460
  height?: number;
347
461
  /**
348
462
  * Specifies the initial `left` value ([see example]({% slug positioningdragging_window %}#toc-positioning)). The Window will be in an uncontrolled mode.
463
+ *
464
+ * @example
465
+ * ```jsx
466
+ * <Window initialLeft={100} />
467
+ * ```
349
468
  */
350
469
  initialLeft?: number;
351
470
  /**
352
471
  * Specifies the initial `top` value ([see example]({% slug positioningdragging_window %}#toc-positioning)). The component will be in an uncontrolled mode.
472
+ *
473
+ * @example
474
+ * ```jsx
475
+ * <Window initialTop={50} />
476
+ * ```
353
477
  */
354
478
  initialTop?: number;
355
479
  /**
356
480
  * Specifies the initial width of the Window ([see example]({% slug dimensionsresizing_window %}#toc-dimensions)). The component will be in an uncontrolled mode.
481
+ *
482
+ * @example
483
+ * ```jsx
484
+ * <Window initialWidth={300} />
485
+ * ```
357
486
  */
358
487
  initialWidth?: number;
359
488
  /**
360
489
  * Specifies the initial height of the Window ([see example]({% slug dimensionsresizing_window %}#toc-dimensions)). The component will be in an uncontrolled mode.
490
+ *
491
+ * @example
492
+ * ```jsx
493
+ * <Window initialHeight={200} />
494
+ * ```
361
495
  */
362
496
  initialHeight?: number;
363
497
  /**
364
498
  * Specifies the left coordinates of the Window.
499
+ *
500
+ * @example
501
+ * ```jsx
502
+ * <Window left={150} />
503
+ * ```
365
504
  */
366
505
  left?: number;
367
506
  /**
368
507
  * Specifies if the Window will render the maximize button.
508
+ *
509
+ * @example
510
+ * ```jsx
511
+ * <Window maximizeButton={CustomMaximizeButton} />
512
+ * ```
369
513
  */
370
514
  maximizeButton?: React.ComponentType<any>;
371
515
  /**
372
516
  * Specifies the minimum height of the Window ([see example]({% slug dimensionsresizing_window %}#toc-resizing)).
517
+ *
518
+ * @example
519
+ * ```jsx
520
+ * <Window minHeight={100} />
521
+ * ```
373
522
  */
374
523
  minHeight?: number;
375
524
  /**
376
525
  * Specifies the minimum width of the Window ([see example]({% slug dimensionsresizing_window %}#toc-resizing)).
526
+ *
527
+ * @example
528
+ * ```jsx
529
+ * <Window minWidth={100} />
530
+ * ```
377
531
  */
378
532
  minWidth?: number;
379
533
  /**
380
534
  * Specifies if the Window will render the minimize button.
535
+ *
536
+ * @example
537
+ * ```jsx
538
+ * <Window minimizeButton={CustomMinimizeButton} />
539
+ * ```
381
540
  */
382
541
  minimizeButton?: React.ComponentType<any>;
383
542
  /**
384
543
  * Specifies if the Window will be modal by rendering an overlay under the component.
544
+ *
545
+ * @example
546
+ * ```jsx
547
+ * <Window modal={true} />
548
+ * ```
385
549
  */
386
550
  modal?: boolean;
387
551
  /**
388
552
  * Specifies if the Window will be resizable ([see example]({% slug dimensionsresizing_window %}#toc-resizing)).
553
+ *
554
+ * @example
555
+ * ```jsx
556
+ * <Window resizable={true} />
557
+ * ```
389
558
  */
390
559
  resizable?: boolean;
391
560
  /**
392
561
  * Specifies if the Window will render the restore button.
562
+ *
563
+ * @example
564
+ * ```jsx
565
+ * <Window restoreButton={CustomRestoreButton} />
566
+ * ```
393
567
  */
394
568
  restoreButton?: React.ComponentType<any>;
395
569
  /**
396
570
  * Specifies if the Window content will update during resizing.
571
+ *
572
+ * @example
573
+ * ```jsx
574
+ * <Window shouldUpdateOnDrag={true} />
575
+ * ```
397
576
  */
398
577
  shouldUpdateOnDrag?: boolean;
399
578
  /**
400
579
  * Specifies the title of the Window ([see example]({% slug title_window %})).
580
+ *
581
+ * @example
582
+ * ```jsx
583
+ * <Window title="My Window" />
584
+ * ```
401
585
  */
402
586
  title?: React.ReactNode | string;
403
587
  /**
404
588
  * Specifies the top coordinates of the Window.
589
+ *
590
+ * @example
591
+ * ```jsx
592
+ * <Window top={100} />
593
+ * ```
405
594
  */
406
595
  top?: number;
407
596
  /**
408
597
  * Specifies the width of the Window.
598
+ *
599
+ * @example
600
+ * ```jsx
601
+ * <Window width={400} />
602
+ * ```
409
603
  */
410
604
  width?: number;
411
605
  /**
@@ -415,18 +609,38 @@ export declare interface WindowProps {
415
609
  * * `DEFAULT`
416
610
  * * `MINIMIZED`
417
611
  * * `FULLSCREEN`
612
+ *
613
+ * @example
614
+ * ```jsx
615
+ * <Window stage="DEFAULT" />
616
+ * ```
418
617
  */
419
618
  stage?: windowStage | string;
420
619
  /**
421
620
  * Set styles to the Window element.
621
+ *
622
+ * @example
623
+ * ```jsx
624
+ * <Window style={{ backgroundColor: 'red' }} />
625
+ * ```
422
626
  */
423
627
  style?: React.CSSProperties;
424
628
  /**
425
629
  * Set styles to the Window overlay element rendered when the `modal` prop is enabled.
630
+ *
631
+ * @example
632
+ * ```jsx
633
+ * <Window overlayStyle={{ opacity: 0.5 }} />
634
+ * ```
426
635
  */
427
636
  overlayStyle?: React.CSSProperties;
428
637
  /**
429
638
  * Sets a class of the Window DOM element.
639
+ *
640
+ * @example
641
+ * ```jsx
642
+ * <Window className="custom-class" />
643
+ * ```
430
644
  */
431
645
  className?: string;
432
646
  /**
@@ -437,26 +651,55 @@ export declare interface WindowProps {
437
651
  * - dark
438
652
  * - light
439
653
  *
654
+ * @example
655
+ * ```jsx
656
+ * <Window themeColor="dark" />
657
+ * ```
440
658
  */
441
659
  themeColor?: 'primary' | 'dark' | 'light';
442
660
  /**
443
661
  * Fires when the **Close** button in the title is clicked or when the `Esc` button is pressed.
662
+ *
663
+ * @example
664
+ * ```jsx
665
+ * <Window onClose={(event) => console.log('Window closed', event)} />
666
+ * ```
444
667
  */
445
668
  onClose?: (event: WindowActionsEvent) => void;
446
669
  /**
447
670
  * Fires when the Window is dragged.
671
+ *
672
+ * @example
673
+ * ```jsx
674
+ * <Window onMove={(event) => console.log('Window moved', event)} />
675
+ * ```
448
676
  */
449
677
  onMove?: (event: WindowMoveEvent) => void;
450
678
  /**
451
679
  * Fires when the `DEFAULT`, `FULLSCREEN`, or `MINIMIZED` state of the Window is changed.
680
+ *
681
+ * @example
682
+ * ```jsx
683
+ * <Window onStageChange={(event) => console.log('Stage changed', event)} />
684
+ * ```
452
685
  */
453
686
  onStageChange?: (event: WindowActionsEvent) => void;
454
687
  /**
455
688
  * Fires when the Window resizes.
689
+ *
690
+ * @example
691
+ * ```jsx
692
+ * <Window onResize={(event) => console.log('Window resized', event)} />
693
+ * ```
456
694
  */
457
695
  onResize?: (event: WindowMoveEvent) => void;
458
696
  /**
459
697
  * Sets the `id` attribute value of the wrapper element of the Window.
698
+ *
699
+ * @example
700
+ * ```jsx
701
+ * <Window id="my-window" />
702
+ * ```
460
703
  */
461
704
  id?: string;
462
705
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-dialogs",
3
- "version": "10.2.0-develop.6",
3
+ "version": "10.2.0-develop.8",
4
4
  "description": "React Dialogs provide modal and non-modal windows for showing additional information to the user. KendoReact Dialogs package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -26,9 +26,9 @@
26
26
  "sideEffects": false,
27
27
  "peerDependencies": {
28
28
  "@progress/kendo-licensing": "^1.5.1",
29
- "@progress/kendo-react-buttons": "10.2.0-develop.6",
30
- "@progress/kendo-react-common": "10.2.0-develop.6",
31
- "@progress/kendo-react-intl": "10.2.0-develop.6",
29
+ "@progress/kendo-react-buttons": "10.2.0-develop.8",
30
+ "@progress/kendo-react-common": "10.2.0-develop.8",
31
+ "@progress/kendo-react-intl": "10.2.0-develop.8",
32
32
  "@progress/kendo-svg-icons": "^4.0.0",
33
33
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
34
34
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"