armtek-uikit-react 1.0.72 → 1.0.74
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/Link.scss +3 -0
- package/assets/ListItem.scss +15 -0
- package/package.json +1 -1
- package/ui/Adornment/Adornment.d.ts +2 -0
- package/ui/Adornment/Adornment.js +2 -1
- package/ui/Form/Checkbox/Checkbox.d.ts +2 -1
- package/ui/Link/Link.d.ts +2 -0
- package/ui/Link/Link.js +4 -2
- package/ui/List/ListItem.d.ts +2 -0
- package/ui/List/ListItem.js +6 -1
package/assets/Link.scss
CHANGED
package/assets/ListItem.scss
CHANGED
|
@@ -51,4 +51,19 @@
|
|
|
51
51
|
margin-top: calc($size-step / 2);
|
|
52
52
|
display: block;
|
|
53
53
|
color: $color-neutral-light;
|
|
54
|
+
}
|
|
55
|
+
.listitem_dark{
|
|
56
|
+
background-color: var(--color-gray-700);
|
|
57
|
+
color: var(--color-gray-200);
|
|
58
|
+
&:hover{
|
|
59
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
60
|
+
}
|
|
61
|
+
&.listitem_active,
|
|
62
|
+
&:active{
|
|
63
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
64
|
+
}
|
|
65
|
+
&.listitem_disabled{
|
|
66
|
+
color: var(--color-gray-600);
|
|
67
|
+
background-color: var(--color-gray-700);
|
|
68
|
+
}
|
|
54
69
|
}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"armtek-uikit-react","version":"1.0.
|
|
1
|
+
{"name":"armtek-uikit-react","version":"1.0.74","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":"*"},"peerDependencies":{"react":"*","react-dom":"*"},"scripts":{"pub":"npm version patch && npm publish"}}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { ThemeType } from '../../types/theme';
|
|
2
3
|
type PropsType = {
|
|
3
4
|
position?: 'start' | 'end';
|
|
5
|
+
theme?: ThemeType;
|
|
4
6
|
} & HTMLAttributes<HTMLDivElement>;
|
|
5
7
|
declare const Adornment: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
|
|
6
8
|
export declare const AdornmentContainer: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
2
|
import css from "./Adornment.module.scss";
|
|
3
|
-
// import { getCssPrefix } from 'lib/helpers/helpers'
|
|
4
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
4
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
5
|
+
// import { getCssPrefix } from 'lib/helpers/helpers'
|
|
6
|
+
|
|
6
7
|
const AdornmentClasses = ['adornmentContainer', 'adornmentContainer_end', 'adornment_start', 'adornment_end'];
|
|
7
8
|
|
|
8
9
|
// const css = getCssPrefix(AdornmentClasses)
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { ColorType, SizeType, VariantType } from '../../../types/theme';
|
|
2
|
+
import { ColorType, SizeType, ThemeType, VariantType } from '../../../types/theme';
|
|
3
3
|
type BaseCheckboxPropsType = {
|
|
4
4
|
label?: string | ReactNode;
|
|
5
5
|
size?: Exclude<SizeType, 'extraLarge'>;
|
|
6
6
|
color?: ColorType;
|
|
7
|
+
theme?: ThemeType;
|
|
7
8
|
variant?: Exclude<VariantType, 'transparent'>;
|
|
8
9
|
intermediate?: boolean;
|
|
9
10
|
};
|
package/ui/Link/Link.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ElementType } from 'react';
|
|
2
|
+
import { ThemeType } from '../../types/theme';
|
|
2
3
|
type LinkType = 'a';
|
|
3
4
|
type OwnProps<T extends ElementType = LinkType> = {
|
|
4
5
|
border?: 'solid' | 'dotted' | 'dashed';
|
|
5
6
|
as?: T;
|
|
6
7
|
disabled?: boolean;
|
|
8
|
+
theme?: ThemeType;
|
|
7
9
|
};
|
|
8
10
|
export type LinkProps<T extends ElementType = LinkType> = OwnProps<T> & Omit<ComponentPropsWithoutRef<T>, keyof OwnProps<T>>;
|
|
9
11
|
declare const Link: <T extends ElementType = "a">(props: LinkProps<T>) => import("react/jsx-runtime").JSX.Element;
|
package/ui/Link/Link.js
CHANGED
|
@@ -4,10 +4,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
4
4
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
5
5
|
const Link = props => {
|
|
6
6
|
let {
|
|
7
|
-
border
|
|
7
|
+
border,
|
|
8
8
|
children,
|
|
9
9
|
disabled,
|
|
10
10
|
className,
|
|
11
|
+
theme,
|
|
11
12
|
as,
|
|
12
13
|
...restProps
|
|
13
14
|
} = props;
|
|
@@ -17,7 +18,8 @@ const Link = props => {
|
|
|
17
18
|
...restProps,
|
|
18
19
|
className: clsx('Arm-link', css.link, {
|
|
19
20
|
[css.link_border]: !!border,
|
|
20
|
-
[css.link_disabled]: !!disabled
|
|
21
|
+
[css.link_disabled]: !!disabled,
|
|
22
|
+
[css.link_dark]: theme === 'dark'
|
|
21
23
|
}, css['link_border_' + border], className),
|
|
22
24
|
children: children
|
|
23
25
|
})
|
package/ui/List/ListItem.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, ComponentPropsWithoutRef, ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { ThemeType } from '../../types/theme';
|
|
2
3
|
export type OwnProps<T extends ElementType = ElementType> = {
|
|
3
4
|
active?: boolean;
|
|
4
5
|
checked?: boolean;
|
|
5
6
|
divider?: boolean;
|
|
6
7
|
endAdornment?: string | ReactNode;
|
|
7
8
|
startAdornment?: string | ReactNode;
|
|
9
|
+
theme?: ThemeType;
|
|
8
10
|
as?: T;
|
|
9
11
|
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
10
12
|
export type ListItemProps<T extends ElementType = ElementType<HTMLAttributes<HTMLButtonElement>>> = OwnProps<T> & Omit<ComponentPropsWithoutRef<T>, keyof OwnProps>;
|
package/ui/List/ListItem.js
CHANGED
|
@@ -15,6 +15,7 @@ function ListItem(props) {
|
|
|
15
15
|
className,
|
|
16
16
|
title,
|
|
17
17
|
active,
|
|
18
|
+
theme,
|
|
18
19
|
divider,
|
|
19
20
|
checked,
|
|
20
21
|
startAdornment,
|
|
@@ -32,18 +33,21 @@ function ListItem(props) {
|
|
|
32
33
|
[css.listitem_divider]: !!divider,
|
|
33
34
|
[css.listitem_disabled]: !!restProps.disabled,
|
|
34
35
|
[css.listitem_endAdornment]: !!endAdornment,
|
|
35
|
-
[css.listitem_startAdornment]: withStartAdornment
|
|
36
|
+
[css.listitem_startAdornment]: withStartAdornment,
|
|
37
|
+
[css.listitem_dark]: theme === 'dark'
|
|
36
38
|
}),
|
|
37
39
|
children: [withStartAdornment && /*#__PURE__*/_jsxs(AdornmentContainer, {
|
|
38
40
|
children: [checked !== undefined && /*#__PURE__*/_jsx(Adornment, {
|
|
39
41
|
position: 'start',
|
|
40
42
|
children: /*#__PURE__*/_jsx(Checkbox, {
|
|
43
|
+
theme: theme,
|
|
41
44
|
disabled: restProps.disabled,
|
|
42
45
|
checked: checked,
|
|
43
46
|
readOnly: true,
|
|
44
47
|
size: 'small'
|
|
45
48
|
})
|
|
46
49
|
}), !!startAdornment && /*#__PURE__*/_jsx(Adornment, {
|
|
50
|
+
theme: theme,
|
|
47
51
|
position: 'start',
|
|
48
52
|
children: startAdornment
|
|
49
53
|
})]
|
|
@@ -61,6 +65,7 @@ function ListItem(props) {
|
|
|
61
65
|
}), !!endAdornment && /*#__PURE__*/_jsx(AdornmentContainer, {
|
|
62
66
|
position: 'end',
|
|
63
67
|
children: /*#__PURE__*/_jsx(Adornment, {
|
|
68
|
+
theme: theme,
|
|
64
69
|
position: 'end',
|
|
65
70
|
children: endAdornment
|
|
66
71
|
})
|