armtek-uikit-react 1.0.118 → 1.0.120

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.
@@ -11,8 +11,16 @@
11
11
  align-items: center;
12
12
  justify-content: center;
13
13
  }
14
-
14
+ .BackDropBase__overlay{
15
+ width: 100%;
16
+ height: 100%;
17
+ left: 0;
18
+ top: 0;
19
+ position: absolute;
20
+ }
15
21
  .BackDropBase__inner{
22
+ position: relative;
23
+ z-index: 2;
16
24
  max-width: 500px;
17
25
  width: 100%;
18
26
  }
@@ -39,9 +39,7 @@
39
39
  .button_radius_none{
40
40
  border-radius: 0;
41
41
  }
42
- .button_radius_full{
43
- border-radius: 30px;
44
- }
42
+
45
43
  .button_contained {
46
44
  &.button_primary{
47
45
  color: #fff;
@@ -79,7 +77,7 @@
79
77
  background: var(--color-gray-600);
80
78
  }
81
79
  &:disabled{
82
- background: var(--color-secondary-light);
80
+ background: var(--color-neutral-light);
83
81
  }
84
82
  }
85
83
  &.button_black {
@@ -92,7 +90,7 @@
92
90
  background: var(--color-gray-600);
93
91
  }
94
92
  &:disabled{
95
- background: var(--color-secondary-light);
93
+ background: var(--color-neutral-light);
96
94
  }
97
95
  }
98
96
  &.button_green {
@@ -25,4 +25,7 @@
25
25
  font-size: 16px;
26
26
  & .material_icon {font-size: 16px}
27
27
  }
28
- }
28
+ }
29
+ .ButtonIcon_square{
30
+ border-radius: 0;
31
+ }
@@ -2,35 +2,40 @@
2
2
 
3
3
  .checkbox{
4
4
  position: relative;
5
+ display: flex;
6
+ }
7
+ .checkbox_text{
8
+ align-items: center;
5
9
  }
6
10
  .checkbox__input{
7
11
  display: none;
8
12
  }
