armtek-uikit-react 1.0.134 → 1.0.136
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/package.json +1 -1
- package/ui/ButtonIcon/ButtonIcon.d.ts +28 -3
- package/ui/ButtonIcon/ButtonIcon.js +4 -2
- package/ui/Form/TimeField/TimeField.d.ts +25 -2
- package/ui/Form/TimeField/TimeField.js +4 -2
- package/ui/Pagination/Pagination.d.ts +1 -1
- package/ui/Pagination/Pagination.js +4 -4
- package/ui/Stack/Stack.js +1 -1
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"armtek-uikit-react","version":"1.0.
|
|
1
|
+
{"name":"armtek-uikit-react","version":"1.0.136","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"}}
|
|
@@ -1,4 +1,29 @@
|
|
|
1
|
-
import { ButtonProps } from '../Button/Button';
|
|
2
1
|
import { ElementType } from 'react';
|
|
3
|
-
declare
|
|
4
|
-
|
|
2
|
+
declare const _default: <T extends ElementType = "button">(props: {
|
|
3
|
+
size?: import("../../types/theme").SizeType | undefined;
|
|
4
|
+
color?: "black" | "green" | "red" | import("../../types/theme").ColorType | undefined;
|
|
5
|
+
variant?: import("../../types/theme").VariantType | undefined;
|
|
6
|
+
startAdornment?: import("react").ReactNode;
|
|
7
|
+
endAdornment?: import("react").ReactNode;
|
|
8
|
+
group?: "column" | "inline" | undefined;
|
|
9
|
+
radius?: boolean | undefined;
|
|
10
|
+
asIcon?: boolean | undefined;
|
|
11
|
+
theme?: import("../../types/theme").ThemeType | undefined;
|
|
12
|
+
fullWidth?: boolean | undefined;
|
|
13
|
+
disableStyles?: boolean | undefined;
|
|
14
|
+
as?: T | undefined;
|
|
15
|
+
} & Omit<import("react").PropsWithoutRef<import("react").ComponentProps<T>>, keyof {
|
|
16
|
+
size?: import("../../types/theme").SizeType | undefined;
|
|
17
|
+
color?: "black" | "green" | "red" | import("../../types/theme").ColorType | undefined;
|
|
18
|
+
variant?: import("../../types/theme").VariantType | undefined;
|
|
19
|
+
startAdornment?: import("react").ReactNode;
|
|
20
|
+
endAdornment?: import("react").ReactNode;
|
|
21
|
+
group?: "column" | "inline" | undefined;
|
|
22
|
+
radius?: boolean | undefined;
|
|
23
|
+
asIcon?: boolean | undefined;
|
|
24
|
+
theme?: import("../../types/theme").ThemeType | undefined;
|
|
25
|
+
fullWidth?: boolean | undefined;
|
|
26
|
+
disableStyles?: boolean | undefined;
|
|
27
|
+
as?: T_1 | undefined;
|
|
28
|
+
}> & import("react").RefAttributes<T>) => import("react").ReactNode;
|
|
29
|
+
export default _default;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import Button from "../Button/Button";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
+
import { fixedForwardRef } from "../../lib/helpers";
|
|
3
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
5
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
5
|
-
function ButtonIcon(props) {
|
|
6
|
+
function ButtonIcon(props, ref) {
|
|
6
7
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
7
8
|
children: /*#__PURE__*/_jsx(Button, {
|
|
8
9
|
color: 'neutral',
|
|
9
10
|
variant: 'transparent',
|
|
10
11
|
...props,
|
|
12
|
+
ref: ref,
|
|
11
13
|
asIcon: true,
|
|
12
14
|
className: clsx('arm-button-icon', ['arm-button-icon_' + props.size], props.className, {
|
|
13
15
|
'arm-button-icon_square': props.radius === false,
|
|
@@ -17,4 +19,4 @@ function ButtonIcon(props) {
|
|
|
17
19
|
})
|
|
18
20
|
});
|
|
19
21
|
}
|
|
20
|
-
export default ButtonIcon;
|
|
22
|
+
export default fixedForwardRef(ButtonIcon);
|
|
@@ -1,3 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const TimeField: import("react").ForwardRefExoticComponent<{
|
|
2
|
+
onClick?: ((e: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
3
|
+
format?: string | undefined;
|
|
4
|
+
onInput?: ((e: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
|
|
5
|
+
onChange?: ((e: import("../DateField/DateField").DateFieldChangeEvent) => void) | undefined;
|
|
6
|
+
value?: string | Date | null | undefined;
|
|
7
|
+
showTime?: boolean | undefined;
|
|
8
|
+
showTimeOnly?: boolean | undefined;
|
|
9
|
+
inputProps?: Omit<import("../TextField").TextFieldProps, "value" | "onChange"> | undefined;
|
|
10
|
+
} & {
|
|
11
|
+
label?: string | undefined;
|
|
12
|
+
placeholder?: string | undefined;
|
|
13
|
+
className?: string | undefined;
|
|
14
|
+
error?: boolean | undefined;
|
|
15
|
+
helperText?: import("react").ReactNode;
|
|
16
|
+
} & Omit<import("../DatePicker").DatePickerProps, keyof {
|
|
17
|
+
onClick?: ((e: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
18
|
+
format?: string | undefined;
|
|
19
|
+
onInput?: ((e: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
|
|
20
|
+
onChange?: ((e: import("../DateField/DateField").DateFieldChangeEvent) => void) | undefined;
|
|
21
|
+
value?: string | Date | null | undefined;
|
|
22
|
+
showTime?: boolean | undefined;
|
|
23
|
+
showTimeOnly?: boolean | undefined;
|
|
24
|
+
inputProps?: Omit<import("../TextField").TextFieldProps, "value" | "onChange"> | undefined;
|
|
25
|
+
}> & import("react").RefAttributes<HTMLInputElement>>;
|
|
3
26
|
export default TimeField;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import DateField from "../DateField/DateField";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
2
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
4
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
4
|
-
const TimeField = props => {
|
|
5
|
+
const TimeField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
5
6
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
6
7
|
children: /*#__PURE__*/_jsx(DateField, {
|
|
7
8
|
...props,
|
|
8
9
|
showTime: true,
|
|
10
|
+
ref: ref,
|
|
9
11
|
showTimeOnly: true,
|
|
10
12
|
format: 'HH'
|
|
11
13
|
})
|
|
12
14
|
});
|
|
13
|
-
};
|
|
15
|
+
});
|
|
14
16
|
export default TimeField;
|
|
@@ -9,7 +9,7 @@ export type PaginationProps = OwnProps & Omit<Partial<PaginationPerPageProps>, k
|
|
|
9
9
|
export declare const Pagination: (props: PaginationProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
10
|
type PaginationPerPageProps = {
|
|
11
11
|
pageSizes: number[];
|
|
12
|
-
|
|
12
|
+
pageSizeLabel?: string;
|
|
13
13
|
onPageSizeSelect: (value: number) => void;
|
|
14
14
|
};
|
|
15
15
|
export default Pagination;
|
|
@@ -15,7 +15,7 @@ export const Pagination = props => {
|
|
|
15
15
|
const {
|
|
16
16
|
pageSize,
|
|
17
17
|
pageSizes,
|
|
18
|
-
|
|
18
|
+
pageSizeLabel,
|
|
19
19
|
total,
|
|
20
20
|
page,
|
|
21
21
|
onPageSizeSelect,
|
|
@@ -109,7 +109,7 @@ const PaginationPerPage = props => {
|
|
|
109
109
|
const {
|
|
110
110
|
pageSize,
|
|
111
111
|
pageSizes,
|
|
112
|
-
|
|
112
|
+
pageSizeLabel,
|
|
113
113
|
onPageSizeSelect
|
|
114
114
|
} = props;
|
|
115
115
|
const [visible, setVisible] = useState(false);
|
|
@@ -123,9 +123,9 @@ const PaginationPerPage = props => {
|
|
|
123
123
|
spacing: 'small',
|
|
124
124
|
center: true,
|
|
125
125
|
className: 'flex items-center',
|
|
126
|
-
children: [
|
|
126
|
+
children: [pageSizeLabel && /*#__PURE__*/_jsx("div", {
|
|
127
127
|
className: 'text-small',
|
|
128
|
-
children:
|
|
128
|
+
children: pageSizeLabel
|
|
129
129
|
}), /*#__PURE__*/_jsx(Button, {
|
|
130
130
|
variant: 'transparent',
|
|
131
131
|
onClick: () => setVisible(true),
|
package/ui/Stack/Stack.js
CHANGED
|
@@ -20,7 +20,7 @@ const Stack = props => {
|
|
|
20
20
|
} = props;
|
|
21
21
|
let childrenProp;
|
|
22
22
|
if (Array.isArray(children)) {
|
|
23
|
-
childrenProp = wrapItem(children, spacing).flat();
|
|
23
|
+
childrenProp = wrapItem(children.filter(Boolean), spacing).flat();
|
|
24
24
|
|
|
25
25
|
// childrenProp = children.map((child, index) => {
|
|
26
26
|
// return cloneElement(<StackItem key={index} spacing={spacing}>{child}</StackItem>)
|