@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.
@@ -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: "select-associated-tag", 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 }))] }));
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[]}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { PayloadInfo } from '@antscorp/antsomi-ui/es/types';
3
2
  export type TDisplayFormat = 'number' | 'percentage' | 'currency' | 'datetime';
4
3
  type DisplayFormatProps = {
@@ -3,5 +3,4 @@
3
3
  * Asynchronously loads the component for TemplateListing
4
4
  *
5
5
  */
6
- /// <reference types="react" />
7
6
  export declare const TemplateListing: (props: import("./types").TemplateListingProps<{}>) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.990",
3
+ "version": "1.3.5-beta.991",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",