armtek-uikit-react 1.0.64 → 1.0.65

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 CHANGED
@@ -1 +1 @@
1
- {"name":"armtek-uikit-react","version":"1.0.64","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
+ {"name":"armtek-uikit-react","version":"1.0.65","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,7 +1,7 @@
1
1
  import { ReactNode, MouseEvent } from 'react';
2
2
  export type BackDropProps = {
3
3
  children: ReactNode;
4
- width: number;
4
+ width?: number;
5
5
  onClick?: (e: MouseEvent<HTMLDivElement>) => void;
6
6
  };
7
7
  export declare const BackDropBase: (props: BackDropProps) => import("react/jsx-runtime").JSX.Element;
@@ -5,7 +5,7 @@ import { Fragment as _Fragment } from "react/jsx-runtime";
5
5
  export const BackDropBase = props => {
6
6
  const {
7
7
  children,
8
- width,
8
+ width = 500,
9
9
  onClick
10
10
  } = props;
11
11
  const handleClick = e => {
@@ -9,6 +9,10 @@ export type FormControlsProps = {
9
9
  cancelProps?: Omit<ButtonProps<'button'>, 'children'> & {
10
10
  text: string;
11
11
  };
12
+ classes?: {
13
+ submitBtn?: string;
14
+ cancelBtn?: string;
15
+ };
12
16
  } & ComponentPropsWithoutRef<'div'>;
13
17
  declare const FormControls: (props: FormControlsProps) => import("react/jsx-runtime").JSX.Element;
14
18
  export default FormControls;
@@ -11,11 +11,13 @@ const FormControls = props => {
11
11
  submitProps,
12
12
  cancelProps,
13
13
  className,
14
+ classes,
14
15
  ...divProps
15
16
  } = props;
16
17
  return /*#__PURE__*/_jsx(_Fragment, {
17
18
  children: /*#__PURE__*/_jsxs("div", {
18
- className: clsx('Arm-FormControls', css.FormControls),
19
+ ...divProps,
20
+ className: clsx(className, 'Arm-FormControls', css.FormControls),
19
21
  children: [/*#__PURE__*/_jsx("div", {
20
22
  className: clsx('Arm-FormControls__button', css.FormControls__button),
21
23
  children: /*#__PURE__*/_jsx(Button, {
@@ -23,7 +25,7 @@ const FormControls = props => {
23
25
  color: 'primary',
24
26
  onClick: onSubmit,
25
27
  ...submitProps,
26
- className: clsx('Arm-FormControls__btn', css.FormControls__btn),
28
+ className: clsx('Arm-FormControls__btn', classes == null ? void 0 : classes.submitBtn, css.FormControls__btn),
27
29
  children: submitProps == null ? void 0 : submitProps.text
28
30
  })
29
31
  }), onCancel && /*#__PURE__*/_jsx("div", {
@@ -33,7 +35,7 @@ const FormControls = props => {
33
35
  color: 'primary',
34
36
  onClick: onCancel,
35
37
  ...cancelProps,
36
- className: clsx('Arm-FormControls__btn', css.FormControls__btn),
38
+ className: clsx('Arm-FormControls__btn', classes == null ? void 0 : classes.cancelBtn, css.FormControls__btn),
37
39
  children: cancelProps == null ? void 0 : cancelProps.text
38
40
  })
39
41
  })]
@@ -48,8 +48,10 @@ const Period = /*#__PURE__*/forwardRef((props, ref) => {
48
48
  variant: 'transparent',
49
49
  color: 'neutral',
50
50
  onClick: handleClick,
51
- className: 'material_icon',
52
- children: "calendar_today"
51
+ children: /*#__PURE__*/_jsx("span", {
52
+ className: 'material_icon',
53
+ children: "calendar_today"
54
+ })
53
55
  })
54
56
  }), active && /*#__PURE__*/_jsx(Card, {
55
57
  className: css.dateField__picker,
@@ -86,6 +86,7 @@ function Select(props) {
86
86
  children: endAdornment
87
87
  }), /*#__PURE__*/_jsx(ButtonIcon, {
88
88
  size: 'small',
89
+ color: 'neutral',
89
90
  variant: 'transparent',
90
91
  children: /*#__PURE__*/_jsx("span", {
91
92
  className: 'material_icon',
@@ -1,7 +1,7 @@
1
1
  import { ComponentPropsWithoutRef, MouseEvent } from 'react';
2
2
  import { FormControlsProps } from '../../ui/Form/FormControls';
3
- export type BaseModalProps = ComponentPropsWithoutRef<'div'> & FormControlsProps & {
4
- onClose: (e: MouseEvent) => void;
3
+ export type BaseModalProps = ComponentPropsWithoutRef<'div'> & Partial<FormControlsProps> & {
4
+ onClose?: (e: MouseEvent) => void;
5
5
  classes?: Record<string, string>;
6
6
  };
7
7
  export declare const BaseModal: (props: BaseModalProps) => import("react/jsx-runtime").JSX.Element;
@@ -18,7 +18,7 @@ export const BaseModal = props => {
18
18
  classes,
19
19
  ...divProps
20
20
  } = props;
21
- const showControls = !!onSubmit || !!onCancel;
21
+ const showControls = !!onSubmit;
22
22
  return /*#__PURE__*/_jsx(_Fragment, {
23
23
  children: /*#__PURE__*/_jsxs("div", {
24
24
  ...divProps,
package/ui/Modal/Modal.js CHANGED
@@ -2,7 +2,6 @@ import { BaseModal } from "./BaseModal";
2
2
  import BackDrop from "../BackDrop";
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
4
  import { Fragment as _Fragment } from "react/jsx-runtime";
5
- //TODO Написать тесты
6
5
  const Modal = props => {
7
6
  const {
8
7
  open,
@@ -15,8 +14,7 @@ const Modal = props => {
15
14
  width: width,
16
15
  onClick: modalProps.onClose,
17
16
  children: /*#__PURE__*/_jsx(BaseModal, {
18
- ...modalProps,
19
- className: 'moasda'
17
+ ...modalProps
20
18
  })
21
19
  })
22
20
  });
package/ui/Table/Table.js CHANGED
@@ -5,7 +5,6 @@ import css from "./Table.module.scss";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
7
7
  import { Fragment as _Fragment } from "react/jsx-runtime";
8
- // TODO TESTS
9
8
  export function Table(props) {
10
9
  const {
11
10
  className,