9
- .checkbox__text_raw{
10
- padding-top: 2px;
13
+ .checkbox__text{
14
+ padding-left: calc(var(--size-step));
15
+ font-size: 16px;
16
+ display: block;
17
+ }
18
+ .checkbox__text_size_small{
19
+ font-size: 14px;
11
20
  }
12
21
  .checkbox__label{
13
22
  cursor: pointer;
14
23
  text-align: left;
15
24
  position: relative;
16
25
  display: block;
17
- font-size: 16px;
18
26
  line-height: 1.2;
19
- min-height: 22px;
20
- & .checkbox__text{
21
- display: block;
22
- padding-left: 31px;
23
- }
27
+ width:22px;
28
+ height: 22px;
24
29
  &:before{
25
- width:22px;
26
- height: 22px;
30
+ width: 100%;
31
+ height: 100%;
27
32
  border-radius: $radius;
28
33
  border: 1px solid $color-gray-700;
29
34
  background: #fff;
30
35
  position: absolute;
31
36
  content: '';
32
37
  left: 0;
33
- top: 0px;
38
+ top: 0;
34
39
  box-sizing: border-box;
35
40
  }
36
41
  &:after{
@@ -49,34 +54,20 @@
49
54
  }
50
55
 
51
56
  .checkbox_medium{
52
- min-height: 18px;
53
- & .checkbox__text{
54
- //padding-left: 27px;
55
- }
56
- &:before{
57
- width:18px;
58
- height: 18px;
59
- }
57
+ width:18px;
58
+ height: 18px;
60
59
  &:after{
61
60
  left: 6px;
62
61
  top: 2px;
63
62
  width: 6px;
64
63
  height: 10px;
65
64
  }
66
- & .checkbox__text_raw{
67
- padding-top: 0px;
68
- }
69
65
  }
66
+
70
67
  .checkbox_small{
71
68
  font-size: 14px;
72
- min-height: 16px;
73
- & .checkbox__text{
74
- padding-left: 25px;
75
- }
76
- &:before{
77
- width:16px;
78
- height: 16px;
79
- }
69
+ width:16px;
70
+ height: 16px;
80
71
  &:after{
81
72
  left: 5px;
82
73
  top: 3px;
@@ -84,6 +75,7 @@
84
75
  width: 6px;
85
76
  }
86
77
  }
78
+
87
79
  .checkbox__label_intermediate{
88
80
  &:after{
89
81
  border-left: none;
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"armtek-uikit-react","version":"1.0.118","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
+ {"name":"armtek-uikit-react","version":"1.0.120","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,6 +1,7 @@
1
1
  import css from "./BackDrop.module.scss";
2
2
  import clsx from 'clsx';
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
+ import { jsxs as _jsxs } from "react/jsx-runtime";
4
5
  import { Fragment as _Fragment } from "react/jsx-runtime";
5
6
  export const BackDropBase = props => {
6
7
  const {
@@ -10,24 +11,22 @@ export const BackDropBase = props => {
10
11
  onClick
11
12
  } = props;
12
13
  const handleClick = e => {
13
- if (e.target instanceof Element) {
14
- if (e.target.classList.contains('Arm-BackDropBase')) {
15
- e.stopPropagation();
16
- if (onClick) onClick(e);
17
- }
18
- }
14
+ e.stopPropagation();
15
+ if (onClick) onClick(e);
19
16
  };
20
17
  return /*#__PURE__*/_jsx(_Fragment, {
21
- children: /*#__PURE__*/_jsx("div", {
18
+ children: /*#__PURE__*/_jsxs("div", {
22
19
  className: clsx('Arm-BackDropBase', className, css.BackDropBase),
23
- onClick: handleClick,
24
- children: /*#__PURE__*/_jsx("div", {
20
+ children: [/*#__PURE__*/_jsx("div", {
21
+ className: css.BackDropBase__overlay,
22
+ onClick: handleClick
23
+ }), /*#__PURE__*/_jsx("div", {
25
24
  className: css.BackDropBase__inner,
26
25
  style: {
27
26
  maxWidth: width + 'px'
28
27
  },
29
28
  children: children
30
- })
29
+ })]
31
30
  })
32
31
  });
33
32
  };
@@ -14,7 +14,10 @@ function ButtonIcon(props) {
14
14
  variant: 'transparent',
15
15
  ...props,
16
16
  asIcon: true,
17
- className: clsx(css.button_icon, css['button_icon_' + props.size], props.className),
17
+ className: clsx(css.button_icon, css['button_icon_' + props.size], props.className, {
18
+ [css['ButtonIcon_square']]: props.radius === false,
19
+ 'border-radius': props.radius === true
20
+ }),
18
21
  children: props.children
19
22
  })
20
23
  });
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { isValidElement, useState } from 'react';
3
+ import { isValidElement, useRef, useState } from 'react';
4
4
  import clsx from 'clsx';
5
5
  import css from "./Checkbox.module.scss";
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -21,34 +21,43 @@ const Checkbox = props => {
21
21
  className,
22
22
  ...inputProps
23
23
  } = props;
24
- let [checked, setChecked] = useState(!!props.defaultChecked);
24
+ const [checked, setChecked] = useState(!!props.defaultChecked);
25
+ const labelRef = useRef(null);
25
26
  const handleChange = e => {
26
27
  if (inputProps.checked === undefined) setChecked(prev => !prev);
27
28
  if (onChange) onChange(e);
28
29
  };
29
30
  return /*#__PURE__*/_jsx(_Fragment, {
30
- children: /*#__PURE__*/_jsx("div", {
31
- className: clsx(css.checkbox, className),
32
- children: /*#__PURE__*/_jsxs("label", {
31
+ children: /*#__PURE__*/_jsxs("div", {
32
+ className: clsx(css.checkbox, className, {
33
+ [css.checkbox_text]: ! /*#__PURE__*/isValidElement(label)
34
+ }),
35
+ children: [/*#__PURE__*/_jsx("label", {
36
+ ref: labelRef,
33
37
  className: clsx(css.checkbox__label, css['checkbox_' + size], css['checkbox_' + variant], css['checkbox_' + color], {
34
38
  [css.checkbox__label_checked]: inputProps.checked !== undefined ? inputProps.checked : checked,
35
39
  [css.checkbox__label_intermediate]: !!intermediate,
36
40
  [css.checkbox__label_disabled]: !!inputProps.disabled
37
41
  }),
38
- children: [/*#__PURE__*/_jsx("input", {
42
+ children: /*#__PURE__*/_jsx("input", {
39
43
  ...inputProps,
40
44
  className: clsx(css.checkbox__input, {
41
45
  '_checked': !!inputProps.checked
42
46
  }),
43
47
  onChange: handleChange,
44
48
  type: props.type || 'checkbox'
45
- }), label && /*#__PURE__*/_jsx("span", {
46
- className: clsx(css.checkbox__text, {
47
- [css.checkbox__text_raw]: ! /*#__PURE__*/isValidElement(label)
48
- }),
49
- children: label
50
- })]
51
- })
49
+ })
50
+ }), label && /*#__PURE__*/_jsx("span", {
51
+ onClick: () => {
52
+ var _labelRef$current;
53
+ return (_labelRef$current = labelRef.current) == null ? void 0 : _labelRef$current.click();
54
+ },
55
+ className: clsx(css.checkbox__text, {
56
+ [css.checkbox__text_raw]: ! /*#__PURE__*/isValidElement(label),
57
+ [css['checkbox_text_size_' + size]]: size
58
+ }),
59
+ children: label
60
+ })]
52
61
  })
53
62
  });
54
63
  };