@lobehub/ui 1.28.0 → 1.29.1

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 (66) hide show
  1. package/README.md +1 -1
  2. package/es/ActionIconGroup/index.d.ts +13 -2
  3. package/es/Avatar/index.js +9 -4
  4. package/es/Burger/index.d.ts +19 -0
  5. package/es/Burger/style.js +1 -1
  6. package/es/Chat/store/index.d.ts +0 -1
  7. package/es/Chat/store/index.js +1 -2
  8. package/es/ChatInputArea/index.d.ts +41 -0
  9. package/es/ColorScales/index.d.ts +9 -0
  10. package/es/Features/Item.d.ts +36 -2
  11. package/es/Features/index.d.ts +13 -0
  12. package/es/FluentEmoji/index.d.ts +20 -0
  13. package/es/FluentEmoji/index.js +84 -0
  14. package/es/FluentEmoji/style.d.ts +4 -0
  15. package/es/FluentEmoji/style.js +11 -0
  16. package/es/FontLoader/index.d.ts +3 -0
  17. package/es/Footer/index.d.ts +18 -4
  18. package/es/GradientButton/index.d.ts +4 -0
  19. package/es/Header/index.d.ts +27 -0
  20. package/es/Hero/index.d.ts +27 -0
  21. package/es/Input/index.d.ts +23 -4
  22. package/es/Layout/index.d.ts +31 -0
  23. package/es/Logo/index.js +9 -8
  24. package/es/Logo/style.d.ts +2 -0
  25. package/es/Logo/style.js +2 -0
  26. package/es/MessageInput/index.d.ts +15 -15
  27. package/es/MessageInput/index.js +0 -6
  28. package/es/ThemeProvider/GlobalStyle.js +1 -1
  29. package/es/ThemeProvider/index.d.ts +4 -0
  30. package/es/ThemeProvider/index.js +28 -25
  31. package/es/Toc/TocMobile.d.ts +30 -0
  32. package/es/Toc/index.d.ts +4 -0
  33. package/es/TokenTag/index.d.ts +6 -0
  34. package/es/TokenTag/index.js +5 -4
  35. package/es/TokenTag/style.d.ts +1 -1
  36. package/es/TokenTag/style.js +3 -4
  37. package/es/components/ControlInput.d.ts +12 -0
  38. package/es/hooks/useHighlight.d.ts +8 -8
  39. package/es/index.d.ts +1 -1
  40. package/es/index.js +1 -1
  41. package/es/styles/theme/base.js +1 -1
  42. package/es/utils/getEmojiByCharacter.d.ts +2 -0
  43. package/es/utils/getEmojiByCharacter.js +15 -0
  44. package/package.json +3 -2
  45. package/es/Chat/store/selectors.d.ts +0 -9
  46. package/es/Chat/store/selectors.js +0 -44
  47. package/es/Conversation/App.d.ts +0 -15
  48. package/es/Conversation/App.js +0 -43
  49. package/es/Conversation/ChatList/MessageItem/Content.d.ts +0 -8
  50. package/es/Conversation/ChatList/MessageItem/Content.js +0 -104
  51. package/es/Conversation/ChatList/MessageItem/Toolbar.d.ts +0 -10
  52. package/es/Conversation/ChatList/MessageItem/Toolbar.js +0 -91
  53. package/es/Conversation/ChatList/MessageItem/index.d.ts +0 -9
  54. package/es/Conversation/ChatList/MessageItem/index.js +0 -126
  55. package/es/Conversation/ChatList/index.d.ts +0 -14
  56. package/es/Conversation/ChatList/index.js +0 -62
  57. package/es/Conversation/InputArea/ActionBar.d.ts +0 -4
  58. package/es/Conversation/InputArea/ActionBar.js +0 -71
  59. package/es/Conversation/InputArea/index.d.ts +0 -4
  60. package/es/Conversation/InputArea/index.js +0 -99
  61. package/es/Conversation/StoreUpdater.d.ts +0 -7
  62. package/es/Conversation/StoreUpdater.js +0 -25
  63. package/es/Conversation/index.d.ts +0 -12
  64. package/es/Conversation/index.js +0 -28
  65. package/es/Logo/LogoFlat.d.ts +0 -3
  66. package/es/Logo/LogoFlat.js +0 -105
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <div align="center">
4
4
 
