ywana-core8 0.0.347 → 0.0.350

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/index.umd.js CHANGED
@@ -2069,6 +2069,8 @@
2069
2069
  userLabel = _ref$userLabel === void 0 ? "User" : _ref$userLabel,
2070
2070
  _ref$passwordLabel = _ref.passwordLabel,
2071
2071
  passwordLabel = _ref$passwordLabel === void 0 ? "Password" : _ref$passwordLabel,
2072
+ _ref$passwordValue = _ref.passwordValue,
2073
+ passwordValue = _ref$passwordValue === void 0 ? '' : _ref$passwordValue,
2072
2074
  _ref$loginLabel = _ref.loginLabel,
2073
2075
  loginLabel = _ref$loginLabel === void 0 ? "Log In" : _ref$loginLabel,
2074
2076
  onOK = _ref.onOK,
@@ -2082,7 +2084,7 @@
2082
2084
  user = _useState[0],
2083
2085
  setUser = _useState[1];
2084
2086
 
2085
- var _useState2 = React.useState(''),
2087
+ var _useState2 = React.useState(passwordValue),
2086
2088
  password = _useState2[0],
2087
2089
  setPassword = _useState2[1];
2088
2090
 
@@ -2987,16 +2989,20 @@
2987
2989
  setDialog = _useState8[1];
2988
2990
 
2989
2991
  var _useState9 = React.useState(),
2990
- preview = _useState9[0],
2991
- setPreview = _useState9[1];
2992
+ promptDialog = _useState9[0],
2993
+ setPromptDialog = _useState9[1];
2992
2994
 
2993
2995
  var _useState10 = React.useState(),
2994
- breadcrumb = _useState10[0],
2995
- setBreadcrumb = _useState10[1];
2996
+ preview = _useState10[0],
2997
+ setPreview = _useState10[1];
2996
2998
 
2997
2999
  var _useState11 = React.useState(),
2998
- focused = _useState11[0],
2999
- setFocused = _useState11[1];
3000
+ breadcrumb = _useState11[0],
3001
+ setBreadcrumb = _useState11[1];
3002
+
3003
+ var _useState12 = React.useState(),
3004
+ focused = _useState12[0],
3005
+ setFocused = _useState12[1];
3000
3006
 
3001
3007
  var value = {
3002
3008
  lang: lang,
@@ -3049,6 +3055,13 @@
3049
3055
  prompt: function prompt(message) {
3050
3056
  return window.prompt(message);
3051
3057
  },
3058
+ promptDialog: promptDialog,
3059
+ openPromptDialog: function openPromptDialog(dialog) {
3060
+ setPromptDialog(dialog);
3061
+ },
3062
+ closePromptDialog: function closePromptDialog() {
3063
+ setPromptDialog(null);
3064
+ },
3052
3065
  notify: function notify(_ref2) {
3053
3066
  var title = _ref2.title,
3054
3067
  body = _ref2.body,
@@ -3103,7 +3116,7 @@
3103
3116
  init: init
3104
3117
  }, children, /*#__PURE__*/React__default["default"].createElement(Page, {
3105
3118
  id: "EMPTY"
3106
- }, "EMPTY")), /*#__PURE__*/React__default["default"].createElement(SiteAside, null), /*#__PURE__*/React__default["default"].createElement(SiteConsole, null), /*#__PURE__*/React__default["default"].createElement(SiteDialog, null), /*#__PURE__*/React__default["default"].createElement(SitePreview, null), /*#__PURE__*/React__default["default"].createElement(SiteNotifications, null)));
3119
+ }, "EMPTY")), /*#__PURE__*/React__default["default"].createElement(SiteAside, null), /*#__PURE__*/React__default["default"].createElement(SiteConsole, null), /*#__PURE__*/React__default["default"].createElement(SiteDialog, null), /*#__PURE__*/React__default["default"].createElement(SitePromptDialog, null), /*#__PURE__*/React__default["default"].createElement(SitePreview, null), /*#__PURE__*/React__default["default"].createElement(SiteNotifications, null)));
3107
3120
  };
3108
3121
 
3109
3122
  var SiteNotifications = function SiteNotifications() {
@@ -3255,6 +3268,15 @@
3255
3268
  var context = React.useContext(SiteContext);
3256
3269
  return context.dialog ? context.dialog : '';
3257
3270
  };
3271
+ /**
3272
+ * Site Promtp Dialog
3273
+ */
3274
+
3275
+
3276
+ var SitePromptDialog = function SitePromptDialog() {
3277
+ var context = React.useContext(SiteContext);
3278
+ return context.promptDialog ? context.promptDialog : '';
3279
+ };
3258
3280
  /**
3259
3281
  * Site Preview
3260
3282
  */
@@ -3309,7 +3331,7 @@
3309
3331
  }
3310
3332
 
3311
3333
  return /*#__PURE__*/React__default["default"].createElement(React.Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
3312
- className: "overlay"
3334
+ className: "overlay " + className
3313
3335
  }), /*#__PURE__*/React__default["default"].createElement("div", {
3314
3336
  className: "dialog " + className,
3315
3337
  onClick: close