@lobehub/ui 1.159.0 → 1.161.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 (154) hide show
  1. package/es/A/index.js +2 -2
  2. package/es/ActionIcon/index.d.ts +5 -2
  3. package/es/ActionIcon/index.js +25 -19
  4. package/es/ActionIconGroup/index.js +47 -45
  5. package/es/Alert/index.js +50 -43
  6. package/es/Avatar/index.js +12 -10
  7. package/es/Burger/index.js +35 -30
  8. package/es/CodeEditor/index.js +43 -38
  9. package/es/Collapse/index.js +3 -3
  10. package/es/ColorScales/ScaleRow.js +43 -39
  11. package/es/ColorScales/index.js +59 -57
  12. package/es/ConfigProvider/index.js +5 -3
  13. package/es/ContextMenu/index.js +3 -2
  14. package/es/CopyButton/index.js +4 -3
  15. package/es/DraggablePanel/components/DraggablePanelBody.js +3 -2
  16. package/es/DraggablePanel/components/DraggablePanelContainer.js +3 -2
  17. package/es/DraggablePanel/components/DraggablePanelFooter.js +3 -2
  18. package/es/DraggablePanel/components/DraggablePanelHeader.js +9 -5
  19. package/es/DraggablePanel/index.js +32 -25
  20. package/es/EditableText/index.js +16 -13
  21. package/es/EmojiPicker/AvatarUploader.js +71 -60
  22. package/es/EmojiPicker/index.js +110 -101
  23. package/es/EmptyCard/index.js +31 -23
  24. package/es/FileTypeIcon/index.js +55 -44
  25. package/es/FluentEmoji/index.js +6 -4
  26. package/es/Footer/index.js +10 -8
  27. package/es/Form/components/FormDivider.js +2 -2
  28. package/es/Form/components/FormFlatGroup.js +9 -4
  29. package/es/Form/components/FormFooter.js +6 -3
  30. package/es/Form/components/FormGroup.js +21 -15
  31. package/es/Form/components/FormItem.js +17 -10
  32. package/es/Form/components/FormTitle.js +23 -15
  33. package/es/Form/index.js +30 -26
  34. package/es/FormModal/index.js +34 -30
  35. package/es/Grid/index.js +6 -3
  36. package/es/Header/index.js +65 -49
  37. package/es/Highlighter/FullFeatured.js +51 -41
  38. package/es/Highlighter/SyntaxHighlighter/index.js +30 -19
  39. package/es/Highlighter/index.js +29 -19
  40. package/es/Icon/icons/DiscordIcon.js +3 -2
  41. package/es/Icon/index.js +16 -13
  42. package/es/Image/ImageGallery.js +5 -3
  43. package/es/Image/Preview.js +5 -3
  44. package/es/Image/index.js +38 -34
  45. package/es/Image/usePreview.js +37 -33
  46. package/es/Img/index.js +2 -2
  47. package/es/Input/index.js +3 -3
  48. package/es/Layout/index.js +63 -35
  49. package/es/List/ListItem/index.js +67 -53
  50. package/es/Markdown/CodeBlock.js +16 -10
  51. package/es/Markdown/Typography.js +6 -3
  52. package/es/Markdown/index.js +22 -18
  53. package/es/MaterialFileTypeIcon/index.js +20 -17
  54. package/es/MaterialFileTypeIcon/utils.d.ts +2 -2
  55. package/es/Mermaid/FullFeatured.js +45 -35
  56. package/es/Mermaid/index.js +26 -17
  57. package/es/Mermaid/useMermaid.d.ts +1 -2
  58. package/es/Mermaid/useMermaid.js +5 -3
  59. package/es/Modal/index.js +60 -48
  60. package/es/SearchBar/index.js +51 -47
  61. package/es/SelectWithImg/index.js +40 -34
  62. package/es/SideNav/index.js +22 -15
  63. package/es/SliderWithInput/index.js +38 -35
  64. package/es/Snippet/index.js +15 -10
  65. package/es/SortableList/DragHandle.js +3 -3
  66. package/es/SortableList/SortableItem.js +19 -16
  67. package/es/SortableList/SortableOverlay.js +5 -3
  68. package/es/SortableList/index.js +23 -15
  69. package/es/Swatches/index.js +20 -18
  70. package/es/TabsNav/index.js +3 -2
  71. package/es/Tag/index.js +12 -7
  72. package/es/ThemeProvider/Meta.js +58 -53
  73. package/es/ThemeProvider/index.js +23 -17
  74. package/es/ThemeSwitch/index.js +19 -15
  75. package/es/Toc/TocMobile.js +52 -47
  76. package/es/Toc/index.js +13 -8
  77. package/es/Tooltip/index.js +6 -3
  78. package/es/Video/index.js +47 -41
  79. package/es/awesome/AuroraBackground/index.js +18 -11
  80. package/es/awesome/Features/Item.js +45 -37
  81. package/es/awesome/Features/index.js +4 -5
  82. package/es/awesome/GaussianBackground/index.js +13 -8
  83. package/es/awesome/Giscus/index.js +15 -13
  84. package/es/awesome/GradientButton/index.js +9 -5
  85. package/es/awesome/GridBackground/Grid.js +61 -49
  86. package/es/awesome/GridBackground/GridShowcase.js +28 -24
  87. package/es/awesome/GridBackground/index.js +33 -27
  88. package/es/awesome/Hero/index.js +74 -63
  89. package/es/awesome/Spline/ParentSize.js +8 -7
  90. package/es/awesome/Spline/index.js +13 -10
  91. package/es/awesome/Spotlight/index.js +3 -2
  92. package/es/awesome/SpotlightCard/SpotlightCardItem.js +8 -5
  93. package/es/awesome/SpotlightCard/index.js +12 -9
  94. package/es/brand/BrandLoading/index.js +3 -2
  95. package/es/brand/LobeChat/index.js +38 -29
  96. package/es/brand/LobeChatText/index.js +13 -8
  97. package/es/brand/LobeHub/index.js +38 -29
  98. package/es/brand/LobeHubText/index.js +9 -4
  99. package/es/brand/Logo3d/index.js +3 -2
  100. package/es/brand/LogoFlat/index.js +49 -44
  101. package/es/brand/LogoMono/index.js +53 -48
  102. package/es/brand/LogoThree/Loading.js +11 -9
  103. package/es/brand/LogoThree/LogoSpline.js +12 -10
  104. package/es/brand/LogoThree/index.js +25 -23
  105. package/es/brand/components/Divider.js +6 -4
  106. package/es/chat/BackBottom/index.js +6 -4
  107. package/es/chat/ChatHeader/ChatHeaderTitle.js +31 -22
  108. package/es/chat/ChatHeader/index.js +42 -35
  109. package/es/chat/ChatInputArea/ChatInputActionBar.js +21 -16
  110. package/es/chat/ChatInputArea/ChatInputArea.js +23 -19
  111. package/es/chat/ChatInputArea/ChatInputAreaInner.js +3 -2
  112. package/es/chat/ChatInputArea/SendButton.js +51 -36
  113. package/es/chat/ChatItem/components/Actions.js +5 -3
  114. package/es/chat/ChatItem/components/Avatar.js +21 -17
  115. package/es/chat/ChatItem/components/BorderSpacing.js +2 -1
  116. package/es/chat/ChatItem/components/ErrorContent.js +11 -9
  117. package/es/chat/ChatItem/components/Loading.js +12 -10
  118. package/es/chat/ChatItem/components/MessageContent.js +10 -6
  119. package/es/chat/ChatItem/components/Title.js +8 -3
  120. package/es/chat/ChatItem/index.js +53 -47
  121. package/es/chat/ChatList/ActionsBar.js +3 -2
  122. package/es/chat/ChatList/HistoryDivider.js +11 -6
  123. package/es/chat/ChatList/Item.js +12 -14
  124. package/es/chat/ChatList/index.js +29 -25
  125. package/es/chat/EditableMessage/index.js +32 -26
  126. package/es/chat/EditableMessageList/index.js +76 -72
  127. package/es/chat/MessageInput/index.js +43 -35
  128. package/es/chat/MessageModal/index.js +51 -41
  129. package/es/chat/TokenTag/index.js +11 -7
  130. package/es/components/ControlInput.js +22 -18
  131. package/es/hooks/useHighlight.d.ts +1 -1
  132. package/es/mdx/Callout/index.js +19 -13
  133. package/es/mdx/Cards/Card.js +59 -46
  134. package/es/mdx/Cards/index.js +6 -3
  135. package/es/mdx/FileTree/File.js +11 -5
  136. package/es/mdx/FileTree/Folder.js +22 -13
  137. package/es/mdx/FileTree/index.js +6 -3
  138. package/es/mdx/Mdx/index.js +9 -7
  139. package/es/mdx/Steps/index.js +6 -3
  140. package/es/mdx/Tabs/Tab.js +8 -3
  141. package/es/mdx/Tabs/index.js +21 -17
  142. package/es/mdx/mdxComponents/CodeBlock.js +14 -9
  143. package/es/mdx/mdxComponents/Image.js +2 -2
  144. package/es/mdx/mdxComponents/Link.js +3 -2
  145. package/es/mdx/mdxComponents/Pre.js +14 -7
  146. package/es/mdx/mdxComponents/Video.js +2 -2
  147. package/es/mobile/MobileChatInputArea/SendButton.js +4 -3
  148. package/es/mobile/MobileChatInputArea/index.js +79 -69
  149. package/es/mobile/MobileNavBar/MobileNavBarTitle.js +37 -26
  150. package/es/mobile/MobileNavBar/index.js +48 -41
  151. package/es/mobile/MobileSafeArea/index.js +3 -2
  152. package/es/mobile/MobileTabBar/index.js +35 -29
  153. package/es/storybook/StoryBook/index.js +26 -19
  154. package/package.json +21 -22
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
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,6 +12,8 @@ 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";
15
17
  var SearchBar = /*#__PURE__*/memo(function (_ref) {
16
18
  var defaultValue = _ref.defaultValue,
17
19
  spotlight = _ref.spotlight,
@@ -77,53 +79,55 @@ var SearchBar = /*#__PURE__*/memo(function (_ref) {
77
79
  return document.removeEventListener('keydown', handler);
78
80
  };
79
81
  }, []);
80
- return /*#__PURE__*/React.createElement("div", {
82
+ return /*#__PURE__*/_jsxs("div", {
81
83
  className: cx(styles.search, className),
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) {
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);
97
107
  setShowTag(false);
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()));
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
+ });
128
132
  });