5
- <img width="160" src="https://npm.elemecdn.com/@lobehub/assets/logo/logo-3d.webp">
5
+ <img width="160" src="https://npm.elemecdn.com/@lobehub/assets-logo/assets/logo-3d.webp">
6
6
 
7
7
  <h1>Lobe UI</h1>
8
8
 
@@ -3,8 +3,19 @@ import { ActionIconProps } from "..";
3
3
  import { type MenuProps } from 'antd';
4
4
  import { DivProps } from "../types";
5
5
  export interface ActionIconGroupProps extends DivProps {
6
+ /**
7
+ * @description The direction of the icons
8
+ * @default "row"
9
+ */
6
10
  direction?: 'row' | 'column';
11
+ /**
12
+ * @description The menu items for the dropdown
13
+ */
7
14
  dropdownMenu?: MenuProps['items'];
15
+ /**
16
+ * @description The items to be rendered
17
+ * @default []
18
+ */
8
19
  items?: ActionIconProps[];
9
20
  /**
10
21
  * @description The position of the tooltip relative to the target
@@ -12,13 +23,13 @@ export interface ActionIconGroupProps extends DivProps {
12
23
  */
13
24
  placement?: ActionIconProps['placement'];
14
25
  /**
15
- * @description Whether add spotlight background
26
+ * @description Whether to add a spotlight background
16
27
  * @default true
17
28
  */
18
29
  spotlight?: boolean;
19
30
  /**
20
31
  * @description The type of the group
21
- * @default 'block'
32
+ * @default "block"
22
33
  */
23
34
  type?: 'ghost' | 'block' | 'pure';
24
35
  }
@@ -5,6 +5,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
5
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
6
  import { Avatar as AntAvatar } from 'antd';
7
7
  import { memo } from 'react';
8
+ import FluentEmoji from "../FluentEmoji";
9
+ import { getEmoji } from "../utils/getEmojiByCharacter";
8
10
  import { useStyles } from "./style";
9
11
  import { jsx as _jsx } from "react/jsx-runtime";
