utopia-ui 3.0.0-alpha.64 → 3.0.0-alpha.65

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.
@@ -1,4 +1,5 @@
1
- /// <reference types="react" />
2
- export declare function Modal({ children }: {
3
- children: any;
1
+ import * as React from "react";
2
+ export declare function Modal({ children, showOnStartup }: {
3
+ children: React.ReactNode;
4
+ showOnStartup?: boolean;
4
5
  }): JSX.Element;
package/dist/index.js CHANGED
@@ -3516,7 +3516,7 @@ function SideBar(_a) {
3516
3516
  React.createElement("ul", { className: "tw-menu tw-w-full tw-bg-base-100 tw-text-base-content tw-p-0", "data-te-sidenav-menu-ref": true }, routes.map(function (route, k) {
3517
3517
  return (React.createElement("li", { className: "", key: k }, route.submenu ?
3518
3518
  React.createElement(SidebarSubmenu, __assign({}, route)) :
3519
- (React.createElement(NavLink, { end: true, to: route.path, className: function (_a) {
3519
+ (React.createElement(NavLink, { end: true, target: route.blank ? "_blank" : "_self", to: route.path, className: function (_a) {
3520
3520
  var isActive = _a.isActive;
3521
3521
  return "".concat(isActive ? 'tw-font-semibold tw-bg-base-200 !tw-rounded-none' : 'tw-font-normal !tw-rounded-none');
3522
3522
  }, onClick: function () {
@@ -3790,7 +3790,11 @@ function ProfileSettings() {
3790
3790
  }
3791
3791
 
3792
3792
  function Modal(_a) {
3793
- var children = _a.children;
3793
+ var children = _a.children, showOnStartup = _a.showOnStartup;
3794
+ useEffect(function () {
3795
+ if (showOnStartup)
3796
+ window.my_modal_3.showModal();
3797
+ }, []);
3794
3798
  return (React.createElement(React.Fragment, null,
3795
3799
  React.createElement("dialog", { id: "my_modal_3", className: "tw-modal tw-transition-all tw-duration-300" },
3796
3800
  React.createElement("form", { method: "dialog", className: "tw-modal-box tw-transition-none" },