129
133
  export default SearchBar;
@@ -8,6 +8,8 @@ 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";
11
13
  var SelectWithImg = /*#__PURE__*/memo(function (_ref) {
12
14
  var className = _ref.className,
13
15
  style = _ref.style,
@@ -35,42 +37,46 @@ var SelectWithImg = /*#__PURE__*/memo(function (_ref) {
35
37
  var _useStyles = useStyles(),
36
38
  styles = _useStyles.styles,
37
39
  cx = _useStyles.cx;
38
- return /*#__PURE__*/React.createElement(Flexbox, {
40
+ return /*#__PURE__*/_jsx(Flexbox, {
39
41
  className: className,
40
42
  gap: 16,
41
43
  horizontal: true,
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
- }));
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
+ });
75
81
  });
76
82
  export default SelectWithImg;
@@ -1,11 +1,13 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
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";
9
11
  var SideNav = /*#__PURE__*/memo(function (_ref) {
10
12
  var className = _ref.className,
11
13
  avatar = _ref.avatar,
@@ -15,23 +17,28 @@ var SideNav = /*#__PURE__*/memo(function (_ref) {
15
17
  var _useStyles = useStyles(),
16
18
  styles = _useStyles.styles,
17
19
  cx = _useStyles.cx;
18
- return /*#__PURE__*/React.createElement(Flexbox, _extends({
20
+ return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
19
21
  align: 'center',
20
22
  className: cx(styles, className),
21
23
  flex: 'none',
22
24
  justify: 'space-between'
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));
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
+ }));
36
43
  });
37
44
  export default SideNav;
@@ -1,12 +1,14 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
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";
10
12
  var SliderWithInput = /*#__PURE__*/memo(function (_ref) {
11
13
  var step = _ref.step,
12
14
  value = _ref.value,
@@ -26,43 +28,44 @@ var SliderWithInput = /*#__PURE__*/memo(function (_ref) {
26
28
  if (Number.isNaN(value) || isNull(value)) return;
27
29
  onChange === null || onChange === void 0 || onChange(value);
28
30
  }, []);
29
- return /*#__PURE__*/React.createElement(Flexbox, {
31
+ return /*#__PURE__*/_jsxs(Flexbox, {
30
32
  align: 'center',
31
33
  className: className,
32
34
  direction: 'horizontal',
33
35
  gap: gap,
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
- }));
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
+ });
67
70
  });
