ywana-core8 0.0.350 → 0.0.353
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.cjs +13 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +65 -56
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +13 -4
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +13 -4
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -1
- package/src/html/menu.css +65 -57
- package/src/html/menu.js +8 -4
- package/src/http/token.test.js +31 -0
- package/src/site/dialog.js +5 -1
- package/src/site/site.test.js +8 -9
package/dist/index.cjs
CHANGED
@@ -672,18 +672,23 @@ var MenuItem = function MenuItem(props) {
|
|
672
672
|
var icon = props.icon,
|
673
673
|
label = props.label,
|
674
674
|
meta = props.meta,
|
675
|
+
_props$disabled = props.disabled,
|
676
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
675
677
|
onSelect = props.onSelect;
|
676
678
|
|
677
679
|
var _useContext = React.useContext(MenuContext),
|
678
680
|
setOpen = _useContext[1];
|
679
681
|
|
680
682
|
function select() {
|
681
|
-
if (
|
682
|
-
|
683
|
+
if (!disabled) {
|
684
|
+
if (onSelect) onSelect();
|
685
|
+
setOpen(false);
|
686
|
+
}
|
683
687
|
}
|
684
688
|
|
689
|
+
var style = disabled ? "disabled" : "";
|
685
690
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
686
|
-
className: "menu-item",
|
691
|
+
className: "menu-item " + style,
|
687
692
|
onClick: select
|
688
693
|
}, icon ? /*#__PURE__*/React__default["default"].createElement(Icon, {
|
689
694
|
icon: icon
|
@@ -3325,7 +3330,11 @@ var Dialog = function Dialog(props) {
|
|
3325
3330
|
eventPropagation = _props$eventPropagati === void 0 ? false : _props$eventPropagati;
|
3326
3331
|
|
3327
3332
|
function close() {
|
3328
|
-
|
3333
|
+
if (className === "prompt") {
|
3334
|
+
site.closePromptDialog();
|
3335
|
+
} else {
|
3336
|
+
site.closeDialog();
|
3337
|
+
}
|
3329
3338
|
}
|
3330
3339
|
|
3331
3340
|
function prevent(e) {
|