10
12
  var Avatar = /*#__PURE__*/memo(function (_ref) {
@@ -20,15 +22,15 @@ var Avatar = /*#__PURE__*/memo(function (_ref) {
20
22
  var isImage = Boolean(avatar && ['/', 'http', 'data:'].some(function (index) {
21
23
  return avatar.startsWith(index);
22
24
  }));
23
- var isEmoji = Boolean(avatar && !isImage && /\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g.test(avatar));
25
+ var emoji = avatar && !isImage && getEmoji(avatar);
24
26
  var _useStyles = useStyles({
25
27
  background: background,
26
- isEmoji: isEmoji,
28
+ isEmoji: Boolean(emoji),
27
29
  size: size
28
30
  }),
29
31
  styles = _useStyles.styles,
30
32
  cx = _useStyles.cx;
31
- var text = isImage ? title : avatar;
33
+ var text = String(isImage ? title : avatar);
32
34
  return isImage ? /*#__PURE__*/_jsx(AntAvatar, _objectSpread({
33
35
  className: cx(styles.avatar, className),
34
36
  shape: shape,
@@ -39,7 +41,10 @@ var Avatar = /*#__PURE__*/memo(function (_ref) {
39
41
  shape: shape,
40
42
  size: size
41
43
  }, props), {}, {
42
- children: isEmoji ? text : text === null || text === void 0 ? void 0 : text.toUpperCase().slice(0, 2)
44
+ children: emoji ? /*#__PURE__*/_jsx(FluentEmoji, {
45
+ emoji: emoji,
46
+ size: size
47
+ }) : text === null || text === void 0 ? void 0 : text.toUpperCase().slice(0, 2)
43
48
  }));
44
49
  });
45
50
  export default Avatar;
@@ -2,11 +2,30 @@
2
2
  import { MenuProps } from 'antd';
3
3
  import { DivProps } from "../types";
4
4
  export interface BurgerProps extends DivProps {
5
+ /**
6
+ * @description The height of the header component
7
+ * @default 64
8
+ */
5
9
  headerHeight?: number;
10
+ /**
11
+ * @description The items to be displayed in the menu
12
+ */
6
13
  items: MenuProps['items'];
14
+ /**
15
+ * @description The keys of the currently open sub-menus
16
+ */
7
17
  openKeys?: MenuProps['openKeys'];
18
+ /**
19
+ * @description Whether the menu is currently open or not
20
+ */
8
21
  opened: boolean;
22
+ /**
23
+ * @description The keys of the currently selected menu items
24
+ */
9
25
  selectedKeys?: MenuProps['selectedKeys'];
26
+ /**
27
+ * @description A callback function to set the opened state
28
+ */
10
29
  setOpened: (state: boolean) => void;
11
30
  }
12
31
  declare const Burger: import("react").NamedExoticComponent<BurgerProps>;
@@ -11,6 +11,6 @@ export var useStyles = createStyles(function (_ref, headerHeight) {
11
11
  drawer: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &.ant-drawer-content {\n background: transparent;\n }\n\n .ant-drawer-body {\n display: flex;\n flex-direction: column;\n }\n "]))),
12
12
  drawerRoot: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n top: ", "px;\n\n :focus-visible {\n outline: none;\n }\n\n .ant-drawer {\n &-mask {\n ", ";\n background-color: ", ";\n }\n\n &-content-wrapper {\n box-shadow: none;\n }\n }\n "])), headerHeight + 1, stylish.blur, rgba(token.colorBgLayout, 0.5)),
13
13
  fillRect: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex: 1;\n width: 100%;\n border-top: none;\n "]))),
14
- menu: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background: transparent;\n border-inline-end: transparent !important;\n\n > .ant-menu-item-only-child,\n .ant-menu-submenu-title {\n width: 100%;\n margin: 0 !important;\n border-top: none;\n border-radius: 0;\n\n &:active {\n color: ", ";\n background-color: ", ";\n }\n }\n\n .ant-menu-item-only-child:first-child {\n border-top: none;\n }\n\n .ant-menu-submenu-title[aria-expanded='true'] {\n a {\n font-weight: 600;\n color: ", " !important;\n }\n }\n\n .ant-menu-item-group-title {\n padding-top: 4px;\n padding-bottom: 4px;\n\n font-size: 12px;\n font-weight: 500;\n text-overflow: ellipsis;\n text-transform: uppercase;\n white-space: nowrap;\n\n background: ", ";\n }\n\n .ant-menu-item {\n width: calc(100% - 16px) !important;\n margin: 8px !important;\n border-radius: ", "px;\n\n &:hover,\n &:active {\n color: ", " !important;\n background: ", " !important;\n }\n }\n\n .ant-menu-item-active {\n width: calc(100% - 16px) !important;\n margin: 8px !important;\n background: ", ";\n border-radius: ", "px;\n }\n\n .ant-menu-item-selected {\n font-weight: 600;\n color: ", ";\n background: ", ";\n\n &:hover,\n &:active {\n color: ", " !important;\n background: ", " !important;\n }\n }\n "])), token.colorText, token.colorFill, token.colorText, token.colorFillSecondary, token.borderRadius, token.colorText, token.colorFillSecondary, token.colorFillSecondary, token.borderRadius, token.colorBgLayout, token.colorText, token.colorBgLayout, token.colorText)
14
+ menu: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background: transparent;\n border-inline-end: transparent !important;\n\n > .ant-menu-item-only-child,\n .ant-menu-submenu-title {\n width: 100%;\n margin: 0 !important;\n border-top: none;\n border-radius: 0;\n\n &:active {\n color: ", ";\n background-color: ", ";\n }\n }\n\n .ant-menu-item-only-child:first-child {\n border-top: none;\n }\n\n .ant-menu-submenu-title[aria-expanded='true'] {\n a {\n font-weight: 600;\n color: ", " !important;\n }\n }\n\n .ant-menu-item-group-title {\n padding-top: 8px;\n padding-bottom: 8px;\n\n font-size: 12px;\n font-weight: 500;\n line-height: 1;\n text-overflow: ellipsis;\n text-transform: uppercase;\n white-space: nowrap;\n\n background: ", ";\n }\n\n .ant-menu-item {\n width: calc(100% - 16px) !important;\n margin: 8px !important;\n border-radius: ", "px;\n\n &:hover,\n &:active {\n color: ", " !important;\n background: ", " !important;\n }\n }\n\n .ant-menu-item-active {\n width: calc(100% - 16px) !important;\n margin: 8px !important;\n background: ", ";\n border-radius: ", "px;\n }\n\n .ant-menu-item-selected {\n font-weight: 600;\n color: ", ";\n background: ", ";\n\n &:hover,\n &:active {\n color: ", " !important;\n background: ", " !important;\n }\n }\n "])), token.colorText, token.colorFill, token.colorText, token.colorFillSecondary, token.borderRadius, token.colorText, token.colorFillSecondary, token.colorFillSecondary, token.borderRadius, token.colorBgLayout, token.colorText, token.colorBgLayout, token.colorText)
15
15
  };
16
16
  });
@@ -16,5 +16,4 @@ export declare const Provider: ({ createStore, children }: {
16
16
  destroy: () => void;
17
17
  };
18
18
  export { type MessageDispatch, messagesReducer } from './messageReducer';
19
- export * from './selectors';
20
19
  export type { ChatStore } from './store';
@@ -12,5 +12,4 @@ var _createContext = createContext(),
12
12
  useStore = _createContext.useStore,
13
13
  useStoreApi = _createContext.useStoreApi;
14
14
  export { Provider, useStore, useStoreApi };
15
- export { messagesReducer } from "./messageReducer";
16
- export * from "./selectors";
15
+ export { messagesReducer } from "./messageReducer";
@@ -1,16 +1,57 @@
1
1
  import { ReactNode } from 'react';
2
2
  import type { DivProps } from "../types";
3
3
  export interface ChatInputAreaProps extends DivProps {
4
+ /**
5
+ * @description Actions to be displayed in the left of actions bar
6
+ */
4
7
  actions?: ReactNode;
8
+ /**
9
+ * @description Default value of the input
10
+ */
5
11
  defaultValue?: string;
12
+ /**
13
+ * @description Whether the input is disabled or not
14
+ * @default false
15
+ */
6
16
  disabled?: boolean;
17
+ /**
18
+ * @description Whether the input is expanded or not
19
+ * @default false
20
+ */
7
21
  expand?: boolean;
22
+ /**
23
+ * @description Footer to be displayed below input area
24
+ */
8
25
  footer?: ReactNode;
26
+ /**
27
+ * @description Whether the input is in loading state or not
28
+ * @default false
29
+ */
9
30
  loading?: boolean;
31
+ /**
32
+ * @description Minimum height of the input area
33
+ * @default 200
34
+ */
10
35
  minHeight?: number;
36
+ /**
37
+ * @description Callback function when the expand state changes
38
+ * @param expand - Whether the input is expanded or not
39
+ */
11
40
  onExpandChange?: (expand: boolean) => void;
41
+ /**
42
+ * @description Callback function when the input value changes
43
+ * @param value - The current value of the input
44
+ */
12
45
  onInputChange?: (value: string) => void;
46
+ /**
47
+ * @description Callback function when the send button is clicked
48
+ * @param value - The current value of the input
49
+ */
13
50
  onSend?: (value: string) => void;
51
+ /**
52
+ * @description Placeholder text of the input
53
+ * @default 'Type something to chat...'
54
+ */
14
55
  placeholder?: string;
15
56
  }
16
57
  declare const ChatInputArea: import("react").NamedExoticComponent<ChatInputAreaProps>;
@@ -1,8 +1,17 @@
1
1
  /// <reference types="react" />
2
2
  import { ColorScaleItem } from "../styles/colors";
3
3
  export interface ColorScalesProps {
4
+ /**
5
+ * @description Index of the mid highlight color in the scale
6
+ */
4
7
  midHighLight: number;
8
+ /**
9
+ * @description Name of the color scale
10
+ */
5
11
  name: string;
12
+ /**
13
+ * @description Color scale item object
14
+ */
6
15
  scale: ColorScaleItem;
7
16
  }
8
17
  declare const ColorScales: import("react").NamedExoticComponent<ColorScalesProps>;
@@ -1,17 +1,51 @@
1
- import { ImageContainerType } from 'dumi-theme-lobehub/src';
2
1
  import { CSSProperties } from 'react';
3
2
  import type { DivProps } from "../types";
4
3
  export interface FeatureItem {
4
+ /**
5
+ * @description The number of columns the item spans.
6
+ */
5
7
  column?: number;
8
+ /**
9
+ * @description The description of the feature item.
10
+ */
6
11
  description?: string;
12
+ /**
13
+ * @description Whether this item is a hero item.
14
+ */
7
15
  hero?: boolean;
16
+ /**
17
+ * @description The name of the icon to display on the feature item.
18
+ */
8
19
  icon?: string;
20
+ /**
21
+ * @description The URL of the image to display on the feature item.
22
+ */
9
23
  image?: string;
24
+ /**
25
+ * @description The CSS style of the image to display on the feature item.
26
+ */
10
27
  imageStyle?: CSSProperties;
11
- imageType?: ImageContainerType;
28
+ /**
29
+ * @description The type of the image to display on the feature item.
30
+ * @default 'normal'
31
+ */
32
+ imageType?: 'light' | 'primary' | 'soon';
33
+ /**
34
+ * @description The link to navigate to when clicking on the feature item.
35
+ */
12
36
  link?: string;
37
+ /**
38
+ * @description Whether to open the link in a new tab when clicking on the feature item.
39
+ * @default false
40
+ */
13
41
  openExternal?: boolean;
42
+ /**
43
+ * @description The number of rows the item spans.
44
+ */
14
45
  row?: number;
46
+ /**
47
+ * @description The title of the feature item.
48
+ */
15
49
  title: string;
16
50
  }
17
51
  export interface FeatureItemProps extends FeatureItem, DivProps {
@@ -3,9 +3,22 @@ import { DivProps } from "../types";
3
3
  import { type FeatureItem } from './Item';
4
4
  export type { FeatureItem } from './Item';
5
5
  export interface FeaturesProps extends DivProps {
6
+ /**
7
+ * @description The maximum width of the content
8
+ * @default 960
9
+ */
6
10
  contentMaxWidth?: number;
11
+ /**
12
+ * @description The class name of the item
13
+ */
7
14
  itemClassName?: string;
15
+ /**
16
+ * @description The style of the item
17
+ */
8
18
  itemStyle?: CSSProperties;
19
+ /**
20
+ * @description The array of feature items
21
+ */
9
22
  items: FeatureItem[];
10
23
  }
11
24
  declare const Features: import("react").NamedExoticComponent<FeaturesProps>;
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import { DivProps } from "../types";
3
+ export interface FluentEmojiProps extends DivProps {
4
+ /**
5
+ * @description The emoji character to be rendered
6
+ */
7
+ emoji: string;
8
+ /**
9
+ * @description Size of the emoji
10
+ * @default 40
11
+ */
12
+ size?: number;
13
+ /**
14
+ * @description The type of the FluentUI emoji set to be used
15
+ * @default 'modern'
16
+ */
17
+ type?: 'modern' | 'flat' | 'high-contrast';
18
+ }
19
+ declare const FluentEmoji: import("react").NamedExoticComponent<FluentEmojiProps>;
20
+ export default FluentEmoji;
@@ -0,0 +1,84 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
+ var _excluded = ["emoji", "className", "style", "type", "size"];
5
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
7
+ import { kebabCase } from 'lodash-es';
8
+ import { Loader2 } from 'lucide-react';
9
+ import { memo, useEffect, useMemo, useState } from 'react';
10
+ import Icon from "../Icon";
11
+ import { getEmojiNameByCharacter } from "../utils/getEmojiByCharacter";
12
+ import { useStyles } from "./style";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { jsxs as _jsxs } from "react/jsx-runtime";
15
+ var FluentEmoji = /*#__PURE__*/memo(function (_ref) {
16
+ var emoji = _ref.emoji,
17
+ className = _ref.className,
18
+ style = _ref.style,
19
+ _ref$type = _ref.type,
20
+ type = _ref$type === void 0 ? 'modern' : _ref$type,
21
+ _ref$size = _ref.size,
22
+ size = _ref$size === void 0 ? 40 : _ref$size,
23
+ props = _objectWithoutProperties(_ref, _excluded);
24
+ var _useState = useState(true),
25
+ _useState2 = _slicedToArray(_useState, 2),
26
+ loading = _useState2[0],
27
+ setLoading = _useState2[1];
28
+ var _useState3 = useState(false),
29
+ _useState4 = _slicedToArray(_useState3, 2),
30
+ loadingFail = _useState4[0],
31
+ setLoadingFail = _useState4[1];
32
+ var _useStyles = useStyles(),
33
+ cx = _useStyles.cx,
34
+ styles = _useStyles.styles;
35
+ useEffect(function () {
36
+ setLoading(true);
37
+ }, [emoji]);
38
+ var emojiName = useMemo(function () {
39
+ return getEmojiNameByCharacter(emoji);
40
+ }, [emoji]);
41
+ if (!emojiName || loadingFail) return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
42
+ className: cx(styles.container, className),
43
+ style: _objectSpread({
44
+ fontSize: size,
45
+ height: size,
46
+ width: size
47
+ }, style)
48
+ }, props), {}, {
49
+ children: emoji
50
+ }));
51
+ return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
52
+ className: cx(styles.container, className),
53
+ style: _objectSpread({
54
+ height: size,
55
+ width: size
56
+ }, style)
57
+ }, props), {}, {
58
+ children: [loading && /*#__PURE__*/_jsx("div", {
59
+ className: styles.loading,
60
+ children: /*#__PURE__*/_jsx(Icon, {
61
+ icon: Loader2,
62
+ size: {
63
+ fontSize: size * 0.75
64
+ },
65
+ spin: true
66
+ })
67
+ }), /*#__PURE__*/_jsx("img", {
68
+ alt: emojiName,
69
+ height: "100%",
70
+ onError: function onError() {
71
+ return setLoadingFail(true);
72
+ },
73
+ onLoad: function onLoad() {
74
+ return setLoading(false);
75
+ },
76
+ src: "https://npm.elemecdn.com/fluentui-emoji/icons/".concat(type, "/").concat(kebabCase(emojiName), ".svg"),
77
+ style: {
78
+ opacity: loading ? 0 : 1
79
+ },
80
+ width: "100%"
81
+ })]
82
+ }));
83
+ });
84
+ export default FluentEmoji;
@@ -0,0 +1,4 @@
1
+ export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
+ container: import("antd-style").SerializedStyles;
3
+ loading: import("antd-style").SerializedStyles;
4
+ }>;
@@ -0,0 +1,11 @@
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) {
5
+ var css = _ref.css,
6
+ token = _ref.token;
7
+ return {
8
+ container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n line-height: 1;\n text-align: center;\n "]))),
9
+ loading: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n inset: 0;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n width: 100%;\n height: 100%;\n\n color: ", ";\n "])), token.colorText)
10
+ };
11
+ });
@@ -1,5 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  export interface FontLoaderProps {
3
+ /**
4
+ * @description The URL of the font to load
5
+ */
3
6
  url: string;
4
7
  }
