@progress/kendo-react-dropdowns 5.6.0-dev.202208291054 → 5.6.0-next.202208310638

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.
@@ -39,6 +39,7 @@ var DropDownBase_1 = require("../common/DropDownBase");
39
39
  var utils_1 = require("../common/utils");
40
40
  var kendo_react_common_2 = require("@progress/kendo-react-common");
41
41
  var package_metadata_1 = require("../package-metadata");
42
+ var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
42
43
  var VALIDATION_MESSAGE = 'Please select a value from the list!';
43
44
  var sizeMap = kendo_react_common_1.kendoThemeMaps.sizeMap, roundedMap = kendo_react_common_1.kendoThemeMaps.roundedMap;
44
45
  /**
@@ -487,8 +488,8 @@ var DropDownListWithoutContext = /** @class */ (function (_super) {
487
488
  * @hidden
488
489
  */
489
490
  DropDownListWithoutContext.prototype.render = function () {
490
- var _a, _b;
491
- var _c = this.props, style = _c.style, className = _c.className, label = _c.label, dir = _c.dir, virtual = _c.virtual, size = _c.size, rounded = _c.rounded, fillMode = _c.fillMode;
491
+ var _a;
492
+ var _b = this.props, style = _b.style, className = _b.className, label = _b.label, dir = _b.dir, virtual = _b.virtual, size = _b.size, rounded = _b.rounded, fillMode = _b.fillMode;
492
493
  var opened = this.props.opened !== undefined ? this.props.opened : this.state.opened;
493
494
  var value = this.value;
494
495
  var text = (0, utils_1.getItemValue)(value, this.props.textField);
@@ -501,7 +502,7 @@ var DropDownListWithoutContext = /** @class */ (function (_super) {
501
502
  base.vs.total = virtual.total;
502
503
  base.vs.pageSize = virtual.pageSize;
503
504
  }
504
- var _d = this.props, dataItemKey = _d.dataItemKey, _e = _d.data, data = _e === void 0 ? [] : _e, disabled = _d.disabled, tabIndex = _d.tabIndex, loading = _d.loading, iconClassName = _d.iconClassName, valueRender = _d.valueRender;
505
+ var _c = this.props, dataItemKey = _c.dataItemKey, _d = _c.data, data = _d === void 0 ? [] : _d, disabled = _c.disabled, tabIndex = _c.tabIndex, loading = _c.loading, iconClassName = _c.iconClassName, valueRender = _c.valueRender;
505
506
  var focused = this.state.focused;
506
507
  var selectedIndex = data.findIndex(function (i) { return (0, utils_1.areSame)(i, value, dataItemKey); });
507
508
  var valueDefaultRendering = (React.createElement("span", { className: "k-input-inner" },
@@ -522,12 +523,7 @@ var DropDownListWithoutContext = /** @class */ (function (_super) {
522
523
  : __assign(__assign({}, style), { width: undefined }), dir: dir, onMouseDown: opened ? utils_1.preventDefaultNonInputs : undefined, onFocus: this.handleFocus, onBlur: this.handleBlur, tabIndex: (0, kendo_react_common_1.getTabIndex)(tabIndex, disabled), accessKey: this.props.accessKey, onKeyDown: this.handleKeyDown, onKeyPress: this.handleKeyPress, onClick: disabled ? undefined : this.handleWrapperClick, role: 'combobox', "aria-required": this.required, "aria-disabled": disabled || undefined, "aria-haspopup": 'listbox', "aria-expanded": opened || false, "aria-owns": this.base.listBoxId, "aria-activedescendant": opened ? ('option-' + this.base.guid + '-' + (selectedIndex + (virtual ? virtual.skip : 0))) : undefined, "aria-label": this.props.ariaLabel || this.props.label, "aria-labelledby": this.props.ariaLabelledBy, "aria-describedby": this.props.ariaDescribedBy, id: this.props.id, title: this.props.title },
523
524
  valueElement,
524
525
  loading && React.createElement("span", { className: "k-icon k-i-loading k-input-loading-icon", key: "loading" }),
525
- React.createElement("button", { tabIndex: -1, type: "button", "aria-hidden": true, className: (0, kendo_react_common_1.classNames)('k-input-button k-button k-icon-button', (_b = {},
526
- _b["k-button-".concat(sizeMap[size] || size)] = size,
527
- _b["k-button-".concat(fillMode)] = fillMode,
528
- _b["k-button-".concat(fillMode, "-base")] = fillMode,
529
- _b)) },
530
- React.createElement("span", { className: (0, kendo_react_common_1.classNames)('k-button-icon k-icon k-i-arrow-s', iconClassName) })),
526
+ React.createElement(kendo_react_buttons_1.Button, { tabIndex: -1, type: "button", "aria-hidden": true, size: size, fillMode: fillMode, iconClass: iconClassName, className: "k-input-button", themeColor: 'base', icon: "caret-alt-down" }),
531
527
  this.dummySelect(value),
532
528
  this.renderListContainer()));
533
529
  return label ? (React.createElement(kendo_react_labels_1.FloatingLabel, { label: label, editorValue: text, editorValid: isValid, editorDisabled: this.props.disabled, style: { width: style ? style.width : undefined }, children: dropdownlist })) : dropdownlist;
@@ -35,6 +35,7 @@ var ListNoData_1 = require("./ListNoData");
35
35
  var messages_1 = require("./../messages");
36
36
  var kendo_react_labels_1 = require("@progress/kendo-react-labels");
37
37
  var ListFilter_1 = require("../common/ListFilter");
38
+ var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
38
39
  var sizeMap = kendo_react_common_1.kendoThemeMaps.sizeMap, roundedMap = kendo_react_common_1.kendoThemeMaps.roundedMap;
39
40
  var VALIDATION_MESSAGE = 'Please select a value from the list!';
40
41
  var ValueHolder = function (props) {
@@ -79,12 +80,12 @@ exports.DropDownTreePropsContext = (0, kendo_react_common_1.createPropsContext)(
79
80
  * Obtaining the `ref` returns an object of type [DropDownTreeHandle]({% slug api_dropdowns_dropdowntreehandle %}).
80
81
  */
81
82
  exports.DropDownTree = React.forwardRef(function (directProps, ref) {
82
- var _a, _b;
83
+ var _a;
83
84
  (0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
84
85
  var props = (0, kendo_react_common_1.usePropsContext)(exports.DropDownTreePropsContext, directProps);
85
86
  var calculatedId = React.useMemo(function () { return (0, kendo_react_common_1.guid)(); }, []);
86
87
  var id = props.id || calculatedId;
87
- var _c = props.data, data = _c === void 0 ? [] : _c, dataItemKey = props.dataItemKey, _d = props.popupSettings, popupSettings = _d === void 0 ? {} : _d, _e = props.style, style = _e === void 0 ? {} : _e, opened = props.opened, disabled = props.disabled, _f = props.onOpen, onOpen = _f === void 0 ? kendo_react_common_1.noop : _f, _g = props.onClose, onClose = _g === void 0 ? kendo_react_common_1.noop : _g, placeholder = props.placeholder, label = props.label, name = props.name, _h = props.selectField, selectField = _h === void 0 ? defaultProps.selectField : _h, _j = props.subItemsField, subItemsField = _j === void 0 ? defaultProps.subItemsField : _j, validationMessage = props.validationMessage, valid = props.valid, required = props.required, validityStyles = props.validityStyles;
88
+ var _b = props.data, data = _b === void 0 ? [] : _b, dataItemKey = props.dataItemKey, _c = props.popupSettings, popupSettings = _c === void 0 ? {} : _c, _d = props.style, style = _d === void 0 ? {} : _d, opened = props.opened, disabled = props.disabled, _e = props.onOpen, onOpen = _e === void 0 ? kendo_react_common_1.noop : _e, _f = props.onClose, onClose = _f === void 0 ? kendo_react_common_1.noop : _f, placeholder = props.placeholder, label = props.label, name = props.name, _g = props.selectField, selectField = _g === void 0 ? defaultProps.selectField : _g, _h = props.subItemsField, subItemsField = _h === void 0 ? defaultProps.subItemsField : _h, validationMessage = props.validationMessage, valid = props.valid, required = props.required, validityStyles = props.validityStyles;
88
89
  var tabIndex = (0, kendo_react_common_1.getTabIndex)(props.tabIndex, disabled);
89
90
  var target = React.useRef(null);
90
91
  var elementRef = React.useRef(null);
@@ -92,7 +93,7 @@ exports.DropDownTree = React.forwardRef(function (directProps, ref) {
92
93
  var selectRef = React.useRef(null);
93
94
  var treeViewRef = React.useRef(null);
94
95
  var skipFocusRef = React.useRef(false);
95
- var _k = React.useState(undefined), stateValue = _k[0], setStateValue = _k[1];
96
+ var _j = React.useState(undefined), stateValue = _j[0], setStateValue = _j[1];
96
97
  var controlled = props.value !== undefined;
97
98
  var value = controlled ? props.value : (stateValue !== undefined ? stateValue : props.defaultValue);
98
99
  var hasValue = (0, utils_1.isPresent)(value);
@@ -110,10 +111,10 @@ exports.DropDownTree = React.forwardRef(function (directProps, ref) {
110
111
  popupSettings.width : (style.width !== undefined ? style.width : defaultProps.popupSettings.width);
111
112
  var popupWidth = (0, useDropdownWidth_1.useDropdownWidth)(elementRef, initialStyleWidth);
112
113
  var popupStyles = __assign({ width: popupWidth }, (dir !== undefined ? { direction: dir } : {}));
113
- var _l = React.useState(false), open = _l[0], setOpen = _l[1];
114
+ var _k = React.useState(false), open = _k[0], setOpen = _k[1];
114
115
  var isOpen = opened !== undefined ? opened : open;
115
- var _m = React.useState(false), focused = _m[0], setFocused = _m[1];
116
- var _o = React.useState(''), filter = _o[0], setFilter = _o[1];
116
+ var _l = React.useState(false), focused = _l[0], setFocused = _l[1];
117
+ var _m = React.useState(''), filter = _m[0], setFilter = _m[1];
117
118
  var setValidity = React.useCallback(function () {
118
119
  if (selectRef.current && selectRef.current.setCustomValidity) {
119
120
  selectRef.current.setCustomValidity(validity.valid
@@ -359,15 +360,10 @@ exports.DropDownTree = React.forwardRef(function (directProps, ref) {
359
360
  props.loading && React.createElement("span", { className: "k-icon k-i-loading k-input-loading-icon" }),
360
361
  hasValue && !disabled && (React.createElement("span", { onClick: onClear, className: "k-clear-value", title: localization.toLanguageString(messages_1.clear, messages_1.messages[messages_1.clear]), role: "button", tabIndex: -1, onMouseDown: function (e) { return e.preventDefault(); } },
361
362
  React.createElement("span", { className: "k-icon k-i-x" }))),
362
- React.createElement("button", { tabIndex: -1, type: "button", "aria-label": "select", className: (0, kendo_react_common_1.classNames)('k-input-button k-button k-icon-button', (_b = {},
363
- _b["k-button-".concat(sizeMap[size] || size)] = size,
364
- _b["k-button-".concat(fillMode)] = fillMode,
365
- _b["k-button-".concat(fillMode, "-base")] = fillMode,
366
- _b)) },
367
- React.createElement("span", { className: "k-button-icon k-icon k-i-arrow-s" })),
363
+ React.createElement(kendo_react_buttons_1.Button, { tabIndex: -1, type: "button", "aria-label": "select", className: "k-input-button", size: size, fillMode: fillMode, themeColor: "base", rounded: null, icon: "caret-alt-down" }),
368
364
  React.createElement("select", { name: name, ref: selectRef, tabIndex: -1, "aria-hidden": true, title: label, style: { opacity: 0, width: 1, border: 0, zIndex: -1, position: 'absolute', left: '50%' } },
369
365
  React.createElement("option", { value: props.valueMap ? props.valueMap.call(undefined, value) : value })),
370
- React.createElement(kendo_react_popup_1.Popup, { className: (0, kendo_react_common_1.classNames)(popupSettings.className, { 'k-rtl': dir === 'rtl' }), popupClass: popupSettings.popupClass, style: popupStyles, animate: popupSettings.animate, anchor: elementRef.current, show: isOpen, onOpen: onPopupOpened, onClose: onPopupClosed, appendTo: popupSettings.appendTo },
366
+ React.createElement(kendo_react_popup_1.Popup, { className: (0, kendo_react_common_1.classNames)(popupSettings.className, { 'k-rtl': dir === 'rtl' }), popupClass: (0, kendo_react_common_1.classNames)(popupSettings.popupClass, 'k-list-container'), style: popupStyles, animate: popupSettings.animate, anchor: elementRef.current, show: isOpen, onOpen: onPopupOpened, onClose: onPopupClosed, appendTo: popupSettings.appendTo },
371
367
  props.filterable && (React.createElement(ListFilter_1.default, { value: props.filter === undefined ? filter : props.filter, inputRef: inputRef, onChange: onFilterChange, onKeyDown: onInputKeyDown, size: size, rounded: rounded, fillMode: fillMode })),
372
368
  data.length > 0 ? (React.createElement(kendo_react_treeview_1.TreeView, { ref: treeViewRef, tabIndex: tabIndex, data: treeViewData, focusIdField: dataItemKey, textField: props.textField, selectField: selectField, expandField: props.expandField, childrenField: subItemsField, expandIcons: true, onItemClick: onChange, onExpandChange: onExpand, size: size, item: props.item })) : (React.createElement(NoData, null, localization.toLanguageString(messages_1.nodata, messages_1.messages[messages_1.nodata]))))));
373
369
  return label ? (React.createElement(kendo_react_labels_1.FloatingLabel, { label: label, editorValue: currentValueText, editorPlaceholder: placeholder, editorValid: isValid, editorDisabled: disabled, editorId: id, style: { width: style ? style.width : undefined }, children: dropdowntree, dir: dir })) : dropdowntree;
@@ -61,15 +61,15 @@ export declare class MultiSelectWithoutContext extends React.Component<MultiSele
61
61
  label: PropTypes.Requireable<string>;
62
62
  loading: PropTypes.Requireable<boolean>;
63
63
  popupSettings: PropTypes.Requireable<PropTypes.InferProps<{
64
- animate: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
64
+ animate: PropTypes.Requireable<boolean | PropTypes.InferProps<{
65
65
  openDuration: PropTypes.Requireable<number>;
66
66
  closeDuration: PropTypes.Requireable<number>;
67
- }> | null | undefined>>;
67
+ }>>;
68
68
  popupClass: PropTypes.Requireable<string>;
69
69
  className: PropTypes.Requireable<string>;
70
70
  appendTo: PropTypes.Requireable<any>;
71
- width: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
72
- height: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
71
+ width: PropTypes.Requireable<string | number>;
72
+ height: PropTypes.Requireable<string | number>;
73
73
  }>>;
74
74
  onOpen: PropTypes.Requireable<(...args: any[]) => any>;
75
75
  onClose: PropTypes.Requireable<(...args: any[]) => any>;
@@ -261,7 +261,7 @@ var MultiSelectWithoutContext = /** @class */ (function (_super) {
261
261
  dir: dir !== undefined ? dir : base.dirCalculated,
262
262
  width: popupWidth,
263
263
  popupSettings: {
264
- popupClass: (0, kendo_react_common_1.classNames)(popupSettings.popupClass),
264
+ popupClass: (0, kendo_react_common_1.classNames)(popupSettings.popupClass, 'k-list-container'),
265
265
  className: popupSettings.className,
266
266
  animate: popupSettings.animate,
267
267
  anchor: _this.element,
@@ -31,7 +31,7 @@ var TagList = /** @class */ (function (_super) {
31
31
  var _a = this.props, data = _a.data, guid = _a.guid, focused = _a.focused, tagRender = _a.tagRender, TagComponent = _a.tag, onTagDelete = _a.onTagDelete, size = _a.size;
32
32
  return (React.createElement(React.Fragment, null,
33
33
  data.map(function (tagData, index) {
34
- var tag = TagComponent ? (React.createElement(TagComponent, { key: tagData.text + index, tagData: tagData, guid: guid, focusedTag: focused, onTagDelete: onTagDelete })) : (React.createElement(kendo_react_buttons_1.Chip, { id: "tag-".concat(guid, "-").concat(tagData.text.replace(/\s+/g, '-')), "aria-selected": true, role: "option", "aria-setsize": data.length, key: tagData.text + index, text: tagData.text, removable: true, removeIcon: 'k-i-close', onRemove: function (e) { return onTagDelete.call(undefined, tagData.data, e.syntheticEvent); }, onMouseDown: preventDefault, onClick: stopPropagation, className: tagData === focused ? 'k-focus' : undefined, size: size }));
34
+ var tag = TagComponent ? (React.createElement(TagComponent, { key: tagData.text + index, tagData: tagData, guid: guid, focusedTag: focused, onTagDelete: onTagDelete })) : (React.createElement(kendo_react_buttons_1.Chip, { id: "tag-".concat(guid, "-").concat(tagData.text.replace(/\s+/g, '-')), "aria-selected": true, role: "option", "aria-setsize": data.length, key: tagData.text + index, text: tagData.text, removable: true, onRemove: function (e) { return onTagDelete.call(undefined, tagData.data, e.syntheticEvent); }, onMouseDown: preventDefault, onClick: stopPropagation, className: tagData === focused ? 'k-focus' : undefined, size: size }));
35
35
  return tagRender ? tagRender(tagData, tag) : tag;
36
36
  }),
37
37
  this.props.children));
@@ -412,7 +412,7 @@ exports.MultiSelectTree = React.forwardRef(function (directProps, ref) {
412
412
  hasValue && !disabled && React.createElement(ClearButton_1.default, { onClick: onClear }),
413
413
  React.createElement("select", { name: name, ref: selectRef, tabIndex: -1, "aria-hidden": true, title: label, style: { opacity: 0, width: 1, border: 0, zIndex: -1, position: 'absolute', left: '50%' } },
414
414
  React.createElement("option", { value: props.valueMap ? props.valueMap.call(undefined, value) : value })),
415
- React.createElement(kendo_react_popup_1.Popup, { popupClass: popupSettings.popupClass, className: (0, kendo_react_common_1.classNames)(popupSettings.className, { 'k-rtl': dir === 'rtl' }), style: popupStyles, animate: popupSettings.animate, anchor: elementRef.current, show: isOpen, onOpen: onPopupOpened, onClose: onPopupClosed, appendTo: popupSettings.appendTo, ref: popupRef },
415
+ React.createElement(kendo_react_popup_1.Popup, { popupClass: (0, kendo_react_common_1.classNames)(popupSettings.popupClass, 'k-list-container'), className: (0, kendo_react_common_1.classNames)(popupSettings.className, { 'k-rtl': dir === 'rtl' }), style: popupStyles, animate: popupSettings.animate, anchor: elementRef.current, show: isOpen, onOpen: onPopupOpened, onClose: onPopupClosed, appendTo: popupSettings.appendTo, ref: popupRef },
416
416
  props.filterable && (React.createElement(ListFilter_1.default, { value: props.filter === undefined ? filterState : props.filter, inputRef: inputRef, onChange: onFilterChange, onKeyDown: onInputKeyDown, tabIndex: tabIndex, size: size, rounded: rounded, fillMode: fillMode })),
417
417
  data.length > 0 ? (React.createElement(kendo_react_treeview_1.TreeView, { ref: treeViewRef, tabIndex: tabIndex, data: data, focusIdField: dataItemKey, textField: props.textField, checkField: checkField, checkIndeterminateField: checkIndeterminateField, expandField: props.expandField, childrenField: subItemsField, expandIcons: true, onItemClick: onChange, onCheckChange: onChange, onExpandChange: onExpand, checkboxes: true, size: size, item: props.item })) : (React.createElement(NoData, null, localization.toLanguageString(messages_1.nodata, messages_1.messages[messages_1.nodata]))))));
418
418
  return label ? (React.createElement(kendo_react_labels_1.FloatingLabel, { label: label, editorValue: hasValue, editorPlaceholder: placeholder, editorValid: isValid, editorDisabled: disabled, editorId: id, style: { width: style ? style.width : undefined }, children: multiselecttree, dir: dir })) : multiselecttree;
@@ -62,15 +62,15 @@ export default class DropDownBase {
62
62
  label: PropTypes.Requireable<string>;
63
63
  loading: PropTypes.Requireable<boolean>;
64
64
  popupSettings: PropTypes.Requireable<PropTypes.InferProps<{
65
- animate: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
65
+ animate: PropTypes.Requireable<boolean | PropTypes.InferProps<{
66
66
  openDuration: PropTypes.Requireable<number>;
67
67
  closeDuration: PropTypes.Requireable<number>;
68
- }> | null | undefined>>;
68
+ }>>;
69
69
  popupClass: PropTypes.Requireable<string>;
70
70
  className: PropTypes.Requireable<string>;
71
71
  appendTo: PropTypes.Requireable<any>;
72
- width: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
73
- height: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
72
+ width: PropTypes.Requireable<string | number>;
73
+ height: PropTypes.Requireable<string | number>;
74
74
  }>>;
75
75
  onOpen: PropTypes.Requireable<(...args: any[]) => any>;
76
76
  onClose: PropTypes.Requireable<(...args: any[]) => any>;
@@ -106,15 +106,15 @@ export default class DropDownBase {
106
106
  label: PropTypes.Requireable<string>;
107
107
  loading: PropTypes.Requireable<boolean>;
108
108
  popupSettings: PropTypes.Requireable<PropTypes.InferProps<{
109
- animate: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
109
+ animate: PropTypes.Requireable<boolean | PropTypes.InferProps<{
110
110
  openDuration: PropTypes.Requireable<number>;
111
111
  closeDuration: PropTypes.Requireable<number>;
112
- }> | null | undefined>>;
112
+ }>>;
113
113
  popupClass: PropTypes.Requireable<string>;
114
114
  className: PropTypes.Requireable<string>;
115
115
  appendTo: PropTypes.Requireable<any>;
116
- width: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
117
- height: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
116
+ width: PropTypes.Requireable<string | number>;
117
+ height: PropTypes.Requireable<string | number>;
118
118
  }>>;
119
119
  onOpen: PropTypes.Requireable<(...args: any[]) => any>;
120
120
  onClose: PropTypes.Requireable<(...args: any[]) => any>;
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-react-dropdowns',
9
9
  productName: 'KendoReact',
10
10
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
11
- publishDate: 1661769243,
11
+ publishDate: 1661926803,
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
  };