kui-complex 0.0.122 → 0.0.123
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/ButtonsPanel/cjs/index.js +8 -3
- package/ButtonsPanel/cjs/index.js.map +1 -1
- package/ButtonsPanel/index.d.ts +1 -0
- package/ButtonsPanel/index.js +8 -3
- package/ButtonsPanel/index.js.map +1 -1
- package/cjs/index.js +8 -3
- package/cjs/index.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +8 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -160,12 +160,17 @@ var inactiveStyles = css(templateObject_2$p || (templateObject_2$p = __makeTempl
|
|
|
160
160
|
var templateObject_1$F, templateObject_2$p;
|
|
161
161
|
|
|
162
162
|
var ButtonsPanel = forwardRef(function (_a, ref) {
|
|
163
|
-
var tabs = _a.tabs, tabPanels = _a.tabPanels, paths = _a.paths, activeTab = _a.activeTab, isSticky = _a.isSticky, onChange = _a.onChange, startComponent = _a.startComponent, endComponent = _a.endComponent, otherProps = __rest(_a, ["tabs", "tabPanels", "paths", "activeTab", "isSticky", "onChange", "startComponent", "endComponent"]);
|
|
163
|
+
var tabs = _a.tabs, tabPanels = _a.tabPanels, paths = _a.paths, activeTab = _a.activeTab, isSticky = _a.isSticky, onChange = _a.onChange, startComponent = _a.startComponent, endComponent = _a.endComponent, navigate = _a.navigate, otherProps = __rest(_a, ["tabs", "tabPanels", "paths", "activeTab", "isSticky", "onChange", "startComponent", "endComponent", "navigate"]);
|
|
164
164
|
var _b = React.useState(Number(activeTab)), value = _b[0], setValue = _b[1];
|
|
165
165
|
var handleChange = function (newValue) {
|
|
166
166
|
setValue(newValue);
|
|
167
|
-
if (paths
|
|
168
|
-
|
|
167
|
+
if (paths === null || paths === void 0 ? void 0 : paths.length) {
|
|
168
|
+
var path = paths[newValue];
|
|
169
|
+
if (navigate)
|
|
170
|
+
navigate(path);
|
|
171
|
+
else
|
|
172
|
+
updateQueryParams(path);
|
|
173
|
+
}
|
|
169
174
|
if (onChange)
|
|
170
175
|
onChange(newValue);
|
|
171
176
|
};
|