@nulogy/components 8.1.0 → 8.1.3
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/dist/main.js +35 -32
- package/dist/main.module.js +35 -32
- package/dist/src/Select/Select.d.ts +34 -33
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -26090,38 +26090,39 @@
|
|
|
26090
26090
|
children = _this$props.children,
|
|
26091
26091
|
onTabClick = _this$props.onTabClick;
|
|
26092
26092
|
var selectedIndex = this.getSelectedIndex();
|
|
26093
|
-
|
|
26094
|
-
|
|
26095
|
-
|
|
26096
|
-
|
|
26097
|
-
|
|
26098
|
-
|
|
26099
|
-
|
|
26100
|
-
|
|
26101
|
-
|
|
26102
|
-
|
|
26103
|
-
|
|
26093
|
+
var tabs = React__default['default'].Children.toArray(children);
|
|
26094
|
+
return tabs.filter(function (tab) {
|
|
26095
|
+
return Boolean(tab);
|
|
26096
|
+
}).map(function (tab, index) {
|
|
26097
|
+
return /*#__PURE__*/React__default['default'].cloneElement(tab, {
|
|
26098
|
+
onClick: function onClick(e) {
|
|
26099
|
+
var _a, _b;
|
|
26100
|
+
|
|
26101
|
+
setFocusToTab(index);
|
|
26102
|
+
|
|
26103
|
+
if ((_a = tab === null || tab === void 0 ? void 0 : tab.props) === null || _a === void 0 ? void 0 : _a.onClick) {
|
|
26104
|
+
(_b = tab === null || tab === void 0 ? void 0 : tab.props) === null || _b === void 0 ? void 0 : _b.onClick(e);
|
|
26105
|
+
}
|
|
26104
26106
|
|
|
26105
|
-
|
|
26106
|
-
|
|
26107
|
-
|
|
26108
|
-
|
|
26109
|
-
}
|
|
26110
|
-
},
|
|
26111
|
-
onFocus: function onFocus(e) {
|
|
26112
|
-
e.stopPropagation();
|
|
26113
|
-
},
|
|
26114
|
-
onKeyDown: handleArrowNavigation,
|
|
26115
|
-
index: index,
|
|
26116
|
-
tabIndex: index === focusedIndex ? 0 : -1,
|
|
26117
|
-
selected: index === selectedIndex,
|
|
26118
|
-
"aria-selected": index === selectedIndex,
|
|
26119
|
-
fullWidth: fitted,
|
|
26120
|
-
ref: function ref(_ref) {
|
|
26121
|
-
_this2.tabRefs[index] = _ref;
|
|
26107
|
+
if (onTabClick) {
|
|
26108
|
+
onTabClick(e, index);
|
|
26109
|
+
} else {
|
|
26110
|
+
_this2.handleTabClick(index);
|
|
26122
26111
|
}
|
|
26123
|
-
}
|
|
26124
|
-
|
|
26112
|
+
},
|
|
26113
|
+
onFocus: function onFocus(e) {
|
|
26114
|
+
e.stopPropagation();
|
|
26115
|
+
},
|
|
26116
|
+
onKeyDown: handleArrowNavigation,
|
|
26117
|
+
index: index,
|
|
26118
|
+
tabIndex: index === focusedIndex ? 0 : -1,
|
|
26119
|
+
selected: index === selectedIndex,
|
|
26120
|
+
"aria-selected": index === selectedIndex,
|
|
26121
|
+
fullWidth: fitted,
|
|
26122
|
+
ref: function ref(_ref) {
|
|
26123
|
+
_this2.tabRefs[index] = _ref;
|
|
26124
|
+
}
|
|
26125
|
+
});
|
|
26125
26126
|
});
|
|
26126
26127
|
};
|
|
26127
26128
|
|
|
@@ -26130,7 +26131,10 @@
|
|
|
26130
26131
|
children = _this$props2.children,
|
|
26131
26132
|
renderTabContentOnlyWhenSelected = _this$props2.renderTabContentOnlyWhenSelected;
|
|
26132
26133
|
var selectedIndex = this.getSelectedIndex();
|
|
26133
|
-
var
|
|
26134
|
+
var tabs = React__default['default'].Children.toArray(children);
|
|
26135
|
+
var tabContent = tabs.filter(function (tab) {
|
|
26136
|
+
return Boolean(tab);
|
|
26137
|
+
}).map(function (tab, index) {
|
|
26134
26138
|
var _a;
|
|
26135
26139
|
|
|
26136
26140
|
var selected = index === selectedIndex;
|
|
@@ -42764,7 +42768,6 @@
|
|
|
42764
42768
|
return /*#__PURE__*/React__default['default'].createElement(NoWrapLi, {
|
|
42765
42769
|
key: (_a = subMenuItem.key) !== null && _a !== void 0 ? _a : subMenuItem.name
|
|
42766
42770
|
}, /*#__PURE__*/React__default['default'].createElement(DropdownLink, {
|
|
42767
|
-
py: "half",
|
|
42768
42771
|
onClick: onItemClick,
|
|
42769
42772
|
href: subMenuItem.href,
|
|
42770
42773
|
to: subMenuItem.to,
|
package/dist/main.module.js
CHANGED
|
@@ -26064,38 +26064,39 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
|
26064
26064
|
children = _this$props.children,
|
|
26065
26065
|
onTabClick = _this$props.onTabClick;
|
|
26066
26066
|
var selectedIndex = this.getSelectedIndex();
|
|
26067
|
-
|
|
26068
|
-
|
|
26069
|
-
|
|
26070
|
-
|
|
26071
|
-
|
|
26072
|
-
|
|
26073
|
-
|
|
26074
|
-
|
|
26075
|
-
|
|
26076
|
-
|
|
26077
|
-
|
|
26067
|
+
var tabs = React__default.Children.toArray(children);
|
|
26068
|
+
return tabs.filter(function (tab) {
|
|
26069
|
+
return Boolean(tab);
|
|
26070
|
+
}).map(function (tab, index) {
|
|
26071
|
+
return /*#__PURE__*/React__default.cloneElement(tab, {
|
|
26072
|
+
onClick: function onClick(e) {
|
|
26073
|
+
var _a, _b;
|
|
26074
|
+
|
|
26075
|
+
setFocusToTab(index);
|
|
26076
|
+
|
|
26077
|
+
if ((_a = tab === null || tab === void 0 ? void 0 : tab.props) === null || _a === void 0 ? void 0 : _a.onClick) {
|
|
26078
|
+
(_b = tab === null || tab === void 0 ? void 0 : tab.props) === null || _b === void 0 ? void 0 : _b.onClick(e);
|
|
26079
|
+
}
|
|
26078
26080
|
|
|
26079
|
-
|
|
26080
|
-
|
|
26081
|
-
|
|
26082
|
-
|
|
26083
|
-
}
|
|
26084
|
-
},
|
|
26085
|
-
onFocus: function onFocus(e) {
|
|
26086
|
-
e.stopPropagation();
|
|
26087
|
-
},
|
|
26088
|
-
onKeyDown: handleArrowNavigation,
|
|
26089
|
-
index: index,
|
|
26090
|
-
tabIndex: index === focusedIndex ? 0 : -1,
|
|
26091
|
-
selected: index === selectedIndex,
|
|
26092
|
-
"aria-selected": index === selectedIndex,
|
|
26093
|
-
fullWidth: fitted,
|
|
26094
|
-
ref: function ref(_ref) {
|
|
26095
|
-
_this2.tabRefs[index] = _ref;
|
|
26081
|
+
if (onTabClick) {
|
|
26082
|
+
onTabClick(e, index);
|
|
26083
|
+
} else {
|
|
26084
|
+
_this2.handleTabClick(index);
|
|
26096
26085
|
}
|
|
26097
|
-
}
|
|
26098
|
-
|
|
26086
|
+
},
|
|
26087
|
+
onFocus: function onFocus(e) {
|
|
26088
|
+
e.stopPropagation();
|
|
26089
|
+
},
|
|
26090
|
+
onKeyDown: handleArrowNavigation,
|
|
26091
|
+
index: index,
|
|
26092
|
+
tabIndex: index === focusedIndex ? 0 : -1,
|
|
26093
|
+
selected: index === selectedIndex,
|
|
26094
|
+
"aria-selected": index === selectedIndex,
|
|
26095
|
+
fullWidth: fitted,
|
|
26096
|
+
ref: function ref(_ref) {
|
|
26097
|
+
_this2.tabRefs[index] = _ref;
|
|
26098
|
+
}
|
|
26099
|
+
});
|
|
26099
26100
|
});
|
|
26100
26101
|
};
|
|
26101
26102
|
|
|
@@ -26104,7 +26105,10 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
|
26104
26105
|
children = _this$props2.children,
|
|
26105
26106
|
renderTabContentOnlyWhenSelected = _this$props2.renderTabContentOnlyWhenSelected;
|
|
26106
26107
|
var selectedIndex = this.getSelectedIndex();
|
|
26107
|
-
var
|
|
26108
|
+
var tabs = React__default.Children.toArray(children);
|
|
26109
|
+
var tabContent = tabs.filter(function (tab) {
|
|
26110
|
+
return Boolean(tab);
|
|
26111
|
+
}).map(function (tab, index) {
|
|
26108
26112
|
var _a;
|
|
26109
26113
|
|
|
26110
26114
|
var selected = index === selectedIndex;
|
|
@@ -42738,7 +42742,6 @@ var renderSubMenuLink = function renderSubMenuLink(subMenuItem, onItemClick) {
|
|
|
42738
42742
|
return /*#__PURE__*/React__default.createElement(NoWrapLi, {
|
|
42739
42743
|
key: (_a = subMenuItem.key) !== null && _a !== void 0 ? _a : subMenuItem.name
|
|
42740
42744
|
}, /*#__PURE__*/React__default.createElement(DropdownLink, {
|
|
42741
|
-
py: "half",
|
|
42742
42745
|
onClick: onItemClick,
|
|
42743
42746
|
href: subMenuItem.href,
|
|
42744
42747
|
to: subMenuItem.to,
|
|
@@ -1,36 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export declare const SelectDefaultProps: {
|
|
3
|
-
autocomplete: boolean;
|
|
4
|
-
disabled: any;
|
|
5
|
-
defaultValue: any;
|
|
6
|
-
error: any;
|
|
7
|
-
errorMessage: any;
|
|
8
|
-
errorList: any;
|
|
9
|
-
labelText: any;
|
|
10
|
-
helpText: any;
|
|
11
|
-
noOptionsMessage: any;
|
|
12
|
-
requirementText: any;
|
|
13
|
-
id: any;
|
|
14
|
-
initialIsOpen: any;
|
|
15
|
-
maxHeight: string;
|
|
16
|
-
menuPosition: string;
|
|
17
|
-
multiselect: boolean;
|
|
18
|
-
name: any;
|
|
19
|
-
onBlur: any;
|
|
20
|
-
onChange: any;
|
|
21
|
-
placeholder: any;
|
|
22
|
-
required: boolean;
|
|
23
|
-
value: any;
|
|
24
|
-
className: any;
|
|
25
|
-
classNamePrefix: string;
|
|
26
|
-
menuIsOpen: any;
|
|
27
|
-
onMenuOpen: any;
|
|
28
|
-
onMenuClose: any;
|
|
29
|
-
onInputChange: any;
|
|
30
|
-
components: any;
|
|
31
|
-
closeMenuOnSelect: boolean;
|
|
32
|
-
};
|
|
33
|
-
export declare const getOption: (options: any, value: any) => any;
|
|
34
2
|
export declare type SelectProps = {
|
|
35
3
|
options?: any[];
|
|
36
4
|
windowThreshold?: number;
|
|
@@ -65,6 +33,39 @@ export declare type SelectProps = {
|
|
|
65
33
|
components?: any;
|
|
66
34
|
closeMenuOnSelect?: boolean;
|
|
67
35
|
"aria-label"?: string;
|
|
36
|
+
[key: string]: any;
|
|
68
37
|
};
|
|
69
|
-
declare const
|
|
38
|
+
export declare const SelectDefaultProps: {
|
|
39
|
+
autocomplete: boolean;
|
|
40
|
+
disabled: any;
|
|
41
|
+
defaultValue: any;
|
|
42
|
+
error: any;
|
|
43
|
+
errorMessage: any;
|
|
44
|
+
errorList: any;
|
|
45
|
+
labelText: any;
|
|
46
|
+
helpText: any;
|
|
47
|
+
noOptionsMessage: any;
|
|
48
|
+
requirementText: any;
|
|
49
|
+
id: any;
|
|
50
|
+
initialIsOpen: any;
|
|
51
|
+
maxHeight: string;
|
|
52
|
+
menuPosition: string;
|
|
53
|
+
multiselect: boolean;
|
|
54
|
+
name: any;
|
|
55
|
+
onBlur: any;
|
|
56
|
+
onChange: any;
|
|
57
|
+
placeholder: any;
|
|
58
|
+
required: boolean;
|
|
59
|
+
value: any;
|
|
60
|
+
className: any;
|
|
61
|
+
classNamePrefix: string;
|
|
62
|
+
menuIsOpen: any;
|
|
63
|
+
onMenuOpen: any;
|
|
64
|
+
onMenuClose: any;
|
|
65
|
+
onInputChange: any;
|
|
66
|
+
components: any;
|
|
67
|
+
closeMenuOnSelect: boolean;
|
|
68
|
+
};
|
|
69
|
+
export declare const getOption: (options: any, value: any) => any;
|
|
70
|
+
declare const ReactSelect: React.ForwardRefExoticComponent<Pick<SelectProps, React.ReactText> & React.RefAttributes<unknown>>;
|
|
70
71
|
export default ReactSelect;
|