@oliasoft-open-source/react-ui-library 2.4.9 → 2.4.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "2.4.9",
3
+ "version": "2.4.11",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -52,12 +52,12 @@
52
52
  "@babel/preset-env": "^7.15.6",
53
53
  "@babel/preset-react": "^7.14.5",
54
54
  "@babel/runtime": "^7.15.4",
55
- "@storybook/addon-actions": "^6.5.10",
56
- "@storybook/addon-essentials": "^6.5.10",
57
- "@storybook/addons": "^6.5.10",
58
- "@storybook/builder-webpack5": "^6.5.10",
59
- "@storybook/manager-webpack5": "^6.5.10",
60
- "@storybook/react": "^6.5.10",
55
+ "@storybook/addon-actions": "^6.5.13",
56
+ "@storybook/addon-essentials": "^6.5.13",
57
+ "@storybook/addons": "^6.5.13",
58
+ "@storybook/builder-webpack5": "^6.5.13",
59
+ "@storybook/manager-webpack5": "^6.5.13",
60
+ "@storybook/react": "^6.5.13",
61
61
  "@types/lodash": "^4.14.172",
62
62
  "@types/mocha": "^9.0.0",
63
63
  "@types/react": "^17.0.21",
@@ -93,7 +93,7 @@
93
93
  "prettier": "2.4.0",
94
94
  "react": "^17.0",
95
95
  "react-dom": "^17.0",
96
- "storybook-dark-mode": "^1.1.0",
96
+ "storybook-dark-mode": "^1.1.2",
97
97
  "terser-webpack-plugin": "^5.2.4",
98
98
  "webpack": "^5.52.1",
99
99
  "webpack-cli": "^4.8.0",
@@ -107,7 +107,7 @@
107
107
  "dependencies": {
108
108
  "@babel/polyfill": "^7.8.7",
109
109
  "@infinium/react-keyboard-event-handler": "^1.5.8",
110
- "@mdx-js/loader": "^1.6.22",
110
+ "@mdx-js/loader": "^2.1.5",
111
111
  "@mdx-js/react": "^1.6.22",
112
112
  "@minoru/react-dnd-treeview": "^1.6.1",
113
113
  "classnames": "^2.3.1",
@@ -115,6 +115,7 @@
115
115
  "expose-loader": "^3.0.0",
116
116
  "immer": "^9.0.6",
117
117
  "less-vars-to-js": "^1.3.0",
118
+ "loader-utils": "^3.2.1",
118
119
  "lodash": "^4.17.21",
119
120
  "memoize-one": "^5.2.1",
120
121
  "normalize.css": "^8.0.1",
@@ -25,6 +25,7 @@ export const Drawer = ({
25
25
  defaultTabIndex,
26
26
  testId,
27
27
  onResize,
28
+ getActiveTab,
28
29
  }) => {
29
30
  const isStandardButton = button === true;
30
31
  const isCustomButton = !isStandardButton && isValidElement(button);
@@ -43,6 +44,9 @@ export const Drawer = ({
43
44
  setActiveTab(index);
44
45
  setOpen(true);
45
46
  }
47
+ if (getActiveTab) {
48
+ getActiveTab(tabs[index]);
49
+ }
46
50
  };
47
51
 
48
52
  return (
@@ -125,6 +129,7 @@ Drawer.defaultProps = {
125
129
  defaultTabIndex: 0,
126
130
  testId: undefined,
127
131
  onResize: null,
132
+ getActiveTab: null,
128
133
  };
129
134
 
130
135
  Drawer.propTypes = {
@@ -158,4 +163,5 @@ Drawer.propTypes = {
158
163
  testId: PropTypes.string,
159
164
  defaultTabIndex: PropTypes.number,
160
165
  onResize: PropTypes.func,
166
+ getActiveTab: PropTypes.func,
161
167
  };