armtek-uikit-react 1.0.17 → 1.0.18
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/index.d.ts +2 -2
- package/index.js +1 -1
- package/package.json +1 -1
- package/ui/Adornment/Adornment.module.scss +0 -1
- package/ui/Adornment/index.d.ts +2 -0
- package/ui/Adornment/index.js +2 -0
- package/ui/Alert/index.d.ts +3 -0
- package/ui/Alert/index.js +2 -0
- package/ui/Avatar/index.d.ts +4 -0
- package/ui/Avatar/index.js +3 -0
- package/ui/Button/Button.d.ts +15 -0
- package/ui/Button/Button.js +42 -0
- package/ui/Button/index.d.ts +3 -15
- package/ui/Button/index.js +2 -42
- package/ui/ButtonIcon/index.d.ts +1 -1
- package/ui/ButtonIcon/index.js +1 -1
- package/ui/Loader/Loader.d.ts +2 -1
- package/ui/Loader/Loader.js +7 -1
- package/ui/Stepper/StepItem.d.ts +1 -1
- package/ui/Stepper/StepItem.js +2 -2
- /package/ui/ButtonGroup/{index.d.ts → ButtonGroup.d.ts} +0 -0
- /package/ui/ButtonGroup/{index.js → ButtonGroup.js} +0 -0
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { default as Button } from './ui/Button';
|
|
1
|
+
export { default as Button } from './ui/Button/Button';
|
|
2
2
|
export { default as ButtonIcon } from './ui/ButtonIcon';
|
|
3
|
-
export type { ButtonProps } from './ui/Button';
|
|
3
|
+
export type { ButtonProps } from './ui/Button/Button';
|
|
4
4
|
export { default as Alert } from './ui/Alert/Alert';
|
|
5
5
|
export type { AlertProps } from './ui/Alert/Alert';
|
|
6
6
|
export { default as Avatar } from './ui/Avatar/Avatar';
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as Button } from "./ui/Button";
|
|
1
|
+
export { default as Button } from "./ui/Button/Button";
|
|
2
2
|
export { default as ButtonIcon } from "./ui/ButtonIcon";
|
|
3
3
|
export { default as Alert } from "./ui/Alert/Alert";
|
|
4
4
|
export { default as Avatar } from "./ui/Avatar/Avatar";
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"armtek-uikit-react","version":"1.0.
|
|
1
|
+
{"name":"armtek-uikit-react","version":"1.0.18","description":"Armtek UIKit for React","repository":{"type":"git","url":"ssh://git@gl.corp:10022/int/uikit/uikit_react.git"},"author":"","license":"ISC","dependencies":{"rc-slider":"^10.2.1","react":"*","react-datepicker":"^4.16.0","react-dom":"*"},"peerDependencies":{"react":"*","react-dom":"*"},"scripts":{"pub":"npm version patch && npm publish"}}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { ColorThemeType, ColorType, SizeType, VariantType } from '../../types/theme';
|
|
3
|
+
type OwnProps<T extends ElementType = ElementType> = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
size?: SizeType;
|
|
6
|
+
color?: ColorType | Exclude<ColorThemeType, 'white'>;
|
|
7
|
+
variant?: VariantType;
|
|
8
|
+
startAdornment?: string | ReactNode;
|
|
9
|
+
endAdornment?: string | ReactNode;
|
|
10
|
+
group?: 'inline' | 'column';
|
|
11
|
+
as?: T;
|
|
12
|
+
};
|
|
13
|
+
export type ButtonProps<T extends ElementType = ElementType<HTMLAttributes<HTMLButtonElement>>> = OwnProps<T> & Omit<ComponentPropsWithoutRef<T>, keyof OwnProps>;
|
|
14
|
+
declare const Button: <T extends ElementType>(props: ButtonProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default Button;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
import css from "./Button.module.scss";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
|
+
const ButtonClasses = ['button', 'button_contained', 'button_transparent', 'button_outlined', 'button_primary', 'button_secondary', 'button_neutral', 'button_black', 'button__adornment', 'button__adornment_end', 'button__adornment_start', 'button_large', 'button_medium', 'button_small', 'button_icon', 'button_group', 'button_group_inline', 'button_group_column', 'button_grouped_inline', 'button_grouped_column'];
|
|
7
|
+
|
|
8
|
+
// const css = getCssPrefix(ButtonClasses)
|
|
9
|
+
|
|
10
|
+
const Button = props => {
|
|
11
|
+
let {
|
|
12
|
+
size = 'extraLarge',
|
|
13
|
+
color = 'primary',
|
|
14
|
+
variant = 'contained',
|
|
15
|
+
endAdornment,
|
|
16
|
+
startAdornment,
|
|
17
|
+
children,
|
|
18
|
+
className,
|
|
19
|
+
group,
|
|
20
|
+
as,
|
|
21
|
+
...restProps
|
|
22
|
+
} = props;
|
|
23
|
+
let Component = as || 'button';
|
|
24
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
25
|
+
children: /*#__PURE__*/_jsxs(Component, {
|
|
26
|
+
...restProps,
|
|
27
|
+
className: clsx(css.button, css['button_' + size], css['button_' + variant], css['button_' + color], className, {
|
|
28
|
+
[css['button_grouped_' + group]]: group
|
|
29
|
+
}),
|
|
30
|
+
children: [startAdornment && /*#__PURE__*/_jsx("div", {
|
|
31
|
+
className: clsx(css.button__adornment, css.button__adornment_start),
|
|
32
|
+
children: startAdornment
|
|
33
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
34
|
+
children: children
|
|
35
|
+
}), endAdornment && /*#__PURE__*/_jsx("div", {
|
|
36
|
+
className: clsx(css.button__adornment, css.button__adornment_end),
|
|
37
|
+
children: endAdornment
|
|
38
|
+
})]
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
export default Button;
|
package/ui/Button/index.d.ts
CHANGED
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
type
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
size?: SizeType;
|
|
6
|
-
color?: ColorType | Exclude<ColorThemeType, 'white'>;
|
|
7
|
-
variant?: VariantType;
|
|
8
|
-
startAdornment?: string | ReactNode;
|
|
9
|
-
endAdornment?: string | ReactNode;
|
|
10
|
-
group?: 'inline' | 'column';
|
|
11
|
-
as?: T;
|
|
12
|
-
};
|
|
13
|
-
export type ButtonProps<T extends ElementType = ElementType<HTMLAttributes<HTMLButtonElement>>> = OwnProps<T> & Omit<ComponentPropsWithoutRef<T>, keyof OwnProps>;
|
|
14
|
-
declare const Index: <T extends ElementType>(props: ButtonProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export default Index;
|
|
1
|
+
import Button, { ButtonProps } from './Button';
|
|
2
|
+
export { Button };
|
|
3
|
+
export type { ButtonProps };
|
package/ui/Button/index.js
CHANGED
|
@@ -1,42 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
|
-
const ButtonClasses = ['button', 'button_contained', 'button_transparent', 'button_outlined', 'button_primary', 'button_secondary', 'button_neutral', 'button_black', 'button__adornment', 'button__adornment_end', 'button__adornment_start', 'button_large', 'button_medium', 'button_small', 'button_icon', 'button_group', 'button_group_inline', 'button_group_column', 'button_grouped_inline', 'button_grouped_column'];
|
|
7
|
-
|
|
8
|
-
// const css = getCssPrefix(ButtonClasses)
|
|
9
|
-
|
|
10
|
-
const Index = props => {
|
|
11
|
-
let {
|
|
12
|
-
size = 'extraLarge',
|
|
13
|
-
color = 'primary',
|
|
14
|
-
variant = 'contained',
|
|
15
|
-
endAdornment,
|
|
16
|
-
startAdornment,
|
|
17
|
-
children,
|
|
18
|
-
className,
|
|
19
|
-
group,
|
|
20
|
-
as,
|
|
21
|
-
...restProps
|
|
22
|
-
} = props;
|
|
23
|
-
let Component = as || 'button';
|
|
24
|
-
return /*#__PURE__*/_jsx(_Fragment, {
|
|
25
|
-
children: /*#__PURE__*/_jsxs(Component, {
|
|
26
|
-
...restProps,
|
|
27
|
-
className: clsx(css.button, css['button_' + size], css['button_' + variant], css['button_' + color], className, {
|
|
28
|
-
[css['button_grouped_' + group]]: group
|
|
29
|
-
}),
|
|
30
|
-
children: [startAdornment && /*#__PURE__*/_jsx("div", {
|
|
31
|
-
className: clsx(css.button__adornment, css.button__adornment_start),
|
|
32
|
-
children: startAdornment
|
|
33
|
-
}), /*#__PURE__*/_jsx("div", {
|
|
34
|
-
children: children
|
|
35
|
-
}), endAdornment && /*#__PURE__*/_jsx("div", {
|
|
36
|
-
className: clsx(css.button__adornment, css.button__adornment_end),
|
|
37
|
-
children: endAdornment
|
|
38
|
-
})]
|
|
39
|
-
})
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
export default Index;
|
|
1
|
+
import Button from "./Button";
|
|
2
|
+
export { Button };
|
package/ui/ButtonIcon/index.d.ts
CHANGED
package/ui/ButtonIcon/index.js
CHANGED
package/ui/Loader/Loader.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SizeType } from '../../types/theme';
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
2
3
|
export type LoaderProps = {
|
|
3
4
|
size?: SizeType;
|
|
4
|
-
}
|
|
5
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
5
6
|
declare const Loader: (props: LoaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export default Loader;
|
package/ui/Loader/Loader.js
CHANGED
|
@@ -8,11 +8,17 @@ const CssClasses = ['loader'];
|
|
|
8
8
|
// const css = getCssPrefix(CssClasses)
|
|
9
9
|
|
|
10
10
|
const Loader = props => {
|
|
11
|
+
let {
|
|
12
|
+
size,
|
|
13
|
+
className,
|
|
14
|
+
...divProps
|
|
15
|
+
} = props;
|
|
11
16
|
let width = props.size === 'large' ? 25 : props.size === 'medium' ? 23 : props.size === 'small' ? 21 : 27;
|
|
12
17
|
let height = props.size === 'large' ? 24 : props.size === 'medium' ? 22 : props.size === 'small' ? 20 : 26;
|
|
13
18
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
14
19
|
children: /*#__PURE__*/_jsx("div", {
|
|
15
|
-
|
|
20
|
+
...divProps,
|
|
21
|
+
className: clsx(css.loader, 'material_icon', className),
|
|
16
22
|
children: /*#__PURE__*/_jsxs("svg", {
|
|
17
23
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18
24
|
width: width,
|
package/ui/Stepper/StepItem.d.ts
CHANGED
package/ui/Stepper/StepItem.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import StepItemIcon from "./StepItemIcon";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import
|
|
3
|
+
import Button from "../Button/Button";
|
|
4
4
|
import css from "./StepItem.module.scss";
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -43,7 +43,7 @@ const StepItem = props => {
|
|
|
43
43
|
className: css.stepItem__content,
|
|
44
44
|
children: [content || children, !!button && /*#__PURE__*/_jsx("div", {
|
|
45
45
|
className: css.stepItem__button,
|
|
46
|
-
children: /*#__PURE__*/_jsx(
|
|
46
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
47
47
|
...buttonProps,
|
|
48
48
|
children: button
|
|
49
49
|
})
|
|
File without changes
|
|
File without changes
|