armtek-uikit-react 1.0.164 → 1.0.166
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/Stepper/Stepper.js +17 -11
- package/ui/Tooltip/Tooltip.d.ts +2 -3
- package/ui/Tooltip/Tooltip.js +4 -2
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"armtek-uikit-react","version":"1.0.
|
|
1
|
+
{"name":"armtek-uikit-react","version":"1.0.166","description":"Armtek UIKit for React","main":"cjs/index.js","module":"esm/index.js","types":"esm/index.d.ts","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"}}
|
package/ui/Stepper/Stepper.js
CHANGED
|
@@ -8,30 +8,36 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
10
|
const Stepper = props => {
|
|
11
|
-
var _props$steps;
|
|
12
11
|
let {
|
|
13
|
-
orientation = 'horizontal'
|
|
12
|
+
orientation = 'horizontal',
|
|
13
|
+
steps,
|
|
14
|
+
active,
|
|
15
|
+
error,
|
|
16
|
+
complete,
|
|
17
|
+
size,
|
|
18
|
+
className,
|
|
19
|
+
...restProps
|
|
14
20
|
} = props;
|
|
15
21
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
16
22
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
17
|
-
className: (0, _clsx.default)('arm-stepper', ['arm-stepper_' +
|
|
23
|
+
className: (0, _clsx.default)(className, 'arm-stepper', ['arm-stepper_' + size], {
|
|
18
24
|
['arm-stepper_horizontal']: orientation === 'horizontal'
|
|
19
25
|
}),
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
...restProps,
|
|
27
|
+
children: steps == null ? void 0 : steps.map((item, index) => {
|
|
22
28
|
let title = typeof item === 'string' || typeof item === 'number' ? String(item) : item.title;
|
|
23
29
|
let params = typeof item === 'string' || typeof item === 'number' ? {} : item;
|
|
24
30
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
25
31
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_StepItem.default, {
|
|
26
|
-
error: index + 1 ===
|
|
27
|
-
active: index + 1 ===
|
|
28
|
-
complete: index + 1 ===
|
|
32
|
+
error: index + 1 === error,
|
|
33
|
+
active: index + 1 === active,
|
|
34
|
+
complete: index + 1 === complete || index + 1 < (active || 0),
|
|
29
35
|
...params,
|
|
30
36
|
title: title,
|
|
31
|
-
last: index + 1 === (
|
|
37
|
+
last: index + 1 === (steps == null ? void 0 : steps.length),
|
|
32
38
|
orientation: orientation,
|
|
33
|
-
size:
|
|
34
|
-
}), index + 1 <
|
|
39
|
+
size: size
|
|
40
|
+
}), index + 1 < steps.length && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
35
41
|
className: 'arm-stepper__connector'
|
|
36
42
|
})]
|
|
37
43
|
}, index);
|
package/ui/Tooltip/Tooltip.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
type Classes = {
|
|
3
3
|
tooltip: string;
|
|
4
4
|
popper: string;
|
|
5
5
|
};
|
|
6
6
|
export type TooltipProps = {
|
|
7
7
|
text: string | ReactNode;
|
|
8
|
-
children: ReactNode;
|
|
9
8
|
classNames?: Partial<Classes>;
|
|
10
9
|
placement?: 'bottom-end' | 'bottom-start' | 'bottom' | 'left-end' | 'left-start' | 'left' | 'right-end' | 'right-start' | 'right' | 'top-end' | 'top-start' | 'top';
|
|
11
10
|
};
|
|
12
|
-
declare function Tooltip(props: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function Tooltip(props: TooltipProps & Omit<ComponentPropsWithoutRef<'span'>, keyof TooltipProps>): import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
export default Tooltip;
|
package/ui/Tooltip/Tooltip.js
CHANGED
|
@@ -27,7 +27,8 @@ function Tooltip(props) {
|
|
|
27
27
|
text,
|
|
28
28
|
children: childrenProp,
|
|
29
29
|
placement = 'top',
|
|
30
|
-
classNames
|
|
30
|
+
classNames,
|
|
31
|
+
...restProps
|
|
31
32
|
} = props;
|
|
32
33
|
const children = /*#__PURE__*/(0, _react.isValidElement)(childrenProp) ? childrenProp : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
33
34
|
children: childrenProp
|
|
@@ -74,7 +75,8 @@ function Tooltip(props) {
|
|
|
74
75
|
className: classNames == null ? void 0 : classNames.popper,
|
|
75
76
|
anchorEl: anchorEl.current,
|
|
76
77
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
77
|
-
|
|
78
|
+
...restProps,
|
|
79
|
+
className: (0, _clsx.default)('arm-tooltip__item', classNames == null ? void 0 : classNames.tooltip, restProps.className),
|
|
78
80
|
children: text
|
|
79
81
|
})
|
|
80
82
|
})]
|