armtek-uikit-react 1.0.153 → 1.0.155
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/index.js +1 -2
- package/lib/const/styles.js +1 -5
- package/lib/helpers/genericForwardRef.js +3 -7
- package/lib/helpers/getColorClasses.js +6 -10
- package/lib/helpers/getSizeClasses.js +5 -9
- package/lib/helpers/getVariantClasses.js +5 -9
- package/lib/helpers/helpers.js +10 -19
- package/lib/helpers/index.d.ts +1 -1
- package/lib/helpers/index.js +1 -9
- package/lib/hooks/useClickOutside.js +4 -8
- package/lib/hooks/useEnhancedEffect.js +3 -8
- package/lib/hooks/useEventCallback.js +4 -11
- package/lib/hooks/useLazyRef.js +4 -8
- package/lib/hooks/useTimeout.js +6 -12
- package/lib/services/DateService.js +2 -7
- package/package.json +1 -1
- package/types/theme.js +1 -3
- package/ui/Accordion/Accordion.classes.js +14 -19
- package/ui/Accordion/Accordion.js +35 -38
- package/ui/Accordion/index.d.ts +1 -1
- package/ui/Accordion/index.js +1 -16
- package/ui/Adornment/Adornment.js +11 -16
- package/ui/Adornment/index.js +2 -9
- package/ui/Alert/Alert.js +16 -20
- package/ui/Alert/index.d.ts +1 -1
- package/ui/Alert/index.js +1 -16
- package/ui/Avatar/Avatar.js +18 -22
- package/ui/Avatar/index.d.ts +1 -1
- package/ui/Avatar/index.js +1 -16
- package/ui/AvatarGroup/AvatarGroup.js +14 -18
- package/ui/AvatarGroup/index.d.ts +1 -1
- package/ui/AvatarGroup/index.js +1 -16
- package/ui/BackDrop/BackDrop.js +9 -13
- package/ui/BackDrop/BackDropBase.js +11 -15
- package/ui/BackDrop/index.d.ts +0 -1
- package/ui/BackDrop/index.js +1 -16
- package/ui/Badge/Badge.js +12 -16
- package/ui/Badge/index.d.ts +1 -2
- package/ui/Badge/index.js +1 -16
- package/ui/Button/Button.js +15 -19
- package/ui/Button/index.d.ts +1 -1
- package/ui/Button/index.js +1 -16
- package/ui/ButtonGroup/ButtonGroup.js +10 -15
- package/ui/ButtonGroup/index.d.ts +1 -1
- package/ui/ButtonGroup/index.js +2 -16
- package/ui/ButtonIcon/ButtonIcon.js +11 -16
- package/ui/ButtonIcon/index.d.ts +1 -1
- package/ui/ButtonIcon/index.js +1 -16
- package/ui/Card/Card.js +7 -12
- package/ui/Card/index.d.ts +1 -1
- package/ui/Card/index.js +1 -16
- package/ui/Chip/Chip.js +15 -19
- package/ui/Chip/index.d.ts +1 -1
- package/ui/Chip/index.js +1 -16
- package/ui/Dropdown/Dropdown.js +16 -20
- package/ui/Dropdown/index.d.ts +1 -1
- package/ui/Dropdown/index.js +1 -16
- package/ui/Form/Checkbox/Checkbox.js +19 -22
- package/ui/Form/Checkbox/index.d.ts +1 -1
- package/ui/Form/Checkbox/index.js +1 -16
- package/ui/Form/DateField/DateField.js +25 -28
- package/ui/Form/DateField/index.d.ts +1 -1
- package/ui/Form/DateField/index.js +1 -16
- package/ui/Form/DatePicker/DatePicker.js +13 -21
- package/ui/Form/DatePicker/index.d.ts +1 -1
- package/ui/Form/DatePicker/index.js +1 -16
- package/ui/Form/FormControls/FormControls.js +15 -19
- package/ui/Form/FormControls/index.d.ts +1 -1
- package/ui/Form/FormControls/index.js +1 -16
- package/ui/Form/Interval/Interval.js +20 -23
- package/ui/Form/Interval/IntervalSlide.js +13 -16
- package/ui/Form/Interval/index.d.ts +1 -1
- package/ui/Form/Interval/index.js +2 -20
- package/ui/Form/Password/Password.js +14 -17
- package/ui/Form/Password/index.d.ts +0 -1
- package/ui/Form/Password/index.js +1 -16
- package/ui/Form/Period/Period.js +21 -24
- package/ui/Form/Period/index.d.ts +1 -1
- package/ui/Form/Period/index.js +1 -16
- package/ui/Form/PeriodSelect/PeriodSelect.js +9 -13
- package/ui/Form/PeriodSelect/index.d.ts +0 -1
- package/ui/Form/PeriodSelect/index.js +1 -16
- package/ui/Form/Radio/Radio.js +8 -13
- package/ui/Form/Radio/index.d.ts +0 -1
- package/ui/Form/Radio/index.js +1 -16
- package/ui/Form/Rating/Rating.js +13 -16
- package/ui/Form/Rating/index.d.ts +0 -1
- package/ui/Form/Rating/index.js +1 -16
- package/ui/Form/Select/Select.js +49 -50
- package/ui/Form/Select/SelectOptionList.js +8 -13
- package/ui/Form/Select/SelectOptionsContainer.js +6 -11
- package/ui/Form/Select/SelectSummary.js +32 -37
- package/ui/Form/Select/index.d.ts +2 -2
- package/ui/Form/Select/index.js +3 -23
- package/ui/Form/Switch/Switch.js +10 -14
- package/ui/Form/Switch/index.d.ts +0 -1
- package/ui/Form/Switch/index.js +1 -16
- package/ui/Form/TextArea/TextArea.js +15 -19
- package/ui/Form/TextArea/index.d.ts +1 -1
- package/ui/Form/TextArea/index.js +1 -16
- package/ui/Form/TextField/TextField.js +34 -39
- package/ui/Form/TextField/index.d.ts +1 -1
- package/ui/Form/TextField/index.js +2 -11
- package/ui/Form/TimeField/TimeField.js +8 -13
- package/ui/Form/TimeField/index.d.ts +0 -1
- package/ui/Form/TimeField/index.js +1 -16
- package/ui/Form/TimePicker/TimePicker.js +8 -12
- package/ui/Form/TimePicker/index.d.ts +0 -1
- package/ui/Form/TimePicker/index.js +1 -16
- package/ui/HelperText/HelperText.js +7 -12
- package/ui/HelperText/index.d.ts +0 -1
- package/ui/HelperText/index.js +1 -16
- package/ui/Icon/Icon.js +9 -14
- package/ui/Icon/Mi.js +10 -15
- package/ui/Icon/Mis.js +7 -11
- package/ui/Icon/index.d.ts +1 -1
- package/ui/Icon/index.js +3 -22
- package/ui/Link/Link.js +7 -12
- package/ui/Link/index.d.ts +1 -1
- package/ui/Link/index.js +1 -16
- package/ui/List/ListItem.js +20 -26
- package/ui/List/index.d.ts +1 -1
- package/ui/List/index.js +1 -16
- package/ui/Loader/Loader.js +7 -12
- package/ui/Loader/index.d.ts +1 -1
- package/ui/Loader/index.js +1 -16
- package/ui/Logo/Logo.js +25 -29
- package/ui/Logo/index.d.ts +1 -1
- package/ui/Logo/index.js +1 -16
- package/ui/Modal/BaseModal.js +24 -28
- package/ui/Modal/Modal.js +8 -13
- package/ui/Modal/index.d.ts +1 -1
- package/ui/Modal/index.js +1 -16
- package/ui/Pagination/Pagination.js +36 -39
- package/ui/Pagination/index.d.ts +1 -1
- package/ui/Pagination/index.js +1 -16
- package/ui/Paper/Paper.js +7 -12
- package/ui/Paper/index.d.ts +1 -1
- package/ui/Paper/index.js +1 -16
- package/ui/Popover/Popover.js +11 -16
- package/ui/Popover/index.d.ts +1 -1
- package/ui/Popover/index.js +1 -16
- package/ui/Popper/Popper.js +8 -12
- package/ui/Popper/PopperBase.js +11 -14
- package/ui/Popper/index.d.ts +1 -1
- package/ui/Popper/index.js +2 -16
- package/ui/Skeleton/Skeleton.js +5 -11
- package/ui/Skeleton/index.d.ts +0 -1
- package/ui/Skeleton/index.js +1 -16
- package/ui/Slider/RcSlider.js +0 -1
- package/ui/Slider/Slider.js +15 -19
- package/ui/Slider/index.d.ts +1 -1
- package/ui/Slider/index.js +1 -16
- package/ui/Stack/Stack.js +12 -17
- package/ui/Stack/index.d.ts +1 -1
- package/ui/Stack/index.js +1 -16
- package/ui/Status/Status.js +11 -15
- package/ui/Status/index.d.ts +0 -1
- package/ui/Status/index.js +1 -16
- package/ui/Stepper/StepItem.js +18 -22
- package/ui/Stepper/StepItemIcon.js +11 -16
- package/ui/Stepper/Stepper.js +13 -17
- package/ui/Stepper/index.d.ts +1 -1
- package/ui/Stepper/index.js +1 -16
- package/ui/Table/Table.js +17 -19
- package/ui/Table/TableBase.js +6 -11
- package/ui/Table/TableCell.js +10 -15
- package/ui/Table/TableRow.js +8 -13
- package/ui/Table/index.js +3 -10
- package/ui/Tooltip/Tooltip.js +20 -23
- package/ui/Tooltip/index.d.ts +1 -1
- package/ui/Tooltip/index.js +1 -16
|
@@ -1,32 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports.__esModule = true;
|
|
5
|
-
exports.default = void 0;
|
|
6
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
7
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
4
|
const StepItemIcon = props => {
|
|
9
5
|
let icon = '';
|
|
10
6
|
if (!props.number) {
|
|
11
7
|
if (props.active) icon = 'schedule';else if (props.complete) icon = 'done';
|
|
12
8
|
}
|
|
13
|
-
return /*#__PURE__*/(
|
|
14
|
-
children: /*#__PURE__*/(
|
|
15
|
-
className: (
|
|
9
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
10
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
11
|
+
className: clsx('arm-step-item-icon', ['arm-step-item-icon_' + props.size], {
|
|
16
12
|
['arm-step-item-icon_active']: props.active,
|
|
17
13
|
['arm-step-item-icon_error']: props.error,
|
|
18
14
|
['arm-step-item-icon_complete']: props.complete,
|
|
19
15
|
['arm-step-item-icon_icon']: !props.icon
|
|
20
16
|
}),
|
|
21
|
-
children: /*#__PURE__*/(
|
|
17
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
22
18
|
className: 'arm-step-item-icon__inner',
|
|
23
|
-
children: !props.error ? !props.number ? /*#__PURE__*/(
|
|
19
|
+
children: !props.error ? !props.number ? /*#__PURE__*/_jsx("span", {
|
|
24
20
|
className: 'material_icon_solid',
|
|
25
21
|
children: icon
|
|
26
|
-
}) : /*#__PURE__*/(
|
|
22
|
+
}) : /*#__PURE__*/_jsx("span", {
|
|
27
23
|
className: 'arm-step-item-icon__number',
|
|
28
24
|
children: props.number
|
|
29
|
-
}) : /*#__PURE__*/(
|
|
25
|
+
}) : /*#__PURE__*/_jsx("span", {
|
|
30
26
|
className: 'material_icon_solid',
|
|
31
27
|
children: "warning"
|
|
32
28
|
})
|
|
@@ -34,5 +30,4 @@ const StepItemIcon = props => {
|
|
|
34
30
|
})
|
|
35
31
|
});
|
|
36
32
|
};
|
|
37
|
-
|
|
38
|
-
module.exports = exports.default;
|
|
33
|
+
export default StepItemIcon;
|
package/ui/Stepper/Stepper.js
CHANGED
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
1
|
+
import StepItem from "./StepItem";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { Fragment } from 'react';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
7
|
const Stepper = props => {
|
|
11
8
|
var _props$steps;
|
|
12
9
|
let {
|
|
13
10
|
orientation = 'horizontal'
|
|
14
11
|
} = props;
|
|
15
|
-
return /*#__PURE__*/(
|
|
16
|
-
children: /*#__PURE__*/(
|
|
17
|
-
className: (
|
|
12
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
13
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
14
|
+
className: clsx('arm-stepper', ['arm-stepper_' + props.size], {
|
|
18
15
|
['arm-stepper_horizontal']: orientation === 'horizontal'
|
|
19
16
|
}),
|
|
20
17
|
children: (_props$steps = props.steps) == null ? void 0 : _props$steps.map((item, index) => {
|
|
21
18
|
var _props$steps2;
|
|
22
19
|
let title = typeof item === 'string' || typeof item === 'number' ? String(item) : item.title;
|
|
23
20
|
let params = typeof item === 'string' || typeof item === 'number' ? {} : item;
|
|
24
|
-
return /*#__PURE__*/(
|
|
25
|
-
children: [/*#__PURE__*/(
|
|
21
|
+
return /*#__PURE__*/_jsxs(Fragment, {
|
|
22
|
+
children: [/*#__PURE__*/_jsx(StepItem, {
|
|
26
23
|
error: index + 1 === props.error,
|
|
27
24
|
active: index + 1 === props.active,
|
|
28
25
|
complete: index + 1 === props.complete || index + 1 < (props.active || 0),
|
|
@@ -31,7 +28,7 @@ const Stepper = props => {
|
|
|
31
28
|
last: index + 1 === ((_props$steps2 = props.steps) == null ? void 0 : _props$steps2.length),
|
|
32
29
|
orientation: orientation,
|
|
33
30
|
size: props.size
|
|
34
|
-
}), index + 1 < props.steps.length && /*#__PURE__*/(
|
|
31
|
+
}), index + 1 < props.steps.length && /*#__PURE__*/_jsx("div", {
|
|
35
32
|
className: 'arm-stepper__connector'
|
|
36
33
|
})]
|
|
37
34
|
}, index);
|
|
@@ -39,5 +36,4 @@ const Stepper = props => {
|
|
|
39
36
|
})
|
|
40
37
|
});
|
|
41
38
|
};
|
|
42
|
-
|
|
43
|
-
module.exports = exports.default;
|
|
39
|
+
export default Stepper;
|
package/ui/Stepper/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from './Stepper';
|
|
2
|
-
export
|
|
2
|
+
export { type StepperProps } from './Stepper';
|
package/ui/Stepper/index.js
CHANGED
|
@@ -1,16 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
var _exportNames = {};
|
|
5
|
-
exports.default = void 0;
|
|
6
|
-
var _Stepper = _interopRequireWildcard(require("./Stepper"));
|
|
7
|
-
exports.default = _Stepper.default;
|
|
8
|
-
Object.keys(_Stepper).forEach(function (key) {
|
|
9
|
-
if (key === "default" || key === "__esModule") return;
|
|
10
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
11
|
-
if (key in exports && exports[key] === _Stepper[key]) return;
|
|
12
|
-
exports[key] = _Stepper[key];
|
|
13
|
-
});
|
|
14
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
-
module.exports = exports.default;
|
|
1
|
+
export { default } from "./Stepper";
|
package/ui/Table/Table.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _helpers = require("../../lib/helpers");
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
1
|
+
import { Fragment } from 'react';
|
|
2
|
+
import { TableRow } from "./TableRow";
|
|
3
|
+
import { TableCell } from "./TableCell";
|
|
4
|
+
import { TableBase } from "./TableBase";
|
|
5
|
+
import { fixedForwardRef } from "../../lib/helpers";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
9
|
function TableInit(props, ref) {
|
|
12
10
|
const {
|
|
13
11
|
className,
|
|
@@ -20,15 +18,15 @@ function TableInit(props, ref) {
|
|
|
20
18
|
getRow,
|
|
21
19
|
...tableProps
|
|
22
20
|
} = props;
|
|
23
|
-
return /*#__PURE__*/(
|
|
24
|
-
children: /*#__PURE__*/(
|
|
21
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
22
|
+
children: /*#__PURE__*/_jsx(TableBase, {
|
|
25
23
|
...tableProps,
|
|
26
24
|
ref: ref,
|
|
27
|
-
children: /*#__PURE__*/(
|
|
28
|
-
children: [/*#__PURE__*/(
|
|
25
|
+
children: /*#__PURE__*/_jsxs("tbody", {
|
|
26
|
+
children: [/*#__PURE__*/_jsx(TableRow, {
|
|
29
27
|
className: classes == null ? void 0 : classes.tableRowHead,
|
|
30
28
|
children: structure.map((item, index) => {
|
|
31
|
-
return /*#__PURE__*/(
|
|
29
|
+
return /*#__PURE__*/_jsx(TableCell, {
|
|
32
30
|
head: true,
|
|
33
31
|
className: classes == null ? void 0 : classes.tableCellHead,
|
|
34
32
|
size: size,
|
|
@@ -38,14 +36,14 @@ function TableInit(props, ref) {
|
|
|
38
36
|
})
|
|
39
37
|
}), items.map((row, index) => {
|
|
40
38
|
let rowClass = !!(classes != null && classes.tableRow) ? typeof classes.tableRow === 'string' ? classes.tableRow : classes.tableRow(row) : '';
|
|
41
|
-
return getRow ? /*#__PURE__*/(
|
|
39
|
+
return getRow ? /*#__PURE__*/_jsx(Fragment, {
|
|
42
40
|
children: getRow(row, index)
|
|
43
|
-
}, index) : /*#__PURE__*/(
|
|
41
|
+
}, index) : /*#__PURE__*/_jsx(TableRow, {
|
|
44
42
|
className: rowClass,
|
|
45
43
|
onClick: e => onClick ? onClick(row, e) : null,
|
|
46
44
|
children: structure.map((item, itemIndex) => {
|
|
47
45
|
let cellClass = !!(classes != null && classes.tableCell) ? typeof classes.tableCell === 'string' ? classes.tableCell : classes.tableCell(row, item.code) : '';
|
|
48
|
-
return /*#__PURE__*/(
|
|
46
|
+
return /*#__PURE__*/_jsx(TableCell, {
|
|
49
47
|
size: size,
|
|
50
48
|
variant: variant,
|
|
51
49
|
className: cellClass,
|
|
@@ -58,4 +56,4 @@ function TableInit(props, ref) {
|
|
|
58
56
|
})
|
|
59
57
|
});
|
|
60
58
|
}
|
|
61
|
-
const Table =
|
|
59
|
+
export const Table = fixedForwardRef(TableInit);
|
package/ui/Table/TableBase.js
CHANGED
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
exports.TableBase = void 0;
|
|
6
|
-
var _react = require("react");
|
|
7
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
8
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
const TableBase = exports.TableBase = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
export const TableBase = /*#__PURE__*/forwardRef((props, ref) => {
|
|
10
5
|
const {
|
|
11
6
|
className,
|
|
12
7
|
children,
|
|
13
8
|
...tableProps
|
|
14
9
|
} = props;
|
|
15
|
-
return /*#__PURE__*/(
|
|
10
|
+
return /*#__PURE__*/_jsx("table", {
|
|
16
11
|
...tableProps,
|
|
17
12
|
ref: ref,
|
|
18
|
-
className: (
|
|
13
|
+
className: clsx(className, 'arm-table'),
|
|
19
14
|
children: children
|
|
20
15
|
});
|
|
21
16
|
});
|
package/ui/Table/TableCell.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
exports.TableCell = void 0;
|
|
6
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
7
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
-
const TableCell = props => {
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
4
|
+
export const TableCell = props => {
|
|
9
5
|
const {
|
|
10
6
|
className,
|
|
11
7
|
children,
|
|
@@ -15,15 +11,15 @@ const TableCell = props => {
|
|
|
15
11
|
size,
|
|
16
12
|
...cellProps
|
|
17
13
|
} = props;
|
|
18
|
-
return /*#__PURE__*/(
|
|
19
|
-
children: /*#__PURE__*/(
|
|
14
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
15
|
+
children: /*#__PURE__*/_jsx("td", {
|
|
20
16
|
...cellProps,
|
|
21
|
-
className: (
|
|
17
|
+
className: clsx(className, 'arm-table-cell', {
|
|
22
18
|
'arm-table-cell_head': !!head,
|
|
23
19
|
['arm-table-cell_variant_' + variant]: !!variant
|
|
24
20
|
}),
|
|
25
|
-
children: /*#__PURE__*/(
|
|
26
|
-
className: (
|
|
21
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
22
|
+
className: clsx('arm-table-cell__inner', innerClassName, {
|
|
27
23
|
['arm-table-cell__inner_size_' + size]: !!size,
|
|
28
24
|
['arm-table-cell__inner_variant_' + variant]: !!variant
|
|
29
25
|
}),
|
|
@@ -31,5 +27,4 @@ const TableCell = props => {
|
|
|
31
27
|
})
|
|
32
28
|
})
|
|
33
29
|
});
|
|
34
|
-
};
|
|
35
|
-
exports.TableCell = TableCell;
|
|
30
|
+
};
|
package/ui/Table/TableRow.js
CHANGED
|
@@ -1,24 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
exports.TableRow = void 0;
|
|
6
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
7
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
-
const TableRow = props => {
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
4
|
+
export const TableRow = props => {
|
|
9
5
|
const {
|
|
10
6
|
className,
|
|
11
7
|
children,
|
|
12
8
|
...rowProps
|
|
13
9
|
} = props;
|
|
14
|
-
return /*#__PURE__*/(
|
|
15
|
-
children: /*#__PURE__*/(
|
|
10
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
11
|
+
children: /*#__PURE__*/_jsx("tr", {
|
|
16
12
|
...rowProps,
|
|
17
|
-
className: (
|
|
13
|
+
className: clsx(className, 'arm-table-row', {
|
|
18
14
|
'arm-table-row_click': !!rowProps.onClick
|
|
19
15
|
}),
|
|
20
16
|
children: children
|
|
21
17
|
})
|
|
22
18
|
});
|
|
23
|
-
};
|
|
24
|
-
exports.TableRow = TableRow;
|
|
19
|
+
};
|
package/ui/Table/index.js
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports.TableRow = exports.TableCell = exports.Table = void 0;
|
|
5
|
-
var _Table = require("./Table");
|
|
6
|
-
exports.Table = _Table.Table;
|
|
7
|
-
var _TableCell = require("./TableCell");
|
|
8
|
-
exports.TableCell = _TableCell.TableCell;
|
|
9
|
-
var _TableRow = require("./TableRow");
|
|
10
|
-
exports.TableRow = _TableRow.TableRow;
|
|
1
|
+
export { Table } from "./Table";
|
|
2
|
+
export { TableCell } from "./TableCell";
|
|
3
|
+
export { TableRow } from "./TableRow";
|
package/ui/Tooltip/Tooltip.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
"use client";
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
import { cloneElement, isValidElement, useRef, useState } from 'react';
|
|
4
|
+
import useTimeout from "../../lib/hooks/useTimeout";
|
|
5
|
+
import useEventCallback from "../../lib/hooks/useEventCallback";
|
|
6
|
+
import Popper from "../Popper";
|
|
7
|
+
import clsx from 'clsx';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
11
|
function composeEventHandler(handler, eventHandler) {
|
|
14
12
|
return event => {
|
|
15
13
|
if (eventHandler) {
|
|
@@ -29,18 +27,18 @@ function Tooltip(props) {
|
|
|
29
27
|
placement = 'top',
|
|
30
28
|
classNames
|
|
31
29
|
} = props;
|
|
32
|
-
const children = /*#__PURE__*/
|
|
30
|
+
const children = /*#__PURE__*/isValidElement(childrenProp) ? childrenProp : /*#__PURE__*/_jsx("span", {
|
|
33
31
|
children: childrenProp
|
|
34
32
|
});
|
|
35
|
-
const [openState, setOpenState] =
|
|
36
|
-
const anchorEl =
|
|
37
|
-
const closeTimer = (
|
|
38
|
-
const enterTimer = (
|
|
39
|
-
const leaveTimer = (
|
|
33
|
+
const [openState, setOpenState] = useState(false);
|
|
34
|
+
const anchorEl = useRef();
|
|
35
|
+
const closeTimer = useTimeout();
|
|
36
|
+
const enterTimer = useTimeout();
|
|
37
|
+
const leaveTimer = useTimeout();
|
|
40
38
|
const handleOpen = event => {
|
|
41
39
|
setOpenState(true);
|
|
42
40
|
};
|
|
43
|
-
const handleClose = (
|
|
41
|
+
const handleClose = useEventCallback(event => {
|
|
44
42
|
setOpenState(false);
|
|
45
43
|
|
|
46
44
|
// closeTimer.start(theme.transitions.duration.shortest, () => {
|
|
@@ -67,18 +65,17 @@ function Tooltip(props) {
|
|
|
67
65
|
childrenProps.onMouseOver = composeEventHandler(handleMouseOver, childrenProps.onMouseOver);
|
|
68
66
|
childrenProps.onMouseLeave = composeEventHandler(handleMouseLeave, childrenProps.onMouseLeave);
|
|
69
67
|
childrenProps.ref = anchorEl;
|
|
70
|
-
return /*#__PURE__*/(
|
|
71
|
-
children: [/*#__PURE__*/
|
|
68
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
69
|
+
children: [/*#__PURE__*/cloneElement(children, childrenProps), anchorEl.current && /*#__PURE__*/_jsx(Popper, {
|
|
72
70
|
placement: placement,
|
|
73
71
|
open: openState,
|
|
74
72
|
className: classNames == null ? void 0 : classNames.popper,
|
|
75
73
|
anchorEl: anchorEl.current,
|
|
76
|
-
children: /*#__PURE__*/(
|
|
77
|
-
className: (
|
|
74
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
75
|
+
className: clsx('arm-tooltip__item', classNames == null ? void 0 : classNames.tooltip),
|
|
78
76
|
children: text
|
|
79
77
|
})
|
|
80
78
|
})]
|
|
81
79
|
});
|
|
82
80
|
}
|
|
83
|
-
|
|
84
|
-
module.exports = exports.default;
|
|
81
|
+
export default Tooltip;
|
package/ui/Tooltip/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from './Tooltip';
|
|
2
|
-
export
|
|
2
|
+
export { type TooltipProps } from './Tooltip';
|
package/ui/Tooltip/index.js
CHANGED
|
@@ -1,16 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
var _exportNames = {};
|
|
5
|
-
exports.default = void 0;
|
|
6
|
-
var _Tooltip = _interopRequireWildcard(require("./Tooltip"));
|
|
7
|
-
exports.default = _Tooltip.default;
|
|
8
|
-
Object.keys(_Tooltip).forEach(function (key) {
|
|
9
|
-
if (key === "default" || key === "__esModule") return;
|
|
10
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
11
|
-
if (key in exports && exports[key] === _Tooltip[key]) return;
|
|
12
|
-
exports[key] = _Tooltip[key];
|
|
13
|
-
});
|
|
14
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
-
module.exports = exports.default;
|
|
1
|
+
export { default } from "./Tooltip";
|