5
8
  declare const FontLoader: import("react").NamedExoticComponent<FontLoaderProps>;
@@ -1,10 +1,24 @@
1
- /// <reference types="react" />
2
- import { FooterProps as RcProps } from 'rc-footer';
1
+ import { type FooterProps as RcProps } from 'rc-footer';
2
+ import { type ReactNode } from 'react';
3
3
  export interface FooterProps {
4
- bottom?: RcProps['bottom'];
4
+ /**
5
+ * @description The bottom content of the footer
6
+ */
7
+ bottom?: ReactNode;
8
+ /**
9
+ * @description The columns of the footer
10
+ */
5
11
  columns: RcProps['columns'];
12
+ /**
13
+ * @description The maximum width of the content in the footer
14
+ * @type number
15
+ * @default 960
16
+ */
6
17
  contentMaxWidth?: number;
7
- theme?: RcProps['theme'];
18
+ /**
19
+ * @description The theme of the footer
20
+ */
21
+ theme?: 'light' | 'dark';
8
22
  }
9
23
  declare const Footer: import("react").NamedExoticComponent<FooterProps>;
10
24
  export default Footer;
@@ -1,6 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { ButtonProps } from 'antd';
3
3
  export interface GradientButtonProps extends ButtonProps {
4
+ /**
5
+ * @description Whether the button should spin or not
6
+ * @default false
7
+ */
4
8
  spin?: boolean;
5
9
  }
