@antscorp/antsomi-ui 1.3.5-beta.905 → 1.3.5-beta.907
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.
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Popover } from 'antd';
|
|
3
|
-
import { Icon } from '../../atoms';
|
|
4
3
|
import './styles.scss';
|
|
5
4
|
import clsx from 'clsx';
|
|
6
5
|
import { StyledInput } from './styled';
|
|
7
6
|
import { translate, translations } from '@antscorp/antsomi-ui/es/locales';
|
|
7
|
+
import { SearchIcon } from '../../icons';
|
|
8
8
|
export const SearchPopover = (props) => {
|
|
9
9
|
const { inputSearchProps = {}, ...popoverProps } = props;
|
|
10
10
|
const { overlayClassName, arrow = false, children, content, trigger = ['click'], ...restPopoverProps } = popoverProps;
|
|
11
|
-
return (_jsx(Popover, { trigger: trigger, arrow: arrow, destroyTooltipOnHide: true, ...restPopoverProps, overlayClassName: clsx('search-popover-overlay', overlayClassName), overlay: true, content: _jsxs(_Fragment, { children: [_jsx(StyledInput, { placeholder: inputSearchProps?.placeholder || `${translate(translations.global.search)}`, bordered: false, ...inputSearchProps, addonAfter: _jsx(
|
|
11
|
+
return (_jsx(Popover, { trigger: trigger, arrow: arrow, destroyTooltipOnHide: true, ...restPopoverProps, overlayClassName: clsx('search-popover-overlay', overlayClassName), overlay: true, content: _jsxs(_Fragment, { children: [_jsx(StyledInput, { placeholder: inputSearchProps?.placeholder || `${translate(translations.global.search)}`, bordered: false, ...inputSearchProps, addonAfter: _jsx(SearchIcon, {}), withWrapper: false }), content] }), children: children }));
|
|
12
12
|
};
|
|
@@ -1,27 +1,36 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { Input } from '../../atoms';
|
|
4
|
+
import { THEME } from '@antscorp/antsomi-ui/es/constants';
|
|
4
5
|
export const StyledInput = styled(props => _jsx(Input, { ...props })) `
|
|
5
6
|
&.antsomi-input-group-wrapper {
|
|
6
7
|
padding: 8px 10px;
|
|
7
8
|
border-bottom: 1px solid var(--divider-1);
|
|
8
9
|
|
|
9
|
-
.antsomi-input {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
.antsomi-input-wrapper {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 4px;
|
|
14
|
+
|
|
15
|
+
.antsomi-input {
|
|
16
|
+
padding-left: 0;
|
|
17
|
+
padding-right: 0;
|
|
18
|
+
}
|
|
13
19
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
.antsomi-input-group-addon {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
border: none;
|
|
24
|
+
background: transparent;
|
|
25
|
+
font-size: 20px;
|
|
26
|
+
padding: 0;
|
|
27
|
+
min-width: 25px;
|
|
20
28
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
29
|
+
> svg {
|
|
30
|
+
font-size: 24px;
|
|
31
|
+
color: ${THEME.token?.colorIcon};
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
}
|
|
25
34
|
}
|
|
26
35
|
}
|
|
27
36
|
}
|
|
@@ -390,6 +390,11 @@ const TagifyInput = forwardRef((props, ref) => {
|
|
|
390
390
|
throw new Error('Tagify instance is not initialized');
|
|
391
391
|
}
|
|
392
392
|
},
|
|
393
|
+
reset() {
|
|
394
|
+
if (tagifyRef.current) {
|
|
395
|
+
tagifyRef.current.removeAllTags();
|
|
396
|
+
}
|
|
397
|
+
},
|
|
393
398
|
}), [onInjectTagAtCaret, placeCaretAfterNode]);
|
|
394
399
|
const onTagItemClick = useCallback((event) => {
|
|
395
400
|
event.stopPropagation();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antscorp/antsomi-ui",
|
|
3
|
-
"version": "1.3.5-beta.
|
|
3
|
+
"version": "1.3.5-beta.907",
|
|
4
4
|
"description": "An enterprise-class UI design language and React UI library.",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"dist/*",
|
|
@@ -133,13 +133,13 @@
|
|
|
133
133
|
"remark-gfm-alias-story": "npm:remark-gfm@4.0.0",
|
|
134
134
|
"socket.io-client": "^4.7.5",
|
|
135
135
|
"string-replace-to-array": "^2.1.0",
|
|
136
|
+
"styled-components": "^5.3.9",
|
|
136
137
|
"swiper": "^11.0.7",
|
|
137
138
|
"tui-image-editor": "^3.15.3",
|
|
138
139
|
"uniqid": "^5.4.0",
|
|
139
140
|
"use-context-selector": "^1.4.4",
|
|
140
141
|
"use-image": "^1.1.1",
|
|
141
142
|
"use-immer": "^0.4.1",
|
|
142
|
-
"styled-components": "^5.3.9",
|
|
143
143
|
"zustand": "^4.5.2"
|
|
144
144
|
},
|
|
145
145
|
"devDependencies": {
|
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
"react-router-dom": "5.1.0 || 6.14.2",
|
|
230
230
|
"sass": "^1.77.8",
|
|
231
231
|
"sass-loader": "^16.0.1",
|
|
232
|
-
"storybook": "8.4.
|
|
232
|
+
"storybook": "^8.4.6",
|
|
233
233
|
"style-loader": "^4.0.0",
|
|
234
234
|
"terser-webpack-plugin": "^5.3.10",
|
|
235
235
|
"ts-loader": "^9.5.1",
|