armtek-uikit-react 1.0.22 → 1.0.23

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.
@@ -262,8 +262,12 @@
262
262
  }
263
263
  }
264
264
  }
265
+
265
266
  .button_grouped_column{
266
267
  border-radius: 0;
268
+ &:not(:first-child){
269
+ border-top-color: transparent;
270
+ }
267
271
  &:first-child{
268
272
  border-top-left-radius: $radius;
269
273
  border-top-right-radius: $radius;
@@ -9,4 +9,4 @@
9
9
  }
10
10
  .button_group_column{
11
11
  flex-direction: column;
12
- }
12
+ }
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"armtek-uikit-react","version":"1.0.22","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"}}
1
+ {"name":"armtek-uikit-react","version":"1.0.23","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"}}
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { AvatarProps } from '../Avatar/Avatar';
2
+ import { AvatarProps } from '../../ui/Avatar/Avatar';
3
3
  export type AvatarGroupProps = {
4
4
  limit?: number;
5
5
  children: ReactNode;
@@ -1,6 +1,6 @@
1
- import { HTMLAttributes } from 'react';
1
+ import { ButtonProps } from '../../ui/Button';
2
2
  type PropsType = {
3
3
  orientation?: 'column' | 'inline';
4
- } & HTMLAttributes<HTMLDivElement>;
4
+ } & ButtonProps;
5
5
  declare const ButtonGroup: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
6
6
  export default ButtonGroup;
@@ -1,5 +1,6 @@
1
+ import { Children, cloneElement, isValidElement } from 'react';
1
2
  import clsx from 'clsx';
2
- import css from "../Button/Button.module.scss";
3
+ import css from "./ButtonGroup.module.scss";
3
4
  import { jsx as _jsx } from "react/jsx-runtime";
4
5
  import { Fragment as _Fragment } from "react/jsx-runtime";
5
6
  const ButtonGroupClasses = ['button_group', 'button_group_inline', 'button_group_column'];
@@ -11,13 +12,20 @@ const ButtonGroup = props => {
11
12
  orientation = 'inline',
12
13
  className,
13
14
  children,
14
- ...restProps
15
+ ...buttonProps
15
16
  } = props;
17
+ let arrChildren = Children.toArray(children);
16
18
  return /*#__PURE__*/_jsx(_Fragment, {
17
19
  children: /*#__PURE__*/_jsx("div", {
18
- ...restProps,
19
20
  className: clsx(css.button_group, css['button_group_' + orientation], className),
20
- children: children
21
+ children: arrChildren.map((item, index) => {
22
+ return /*#__PURE__*/isValidElement(item) && /*#__PURE__*/cloneElement(item, {
23
+ ...item.props,
24
+ ...buttonProps,
25
+ group: orientation,
26
+ key: index
27
+ });
28
+ })
21
29
  })
22
30
  });
23
31
  };