@progress/kendo-react-dropdowns 5.13.0-dev.202304051130 → 5.13.0-dev.202304131123

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.
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { FormComponentProps } from '@progress/kendo-react-common';
3
3
  import { ItemRenderProps } from '@progress/kendo-react-treeview';
4
- import { FilterChangeEvent, OpenEvent, CloseEvent, FocusEvent, BlurEvent, DropdownEvent } from '../common/events';
4
+ import { FilterChangeEvent, OpenEvent, CloseEvent, FocusEvent, BlurEvent, DropdownEvent, CancelEvent } from '../common/events';
5
5
  import { DropDownsPopupSettings } from '../common/settings';
6
6
  import { TagData } from '../MultiSelect/TagList';
7
7
  /**
@@ -64,6 +64,11 @@ export interface MultiSelectTreeFocusEvent extends FocusEvent<MultiSelectTreeHan
64
64
  */
65
65
  export interface MultiSelectTreeBlurEvent extends BlurEvent<MultiSelectTreeHandle> {
66
66
  }
67
+ /**
68
+ * Represents the object of the `onCancel` MultiSelectTree event.
69
+ */
70
+ export interface MultiSelectTreeCancelEvent extends CancelEvent<MultiSelectTreeHandle> {
71
+ }
67
72
  /**
68
73
  * Represents the object of the `onExpandChange` MultiSelectTree event.
69
74
  */
@@ -242,6 +247,10 @@ export interface MultiSelectTreeProps extends FormComponentProps {
242
247
  * Fires each time the value of the MultiSelectTree is about to change ([see examples]({% slug overview_multiselecttree %})).
243
248
  */
244
249
  onChange?: (event: MultiSelectTreeChangeEvent) => void;
250
+ /**
251
+ * Fires each time the popup of the MultiSelectTree is about to cancel in ([adaptive mode]({% slug adaptive_rendering_multiselecttree %})).
252
+ */
253
+ onCancel?: (event: MultiSelectTreeCancelEvent) => void;
245
254
  /**
246
255
  * Fires each time the user types in the filter input
247
256
  * ([see example]({% slug filtering_multiselecttree %}#toc-basic-configuration)).
@@ -300,4 +309,12 @@ export interface MultiSelectTreeProps extends FormComponentProps {
300
309
  * @default `solid`
301
310
  */
302
311
  fillMode?: null | 'solid' | 'flat' | 'outline';
312
+ /**
313
+ * Providing different rendering of the popup element based on the screen dimensions.
314
+ */
315
+ adaptive?: boolean;
316
+ /**
317
+ * Specifies the text that is rendered as title in the adaptive popup.
318
+ */
319
+ adaptiveTitle?: string | React.ReactNode;
303
320
  }
