@lobehub/ui 1.121.0 → 1.122.0

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.
Files changed (73) hide show
  1. package/es/ActionIcon/index.js +4 -1
  2. package/es/ActionIcon/style.js +1 -1
  3. package/es/ActionIconGroup/index.js +4 -3
  4. package/es/ActionIconGroup/style.d.ts +0 -1
  5. package/es/ActionIconGroup/style.js +2 -3
  6. package/es/ColorScales/ScaleRow.js +5 -1
  7. package/es/ColorScales/index.js +14 -5
  8. package/es/ColorScales/style.d.ts +0 -1
  9. package/es/ColorScales/style.js +4 -5
  10. package/es/ContextMenu/index.d.ts +4 -17
  11. package/es/ContextMenu/index.js +6 -249
  12. package/es/DraggablePanel/components/DraggablePanelBody.js +4 -2
  13. package/es/DraggablePanel/components/DraggablePanelContainer.js +2 -1
  14. package/es/DraggablePanel/components/DraggablePanelFooter.js +8 -2
  15. package/es/DraggablePanel/components/DraggablePanelHeader.js +8 -2
  16. package/es/DraggablePanel/components/style.js +4 -4
  17. package/es/FluentEmoji/style.d.ts +0 -1
  18. package/es/FluentEmoji/style.js +3 -5
  19. package/es/Form/components/FormFooter.js +6 -6
  20. package/es/Form/components/FormGroup.js +3 -1
  21. package/es/Form/components/FormTitle.js +2 -1
  22. package/es/Form/components/style.d.ts +0 -1
  23. package/es/Form/components/style.js +9 -10
  24. package/es/Form/style.d.ts +0 -1
  25. package/es/Form/style.js +2 -3
  26. package/es/GaussianBackground/index.d.ts +17 -0
  27. package/es/GaussianBackground/index.js +48 -0
  28. package/es/GaussianBackground/style.d.ts +5 -0
  29. package/es/GaussianBackground/style.js +11 -0
  30. package/es/GaussianBackground/useGaussianBackground.d.ts +7 -0
  31. package/es/GaussianBackground/useGaussianBackground.js +19 -0
  32. package/es/GaussianBackground/vendor/gaussianBackground.d.ts +38 -0
  33. package/es/GaussianBackground/vendor/gaussianBackground.js +222 -0
  34. package/es/GaussianBackground/vendor/stackBlur.d.ts +1 -0
  35. package/es/GaussianBackground/vendor/stackBlur.js +184 -0
  36. package/es/GaussianBackground/vendor/stackBlurTable.d.ts +2 -0
  37. package/es/GaussianBackground/vendor/stackBlurTable.js +2 -0
  38. package/es/Header/index.js +4 -1
  39. package/es/Header/style.js +1 -1
  40. package/es/Hero/index.js +4 -1
  41. package/es/Hero/style.js +1 -1
  42. package/es/Highlighter/SyntaxHighlighter/index.js +4 -2
  43. package/es/Highlighter/SyntaxHighlighter/style.js +1 -1
  44. package/es/List/ListItem/time.d.ts +0 -1
  45. package/es/List/ListItem/time.js +0 -4
  46. package/es/MessageModal/index.js +1 -1
  47. package/es/SideNav/index.js +5 -2
  48. package/es/SideNav/style.js +1 -1
  49. package/es/Snippet/index.js +6 -2
  50. package/es/Snippet/style.js +1 -1
  51. package/es/SpotlightCard/SpotlightCardItem.js +1 -1
  52. package/es/SpotlightCard/style.js +1 -1
  53. package/es/StoryBook/index.js +10 -3
  54. package/es/StoryBook/style.js +2 -2
  55. package/es/Tag/index.js +1 -1
  56. package/es/ThemeProvider/GlobalStyle/antdOverride.js +1 -1
  57. package/es/TokenTag/index.js +6 -1
  58. package/es/TokenTag/style.js +1 -1
  59. package/es/index.d.ts +1 -0
  60. package/es/index.js +1 -0
  61. package/package.json +1 -2
  62. package/es/ContextMenu/MenuItem/icons.d.ts +0 -4
  63. package/es/ContextMenu/MenuItem/icons.js +0 -73
  64. package/es/ContextMenu/MenuItem/index.d.ts +0 -12
  65. package/es/ContextMenu/MenuItem/index.js +0 -73
  66. package/es/ContextMenu/MenuItem/style.d.ts +0 -7
  67. package/es/ContextMenu/MenuItem/style.js +0 -16
  68. package/es/ContextMenu/style.d.ts +0 -4
  69. package/es/ContextMenu/style.js +0 -12
  70. package/es/ContextMenu/types/index.d.ts +0 -5
  71. package/es/ContextMenu/types/index.js +0 -2
  72. package/es/ContextMenu/types/menuItem.d.ts +0 -21
  73. package/es/ContextMenu/types/menuItem.js +0 -1
