@oliasoft-open-source/react-ui-library 3.2.1 → 3.2.2

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -14928,6 +14928,7 @@ const Drawer = ({
14928
14928
  children,
14929
14929
  fixed: fixed2,
14930
14930
  open: openProp,
14931
+ setOpen: setOpenProp,
14931
14932
  right: right2,
14932
14933
  shadow: shadow2,
14933
14934
  top: top2,
@@ -14945,7 +14946,7 @@ const Drawer = ({
14945
14946
  }) => {
14946
14947
  const isStandardButton = button2 === true;
14947
14948
  const isCustomButton = !isStandardButton && isValidElement(button2);
14948
- const [open, setOpen] = isStandardButton || tabs2 ? useState(openProp) : [openProp, null];
14949
+ const [open, setOpen] = setOpenProp ? [openProp, setOpenProp] : isStandardButton || tabs2 ? useState(openProp) : [openProp, null];
14949
14950
  const [activeTab, setActiveTab] = useState(open ? defaultTabIndex : null);
14950
14951
  const openWidth = Array.isArray(width) ? width[activeTab] : width;
14951
14952
  const TABS_WIDTH = 37;
@@ -14982,7 +14983,6 @@ const Drawer = ({
14982
14983
  children: tabs2 ? /* @__PURE__ */ jsx(DrawerTabs, {
14983
14984
  width: openWidth,
14984
14985
  testId,
14985
- open,
14986
14986
  tabs: tabs2,
14987
14987
  activeTab,
14988
14988
  background,
@@ -15008,6 +15008,7 @@ Drawer.defaultProps = {
15008
15008
  background: "transparent",
15009
15009
  fixed: false,
15010
15010
  open: false,
15011
+ setOpen: void 0,
15011
15012
  right: false,
15012
15013
  width: 400,
15013
15014
  closedWidth: 0,
@@ -15028,6 +15029,7 @@ Drawer.propTypes = {
15028
15029
  background: propTypes$1.exports.string,
15029
15030
  fixed: propTypes$1.exports.bool,
15030
15031
  open: propTypes$1.exports.bool,
15032
+ setOpen: propTypes$1.exports.func,
15031
15033
  right: propTypes$1.exports.bool,
15032
15034
  width: propTypes$1.exports.oneOfType([propTypes$1.exports.string, propTypes$1.exports.number, propTypes$1.exports.arrayOf(propTypes$1.exports.oneOfType([propTypes$1.exports.string, propTypes$1.exports.number]))]),
15033
15035
  closedWidth: propTypes$1.exports.oneOfType([propTypes$1.exports.string, propTypes$1.exports.number]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "3.2.1",
3
+ "version": "3.2.2",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "module": "./dist/index.js",
6
6
  "main": "./dist/index.js",