@lobehub/ui 1.157.1 → 1.158.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 (158) hide show
  1. package/es/A/index.js +2 -2
  2. package/es/ActionIcon/index.js +11 -15
  3. package/es/ActionIconGroup/index.js +45 -47
  4. package/es/Alert/index.js +43 -50
  5. package/es/Avatar/index.js +10 -12
  6. package/es/Burger/index.js +30 -35
  7. package/es/CodeEditor/index.js +38 -41
  8. package/es/Collapse/index.js +3 -3
  9. package/es/ColorScales/ScaleRow.js +39 -43
  10. package/es/ColorScales/index.js +57 -59
  11. package/es/ConfigProvider/index.js +3 -5
  12. package/es/ContextMenu/index.js +2 -3
  13. package/es/CopyButton/index.js +3 -4
  14. package/es/DraggablePanel/components/DraggablePanelBody.js +2 -3
  15. package/es/DraggablePanel/components/DraggablePanelContainer.js +2 -3
  16. package/es/DraggablePanel/components/DraggablePanelFooter.js +2 -3
  17. package/es/DraggablePanel/components/DraggablePanelHeader.js +5 -9
  18. package/es/DraggablePanel/index.js +28 -35
  19. package/es/EditableText/index.js +13 -16
  20. package/es/EmojiPicker/AvatarUploader.js +60 -71
  21. package/es/EmojiPicker/index.js +101 -110
  22. package/es/EmptyCard/index.js +23 -31
  23. package/es/FileTypeIcon/index.js +44 -55
  24. package/es/FluentEmoji/index.js +4 -6
  25. package/es/Footer/index.js +8 -10
  26. package/es/Form/components/FormDivider.js +2 -2
  27. package/es/Form/components/FormFlatGroup.js +4 -9
  28. package/es/Form/components/FormFooter.js +3 -6
  29. package/es/Form/components/FormGroup.js +15 -21
  30. package/es/Form/components/FormItem.js +10 -17
  31. package/es/Form/components/FormTitle.js +15 -23
  32. package/es/Form/index.js +26 -30
  33. package/es/FormModal/index.js +30 -34
  34. package/es/Grid/index.js +3 -6
  35. package/es/Header/index.js +49 -65
  36. package/es/Highlighter/FullFeatured.js +41 -51
  37. package/es/Highlighter/SyntaxHighlighter/index.js +19 -30
  38. package/es/Highlighter/index.js +19 -29
  39. package/es/Icon/icons/DiscordIcon.js +2 -3
  40. package/es/Icon/index.js +13 -16
  41. package/es/Image/ImageGallery.js +3 -5
  42. package/es/Image/Preview.js +5 -6
  43. package/es/Image/index.js +34 -38
  44. package/es/Image/usePreview.js +33 -37
  45. package/es/Img/index.js +2 -2
  46. package/es/Input/index.js +3 -3
  47. package/es/Layout/index.js +35 -63
  48. package/es/List/ListItem/index.js +53 -67
  49. package/es/Markdown/CodeBlock.js +10 -16
  50. package/es/Markdown/Typography.js +3 -6
  51. package/es/Markdown/index.js +18 -22
  52. package/es/MaterialFileTypeIcon/index.js +17 -20
  53. package/es/MaterialFileTypeIcon/utils.d.ts +2 -2
  54. package/es/Mermaid/FullFeatured.js +35 -45
  55. package/es/Mermaid/index.js +17 -26
  56. package/es/Mermaid/useMermaid.d.ts +2 -1
  57. package/es/Mermaid/useMermaid.js +3 -5
  58. package/es/Modal/index.js +48 -60
  59. package/es/SearchBar/index.js +48 -52
  60. package/es/SelectWithImg/index.js +34 -40
  61. package/es/SideNav/index.js +15 -22
  62. package/es/SliderWithInput/index.js +35 -38
  63. package/es/Snippet/index.js +10 -15
  64. package/es/SortableList/DragHandle.js +3 -3
  65. package/es/SortableList/SortableItem.js +16 -19
  66. package/es/SortableList/SortableOverlay.js +3 -5
  67. package/es/SortableList/index.js +15 -23
  68. package/es/Swatches/index.js +18 -20
  69. package/es/TabsNav/index.js +2 -3
  70. package/es/Tag/index.js +7 -12
  71. package/es/ThemeProvider/Meta.js +53 -58
  72. package/es/ThemeProvider/index.js +17 -23
  73. package/es/ThemeSwitch/index.js +15 -19
  74. package/es/Toc/TocMobile.js +47 -52
  75. package/es/Toc/index.js +8 -13
  76. package/es/Tooltip/index.js +2 -3
  77. package/es/Video/index.js +41 -47
  78. package/es/awesome/AuroraBackground/index.js +11 -18
  79. package/es/awesome/Features/Item.js +37 -45
  80. package/es/awesome/Features/index.js +5 -4
  81. package/es/awesome/GaussianBackground/index.js +8 -13
  82. package/es/awesome/GaussianBackground/useGaussianBackground.d.ts +1 -1
  83. package/es/awesome/GaussianBackground/useGaussianBackground.js +1 -1
  84. package/es/awesome/Giscus/index.js +13 -15
  85. package/es/awesome/GradientButton/index.js +5 -9
  86. package/es/awesome/GridBackground/Grid.js +49 -61
  87. package/es/awesome/GridBackground/GridShowcase.js +24 -28
  88. package/es/awesome/GridBackground/index.js +27 -33
  89. package/es/awesome/Hero/index.js +63 -74
  90. package/es/awesome/Spline/ParentSize.js +7 -8
  91. package/es/awesome/Spline/index.js +10 -13
  92. package/es/awesome/Spotlight/index.js +3 -4
  93. package/es/awesome/SpotlightCard/SpotlightCardItem.js +5 -8
  94. package/es/awesome/SpotlightCard/index.js +9 -12
  95. package/es/brand/BrandLoading/index.js +2 -3
  96. package/es/brand/LobeChat/index.js +29 -38
  97. package/es/brand/LobeChatText/index.js +8 -13
  98. package/es/brand/LobeHub/index.js +29 -38
  99. package/es/brand/LobeHubText/index.js +4 -9
  100. package/es/brand/Logo3d/index.js +2 -3
  101. package/es/brand/LogoFlat/index.js +44 -49
  102. package/es/brand/LogoMono/index.js +48 -53
  103. package/es/brand/LogoThree/Loading.js +9 -11
  104. package/es/brand/LogoThree/LogoSpline.js +10 -12
  105. package/es/brand/LogoThree/index.js +23 -25
  106. package/es/brand/components/Divider.js +4 -6
  107. package/es/chat/BackBottom/index.js +4 -6
  108. package/es/chat/ChatHeader/ChatHeaderTitle.js +22 -31
  109. package/es/chat/ChatHeader/index.js +35 -42
  110. package/es/chat/ChatInputArea/ChatInputActionBar.js +16 -21
  111. package/es/chat/ChatInputArea/ChatInputArea.d.ts +1 -1
  112. package/es/chat/ChatInputArea/ChatInputArea.js +19 -23
  113. package/es/chat/ChatInputArea/ChatInputAreaInner.d.ts +1 -1
  114. package/es/chat/ChatInputArea/ChatInputAreaInner.js +2 -3
  115. package/es/chat/ChatInputArea/SendButton.js +36 -51
  116. package/es/chat/ChatItem/components/Actions.js +3 -5
  117. package/es/chat/ChatItem/components/Avatar.js +17 -21
  118. package/es/chat/ChatItem/components/BorderSpacing.js +1 -2
  119. package/es/chat/ChatItem/components/ErrorContent.js +9 -11
  120. package/es/chat/ChatItem/components/Loading.js +10 -12
  121. package/es/chat/ChatItem/components/MessageContent.js +6 -10
  122. package/es/chat/ChatItem/components/Title.js +3 -8
  123. package/es/chat/ChatItem/index.js +47 -53
  124. package/es/chat/ChatList/ActionsBar.js +2 -3
  125. package/es/chat/ChatList/HistoryDivider.js +6 -11
  126. package/es/chat/ChatList/Item.js +14 -12
  127. package/es/chat/ChatList/index.js +25 -29
  128. package/es/chat/EditableMessage/index.js +26 -32
  129. package/es/chat/EditableMessageList/index.js +72 -76
  130. package/es/chat/MessageInput/index.js +35 -43
  131. package/es/chat/MessageModal/index.js +41 -51
  132. package/es/chat/TokenTag/index.js +7 -11
  133. package/es/components/ControlInput.js +18 -22
  134. package/es/hooks/useHighlight.d.ts +1 -1
  135. package/es/hooks/useHighlight.js +1 -1
  136. package/es/mdx/Callout/index.js +13 -19
  137. package/es/mdx/Cards/Card.js +46 -59
  138. package/es/mdx/Cards/index.js +3 -6
  139. package/es/mdx/FileTree/File.js +5 -11
  140. package/es/mdx/FileTree/Folder.js +13 -22
  141. package/es/mdx/FileTree/index.js +3 -6
  142. package/es/mdx/Mdx/index.js +7 -9
  143. package/es/mdx/Steps/index.js +3 -6
  144. package/es/mdx/Tabs/Tab.js +3 -8
  145. package/es/mdx/Tabs/index.js +17 -21
  146. package/es/mdx/mdxComponents/CodeBlock.js +9 -14
  147. package/es/mdx/mdxComponents/Image.js +2 -2
  148. package/es/mdx/mdxComponents/Link.js +2 -3
  149. package/es/mdx/mdxComponents/Pre.js +7 -14
  150. package/es/mdx/mdxComponents/Video.js +2 -2
  151. package/es/mobile/MobileChatInputArea/SendButton.js +3 -4
  152. package/es/mobile/MobileChatInputArea/index.js +69 -79
  153. package/es/mobile/MobileNavBar/MobileNavBarTitle.js +26 -37
  154. package/es/mobile/MobileNavBar/index.js +41 -48
  155. package/es/mobile/MobileSafeArea/index.js +2 -3
  156. package/es/mobile/MobileTabBar/index.js +29 -35
  157. package/es/storybook/StoryBook/index.js +19 -26
  158. package/package.json +43 -46
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
5
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
6
  var _excluded = ["defaultValue", "spotlight", "className", "value", "onInputChange", "placeholder", "enableShortKey", "shortKey", "onSearch", "loading", "style", "onChange", "onBlur", "onPressEnter", "onFocus", "styles", "classNames"];