6
10
  declare const GradientButton: import("react").NamedExoticComponent<GradientButtonProps>;
@@ -1,14 +1,41 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
2
  import { DivProps } from "../types";
3
3
  export interface HeaderProps extends DivProps {
4
+ /**
5
+ * @description Actions to be displayed on the right side of the header
6
+ */
4
7
  actions?: ReactNode;
8
+ /**
9
+ * @description Class name for actions container
10
+ */
5
11
  actionsClassName?: string;
12
+ /**
13
+ * @description Style for actions container
14
+ */
6
15
  actionsStyle?: CSSProperties;
16
+ /**
17
+ * @description Logo to be displayed on the left side of the header
18
+ */
7
19
  logo?: ReactNode;
20
+ /**
21
+ * @description Class name for logo container
22
+ */
8
23
  logoClassName?: string;
24
+ /**
25
+ * @description Style for logo container
26
+ */
9
27
  logoStyle?: CSSProperties;
28
+ /**
29
+ * @description Navigation to be displayed on the right side of the logo
30
+ */
10
31
  nav?: ReactNode;
32
+ /**
33
+ * @description Class name for navigation container
34
+ */
11
35
  navClassName?: string;
36
+ /**
37
+ * @description Style for navigation container
38
+ */
12
39
  navStyle?: CSSProperties;
13
40
  }