@@ -0,0 +1,21 @@
1
+ import * as React from 'react';
2
+ /** @hidden */
3
+ export interface AdaptiveModeProps {
4
+ navigatable?: boolean;
5
+ navigatableElements?: string[];
6
+ expand: boolean;
7
+ animation?: boolean;
8
+ adaptiveTitle?: string | React.ReactNode;
9
+ onClose?: (event: React.SyntheticEvent) => void;
10
+ windowWidth?: number;
11
+ mobileFilter?: React.ReactNode;
12
+ children: React.ReactNode;
13
+ footer?: {
14
+ cancelText: string;
15
+ onCancel: (event: React.SyntheticEvent) => void;
16
+ applyText: string;
17
+ onApply: (event: React.SyntheticEvent) => void;
18
+ };
19
+ }
20
+ /** @hidden */
21
+ export declare const AdaptiveMode: (props: AdaptiveModeProps) => JSX.Element;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.AdaptiveMode = void 0;
15
+ var React = require("react");
16
+ var kendo_react_layout_1 = require("@progress/kendo-react-layout");
17
+ var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
18
+ var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
19
+ /** @hidden */
20
+ var MOBILE_SMALL_DEVISE = 500;
21
+ /** @hidden */
22
+ var AdaptiveMode = function (props) {
23
+ var footer = props.footer, children = props.children, _a = props.windowWidth, windowWidth = _a === void 0 ? 0 : _a, navigatable = props.navigatable, navigatableElements = props.navigatableElements, expand = props.expand, animation = props.animation, onClose = props.onClose, adaptiveTitle = props.adaptiveTitle, mobileFilter = props.mobileFilter;
24
+ var defaultProps = {
25
+ navigatable: navigatable || false,
26
+ navigatableElements: navigatableElements || [],
27
+ expand: expand,
28
+ animation: animation || true,
29
+ onClose: onClose,
30
+ animationStyles: windowWidth <= MOBILE_SMALL_DEVISE ? { top: 0, width: '100%', height: '100%' } : undefined,
31
+ className: windowWidth <= MOBILE_SMALL_DEVISE
32
+ ? 'k-adaptive-actionsheet k-actionsheet-fullscreen'
33
+ : 'k-adaptive-actionsheet k-actionsheet-bottom'
34
+ };
35
+ return (React.createElement(kendo_react_layout_1.ActionSheet, __assign({}, defaultProps),
36
+ React.createElement(kendo_react_layout_1.ActionSheetHeader, { className: 'k-text-center' },
37
+ React.createElement("div", { className: "k-actionsheet-titlebar-group k-hbox" },
38
+ React.createElement("div", { className: "k-actionsheet-title" },
39
+ React.createElement("div", null, adaptiveTitle)),
40
+ React.createElement("div", { className: "k-actionsheet-actions" },
41
+ React.createElement(kendo_react_buttons_1.Button, { tabIndex: 0, "aria-label": "Cancel", "aria-disabled": "false", type: "button", fillMode: "flat", icon: 'x', svgIcon: kendo_svg_icons_1.xIcon, onClick: onClose }))),
42
+ mobileFilter &&
43
+ React.createElement("div", { className: "k-actionsheet-titlebar-group k-actionsheet-filter" }, mobileFilter)),
44
+ children,
45
+ footer && React.createElement(kendo_react_layout_1.ActionSheetFooter, { className: 'k-actions k-actions-stretched' },
46
+ React.createElement(kendo_react_buttons_1.Button, { size: "large", tabIndex: 0, "aria-label": footer.cancelText, "aria-disabled": "false", type: "button", onClick: function (event) { return footer.onCancel(event); } }, footer.cancelText),
47
+ React.createElement(kendo_react_buttons_1.Button, { tabIndex: 0, themeColor: "primary", size: "large", "aria-label": footer.applyText, "aria-disabled": "false", type: "button", onClick: function (event) { return footer.onApply(event); } }, footer.applyText))));
48
+ };
49
+ exports.AdaptiveMode = AdaptiveMode;
@@ -60,6 +60,11 @@ export interface FocusEvent<T> extends DropdownEvent<T> {
60
60
  */
61
61
  export interface BlurEvent<T> extends DropdownEvent<T> {
62
62
  }
63
+ /**
64
+ * @hidden
65
+ */
66
+ export interface CancelEvent<T> extends DropdownEvent<T> {
67
+ }
63
68
  /**
64
69
  * @hidden
65
70
  */
@@ -18,6 +18,14 @@ export declare const comboArrowBtnAriaLabelCollapse = "dropdowns.comboArrowBtnAr
18
18
  * @hidden
19
19
  */
20
20
  export declare const dropDownListArrowBtnAriaLabel = "dropdowns.dropDownListArrowBtnAriaLabel";
21
+ /**
22
+ * @hidden
23
+ */
24
+ export declare const adaptiveModeFooterApply = "dropdowns.apply";
25
+ /**
26
+ * @hidden
27
+ */
28
+ export declare const adaptiveModeFooterCancel = "dropdowns.cancel";
21
29
  /**
22
30
  * @hidden
23
31
  */
@@ -27,4 +35,6 @@ export declare const messages: {
27
35
  "dropdowns.comboArrowBtnAriaLabelExpand": string;
28
36
  "dropdowns.comboArrowBtnAriaLabelCollapse": string;
29
37
  "dropdowns.dropDownListArrowBtnAriaLabel": string;
38
+ "dropdowns.apply": string;
39
+ "dropdowns.cancel": string;
30
40
  };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.messages = exports.dropDownListArrowBtnAriaLabel = exports.comboArrowBtnAriaLabelCollapse = exports.comboArrowBtnAriaLabelExpand = exports.clear = exports.nodata = void 0;
4
+ exports.messages = exports.adaptiveModeFooterCancel = exports.adaptiveModeFooterApply = exports.dropDownListArrowBtnAriaLabel = exports.comboArrowBtnAriaLabelCollapse = exports.comboArrowBtnAriaLabelExpand = exports.clear = exports.nodata = void 0;
5
5
  /**
6
6
  * @hidden
7
7
  */
@@ -22,6 +22,14 @@ exports.comboArrowBtnAriaLabelCollapse = 'dropdowns.comboArrowBtnAriaLabelCollap
22
22
  * @hidden
23
23
  */
24
24
  exports.dropDownListArrowBtnAriaLabel = 'dropdowns.dropDownListArrowBtnAriaLabel';
25
+ /**
26
+ * @hidden
27
+ */
28
+ exports.adaptiveModeFooterApply = 'dropdowns.apply';
29
+ /**
30
+ * @hidden
31
+ */
32
+ exports.adaptiveModeFooterCancel = 'dropdowns.cancel';
25
33
  /**
26
34
  * @hidden
27
35
  */
@@ -31,4 +39,6 @@ exports.messages = (_a = {},
31
39
  _a[exports.comboArrowBtnAriaLabelExpand] = 'expand combobox',
32
40
  _a[exports.comboArrowBtnAriaLabelCollapse] = 'collapse combobox',
33
41
  _a[exports.dropDownListArrowBtnAriaLabel] = 'select',
42
+ _a[exports.adaptiveModeFooterApply] = 'Apply',
43
+ _a[exports.adaptiveModeFooterCancel] = 'Cancel',
34
44
  _a);
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-react-dropdowns',
9
9
  productName: 'KendoReact',
10
10
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
11
- publishDate: 1680692409,
11
+ publishDate: 1681383607,
12
12
  version: '',
13
13
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
14
14
  };