@@ -12,8 +12,6 @@ import { Input } from "../Input";
12
12
  import Tag from "../Tag";
13
13
  import Spotlight from "../awesome/Spotlight";
14
14
  import { useStyles } from "./style";
15
- import { jsx as _jsx } from "react/jsx-runtime";
16
- import { jsxs as _jsxs } from "react/jsx-runtime";
17
15
  var SearchBar = /*#__PURE__*/memo(function (_ref) {
18
16
  var defaultValue = _ref.defaultValue,
19
17
  spotlight = _ref.spotlight,
@@ -59,7 +57,7 @@ var SearchBar = /*#__PURE__*/memo(function (_ref) {
59
57
  var _useStyles = useStyles(),
60
58
  styles = _useStyles.styles,
61
59
  cx = _useStyles.cx;
62
- var inputReference = useRef();
60
+ var inputReference = useRef(null);
63
61
  useEffect(function () {
64
62
  var _navigator;
65
63
  if (!enableShortKey) return;
@@ -79,55 +77,53 @@ var SearchBar = /*#__PURE__*/memo(function (_ref) {
79
77
  return document.removeEventListener('keydown', handler);
80
78
  };
81
79
  }, []);
82
- return /*#__PURE__*/_jsxs("div", {
80
+ return /*#__PURE__*/React.createElement("div", {
83
81
  className: cx(styles.search, className),
84
- style: style,
85
- children: [spotlight && /*#__PURE__*/_jsx(Spotlight, {}), /*#__PURE__*/_jsx(Input, _objectSpread({
86
- allowClear: true,
87
- className: cx(styles.input, inputClassName),
88
- onBlur: function onBlur(e) {
89
- _onBlur === null || _onBlur === void 0 || _onBlur(e);
90
- setInputValue(e.target.value);
91
- if (!e.target.value) {
92
- setShowTag(true);
93
- }
94
- },
95
- onChange: function onChange(e) {
96
- _onChange === null || _onChange === void 0 || _onChange(e);
97
- setInputValue(e.target.value);
98
- if (e.target.value) {
99
- setShowTag(false);
100
- } else {
101
- setShowTag(true);
102
- onSearch === null || onSearch === void 0 || onSearch(e.target.value);
103
- }
104
- },
105
- onFocus: function onFocus(e) {
106
- _onFocus === null || _onFocus === void 0 || _onFocus(e);
82
+ style: style
83
+ }, spotlight && /*#__PURE__*/React.createElement(Spotlight, null), /*#__PURE__*/React.createElement(Input, _extends({
84
+ allowClear: true,
85
+ className: cx(styles.input, inputClassName),
86
+ onBlur: function onBlur(e) {
87
+ _onBlur === null || _onBlur === void 0 || _onBlur(e);
88
+ setInputValue(e.target.value);
89
+ if (!e.target.value) {
90
+ setShowTag(true);
91
+ }
92
+ },
93
+ onChange: function onChange(e) {
94
+ _onChange === null || _onChange === void 0 || _onChange(e);
95
+ setInputValue(e.target.value);
96
+ if (e.target.value) {
107
97
  setShowTag(false);
108
- },
109
- onPressEnter: function onPressEnter(e) {
110
- _onPressEnter === null || _onPressEnter === void 0 || _onPressEnter(e);
111
- onSearch === null || onSearch === void 0 || onSearch(inputValue);
112
- },
113
- placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : 'Type keywords...',
114
- prefix: /*#__PURE__*/_jsx(Icon, {
115
- className: styles.icon,
116
- icon: loading ? LucideLoader2 : Search,
117
- size: "small",
118
- spin: loading,
119
- style: {
120
- marginRight: 4
121
- }
122
- }),
123
- ref: inputReference,
124
- style: inputStyle,
125
- value: value
126
- }, rest)), enableShortKey && showTag && !inputValue && /*#__PURE__*/_jsxs(Tag, {
127
- className: cx(styles.tag, shortKeyClassName),
128
- style: shortKeyStyle,
129
- children: [symbol, " ", shortKey.toUpperCase()]
130
- })]
131
- });
98
+ } else {
99
+ setShowTag(true);
100
+ onSearch === null || onSearch === void 0 || onSearch(e.target.value);
101
+ }
102
+ },
103
+ onFocus: function onFocus(e) {
104
+ _onFocus === null || _onFocus === void 0 || _onFocus(e);
105
+ setShowTag(false);
106
+ },
107
+ onPressEnter: function onPressEnter(e) {
108
+ _onPressEnter === null || _onPressEnter === void 0 || _onPressEnter(e);
109
+ onSearch === null || onSearch === void 0 || onSearch(inputValue);
110
+ },
111
+ placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : 'Type keywords...',
112
+ prefix: /*#__PURE__*/React.createElement(Icon, {
113
+ className: styles.icon,
114
+ icon: loading ? LucideLoader2 : Search,
115
+ size: "small",
116
+ spin: loading,
117
+ style: {
118
+ marginRight: 4
119
+ }
120
+ }),
121
+ ref: inputReference,
122
+ style: inputStyle,
123
+ value: value
124
+ }, rest)), enableShortKey && showTag && !inputValue && /*#__PURE__*/React.createElement(Tag, {
125
+ className: cx(styles.tag, shortKeyClassName),
126
+ style: shortKeyStyle
127
+ }, symbol, " ", shortKey.toUpperCase()));
132
128
  });
133
129
  export default SearchBar;
@@ -8,8 +8,6 @@ import useControlledState from 'use-merge-value';
8
8
  import Icon from "../Icon";
9
9
  import Img from "../Img";
10
10
  import { useStyles } from "./styles";
11
- import { jsx as _jsx } from "react/jsx-runtime";
12
- import { jsxs as _jsxs } from "react/jsx-runtime";
13
11
  var SelectWithImg = /*#__PURE__*/memo(function (_ref) {
14
12
  var className = _ref.className,
15
13
  style = _ref.style,
@@ -37,46 +35,42 @@ var SelectWithImg = /*#__PURE__*/memo(function (_ref) {
37
35
  var _useStyles = useStyles(),
38
36
  styles = _useStyles.styles,
39
37
  cx = _useStyles.cx;
40
- return /*#__PURE__*/_jsx(Flexbox, {
38
+ return /*#__PURE__*/React.createElement(Flexbox, {
41
39
  className: className,
42
40
  gap: 16,
43
41
  horizontal: true,
44
- style: style,
45
- children: options === null || options === void 0 ? void 0 : options.map(function (item) {
46
- var isActive = item.value === currentValue;
47
- return /*#__PURE__*/_jsxs(Flexbox, {
48
- align: 'center',
49
- className: cx(styles.container, isActive && styles.active),
50
- gap: 4,
51
- onClick: function onClick() {
52
- return setCurrentValue(item.value);
53
- },
54
- children: [/*#__PURE__*/_jsx("div", {
55
- className: cx(styles.imgCtn, isActive && styles.imgActive, classNames.img),
56
- style: _objectSpread(_objectSpread({}, outStyles.img), {}, {
57
- height: height,
58
- width: width
59
- }),
60
- children: /*#__PURE__*/_jsx("div", {
61
- className: styles.img,
62
- children: /*#__PURE__*/_jsx(Img, {
63
- alt: typeof item.label === 'string' ? item.label : item.ariaLabel,
64
- height: height,
65
- src: item.img,
66
- unoptimized: unoptimized,
67
- width: width
68
- })
69
- })
70
- }), /*#__PURE__*/_jsxs(Flexbox, {
71
- align: 'center',
72
- gap: 4,
73
- horizontal: true,
74
- children: [item.icon && /*#__PURE__*/_jsx(Icon, {
75
- icon: item.icon
76
- }), item.label]
77
- })]
78
- }, item.value);
79
- })
80
- });
42
+ style: style
43
+ }, options === null || options === void 0 ? void 0 : options.map(function (item) {
44
+ var isActive = item.value === currentValue;
45
+ return /*#__PURE__*/React.createElement(Flexbox, {
46
+ align: 'center',
47
+ className: cx(styles.container, isActive && styles.active),
48
+ gap: 4,
49
+ key: item.value,
50
+ onClick: function onClick() {
51
+ return setCurrentValue(item.value);
52
+ }
53
+ }, /*#__PURE__*/React.createElement("div", {
54
+ className: cx(styles.imgCtn, isActive && styles.imgActive, classNames.img),
55
+ style: _objectSpread(_objectSpread({}, outStyles.img), {}, {
56
+ height: height,
57
+ width: width
58
+ })
59
+ }, /*#__PURE__*/React.createElement("div", {
60
+ className: styles.img
61
+ }, /*#__PURE__*/React.createElement(Img, {
62
+ alt: typeof item.label === 'string' ? item.label : item.ariaLabel,
63
+ height: height,
64
+ src: item.img,
65
+ unoptimized: unoptimized,
66
+ width: width
67
+ }))), /*#__PURE__*/React.createElement(Flexbox, {
68
+ align: 'center',
69
+ gap: 4,
70
+ horizontal: true
71
+ }, item.icon && /*#__PURE__*/React.createElement(Icon, {
72
+ icon: item.icon
73
+ }), item.label));
74
+ }));
81
75
  });
82
76
  export default SelectWithImg;
@@ -1,13 +1,11 @@
1
1
  'use client';
2
2
 
3
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  var _excluded = ["className", "avatar", "topActions", "bottomActions"];
6
6
  import { memo } from 'react';
7
7
  import { Flexbox } from 'react-layout-kit';
8
8
  import { useStyles } from "./style";
9
- import { jsx as _jsx } from "react/jsx-runtime";
10
- import { jsxs as _jsxs } from "react/jsx-runtime";
11
9
  var SideNav = /*#__PURE__*/memo(function (_ref) {
12
10
  var className = _ref.className,
13
11
  avatar = _ref.avatar,
@@ -17,28 +15,23 @@ var SideNav = /*#__PURE__*/memo(function (_ref) {
17
15
  var _useStyles = useStyles(),
18
16
  styles = _useStyles.styles,
19
17
  cx = _useStyles.cx;
20
- return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
18
+ return /*#__PURE__*/React.createElement(Flexbox, _extends({
21
19
  align: 'center',
22
20
  className: cx(styles, className),
23
21
  flex: 'none',
24
22
  justify: 'space-between'
25
- }, rest), {}, {
26
- children: [/*#__PURE__*/_jsxs(Flexbox, {
27
- align: "center",
28
- direction: "vertical",
29
- gap: 16,
30
- children: [avatar, /*#__PURE__*/_jsx(Flexbox, {
31
- align: "center",
32
- direction: "vertical",
33
- gap: 8,
34
- children: topActions
35
- })]
36
- }), /*#__PURE__*/_jsx(Flexbox, {
37
- align: "center",
38
- direction: "vertical",
39
- gap: 4,
40
- children: bottomActions
41
- })]
42
- }));
23
+ }, rest), /*#__PURE__*/React.createElement(Flexbox, {
24
+ align: "center",
25
+ direction: "vertical",
26
+ gap: 16
27
+ }, avatar, /*#__PURE__*/React.createElement(Flexbox, {
28
+ align: "center",
29
+ direction: "vertical",
30
+ gap: 8
31
+ }, topActions)), /*#__PURE__*/React.createElement(Flexbox, {
32
+ align: "center",
33
+ direction: "vertical",
34
+ gap: 4
35
+ }, bottomActions));
43
36
  });
44
37
  export default SideNav;
@@ -1,14 +1,12 @@
1
1
  'use client';
2
2
 
3
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  var _excluded = ["step", "value", "onChange", "max", "min", "defaultValue", "size", "controls", "gap", "style", "className", "disabled"];
6
6
  import { InputNumber, Slider } from 'antd';
7
7
  import { isNull } from 'lodash-es';
8
8
  import { memo, useCallback } from 'react';
9
9
  import { Flexbox } from 'react-layout-kit';
10
- import { jsx as _jsx } from "react/jsx-runtime";
11
- import { jsxs as _jsxs } from "react/jsx-runtime";
12
10
  var SliderWithInput = /*#__PURE__*/memo(function (_ref) {
13
11
  var step = _ref.step,
14
12
  value = _ref.value,
@@ -28,44 +26,43 @@ var SliderWithInput = /*#__PURE__*/memo(function (_ref) {
28
26
  if (Number.isNaN(value) || isNull(value)) return;
29
27
  onChange === null || onChange === void 0 || onChange(value);
30
28
  }, []);
31
- return /*#__PURE__*/_jsxs(Flexbox, {
29
+ return /*#__PURE__*/React.createElement(Flexbox, {
32
30
  align: 'center',
33
31
  className: className,
34
32
  direction: 'horizontal',
35
33
  gap: gap,
36
- style: style,
37
- children: [/*#__PURE__*/_jsx(Slider, _objectSpread({
38
- defaultValue: defaultValue,
39
- disabled: disabled,
40
- max: max,
41
- min: min,
42
- onChange: handleOnchange,
43
- step: step,
44
- style: size === 'small' ? {
45
- flex: 1,
46
- margin: 0
47
- } : {
48
- flex: 1
49
- },
50
- tooltip: {
51
- open: false
52
- },
53
- value: typeof value === 'number' ? value : 0
54
- }, rest)), /*#__PURE__*/_jsx(InputNumber, {
55
- controls: size !== 'small' || controls,
56
- defaultValue: defaultValue,
57
- disabled: disabled,
58
- max: max,
59
- min: min,
60
- onChange: handleOnchange,
61
- size: size,
62
- step: Number.isNaN(step) || isNull(step) ? undefined : step,
63
- style: {
64
- flex: 1,
65
- maxWidth: size === 'small' ? 40 : 64
66
- },
67
- value: typeof value === 'number' ? value : 0
68
- })]
69
- });
34
+ style: style
35
+ }, /*#__PURE__*/React.createElement(Slider, _extends({
36
+ defaultValue: defaultValue,
37
+ disabled: disabled,
38
+ max: max,
39
+ min: min,
40
+ onChange: handleOnchange,
41
+ step: step,
42
+ style: size === 'small' ? {
43
+ flex: 1,
44
+ margin: 0
45
+ } : {
46
+ flex: 1
47
+ },
48
+ tooltip: {
49
+ open: false
50
+ },
51
+ value: typeof value === 'number' ? value : 0
52
+ }, rest)), /*#__PURE__*/React.createElement(InputNumber, {
53
+ controls: size !== 'small' || controls,
54
+ defaultValue: defaultValue,
55
+ disabled: disabled,
56
+ max: max,
57
+ min: min,
58
+ onChange: handleOnchange,
59
+ size: size,
60
+ step: Number.isNaN(step) || isNull(step) ? undefined : step,
61
+ style: {
62
+ flex: 1,
63
+ maxWidth: size === 'small' ? 40 : 64
64
+ },
65
+ value: typeof value === 'number' ? value : 0
66
+ }));
70
67
  });
71
68
  export default SliderWithInput;
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  var _excluded = ["symbol", "language", "children", "copyable", "type", "spotlight", "className"];
6
6
  import { memo } from 'react';
@@ -9,8 +9,6 @@ import CopyButton from "../CopyButton";
9
9
  import SyntaxHighlighter from "../Highlighter/SyntaxHighlighter";
10
10
  import Spotlight from "../awesome/Spotlight";
11
11
  import { useStyles } from "./style";
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- import { jsxs as _jsxs } from "react/jsx-runtime";
14
12
  var Snippet = /*#__PURE__*/memo(function (_ref) {
15
13
  var symbol = _ref.symbol,
16
14
  _ref$language = _ref.language,
@@ -27,22 +25,19 @@ var Snippet = /*#__PURE__*/memo(function (_ref) {
27
25
  styles = _useStyles.styles,
28
26
  cx = _useStyles.cx;
29
27
  var tirmedChildren = children.trim();
30
- return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
28
+ return /*#__PURE__*/React.createElement(Flexbox, _extends({
31
29
  align: 'center',
32
30
  className: cx(styles.container, className),
33
31
  gap: 8,
34
32
  horizontal: true
35
- }, rest), {}, {
36
- children: [spotlight && /*#__PURE__*/_jsx(Spotlight, {}), /*#__PURE__*/_jsx(SyntaxHighlighter, {
37
- language: language,
38
- children: [symbol, tirmedChildren].filter(Boolean).join(' ')
39
- }), copyable && /*#__PURE__*/_jsx(CopyButton, {
40
- content: tirmedChildren,
41
- size: {
42
- blockSize: 24,
43
- fontSize: 14
44
- }
45
- })]
33
+ }, rest), spotlight && /*#__PURE__*/React.createElement(Spotlight, null), /*#__PURE__*/React.createElement(SyntaxHighlighter, {
34
+ language: language
35
+ }, [symbol, tirmedChildren].filter(Boolean).join(' ')), copyable && /*#__PURE__*/React.createElement(CopyButton, {
36
+ content: tirmedChildren,
37
+ size: {
38
+ blockSize: 24,
39
+ fontSize: 14
40
+ }
46
41
  }));
47
42
  });
48
43
  export default Snippet;
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
1
2
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
3
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
@@ -6,7 +7,6 @@ import { GripVertical } from 'lucide-react';
6
7
  import React, { memo, useContext, useState } from 'react';
7
8
  import ActionIcon from "../ActionIcon";
8
9
  import { SortableItemContext } from "./SortableItem";
9
- import { jsx as _jsx } from "react/jsx-runtime";
10
10
  var DragHandle = /*#__PURE__*/memo(function (_ref) {
11
11
  var style = _ref.style,
12
12
  rest = _objectWithoutProperties(_ref, _excluded);
@@ -18,7 +18,7 @@ var DragHandle = /*#__PURE__*/memo(function (_ref) {
18
18
  attributes = _useContext.attributes,
19
19
  listeners = _useContext.listeners,
20
20
  ref = _useContext.ref;
21
- return /*#__PURE__*/_jsx(ActionIcon, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
21
+ return /*#__PURE__*/React.createElement(ActionIcon, _extends({
22
22
  "data-cypress": "draggable-handle",
23
23
  glass: true,
24
24
  icon: GripVertical,
@@ -32,7 +32,7 @@ var DragHandle = /*#__PURE__*/memo(function (_ref) {
32
32
  style: _objectSpread({
33
33
  cursor: grab ? 'grab' : 'grabbing'
34
34
  }, style)
35
- }, rest), attributes), listeners), {}, {
35
+ }, rest, attributes, listeners, {
36
36
  ref: ref
37
37
  }));
38
38
  });
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
1
2
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
4
  var _excluded = ["children", "id", "style"];
@@ -6,7 +7,6 @@ import { CSS } from '@dnd-kit/utilities';
6
7
  import { createContext, memo, useMemo } from 'react';
7
8
  import { Flexbox } from 'react-layout-kit';
8
9
  import { useStyles } from "./style";
9
- import { jsx as _jsx } from "react/jsx-runtime";
10
10
  export var SortableItemContext = /*#__PURE__*/createContext({
11
11
  attributes: {},
12
12
  listeners: undefined,
@@ -36,23 +36,20 @@ var SortableItem = /*#__PURE__*/memo(function (_ref) {
36
36
  ref: setActivatorNodeRef
37
37
  };
38
38
  }, [attributes, listeners, setActivatorNodeRef]);
39
- return /*#__PURE__*/_jsx(SortableItemContext.Provider, {
40
- value: context,
41
- children: /*#__PURE__*/_jsx(Flexbox, _objectSpread(_objectSpread({
42
- align: 'center',
43
- as: 'li',
44
- className: styles.item,
45
- gap: 4,
46
- horizontal: true,
47
- ref: setNodeRef,
48
- style: _objectSpread({
49
- opacity: isDragging ? 0.4 : undefined,
50
- transform: CSS.Translate.toString(transform),
51
- transition: transition
52
- }, style)
53
- }, rest), {}, {
54
- children: children
55
- }))
56
- });
39
+ return /*#__PURE__*/React.createElement(SortableItemContext.Provider, {
40
+ value: context
41
+ }, /*#__PURE__*/React.createElement(Flexbox, _extends({
42
+ align: 'center',
43
+ as: 'li',
44
+ className: styles.item,
45
+ gap: 4,
46
+ horizontal: true,
47
+ ref: setNodeRef,
48
+ style: _objectSpread({
49
+ opacity: isDragging ? 0.4 : undefined,
50
+ transform: CSS.Translate.toString(transform),
51
+ transition: transition
52
+ }, style)
53
+ }, rest), children));
57
54
  });
58
55
  export default SortableItem;
@@ -1,6 +1,5 @@
1
1
  import { DragOverlay, defaultDropAnimationSideEffects } from '@dnd-kit/core';
2
2
  import { memo } from 'react';
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
3
  var dropAnimationConfig = {
5
4
  sideEffects: defaultDropAnimationSideEffects({
6
5
  styles: {
@@ -12,9 +11,8 @@ var dropAnimationConfig = {
12
11
  };
13
12
  var SortableOverlay = /*#__PURE__*/memo(function (_ref) {
14
13
  var children = _ref.children;
15
- return /*#__PURE__*/_jsx(DragOverlay, {
16
- dropAnimation: dropAnimationConfig,
17
- children: children
18
- });
14
+ return /*#__PURE__*/React.createElement(DragOverlay, {
15
+ dropAnimation: dropAnimationConfig
16
+ }, children);
19
17
  });
20
18
  export default SortableOverlay;
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
5
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
6
  var _excluded = ["items", "onChange", "renderItem", "gap"];
@@ -13,8 +13,6 @@ import DragHandle from "./DragHandle";
13
13
  import SortableItem from "./SortableItem";
14
14
  import SortableOverlay from "./SortableOverlay";
15
15
  import { useStyles } from "./style";
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- import { jsxs as _jsxs } from "react/jsx-runtime";
18
16
  var SortableListParent = /*#__PURE__*/memo(function (_ref) {
19
17
  var items = _ref.items,
20
18
  onChange = _ref.onChange,
@@ -36,7 +34,7 @@ var SortableListParent = /*#__PURE__*/memo(function (_ref) {
36
34
  var sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
37
35
  coordinateGetter: sortableKeyboardCoordinates
38
36
  }));
39
- return /*#__PURE__*/_jsxs(DndContext, {
37
+ return /*#__PURE__*/React.createElement(DndContext, {
40
38
  modifiers: [restrictToVerticalAxis, restrictToWindowEdges],
41
39
  onDragCancel: function onDragCancel() {
42
40
  setActive(null);
@@ -61,25 +59,19 @@ var SortableListParent = /*#__PURE__*/memo(function (_ref) {
61
59
  var active = _ref5.active;
62
60
  setActive(active);
63
61
  },
64
- sensors: sensors,
65
- children: [/*#__PURE__*/_jsx(SortableContext, {
66
- items: items,
67
- strategy: verticalListSortingStrategy,
68
- children: /*#__PURE__*/_jsx(Flexbox, _objectSpread(_objectSpread({
69
- as: 'ul',
70
- className: styles.container,
71
- gap: gap
72
- }, rest), {}, {
73
- children: items.map(function (item) {
74
- return /*#__PURE__*/_jsx(Fragment, {
75
- children: renderItem(item)
76
- }, item.id);
77
- })
78
- }))
79
- }), /*#__PURE__*/_jsx(SortableOverlay, {
80
- children: activeItem ? renderItem(activeItem) : null
81
- })]
82
- });
62
+ sensors: sensors
63
+ }, /*#__PURE__*/React.createElement(SortableContext, {
64
+ items: items,
65
+ strategy: verticalListSortingStrategy
66
+ }, /*#__PURE__*/React.createElement(Flexbox, _extends({
67
+ as: 'ul',
68
+ className: styles.container,
69
+ gap: gap
70
+ }, rest), items.map(function (item) {
71
+ return /*#__PURE__*/React.createElement(Fragment, {
72
+ key: item.id
73
+ }, renderItem(item));
74
+ }))), /*#__PURE__*/React.createElement(SortableOverlay, null, activeItem ? renderItem(activeItem) : null));
83
75
  });
84
76
  var SortableList = SortableListParent;
85
77
  SortableList.Item = SortableItem;
@@ -4,8 +4,6 @@ import { useTheme } from 'antd-style';
4
4
  import { memo } from 'react';
5
5
  import { Flexbox } from 'react-layout-kit';
6
6
  import { useStyles } from "./style";
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
- import { jsxs as _jsxs } from "react/jsx-runtime";
9
7
  var Swatches = /*#__PURE__*/memo(function (_ref) {
10
8
  var colors = _ref.colors,
11
9
  activeColor = _ref.activeColor,
@@ -16,32 +14,32 @@ var Swatches = /*#__PURE__*/memo(function (_ref) {
16
14
  var _useStyles = useStyles(size),
17
15
  cx = _useStyles.cx,
18
16
  styles = _useStyles.styles;
19
- return /*#__PURE__*/_jsxs(Flexbox, {
17
+ return /*#__PURE__*/React.createElement(Flexbox, {
20
18
  gap: 8,
21
19
  horizontal: true,
22
20
  style: {
23
21
  flexWrap: 'wrap'
22
+ }
23
+ }, /*#__PURE__*/React.createElement(Flexbox, {
24
+ className: cx(styles.container, !activeColor && styles.active),
25
+ onClick: function onClick() {
26
+ onSelect === null || onSelect === void 0 || onSelect();
24
27
  },
25
- children: [/*#__PURE__*/_jsx(Flexbox, {
26
- className: cx(styles.container, !activeColor && styles.active),
28
+ style: {
29
+ background: theme.colorBgContainer
30
+ }
31
+ }), colors.map(function (c) {
32
+ var isActive = c === activeColor;
33
+ return /*#__PURE__*/React.createElement(Flexbox, {
34
+ className: cx(styles.container, isActive && styles.active),
35
+ key: c,
27
36
  onClick: function onClick() {
28
- onSelect === null || onSelect === void 0 || onSelect();
37
+ onSelect === null || onSelect === void 0 || onSelect(c);
29
38
  },
30
39
  style: {
31
- background: theme.colorBgContainer
40
+ background: c
32
41
  }
33
- }), colors.map(function (c) {
34
- var isActive = c === activeColor;
35
- return /*#__PURE__*/_jsx(Flexbox, {
36
- className: cx(styles.container, isActive && styles.active),
37
- onClick: function onClick() {
38
- onSelect === null || onSelect === void 0 || onSelect(c);
39
- },
40
- style: {
41
- background: c
42
- }
43
- }, c);
44
- })]
45
- });
42
+ });
43
+ }));
46
44
  });
47
45
  export default Swatches;