14
41
  declare const Header: import("react").NamedExoticComponent<HeaderProps>;
@@ -1,14 +1,41 @@
1
1
  /// <reference types="react" />
2
2
  export interface HeroAction {
3
+ /**
4
+ * @description Icon name from LucideIcon package
5
+ */
3
6
  icon?: string;
7
+ /**
8
+ * @description Link to be redirected to on button click
9
+ */
4
10
  link: string;
11
+ /**
12
+ * @description Whether to open the link in a new tab
13
+ * @default false
14
+ */
5
15
  openExternal?: boolean;
16
+ /**
17
+ * @description Text to be displayed on the button
18
+ */
6
19
  text: string;
20
+ /**
21
+ * @description Type of button
22
+ * @default 'default'
23
+ */
7
24
  type?: 'primary' | 'default';
8
25
  }
9
26
  export interface HeroProps {
27
+ /**
28
+ * @description Array of action buttons to be displayed
29
+ * @default []
30
+ */
10
31
  actions?: HeroAction[];
32
+ /**
33
+ * @description Short description to be displayed
34
+ */
11
35
  description?: string;
36
+ /**
37
+ * @description Title to be displayed
38
+ */
12
39
  title?: string;
13
40
  }
14
41
  declare const Hero: import("react").NamedExoticComponent<HeroProps>;
