armtek-uikit-react 1.0.154 → 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.js +1 -6
- 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 -9
- 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.js +1 -8
- package/ui/Avatar/Avatar.js +18 -22
- package/ui/Avatar/index.js +1 -8
- package/ui/AvatarGroup/AvatarGroup.js +14 -18
- package/ui/AvatarGroup/index.js +1 -8
- package/ui/BackDrop/BackDrop.js +9 -13
- package/ui/BackDrop/BackDropBase.js +11 -15
- package/ui/BackDrop/index.js +1 -8
- package/ui/Badge/Badge.js +12 -16
- package/ui/Badge/index.js +1 -8
- package/ui/Button/Button.js +15 -19
- package/ui/Button/index.js +1 -8
- package/ui/ButtonGroup/ButtonGroup.js +10 -15
- package/ui/ButtonGroup/index.js +2 -8
- package/ui/ButtonIcon/ButtonIcon.js +11 -16
- package/ui/ButtonIcon/index.js +1 -8
- package/ui/Card/Card.js +7 -12
- package/ui/Card/index.js +1 -8
- package/ui/Chip/Chip.js +15 -19
- package/ui/Chip/index.js +1 -8
- package/ui/Dropdown/Dropdown.js +16 -20
- package/ui/Dropdown/index.js +1 -8
- package/ui/Form/Checkbox/Checkbox.js +19 -22
- package/ui/Form/Checkbox/index.js +1 -8
- package/ui/Form/DateField/DateField.js +25 -28
- package/ui/Form/DateField/index.js +1 -8
- package/ui/Form/DatePicker/DatePicker.js +13 -21
- package/ui/Form/DatePicker/index.js +1 -8
- package/ui/Form/FormControls/FormControls.js +15 -19
- package/ui/Form/FormControls/index.js +1 -8
- package/ui/Form/Interval/Interval.js +20 -23
- package/ui/Form/Interval/IntervalSlide.js +13 -16
- package/ui/Form/Interval/index.js +2 -9
- package/ui/Form/Password/Password.js +14 -17
- package/ui/Form/Password/index.js +1 -8
- package/ui/Form/Period/Period.js +21 -24
- package/ui/Form/Period/index.js +1 -8
- package/ui/Form/PeriodSelect/PeriodSelect.js +9 -13
- package/ui/Form/PeriodSelect/index.js +1 -8
- package/ui/Form/Radio/Radio.js +8 -13
- package/ui/Form/Radio/index.js +1 -8
- package/ui/Form/Rating/Rating.js +13 -16
- package/ui/Form/Rating/index.js +1 -8
- 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.js +3 -12
- package/ui/Form/Switch/Switch.js +10 -14
- package/ui/Form/Switch/index.js +1 -8
- package/ui/Form/TextArea/TextArea.js +15 -19
- package/ui/Form/TextArea/index.js +1 -8
- package/ui/Form/TextField/TextField.js +34 -39
- package/ui/Form/TextField/index.js +2 -10
- package/ui/Form/TimeField/TimeField.js +8 -13
- package/ui/Form/TimeField/index.js +1 -8
- package/ui/Form/TimePicker/TimePicker.js +8 -12
- package/ui/Form/TimePicker/index.js +1 -8
- package/ui/HelperText/HelperText.js +7 -12
- package/ui/HelperText/index.js +1 -8
- 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.js +3 -11
- package/ui/Link/Link.js +7 -12
- package/ui/Link/index.js +1 -8
- package/ui/List/ListItem.js +20 -26
- package/ui/List/index.js +1 -8
- package/ui/Loader/Loader.js +7 -12
- package/ui/Loader/index.js +1 -8
- package/ui/Logo/Logo.js +25 -29
- package/ui/Logo/index.js +1 -8
- package/ui/Modal/BaseModal.js +24 -28
- package/ui/Modal/Modal.js +8 -13
- package/ui/Modal/index.js +1 -8
- package/ui/Pagination/Pagination.js +36 -39
- package/ui/Pagination/index.js +1 -8
- package/ui/Paper/Paper.js +7 -12
- package/ui/Paper/index.js +1 -8
- package/ui/Popover/Popover.js +11 -16
- package/ui/Popover/index.js +1 -8
- package/ui/Popper/Popper.js +8 -12
- package/ui/Popper/PopperBase.js +11 -14
- package/ui/Popper/index.js +2 -9
- package/ui/Skeleton/Skeleton.js +5 -11
- package/ui/Skeleton/index.js +1 -8
- package/ui/Slider/RcSlider.js +0 -1
- package/ui/Slider/Slider.js +15 -19
- package/ui/Slider/index.js +1 -8
- package/ui/Stack/Stack.js +12 -17
- package/ui/Stack/index.js +1 -8
- package/ui/Status/Status.js +11 -15
- package/ui/Status/index.js +1 -8
- 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.js +1 -8
- 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.js +1 -8
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
"use client";
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
import Stack from "../Stack";
|
|
4
|
+
import ButtonIcon from "../ButtonIcon";
|
|
5
|
+
import { useRef, useState } from 'react';
|
|
6
|
+
import { Mi } from "../Icon";
|
|
7
|
+
import Button from "../Button";
|
|
8
|
+
import Popover from "../Popover";
|
|
9
|
+
import ListItem from "../List";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
13
|
const MAX_DISPLAY = 5;
|
|
16
|
-
const Pagination = props => {
|
|
14
|
+
export const Pagination = props => {
|
|
17
15
|
const {
|
|
18
16
|
pageSize,
|
|
19
17
|
pageSizes,
|
|
@@ -38,68 +36,68 @@ const Pagination = props => {
|
|
|
38
36
|
if (selectedPage !== page) onChange(selectedPage);
|
|
39
37
|
};
|
|
40
38
|
if (total <= 1) return null;
|
|
41
|
-
return /*#__PURE__*/(
|
|
42
|
-
children: /*#__PURE__*/(
|
|
39
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
40
|
+
children: /*#__PURE__*/_jsxs(Stack, {
|
|
43
41
|
spacing: 'small',
|
|
44
|
-
children: [pageSizes && onPageSizeSelect && /*#__PURE__*/(
|
|
42
|
+
children: [pageSizes && onPageSizeSelect && /*#__PURE__*/_jsx(PaginationPerPage, {
|
|
45
43
|
...props,
|
|
46
44
|
pageSizes: pageSizes,
|
|
47
45
|
onPageSizeSelect: onPageSizeSelect
|
|
48
|
-
}), /*#__PURE__*/(
|
|
46
|
+
}), /*#__PURE__*/_jsxs(Stack, {
|
|
49
47
|
center: true,
|
|
50
48
|
...stackProps,
|
|
51
|
-
children: [page > 1 && /*#__PURE__*/(
|
|
49
|
+
children: [page > 1 && /*#__PURE__*/_jsx(ButtonIcon, {
|
|
52
50
|
onClick: handleClick(page - 1),
|
|
53
51
|
size: 'small',
|
|
54
52
|
variant: 'transparent',
|
|
55
53
|
color: 'neutral',
|
|
56
|
-
children: /*#__PURE__*/(
|
|
54
|
+
children: /*#__PURE__*/_jsx(Mi, {
|
|
57
55
|
icon: 'chevron_left'
|
|
58
56
|
})
|
|
59
|
-
}), displayFirst && /*#__PURE__*/(
|
|
57
|
+
}), displayFirst && /*#__PURE__*/_jsx(ButtonIcon, {
|
|
60
58
|
onClick: handleClick(1),
|
|
61
59
|
size: 'small',
|
|
62
60
|
variant: 'transparent',
|
|
63
61
|
color: 'neutral',
|
|
64
|
-
children: /*#__PURE__*/(
|
|
62
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
65
63
|
className: 'arm-pagination__item',
|
|
66
64
|
children: "1"
|
|
67
65
|
})
|
|
68
|
-
}), displayFirstDots && /*#__PURE__*/(
|
|
66
|
+
}), displayFirstDots && /*#__PURE__*/_jsx(ButtonIcon, {
|
|
69
67
|
size: 'small',
|
|
70
68
|
disabled: true,
|
|
71
69
|
children: "..."
|
|
72
70
|
}), pageArr.map(item => {
|
|
73
|
-
return /*#__PURE__*/(
|
|
71
|
+
return /*#__PURE__*/_jsx(ButtonIcon, {
|
|
74
72
|
onClick: handleClick(item),
|
|
75
73
|
size: 'small',
|
|
76
74
|
className: page === item ? 'bg-gray-100' : '',
|
|
77
75
|
variant: 'transparent',
|
|
78
76
|
color: 'neutral',
|
|
79
|
-
children: /*#__PURE__*/(
|
|
77
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
80
78
|
className: 'arm-pagination__item',
|
|
81
79
|
children: item
|
|
82
80
|
})
|
|
83
81
|
}, item);
|
|
84
|
-
}), displayLastDots && /*#__PURE__*/(
|
|
82
|
+
}), displayLastDots && /*#__PURE__*/_jsx(ButtonIcon, {
|
|
85
83
|
size: 'small',
|
|
86
84
|
disabled: true,
|
|
87
85
|
children: "..."
|
|
88
|
-
}), displayLast && /*#__PURE__*/(
|
|
86
|
+
}), displayLast && /*#__PURE__*/_jsx(ButtonIcon, {
|
|
89
87
|
onClick: handleClick(total),
|
|
90
88
|
size: 'small',
|
|
91
89
|
variant: 'transparent',
|
|
92
90
|
color: 'neutral',
|
|
93
|
-
children: /*#__PURE__*/(
|
|
91
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
94
92
|
className: 'arm-pagination__item',
|
|
95
93
|
children: total
|
|
96
94
|
})
|
|
97
|
-
}), page !== total && /*#__PURE__*/(
|
|
95
|
+
}), page !== total && /*#__PURE__*/_jsx(ButtonIcon, {
|
|
98
96
|
onClick: handleClick(page + 1),
|
|
99
97
|
size: 'small',
|
|
100
98
|
variant: 'transparent',
|
|
101
99
|
color: 'neutral',
|
|
102
|
-
children: /*#__PURE__*/(
|
|
100
|
+
children: /*#__PURE__*/_jsx(Mi, {
|
|
103
101
|
icon: 'chevron_right'
|
|
104
102
|
})
|
|
105
103
|
})]
|
|
@@ -107,7 +105,6 @@ const Pagination = props => {
|
|
|
107
105
|
})
|
|
108
106
|
});
|
|
109
107
|
};
|
|
110
|
-
exports.Pagination = Pagination;
|
|
111
108
|
const PaginationPerPage = props => {
|
|
112
109
|
const {
|
|
113
110
|
pageSize,
|
|
@@ -115,31 +112,31 @@ const PaginationPerPage = props => {
|
|
|
115
112
|
pageSizeLabel,
|
|
116
113
|
onPageSizeSelect
|
|
117
114
|
} = props;
|
|
118
|
-
const [visible, setVisible] =
|
|
119
|
-
const btnRef =
|
|
115
|
+
const [visible, setVisible] = useState(false);
|
|
116
|
+
const btnRef = useRef(null);
|
|
120
117
|
const handleClose = () => setVisible(false);
|
|
121
118
|
const handleClick = item => {
|
|
122
119
|
onPageSizeSelect(item);
|
|
123
120
|
handleClose();
|
|
124
121
|
};
|
|
125
|
-
return /*#__PURE__*/(
|
|
122
|
+
return /*#__PURE__*/_jsxs(Stack, {
|
|
126
123
|
spacing: 'small',
|
|
127
124
|
center: true,
|
|
128
125
|
className: 'flex items-center',
|
|
129
|
-
children: [pageSizeLabel && /*#__PURE__*/(
|
|
126
|
+
children: [pageSizeLabel && /*#__PURE__*/_jsx("div", {
|
|
130
127
|
className: 'text-small',
|
|
131
128
|
children: pageSizeLabel
|
|
132
|
-
}), /*#__PURE__*/(
|
|
129
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
133
130
|
variant: 'transparent',
|
|
134
131
|
onClick: () => setVisible(true),
|
|
135
132
|
ref: btnRef,
|
|
136
|
-
endAdornment: /*#__PURE__*/(
|
|
133
|
+
endAdornment: /*#__PURE__*/_jsx(Mi, {
|
|
137
134
|
icon: 'expand_more'
|
|
138
135
|
}),
|
|
139
136
|
size: 'small',
|
|
140
137
|
color: 'neutral',
|
|
141
138
|
children: pageSize
|
|
142
|
-
}), /*#__PURE__*/(
|
|
139
|
+
}), /*#__PURE__*/_jsx(Popover, {
|
|
143
140
|
placement: 'bottom',
|
|
144
141
|
open: visible,
|
|
145
142
|
anchorEl: btnRef.current,
|
|
@@ -147,7 +144,7 @@ const PaginationPerPage = props => {
|
|
|
147
144
|
classes: {
|
|
148
145
|
paper: 'p-0'
|
|
149
146
|
},
|
|
150
|
-
children: pageSizes.map(item => /*#__PURE__*/(
|
|
147
|
+
children: pageSizes.map(item => /*#__PURE__*/_jsx(ListItem, {
|
|
151
148
|
onClick: () => handleClick(item),
|
|
152
149
|
active: item === pageSize,
|
|
153
150
|
children: item
|
|
@@ -155,4 +152,4 @@ const PaginationPerPage = props => {
|
|
|
155
152
|
})]
|
|
156
153
|
});
|
|
157
154
|
};
|
|
158
|
-
|
|
155
|
+
export default Pagination;
|
package/ui/Pagination/index.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
exports.__esModule = true;
|
|
5
|
-
exports.default = void 0;
|
|
6
|
-
var _Pagination = _interopRequireDefault(require("./Pagination"));
|
|
7
|
-
exports.default = _Pagination.default;
|
|
8
|
-
module.exports = exports.default;
|
|
1
|
+
export { default } from "./Pagination";
|
package/ui/Paper/Paper.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
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 Paper = props => {
|
|
9
5
|
let {
|
|
10
6
|
children,
|
|
@@ -13,9 +9,9 @@ const Paper = props => {
|
|
|
13
9
|
variant = 'elevation',
|
|
14
10
|
...divPops
|
|
15
11
|
} = props;
|
|
16
|
-
return /*#__PURE__*/(
|
|
17
|
-
children: /*#__PURE__*/(
|
|
18
|
-
className: (
|
|
12
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
13
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
14
|
+
className: clsx('arm-paper', className, {
|
|
19
15
|
'arm-paper_elevation': variant === 'elevation',
|
|
20
16
|
'arm-paper_outlined': variant === 'outlined',
|
|
21
17
|
'arm-paper_dark': theme === 'dark'
|
|
@@ -25,5 +21,4 @@ const Paper = props => {
|
|
|
25
21
|
})
|
|
26
22
|
});
|
|
27
23
|
};
|
|
28
|
-
|
|
29
|
-
module.exports = exports.default;
|
|
24
|
+
export default Paper;
|
package/ui/Paper/index.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
exports.__esModule = true;
|
|
5
|
-
exports.default = void 0;
|
|
6
|
-
var _Paper = _interopRequireDefault(require("./Paper"));
|
|
7
|
-
exports.default = _Paper.default;
|
|
8
|
-
module.exports = exports.default;
|
|
1
|
+
export { default } from "./Paper";
|
package/ui/Popover/Popover.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _PopperBase = require("../Popper/PopperBase");
|
|
8
|
-
var _Paper = _interopRequireDefault(require("../Paper"));
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
const Popover = props => {
|
|
1
|
+
import BackDrop from "../BackDrop";
|
|
2
|
+
import { PopperBase } from "../Popper/PopperBase";
|
|
3
|
+
import Paper from "../Paper";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
|
+
export const Popover = props => {
|
|
11
7
|
const {
|
|
12
8
|
onClose,
|
|
13
9
|
matchWidth = false,
|
|
@@ -16,13 +12,13 @@ const Popover = props => {
|
|
|
16
12
|
...popperProps
|
|
17
13
|
} = props;
|
|
18
14
|
if (!props.open || !popperProps.anchorEl) return null;
|
|
19
|
-
return /*#__PURE__*/(
|
|
20
|
-
children: /*#__PURE__*/(
|
|
15
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
16
|
+
children: /*#__PURE__*/_jsx(BackDrop, {
|
|
21
17
|
onClick: onClose,
|
|
22
|
-
children: /*#__PURE__*/(
|
|
18
|
+
children: /*#__PURE__*/_jsx(PopperBase, {
|
|
23
19
|
...popperProps,
|
|
24
20
|
anchorEl: popperProps.anchorEl,
|
|
25
|
-
children: /*#__PURE__*/(
|
|
21
|
+
children: /*#__PURE__*/_jsx(Paper, {
|
|
26
22
|
className: classes == null ? void 0 : classes.paper,
|
|
27
23
|
style: matchWidth ? {
|
|
28
24
|
width: popperProps.anchorEl.clientWidth
|
|
@@ -33,5 +29,4 @@ const Popover = props => {
|
|
|
33
29
|
})
|
|
34
30
|
});
|
|
35
31
|
};
|
|
36
|
-
|
|
37
|
-
var _default = exports.default = Popover;
|
|
32
|
+
export default Popover;
|
package/ui/Popover/index.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
exports.__esModule = true;
|
|
5
|
-
exports.default = void 0;
|
|
6
|
-
var _Popover = _interopRequireDefault(require("./Popover"));
|
|
7
|
-
exports.default = _Popover.default;
|
|
8
|
-
module.exports = exports.default;
|
|
1
|
+
export { default } from "./Popover";
|
package/ui/Popper/Popper.js
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import { createPortal } from 'react-dom';
|
|
2
|
+
import { PopperBase } from "./PopperBase";
|
|
2
3
|
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.default = exports.Popper = void 0;
|
|
5
|
-
var _reactDom = require("react-dom");
|
|
6
|
-
var _PopperBase = require("./PopperBase");
|
|
7
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
4
|
//TODO TESTS
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
|
+
export const Popper = props => {
|
|
11
8
|
if (!props.open) return null;
|
|
12
|
-
return /*#__PURE__*/(
|
|
13
|
-
children: /*#__PURE__*/
|
|
9
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
10
|
+
children: /*#__PURE__*/createPortal( /*#__PURE__*/_jsx(PopperBase, {
|
|
14
11
|
...props,
|
|
15
12
|
children: props.children
|
|
16
13
|
}), document.body)
|
|
17
14
|
});
|
|
18
15
|
};
|
|
19
|
-
|
|
20
|
-
var _default = exports.default = Popper;
|
|
16
|
+
export default Popper;
|
package/ui/Popper/PopperBase.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
"use client";
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const PopperBase = props => {
|
|
3
|
+
import { useEffect, useRef } from 'react';
|
|
4
|
+
import { createPopper } from '@popperjs/core';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
|
+
export const PopperBase = props => {
|
|
10
8
|
const {
|
|
11
9
|
anchorEl,
|
|
12
10
|
children,
|
|
@@ -15,8 +13,8 @@ const PopperBase = props => {
|
|
|
15
13
|
anchorPosition,
|
|
16
14
|
open
|
|
17
15
|
} = props;
|
|
18
|
-
const tooltipRef =
|
|
19
|
-
|
|
16
|
+
const tooltipRef = useRef(null);
|
|
17
|
+
useEffect(() => {
|
|
20
18
|
let modifiers = [{
|
|
21
19
|
name: 'offset',
|
|
22
20
|
options: {
|
|
@@ -36,7 +34,7 @@ const PopperBase = props => {
|
|
|
36
34
|
}
|
|
37
35
|
});
|
|
38
36
|
}
|
|
39
|
-
const popper =
|
|
37
|
+
const popper = createPopper(anchorEl, tooltipRef.current, {
|
|
40
38
|
placement: placement,
|
|
41
39
|
modifiers: modifiers
|
|
42
40
|
});
|
|
@@ -45,13 +43,12 @@ const PopperBase = props => {
|
|
|
45
43
|
// handlePopperRefRef.current!(null)
|
|
46
44
|
};
|
|
47
45
|
}, [open, placement]);
|
|
48
|
-
return /*#__PURE__*/(
|
|
49
|
-
children: /*#__PURE__*/(
|
|
46
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
47
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
50
48
|
ref: tooltipRef,
|
|
51
49
|
className: className,
|
|
52
50
|
children: children
|
|
53
51
|
})
|
|
54
52
|
});
|
|
55
53
|
};
|
|
56
|
-
|
|
57
|
-
var _default = exports.default = PopperBase;
|
|
54
|
+
export default PopperBase;
|
package/ui/Popper/index.js
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
exports.__esModule = true;
|
|
5
|
-
exports.default = exports.PopperBase = void 0;
|
|
6
|
-
var _Popper = _interopRequireDefault(require("./Popper"));
|
|
7
|
-
exports.default = _Popper.default;
|
|
8
|
-
var _PopperBase = require("./PopperBase");
|
|
9
|
-
exports.PopperBase = _PopperBase.PopperBase;
|
|
1
|
+
export { default } from "./Popper";
|
|
2
|
+
export { PopperBase } from "./PopperBase";
|
package/ui/Skeleton/Skeleton.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
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";
|
|
8
3
|
const Skeleton = props => {
|
|
9
4
|
const {
|
|
10
5
|
width = '100%',
|
|
@@ -13,9 +8,9 @@ const Skeleton = props => {
|
|
|
13
8
|
circle,
|
|
14
9
|
...divProps
|
|
15
10
|
} = props;
|
|
16
|
-
return /*#__PURE__*/(
|
|
11
|
+
return /*#__PURE__*/_jsx("div", {
|
|
17
12
|
...divProps,
|
|
18
|
-
className: (
|
|
13
|
+
className: clsx(className, 'arm-skeleton', {
|
|
19
14
|
'arm-skeleton_circle': !!circle
|
|
20
15
|
}),
|
|
21
16
|
style: {
|
|
@@ -24,5 +19,4 @@ const Skeleton = props => {
|
|
|
24
19
|
}
|
|
25
20
|
});
|
|
26
21
|
};
|
|
27
|
-
|
|
28
|
-
module.exports = exports.default;
|
|
22
|
+
export default Skeleton;
|
package/ui/Skeleton/index.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
exports.__esModule = true;
|
|
5
|
-
exports.default = void 0;
|
|
6
|
-
var _Skeleton = _interopRequireDefault(require("./Skeleton"));
|
|
7
|
-
exports.default = _Skeleton.default;
|
|
8
|
-
module.exports = exports.default;
|
|
1
|
+
export { default } from "./Skeleton";
|
package/ui/Slider/RcSlider.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/ui/Slider/Slider.js
CHANGED
|
@@ -1,30 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
require("!style-loader!css-loader!./style.css");
|
|
8
|
-
var _HelperText = _interopRequireDefault(require("../HelperText/HelperText"));
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
1
|
+
import RcSlider from 'rc-slider';
|
|
2
|
+
import '!style-loader!css-loader!./style.css';
|
|
3
|
+
import HelperText from "../HelperText/HelperText";
|
|
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 Slider = props => {
|
|
11
8
|
let {
|
|
12
9
|
size = 'large',
|
|
13
10
|
...restProps
|
|
14
11
|
} = props;
|
|
15
|
-
return /*#__PURE__*/(
|
|
16
|
-
children: /*#__PURE__*/(
|
|
17
|
-
children: [/*#__PURE__*/(
|
|
12
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
13
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
14
|
+
children: [/*#__PURE__*/_jsx(RcSlider, {
|
|
18
15
|
...restProps,
|
|
19
16
|
className: '_' + size
|
|
20
|
-
}), restProps.min !== undefined && restProps.max !== undefined && /*#__PURE__*/(
|
|
17
|
+
}), restProps.min !== undefined && restProps.max !== undefined && /*#__PURE__*/_jsxs("div", {
|
|
21
18
|
className: 'arm-slider__text',
|
|
22
|
-
children: [/*#__PURE__*/(
|
|
23
|
-
children: /*#__PURE__*/(
|
|
19
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
20
|
+
children: /*#__PURE__*/_jsx(HelperText, {
|
|
24
21
|
children: restProps.min
|
|
25
22
|
})
|
|
26
|
-
}), /*#__PURE__*/(
|
|
27
|
-
children: /*#__PURE__*/(
|
|
23
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
24
|
+
children: /*#__PURE__*/_jsx(HelperText, {
|
|
28
25
|
children: restProps.max
|
|
29
26
|
})
|
|
30
27
|
})]
|
|
@@ -32,5 +29,4 @@ const Slider = props => {
|
|
|
32
29
|
})
|
|
33
30
|
});
|
|
34
31
|
};
|
|
35
|
-
|
|
36
|
-
module.exports = exports.default;
|
|
32
|
+
export default Slider;
|
package/ui/Slider/index.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
exports.__esModule = true;
|
|
5
|
-
exports.default = void 0;
|
|
6
|
-
var _Slider = _interopRequireDefault(require("./Slider"));
|
|
7
|
-
exports.default = _Slider.default;
|
|
8
|
-
module.exports = exports.default;
|
|
1
|
+
export { default } from "./Slider";
|
package/ui/Stack/Stack.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
exports.default = void 0;
|
|
6
|
-
var _react = require("react");
|
|
7
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
8
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
1
|
+
import { cloneElement } from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
9
5
|
const wrapItem = (item, spacing, index) => {
|
|
10
|
-
if (!Array.isArray(item)) return [/*#__PURE__*/
|
|
6
|
+
if (!Array.isArray(item)) return [/*#__PURE__*/cloneElement( /*#__PURE__*/_jsx(StackItem, {
|
|
11
7
|
spacing: spacing,
|
|
12
8
|
children: item
|
|
13
9
|
}, index))];
|
|
@@ -29,14 +25,14 @@ const Stack = props => {
|
|
|
29
25
|
// childrenProp = children.map((child, index) => {
|
|
30
26
|
// return cloneElement(<StackItem key={index} spacing={spacing}>{child}</StackItem>)
|
|
31
27
|
// })
|
|
32
|
-
} else childrenProp = /*#__PURE__*/(
|
|
28
|
+
} else childrenProp = /*#__PURE__*/_jsx(StackItem, {
|
|
33
29
|
spacing: spacing,
|
|
34
30
|
children: children
|
|
35
31
|
});
|
|
36
|
-
return /*#__PURE__*/(
|
|
37
|
-
children: /*#__PURE__*/(
|
|
32
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
33
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
38
34
|
...divProps,
|
|
39
|
-
className: (
|
|
35
|
+
className: clsx('arm-stack', 'flex', className, {
|
|
40
36
|
'flex-wrap': !!wrap,
|
|
41
37
|
'items-center': center,
|
|
42
38
|
['arm-stack_spacing_' + spacing]: !!spacing
|
|
@@ -50,12 +46,11 @@ const StackItem = props => {
|
|
|
50
46
|
children,
|
|
51
47
|
spacing
|
|
52
48
|
} = props;
|
|
53
|
-
return /*#__PURE__*/(
|
|
54
|
-
className: (
|
|
49
|
+
return /*#__PURE__*/_jsx("div", {
|
|
50
|
+
className: clsx({
|
|
55
51
|
['arm-stack-item_spacing_' + spacing]: !!spacing
|
|
56
52
|
}),
|
|
57
53
|
children: children
|
|
58
54
|
});
|
|
59
55
|
};
|
|
60
|
-
|
|
61
|
-
module.exports = exports.default;
|
|
56
|
+
export default Stack;
|
package/ui/Stack/index.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
exports.__esModule = true;
|
|
5
|
-
exports.default = void 0;
|
|
6
|
-
var _Stack = _interopRequireDefault(require("./Stack"));
|
|
7
|
-
exports.default = _Stack.default;
|
|
8
|
-
module.exports = exports.default;
|
|
1
|
+
export { default } from "./Stack";
|
package/ui/Status/Status.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 { jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
5
|
function Status(props) {
|
|
9
6
|
let {
|
|
10
7
|
color,
|
|
@@ -17,21 +14,20 @@ function Status(props) {
|
|
|
17
14
|
...restProps
|
|
18
15
|
} = props;
|
|
19
16
|
const Component = as || 'span';
|
|
20
|
-
return /*#__PURE__*/(
|
|
21
|
-
children: /*#__PURE__*/(
|
|
17
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
18
|
+
children: /*#__PURE__*/_jsxs(Component, {
|
|
22
19
|
...restProps,
|
|
23
|
-
className: (
|
|
20
|
+
className: clsx('arm-status', ['arm-status_' + color], className, {
|
|
24
21
|
['arm-status_size_' + size]: !!size
|
|
25
22
|
}),
|
|
26
|
-
children: [/*#__PURE__*/(
|
|
23
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
27
24
|
className: 'arm-status__content',
|
|
28
25
|
children: text || children
|
|
29
|
-
}), icon && /*#__PURE__*/(
|
|
30
|
-
className: (
|
|
26
|
+
}), icon && /*#__PURE__*/_jsx("span", {
|
|
27
|
+
className: clsx('arm-status__icon', 'material_icon'),
|
|
31
28
|
children: icon
|
|
32
29
|
})]
|
|
33
30
|
})
|
|
34
31
|
});
|
|
35
32
|
}
|
|
36
|
-
|
|
37
|
-
module.exports = exports.default;
|
|
33
|
+
export default Status;
|
package/ui/Status/index.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
exports.__esModule = true;
|
|
5
|
-
exports.default = void 0;
|
|
6
|
-
var _Status = _interopRequireDefault(require("./Status"));
|
|
7
|
-
exports.default = _Status.default;
|
|
8
|
-
module.exports = exports.default;
|
|
1
|
+
export { default } from "./Status";
|