@yuntijs/ui 1.0.0-beta.61 → 1.0.0-beta.63

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.
@@ -10,6 +10,7 @@ import { ArrowDown, ArrowUp, LoaderCircle, TextSearch } from 'lucide-react';
10
10
  import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
11
11
  import { useStyles } from "./style";
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { Fragment as _Fragment } from "react/jsx-runtime";
13
14
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
15
  export var LogViewer = function LogViewer(_ref) {
15
16
  var className = _ref.className,
@@ -55,14 +56,10 @@ export var LogViewer = function LogViewer(_ref) {
55
56
  }, [refreshInterval, urlFromProps, websocket]);
56
57
  var url = useMemo(function () {
57
58
  // workaround for onLoad exec twice
58
- if (setLoadingTimeout.current) {
59
- clearTimeout(setLoadingTimeout.current);
60
- } else {
61
- setLoadingTimeout.current = setTimeout(function () {
62
- setLoading(true);
63
- setLoadingTimeout.current = undefined;
64
- }, 50);
65
- }
59
+ setLoadingTimeout.current = setTimeout(function () {
60
+ setLoading(true);
61
+ setLoadingTimeout.current = undefined;
62
+ }, 50);
66
63
  return "".concat(urlFromProps, "#").concat(urlHash);
67
64
  }, [urlFromProps, urlHash]);
68
65
  var handleOnLoad = useCallback(function () {
@@ -110,10 +107,15 @@ export var LogViewer = function LogViewer(_ref) {
110
107
  }));
111
108
  },
112
109
  startFollowing: true
113
- }), loading && /*#__PURE__*/_jsx(Icon, {
114
- className: styles.loader,
115
- icon: LoaderCircle,
116
- spin: true
110
+ }), loading && /*#__PURE__*/_jsxs(_Fragment, {
111
+ children: [/*#__PURE__*/_jsx("div", {
112
+ className: styles.loaderText,
113
+ children: "loading ..."
114
+ }), /*#__PURE__*/_jsx(Icon, {
115
+ className: styles.loaderIcon,
116
+ icon: LoaderCircle,
117
+ spin: true
118
+ })]
117
119
  })]
118
120
  });
119
121
  };
@@ -1,5 +1,6 @@
1
1
  export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
2
  root: import("antd-style").SerializedStyles;
3
3
  searchBarIcon: import("antd-style").SerializedStyles;
4
- loader: import("antd-style").SerializedStyles;
4
+ loaderText: import("antd-style").SerializedStyles;
5
+ loaderIcon: import("antd-style").SerializedStyles;
5
6
  }>;
@@ -1,14 +1,15 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3;
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
3
3
  import { createStyles } from 'antd-style';
4
4
  export var useStyles = createStyles(function (_ref) {
5
5
  var css = _ref.css,
6
6
  token = _ref.token;
7
7
  var bgColor = '#222222';
8
8
  return {
9
- root: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n background-color: ", ";\n border-radius: ", "px;\n\n .react-lazylog-searchbar {\n margin-bottom: ", "px;\n padding: ", "px;\n\n background-color: ", ";\n border-bottom: 1px solid #2d2d2d;\n border-top-left-radius: ", "px;\n border-top-right-radius: ", "px;\n & > input {\n border-radius: ", "px;\n }\n & > button {\n cursor: pointer;\n padding: 2px 6px;\n border-radius: ", "px;\n }\n &-up-arrow {\n margin-right: 0;\n }\n }\n .react-lazylog {\n scrollbar-color: rgba(255, 255, 255, 0.2) transparent;\n scrollbar-width: auto;\n background-color: ", ";\n border-radius: ", "px;\n\n .log-number {\n margin-right: 0;\n }\n .log-content {\n margin-left: 15px;\n }\n }\n "])), bgColor, token.borderRadiusLG, token.marginXXS, token.paddingXS, bgColor, token.borderRadiusLG, token.borderRadiusLG, token.borderRadius, token.borderRadius, bgColor, token.borderRadiusLG),
9
+ root: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n background-color: ", ";\n border-radius: ", "px;\n\n .react-lazylog-searchbar {\n margin-bottom: ", "px;\n padding: ", "px;\n\n background-color: ", ";\n border-bottom: 1px solid #2d2d2d;\n border-top-left-radius: ", "px;\n border-top-right-radius: ", "px;\n & > input {\n border-radius: ", "px;\n }\n & > button {\n cursor: pointer;\n padding: 2px 6px;\n border-radius: ", "px;\n }\n &-up-arrow {\n margin-right: 0;\n }\n }\n .react-lazylog {\n scrollbar-color: rgba(255, 255, 255, 0.2) transparent;\n scrollbar-width: auto;\n background-color: ", ";\n border-radius: ", "px;\n\n .log-number {\n margin-right: 0;\n }\n .log-content {\n margin-left: 15px;\n font-family: ", ";\n }\n }\n "])), bgColor, token.borderRadiusLG, token.marginXXS, token.paddingXS, bgColor, token.borderRadiusLG, token.borderRadiusLG, token.borderRadius, token.borderRadius, bgColor, token.borderRadiusLG, token.fontFamilyCode),
10
10
  searchBarIcon: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: 16px;\n "]))),
11
- loader: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n right: ", "px;\n bottom: ", "px;\n\n font-size: ", "px;\n color: ", ";\n "])), token.marginSM, token.marginSM, token.fontSizeLG, token.colorTextTertiary)
11
+ loaderText: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n top: 44px;\n left: 15px;\n\n font-family: ", ";\n font-size: 12px;\n color: #fff;\n "])), token.fontFamilyCode),
12
+ loaderIcon: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n right: ", "px;\n bottom: ", "px;\n\n font-size: 18px;\n color: #999;\n "])), token.marginSM, token.marginSM)
12
13
  };
13
14
  }, {
14
15
  hashPriority: 'low'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuntijs/ui",
3
- "version": "1.0.0-beta.61",
3
+ "version": "1.0.0-beta.63",
4
4
  "description": "☁️ Yunti UI - an open-source UI component library for building Cloud Native web apps",
5
5
  "keywords": [
6
6
  "yuntijs",