@antscorp/antsomi-ui 1.3.5-beta.573 → 1.3.5-beta.574
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.
|
@@ -14,11 +14,11 @@ import { Space, Typography } from 'antd';
|
|
|
14
14
|
import Icon from '@antscorp/icons';
|
|
15
15
|
import { StyledInputDropdownRoot } from './styled';
|
|
16
16
|
import clsx from 'clsx';
|
|
17
|
-
import './style.scss';
|
|
17
|
+
// import './style.scss';
|
|
18
18
|
export { Dropdown } from 'antd';
|
|
19
19
|
const DefaultExpandIcon = React.createElement(Icon, { type: "icon-ants-expand-more" });
|
|
20
20
|
export const InputDropdown = (props) => {
|
|
21
|
-
const { children, disabled = false, className, trigger = ['click'], menu = { items: [] }, width = '100%', expandIcon = DefaultExpandIcon, onOpenChange = () => { } } = props, rest = __rest(props, ["children", "disabled", "className", "trigger", "menu", "width", "expandIcon", "onOpenChange"]);
|
|
21
|
+
const { children, disabled = false, className, trigger = ['click'], menu = { items: [] }, width = '100%', expandIcon = DefaultExpandIcon, onOpenChange = () => { }, overlayClassName } = props, rest = __rest(props, ["children", "disabled", "className", "trigger", "menu", "width", "expandIcon", "onOpenChange", "overlayClassName"]);
|
|
22
22
|
const [enableTooltip, setEnableTooltip] = useState(true);
|
|
23
23
|
const renderChildren = useCallback(() => {
|
|
24
24
|
if (typeof children === 'string') {
|
|
@@ -37,7 +37,7 @@ export const InputDropdown = (props) => {
|
|
|
37
37
|
setEnableTooltip(!open);
|
|
38
38
|
onOpenChange(...args);
|
|
39
39
|
};
|
|
40
|
-
return (React.createElement(StyledInputDropdownRoot, Object.assign({ menu: menu, trigger: trigger, disabled: disabled }, rest, { className: clsx({ disabled }, className, 'antsomi-input-dropdown'), onOpenChange: handleOpen }),
|
|
40
|
+
return (React.createElement(StyledInputDropdownRoot, Object.assign({ menu: menu, trigger: trigger, disabled: disabled }, rest, { className: clsx({ disabled }, className, 'antsomi-input-dropdown'), overlayClassName: clsx(overlayClassName, 'antsomi-input-dropdown-overlay'), onOpenChange: handleOpen }),
|
|
41
41
|
React.createElement(Space, { style: { width } },
|
|
42
42
|
renderChildren(),
|
|
43
43
|
expandIcon)));
|
package/es/constants/theme.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
|
|
1
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
|
2
2
|
// Types
|
|
3
3
|
import { theme } from 'antd';
|
|
4
4
|
// Variables
|
|
@@ -226,12 +226,16 @@ THEME.components = {
|
|
|
226
226
|
// borderRadius: THEME.token?.borderRadiusLG,
|
|
227
227
|
},
|
|
228
228
|
Dropdown: {
|
|
229
|
-
|
|
229
|
+
borderRadiusSM: 0,
|
|
230
230
|
// borderRadius: THEME.token?.borderRadiusLG,
|
|
231
|
+
paddingXXS: 8,
|
|
231
232
|
controlItemBgHover: '#F2F9FF',
|
|
233
|
+
controlItemBgActive: '#DEEFFE',
|
|
234
|
+
colorPrimary: (_2 = THEME.token) === null || _2 === void 0 ? void 0 : _2.colorText,
|
|
235
|
+
controlItemBgActiveHover: '#DEEFFE',
|
|
232
236
|
},
|
|
233
237
|
Tooltip: {
|
|
234
|
-
colorBgSpotlight: (
|
|
238
|
+
colorBgSpotlight: (_3 = THEME.token) === null || _3 === void 0 ? void 0 : _3.bw8,
|
|
235
239
|
fontSize: 11,
|
|
236
240
|
},
|
|
237
241
|
Menu: {
|
|
@@ -241,8 +245,8 @@ THEME.components = {
|
|
|
241
245
|
itemMarginBlock: 5,
|
|
242
246
|
itemBorderRadius: 5,
|
|
243
247
|
subMenuItemBg: 'transparent',
|
|
244
|
-
itemDisabledColor: (
|
|
245
|
-
itemActiveBg: (
|
|
248
|
+
itemDisabledColor: (_4 = THEME.token) === null || _4 === void 0 ? void 0 : _4.colorTextDisabled,
|
|
249
|
+
itemActiveBg: (_5 = THEME.token) === null || _5 === void 0 ? void 0 : _5.blue1_1,
|
|
246
250
|
},
|
|
247
251
|
Form: {
|
|
248
252
|
itemMarginBottom: 15,
|
|
@@ -310,6 +310,11 @@ export const GlobalStyle = () => {
|
|
|
310
310
|
gap: 5px;
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
+
// Dropdown
|
|
314
|
+
.antsomi-dropdown-menu {
|
|
315
|
+
padding: 8px 0 !important;
|
|
316
|
+
}
|
|
317
|
+
|
|
313
318
|
// Input Number
|
|
314
319
|
.antsomi-input-number,
|
|
315
320
|
.antsomi-input-number-affix-wrapper {
|
|
@@ -666,7 +671,9 @@ export const GlobalStyle = () => {
|
|
|
666
671
|
border-radius: 50%;
|
|
667
672
|
box-shadow: rgba(0, 0, 0, 0.3) 0px 2px 2px 0px;
|
|
668
673
|
cursor: pointer;
|
|
669
|
-
transition:
|
|
674
|
+
transition:
|
|
675
|
+
border-color 0.3s,
|
|
676
|
+
box-shadow 0.6s,
|
|
670
677
|
transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) !important;
|
|
671
678
|
}
|
|
672
679
|
|