armtek-uikit-react 1.0.83 → 1.0.84
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/assets/Status.scss +6 -0
- package/package.json +1 -1
- package/ui/Status/Status.d.ts +7 -4
- package/ui/Status/Status.js +11 -3
package/assets/Status.scss
CHANGED
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
align-items: center;
|
|
6
6
|
padding: 3px 8px 1px;
|
|
7
7
|
border-radius: 4px;
|
|
8
|
+
outline: none;
|
|
9
|
+
border:none;
|
|
10
|
+
font-family: inherit;
|
|
8
11
|
}
|
|
9
12
|
.status_primary{
|
|
10
13
|
background: rgba($color-primary-dark, 0.2);
|
|
@@ -42,4 +45,7 @@
|
|
|
42
45
|
margin-left: 4px;
|
|
43
46
|
font-size: 14px;
|
|
44
47
|
line-height: 1.5;
|
|
48
|
+
}
|
|
49
|
+
.status_size_medium{
|
|
50
|
+
height: 24px;
|
|
45
51
|
}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"armtek-uikit-react","version":"1.0.
|
|
1
|
+
{"name":"armtek-uikit-react","version":"1.0.84","description":"Armtek UIKit for React","repository":{"type":"git","url":"ssh://git@gl.corp:10022/int/uikit/uikit_react.git"},"author":"","license":"ISC","dependencies":{"build":"^0.1.4","clsx":"^2.0.0","rc-slider":"^10.2.1","react":"*","react-datepicker":"^4.16.0","react-dom":"*","react-transition-group":"^4.4.5"},"peerDependencies":{"react":"*","react-dom":"*"},"scripts":{"pub":"npm version patch && npm publish"}}
|
package/ui/Status/Status.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { ColorStatusType, ColorType } from '../../types/theme';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
1
|
+
import { ColorStatusType, ColorType, SizeType } from '../../types/theme';
|
|
2
|
+
import { ComponentPropsWithoutRef, ElementType, ReactNode } from 'react';
|
|
3
|
+
type OwnProps<T extends ElementType = 'span'> = {
|
|
4
4
|
color?: ColorType | ColorStatusType;
|
|
5
5
|
text?: string;
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
icon?: string;
|
|
8
|
+
size?: SizeType;
|
|
9
|
+
as?: T;
|
|
8
10
|
};
|
|
9
|
-
|
|
11
|
+
type StatusProps<T extends ElementType = 'span'> = OwnProps<T> & Omit<ComponentPropsWithoutRef<T>, keyof OwnProps<T>>;
|
|
12
|
+
declare function Status<T extends ElementType = 'span'>(props: StatusProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
10
13
|
export default Status;
|
package/ui/Status/Status.js
CHANGED
|
@@ -12,11 +12,19 @@ function Status(props) {
|
|
|
12
12
|
color,
|
|
13
13
|
icon,
|
|
14
14
|
text,
|
|
15
|
-
children
|
|
15
|
+
children,
|
|
16
|
+
as,
|
|
17
|
+
className,
|
|
18
|
+
size,
|
|
19
|
+
...restProps
|
|
16
20
|
} = props;
|
|
21
|
+
const Component = as || 'span';
|
|
17
22
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
18
|
-
children: /*#__PURE__*/_jsxs(
|
|
19
|
-
|
|
23
|
+
children: /*#__PURE__*/_jsxs(Component, {
|
|
24
|
+
...restProps,
|
|
25
|
+
className: clsx(css.status, css['status_' + color], className, {
|
|
26
|
+
[css['status_size_' + size]]: !!size
|
|
27
|
+
}),
|
|
20
28
|
children: [/*#__PURE__*/_jsx("span", {
|
|
21
29
|
className: css.status__content,
|
|
22
30
|
children: text || children
|