@@ -1,14 +1,33 @@
1
- /// <reference types="react" />
2
- import { InputProps as AntdInputProps } from 'antd';
1
+ import { type InputProps as AntdInputProps, type InputRef } from 'antd';
3
2
  import { TextAreaProps as AntdTextAreaProps } from 'antd/es/input/TextArea';
3
+ import { type Ref } from 'react';
4
4
  export interface InputProps extends AntdInputProps {
5
- ref?: any;
5
+ /**
6
+ * @description Ref of the component
7
+ */
8
+ ref?: Ref<InputRef>;
9
+ /**
10
+ * @description Type of the input
11
+ * @default 'ghost'
12
+ */
6
13
  type?: 'ghost' | 'block' | 'pure';
7
14
  }
8
15
  export declare const Input: import("react").NamedExoticComponent<InputProps>;
9
16
  export interface TextAreaProps extends AntdTextAreaProps {
10
- ref?: any;
17
+ /**
18
+ * @description Ref of the component
19
+ * @default undefined
20
+ */
21
+ ref?: Ref<InputRef>;
22
+ /**
23
+ * @description Whether to enable resizing of the textarea
24
+ * @default true
25
+ */
11
26
  resize?: boolean;
27
+ /**
28
+ * @description Type of the textarea
29
+ * @default 'ghost'
30
+ */
12
31
  type?: 'ghost' | 'block' | 'pure';
13
32
  }
