ywana-core8 0.0.899 → 0.0.901
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 +42 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +94 -67
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +42 -2
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +42 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/css/theme_light.css +1 -0
- package/src/html/button.css +98 -71
- package/src/html/button.js +48 -4
- package/src/html/index.js +1 -1
- package/src/html/menu.js +2 -2
package/dist/index.modern.js
CHANGED
@@ -433,6 +433,43 @@ var Button = function Button(_ref) {
|
|
433
433
|
action: click
|
434
434
|
}) : null, /*#__PURE__*/React.createElement(Text, null, label));
|
435
435
|
};
|
436
|
+
var ActionButton = function ActionButton(props) {
|
437
|
+
var icon = props.icon,
|
438
|
+
_props$state = props.state,
|
439
|
+
state = _props$state === void 0 ? "normal" : _props$state,
|
440
|
+
action = props.action,
|
441
|
+
className = props.className;
|
442
|
+
var _useState = useState("normal"),
|
443
|
+
_state = _useState[0],
|
444
|
+
setState = _useState[1];
|
445
|
+
useEffect(function () {
|
446
|
+
setState(state);
|
447
|
+
}, [state]);
|
448
|
+
function activate() {
|
449
|
+
setState("running");
|
450
|
+
if (action) action();
|
451
|
+
}
|
452
|
+
var actionIcon = icon;
|
453
|
+
switch (_state) {
|
454
|
+
case "normal":
|
455
|
+
actionIcon = icon;
|
456
|
+
break;
|
457
|
+
case "running":
|
458
|
+
actionIcon = "rotate_right";
|
459
|
+
break;
|
460
|
+
case "success":
|
461
|
+
actionIcon = "task_alt";
|
462
|
+
break;
|
463
|
+
case "error":
|
464
|
+
actionIcon = "error";
|
465
|
+
break;
|
466
|
+
}
|
467
|
+
return /*#__PURE__*/React.createElement(Button, _extends({}, props, {
|
468
|
+
icon: actionIcon,
|
469
|
+
action: activate,
|
470
|
+
className: className + " action-btn " + _state
|
471
|
+
}));
|
472
|
+
};
|
436
473
|
|
437
474
|
/**
|
438
475
|
* CheckBox
|
@@ -830,6 +867,8 @@ var MenuItem = function MenuItem(props) {
|
|
830
867
|
meta = props.meta,
|
831
868
|
_props$disabled = props.disabled,
|
832
869
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
870
|
+
_props$size2 = props.size,
|
871
|
+
size = _props$size2 === void 0 ? "normal" : _props$size2,
|
833
872
|
onSelect = props.onSelect;
|
834
873
|
var _useContext = useContext(MenuContext),
|
835
874
|
setOpen = _useContext[1];
|
@@ -847,7 +886,8 @@ var MenuItem = function MenuItem(props) {
|
|
847
886
|
className: "menu-item " + style,
|
848
887
|
onClick: select
|
849
888
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
850
|
-
icon: icon
|
889
|
+
icon: icon,
|
890
|
+
size: size
|
851
891
|
}) : null, /*#__PURE__*/React.createElement("label", null, labelTxt), meta ? /*#__PURE__*/React.createElement("div", {
|
852
892
|
className: "meta"
|
853
893
|
}, meta) : null);
|
@@ -11135,5 +11175,5 @@ var isFunction = function isFunction(value) {
|
|
11135
11175
|
return value && (Object.prototype.toString.call(value) === "[object Function]" || "function" === typeof value || value instanceof Function);
|
11136
11176
|
};
|
11137
11177
|
|
11138
|
-
export { Accordion, Avatar, Button, Calendar, CheckBox, Chip, Chips, CircularProgress, CollectionAPI$1 as CollectionAPI, CollectionAPI as CollectionAPI2, CollectionContext$1 as CollectionContext, CollectionContext as CollectionContext2, CollectionEditor$2 as CollectionEditor, CollectionFilters$1 as CollectionFilters, CollectionPage$1 as CollectionPage, CollectionPage as CollectionPage2, CollectionTree, ColorField, Content, ContentEditor, ContentForm, ContentViewer, CreateContentDialog, DataTable, DateRange, Dialog, DropDown, DynamicForm, EditContentDialog, EmptyMessage, FORMATS$1 as FORMATS, FieldEditor, FileExplorer, FileExplorerView, FileGridItem, FilesGridView, FilesSearchBox, FilesTableView, FoldersTreeView, Form, HTTPClient, Header, Icon, ImageViewer, Kanban, KanbanCard, KanbanColumn, LinearProgress, List, ListEditor, LoginBox, Menu, MenuIcon, MenuItem, MenuSeparator, MultiSelector, Page, PageContext, PageProvider, PasswordEditor, PasswordField, Planner, Property, RadioButton, ResetPasswordBox, Section, Session, Site, SiteContext, SiteProvider, Stack, Switch, Switch2, TASK_STATES, TEXTFORMATS, TYPES$1 as TYPES, Tab, TabbedContentEditor, TabbedTablePage, TabbedView, TableEditor$2 as TableEditor, TablePage, TablePage2, Tabs, TaskContext, TaskContextProvider, TaskMonitor, TaskProgress, Text, TextArea, TextField, Thumbnail, ToggleButton, TokenField, Tooltip, Tree, TreeItem, TreeNode, TreededContentEditor, UploadArea, UploadDialog, UploadFile$1 as UploadFile, UploadForm, UploadIcon, Uploader, View, Viewer, WaitScreen, Wizard, WizardContext, isEmpty, isFunction };
|
11178
|
+
export { Accordion, ActionButton, Avatar, Button, Calendar, CheckBox, Chip, Chips, CircularProgress, CollectionAPI$1 as CollectionAPI, CollectionAPI as CollectionAPI2, CollectionContext$1 as CollectionContext, CollectionContext as CollectionContext2, CollectionEditor$2 as CollectionEditor, CollectionFilters$1 as CollectionFilters, CollectionPage$1 as CollectionPage, CollectionPage as CollectionPage2, CollectionTree, ColorField, Content, ContentEditor, ContentForm, ContentViewer, CreateContentDialog, DataTable, DateRange, Dialog, DropDown, DynamicForm, EditContentDialog, EmptyMessage, FORMATS$1 as FORMATS, FieldEditor, FileExplorer, FileExplorerView, FileGridItem, FilesGridView, FilesSearchBox, FilesTableView, FoldersTreeView, Form, HTTPClient, Header, Icon, ImageViewer, Kanban, KanbanCard, KanbanColumn, LinearProgress, List, ListEditor, LoginBox, Menu, MenuIcon, MenuItem, MenuSeparator, MultiSelector, Page, PageContext, PageProvider, PasswordEditor, PasswordField, Planner, Property, RadioButton, ResetPasswordBox, Section, Session, Site, SiteContext, SiteProvider, Stack, Switch, Switch2, TASK_STATES, TEXTFORMATS, TYPES$1 as TYPES, Tab, TabbedContentEditor, TabbedTablePage, TabbedView, TableEditor$2 as TableEditor, TablePage, TablePage2, Tabs, TaskContext, TaskContextProvider, TaskMonitor, TaskProgress, Text, TextArea, TextField, Thumbnail, ToggleButton, TokenField, Tooltip, Tree, TreeItem, TreeNode, TreededContentEditor, UploadArea, UploadDialog, UploadFile$1 as UploadFile, UploadForm, UploadIcon, Uploader, View, Viewer, WaitScreen, Wizard, WizardContext, isEmpty, isFunction };
|
11139
11179
|
//# sourceMappingURL=index.modern.js.map
|