68
71
  export default SliderWithInput;
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
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,6 +9,8 @@ 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";
12
14
  var Snippet = /*#__PURE__*/memo(function (_ref) {
13
15
  var symbol = _ref.symbol,
14
16
  _ref$language = _ref.language,
@@ -25,19 +27,22 @@ var Snippet = /*#__PURE__*/memo(function (_ref) {
25
27
  styles = _useStyles.styles,
26
28
  cx = _useStyles.cx;
27
29
  var tirmedChildren = children.trim();
28
- return /*#__PURE__*/React.createElement(Flexbox, _extends({
30
+ return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
29
31
  align: 'center',
30
32
  className: cx(styles.container, className),
31
33
  gap: 8,
32
34
  horizontal: true
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
- }
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
+ })]
41
46
  }));
42
47
  });
43
48
  export default Snippet;
@@ -1,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
@@ -7,6 +6,7 @@ import { GripVertical } from 'lucide-react';
7
6
  import React, { memo, useContext, useState } from 'react';
8
7
  import ActionIcon from "../ActionIcon";
9
8
  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__*/React.createElement(ActionIcon, _extends({
21
+ return /*#__PURE__*/_jsx(ActionIcon, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
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,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
3
  var _excluded = ["children", "id", "style"];
@@ -7,6 +6,7 @@ import { CSS } from '@dnd-kit/utilities';
7
6
  import { createContext, memo, useMemo } from 'react';
8
7
  import { Flexbox } from 'react-layout-kit';
9
8
  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,20 +36,23 @@ var SortableItem = /*#__PURE__*/memo(function (_ref) {
36
36
  ref: setActivatorNodeRef
37
37
  };
38
38
  }, [attributes, listeners, setActivatorNodeRef]);
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));
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
+ });
54
57
  });