@@ -11,6 +11,6 @@ export var useStyles = createStyles(function (_ref) {
11
11
  content: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: 64px;\n padding: 0 24px;\n background-color: ", ";\n border-bottom: 1px solid ", ";\n\n ", " {\n padding: 0 12px;\n }\n "])), rgba(token.colorBgLayout, 0.4), token.colorSplit, responsive.mobile),
12
12
  header: cx(css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n grid-area: head;\n align-self: stretch;\n width: 100%;\n "])))),
13
13
  left: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n z-index: 10;\n "]))),
14
- right: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n z-index: 10;\n display: flex;\n flex: 1;\n justify-content: space-between;\n\n &-aside {\n display: flex;\n align-items: center;\n\n ", " {\n justify-content: center;\n margin: 8px 16px;\n padding-top: 24px;\n border-top: 1px solid ", ";\n }\n }\n "])), responsive.mobile, token.colorBorder)
14
+ right: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n z-index: 10;\n\n &-aside {\n display: flex;\n align-items: center;\n\n ", " {\n justify-content: center;\n margin: 8px 16px;\n padding-top: 24px;\n border-top: 1px solid ", ";\n }\n }\n "])), responsive.mobile, token.colorBorder)
15
15
  };
16
16
  });
package/es/Hero/index.js CHANGED
@@ -17,8 +17,11 @@ var Hero = /*#__PURE__*/memo(function (_ref) {
17
17
  var _useResponsive = useResponsive(),
18
18
  mobile = _useResponsive.mobile;
19
19
  var ButtonGroups = useCallback(function () {
20
- return Boolean(actions === null || actions === void 0 ? void 0 : actions.length) && /*#__PURE__*/_jsx("div", {
20
+ return Boolean(actions === null || actions === void 0 ? void 0 : actions.length) && /*#__PURE__*/_jsx(Flexbox, {
21
21
  className: styles.actions,
22
+ gap: 24,
23
+ horizontal: true,
24
+ justify: 'center',
22
25
  children: actions.map(function (_ref2, index) {
23
26
  var text = _ref2.text,
24
27
  link = _ref2.link,
package/es/Hero/style.js CHANGED
@@ -8,7 +8,7 @@ export var useStyles = createStyles(function (_ref) {
8
8
  token = _ref.token,
9
9
  stylish = _ref.stylish;
10
10
  return {
11
- actions: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n gap: 24px;\n justify-content: center;\n margin-top: 24px;\n\n button {\n padding-inline: 32px !important;\n font-weight: 500;\n }\n\n ", " {\n flex-direction: column;\n gap: 16px;\n width: 100%;\n margin-top: 24px;\n\n button {\n width: 100%;\n }\n }\n "])), responsive.mobile),
11
+ actions: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-top: 24px;\n\n button {\n padding-inline: 32px !important;\n font-weight: 500;\n }\n\n ", " {\n flex-direction: column;\n gap: 16px;\n width: 100%;\n margin-top: 24px;\n\n button {\n width: 100%;\n }\n }\n "])), responsive.mobile),
12
12
  canvas: cx(stylish.gradientAnimation, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n pointer-events: none;\n\n position: absolute;\n z-index: 10;\n top: -250px;\n left: 50%;\n transform: translateX(-50%) scale(1.5);\n\n width: 600px;\n height: 400px;\n\n opacity: 0.2;\n filter: blur(100px);\n\n ", " {\n width: 200px;\n height: 300px;\n }\n "])), responsive.mobile)),
13
13
  container: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n box-sizing: border-box;\n text-align: center;\n "]))),
14
14
  desc: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-top: 0;\n font-size: ", "px;\n color: ", ";\n text-align: center;\n\n ", " {\n margin: 24px 16px;\n font-size: ", "px;\n }\n "])), token.fontSizeHeading3, token.colorTextSecondary, responsive.mobile, token.fontSizeHeading5),
@@ -1,7 +1,7 @@
1
1
  import { useThemeMode } from 'antd-style';
2
2
  import { Loader2 } from 'lucide-react';
3
3
  import { memo } from 'react';
4
- import { Center } from 'react-layout-kit';
4
+ import { Flexbox } from 'react-layout-kit';
5
5
  import Icon from "../../Icon";
6
6
  import { useHighlight } from "../../hooks/useHighlight";
7
7
  import { useStyles } from "./style";
@@ -36,10 +36,12 @@ var SyntaxHighlighter = /*#__PURE__*/memo(function (_ref) {
36
36
  __html: data
37
37
  },
38
38
  style: style
39
- }), isLoading && /*#__PURE__*/_jsxs(Center, {
39
+ }), isLoading && /*#__PURE__*/_jsxs(Flexbox, {
40
+ align: 'center',
40
41
  className: styles.loading,
41
42
  gap: 8,
42
43
  horizontal: true,
44
+ justify: 'center',
43
45
  children: [/*#__PURE__*/_jsx(Icon, {
44
46
  icon: Loader2,
45
47
  spin: true
@@ -9,7 +9,7 @@ export var useStyles = createStyles(function (_ref) {
9
9
  stylish = _ref.stylish;
10
10
  var prefix = "".concat(prefixCls, "-highlighter");
11
11
  return {
12
- loading: cx(stylish.blur, css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 10;\n top: 0;\n right: 0;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n height: 34px;\n padding: 0 8px;\n\n font-family: ", ";\n color: ", ";\n\n border-radius: ", ";\n "])), token.fontFamilyCode, token.colorTextTertiary, token.borderRadius)),
12
+ loading: cx(stylish.blur, css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 10;\n top: 0;\n right: 0;\n\n height: 34px;\n padding: 0 8px;\n\n font-family: ", ";\n color: ", ";\n\n border-radius: ", ";\n "])), token.fontFamilyCode, token.colorTextTertiary, token.borderRadius)),
13
13
  prism: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n pre {\n overflow: auto;\n font-family: ", " !important;\n }\n "])), token.fontFamilyCode),
14
14
  shiki: cx("".concat(prefix, "-shiki"), css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin: 0;\n padding: 0;\n\n .shiki {\n overflow-x: auto;\n margin: 0;\n padding: 0;\n background: none !important;\n }\n "])))),
15
15
  unshiki: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorTextDescription)
@@ -1,2 +1 @@
1
- import 'dayjs/locale/zh-cn';
2
1
  export declare const getChatItemTime: (updateAt: number) => string;
@@ -1,10 +1,6 @@
1
1
  import dayjs from 'dayjs';
2
- import 'dayjs/locale/zh-cn';
3
- dayjs.locale('zh-cn');
4
2
  export var getChatItemTime = function getChatItemTime(updateAt) {
5
3
  var time = dayjs(updateAt);
6
- var diff = dayjs().day() - time.day();
7
4
  if (time.isSame(dayjs(), 'day')) return time.format('HH:mm');
8
- if (diff === 1) return '昨天';
9
5
  return time.format('MM-DD');
10
6
  };
@@ -70,7 +70,7 @@ var MessageModal = /*#__PURE__*/memo(function (_ref2) {
70
70
  padding: 16
71
71
  }
72
72
  } : {},
73
- title: text === null || text === void 0 ? void 0 : text.title,
73
+ title: (text === null || text === void 0 ? void 0 : text.title) || ' ',
74
74
  children: isEdit ? /*#__PURE__*/_jsx(MessageInput, {
75
75
  defaultValue: value,
76
76
  height: height,
@@ -17,8 +17,11 @@ var SideNav = /*#__PURE__*/memo(function (_ref) {
17
17
  var _useStyles = useStyles(),
18
18
  styles = _useStyles.styles,
19
19
  cx = _useStyles.cx;
20
- return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
21
- className: cx(styles, className)
20
+ return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
21
+ align: 'center',
22
+ className: cx(styles, className),
23
+ flex: 'none',
24
+ justify: 'space-between'
22
25
  }, rest), {}, {
23
26
  children: [/*#__PURE__*/_jsxs(Flexbox, {
24
27
  align: "center",
@@ -4,5 +4,5 @@ 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
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex: none;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n\n width: 64px;\n height: 100%;\n min-height: 640px;\n padding: 16px 0;\n\n background: ", ";\n border-right: 1px solid ", ";\n "])), token.colorBgContainer, token.colorBorder);
7
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 64px;\n height: 100%;\n min-height: 640px;\n padding: 16px 0;\n\n background: ", ";\n border-right: 1px solid ", ";\n "])), token.colorBgContainer, token.colorBorder);
8
8
  });
@@ -4,6 +4,7 @@ var _excluded = ["symbol", "language", "children", "copyable", "type", "spotligh
4
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
6
  import { memo } from 'react';
7
+ import { Flexbox } from 'react-layout-kit';
7
8
  import CopyButton from "../CopyButton";
8
9
  import SyntaxHighlighter from "../Highlighter/SyntaxHighlighter";
9
10
  import Spotlight from "../Spotlight";
@@ -25,8 +26,11 @@ var Snippet = /*#__PURE__*/memo(function (_ref) {
25
26
  var _useStyles = useStyles(type),
26
27
  styles = _useStyles.styles,
27
28
  cx = _useStyles.cx;
28
- return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
29
- className: cx(styles.container, className)
29
+ return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
30
+ align: 'center',
31
+ className: cx(styles.container, className),
32
+ gap: 8,
33
+ horizontal: true
30
34
  }, rest), {}, {
31
35
  children: [spotlight && /*#__PURE__*/_jsx(Spotlight, {}), /*#__PURE__*/_jsx(SyntaxHighlighter, {
32
36
  language: language,
@@ -8,6 +8,6 @@ export var useStyles = createStyles(function (_ref, type) {
8
8
  prefixCls = _ref.prefixCls;
9
9
  var typeStylish = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border: 1px solid ", ";\n "])), type === 'block' ? token.colorFillTertiary : 'transparent', type === 'block' ? 'transparent' : token.colorBorder);
10
10
  return {
11
- container: cx(typeStylish, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n\n overflow: hidden;\n display: flex;\n gap: 8px;\n align-items: center;\n\n max-width: 100%;\n height: 38px;\n padding: 0 8px 0 12px;\n\n border-radius: ", "px;\n\n transition: background-color 100ms ", ";\n\n &:hover {\n background-color: ", ";\n }\n\n .", "-highlighter-shiki {\n position: relative;\n overflow: hidden;\n flex: 1;\n }\n\n .prism-code {\n background: none !important;\n }\n\n pre {\n overflow-x: auto !important;\n overflow-y: hidden !important;\n display: flex;\n align-items: center;\n\n width: 100%;\n height: 36px !important;\n margin: 0 !important;\n\n line-height: 1;\n\n background: none !important;\n }\n\n code[class*='language-'] {\n background: none !important;\n }\n "])), token.borderRadius, token.motionEaseOut, token.colorFillTertiary, prefixCls))
11
+ container: cx(typeStylish, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n\n overflow: hidden;\n\n max-width: 100%;\n height: 38px;\n padding: 0 8px 0 12px;\n\n border-radius: ", "px;\n\n transition: background-color 100ms ", ";\n\n &:hover {\n background-color: ", ";\n }\n\n .", "-highlighter-shiki {\n position: relative;\n overflow: hidden;\n flex: 1;\n }\n\n .prism-code {\n background: none !important;\n }\n\n pre {\n overflow-x: auto !important;\n overflow-y: hidden !important;\n display: flex;\n align-items: center;\n\n width: 100%;\n height: 36px !important;\n margin: 0 !important;\n\n line-height: 1;\n\n background: none !important;\n }\n\n code[class*='language-'] {\n background: none !important;\n }\n "])), token.borderRadius, token.motionEaseOut, token.colorFillTertiary, prefixCls))
12
12
  };
13
13
  });
@@ -20,7 +20,7 @@ var SpotlightCardItem = /*#__PURE__*/memo(function (_ref) {
20
20
  }),
21
21
  styles = _useStyles.styles,
22
22
  cx = _useStyles.cx;
23
- return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
23
+ return /*#__PURE__*/_jsx(Flexbox, _objectSpread(_objectSpread({
24
24
  className: cx(styles.itemContainer, className),
25
25
  style: _objectSpread({
26
26
  borderRadius: borderRadius
@@ -14,6 +14,6 @@ export var useStyles = createStyles(function (_ref, _ref2) {
14
14
  container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &:hover > .", "::after {\n opacity: 1;\n }\n "])), CHILDREN_CLASSNAME),
15
15
  content: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n z-index: 2;\n\n flex-grow: 1;\n\n height: 100%;\n margin: 1px;\n\n background: ", ";\n border-radius: ", "px;\n "])), token.colorBgContainer, borderRadius - 1),
16
16
  grid: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: grid;\n\n ", " {\n display: flex;\n flex-direction: column;\n }\n "])), responsive.mobile),
17
- itemContainer: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n cursor: pointer;\n\n position: relative;\n\n overflow: hidden;\n display: flex;\n flex-direction: column;\n\n width: 100%;\n\n background: ", ";\n border-radius: ", "px;\n\n &::before,\n &::after {\n content: '';\n\n position: absolute;\n top: 0;\n left: 0;\n\n width: 100%;\n height: 100%;\n\n opacity: 0;\n border-radius: inherit;\n\n transition: opacity 500ms;\n }\n\n &::before {\n pointer-events: none;\n user-select: none;\n z-index: 3;\n background: radial-gradient(\n ", "px circle at var(--mouse-x) var(--mouse-y),\n ", ",\n transparent 40%\n );\n }\n\n &::after {\n z-index: 1;\n background: radial-gradient(\n ", "px circle at var(--mouse-x) var(--mouse-y),\n ", ",\n transparent 40%\n );\n }\n\n :hover::before {\n opacity: 1;\n }\n "])), rgba(token.colorBorderSecondary, 0.75), borderRadius, size, rgba(token.colorTextBase, isDarkMode ? 0.06 : 0.02), size * 0.75, rgba(token.colorTextBase, isDarkMode ? 0.4 : 0.2))
17
+ itemContainer: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n cursor: pointer;\n\n position: relative;\n\n overflow: hidden;\n\n width: 100%;\n\n background: ", ";\n border-radius: ", "px;\n\n &::before,\n &::after {\n content: '';\n\n position: absolute;\n top: 0;\n left: 0;\n\n width: 100%;\n height: 100%;\n\n opacity: 0;\n border-radius: inherit;\n\n transition: opacity 500ms;\n }\n\n &::before {\n pointer-events: none;\n user-select: none;\n z-index: 3;\n background: radial-gradient(\n ", "px circle at var(--mouse-x) var(--mouse-y),\n ", ",\n transparent 40%\n );\n }\n\n &::after {\n z-index: 1;\n background: radial-gradient(\n ", "px circle at var(--mouse-x) var(--mouse-y),\n ", ",\n transparent 40%\n );\n }\n\n :hover::before {\n opacity: 1;\n }\n "])), rgba(token.colorBorderSecondary, 0.75), borderRadius, size, rgba(token.colorTextBase, isDarkMode ? 0.06 : 0.02), size * 0.75, rgba(token.colorTextBase, isDarkMode ? 0.4 : 0.2))
18
18
  };
19
19
  });
@@ -6,6 +6,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
6
6
  import { useResponsive } from 'antd-style';
7
7
  import { LevaPanel } from 'leva';
8
8
  import { memo } from 'react';
9
+ import { Flexbox } from 'react-layout-kit';
9
10
  import DraggablePanel from "../DraggablePanel";
10
11
  import { useStyles } from "./style";
11
12
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -21,11 +22,17 @@ export var StoryBook = /*#__PURE__*/memo(function (_ref) {
21
22
  var _useStyles = useStyles(Boolean(noPadding)),
22
23
  styles = _useStyles.styles,
23
24
  cx = _useStyles.cx;
24
- return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
25
- className: cx(styles.editor, className)
25
+ return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
26
+ align: 'stretch',
27
+ className: cx(styles.editor, className),
28
+ horizontal: !mobile,
29
+ justify: 'stretch'
26
30
  }, rest), {}, {
27
- children: [/*#__PURE__*/_jsx("div", {
31
+ children: [/*#__PURE__*/_jsx(Flexbox, {
32
+ align: 'center',
28
33
  className: styles.left,
34
+ flex: 1,
35
+ justify: 'center',
29
36
  children: children
30
37
  }), /*#__PURE__*/_jsx(DraggablePanel, {
31
38
  className: styles.right,
@@ -6,8 +6,8 @@ export var useStyles = createStyles(function (_ref, noPadding) {
6
6
  token = _ref.token,
7
7
  responsive = _ref.responsive;
8
8
  return {
9
- editor: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: stretch;\n justify-content: stretch;\n\n width: inherit;\n min-height: inherit;\n\n ", " {\n flex-direction: column;\n }\n "])), responsive.mobile),
10
- left: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n overflow: auto;\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n\n position: relative;\n\n ", "\n "])), !noPadding && css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 40px 24px;\n "])))),
9
+ editor: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: inherit;\n min-height: inherit;\n "]))),
10
+ left: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n overflow: auto;\n position: relative;\n\n ", "\n "])), !noPadding && css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 40px 24px;\n "])))),
11
11
  leva: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n --leva-sizes-controlWidth: 66%;\n --leva-colors-elevation1: ", ";\n --leva-colors-elevation2: transparent;\n --leva-colors-elevation3: ", ";\n --leva-colors-accent1: ", ";\n --leva-colors-accent2: ", ";\n --leva-colors-accent3: ", ";\n --leva-colors-highlight1: ", ";\n --leva-colors-highlight2: ", ";\n --leva-colors-highlight3: ", ";\n --leva-colors-vivid1: ", ";\n --leva-shadows-level1: unset;\n --leva-shadows-level2: unset;\n --leva-fonts-mono: ", ";\n\n overflow: auto;\n width: 100%;\n height: 100%;\n padding: 6px 0;\n\n > div {\n background: transparent;\n\n > div {\n background: transparent;\n }\n }\n\n input:checked + label > svg {\n stroke: ", ";\n }\n\n button {\n --leva-colors-accent2: ", ";\n }\n "])), token.colorFillSecondary, token.colorFillSecondary, token.colorPrimary, token.colorPrimaryHover, token.colorPrimaryActive, token.colorTextTertiary, token.colorTextSecondary, token.colorText, token.colorWarning, token.fontFamilyCode, token.colorBgLayout, token.colorFillSecondary),
12
12
  right: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background: ", ";\n\n ", " {\n .draggable-panel-fixed {\n width: 100% !important;\n }\n }\n "])), token.colorBgLayout, responsive.mobile)
13
13
  };
package/es/Tag/index.js CHANGED
@@ -17,7 +17,7 @@ var useStyles = createStyles(function (_ref) {
17
17
  token = _ref.token;
18
18
  return {
19
19
  small: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 2px 6px;\n line-height: 1;\n "]))),
20
- tag: cx(css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", " !important;\n background: ", ";\n border: ", "px;\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n "])), token.colorTextSecondary, token.colorFillSecondary, token.borderRadius, token.colorText, token.colorFill))
20
+ tag: cx(css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n user-select: none;\n color: ", " !important;\n background: ", ";\n border: ", "px;\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n "])), token.colorTextSecondary, token.colorFillSecondary, token.borderRadius, token.colorText, token.colorFill))
21
21
  };
22
22
  });
23
23
  var Tag = /*#__PURE__*/memo(function (_ref2) {
@@ -3,5 +3,5 @@ var _templateObject;
3
3
  import { css } from 'antd-style';
4
4
  import { readableColor, rgba } from 'polished';
5
5
  export default (function (token) {
6
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", "-checkbox-inner:after {\n border-color: ", " !important;\n }\n\n .", "-btn {\n box-shadow: none;\n }\n\n .", "-btn-primary {\n color: ", " !important;\n\n &:hover {\n color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n }\n }\n\n .", "-tooltip-inner {\n display: flex;\n align-items: center;\n justify-content: center;\n\n min-height: unset;\n padding: 4px 8px;\n\n color: ", " !important;\n\n background-color: ", " !important;\n border-radius: ", "px !important;\n }\n\n .", "-tooltip-arrow {\n &::before,\n &::after {\n background: ", " !important;\n }\n }\n\n .", "-switch-handle::before {\n background: ", " !important;\n }\n\n .", "-image-preview-close,\n .", "-image-preview-switch-right,.", "-image-preview-switch-left {\n ", ";\n border-radius: ", "px;\n background: ", ";\n\n width: 32px;\n height: 32px;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n padding: 0;\n }\n\n @media (max-width: 575px) {\n .", "-tooltip {\n display: none !important;\n }\n }\n"])), token.prefixCls, readableColor(token.colorPrimary), token.prefixCls, token.prefixCls, readableColor(token.colorPrimary), readableColor(token.colorPrimary), readableColor(token.colorPrimaryActive), token.prefixCls, token.colorBgLayout, token.colorText, token.borderRadiusSM, token.prefixCls, token.colorText, token.prefixCls, token.colorBgContainer, token.prefixCls, token.prefixCls, token.prefixCls, token.stylish.blur, token.borderRadiusLG, rgba(token.colorBgMask, 0.1), token.prefixCls);
6
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", "-checkbox-inner:after {\n border-color: ", " !important;\n }\n\n .", "-btn {\n box-shadow: none;\n }\n\n .", "-btn-primary {\n color: ", " !important;\n\n &:hover {\n color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n }\n }\n\n .", "-tooltip-inner {\n display: flex;\n align-items: center;\n justify-content: center;\n\n min-height: unset;\n padding: 4px 8px;\n\n color: ", " !important;\n\n background-color: ", " !important;\n border-radius: ", "px !important;\n }\n\n .", "-tooltip-arrow {\n &::before,\n &::after {\n background: ", " !important;\n }\n }\n\n .", "-switch-handle::before {\n background: ", " !important;\n }\n\n .", "-image-preview-close,\n .", "-image-preview-switch-right,.", "-image-preview-switch-left {\n ", ";\n border-radius: ", "px;\n background: ", ";\n\n width: 32px;\n height: 32px;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n padding: 0;\n }\n\n .", "-dropdown {\n .", "-dropdown-menu {\n border: 1px solid ", ";\n border-radius: ", "px !important;\n box-shadow: ", ";\n }\n }\n\n @media (max-width: 575px) {\n .", "-tooltip {\n display: none !important;\n }\n }\n"])), token.prefixCls, readableColor(token.colorPrimary), token.prefixCls, token.prefixCls, readableColor(token.colorPrimary), readableColor(token.colorPrimary), readableColor(token.colorPrimaryActive), token.prefixCls, token.colorBgLayout, token.colorText, token.borderRadiusSM, token.prefixCls, token.colorText, token.prefixCls, token.colorBgContainer, token.prefixCls, token.prefixCls, token.prefixCls, token.stylish.blur, token.borderRadiusLG, rgba(token.colorBgMask, 0.1), token.prefixCls, token.prefixCls, token.colorBorderSecondary, token.borderRadius, token.boxShadowSecondary, token.prefixCls);
7
7
  });
@@ -5,6 +5,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
6
  import { useResponsive } from 'antd-style';
7
7
  import { forwardRef } from 'react';
8
+ import { Flexbox } from 'react-layout-kit';
8
9
  import FluentEmoji from "../FluentEmoji";
9
10
  import { ICON_SIZE, useStyles } from "./style";
10
11
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -41,8 +42,12 @@ var TokenTag = /*#__PURE__*/forwardRef(function (_ref, ref) {
41
42
  }),
42
43
  styles = _useStyles.styles,
43
44
  cx = _useStyles.cx;
44
- return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
45
+ return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
46
+ align: 'center',
45
47
  className: cx(styles.container, className),
48
+ flex: 'none',
49
+ gap: 4,
50
+ horizontal: true,
46
51
  ref: ref
47
52
  }, rest), {}, {
48
53
  children: [/*#__PURE__*/_jsx(FluentEmoji, {
@@ -31,6 +31,6 @@ export var useStyles = createStyles(function (_ref, _ref2) {
31
31
  var roundStylish = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: 0 ", "px 0 ", "px;\n background: ", ";\n border-radius: ", "px;\n "])), (HEIGHT - ICON_SIZE) * 1.2, (HEIGHT - ICON_SIZE) / 2, isDarkMode ? token.colorFillSecondary : token.colorFillTertiary, HEIGHT / 2);
32
32
  var squareStylish = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border-radius: ", "px;\n "])), token.borderRadiusSM);
33
33
  return {
34
- container: cx(percentStyle, shape === 'round' ? roundStylish : squareStylish, css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n user-select: none;\n\n overflow: hidden;\n display: flex;\n flex: 0;\n gap: 4px;\n align-items: center;\n\n min-width: fit-content;\n height: ", "px;\n\n font-family: ", ";\n font-size: 13px;\n line-height: 1;\n "])), HEIGHT, token.fontFamilyCode))
34
+ container: cx(percentStyle, shape === 'round' ? roundStylish : squareStylish, css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n user-select: none;\n\n overflow: hidden;\n\n min-width: fit-content;\n height: ", "px;\n\n font-family: ", ";\n font-size: 13px;\n line-height: 1;\n "])), HEIGHT, token.fontFamilyCode))
35
35
  };
36
36
  });
package/es/index.d.ts CHANGED
@@ -36,6 +36,7 @@ export { default as FormFooter, type FormFooterProps } from './Form/components/F
36
36
  export { default as FormGroup, type FormGroupProps } from './Form/components/FormGroup';
37
37
  export { default as FormItem, type FormItemProps } from './Form/components/FormItem';
38
38
  export { default as FormTitle, type FormTitleProps } from './Form/components/FormTitle';
39
+ export { default as GaussianBackground, type GaussianBackgroundProps } from './GaussianBackground';
39
40
  export { default as Giscus, type GiscusProps } from './Giscus';
40
41
  export { default as GradientButton, type GradientButtonProps } from './GradientButton';
41
42
  export { default as GridBackground, type GridBackgroundProps } from './GridBackground';
package/es/index.js CHANGED
@@ -35,6 +35,7 @@ export { default as FormFooter } from "./Form/components/FormFooter";
35
35
  export { default as FormGroup } from "./Form/components/FormGroup";
36
36
  export { default as FormItem } from "./Form/components/FormItem";
37
37
  export { default as FormTitle } from "./Form/components/FormTitle";
38
+ export { default as GaussianBackground } from "./GaussianBackground";
38
39
  export { default as Giscus } from "./Giscus";
39
40
  export { default as GradientButton } from "./GradientButton";
40
41
  export { default as GridBackground } from "./GridBackground";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.121.0",
3
+ "version": "1.122.0",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",
@@ -144,7 +144,6 @@
144
144
  "remark": "^14",
145
145
  "remark-cli": "^11",
146
146
  "semantic-release": "^21",
147
- "styled-components": "^6",
148
147
  "stylelint": "^15",
149
148
  "typescript": "^5",
150
149
  "vitest": "latest"
@@ -1,4 +0,0 @@
1
- export declare const CommandIcon: () => import("react/jsx-runtime").JSX.Element;
2
- export declare const ControlIcon: () => import("react/jsx-runtime").JSX.Element;
3
- export declare const ShiftIcon: () => import("react/jsx-runtime").JSX.Element;
4
- export declare const AltIcon: () => import("react/jsx-runtime").JSX.Element;
@@ -1,73 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { jsxs as _jsxs } from "react/jsx-runtime";
3
- var strokeWidth = 2.2;
4
- var iconSize = '13px';
5
- export var CommandIcon = function CommandIcon() {
6
- return /*#__PURE__*/_jsx("svg", {
7
- fill: "none",
8
- height: iconSize,
9
- stroke: "currentColor",
10
- strokeLinecap: "round",
11
- strokeLinejoin: "round",
12
- strokeWidth: strokeWidth,
13
- viewBox: "0 0 24 24",
14
- width: iconSize,
15
- xmlns: "http://www.w3.org/2000/svg",
16
- children: /*#__PURE__*/_jsx("path", {
17
- d: "M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"
18
- })
19
- });
20
- };
21
- export var ControlIcon = function ControlIcon() {
22
- return /*#__PURE__*/_jsx("svg", {
23
- className: "lucide lucide-chevron-up",
24
- fill: "none",
25
- height: iconSize,
26
- stroke: "currentColor",
27
- strokeLinecap: "round",
28
- strokeLinejoin: "round",
29
- strokeWidth: strokeWidth,
30
- viewBox: "0 0 24 24",
31
- width: iconSize,
32
- xmlns: "http://www.w3.org/2000/svg",
33
- children: /*#__PURE__*/_jsx("polyline", {
34
- points: "18 15 12 9 6 15"
35
- })
36
- });
37
- };
38
- export var ShiftIcon = function ShiftIcon() {
39
- return /*#__PURE__*/_jsx("svg", {
40
- className: "lucide lucide-chevron-up",
41
- fill: "none",
42
- height: iconSize,
43
- stroke: "currentColor",
44
- strokeLinecap: "round",
45
- strokeLinejoin: "round",
46
- strokeWidth: strokeWidth,
47
- viewBox: "0 0 24 24",
48
- width: iconSize,
49
- xmlns: "http://www.w3.org/2000/svg",
50
- children: /*#__PURE__*/_jsx("path", {
51
- d: "M9 18v-6H5l7-7 7 7h-4v6H9z"
52
- })
53
- });
54
- };
55
- export var AltIcon = function AltIcon() {
56
- return /*#__PURE__*/_jsxs("svg", {
57
- className: "lucide lucide-chevron-up",
58
- fill: "none",
59
- height: iconSize,
60
- stroke: "currentColor",
61
- strokeLinecap: "round",
62
- strokeLinejoin: "round",
63
- strokeWidth: strokeWidth,
64
- viewBox: "0 0 24 24",
65
- width: iconSize,
66
- xmlns: "http://www.w3.org/2000/svg",
67
- children: [/*#__PURE__*/_jsx("path", {
68
- d: "M3 3h6l6 18h6"
69
- }), /*#__PURE__*/_jsx("path", {
70
- d: "M14 3h7"
71
- })]
72
- });
73
- };
@@ -1,12 +0,0 @@
1
- import { ReactNode } from 'react';
2
- interface MenuItemProps {
3
- active?: boolean;
4
- disabled?: boolean;
5
- icon?: ReactNode;
6
- label: ReactNode;
7
- nested?: boolean;
8
- selected?: boolean;
9
- shortcut?: string[];
10
- }
11
- declare const MenuItem: import("react").ForwardRefExoticComponent<MenuItemProps & import("react").RefAttributes<HTMLButtonElement>>;
12
- export default MenuItem;
@@ -1,73 +0,0 @@
1
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- var _excluded = ["label", "icon", "disabled", "nested", "shortcut", "active", "selected"];
4
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
- import { ChevronRightIcon } from 'lucide-react';
7
- import { forwardRef } from 'react';
8
- import { Flexbox } from 'react-layout-kit';
9
- import { AltIcon, CommandIcon, ControlIcon, ShiftIcon } from "./icons";
10
- import { useStyles } from "./style";
11
- import { jsx as _jsx } from "react/jsx-runtime";
12
- import { jsxs as _jsxs } from "react/jsx-runtime";
13
- var KEYBOARD_ICON_MAP = {
14
- alt: /*#__PURE__*/_jsx(AltIcon, {}),
15
- control: /*#__PURE__*/_jsx(ControlIcon, {}),
16
- enter: '↵',
17
- meta: /*#__PURE__*/_jsx(CommandIcon, {}),
18
- shift: /*#__PURE__*/_jsx(ShiftIcon, {})
19
- };
20
- var CODE_MAP = {
21
- alt: 'alt',
22
- cmd: 'meta',
23
- command: 'meta',
24
- control: 'control',
25
- ctl: 'control',
26
- meta: 'meta',
27
- shift: 'shift'
28
- };
29
- var MenuItem = /*#__PURE__*/forwardRef(function (_ref, reference) {
30
- var _cx;
31
- var label = _ref.label,
32
- icon = _ref.icon,
33
- disabled = _ref.disabled,
34
- nested = _ref.nested,
35
- shortcut = _ref.shortcut,
36
- active = _ref.active,
37
- selected = _ref.selected,
38
- properties = _objectWithoutProperties(_ref, _excluded);
39
- var _useStyles = useStyles(),
40
- styles = _useStyles.styles,
41
- cx = _useStyles.cx;
42
- return /*#__PURE__*/_jsxs("button", _objectSpread(_objectSpread({
43
- type: 'button'
44
- }, properties), {}, {
45
- className: cx(styles.item, (_cx = {}, _defineProperty(_cx, styles.selected, selected), _defineProperty(_cx, styles.active, active), _cx)),
46
- disabled: disabled,
47
- ref: reference,
48
- role: "menuitem",
49
- children: [/*#__PURE__*/_jsxs(Flexbox, {
50
- gap: 8,
51
- horizontal: true,
52
- children: [icon && /*#__PURE__*/_jsx("span", {
53
- children: icon
54
- }), label]
55
- }), nested ? /*#__PURE__*/_jsx("span", {
56
- "aria-hidden": true,
57
- children: /*#__PURE__*/_jsx(ChevronRightIcon, {
58
- className: styles.arrow
59
- })
60
- }) : shortcut ? /*#__PURE__*/_jsx(Flexbox, {
61
- align: 'center',
62
- horizontal: true,
63
- children: shortcut.map(function (c) {
64
- var code = CODE_MAP[c.toLowerCase()];
65
- return /*#__PURE__*/_jsx("kbd", {
66
- className: styles.kbd,
67
- children: code ? KEYBOARD_ICON_MAP[code] : c.toUpperCase()
68
- }, c);
69
- })
70
- }) : undefined]
71
- }));
72
- });
73
- export default MenuItem;
@@ -1,7 +0,0 @@
1
- export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
- active: string;
3
- arrow: import("antd-style").SerializedStyles;
4
- item: string;
5
- kbd: import("antd-style").SerializedStyles;
6
- selected: string;
7
- }>;
@@ -1,16 +0,0 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
3
- import { createStyles } from 'antd-style';
4
- export var useStyles = createStyles(function (_ref, prefixCls) {
5
- var css = _ref.css,
6
- cx = _ref.cx,
7
- token = _ref.token;
8
- var selected = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-weight: bold;\n color: ", ";\n background: ", ";\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n "])), token.colorPrimaryText, token.colorPrimaryBg, token.colorPrimaryTextHover, token.colorPrimaryBgHover);
9
- return {
10
- active: cx("".concat(prefixCls, "-item-active"), css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: ", ";\n "])), token.colorFillTertiary)),
11
- arrow: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorTextTertiary),
12
- item: cx("".concat(prefixCls, "-item"), css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n all: unset;\n\n user-select: none;\n scroll-margin: 50px;\n\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n box-sizing: inherit;\n width: 100%;\n padding: 12px 10px;\n\n font-family: ", ";\n font-weight: normal;\n line-height: 1;\n color: ", ";\n\n background: transparent;\n border-radius: 5px;\n\n &:hover {\n background: ", ";\n }\n "])), token.fontFamily, token.colorText, token.colorFillTertiary)),
13
- kbd: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n\n width: 18px;\n height: 20px;\n\n font-family: ", ";\n font-size: 14px;\n color: ", ";\n\n border-radius: 2px;\n "])), token.fontFamily, token.colorTextQuaternary),
14
- selected: cx("".concat(prefixCls, "-item-selected"), selected)
15
- };
16
- });
@@ -1,4 +0,0 @@
1
- export declare const useStyles: (props?: string | undefined) => import("antd-style").ReturnStyles<{
2
- button: string;
3
- container: string;
4
- }>;
@@ -1,12 +0,0 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2;
3
- import { createStyles } from 'antd-style';
4
- export var useStyles = createStyles(function (_ref, prefixCls) {
5
- var css = _ref.css,
6
- cx = _ref.cx,
7
- token = _ref.token;
8
- return {
9
- button: cx("".concat(prefixCls, "-button"), css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n all: unset;\n\n cursor: default;\n user-select: none;\n\n padding: 12px 10px;\n\n font-size: ", "px;\n line-height: 1;\n color: ", ";\n\n background: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n\n -webkit-tap-highlight-color: transparent;\n\n &:hover {\n background: ", ";\n border-color: transparent;\n }\n\n &:focus-visible {\n border-color: ", ";\n box-shadow: 0 0 0 2px ", ";\n }\n "])), token.fontSize, token.colorText, token.colorBgContainer, token.colorBorder, token.borderRadius, token.colorPrimaryBg, token.colorPrimary, token.colorPrimaryBg)),
10
- container: cx(prefixCls, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n user-select: none;\n scrollbar-width: none;\n\n overflow-y: auto;\n overscroll-behavior: contain;\n\n box-sizing: border-box;\n width: 200px;\n padding: 5px;\n\n font-size: ", ";\n\n background: ", ";\n border: 1px solid ", ";\n border-radius: 8px;\n outline: 0;\n box-shadow: ", ";\n\n &::-webkit-scrollbar {\n display: none;\n }\n "])), token.fontSize, token.colorBgContainer, token.colorBorder, token.boxShadowSecondary))
11
- };
12
- });
@@ -1,5 +0,0 @@
1
- import { MenuItemType } from './menuItem';
2
- export * from './menuItem';
3
- export interface MenuProps {
4
- items: MenuItemType[];
5
- }
@@ -1,2 +0,0 @@
1
- export * from "./menuItem";
2
- export {};
@@ -1,21 +0,0 @@
1
- import { ReactNode } from 'react';
2
- interface CommonType {
3
- icon?: ReactNode;
4
- key: string;
5
- label: string;
6
- onClick?: () => void;
7
- }
8
- export interface GeneralItemType extends CommonType {
9
- danger?: boolean;
10
- disabled?: boolean;
11
- shortcut?: ('meta' | 'control' | 'shift' | 'alt' | string)[];
12
- }
13
- export interface SubMenuType extends CommonType {
14
- children: MenuItemType[];
15
- }
16
- export interface MenuDividerType {
17
- dashed?: boolean;
18
- type: 'divider';
19
- }
20
- export type MenuItemType = GeneralItemType | SubMenuType | MenuDividerType;
21
- export {};
@@ -1 +0,0 @@
1
- export {};