@antscorp/antsomi-ui 1.3.5-beta.990 → 1.3.5-beta.991
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/molecules/AddDynamicContent/components/DisplayFormat/DisplayFormat.d.ts +0 -1
- package/es/components/template/TemplateListing/Loadable.d.ts +0 -1
- 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[]}
|