@antscorp/antsomi-ui 1.3.5-beta.990 → 1.3.5-beta.992
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.
- package/es/components/atoms/SelectAssociatedTag/SelectAssociatedTag.js +2 -2
- package/es/components/atoms/SelectAssociatedTag/styled.js +14 -0
- package/es/components/atoms/SelectAssociatedTag/types.d.ts +6 -0
- package/es/components/icons/LazyIcon/LazyIcon.d.ts +1 -0
- package/es/components/icons/LazyIcon/LazyIcon.js +1 -0
- package/es/components/icons/PenRulerIcon.d.ts +3 -0
- package/es/components/icons/PenRulerIcon.js +7 -0
- package/es/components/icons/index.d.ts +1 -0
- package/es/components/icons/index.js +1 -0
- package/package.json +1 -1
|
@@ -8,8 +8,8 @@ import SelectTag from './SelectTag';
|
|
|
8
8
|
import { defaultProps } from './constants';
|
|
9
9
|
export const SelectAssociatedTag = (props) => {
|
|
10
10
|
// Props
|
|
11
|
-
const { tagConfigs, style, selected, disabled, options, children, onSelect } = props;
|
|
11
|
+
const { tagConfigs, style, status, selected, disabled, options, children, onSelect } = props;
|
|
12
12
|
const { tag, value } = selected || {};
|
|
13
|
-
return (_jsxs(StyledSpace, { className:
|
|
13
|
+
return (_jsxs(StyledSpace, { className: `select-associated-tag ${status}`, style: style, children: [_jsx(SelectTag, { ...tagConfigs, selectedTag: tag }), _jsx(Divider, { type: "vertical", style: { margin: '0px 1px 0px 6px' }, className: "antsomi-divider-between-select" }), children ?? (_jsx(Select, { style: { width: '100%', height: '100%' }, value: value, disabled: disabled, options: options, onChange: onSelect }))] }));
|
|
14
14
|
};
|
|
15
15
|
SelectAssociatedTag.defaultProps = defaultProps;
|
|
@@ -13,6 +13,20 @@ export const StyledSpace = styled(Space.Compact) `
|
|
|
13
13
|
|
|
14
14
|
border-bottom: 1px solid ${globalToken?.blue1};
|
|
15
15
|
|
|
16
|
+
&.select-associated-tag {
|
|
17
|
+
&.warning {
|
|
18
|
+
border-bottom-color: ${globalToken?.colorWarning};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&.error {
|
|
22
|
+
border-bottom-color: ${globalToken?.colorError};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.success {
|
|
26
|
+
border-bottom-color: ${globalToken?.colorSuccess};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
16
30
|
> div:last-child {
|
|
17
31
|
width: 100%;
|
|
18
32
|
}
|
|
@@ -6,6 +6,7 @@ export type TagItem = {
|
|
|
6
6
|
background: CSSProperties['background'];
|
|
7
7
|
color: CSSProperties['color'];
|
|
8
8
|
};
|
|
9
|
+
export type Status = 'error' | 'warning' | 'success';
|
|
9
10
|
export interface TagConfigProps {
|
|
10
11
|
selectedTag: TagItem['value'];
|
|
11
12
|
title?: string;
|
|
@@ -47,6 +48,11 @@ export interface SelectAssociatedTagProps {
|
|
|
47
48
|
* @type {boolean}
|
|
48
49
|
*/
|
|
49
50
|
disabled?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* The status of the SelectAssociatedTag, if any.
|
|
53
|
+
* @type {'error' | 'warning' | 'success' }
|
|
54
|
+
*/
|
|
55
|
+
status?: Status;
|
|
50
56
|
/**
|
|
51
57
|
* A list of selectable options.
|
|
52
58
|
* @type {SelectOption[]}
|
|
@@ -261,6 +261,7 @@ export declare const LazyIcon: {
|
|
|
261
261
|
PauseIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
|
|
262
262
|
PaymentIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
|
|
263
263
|
PenDrawingIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
|
|
264
|
+
PenRulerIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
|
|
264
265
|
PersonAddDisabledIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
|
|
265
266
|
PersonUserAccountIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
|
|
266
267
|
PhoneCallbackIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
|
|
@@ -265,6 +265,7 @@ export const LazyIcon = {
|
|
|
265
265
|
PauseIcon: lazy(() => import('../PauseIcon').then(m => ({ default: m.PauseIcon }))),
|
|
266
266
|
PaymentIcon: lazy(() => import('../PaymentIcon').then(m => ({ default: m.PaymentIcon }))),
|
|
267
267
|
PenDrawingIcon: lazy(() => import('../PenDrawingIcon').then(m => ({ default: m.PenDrawingIcon }))),
|
|
268
|
+
PenRulerIcon: lazy(() => import('../PenRulerIcon').then(m => ({ default: m.PenRulerIcon }))),
|
|
268
269
|
PersonAddDisabledIcon: lazy(() => import('../PersonAddDisabledIcon').then(m => ({ default: m.PersonAddDisabledIcon }))),
|
|
269
270
|
PersonUserAccountIcon: lazy(() => import('../PersonUserAccountIcon').then(m => ({ default: m.PersonUserAccountIcon }))),
|
|
270
271
|
PhoneCallbackIcon: lazy(() => import('../PhoneCallbackIcon').then(m => ({ default: m.PhoneCallbackIcon }))),
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { useIcon } from './hooks/useIcon';
|
|
4
|
+
export const PenRulerIcon = forwardRef((props, ref) => {
|
|
5
|
+
const { width, height } = useIcon(props);
|
|
6
|
+
return (_jsx("svg", { viewBox: "0 0 30 31", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, ref: ref, width: width, height: height, children: _jsx("path", { d: "M23.9531 10.7656L19.5 15.2656L23.3906 19.1562C24.1406 19.9062 24.1406 21.1719 23.3906 21.9688L21.4688 23.8906C20.8594 24.4531 19.5938 24.8281 18.6562 23.8906L14.7656 20L10.2188 24.5H6V20.2812L10.5 15.7344L6.60938 11.8438C5.85938 11.0938 5.85938 9.82812 6.60938 9.03125L8.53125 7.10938C9.28125 6.35938 10.5469 6.35938 11.3438 7.10938L15.2344 11L19.7344 6.54688C20.1094 6.125 20.7656 6.125 21.1406 6.54688L23.9531 9.35938C24.375 9.73438 24.375 10.3906 23.9531 10.7656ZM8.0625 10.4375L11.9062 14.3281L13.8281 12.4062L12.6094 11.2344L11.4375 12.4062L10.0312 11L11.2031 9.82812L9.9375 8.5625L8.0625 10.4375ZM19.2656 17.8906L18.0469 16.6719L16.1719 18.5469L20.0625 22.4375L21.9375 20.5625L20.6719 19.2969L19.5 20.4688L18.0938 19.0625L19.2656 17.8906ZM9.42188 22.4844L19.0312 12.875L18.8906 12.7812L17.625 11.4688L8.01562 21.0781V22.4844H9.42188ZM19.0312 10.0625L20.4375 11.4688L21.8438 10.0625L20.4375 8.65625L19.0312 10.0625Z", fill: "currentColor" }) }));
|
|
7
|
+
});
|
|
@@ -257,6 +257,7 @@ export { PageArticleIcon } from './PageArticleIcon';
|
|
|
257
257
|
export { PauseIcon } from './PauseIcon';
|
|
258
258
|
export { PaymentIcon } from './PaymentIcon';
|
|
259
259
|
export { PenDrawingIcon } from './PenDrawingIcon';
|
|
260
|
+
export { PenRulerIcon } from './PenRulerIcon';
|
|
260
261
|
export { PersonAddDisabledIcon } from './PersonAddDisabledIcon';
|
|
261
262
|
export { PersonUserAccountIcon } from './PersonUserAccountIcon';
|
|
262
263
|
export { PhoneCallbackIcon } from './PhoneCallbackIcon';
|
|
@@ -257,6 +257,7 @@ export { PageArticleIcon } from './PageArticleIcon';
|
|
|
257
257
|
export { PauseIcon } from './PauseIcon';
|
|
258
258
|
export { PaymentIcon } from './PaymentIcon';
|
|
259
259
|
export { PenDrawingIcon } from './PenDrawingIcon';
|
|
260
|
+
export { PenRulerIcon } from './PenRulerIcon';
|
|
260
261
|
export { PersonAddDisabledIcon } from './PersonAddDisabledIcon';
|
|
261
262
|
export { PersonUserAccountIcon } from './PersonUserAccountIcon';
|
|
262
263
|
export { PhoneCallbackIcon } from './PhoneCallbackIcon';
|