55
58
  export default SortableItem;
@@ -1,5 +1,6 @@
1
1
  import { DragOverlay, defaultDropAnimationSideEffects } from '@dnd-kit/core';
2
2
  import { memo } from 'react';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
3
4
  var dropAnimationConfig = {
4
5
  sideEffects: defaultDropAnimationSideEffects({
5
6
  styles: {
@@ -11,8 +12,9 @@ var dropAnimationConfig = {
11
12
  };
12
13
  var SortableOverlay = /*#__PURE__*/memo(function (_ref) {
13
14
  var children = _ref.children;
14
- return /*#__PURE__*/React.createElement(DragOverlay, {
15
- dropAnimation: dropAnimationConfig
16
- }, children);
15
+ return /*#__PURE__*/_jsx(DragOverlay, {
16
+ dropAnimation: dropAnimationConfig,
17
+ children: children
18
+ });
17
19
  });
18
20
  export default SortableOverlay;
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
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,6 +13,8 @@ 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";
16
18
  var SortableListParent = /*#__PURE__*/memo(function (_ref) {
17
19
  var items = _ref.items,
18
20
  onChange = _ref.onChange,
@@ -34,7 +36,7 @@ var SortableListParent = /*#__PURE__*/memo(function (_ref) {
34
36
  var sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
35
37
  coordinateGetter: sortableKeyboardCoordinates
36
38
  }));
37
- return /*#__PURE__*/React.createElement(DndContext, {
39
+ return /*#__PURE__*/_jsxs(DndContext, {
38
40
  modifiers: [restrictToVerticalAxis, restrictToWindowEdges],
39
41
  onDragCancel: function onDragCancel() {
40
42
  setActive(null);
@@ -59,19 +61,25 @@ var SortableListParent = /*#__PURE__*/memo(function (_ref) {
59
61
  var active = _ref5.active;
60
62
  setActive(active);
61
63
  },
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));
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
+ });
75
83
  });
76
84
  var SortableList = SortableListParent;
77
85
  SortableList.Item = SortableItem;
@@ -4,6 +4,8 @@ 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";
7
9
  var Swatches = /*#__PURE__*/memo(function (_ref) {
8
10
  var colors = _ref.colors,
9
11
  activeColor = _ref.activeColor,
@@ -14,32 +16,32 @@ var Swatches = /*#__PURE__*/memo(function (_ref) {
14
16
  var _useStyles = useStyles(size),
15
17
  cx = _useStyles.cx,
16
18
  styles = _useStyles.styles;
17
- return /*#__PURE__*/React.createElement(Flexbox, {
19
+ return /*#__PURE__*/_jsxs(Flexbox, {
18
20
  gap: 8,
19
21
  horizontal: true,
20
22
  style: {
21
23
  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();
27
24
  },
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,
25
+ children: [/*#__PURE__*/_jsx(Flexbox, {
26
+ className: cx(styles.container, !activeColor && styles.active),
36
27
  onClick: function onClick() {
37
- onSelect === null || onSelect === void 0 || onSelect(c);
28
+ onSelect === null || onSelect === void 0 || onSelect();
38
29
  },
39
30
  style: {
40
- background: c
31
+ background: theme.colorBgContainer
41
32
  }
42
- });
43
- }));
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
+ });
44
46
  });
45
47
  export default Swatches;