14
33
  export declare const TextArea: import("react").NamedExoticComponent<TextAreaProps>;
@@ -21,15 +21,46 @@ export declare const LayoutToc: import("react").NamedExoticComponent<LayoutTocPr
21
21
  export declare type LayoutFooterProps = DivProps;
22
22
  export declare const LayoutFooter: import("react").NamedExoticComponent<DivProps>;
23
23
  export interface LayoutProps {
24
+ /**
25
+ * @description Width of the sidebar
26
+ */
24
27
  asideWidth?: number;
28
+ /**
29
+ * @description Children of the layout
30
+ */
25
31
  children?: ReactNode;
32
+ /**
33
+ * @description Content of the layout
34
+ */
26
35
  content?: ReactNode;
36
+ /**
37
+ * @description Footer of the layout
38
+ */
27
39
  footer?: ReactNode;
40
+ /**
41
+ * @description Header of the layout
42
+ */
28
43
  header?: ReactNode;
44
+ /**
45
+ * @description Height of the header
46
+ * @default 64
47
+ */
29
48
  headerHeight?: number;
49
+ /**
50
+ * @description Helmet of the layout
51
+ */
30
52
  helmet?: ReactNode;
53
+ /**
54
+ * @description Sidebar of the layout
55
+ */
31
56
  sidebar?: ReactNode;
57
+ /**
58
+ * @description Table of contents of the layout
59
+ */
32
60
  toc?: ReactNode;
61
+ /**
62
+ * @description Width of the table of contents
63
+ */
33
64
  tocWidth?: number;
34
65
  }
35
66
  declare const Layout: import("react").NamedExoticComponent<LayoutProps>;