bianic-ui 1.16.0-alpha.1 → 1.16.0-alpha.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/cjs/index.js CHANGED
@@ -1825,7 +1825,8 @@ var usePopupPosition = function (anchorRef, popupRef, position) {
1825
1825
  };
1826
1826
 
1827
1827
  var MenuContainer = function (props) {
1828
- var _a = props.isTopFlat, isTopFlat = _a === void 0 ? false : _a, children = props.children, _b = props.open, open = _b === void 0 ? true : _b, _c = props.onClose, onClose = _c === void 0 ? function () { } : _c, _d = props.className, className = _d === void 0 ? '' : _d, _e = props.isWithOverlay, isWithOverlay = _e === void 0 ? true : _e, _f = props.zIndex, zIndex = _f === void 0 ? 100 : _f, _g = props.onClickItem, onClickItem = _g === void 0 ? function () { } : _g, anchorRef = props.anchorRef, restProps = __rest(props, ["isTopFlat", "children", "open", "onClose", "className", "isWithOverlay", "zIndex", "onClickItem", "anchorRef"]);
1828
+ var _a;
1829
+ var _b = props.isTopFlat, isTopFlat = _b === void 0 ? false : _b, children = props.children, _c = props.open, open = _c === void 0 ? true : _c, _d = props.onClose, onClose = _d === void 0 ? function () { } : _d, _e = props.className, className = _e === void 0 ? '' : _e, _f = props.isWithOverlay, isWithOverlay = _f === void 0 ? true : _f, _g = props.zIndex, zIndex = _g === void 0 ? 100 : _g, _h = props.onClickItem, onClickItem = _h === void 0 ? function () { } : _h, anchorRef = props.anchorRef, restProps = __rest(props, ["isTopFlat", "children", "open", "onClose", "className", "isWithOverlay", "zIndex", "onClickItem", "anchorRef"]);
1829
1830
  if (!open)
1830
1831
  return null;
1831
1832
  var radiusClass = "rounded-b-radius-sm ".concat(!isTopFlat && 'rounded-t-radius-sm');
@@ -1833,8 +1834,8 @@ var MenuContainer = function (props) {
1833
1834
  var positionStyle = usePopupPosition(anchorRef, MenuContainerRef)[0];
1834
1835
  return (React.createElement(React.Fragment, null,
1835
1836
  isWithOverlay && (React.createElement("div", { className: "bianic-menu-overlay fixed left-0 top-0 z-0 h-screen w-screen", onClick: function () { return onClose(); }, style: { zIndex: zIndex } })),
1836
- reactDom.createPortal(React.createElement("div", __assign({ ref: MenuContainerRef, className: "absolute w-fit bg-bia-white shadow-[0px_3px_20px_0px_rgba(0,0,0,0.20)] ".concat(radiusClass, " ").concat(className), style: __assign({ zIndex: zIndex + 10, minWidth: anchorRef.current
1837
- ? anchorRef.current.offsetWidth
1837
+ reactDom.createPortal(React.createElement("div", __assign({ ref: MenuContainerRef, className: "absolute w-fit bg-bia-white shadow-[0px_3px_20px_0px_rgba(0,0,0,0.20)] ".concat(radiusClass, " ").concat(className), style: __assign({ zIndex: zIndex + 10, minWidth: (anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current)
1838
+ ? (_a = anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth
1838
1839
  : undefined }, positionStyle) }, restProps), React.Children.map(children, function (child) {
1839
1840
  return React.isValidElement(child)
1840
1841
  ? // Kirimkan handleItemClick sebagai props onClick ke setiap MenuItem
package/dist/esm/index.js CHANGED
@@ -1823,7 +1823,8 @@ var usePopupPosition = function (anchorRef, popupRef, position) {
1823
1823
  };
1824
1824
 
1825
1825
  var MenuContainer = function (props) {
1826
- var _a = props.isTopFlat, isTopFlat = _a === void 0 ? false : _a, children = props.children, _b = props.open, open = _b === void 0 ? true : _b, _c = props.onClose, onClose = _c === void 0 ? function () { } : _c, _d = props.className, className = _d === void 0 ? '' : _d, _e = props.isWithOverlay, isWithOverlay = _e === void 0 ? true : _e, _f = props.zIndex, zIndex = _f === void 0 ? 100 : _f, _g = props.onClickItem, onClickItem = _g === void 0 ? function () { } : _g, anchorRef = props.anchorRef, restProps = __rest(props, ["isTopFlat", "children", "open", "onClose", "className", "isWithOverlay", "zIndex", "onClickItem", "anchorRef"]);
1826
+ var _a;
1827
+ var _b = props.isTopFlat, isTopFlat = _b === void 0 ? false : _b, children = props.children, _c = props.open, open = _c === void 0 ? true : _c, _d = props.onClose, onClose = _d === void 0 ? function () { } : _d, _e = props.className, className = _e === void 0 ? '' : _e, _f = props.isWithOverlay, isWithOverlay = _f === void 0 ? true : _f, _g = props.zIndex, zIndex = _g === void 0 ? 100 : _g, _h = props.onClickItem, onClickItem = _h === void 0 ? function () { } : _h, anchorRef = props.anchorRef, restProps = __rest(props, ["isTopFlat", "children", "open", "onClose", "className", "isWithOverlay", "zIndex", "onClickItem", "anchorRef"]);
1827
1828
  if (!open)
1828
1829
  return null;
1829
1830
  var radiusClass = "rounded-b-radius-sm ".concat(!isTopFlat && 'rounded-t-radius-sm');
@@ -1831,8 +1832,8 @@ var MenuContainer = function (props) {
1831
1832
  var positionStyle = usePopupPosition(anchorRef, MenuContainerRef)[0];
1832
1833
  return (React.createElement(React.Fragment, null,
1833
1834
  isWithOverlay && (React.createElement("div", { className: "bianic-menu-overlay fixed left-0 top-0 z-0 h-screen w-screen", onClick: function () { return onClose(); }, style: { zIndex: zIndex } })),
1834
- createPortal(React.createElement("div", __assign({ ref: MenuContainerRef, className: "absolute w-fit bg-bia-white shadow-[0px_3px_20px_0px_rgba(0,0,0,0.20)] ".concat(radiusClass, " ").concat(className), style: __assign({ zIndex: zIndex + 10, minWidth: anchorRef.current
1835
- ? anchorRef.current.offsetWidth
1835
+ createPortal(React.createElement("div", __assign({ ref: MenuContainerRef, className: "absolute w-fit bg-bia-white shadow-[0px_3px_20px_0px_rgba(0,0,0,0.20)] ".concat(radiusClass, " ").concat(className), style: __assign({ zIndex: zIndex + 10, minWidth: (anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current)
1836
+ ? (_a = anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth
1836
1837
  : undefined }, positionStyle) }, restProps), Children.map(children, function (child) {
1837
1838
  return React.isValidElement(child)
1838
1839
  ? // Kirimkan handleItemClick sebagai props onClick ke setiap MenuItem
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "@biaenergi:registry": "https://gitlab.com/api/v4/projects/50905269/packages/npm/"
5
5
  },
6
- "version": "1.16.0-alpha.1",
6
+ "version": "1.16.0-alpha.3",
7
7
  "description": "Design Language System develop by BIAENERGI",
8
8
  "scripts": {
9
9
  "rollup": "rollup -c",
@@ -59,8 +59,9 @@
59
59
  "postcss-url": "^10.1.3",
60
60
  "prettier": "^3.3.2",
61
61
  "prettier-plugin-tailwindcss": "^0.5.6",
62
- "react-icons": "^5.2.1",
63
62
  "react-dom": "^18.0.0 || ^19.0.0-beta",
63
+ "react-draggable": "^4.5.0",
64
+ "react-icons": "^5.2.1",
64
65
  "rollup": "^3.29.4",
65
66
  "rollup-plugin-copy": "^3.5.0",
66
67
  "rollup-plugin-dts": "^6.0.2",
@@ -75,8 +76,7 @@
75
76
  "typescript": "^5.2.2",
76
77
  "typescript-eslint": "^7.13.1",
77
78
  "url-loader": "^4.1.1",
78
- "webpack": "^5.88.2",
79
- "react-draggable": "^4.5.0"
79
+ "webpack": "^5.88.2"
80
80
  },
81
81
  "main": "dist/cjs/index.js",
82
82
  "module": "dist/esm/index.js",
@@ -92,6 +92,5 @@
92
92
  "react-dom": "^18.0.0 || ^19.0.0-beta",
93
93
  "react-icons": "^5.2.1"
94
94
  },
95
- "types": "dist/index.d.ts",
96
- "dependencies": {}
95
+ "types": "dist/index.d.ts"
97
96
  }